guoxiaohuan před 4 roky
rodič
revize
8d80d229fe

+ 2 - 1
public/systemConf.js

@@ -25,7 +25,8 @@ var __systemConf = {
     conf: {
         // 编辑器地址
         // TODO: 修改为对应的地址
-        editerUrl: 'http://192.168.200.1:9910/wandaEditer/',
+        // editerUrl: 'http://192.168.200.1:9910/wandaEditer/',
+        editerUrl: 'http://192.168.200.89:8081/wandaEditer/',
         wandaBmGuideUrl: 'http://localhost:8080/wandaBmGuide',
     },
 }

+ 84 - 53
src/components/Legend/src/legend.vue

@@ -37,28 +37,30 @@
                 </div>
             </el-collapse-transition>
         </div>
-        <div class='edit_map' v-if='systemName != "土建系统"'>
-            <div class='hover-div'>
-                <!-- 备注编辑器 -->
-                <span @click='legendClik'>
-                    <img src='@/assets/imgs/bjbg.png' alt />
-                </span>
-                <!-- 编辑图例 -->
-                <el-tooltip class='item' effect='dark' content='编辑图例' placement='left'>
-                    <span @click='editTl'>
-                        <img src='@/assets/imgs/bjtl.png' alt />
+        <div class='edit_map' v-if='systemName != "土建系统"' style='border:1px solid red'>
+            <div class='divHover'>
+                <div class='hover-div' style='border:1px solid green'>
+                    <!-- 备注编辑器 -->
+                    <el-tooltip class='item' effect='dark' content='编辑备注' placement='left'>
+                        <span class='bj' @click='legendClik'>备注</span>
+                    </el-tooltip>
+                    <!-- 编辑图例 -->
+                    <el-tooltip class='item' effect='dark' content='编辑图例' placement='left'>
+                        <p @click='editTl'>
+                            <img src='@/assets/imgs/bjtl.png' alt />
+                        </p>
+                    </el-tooltip>
+                </div>
+                <!-- 编辑平面图 -->
+                <el-tooltip v-if='editPmt' @click='goToEditer' class='bjpmt' effect='dark' content='编辑平面图' placement='left'>
+                    <span class='edit-icon'>
+                        <i class='el-icon-edit'></i>
                     </span>
                 </el-tooltip>
-            </div>
-            <!-- 编辑平面图 -->
-            <el-tooltip @click='goToEditer' v-if='editPmt' class='item' effect='dark' content='编辑平面图' placement='left'>
-                <span class='edit-icon'>
+                <span v-else @click='goToEditer' class='edit-icon2'>
                     <a-icon type='edit' style='color:#fff' />
                 </span>
-            </el-tooltip>
-            <span v-else @click='goToEditer' class='edit-icon2'>
-                <a-icon type='edit' style='color:#fff' />
-            </span>
+            </div>
             <legend-remarks @queryMarks='queryMarks' ref='EditdMarks'></legend-remarks>
         </div>
     </div>
@@ -90,7 +92,8 @@ export default {
             multipleSelection: [],
             editText: '',
             editSwitch: false,
-            editPmt: false
+            editPmt: false,
+            graphId: ''
         }
     },
     computed: {
@@ -109,7 +112,7 @@ export default {
             let params = {
                 postParams: {
                     categoryId: 'NTXT',
-                    projectId: '1'
+                    projectId: this.$store.state.plazaId
                 }
             }
             queryRead(params).then(res => {
@@ -161,6 +164,7 @@ export default {
          * @description t跳转editer编辑器
          */
         goToEditer() {
+            console.log(1111)
             let FloorID = this.$cookie.get('floorMapId') || 'f1'
             let categoryId = this.$cookie.get('categoryId') || 'LCGN'
             console.log(this.fmapID)
@@ -184,9 +188,11 @@ export default {
         // 查询图例
         queryView(flag) {
             let postParams = {}
+            // this.graphId = this.$cookie.get('graphId')
             let data = {
-                graphId: '1',
-                projectId: '1',
+                graphId: '5956ef5cf6e34bd0980a18797d221026',
+                // graphId: this.graphId,
+                projectId: this.$store.state.plazaId,
                 flag: flag
             }
             queryStatis({ data, postParams }).then(res => {
@@ -201,6 +207,7 @@ export default {
             })
             this.queryMarks()
         },
+        //   this.$cookie.get('graphId')
         // 查询编辑状态图例
         queryEditNum(flag) {
             let postParams = {}
@@ -310,39 +317,63 @@ export default {
     .edit-icon {
         cursor: pointer;
     }
-    .hover-div {
-        position: absolute;
-        bottom: 58px;
-        .icon1 {
-            width: 40px;
-            height: 40px;
-            background: rgba(255, 255, 255, 1);
-            box-shadow: 0px 2px 4px 0px rgba(31, 36, 41, 0.06);
-            border: 1px solid rgba(31, 36, 41, 0.2);
-            font-size: 16px;
-            display: inline-block;
-            color: #646c73;
-            border-radius: 50%;
-            text-align: center;
-            line-height: 40px;
-            cursor: pointer;
-        }
-        .icon2 {
-            width: 40px;
-            height: 40px;
-            background: rgba(255, 255, 255, 1);
-            box-shadow: 0px 2px 4px 0px rgba(31, 36, 41, 0.06);
-            border: 1px solid rgba(31, 36, 41, 0.2);
-            font-size: 16px;
-            display: inline-block;
-            color: #646c73;
-            border-radius: 50%;
-            text-align: center;
-            line-height: 40px;
-            margin-top: 15px;
-            cursor: pointer;
+    .divHover {
+        .hover-div {
+            position: absolute;
+            bottom: 58px;
+            display: none;
+            .bj {
+                width: 40px;
+                height: 40px;
+                display: inline-block;
+                text-align: center;
+                background: rgba(255, 255, 255, 1);
+                box-shadow: 0px 2px 15px 0px rgba(31, 36, 41, 0.08);
+                border-radius: 90px;
+                line-height: 40px;
+                font-size: 12px;
+                margin: 0 auto;
+                cursor: pointer;
+                border: 1px solid #ccc;
+                margin-left: 4px;
+                margin-bottom: 8px;
+            }
+            // .icon1 {
+            //     width: 40px;
+            //     height: 40px;
+            //     background: rgba(255, 255, 255, 1);
+            //     box-shadow: 0px 2px 4px 0px rgba(31, 36, 41, 0.06);
+            //     border: 1px solid rgba(31, 36, 41, 0.2);
+            //     font-size: 16px;
+            //     display: inline-block;
+            //     color: #646c73;
+            //     border-radius: 50%;
+            //     text-align: center;
+            //     line-height: 40px;
+            //     cursor: pointer;
+            // }
+            // .icon2 {
+            //     width: 40px;
+            //     height: 40px;
+            //     background: rgba(255, 255, 255, 1);
+            //     box-shadow: 0px 2px 4px 0px rgba(31, 36, 41, 0.06);
+            //     border: 1px solid rgba(31, 36, 41, 0.2);
+            //     font-size: 16px;
+            //     display: inline-block;
+            //     color: #646c73;
+            //     border-radius: 50%;
+            //     text-align: center;
+            //     line-height: 40px;
+            //     margin-top: 15px;
+            //     cursor: pointer;
+            // }
         }
     }
+    .bjpmt {
+    }
+}
+.edit_map:hover .hover-div {
+    display: block;
 }
 </style>
 <style lang="less">

+ 5 - 7
src/components/floorMap/index.vue

@@ -75,38 +75,35 @@ export default {
                     console.log('获取rf成功', res)
                 })
                 this.readGroup().then(data => {
+                    if ((data.data.Data, length > 0)) {
+                        this.$cookie.set('graphId', data.data.Data[0].ID, 3)
+                    }
                     const parserData = new STopologyParser(null)
                     parserData.parseData(data.data.Data[0].Elements)
                     // 多边形
                     parserData.zoneLegendList.forEach(t => {
                         this.scene.addItem(t)
-                        this.scene.Nodes.push(t)
                     })
                     // 增加文字
                     parserData.textMarkerList.forEach(t => {
                         this.scene.addItem(t)
-                        this.scene.Markers.push(t)
                     })
                     // 增加图片
                     parserData.imageMarkerList.forEach(t => {
                         this.scene.addItem(t)
-                        this.scene.Markers.push(t)
                     })
                     // 增加直线
                     parserData.lineMarkerList.forEach(t => {
                         this.scene.addItem(t)
-                        this.scene.Markers.push(t)
                     })
                     // 增加图标类图例
                     parserData.imageLegendList.forEach(t => {
                         this.scene.addItem(t)
-                        this.scene.Nodes.push(t)
                     })
                     // 增加管线类
                     // 增加图标类图例
                     parserData.relationList.forEach(t => {
                         this.scene.addItem(t)
-                        this.scene.Relations.push(t)
                     })
                     this.view.fitSceneToView()
                 })
@@ -194,7 +191,8 @@ export default {
         // 读取数据
         readGroup() {
             const data = {
-                categoryId: this.urlMsg.categoryId,
+                // categoryId: this.urlMsg.categoryId,
+                categoryId: 'XFXT',
                 projectId: this.urlMsg.ProjectID
             }
             return readGroup(data)

+ 63 - 64
src/lib/parsers/STopologyParser.ts

@@ -1,43 +1,43 @@
-import { ElementData } from "../types/ElementData";
-import { Legend } from "../types/Legend";
-import { Marker } from "../types/Marker";
-import { Relation } from "../types/Relation";
-import { SGraphElementType } from "../enums/SGraphElementType";
-import { SMarkerType } from "../enums/SMarkerType";
-import { SParser, SRelation } from '@saga-web/big/lib';
-import { SNoneLegendItem } from '../items/SNoneLegendItem';
-import { SLineLegendItem } from '../items/SLineLegendItem';
-import { SZoneLegendItem } from '../items/SZoneLegendItem';
-import { SImageLegendItem } from '../items/SImageLegendItem';
-import { SImageMarkerItem } from '../items/SImageMarkerItem';
-import { SLineMarkerItem } from '../items/SLineMarkerItem';
-import { STextMarkerItem } from '../items/STextMarkerItem';
-import { TipelineItem } from '../items/TipelineItem';
-import { ItemOrder } from "@saga-web/big";
-import { SItemStatus } from "@saga-web/big";
+import { ElementData } from '../types/ElementData'
+import { Legend } from '../types/Legend'
+import { Marker } from '../types/Marker'
+import { Relation } from '../types/Relation'
+import { SGraphElementType } from '../enums/SGraphElementType'
+import { SMarkerType } from '../enums/SMarkerType'
+import { SParser, SRelation } from '@saga-web/big/lib'
+import { SNoneLegendItem } from '../items/SNoneLegendItem'
+import { SLineLegendItem } from '../items/SLineLegendItem'
+import { SZoneLegendItem } from '../items/SZoneLegendItem'
+import { SImageLegendItem } from '../items/SImageLegendItem'
+import { SImageMarkerItem } from '../items/SImageMarkerItem'
+import { SLineMarkerItem } from '../items/SLineMarkerItem'
+import { STextMarkerItem } from '../items/STextMarkerItem'
+import { TipelineItem } from '../items/TipelineItem'
+import { ItemOrder } from '@saga-web/big'
+import { SItemStatus } from '@saga-web/big'
 /**
  * 拓扑图信息解析器
  *
  */
 export class STopologyParser extends SParser {
     /** 图例list(非图例类型)   */
-    noneLegendList: SNoneLegendItem[] = [];
+    noneLegendList: SNoneLegendItem[] = []
     /** 图例list(线类型)   */
-    lineLegendList: SLineLegendItem[] = [];
+    lineLegendList: SLineLegendItem[] = []
     /** 图例list(区域类型)   */
-    zoneLegendList: SZoneLegendItem[] = [];
+    zoneLegendList: SZoneLegendItem[] = []
     /** 图例list(图标类型)   */
-    imageLegendList: SImageLegendItem[] = [];
+    imageLegendList: SImageLegendItem[] = []
 
     /** 标识list(图类型)   */
-    imageMarkerList: SImageMarkerItem[] = [];
+    imageMarkerList: SImageMarkerItem[] = []
     /** 标识list(线类型)   */
-    lineMarkerList: SLineMarkerItem[] = [];
+    lineMarkerList: SLineMarkerItem[] = []
     /** 标识list(文本类型)   */
-    textMarkerList: STextMarkerItem[] = [];
+    textMarkerList: STextMarkerItem[] = []
 
     /** 管线关系对象关系list   */
-    relationList: SRelation[] = [];
+    relationList: SRelation[] = []
 
     /**
      * 解析数据
@@ -47,18 +47,18 @@ export class STopologyParser extends SParser {
     parseData(data: ElementData): void {
         if (data.Nodes) {
             data.Nodes.forEach((t: Legend): void => {
-                this.addLegend(t);
-            });
+                this.addLegend(t)
+            })
         }
         if (data.Markers) {
             data.Markers.forEach((t: Marker): void => {
-                this.addMarker(t);
-            });
+                this.addMarker(t)
+            })
         }
         if (data.Relations) {
             data.Relations.forEach((t: Relation): void => {
-                this.addRelation(t);
-            });
+                this.addRelation(t)
+            })
         }
     } // Function parseData()
 
@@ -69,24 +69,23 @@ export class STopologyParser extends SParser {
      * */
     private addLegend(t: Legend): void {
         if (t.GraphElementType == 'None') {
-            let item = new SNoneLegendItem(null, t);
-            this.noneLegendList.push(item);
+            let item = new SNoneLegendItem(null, t)
+            this.noneLegendList.push(item)
         } else if (t.GraphElementType == 'Line') {
-            let item = new TipelineItem(null, t);
-            item.selectable = true;
-            item.status = 0;
-            item.zOrder == ItemOrder.polylineOrder;
-            alert(123)
-            this.relationList.push(item);
-        } else if (t.GraphElementType == "Zone") {
-            let item = new SZoneLegendItem(null, t);
-            item.selectable = true;
-            item.zOrder == ItemOrder.polygonOrder;
-            this.zoneLegendList.push(item);
+            let item = new TipelineItem(null, t)
+            item.selectable = true
+            item.status = 0
+            item.zOrder == ItemOrder.polylineOrder
+            this.relationList.push(item)
+        } else if (t.GraphElementType == 'Zone') {
+            let item = new SZoneLegendItem(null, t)
+            item.selectable = true
+            item.zOrder == ItemOrder.polygonOrder
+            this.zoneLegendList.push(item)
         } else if (t.GraphElementType == 'Image') {
-            let item = new SImageLegendItem(null, t);
-            item.selectable = true;
-            this.imageLegendList.push(item);
+            let item = new SImageLegendItem(null, t)
+            item.selectable = true
+            this.imageLegendList.push(item)
         }
     } // Function addNode()
 
@@ -96,21 +95,21 @@ export class STopologyParser extends SParser {
      * @param   t       标识对象数据
      * */
     private addMarker(t: Marker): void {
-        if (t.Type == "Image") {
-            let item = new SImageMarkerItem(null, t);
-            this.imageMarkerList.push(item);
-            item.selectable = true;
-            item.zOrder = ItemOrder.imageOrder;
-        } else if (t.Type == "Line") {
-            let item = new SLineMarkerItem(null, t);
-            item.selectable = true;
-            item.zOrder = ItemOrder.lineOrder;
-            this.lineMarkerList.push(item);
-        } else if (t.Type == "Text") {
-            let item = new STextMarkerItem(null, t);
-            item.selectable = true;
-            item.zOrder = ItemOrder.lineOrder;
-            this.textMarkerList.push(item);
+        if (t.Type == 'Image') {
+            let item = new SImageMarkerItem(null, t)
+            this.imageMarkerList.push(item)
+            item.selectable = true
+            item.zOrder = ItemOrder.imageOrder
+        } else if (t.Type == 'Line') {
+            let item = new SLineMarkerItem(null, t)
+            item.selectable = true
+            item.zOrder = ItemOrder.lineOrder
+            this.lineMarkerList.push(item)
+        } else if (t.Type == 'Text') {
+            let item = new STextMarkerItem(null, t)
+            item.selectable = true
+            item.zOrder = ItemOrder.lineOrder
+            this.textMarkerList.push(item)
         }
     } // Function addMarker()
 
@@ -120,7 +119,7 @@ export class STopologyParser extends SParser {
      * @param   t       管线关系对象数据
      * */
     private addRelation(t: Relation): void {
-        let item = new TipelineItem(null, t);
-        this.relationList.push(item);
+        let item = new TipelineItem(null, t)
+        this.relationList.push(item)
     } // Function addRelation()
 } // class STopologyParser

+ 1 - 1
src/views/equipment/index.vue

@@ -125,7 +125,7 @@ export default {
     },
     mounted() {
         this.everySystem = this.system[0].children
-        // this.$refs.floorMap.init(this.floorInfo.gname)
+        this.$refs.floorMap.init(this.floorInfo.gname)
     }
 }
 </script>

+ 0 - 1
src/views/floorFunc/index.vue

@@ -45,7 +45,6 @@ export default {
     },
     mounted() {
         this.$refs.floorMap.init(this.floorInfo.gname)
-        this.Index()
     }
 }
 </script>

+ 28 - 14
src/views/other/zhsxDialog.vue

@@ -8,11 +8,11 @@
                 <p>3.相关政府强制性检测的按时完成情况及检测中提出的问题</p>
                 <p>4.广场安全质量第三方检测过程中列出的整改事项</p>
                 <div class='bottom-table'>
-                    <el-table :data='tableData' style='width: 100%'>
-                        <el-table-column label='序号' type='index' width='50'></el-table-column>
-                        <el-table-column prop='name' label='检测事项' width='140'></el-table-column>
-                        <el-table-column prop='type' label='主管部门' width='90'></el-table-column>
-                        <el-table-column prop='thing' label='记录事项' :show-overflow-tooltip='true'></el-table-column>
+                    <el-table :data='tableData' height='500' style='width:100%;' :span-method='objectSpanMethod' border v-if='tableData.length>0'>
+                        <el-table-column label='序号' type='index'></el-table-column>
+                        <el-table-column prop='jcsx' label='检测事项' :show-overflow-tooltip='true'></el-table-column>
+                        <el-table-column prop='zgbm' label='主管部门' :show-overflow-tooltip='true'></el-table-column>
+                        <el-table-column prop='jlsx' label='记录事项' :show-overflow-tooltip='true'></el-table-column>
                     </el-table>
                 </div>
             </div>
@@ -21,22 +21,36 @@
 </template>
 <script>
 export default {
+    props: ['tableData'],
     data() {
         return {
-            visible: false,
-            tableData: [
-                { name: '消防检测 电气安', type: '政府', thing: '1)检测结论2)检测主要项目及标准3)不合格项的具体内容及二次复检的安排' },
-                { name: '消防检测 电气安', type: '政府', thing: '1)检测结论2)检测主要项目及标准3)不合格项的具体内容及二次复检的安排' },
-                { name: '消防检测 电气安', type: '政府', thing: '1)检测结论2)检测主要项目及标准3)不合格项的具体内容及二次复检的安排' },
-                { name: '消防检测 电气安', type: '政府', thing: '1)检测结论2)检测主要项目及标准3)不合格项的具体内容及二次复检的安排' },
-                { name: '消防检测 电气安', type: '政府', thing: '1)检测结论2)检测主要项目及标准3)不合格项的具体内容及二次复检的安排' },
-                { name: '消防检测 电气安', type: '政府', thing: '1)检测结论2)检测主要项目及标准3)不合格项的具体内容及二次复检的安排' }
-            ]
+            visible: false
         }
     },
     methods: {
         open() {
             this.visible = true
+        },
+        objectSpanMethod({ row, column, rowIndex, columnIndex }) {
+            if (columnIndex === 2) {
+                if (rowIndex > 0 && row[column.property] === this.tableData[rowIndex - 1][column.property]) {
+                    return {
+                        rowspan: 0,
+                        colspan: 0
+                    }
+                } else {
+                    let rows = 1
+                    for (let i = rowIndex; i < this.tableData.length - 1; i++) {
+                        if (row[column.property] === this.tableData[i + 1][column.property]) {
+                            rows++
+                        }
+                    }
+                    return {
+                        rowspan: rows,
+                        colspan: 1
+                    }
+                }
+            }
         }
     }
 }

+ 4 - 2
src/views/other/zhsxOther.vue

@@ -20,7 +20,7 @@
                 <img src='../../assets/imgs/zy1.png' alt />
             </div>
         </div>
-        <zhsx-dialog ref='Dialog'></zhsx-dialog>
+        <zhsx-dialog ref='Dialog' :tableData='tableData'></zhsx-dialog>
     </div>
 </template>
 <script>
@@ -33,7 +33,8 @@ import { queryZhsxjl } from '@/api/other.js'
 export default {
     data() {
         return {
-            activeName: '1'
+            activeName: '1',
+            tableData: []
         }
     },
     props: ['everySystem'],
@@ -45,6 +46,7 @@ export default {
             }
             queryZhsxjl(params).then(res => {
                 console.log('综合事项弹框', res)
+                this.tableData = res.data
             })
             this.$refs.Dialog.open()
         },

binární
wandaBmGuide.zip