|
@@ -15,7 +15,7 @@
|
|
|
:loading='loading'
|
|
|
:viewTable='viewTable'
|
|
|
@changeSwitch='handleSwich'
|
|
|
- :editChange='editChange'
|
|
|
+ :remarksText='remarksText'
|
|
|
></lengend-view>
|
|
|
</div>
|
|
|
</div>
|
|
@@ -27,9 +27,10 @@
|
|
|
v-if='editTable.length>=0'
|
|
|
:loading='loading1'
|
|
|
ref='editLen'
|
|
|
+ :editTable='editTable'
|
|
|
@saveNum='saveNum'
|
|
|
@cance='cance'
|
|
|
- :editTable='editTable'
|
|
|
+ :remarksText='remarksText'
|
|
|
></lengend-edit>
|
|
|
</div>
|
|
|
</el-collapse-transition>
|
|
@@ -53,7 +54,7 @@
|
|
|
</span>
|
|
|
</el-tooltip>
|
|
|
</div>
|
|
|
- <legend-remarks ref='EditdMarks'></legend-remarks>
|
|
|
+ <legend-remarks @queryMarks='queryMarks' ref='EditdMarks'></legend-remarks>
|
|
|
</div>
|
|
|
</div>
|
|
|
</template>
|
|
@@ -69,16 +70,10 @@ export default {
|
|
|
return {
|
|
|
remarksText: '', //查询出来的备注
|
|
|
text1:
|
|
|
- '<p>1.主要设备房包括:冷源机房,热源机房,开闭站,配变电所(室),发电机房,消防水泵房,消防高位水箱间,生活水泵房,慧云机房,垃圾房</p>',
|
|
|
- text2: '<p>2.图例后×的数字,代表此位置的数量</p>',
|
|
|
+ '<p>1.主要设备房包括:冷源机房,热源机房,开闭站,配变电所(室),发电机房,消防水泵房,消防高位水箱间,生活水泵房,慧云机房,垃圾房。</p>',
|
|
|
+ text2: '<p>2.图例后×的数字,代表此位置的数量。</p>',
|
|
|
show: false,
|
|
|
show2: false,
|
|
|
- dataSelect2: [
|
|
|
- { id: 'test1', name: '选择项' },
|
|
|
- { id: 'test2', name: '单平米' },
|
|
|
- { id: 'test3', name: '下级分项' },
|
|
|
- { id: 'test4', name: '滑动平均滑动平均' }
|
|
|
- ],
|
|
|
loading: true,
|
|
|
loading1: true,
|
|
|
viewTable: [],
|
|
@@ -94,6 +89,7 @@ export default {
|
|
|
components: { lengendView, legendRemarks, lengendEdit },
|
|
|
methods: {
|
|
|
testClick(data) {},
|
|
|
+ // 编辑备注
|
|
|
legendClik() {
|
|
|
this.$refs.EditdMarks.showModal(this.remarksText)
|
|
|
},
|
|
@@ -112,20 +108,15 @@ export default {
|
|
|
// 无备注->判断平面图->是否展示默认文案
|
|
|
if (res.data.Data[0].Note) {
|
|
|
let note = res.data.Data[0].Note
|
|
|
- if (1 == 1 && 2 == 2) {
|
|
|
- this.remarksText = `${this.text1}${this.text2}${note}`
|
|
|
- } else if (1 == 1) {
|
|
|
- this.remarksText = `${this.text1}${note}`
|
|
|
+ if (note.search(this.text1) != 1) {
|
|
|
+ this.remarksText = `${note}`
|
|
|
} else {
|
|
|
- this.remarksText = `${this.text2}${note}`
|
|
|
+ this.remarksText = `${this.text1}${note}`
|
|
|
}
|
|
|
- } else {
|
|
|
- if (1 == 1 && 2 == 2) {
|
|
|
- this.remarksText = `${this.text1}${this.text2}`
|
|
|
- } else if (1 == 1) {
|
|
|
- this.remarksText = `${this.text1}`
|
|
|
+ if (note.search(this.text2) != -1) {
|
|
|
+ this.remarksText = `${note}`
|
|
|
} else {
|
|
|
- this.remarksText = `${this.text2}`
|
|
|
+ this.remarksText = `${this.text2}${note}`
|
|
|
}
|
|
|
}
|
|
|
})
|
|
@@ -134,14 +125,13 @@ export default {
|
|
|
editChange(val) {
|
|
|
this.editText = val
|
|
|
},
|
|
|
- // 展示图例
|
|
|
+ // 点击展示图例框
|
|
|
showTl() {
|
|
|
this.show = !this.show
|
|
|
if (this.show) {
|
|
|
this.show2 = false
|
|
|
}
|
|
|
this.queryView(false)
|
|
|
- this.queryMarks()
|
|
|
},
|
|
|
cance() {
|
|
|
this.show2 = false
|
|
@@ -152,7 +142,6 @@ export default {
|
|
|
this.queryEditNum(true)
|
|
|
},
|
|
|
handleSwich(val) {
|
|
|
- console.log(val)
|
|
|
this.queryView(!val)
|
|
|
},
|
|
|
handleSwich2(val) {
|
|
@@ -181,16 +170,11 @@ export default {
|
|
|
projectId: '1',
|
|
|
flag: flag
|
|
|
}
|
|
|
- queryStatis({ data, postParams })
|
|
|
- .then(res => {
|
|
|
- console.log('编辑图例数', res)
|
|
|
- this.loading1 = false
|
|
|
- this.editTable = res.data.Data
|
|
|
- console.log(this.editTable)
|
|
|
- })
|
|
|
- .catch(err => {
|
|
|
- console.log(err)
|
|
|
- })
|
|
|
+ queryStatis({ data, postParams }).then(res => {
|
|
|
+ console.log('编辑图例数', res)
|
|
|
+ this.loading1 = false
|
|
|
+ this.editTable = res.data.Data ? res.data.Data : []
|
|
|
+ })
|
|
|
},
|
|
|
// 编辑数量
|
|
|
queryEdit(val) {
|
|
@@ -199,8 +183,6 @@ export default {
|
|
|
Content: val
|
|
|
}
|
|
|
}
|
|
|
- // console.log(postParams)
|
|
|
- // return
|
|
|
updateStatis(params).then(res => {
|
|
|
if (res.Result == 'success') {
|
|
|
console.log('更新图例', res)
|
|
@@ -218,12 +200,11 @@ export default {
|
|
|
})
|
|
|
},
|
|
|
saveNum(val) {
|
|
|
- // this.editSwitch = val
|
|
|
this.queryEdit(val)
|
|
|
}
|
|
|
},
|
|
|
mounted() {
|
|
|
- // this.queryMarks()
|
|
|
+ this.queryMarks()
|
|
|
}
|
|
|
}
|
|
|
</script>
|