问题反馈修改

This commit is contained in:
仲么了
2023-08-29 16:14:09 +08:00
parent 7c79eddc05
commit 38b827af46
23 changed files with 330 additions and 144 deletions

View File

@@ -111,8 +111,8 @@
<view class="content-des">请拖动图中的蓝色定位图标选择监测点位置(左上角)</view>
<uni-forms>
<uni-data-select
v-model="point.position"
:localdata="positionListRange"
v-model="point.linePostion"
:localdata="positionList"
@change="positionChange"
></uni-data-select>
<uni-easyinput
@@ -159,16 +159,6 @@ export default {
deviceInfo: {},
}
},
computed:{
positionListRange(){
return this.positionList.map(item => {
return {
...item,
disable: this.point.linePostion !== item.id && this.pointList.some(item2 => item2.linePostion === item.id)
}
})
}
},
onLoad(options) {
this.deviceInfo = JSON.parse(decodeURIComponent(options.deviceInfo))
console.log(this.deviceInfo)
@@ -178,7 +168,6 @@ export default {
return {
...item,
name: item.label,
position: item.linePostion,
}
})
console.log(this.pointList, 'this.poinitList')
@@ -224,10 +213,9 @@ export default {
this.formData.topologyDiagramUrl = this.imageList[this.activeGplot].filePath
this.formData.topologyDiagram = this.imageList[this.activeGplot].id
this.pointList.forEach((item) => {
console.log(item.position)
this.imageList[this.activeGplot].csLineTopologyTemplateVOList.forEach((item3) => {
console.log(item3.linePostion)
if (item3.linePostion === item.position) {
if (item3.linePostion === item.linePostion) {
item.lat = item3.lat
item.lng = item3.lng
}
@@ -311,7 +299,7 @@ export default {
this.$refs.point.open()
},
addPoint() {
if (!this.point.position) {
if (!this.point.linePostion) {
this.$util.toast('请选择监测点')
return
}
@@ -319,13 +307,15 @@ export default {
this.point.name = this.point.alias
} else {
this.positionList.forEach((item) => {
if (item.id == this.point.position) {
if (item.id === this.point.linePostion) {
this.point.name = item.name
}
})
}
this.point.lat = this.point.coordinate.x
this.point.lng = this.point.coordinate.y
if (this.point.coordinate) {
this.point.lat = this.point.coordinate.x
this.point.lng = this.point.coordinate.y
}
this.pointList[this.editIndex] = this.point
console.log(this.pointList)
this.closeDrawer()
@@ -360,6 +350,16 @@ export default {
// this.point.lng = e.detail.y
},
submit() {
// 检查pointLlist监测点是否重复并给出提示
let arr = []
this.pointList.forEach((item) => {
arr.push(item.linePostion)
})
let set = new Set(arr)
if (set.size !== arr.length) {
this.$util.toast('监测点不能重复')
return
}
updateDevice({
pointList: this.pointList,
id: this.imageList[this.activeGplot].id