|
@@ -136,50 +136,50 @@ export default {
|
|
|
interval: 10 * 60 * 1000, //定时器时长,默认 10分钟
|
|
|
timer: null, //保存定时器
|
|
|
timer1: null,
|
|
|
- tableHeigth: 300 // 编辑图例框得高度
|
|
|
+ tableHeigth: 300, // 编辑图例框得高度
|
|
|
}
|
|
|
},
|
|
|
computed: {
|
|
|
- ...mapGetters(['planNum', 'typeNum', 'plazaId', 'fmapID', 'floorSelect', 'isMessage', 'ssoToken', 'showView', 'legendTable'])
|
|
|
+ ...mapGetters(['planNum', 'typeNum', 'plazaId', 'fmapID', 'floorSelect', 'isMessage', 'ssoToken', 'showView', 'legendTable']),
|
|
|
},
|
|
|
props: {
|
|
|
floors: {
|
|
|
//原理图中有数据楼层
|
|
|
default: () => {
|
|
|
- []
|
|
|
+ ;[]
|
|
|
},
|
|
|
- type: Array
|
|
|
+ type: Array,
|
|
|
},
|
|
|
type: {
|
|
|
// 原理图类型 == 0 ;
|
|
|
default: '1',
|
|
|
- type: String
|
|
|
+ type: String,
|
|
|
},
|
|
|
systemName: {
|
|
|
default: '',
|
|
|
- type: String
|
|
|
+ type: String,
|
|
|
},
|
|
|
categoryId: {
|
|
|
default: '',
|
|
|
- type: String
|
|
|
+ type: String,
|
|
|
},
|
|
|
editTips: {
|
|
|
// 编辑器文案
|
|
|
type: String,
|
|
|
- default: ''
|
|
|
+ default: '',
|
|
|
},
|
|
|
// 区分lengend 在外边 0 还是弹窗内部 1
|
|
|
innerLeng: {
|
|
|
type: Number,
|
|
|
- default: 0
|
|
|
+ default: 0,
|
|
|
},
|
|
|
// 弹窗组件内部传入的楼层信息
|
|
|
floorInfo: {
|
|
|
type: Object,
|
|
|
default() {
|
|
|
return {}
|
|
|
- }
|
|
|
- }
|
|
|
+ },
|
|
|
+ },
|
|
|
},
|
|
|
components: { lengendView, legendRemarks, lengendEdit },
|
|
|
watch: {
|
|
@@ -194,7 +194,7 @@ export default {
|
|
|
}, this.interval)
|
|
|
}
|
|
|
},
|
|
|
- deep: true
|
|
|
+ deep: true,
|
|
|
},
|
|
|
'$store.state.categoryId': {
|
|
|
handler(newV, oldV) {
|
|
@@ -206,7 +206,7 @@ export default {
|
|
|
}, this.interval)
|
|
|
}
|
|
|
},
|
|
|
- deep: true
|
|
|
+ deep: true,
|
|
|
},
|
|
|
// 弹窗组件内传入floorInfo,查询 getDraftNum
|
|
|
floorInfo: {
|
|
@@ -219,13 +219,13 @@ export default {
|
|
|
}, this.interval)
|
|
|
}
|
|
|
},
|
|
|
- deep: true
|
|
|
- }
|
|
|
+ deep: true,
|
|
|
+ },
|
|
|
},
|
|
|
'$refs.viewLengend': {
|
|
|
handler(newV, oldV) {
|
|
|
this.$refs.viewLengend.setSelected()
|
|
|
- }
|
|
|
+ },
|
|
|
},
|
|
|
methods: {
|
|
|
/**
|
|
@@ -247,7 +247,7 @@ export default {
|
|
|
Filters: `projectId='${this.plazaId}';isPub=false;BuildingId='1';categoryId='${categoryId}';floorId='${floorId}'`,
|
|
|
PageNumber: 1,
|
|
|
PageSize: 500,
|
|
|
- Projection: ['floorId']
|
|
|
+ Projection: ['floorId'],
|
|
|
}
|
|
|
try {
|
|
|
// 调用接口
|
|
@@ -264,8 +264,8 @@ export default {
|
|
|
},
|
|
|
formatFloor() {
|
|
|
this.floorSelectAble = []
|
|
|
- this.floorSelectAble = this.floorSelect.filter(item => {
|
|
|
- const hit = this.floors.find(i => i.gname == item.id)
|
|
|
+ this.floorSelectAble = this.floorSelect.filter((item) => {
|
|
|
+ const hit = this.floors.find((i) => i.gname == item.id)
|
|
|
return !hit
|
|
|
})
|
|
|
},
|
|
@@ -281,12 +281,12 @@ export default {
|
|
|
projectId: this.$store.state.plazaId,
|
|
|
BuildingID: '1',
|
|
|
Pub: true,
|
|
|
- FloorID: this.$cookie.get('floorNow')
|
|
|
+ FloorID: this.$cookie.get('floorNow'),
|
|
|
}
|
|
|
let data = {}
|
|
|
- queryRead({ data, postParams }).then(res => {
|
|
|
- if (res.data.Data && res.data.Data[0].Note) {
|
|
|
- let Res = res.data ? res.data.Data[0].Note : ''
|
|
|
+ queryRead({ data, postParams }).then((res) => {
|
|
|
+ if (res.data) {
|
|
|
+ let Res = res.data.Data && res.data.Data[0] ? res.data.Data[0].Note : ''
|
|
|
if (Res) {
|
|
|
this.$store.commit('SETREMARKSTEXT', Res)
|
|
|
} else {
|
|
@@ -353,20 +353,20 @@ export default {
|
|
|
//弹窗组件点击新增楼层,确认的楼层 楼层字段处理
|
|
|
if (this.floor) {
|
|
|
// 从store中筛选出选中的楼层信息
|
|
|
- let floorInfo = this.$store.state.floorsArr.filter(item => item.gname === this.floor)[0]
|
|
|
+ let floorInfo = this.$store.state.floorsArr.filter((item) => item.gname === this.floor)[0]
|
|
|
FloorID = this.floor
|
|
|
floorName = floorInfo.code
|
|
|
seq = floorInfo.seq
|
|
|
categoryId = this.categoryId
|
|
|
}
|
|
|
const { conf } = window.__systemConf
|
|
|
- const editerUrl = conf[process.env.NODE_ENV + '_editerUrl'];
|
|
|
- if(!this.plazaId){
|
|
|
+ const editerUrl = conf[process.env.NODE_ENV + '_editerUrl']
|
|
|
+ if (!this.plazaId) {
|
|
|
return
|
|
|
}
|
|
|
let data = `categoryId=${categoryId}&projectId=${this.plazaId}&BuildingID=1&FloorID=${FloorID}&FloorName=${floorName}&fmapID=${this.fmapID}&seq=${seq}&token=${this.ssoToken}`
|
|
|
let url = editerUrl + 'editer?' + encodeURIComponent(data)
|
|
|
- window.open(url, "edit")
|
|
|
+ window.open(url, 'edit')
|
|
|
},
|
|
|
handleSwich(val) {
|
|
|
this.queryView(!val)
|
|
@@ -387,18 +387,18 @@ export default {
|
|
|
projectId: this.$store.state.plazaId,
|
|
|
flag: flag,
|
|
|
buildingId: '1',
|
|
|
- floorId: this.$store.state.currentFloor.gname
|
|
|
+ floorId: this.$store.state.currentFloor.gname,
|
|
|
}
|
|
|
// 弹窗组件内传入floorInfo,使用其楼层id
|
|
|
this.floorInfo.gname && (data.floorId = this.floorInfo.gname)
|
|
|
- queryStatis({ data, postParams }).then(res => {
|
|
|
+ queryStatis({ data, postParams }).then((res) => {
|
|
|
this.$store.commit('SETPLANNUM', '')
|
|
|
this.loading = false
|
|
|
let viewTable = []
|
|
|
viewTable = res.data.Data ? res.data.Data : []
|
|
|
this.$store.commit('SETLEGENDTABLE', viewTable)
|
|
|
if (viewTable.length > 0) {
|
|
|
- viewTable.forEach(el => {
|
|
|
+ viewTable.forEach((el) => {
|
|
|
if (el.Name == '主要设备房') {
|
|
|
this.$store.commit('SETPLANNUM', el.Num)
|
|
|
}
|
|
@@ -439,11 +439,11 @@ export default {
|
|
|
projectId: this.$store.state.plazaId,
|
|
|
flag: flag,
|
|
|
buildingId: '1',
|
|
|
- floorId: this.$store.state.currentFloor.gname
|
|
|
+ floorId: this.$store.state.currentFloor.gname,
|
|
|
}
|
|
|
// 弹窗组件内传入floorInfo,使用其楼层id
|
|
|
this.floorInfo.gname && (data.floorId = this.floorInfo.gname)
|
|
|
- queryStatis({ data, postParams }).then(res => {
|
|
|
+ queryStatis({ data, postParams }).then((res) => {
|
|
|
this.loading1 = false
|
|
|
this.editTable = res.data.Data ? res.data.Data : []
|
|
|
})
|
|
@@ -452,48 +452,48 @@ export default {
|
|
|
queryEdit(val) {
|
|
|
let arr = []
|
|
|
if (val.length > 0) {
|
|
|
- val.forEach(e => {
|
|
|
+ val.forEach((e) => {
|
|
|
let obj = {
|
|
|
BuildingId: '1',
|
|
|
Num: Number(e.Num),
|
|
|
GraphElementId: e.GraphElementId,
|
|
|
FloorId: 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.$store.commit('SETSHOWVIEW', 1)
|
|
|
} else {
|
|
|
this.$message({
|
|
|
message: '操作失败',
|
|
|
- type: 'error'
|
|
|
+ type: 'error',
|
|
|
})
|
|
|
}
|
|
|
})
|
|
|
- .catch(err => {
|
|
|
+ .catch((err) => {
|
|
|
this.$message({
|
|
|
message: err,
|
|
|
- type: 'error'
|
|
|
+ type: 'error',
|
|
|
})
|
|
|
})
|
|
|
},
|
|
|
saveNum(val) {
|
|
|
if (val.length > 0) {
|
|
|
- val.forEach(element => {
|
|
|
+ val.forEach((element) => {
|
|
|
element.Modify = element.IsModify
|
|
|
})
|
|
|
this.queryEdit(val)
|
|
@@ -526,7 +526,7 @@ export default {
|
|
|
})
|
|
|
// 备注
|
|
|
bus.$off('queryRemarksMethods')
|
|
|
- bus.$on('queryRemarksMethods', res => {
|
|
|
+ bus.$on('queryRemarksMethods', (res) => {
|
|
|
if (res) {
|
|
|
this.$store.commit('SETREMARKSTEXT', res)
|
|
|
} else {
|
|
@@ -557,7 +557,7 @@ export default {
|
|
|
dom.style.maxHeight = '434px'
|
|
|
this.tableHeigth = '334px'
|
|
|
}
|
|
|
- }
|
|
|
+ },
|
|
|
},
|
|
|
mounted() {
|
|
|
this.init()
|
|
@@ -572,7 +572,7 @@ export default {
|
|
|
})
|
|
|
// 设置图例最大高度
|
|
|
this.setLengedHeight()
|
|
|
- }
|
|
|
+ },
|
|
|
}
|
|
|
</script>
|
|
|
<style lang="less" scoped>
|