库位名建议保持和库位列表命名一致,改为“库位号”
This commit is contained in:
parent
47ec7b8bfb
commit
5e13c6975f
@ -154,7 +154,7 @@
|
|||||||
</template>
|
</template>
|
||||||
<div>
|
<div>
|
||||||
<div class="indexpage-popover-item">
|
<div class="indexpage-popover-item">
|
||||||
<div> 库位名: </div>
|
<div> 库位号: </div>
|
||||||
<div>
|
<div>
|
||||||
{{ item.showData?.locationNo || '' }}
|
{{ item.showData?.locationNo || '' }}
|
||||||
</div>
|
</div>
|
||||||
@ -713,7 +713,7 @@ const linkWebSocket = (url) => {
|
|||||||
let data = JSON.parse(jsonMsg.content)
|
let data = JSON.parse(jsonMsg.content)
|
||||||
// console.log('======规划路线======', JSON.parse(data).data)
|
// console.log('======规划路线======', JSON.parse(data).data)
|
||||||
let dataList = JSON.parse(data).data
|
let dataList = JSON.parse(data).data
|
||||||
if(lineList.value.length > 0) {
|
if (lineList.value.length > 0) {
|
||||||
console.log(lineList.value)
|
console.log(lineList.value)
|
||||||
lineList.value = setIsSelect(lineList.value, dataList)
|
lineList.value = setIsSelect(lineList.value, dataList)
|
||||||
}
|
}
|
||||||
@ -721,13 +721,13 @@ const linkWebSocket = (url) => {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
const setIsSelect =(arr1, arr2) => {
|
const setIsSelect = (arr1, arr2) => {
|
||||||
for (let i = 0; i < arr1.length; i++) {
|
for (let i = 0; i < arr1.length; i++) {
|
||||||
const element = arr1[i];
|
const element = arr1[i]
|
||||||
const isExist = arr2.includes(element.id);
|
const isExist = arr2.includes(element.id)
|
||||||
element.isSelect = isExist;
|
element.isSelect = isExist
|
||||||
}
|
}
|
||||||
return arr1;
|
return arr1
|
||||||
}
|
}
|
||||||
// 查看更多异常列表
|
// 查看更多异常列表
|
||||||
const lookError = () => {
|
const lookError = () => {
|
||||||
|
@ -154,7 +154,7 @@
|
|||||||
</template>
|
</template>
|
||||||
<div>
|
<div>
|
||||||
<div class="indexpage-popover-item">
|
<div class="indexpage-popover-item">
|
||||||
<div> 库位名: </div>
|
<div> 库位号: </div>
|
||||||
<div>
|
<div>
|
||||||
{{ item.showData?.locationNo || '' }}
|
{{ item.showData?.locationNo || '' }}
|
||||||
</div>
|
</div>
|
||||||
@ -713,7 +713,7 @@ const linkWebSocket = (url) => {
|
|||||||
let data = JSON.parse(jsonMsg.content)
|
let data = JSON.parse(jsonMsg.content)
|
||||||
// console.log('======规划路线======', JSON.parse(data).data)
|
// console.log('======规划路线======', JSON.parse(data).data)
|
||||||
let dataList = JSON.parse(data).data
|
let dataList = JSON.parse(data).data
|
||||||
if(lineList.value.length > 0) {
|
if (lineList.value.length > 0) {
|
||||||
console.log(lineList.value)
|
console.log(lineList.value)
|
||||||
lineList.value = setIsSelect(lineList.value, dataList)
|
lineList.value = setIsSelect(lineList.value, dataList)
|
||||||
}
|
}
|
||||||
@ -722,13 +722,13 @@ const linkWebSocket = (url) => {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
const setIsSelect =(arr1, arr2) => {
|
const setIsSelect = (arr1, arr2) => {
|
||||||
for (let i = 0; i < arr1.length; i++) {
|
for (let i = 0; i < arr1.length; i++) {
|
||||||
const element = arr1[i];
|
const element = arr1[i]
|
||||||
const isExist = arr2.includes(element.id);
|
const isExist = arr2.includes(element.id)
|
||||||
element.isSelect = isExist;
|
element.isSelect = isExist
|
||||||
}
|
}
|
||||||
return arr1;
|
return arr1
|
||||||
}
|
}
|
||||||
// 查看更多异常列表
|
// 查看更多异常列表
|
||||||
const lookError = () => {
|
const lookError = () => {
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
cursor: isDrag ? 'pointer' : 'default',
|
cursor: isDrag ? 'pointer' : 'default',
|
||||||
scale: isSizeRadio,
|
scale: isSizeRadio,
|
||||||
transformOrigin: '0 0',
|
transformOrigin: '0 0',
|
||||||
width: isFull?'100%':(widthVal + 'px')
|
width: isFull ? '100%' : widthVal + 'px'
|
||||||
}"
|
}"
|
||||||
@wheel="handleWheel"
|
@wheel="handleWheel"
|
||||||
>
|
>
|
||||||
@ -156,7 +156,7 @@
|
|||||||
</template>
|
</template>
|
||||||
<div>
|
<div>
|
||||||
<div class="indexpage-popover-item">
|
<div class="indexpage-popover-item">
|
||||||
<div> 库位名: </div>
|
<div> 库位号: </div>
|
||||||
<div>
|
<div>
|
||||||
{{ item.showData?.locationNo || '' }}
|
{{ item.showData?.locationNo || '' }}
|
||||||
</div>
|
</div>
|
||||||
@ -177,16 +177,16 @@
|
|||||||
</el-popover>
|
</el-popover>
|
||||||
<!-- 设备点 -->
|
<!-- 设备点 -->
|
||||||
|
|
||||||
<el-popover placement="top-start" trigger="hover" width="auto" v-if="item.type == 3" >
|
<el-popover placement="top-start" trigger="hover" width="auto" v-if="item.type == 3">
|
||||||
<template #reference>
|
<template #reference>
|
||||||
<img
|
<img
|
||||||
v-if="item.type == 3"
|
v-if="item.type == 3"
|
||||||
:src="
|
:src="
|
||||||
item.formattedData.mapImageUrl ||
|
item.formattedData.mapImageUrl ||
|
||||||
'https://api.znkjfw.com/admin-api/infra/file/4/get/设备点_png_179_1739327151877.png'
|
'https://api.znkjfw.com/admin-api/infra/file/4/get/设备点_png_179_1739327151877.png'
|
||||||
"
|
"
|
||||||
:style="nodeStyle(item, index)"
|
:style="nodeStyle(item, index)"
|
||||||
/>
|
/>
|
||||||
</template>
|
</template>
|
||||||
<div>
|
<div>
|
||||||
<div class="indexpage-popover-item">
|
<div class="indexpage-popover-item">
|
||||||
@ -198,12 +198,12 @@
|
|||||||
<div class="indexpage-popover-item">
|
<div class="indexpage-popover-item">
|
||||||
<div> 设备类型: </div>
|
<div> 设备类型: </div>
|
||||||
<div>
|
<div>
|
||||||
{{ item.showData?filterTypeFun(item.showData.deviceType, typeList) : '' }}
|
{{ item.showData ? filterTypeFun(item.showData.deviceType, typeList) : '' }}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</el-popover>
|
</el-popover>
|
||||||
|
|
||||||
<!-- 停车点 -->
|
<!-- 停车点 -->
|
||||||
<img
|
<img
|
||||||
v-if="item.type == 4"
|
v-if="item.type == 4"
|
||||||
@ -238,7 +238,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<!-- 左下角图层 -->
|
<!-- 左下角图层 -->
|
||||||
<!-- :style="{ left: boxLeft + 'px' }" -->
|
<!-- :style="{ left: boxLeft + 'px' }" -->
|
||||||
<div class="affix-container-left" :style="{ left: 25 + 'px' }" v-if="!isAllBoard">
|
<div class="affix-container-left" :style="{ left: 25 + 'px' }" v-if="!isAllBoard">
|
||||||
<div class="affix-container-left-box">
|
<div class="affix-container-left-box">
|
||||||
<div
|
<div
|
||||||
class="affix-container-left-box-item-box"
|
class="affix-container-left-box-item-box"
|
||||||
@ -375,19 +375,21 @@ const nodeStyle = (item, index) => {
|
|||||||
const typeList = ref([])
|
const typeList = ref([])
|
||||||
|
|
||||||
const getTypeList = () => {
|
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和列表返回对应中文
|
//根据type和列表返回对应中文
|
||||||
const filterTypeFun = (type, list) => {
|
const filterTypeFun = (type, list) => {
|
||||||
if (list.length) {
|
if (list.length) {
|
||||||
let obj = list.find(item => {
|
let obj = list.find((item) => {
|
||||||
return item.value == type
|
return item.value == type
|
||||||
})
|
})
|
||||||
return obj == undefined ? type : obj.label
|
return obj == undefined ? type : obj.label
|
||||||
} else {
|
} else {
|
||||||
return type
|
return type
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
const isFull = ref(false)
|
const isFull = ref(false)
|
||||||
// 定义属性
|
// 定义属性
|
||||||
@ -484,7 +486,6 @@ const changDriveLineShow = () => {
|
|||||||
const toggleFullScreen = () => {
|
const toggleFullScreen = () => {
|
||||||
var elem = document.getElementById('indexpage-container') // 获取元素
|
var elem = document.getElementById('indexpage-container') // 获取元素
|
||||||
if (!document.fullscreenElement) {
|
if (!document.fullscreenElement) {
|
||||||
|
|
||||||
// 检查是否已经是全屏模式
|
// 检查是否已经是全屏模式
|
||||||
if (elem.requestFullscreen) {
|
if (elem.requestFullscreen) {
|
||||||
// 支持requestFullscreen API的标准方式
|
// 支持requestFullscreen API的标准方式
|
||||||
@ -530,41 +531,41 @@ const toggleFullScreen = () => {
|
|||||||
isFull.value = false
|
isFull.value = false
|
||||||
radio.value = 1
|
radio.value = 1
|
||||||
if (pointList.value.length) {
|
if (pointList.value.length) {
|
||||||
pointList.value.forEach((item) => {
|
pointList.value.forEach((item) => {
|
||||||
item.radio = radio.value
|
item.radio = radio.value
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
if (testCarList.value.length) {
|
if (testCarList.value.length) {
|
||||||
testCarList.value.forEach((item) => {
|
testCarList.value.forEach((item) => {
|
||||||
item.radio = radio.value
|
item.radio = radio.value
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
resetPosition()
|
resetPosition()
|
||||||
} else {
|
} else {
|
||||||
console.log('已进入全屏模式')
|
console.log('已进入全屏模式')
|
||||||
// 在这里可以添加进入全屏后的逻辑
|
// 在这里可以添加进入全屏后的逻辑
|
||||||
isDrag.value = true
|
isDrag.value = true
|
||||||
isFull.value = true
|
isFull.value = true
|
||||||
|
|
||||||
nextTick(() => {
|
nextTick(() => {
|
||||||
let width = getElementWidthByClass('affix-container')
|
let width = getElementWidthByClass('affix-container')
|
||||||
getImageWidth(imgUrl.value, 'width').then((res) => {
|
getImageWidth(imgUrl.value, 'width').then((res) => {
|
||||||
console.log(res)
|
console.log(res)
|
||||||
let ratioVal = width / res
|
let ratioVal = width / res
|
||||||
radio.value = ratioVal
|
radio.value = ratioVal
|
||||||
console.log(radio.value)
|
console.log(radio.value)
|
||||||
// widthVal.value = res * radio.value
|
// widthVal.value = res * radio.value
|
||||||
if (pointList.value.length) {
|
if (pointList.value.length) {
|
||||||
pointList.value.forEach((item) => {
|
pointList.value.forEach((item) => {
|
||||||
item.radio = radio.value
|
item.radio = radio.value
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
if (testCarList.value.length) {
|
if (testCarList.value.length) {
|
||||||
testCarList.value.forEach((item) => {
|
testCarList.value.forEach((item) => {
|
||||||
item.radio = radio.value
|
item.radio = radio.value
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
@ -620,7 +621,11 @@ const getPositionMapListFun = async (positionMapId) => {
|
|||||||
pointList.value?.forEach((item) => {
|
pointList.value?.forEach((item) => {
|
||||||
item.formattedData = item.dataJson ? JSON.parse(item.dataJson) : ''
|
item.formattedData = item.dataJson ? JSON.parse(item.dataJson) : ''
|
||||||
// console.log(JSON.parse(item.dataJson),item.type)
|
// 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)
|
item.imgUrl = formatTypeImg(item.type)
|
||||||
|
|
||||||
if (item.type === 1) {
|
if (item.type === 1) {
|
||||||
@ -796,7 +801,7 @@ const linkWebSocket = (url) => {
|
|||||||
let data = JSON.parse(jsonMsg.content)
|
let data = JSON.parse(jsonMsg.content)
|
||||||
// console.log('======规划路线======', JSON.parse(data).data)
|
// console.log('======规划路线======', JSON.parse(data).data)
|
||||||
let dataList = JSON.parse(data).data
|
let dataList = JSON.parse(data).data
|
||||||
if(lineList.value.length > 0) {
|
if (lineList.value.length > 0) {
|
||||||
console.log(lineList.value)
|
console.log(lineList.value)
|
||||||
lineList.value = setIsSelect(lineList.value, dataList)
|
lineList.value = setIsSelect(lineList.value, dataList)
|
||||||
}
|
}
|
||||||
@ -804,13 +809,13 @@ const linkWebSocket = (url) => {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
const setIsSelect =(arr1, arr2) => {
|
const setIsSelect = (arr1, arr2) => {
|
||||||
for (let i = 0; i < arr1.length; i++) {
|
for (let i = 0; i < arr1.length; i++) {
|
||||||
const element = arr1[i];
|
const element = arr1[i]
|
||||||
const isExist = arr2.includes(element.id);
|
const isExist = arr2.includes(element.id)
|
||||||
element.isSelect = isExist;
|
element.isSelect = isExist
|
||||||
}
|
}
|
||||||
return arr1;
|
return arr1
|
||||||
}
|
}
|
||||||
|
|
||||||
// 查看更多异常列表
|
// 查看更多异常列表
|
||||||
|
Loading…
Reference in New Issue
Block a user