diff --git a/.env.local b/.env.local index c22b406f..a3752946 100644 --- a/.env.local +++ b/.env.local @@ -4,7 +4,7 @@ NODE_ENV=development VITE_DEV=true # 请求路径 -VITE_BASE_URL='http://192.168.0.172:48080' +VITE_BASE_URL='http://192.168.0.74:48080' # VITE_BASE_URL='http://192.168.0.189:48080' # 文件上传类型:server - 后端上传, client - 前端直连上传,仅支持 S3 服务 diff --git a/src/assets/location-icon.png b/src/assets/location-icon.png deleted file mode 100644 index d67c6232..00000000 Binary files a/src/assets/location-icon.png and /dev/null differ diff --git a/src/assets/login-bg.png b/src/assets/login-bg.png new file mode 100644 index 00000000..34e82886 Binary files /dev/null and b/src/assets/login-bg.png differ diff --git a/src/assets/warehouse-map.png b/src/assets/warehouse-map.png deleted file mode 100644 index 5a35ca6d..00000000 Binary files a/src/assets/warehouse-map.png and /dev/null differ diff --git a/src/views/Login/Login.vue b/src/views/Login/Login.vue index ff6f068a..900914ae 100644 --- a/src/views/Login/Login.vue +++ b/src/views/Login/Login.vue @@ -1,19 +1,19 @@ @@ -352,4 +356,26 @@ onMounted(() => { cursor: pointer; } } + +.login-form { + box-shadow: rgba(0, 0, 0, 0.05) 0px 0px 0px 1px; + width: 100%; + background-color: #ffffff; + padding: 40px 42px 32px 42px; + margin-top: 20px; + + .login-tip { + margin-bottom: 28px; + margin-left: 10px; + font-family: + PingFangSC, + PingFang SC; + font-weight: 600; + font-size: 18px; + color: #0d162a; + line-height: 22px; + text-align: left; + font-style: normal; + } +} diff --git a/src/views/Login/components/LoginFormTitle.vue b/src/views/Login/components/LoginFormTitle.vue index cdf4facc..8d6bf042 100644 --- a/src/views/Login/components/LoginFormTitle.vue +++ b/src/views/Login/components/LoginFormTitle.vue @@ -1,6 +1,7 @@ + diff --git a/src/views/mapPage/realTimeMap/components-tool/editNodeProperties.vue b/src/views/mapPage/realTimeMap/components-tool/editNodeProperties.vue index c715b61a..e0717ab5 100644 --- a/src/views/mapPage/realTimeMap/components-tool/editNodeProperties.vue +++ b/src/views/mapPage/realTimeMap/components-tool/editNodeProperties.vue @@ -180,7 +180,6 @@ const submit = async (formEl) => { form.value.dataJson = '' } else if (form.value.type === 2) { //库位点 类型为数组 - let list = [] for (let index = 0; index < form.value.layersNumber; index++) { let item = { @@ -240,7 +239,7 @@ const submit = async (formEl) => { const equipmentList = ref([]) //用过的设备列表 const open = (item, list) => { form.value = item - form.value.layersNumber = item.dataList.length || '' + form.value.layersNumber = item.dataList?.length || '' form.value.deviceId = item?.deviceId || item?.dataObj?.id || '' form.value.positionMapId = props.positionMapId equipmentList.value = list @@ -254,30 +253,52 @@ const open = (item, list) => { } //类型改变 -const typeChange = () => { - if (form.value.type === 1 || form.value.type === 5 || form.value.type === 6) { - form.value.layersNumber = undefined - form.value.dataJson = '' - } - - if (form.value.type !== 2 && form.value.type !== 4) { - form.value.direction = undefined - form.value.inDirection = undefined - form.value.outDirection = undefined - } - - if (form.value.type === 1) { - form.value.locationDeep = 10 - form.value.locationWide = 10 - } - - if (form.value.type === 5 || form.value.type === 6) { - form.value.locationDeep = 30 - form.value.locationWide = 30 - } - - if (form.value.type !== 2) { +const typeChange = (type) => { + form.value.dataJson = null + form.value.dataObj = {} + form.value.dataList = [] + if (type === 1) { + form.value.layersNumber = null + form.value.direction = null + form.value.inDirection = null + form.value.outDirection = null form.value.locationNumber = null + form.value.locationDeep = 50 + form.value.locationWide = 50 + form.value.locationDeepPx = 10 + form.value.locationWidePx = 10 + } else if (type === 2) { + form.value.locationNumber = 1 + } else if (type === 3) { + form.value.direction = null + form.value.inDirection = null + form.value.outDirection = null + form.value.locationNumber = null + } else if (type === 4) { + form.value.direction = null + form.value.inDirection = null + form.value.outDirection = null + form.value.locationNumber = null + } else if (type === 5) { + form.value.layersNumber = null + form.value.direction = null + form.value.inDirection = null + form.value.outDirection = null + form.value.locationNumber = null + form.value.locationDeep = 150 + form.value.locationWide = 150 + form.value.locationDeepPx = 30 + form.value.locationWidePx = 30 + } else if (type === 6) { + form.value.layersNumber = null + form.value.direction = null + form.value.inDirection = null + form.value.outDirection = null + form.value.locationNumber = null + form.value.locationDeep = 150 + form.value.locationWide = 150 + form.value.locationDeepPx = 30 + form.value.locationWidePx = 30 } } //设备切换 diff --git a/src/views/mapPage/realTimeMap/components-tool/textFormToolDialog.vue b/src/views/mapPage/realTimeMap/components-tool/textFormToolDialog.vue index 4b4569fa..61bfcbd2 100644 --- a/src/views/mapPage/realTimeMap/components-tool/textFormToolDialog.vue +++ b/src/views/mapPage/realTimeMap/components-tool/textFormToolDialog.vue @@ -82,5 +82,6 @@ const emit = defineEmits(['textFormSuccess']) box-shadow: rgba(0, 0, 0, 0.05) 0px 0px 0px 1px; padding: 18px 20px 0 20px; border-radius: 6px; + z-index: 999; } diff --git a/src/views/mapPage/realTimeMap/editMap.vue b/src/views/mapPage/realTimeMap/editMap.vue index d76d4815..30ceb29e 100644 --- a/src/views/mapPage/realTimeMap/editMap.vue +++ b/src/views/mapPage/realTimeMap/editMap.vue @@ -331,19 +331,23 @@ border: state.currentItemIndex === index ? '1px dashed #000' : 'none' }" /> -
- {{ item.text }} -
+
+ {{ item.text }} +
@@ -604,13 +608,15 @@ const resizeEnd = (locationX, locationY, w, h, item, index) => { nextTick(() => { let x = Number(locationX) + Number(item.locationWidePx) / 2 let y = Number(locationY) + Number(item.locationDeepPx) / 2 + let actualPoint = disposeEventPoint(x, y) state.allMapPointInfo[index].locationX = x state.allMapPointInfo[index].locationY = y state.allMapPointInfo[index].locationWidePx = w state.allMapPointInfo[index].locationDeepPx = h - addEditHistory() - + state.allMapPointInfo[index].actualLocationX = actualPoint.actualLocationX + state.allMapPointInfo[index].actualLocationY = actualPoint.actualLocationY + //更改路线里的 state.mapRouteList.forEach((route) => { if (item.id === route.startingPointId) { route.startPointX = x @@ -629,6 +635,7 @@ const resizeEnd = (locationX, locationY, w, h, item, index) => { route.actualEndPointY = actualPoint.actualLocationY } }) + addEditHistory() }) } @@ -641,9 +648,8 @@ const dragEnd = (locationX, locationY, item, index) => { let actualPoint = disposeEventPoint(x, y) state.allMapPointInfo[index].locationX = x state.allMapPointInfo[index].locationY = y - state.allMapPointInfo[index].actualStartPointX = actualPoint.actualLocationX - state.allMapPointInfo[index].actualStartPointY = actualPoint.actualLocationY - addEditHistory() + state.allMapPointInfo[index].actualLocationX = actualPoint.actualLocationX + state.allMapPointInfo[index].actualLocationY = actualPoint.actualLocationY //更改路线里的 state.mapRouteList.forEach((route) => { if (item.id === route.startingPointId) { @@ -663,6 +669,7 @@ const dragEnd = (locationX, locationY, item, index) => { route.actualEndPointY = actualPoint.actualLocationY } }) + addEditHistory() } // 旋转 const rotateEnd = (angle, item, index) => { @@ -684,11 +691,9 @@ const activatedHandle = (item, index) => { } //节点编辑 - if (toolbarSwitchType.value === 'editNode') { + if (toolbarSwitchType.value === 'editNode' && item.type !== 7) { let list = state.allMapPointInfo.filter((item) => item.type === 3) editNodePropertiesRef.value.open(JSON.parse(JSON.stringify(item)), list) - //取消监听键盘事件 - window.removeEventListener('keydown', handleKeyDown) } } //非选中 @@ -810,7 +815,7 @@ const handleInputEnd = () => { angle: 0, //旋转角度 draggable: true, //是否可以拖动 resizable: false, //是否可以调整大小 - rotatable: false, //是否可以旋转 + rotatable: true, //是否可以旋转 lockAspectRatio: true, //是否锁定比例 mapImageUrl: '', //图片 text: state.inputBoxValue, //文字内容 @@ -850,8 +855,6 @@ const submitNodeSuccess = (form) => { } }) addEditHistory() - //重新监听键盘事件 - window.addEventListener('keydown', handleKeyDown) } //工具栏点击 @@ -1170,6 +1173,8 @@ const toolbarClick = async (item) => { break case 'move': //移动 + moveForm.locationX = state.allMapPointInfo[state.currentItemIndex].locationX + moveForm.locationY = state.allMapPointInfo[state.currentItemIndex].locationY break case 'revolve': break @@ -1310,10 +1315,29 @@ const toolbarClick = async (item) => { //复制 const replicationNode = () => { let copyMapItem = state.allMapPointInfo[state.currentItemIndex] + + if (copyMapItem.type === 3) { + message.warning('设备不能复制!') + return + } + let locationX = Number(copyMapItem.locationX) + 20 let locationY = Number(copyMapItem.locationY) + 20 let actualPoint = disposeEventPoint(locationX, locationY) + if (copyMapItem.dataList.length > 0) { + copyMapItem.dataList.forEach((item) => { + delete item.id + delete item.locationNo + delete item.mapItemId + }) + copyMapItem.dataJson = JSON.stringify(copyMapItem.dataList) + } + if (copyMapItem.dataObj && JSON.stringify(copyMapItem.dataObj) !== '{}') { + delete copyMapItem.dataObj.id + delete copyMapItem.dataObj.positionMapItemId + copyMapItem.dataJson = JSON.stringify(copyMapItem.dataObj) + } state.copyMapItem = { positionMapId: copyMapItem.positionMapId, locationX: locationX, @@ -1774,8 +1798,6 @@ const handleEditRoute = (item, index) => { state.currentDragTarget.index = index state.selectedCurve = item editMapRouteDialogRef.value.open(JSON.parse(JSON.stringify(item))) - //取消监听键盘事件 - window.removeEventListener('keydown', handleKeyDown) } //单击 选中 const handleChooseRoute = (item, index) => { @@ -1826,7 +1848,6 @@ const editMapRouteDialogSubmit = (form) => { }) //增加一条历史记录 addEditHistory() //重新监听键盘事件 - window.addEventListener('keydown', handleKeyDown) } //测距相关 // 计算两点之间的距离 @@ -2049,6 +2070,7 @@ const saveNodeList = async () => { item.dataObj.fontColor = item.fontColor item.dataObj.fontType = item.fontType item.dataObj.fontFamily = item.fontFamily + item.dataObj.fontSize = item.fontSize item.dataObj.rotatable = item.rotatable item.dataObj.angle = item.angle //dataJson数据 @@ -2063,7 +2085,6 @@ const saveMapRoute = async () => { } //筛选图层 const layerSelectionSuccess = (typeList) => { - console.log(typeList) state.allMapPointInfo.forEach((item) => { // 如果 type 存在于第一个数组中,则将 layerSelectionShow 设置为 false if (typeList.includes(item.type)) { @@ -2326,6 +2347,10 @@ onUnmounted(() => { .right-tool-active { background: #ebf1ff !important; } + + .node-text { + white-space: nowrap; /* 防止文字自动换行 */ + } } .drop-down-menu {