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%
diff --git a/src/views/board/allBoard/indexPage.vue b/src/views/board/allBoard/indexPage.vue index c2f8e730..e4adb01f 100644 --- a/src/views/board/allBoard/indexPage.vue +++ b/src/views/board/allBoard/indexPage.vue @@ -154,7 +154,7 @@
-
库位名:
+
库位号:
{{ 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) } @@ -721,13 +721,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/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 || '' }}
@@ -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 } // 查看更多异常列表 diff --git a/src/views/mapPage/realTimeMap/components/storeDialog.vue b/src/views/mapPage/realTimeMap/components/storeDialog.vue index 664f6ec1..154a5053 100644 --- a/src/views/mapPage/realTimeMap/components/storeDialog.vue +++ b/src/views/mapPage/realTimeMap/components/storeDialog.vue @@ -2,37 +2,45 @@
-
- {{ item.locationNo || '--' }} - - +
+ {{ item.locationNo || '--' }} + +
- + - + - - + + - - + + - - + + @@ -55,32 +63,27 @@ const dialogVisible = ref(false) // 弹窗的是否展示 const formLoading = ref(false) // 表单的加载中:1)修改时的数据加载;2)提交的按钮禁用 const formData = ref({ - locationNo: undefined, //库位编号 + locationNo: undefined, //库位编号 areaName: undefined, //区域名称 locationUseStatus: undefined, //库位状态 (0:空闲、1:占用) locationEnable: undefined, //是否禁用(0:禁用、1:启用) - skuInfo: undefined, //物料信息 -}) -const formRules = reactive({ - + skuInfo: undefined //物料信息 }) +const formRules = reactive({}) const selectIndex = ref(0) const formRef = ref() // 表单 Ref const storeData = ref([]) /** 打开弹窗 */ const open = async (data) => { - resetForm() - if(data&&data.length){ + if (data && data.length) { storeData.value = data.reverse() console.log(storeData.value) - selectIndex.value = 0 - console.log(data) - formData.value = JSON.parse(JSON.stringify(data[0])) + selectIndex.value = 0 + console.log(data) + formData.value = JSON.parse(JSON.stringify(data[0])) } dialogVisible.value = true - - } defineExpose({ open }) // 提供 open 方法,用于打开弹窗 @@ -98,7 +101,6 @@ const submitForm = async () => { message.success('操作成功') emit('success') dialogVisible.value = false - } finally { formLoading.value = false } @@ -112,15 +114,14 @@ const changeStore = (item, index) => { //前往任务管理页面 const { push } = useRouter() - /** 重置表单 */ const resetForm = () => { formData.value = { - locationNo: undefined, //库位编号 - areaName: undefined, //区域名称 - locationUseStatus: undefined, //库位状态 (0:空闲、1:占用) - locationEnable: undefined, //是否禁用(0:禁用、1:启用) - skuInfo: undefined, //物料信息 + locationNo: undefined, //库位编号 + areaName: undefined, //区域名称 + locationUseStatus: undefined, //库位状态 (0:空闲、1:占用) + locationEnable: undefined, //是否禁用(0:禁用、1:启用) + skuInfo: undefined //物料信息 } formRef.value?.resetFields() } @@ -212,24 +213,24 @@ const resetForm = () => { color: #0d162a; vertical-align: middle; cursor: pointer; - border: 1px solid rgba(0,0,0,0); + border: 1px solid rgba(0, 0, 0, 0); position: relative; } .ellipsis { - display: -webkit-box; - -webkit-box-orient: vertical; - -webkit-line-clamp: 2; - overflow: hidden; - text-overflow: ellipsis; + display: -webkit-box; + -webkit-box-orient: vertical; + -webkit-line-clamp: 2; + overflow: hidden; + text-overflow: ellipsis; } -.store-dialog-left-item-img-jinyong{ +.store-dialog-left-item-img-jinyong { position: absolute; left: -3px; top: -4px; width: 25px; height: 25px; } -.store-dialog-left-item-img-suoding{ +.store-dialog-left-item-img-suoding { position: absolute; left: 0; bottom: 0;