shaun-sheep пре 4 година
родитељ
комит
6cf0ed12fe
4 измењених фајлова са 67 додато и 27 уклоњено
  1. 8 0
      src/api/legendLibrary.js
  2. 18 10
      src/views/legendLibrary/addForm.vue
  3. 40 16
      src/views/legendLibrary/index.vue
  4. 1 1
      vue.config.js

+ 8 - 0
src/api/legendLibrary.js

@@ -86,4 +86,12 @@ export function graphElementSearch({
 }) {
     return httputils.postJson(`/serve/topology-wanda/graphElement/search`, postParams)
 
+}
+
+// 业下设备分类和位置分类树形结构
+export function queryDeviceAndPOsition({
+
+    postParams
+}) {
+    return httputils.postJson(`/data/data/t_system_wzfl/query`, postParams)
 }

+ 18 - 10
src/views/legendLibrary/addForm.vue

@@ -77,8 +77,9 @@
         </div>
         <div v-if='ruleForm.Type!="None"' class='form4'>
             <div class='form4-top'>
-                <span class='form4-span1'>对应工程信息化中的位置/设备分类</span>
-                <span class='form4-span2'>工程信息化的专业</span>
+                <span class='form4-span1'>专业/设备、位置类型:</span>
+                <!-- <span class='form4-span1'>对应工程信息化中的位置/设备分类</span>
+                <span class='form4-span2'>工程信息化的专业</span>-->
                 <span class='form4-span3'>铺位可视化typeid</span>
             </div>
             <div class='form3-bottom'>
@@ -101,7 +102,7 @@
                     @change='treeConfirmDevice'
                 />
 
-                <TreeSelect
+                <!-- <TreeSelect
                     tipPlace='top'
                     width='200'
                     style=' margin-right:48px;'
@@ -111,7 +112,7 @@
                     :choseArea='true'
                     :data='majorList'
                     @change='treeConfirmMajor'
-                />
+                />-->
 
                 <TreeSelect
                     tipPlace='top'
@@ -130,7 +131,7 @@
 </template>
 
 <script>
-import { createLegend, updateLegend, uploadImg, getVisualization } from '@/api/legendLibrary.js'
+import { queryDeviceAndPOsition, createLegend, updateLegend, uploadImg, getVisualization } from '@/api/legendLibrary.js'
 import { FloorView } from '@/lib/FloorView'
 import { FloorScene } from '@/lib/FloorScene'
 import { GraphView } from '@/lib/GraphView'
@@ -202,12 +203,19 @@ export default {
             scene: null,
             typeVisualization: [],
 
-            majorList: [], //专业
+            // majorList: [], //专业
             deviceList: []
         }
     },
     props: ['ruleForm', 'title'],
     methods: {
+        //业下设备分类和位置分类树形结构
+        initQueryDeviceAndPOsition() {
+            let postParams = {}
+            queryDeviceAndPOsition({ postParams }).then(res => {
+                this.deviceList = res.data
+            })
+        },
         getFile(file) {
             this.file = file.file
             var formData = new FormData()
@@ -369,9 +377,9 @@ export default {
             this.$set(this.ruleForm, 'InfoTypeId', data)
         },
         //专业
-        treeConfirmMajor(id, info) {
-            // this.$set(this.ruleForm, 'InfoSystem', data)
-        },
+        // treeConfirmMajor(id, info) {
+        //     // this.$set(this.ruleForm, 'InfoSystem', data)
+        // },
         //位置/设备
         treeConfirmDevice(id, info) {
             // this.$set(this.ruleForm, 'InfoLocal', data)
@@ -397,8 +405,8 @@ export default {
         }
     },
     mounted() {
+        this.initQueryDeviceAndPOsition()
         this.visualization()
-
         if (this.title == '修改图例库') {
             this.changeLineWidth(this.ruleForm.LineWidth)
             this.changeLineType(this.ruleForm.LineDash)

+ 40 - 16
src/views/legendLibrary/index.vue

@@ -23,7 +23,7 @@
                 <TreeSelect
                     caption='说明书位置:'
                     tipPlace='top'
-                    height='180'
+                    width='180'
                     style='margin:0 12px'
                     :returnParentNode='false'
                     :isShowAllChoice='true'
@@ -33,9 +33,9 @@
                     :hideClear='true'
                 />
                 <TreeSelect
-                    caption='位置/设备分类:'
+                    caption='专业/设备、位置类型:'
                     tipPlace='top'
-                    height='180'
+                    width='250'
                     style='margin:0 12px'
                     :returnParentNode='false'
                     :isShowAllChoice='true'
@@ -45,7 +45,7 @@
                     @change='treeConfirmDevice'
                 />
 
-                <TreeSelect
+                <!-- <TreeSelect
                     caption='专业:'
                     tipPlace='top'
                     height='180'
@@ -56,12 +56,12 @@
                     :data='majorList'
                     @change='treeConfirmMajor'
                     :hideClear='true'
-                />
+                />-->
 
                 <TreeSelect
                     caption='铺位可视化:'
                     tipPlace='top'
-                    height='250'
+                    width='250'
                     :returnParentNode='false'
                     :isShowAllChoice='true'
                     :choseArea='true'
@@ -138,7 +138,16 @@
 <script>
 import addLegend from './addLegend'
 import Select from '@/components/Select/Select.vue'
-import { graphElementSearch, getLegendTree, queryLegend, deleteLegend, queryTypeId, getVisualization, queryRelation } from '@/api/legendLibrary.js'
+import {
+    queryDeviceAndPOsition,
+    graphElementSearch,
+    getLegendTree,
+    queryLegend,
+    deleteLegend,
+    queryTypeId,
+    getVisualization,
+    queryRelation
+} from '@/api/legendLibrary.js'
 export default {
     components: { addLegend, Select },
     data() {
@@ -154,9 +163,13 @@ export default {
                 { id: '1', name: '正常' },
                 { id: '0', name: '已作废' }
             ],
-            Type: undefined, //所属分类
+            Type: 'all', //所属分类
             typeOptions: [
                 {
+                    id: 'all',
+                    name: '全部'
+                },
+                {
                     id: 'None',
                     name: '非图例'
                 },
@@ -185,7 +198,7 @@ export default {
             keyword: undefined,
             typeVisualization: [],
             visualizationList: [], //已选铺位可视化
-            majorList: [], //专业
+            // majorList: [], //专业
             deviceList: [],
             GraphCategoryIds: undefined, //说明书位置勾选集合
             InfoLocals: undefined, //工程信息化
@@ -194,6 +207,13 @@ export default {
         }
     },
     methods: {
+        //业下设备分类和位置分类树形结构
+        initQueryDeviceAndPOsition() {
+            let postParams = {}
+            queryDeviceAndPOsition({ postParams }).then(res => {
+                this.deviceList = res.data
+            })
+        },
         //说明书位置
         instruction() {
             let getParams = {}
@@ -281,7 +301,7 @@ export default {
                 Name: this.keyword,
                 PageNumber: this.currentPage,
                 PageSize: this.size,
-                Type: this.Type
+                Type: this.Type == 'all' ? undefined : this.Type
             }
             graphElementSearch({ postParams }).then(res => {
                 this.tableData = res.Content
@@ -301,14 +321,17 @@ export default {
             this.getTableList()
         },
         //专业
-        treeConfirmMajor(id, info) {
-            this.InfoSystems = id
-            this.getTableList()
-        },
+        // treeConfirmMajor(id, info) {
+        //     this.InfoSystems = id
+        //     this.getTableList()
+        // },
         //位置/设备
         treeConfirmDevice(id, info) {
-            this.InfoLocals = id
-            this.getTableList()
+            console.log(id, info)
+            let type = id.map(i => i[i.length - 1])
+            console.log(type, 'type')
+            // this.InfoLocals = id
+            // this.getTableList()
         },
         //说明书位置
         treeConfirmPosition(id, info) {
@@ -324,6 +347,7 @@ export default {
         this.instruction()
         this.visualization()
         this.getTableList()
+        this.initQueryDeviceAndPOsition()
     }
 }
 </script>

+ 1 - 1
vue.config.js

@@ -46,4 +46,4 @@ module.exports = {
     outputDir: 'wandaBmGuide',
     // 放置生成的静态资源 (js、css、img、fonts) 的 (相对于 outputDir 的) 目录
     assetsDir: 'static',
-}
+}