Browse Source

Merge branch 'develop' of http://39.106.8.246:3003/web/wanda-bm-guide into develop

YaolongHan 4 years ago
parent
commit
b109f6337d

+ 7 - 9
src/components/Legend/src/legend.vue

@@ -66,13 +66,8 @@
             <!-- 编辑分布图 -->
 
             <!-- 有修改权限 -->
-            <el-tooltip
-                class='bjpmt'
-                effect='dark'
-                :content='editTips?editTips:`编辑${categoryId=="FZQZL"?"分水器支路分布图":"消防泵房引出管路分布图"}`'
-                placement='left'
-            >
-                <span v-show="permissions ? permissions.includes('GLSMS_PLANARGRAPH_MANAGE'):false" class='edit-icon corner-con' @click='goToEditer'>
+            <el-tooltip class='bjpmt' effect='dark' :content='editTips?editTips:`编辑${categoryId=="FZQZL"?"分水器支路分布图":"消防泵房引出管路分布图"}`' placement='left'>
+                <span v-show='permissions ? permissions.includes("GLSMS_PLANARGRAPH_MANAGE"):false' class='edit-icon corner-con' @click='goToEditer'>
                     <img src='@/assets/imgs/bjs.png' alt />
                     <!-- 角标 -->
                     <!-- <span v-if='draftNum' class='corner' :style='{lineHeight : draftNum > 99 ?"10px":"18px"}'>{{draftNum > 99 ? '...' : draftNum}}</span> -->
@@ -130,13 +125,13 @@ export default {
         }
     },
     computed: {
-        ...mapGetters(['planNum', 'typeNum', 'plazaId', 'fmapID', 'floorSelect', 'isMessage', 'ssoToken', 'showView', 'legendTable','permissions']),
+        ...mapGetters(['planNum', 'typeNum', 'plazaId', 'fmapID', 'floorSelect', 'isMessage', 'ssoToken', 'showView', 'legendTable', 'permissions']),
     },
     props: {
         floors: {
             //原理图中有数据楼层
             default: () => {
-                []
+                ;[]
             },
             type: Array,
         },
@@ -275,6 +270,7 @@ export default {
             }
             let data = {}
             queryRead({ data, postParams }).then((res) => {
+                this.$store.commit('SETREMARKSTEXT', '')
                 if (res.data) {
                     let Res = res.data.Data && res.data.Data[0] ? res.data.Data[0].Note : ''
                     if (Res) {
@@ -382,6 +378,7 @@ export default {
             // 弹窗组件内传入floorInfo,使用其楼层id
             this.floorInfo.gname && (data.floorId = this.floorInfo.gname)
             queryStatis({ data, postParams }).then((res) => {
+                this.$store.commit('SETREMARKSTEXT', '')
                 this.$store.commit('SETPLANNUM', '')
                 this.loading = false
                 let viewTable = []
@@ -517,6 +514,7 @@ export default {
             // 备注
             bus.$off('queryRemarksMethods')
             bus.$on('queryRemarksMethods', (res) => {
+                this.$store.commit('SETREMARKSTEXT', '')
                 if (res) {
                     this.$store.commit('SETREMARKSTEXT', res)
                 } else {

+ 42 - 41
src/components/floorMap/index.vue

@@ -42,29 +42,29 @@ export default {
             floorid: '', //楼层id
             topologyParser: null, // 解析器数据
             fParser: null, // 底图解析器
-            wellMap: {} // 电井控制商铺映射
+            wellMap: {}, // 电井控制商铺映射
         }
     },
     props: {
         id: {
             default: '1',
-            type: String
+            type: String,
         },
         categoryId: {
             default: '',
-            type: String
+            type: String,
         },
         // 弹窗高度,适配底图高度使用
         modalHeight: {
             type: [Number, undefined],
-            default: undefined
+            default: undefined,
         },
         loadName: null,
-        type: null
+        type: null,
     },
     components: { RoomBox, canvasFun },
     computed: {
-        ...mapGetters(['plazaId', 'fmapID', 'haveFengMap', 'bunkObj'])
+        ...mapGetters(['plazaId', 'fmapID', 'haveFengMap', 'bunkObj']),
     },
     methods: {
         ...mapActions(['getfmapID']),
@@ -105,14 +105,14 @@ export default {
                 }
             } else {
                 if (window.fengmapData.gnameToGid[floor]) {
-                    window.fengmapData.parseData(window.fengmapData.gnameToGid[floor], res => {
+                    window.fengmapData.parseData(window.fengmapData.gnameToGid[floor], (res) => {
                         if (res.err) {
                             console.log('errr', res.err)
                             return
                         }
                         this.fParser = new SFloorParser(null)
                         this.fParser.parseData(res)
-                        this.fParser.spaceList.forEach(t => {
+                        this.fParser.spaceList.forEach((t) => {
                             this.scene.addItem(t)
                             t.nameSize = 12
                             t.nameColor = '#2a2a2a'
@@ -123,11 +123,11 @@ export default {
                                 t.name = ''
                             }
                         })
-                        this.fParser.wallList.forEach(t => this.scene.addItem(t))
-                        this.fParser.virtualWallList.forEach(t => this.scene.addItem(t))
-                        this.fParser.doorList.forEach(t => this.scene.addItem(t))
-                        this.fParser.columnList.forEach(t => this.scene.addItem(t))
-                        this.fParser.casementList.forEach(t => this.scene.addItem(t))
+                        this.fParser.wallList.forEach((t) => this.scene.addItem(t))
+                        this.fParser.virtualWallList.forEach((t) => this.scene.addItem(t))
+                        this.fParser.doorList.forEach((t) => this.scene.addItem(t))
+                        this.fParser.columnList.forEach((t) => this.scene.addItem(t))
+                        this.fParser.casementList.forEach((t) => this.scene.addItem(t))
                         this.view.scene = this.scene
                         // this.view.fitSceneToView()
                         this.readGraph()
@@ -139,7 +139,7 @@ export default {
         },
         readGraph() {
             this.readGroup(this.floorid)
-                .then(data => {
+                .then((data) => {
                     if (data.Result == 'failure') {
                         this.$store.commit('SETISMESSAGE', false)
                         this.view.fitSceneToView()
@@ -183,7 +183,7 @@ export default {
                         scpzTable = data.Data[0].Elements.Nodes || []
                         console.log(scpzTable)
                         if (scpzTable.length > 0) {
-                            scpzTable.forEach(e => {
+                            scpzTable.forEach((e) => {
                                 if (e.Properties.ItemExplain) {
                                     let obj = e
                                     arr.push(obj)
@@ -196,8 +196,9 @@ export default {
                     if (data.Data[0].Elements.Nodes.length > 0) {
                         this.$store.commit('SETTYPENUM', '')
                         let Lengd = data.Data[0].Elements.Nodes
-                        Lengd.forEach(el => {
+                        Lengd.forEach((el) => {
                             if (el.Type == 'Image' && el.Num > 1) {
+                                console.log(el.Num)
                                 this.$store.commit('SETTYPENUM', el.Num)
                             }
                         })
@@ -212,28 +213,28 @@ export default {
                     this.topologyParser = new STopologyParser(null)
                     this.topologyParser.parseData(data.Data[0].Elements)
                     // 多边形
-                    this.topologyParser.zoneLegendList.forEach(t => {
+                    this.topologyParser.zoneLegendList.forEach((t) => {
                         this.scene.addItem(t)
                     })
                     // 增加文字
-                    this.topologyParser.textMarkerList.forEach(t => {
+                    this.topologyParser.textMarkerList.forEach((t) => {
                         this.scene.addItem(t)
                     })
                     // 增加图片
-                    this.topologyParser.imageMarkerList.forEach(t => {
+                    this.topologyParser.imageMarkerList.forEach((t) => {
                         this.scene.addItem(t)
                     })
                     // 增加直线
-                    this.topologyParser.lineMarkerList.forEach(t => {
+                    this.topologyParser.lineMarkerList.forEach((t) => {
                         this.scene.addItem(t)
                     })
                     // 增加图标类图例
-                    this.topologyParser.imageLegendList.forEach(t => {
+                    this.topologyParser.imageLegendList.forEach((t) => {
                         this.scene.addItem(t)
                     })
                     // 增加管线类
                     // 增加图标类图例
-                    this.topologyParser.relationList.forEach(t => {
+                    this.topologyParser.relationList.forEach((t) => {
                         t.selectable = true
                         this.scene.addItem(t)
                     })
@@ -280,7 +281,7 @@ export default {
         // 选中电井关联的商铺高亮
         setHightLight(arr) {
             this.clearHightLight()
-            arr.forEach(item => {
+            arr.forEach((item) => {
                 let location = item.data.AttachObjectIds[0] ? item.data.AttachObjectIds[0].id : ''
                 // 添加了位置类型并且选中的类型为电井类型
                 if (
@@ -291,7 +292,7 @@ export default {
                     location
                 ) {
                     if (this.wellMap.hasOwnProperty(location)) {
-                        this.wellMap[location].forEach(item => {
+                        this.wellMap[location].forEach((item) => {
                             item.highLightFlag = true
                             item.zOrder = 30
                         })
@@ -299,23 +300,23 @@ export default {
                         let getParams = {
                             plazaId: this.plazaId,
                             floor: this.floorid,
-                            keyword: `${location}:wellnum;`
+                            keyword: `${location}:wellnum;`,
                         }
-                        queryShops({ getParams }).then(res => {
+                        queryShops({ getParams }).then((res) => {
                             let shopsnumList = []
                             let shopsnumItemList = []
                             if (res.data && res.data.length) {
                                 for (let floor in res.data[0]) {
                                     if (res.data[0][floor].length) {
-                                        res.data[0][floor].forEach(v => {
+                                        res.data[0][floor].forEach((v) => {
                                             shopsnumList = shopsnumList.concat(v.shopsnumList.split(','))
                                         })
                                     }
                                 }
                             }
                             if (shopsnumList.length) {
-                                this.fParser.spaceList.forEach(item => {
-                                    if (shopsnumList.findIndex(name => name == item.data.Name) != -1) {
+                                this.fParser.spaceList.forEach((item) => {
+                                    if (shopsnumList.findIndex((name) => name == item.data.Name) != -1) {
                                         item.highLightFlag = true
                                         item.zOrder = 30
                                         shopsnumItemList.push(item)
@@ -332,7 +333,7 @@ export default {
         clearHightLight() {
             ItemColor.spaceHighColor = new SColor('#FBF2CC')
             for (let key in this.wellMap) {
-                this.wellMap[key].forEach(item => {
+                this.wellMap[key].forEach((item) => {
                     item.highLightFlag = false
                     item.zOrder = ItemOrder.spaceOrder
                 })
@@ -369,7 +370,7 @@ export default {
             // this.topologyParser.zoneLegendList.forEach(t => {
             //     t.showText = val
             // })
-            this.fParser.spaceList.forEach(t => {
+            this.fParser.spaceList.forEach((t) => {
                 t.showBaseName = val
             })
         },
@@ -380,7 +381,7 @@ export default {
                 FloorID: FloorID,
                 categoryId: this.categoryId ? this.categoryId : this.$cookie.get('categoryId'),
                 projectId: this.urlMsg.ProjectID,
-                Pub: true
+                Pub: true,
             }
             return readGroup(data)
         },
@@ -398,9 +399,9 @@ export default {
             }
         },
         getEvent() {
-            bus.$on('changeShow', res => {
+            bus.$on('changeShow', (res) => {
                 this.topologyParser &&
-                    this.topologyParser.zoneLegendList.forEach(t => {
+                    this.topologyParser.zoneLegendList.forEach((t) => {
                         let id = t.data.GraphElementId
                         t.maskFlag = !(res.indexOf(id) > -1)
                     })
@@ -417,17 +418,17 @@ export default {
                 //     t.maskFlag = !(res.indexOf(id) > -1)
                 // })
                 this.topologyParser &&
-                    this.topologyParser.imageLegendList.forEach(t => {
+                    this.topologyParser.imageLegendList.forEach((t) => {
                         let id = t.data.GraphElementId
                         t.maskFlag = !(res.indexOf(id) > -1)
                     })
                 this.topologyParser &&
-                    this.topologyParser.relationList.forEach(t => {
+                    this.topologyParser.relationList.forEach((t) => {
                         let id = t.data.GraphElementId || t.data.GraphElementID
                         t.maskFlag = !(res.indexOf(id) > -1)
                     })
             })
-        }
+        },
     },
     watch: {
         'view.scale': {
@@ -436,11 +437,11 @@ export default {
                     let s = (n * 10) / this.view.minScale
                     this.$refs.canvasFun.sliderVal = s > 1000 ? 1000 : s
                 }
-            }
+            },
         },
         haveFengMap() {
             this.init(this.floorid)
-        }
+        },
     },
     mounted() {
         this.mapSize()
@@ -452,9 +453,9 @@ export default {
             ProjectID: this.plazaId,
             BuildingID: '1',
             FloorID: this.$cookie.get('floorMapId') || 'f1',
-            fmapID: this.fmapID
+            fmapID: this.fmapID,
         }
-    }
+    },
 }
 </script>
 <style lang="less" scoped>

+ 13 - 13
src/components/legendremarks.vue

@@ -40,17 +40,17 @@ export default {
             text2: '图例后×的数字,代表此位置的数量',
             editorOption: {
                 modules: {
-                    toolbar: [['bold', 'underline'], [{ color: [] }], [{ list: 'ordered' }]]
+                    toolbar: [['bold', 'underline'], [{ color: [] }], [{ list: 'ordered' }]],
                 },
                 theme: 'snow',
-                placeholder: '请输入内容...'
+                placeholder: '请输入内容...',
             },
             title: '编辑图例备注',
-            visible: false
+            visible: false,
         }
     },
     computed: {
-        ...mapGetters(['remarksText', 'typeNum', 'planNum'])
+        ...mapGetters(['remarksText', 'typeNum', 'planNum']),
     },
     methods: {
         // 点击取消
@@ -59,7 +59,7 @@ export default {
                 this.$confirm('是否保存编辑后的备注?', '提示', {
                     confirmButtonText: '保存',
                     cancelButtonText: '取消',
-                    type: 'warning'
+                    type: 'warning',
                 })
                     .then(() => {
                         this.handleOk()
@@ -67,7 +67,7 @@ export default {
                     .catch(() => {
                         this.$message({
                             type: 'info',
-                            message: '已取消保存'
+                            message: '已取消保存',
                         })
                         this.visible = false
                     })
@@ -107,7 +107,7 @@ export default {
                 if (this.remarksText.search(`${this.text2}`) != -1) {
                     this.remarksTexts = this.remarksText
                 } else {
-                    if (this.planNum) {
+                    if (this.typeNum) {
                         this.remarksTexts = `${this.remarksText}<ol style="padding-left: 1.5em;"><li>${this.text2}</li></ol>`
                     } else {
                         this.remarksTexts = this.remarksText
@@ -131,14 +131,14 @@ export default {
                 postParams: {
                     graphId: this.$cookie.get('graphId'),
                     projectId: this.$store.state.plazaId,
-                    Note: val
-                }
+                    Note: val,
+                },
             }
-            updateRead(params).then(res => {
+            updateRead(params).then((res) => {
                 this.$message({
                     showClose: true,
                     message: '更新成功',
-                    type: 'success'
+                    type: 'success',
                 })
                 this.$emit('queryMarks')
                 this.visible = false
@@ -161,9 +161,9 @@ export default {
             if (val.html) {
                 this.remarksTexts = val.html
             }
-        }
+        },
     },
-    mounted() {}
+    mounted() {},
 }
 </script>