From eea164099ac4716f6af368d2470feef2848ae8f6 Mon Sep 17 00:00:00 2001 From: yyy <2605810609@qq.com> Date: Tue, 25 Mar 2025 09:34:13 +0800 Subject: [PATCH 1/4] =?UTF-8?q?bug=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- index.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/index.html b/index.html index 8cfcbefa..390385d0 100644 --- a/index.html +++ b/index.html @@ -1,4 +1,4 @@ - + @@ -136,7 +136,7 @@
- +
%VITE_APP_TITLE%
From 375420371ea942fd31f7894afe11447c42cc50c6 Mon Sep 17 00:00:00 2001 From: yyy <2605810609@qq.com> Date: Tue, 25 Mar 2025 10:43:09 +0800 Subject: [PATCH 2/4] =?UTF-8?q?=E7=BA=BF=E5=BA=93=E5=8C=BA=E5=9F=9F?= =?UTF-8?q?=E6=95=B0=E9=87=8F=E6=94=B9=E4=B8=BA=E5=B1=82=E6=95=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../realTimeMap/components-tool/itemAreaSettingDialog.vue | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/views/mapPage/realTimeMap/components-tool/itemAreaSettingDialog.vue b/src/views/mapPage/realTimeMap/components-tool/itemAreaSettingDialog.vue index c0b32103..7b616ef8 100644 --- a/src/views/mapPage/realTimeMap/components-tool/itemAreaSettingDialog.vue +++ b/src/views/mapPage/realTimeMap/components-tool/itemAreaSettingDialog.vue @@ -70,7 +70,9 @@ const form = ref({ const open = (list) => { dialogFormVisible.value = true form.value.mapItemIds = list.map((item) => item.id) - form.value.areaNumber = form.value.mapItemIds.length + form.value.areaNumber = list.reduce((sum, item) => { + return sum + item.dataList.length + }, 0) form.value.areaName = '' form.value.skuInfo = '' } From 47ec7b8bfbcdc8ed8e96284bb043540d37908d5e Mon Sep 17 00:00:00 2001 From: yyy <2605810609@qq.com> Date: Tue, 25 Mar 2025 11:43:05 +0800 Subject: [PATCH 3/4] =?UTF-8?q?=E5=AD=97=E7=AC=A6=E9=95=BF=E5=BA=A6?= =?UTF-8?q?=E9=99=90=E5=88=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/board/device/createEditDialog.vue | 114 +++++++++--------- .../mapPage/locationList/editFormDialog.vue | 2 +- src/views/mapPage/locationList/index.vue | 1 + .../components/createTaskDialog.vue | 2 +- .../realTimeMap/components/storeDialog.vue | 91 +++++++------- 5 files changed, 106 insertions(+), 104 deletions(-) diff --git a/src/views/board/device/createEditDialog.vue b/src/views/board/device/createEditDialog.vue index 58e569f7..cf3d361d 100644 --- a/src/views/board/device/createEditDialog.vue +++ b/src/views/board/device/createEditDialog.vue @@ -1,8 +1,13 @@
-
库位名:
+
库位号:
{{ item.showData?.locationNo || '' }}
@@ -713,7 +713,7 @@ const linkWebSocket = (url) => { let data = JSON.parse(jsonMsg.content) // console.log('======规划路线======', JSON.parse(data).data) let dataList = JSON.parse(data).data - if(lineList.value.length > 0) { + if (lineList.value.length > 0) { console.log(lineList.value) lineList.value = setIsSelect(lineList.value, dataList) } @@ -722,13 +722,13 @@ const linkWebSocket = (url) => { } } -const setIsSelect =(arr1, arr2) => { - for (let i = 0; i < arr1.length; i++) { - const element = arr1[i]; - const isExist = arr2.includes(element.id); - element.isSelect = isExist; - } - return arr1; +const setIsSelect = (arr1, arr2) => { + for (let i = 0; i < arr1.length; i++) { + const element = arr1[i] + const isExist = arr2.includes(element.id) + element.isSelect = isExist + } + return arr1 } // 查看更多异常列表 const lookError = () => { diff --git a/src/views/mapPage/realTimeMap/components/indexPage.vue b/src/views/mapPage/realTimeMap/components/indexPage.vue index 33ff4ac0..3769d4f5 100644 --- a/src/views/mapPage/realTimeMap/components/indexPage.vue +++ b/src/views/mapPage/realTimeMap/components/indexPage.vue @@ -7,7 +7,7 @@ cursor: isDrag ? 'pointer' : 'default', scale: isSizeRadio, transformOrigin: '0 0', - width: isFull?'100%':(widthVal + 'px') + width: isFull ? '100%' : widthVal + 'px' }" @wheel="handleWheel" > @@ -156,7 +156,7 @@
-
库位名:
+
库位号:
{{ item.showData?.locationNo || '' }}
@@ -177,16 +177,16 @@ - +
@@ -198,12 +198,12 @@
设备类型:
- {{ item.showData?filterTypeFun(item.showData.deviceType, typeList) : '' }} + {{ item.showData ? filterTypeFun(item.showData.deviceType, typeList) : '' }}
- + -
+
{ const typeList = ref([]) const getTypeList = () => { - typeList.value = getDictOptions(DICT_TYPE.DEVICE_TYPE)&&getDictOptions(DICT_TYPE.DEVICE_TYPE).length?JSON.parse(JSON.stringify(getDictOptions(DICT_TYPE.DEVICE_TYPE))):[] - + typeList.value = + getDictOptions(DICT_TYPE.DEVICE_TYPE) && getDictOptions(DICT_TYPE.DEVICE_TYPE).length + ? JSON.parse(JSON.stringify(getDictOptions(DICT_TYPE.DEVICE_TYPE))) + : [] } //根据type和列表返回对应中文 const filterTypeFun = (type, list) => { - if (list.length) { - let obj = list.find(item => { - return item.value == type - }) - return obj == undefined ? type : obj.label - } else { - return type - } + if (list.length) { + let obj = list.find((item) => { + return item.value == type + }) + return obj == undefined ? type : obj.label + } else { + return type + } } const isFull = ref(false) // 定义属性 @@ -484,7 +486,6 @@ const changDriveLineShow = () => { const toggleFullScreen = () => { var elem = document.getElementById('indexpage-container') // 获取元素 if (!document.fullscreenElement) { - // 检查是否已经是全屏模式 if (elem.requestFullscreen) { // 支持requestFullscreen API的标准方式 @@ -530,41 +531,41 @@ const toggleFullScreen = () => { isFull.value = false radio.value = 1 if (pointList.value.length) { - pointList.value.forEach((item) => { - item.radio = radio.value - }) - } - if (testCarList.value.length) { - testCarList.value.forEach((item) => { - item.radio = radio.value - }) - } + pointList.value.forEach((item) => { + item.radio = radio.value + }) + } + if (testCarList.value.length) { + testCarList.value.forEach((item) => { + item.radio = radio.value + }) + } resetPosition() } else { console.log('已进入全屏模式') // 在这里可以添加进入全屏后的逻辑 isDrag.value = true isFull.value = true - + nextTick(() => { let width = getElementWidthByClass('affix-container') - getImageWidth(imgUrl.value, 'width').then((res) => { - console.log(res) - let ratioVal = width / res - radio.value = ratioVal - console.log(radio.value) - // widthVal.value = res * radio.value - if (pointList.value.length) { - pointList.value.forEach((item) => { - item.radio = radio.value - }) - } - if (testCarList.value.length) { - testCarList.value.forEach((item) => { - item.radio = radio.value - }) - } - }) + getImageWidth(imgUrl.value, 'width').then((res) => { + console.log(res) + let ratioVal = width / res + radio.value = ratioVal + console.log(radio.value) + // widthVal.value = res * radio.value + if (pointList.value.length) { + pointList.value.forEach((item) => { + item.radio = radio.value + }) + } + if (testCarList.value.length) { + testCarList.value.forEach((item) => { + item.radio = radio.value + }) + } + }) }) } }) @@ -620,7 +621,11 @@ const getPositionMapListFun = async (positionMapId) => { pointList.value?.forEach((item) => { item.formattedData = item.dataJson ? JSON.parse(item.dataJson) : '' // console.log(JSON.parse(item.dataJson),item.type) - item.showData = item.dataJson ? (item.type == 2 ? JSON.parse(item.dataJson)[0] : JSON.parse(item.dataJson)) : null + item.showData = item.dataJson + ? item.type == 2 + ? JSON.parse(item.dataJson)[0] + : JSON.parse(item.dataJson) + : null item.imgUrl = formatTypeImg(item.type) if (item.type === 1) { @@ -796,7 +801,7 @@ const linkWebSocket = (url) => { let data = JSON.parse(jsonMsg.content) // console.log('======规划路线======', JSON.parse(data).data) let dataList = JSON.parse(data).data - if(lineList.value.length > 0) { + if (lineList.value.length > 0) { console.log(lineList.value) lineList.value = setIsSelect(lineList.value, dataList) } @@ -804,13 +809,13 @@ const linkWebSocket = (url) => { }) } } -const setIsSelect =(arr1, arr2) => { - for (let i = 0; i < arr1.length; i++) { - const element = arr1[i]; - const isExist = arr2.includes(element.id); - element.isSelect = isExist; - } - return arr1; +const setIsSelect = (arr1, arr2) => { + for (let i = 0; i < arr1.length; i++) { + const element = arr1[i] + const isExist = arr2.includes(element.id) + element.isSelect = isExist + } + return arr1 } // 查看更多异常列表