|
@@ -124,18 +124,18 @@
|
|
|
import { updateStatis } from '@/api/public.js'
|
|
|
import { mapGetters } from 'vuex'
|
|
|
export default {
|
|
|
- props: ['editTable', 'loading', 'tableHeigth'],
|
|
|
+ props: ['editTable', 'loading', 'tableHeigth', 'floorInfo'],
|
|
|
data() {
|
|
|
return {
|
|
|
value: false,
|
|
|
tbData1: [],
|
|
|
tbData2: [],
|
|
|
tbData3: [],
|
|
|
- editNum: []
|
|
|
+ editNum: [],
|
|
|
}
|
|
|
},
|
|
|
computed: {
|
|
|
- ...mapGetters(['plazaId'])
|
|
|
+ ...mapGetters(['plazaId']),
|
|
|
},
|
|
|
methods: {
|
|
|
handleSelectionChange(val) {
|
|
@@ -147,7 +147,7 @@ export default {
|
|
|
this.$confirm('图例中的数据发生变化, 是否需要保存?', {
|
|
|
confirmButtonText: '保存',
|
|
|
cancelButtonText: '放弃修改',
|
|
|
- type: 'warning'
|
|
|
+ type: 'warning',
|
|
|
})
|
|
|
.then(() => {
|
|
|
this.$emit('saveNum', this.editNum)
|
|
@@ -155,7 +155,7 @@ export default {
|
|
|
.catch(() => {
|
|
|
this.$message({
|
|
|
type: 'info',
|
|
|
- message: '已放弃修改'
|
|
|
+ message: '已放弃修改',
|
|
|
})
|
|
|
this.editNum = []
|
|
|
this.$emit('saveNum', this.editNum)
|
|
@@ -173,44 +173,44 @@ export default {
|
|
|
queryEdit(val) {
|
|
|
let arr = []
|
|
|
if (val.length > 0) {
|
|
|
- val.forEach(e => {
|
|
|
+ val.forEach((e) => {
|
|
|
let obj = {
|
|
|
BuildingId: '1',
|
|
|
Num: e.Num == '' ? null : Number(e.Num),
|
|
|
GraphElementId: e.GraphElementId,
|
|
|
- FloorId: this.$cookie.get('floorMapId'),
|
|
|
+ FloorId: this.floorInfo.gname ? this.floorInfo.gname : this.$cookie.get('floorMapId'),
|
|
|
ProjectId: e.ProjectId,
|
|
|
- CategoryId: e.GraphCategoryId
|
|
|
+ CategoryId: e.GraphCategoryId,
|
|
|
}
|
|
|
arr.push(obj)
|
|
|
})
|
|
|
}
|
|
|
let params = {
|
|
|
postParams: {
|
|
|
- Content: arr
|
|
|
- }
|
|
|
+ Content: arr,
|
|
|
+ },
|
|
|
}
|
|
|
|
|
|
updateStatis(params)
|
|
|
- .then(res => {
|
|
|
+ .then((res) => {
|
|
|
if (res.Result == 'success') {
|
|
|
this.$message({
|
|
|
message: '操作成功',
|
|
|
- type: 'success'
|
|
|
+ type: 'success',
|
|
|
})
|
|
|
this.$emit('changeSwitch', true)
|
|
|
this.$store.commit('SETSHOWVIEW', 1)
|
|
|
} else {
|
|
|
this.$message({
|
|
|
message: '操作失败',
|
|
|
- type: 'error'
|
|
|
+ type: 'error',
|
|
|
})
|
|
|
}
|
|
|
})
|
|
|
- .catch(err => {
|
|
|
+ .catch((err) => {
|
|
|
this.$message({
|
|
|
message: err,
|
|
|
- type: 'error'
|
|
|
+ type: 'error',
|
|
|
})
|
|
|
})
|
|
|
},
|
|
@@ -230,7 +230,7 @@ export default {
|
|
|
// 修改隐藏为0的项目的开关
|
|
|
changeSwitch(val) {
|
|
|
this.$emit('handleSwich2', val)
|
|
|
- }
|
|
|
+ },
|
|
|
// init() {
|
|
|
// this.tbData1 = []
|
|
|
// this.tbData2 = []
|
|
@@ -256,7 +256,6 @@ export default {
|
|
|
// }
|
|
|
// },
|
|
|
},
|
|
|
- mounted() {},
|
|
|
watch: {
|
|
|
editTable: {
|
|
|
handler() {
|
|
@@ -264,7 +263,6 @@ export default {
|
|
|
let tabHeight = document.getElementById('lenged_tab').offsetHeight
|
|
|
let dom = document.getElementsByClassName('legend-tab2')[0]
|
|
|
let dom2 = document.getElementsByClassName('legend-table2')[0]
|
|
|
- console.log('tabHeight', tabHeight)
|
|
|
if (!dom) {
|
|
|
return
|
|
|
}
|
|
@@ -273,9 +271,9 @@ export default {
|
|
|
})
|
|
|
},
|
|
|
deep: true,
|
|
|
- immediate: true
|
|
|
- }
|
|
|
- }
|
|
|
+ immediate: true,
|
|
|
+ },
|
|
|
+ },
|
|
|
}
|
|
|
</script>
|
|
|
<style lang="less" scoped>
|