shaun-sheep 5 лет назад
Родитель
Сommit
bc9ea4631c
2 измененных файлов с 92 добавлено и 24 удалено
  1. 41 11
      src/api/legendLibrary.js
  2. 51 13
      src/views/legendLibrary/index.vue

+ 41 - 11
src/api/legendLibrary.js

@@ -1,45 +1,75 @@
 import httputils from '@/api/httputils'
 // 图例库-查询
-export function queryLegend({ postParams }) {
+export function queryLegend({
+    postParams
+}) {
     return httputils.postJson(`/serve/topology-wanda/graphElement/query`, postParams)
 }
 // 图例库-新增
-export function createLegend({ postParams }) {
+export function createLegend({
+    postParams
+}) {
     return httputils.postJson(`/serve/topology-wanda/graphElement/create`, postParams)
 }
 //图例库-更新
-export function updateLegend({ postParams }) {
+export function updateLegend({
+    postParams
+}) {
     return httputils.postJson(`/serve/topology-wanda/graphElement/update`, postParams)
 }
 //图例库-作废
-export function deleteLegend({ postParams }) {
+export function deleteLegend({
+    postParams
+}) {
     return httputils.postJson(`/serve/topology-wanda/graphElement/deleteByFlag`, postParams)
 }
 //图例库-系统tree查询
-export function getLegendTree({ getParams }) {
+export function getLegendTree({
+    getParams
+}) {
     return httputils.getJson(`/serve/topology-wanda/graphCategory/queryByGroup`, getParams)
 }
 //图例库-系统tree相关表格查询
-export function queryRelation({ data, postParams }) {
+export function queryRelation({
+    data,
+    postParams
+}) {
     return httputils.fetchJson(`/serve/topology-wanda/graphRelation/query`, data, postParams)
 }
 //图例库-更新关系图
-export function updateRelation({ postParams }) {
+export function updateRelation({
+    postParams
+}) {
     return httputils.postJson(`/serve/topology-wanda/graphRelation/update`, postParams)
 }
 //图例库-系统tree相关表格删除
-export function deleteRelation({ postParams }) {
+export function deleteRelation({
+    postParams
+}) {
     return httputils.postJson(`/serve/topology-wanda/graphRelation/delete`, postParams)
 }
 //图例库-上传图片
-export function uploadImg({ postParams }) {
+export function uploadImg({
+    postParams
+}) {
     return httputils.postJson(`/serve/topology-wanda/Picture/create`, postParams)
 }
 //图例库-穿梭框的搜索
-export function getTransfer({ getParams }) {
+export function getTransfer({
+    getParams
+}) {
     return httputils.getJson(`/serve/topology-wanda/graphElement/search`, getParams)
 }
 //图例库typeId
-export function queryTypeId({ postParams }) {
+export function queryTypeId({
+    postParams
+}) {
     return httputils.postJson(`/serve/topology-wanda/graphElement/type/query`, postParams)
 }
+// 搜索图铺位可视化类型信息
+export function getVisualization({
+    postParams
+}) {
+    return httputils.postJson(`/serve/topology-wanda/graphElement/type/search`, postParams)
+
+}

+ 51 - 13
src/views/legendLibrary/index.vue

@@ -39,7 +39,7 @@
                     @change='getTableList'
                     style='margin:0 12px'
                 ></Select>
-                <Select
+                <!-- <Select
                     width='180'
                     tipPlace='top'
                     v-model='TypeId'
@@ -47,7 +47,19 @@
                     :selectdata='typeIdSelect'
                     :placeholder='"请选择"'
                     @change='getTableList'
-                ></Select>
+                ></Select>-->
+                <TreeSelect
+                    caption='铺位可视化:'
+                    tipPlace='top'
+                    width='250'
+                    :lastStage='true'
+                    :linkage='false'
+                    :choseArea='true'
+                    :data='typeIdSelect'
+                    :hideClear='true'
+                    @change='treeConfirm'
+                    @focusChange='focusChange'
+                />
                 <Select
                     width='180'
                     tipPlace='top'
@@ -57,6 +69,7 @@
                     @change='getTableList'
                     :placeholder='"请选择"'
                     style='margin:0 12px'
+                    :hideClear='true'
                 ></Select>
                 <el-input size='small' @change='getTableList' prefix-icon='el-icon-search' v-model='keyword' style='width:192px;margin-right:12px;'></el-input>
             </div>
@@ -115,7 +128,7 @@
 <script>
 import addLegend from './addLegend'
 import Select from '@/components/Select/Select.vue'
-import { queryLegend, deleteLegend, queryTypeId } from '@/api/legendLibrary.js'
+import { queryLegend, deleteLegend, queryTypeId, getVisualization } from '@/api/legendLibrary.js'
 export default {
     components: { addLegend, Select },
     data() {
@@ -128,8 +141,8 @@ export default {
                 { id: 'test4', name: '滑动平均滑动平均' }
             ],
             stateSelect: [
-                { id: 1, name: '正常' },
-                { id: 0, name: '已作废' }
+                { id: '1', name: '正常' },
+                { id: '0', name: '已作废' }
             ],
             Type: '', //所属分类
             typeOptions: [
@@ -155,7 +168,7 @@ export default {
             size: 10,
             total: 0,
             currentPage: 1,
-            state: 1,
+            state: '1',
             position: [],
             positionSelect: [
                 { id: 'GDXT', name: '供电系统-楼层分布' },
@@ -198,6 +211,9 @@ export default {
                 console.log(this.typeIdSelect)
             })
         },
+        visualization() {
+            getVisualization({}).then(res => {})
+        },
         add() {
             this.$refs.addLegend.open('', '添加图例库')
         },
@@ -242,15 +258,27 @@ export default {
             let postParams = {
                 PageNumber: this.currentPage,
                 PageSize: this.size,
-                Keyword: this.keyword,
-                Type: this.Type,
-                TypeId: this.TypeId,
-                Orders: 'CreateTime desc'
+                // Keyword: this.keyword,
+                // Type: this.Type,
+                // TypeId: this.TypeId,
+                Orders: 'CreateTime desc',
+                Filters: ``
             }
-            if (this.state == 0) {
-                postParams.Filters = 'deleted=true'
+            // 状态
+            if (this.state == 1) {
+                postParams.Filters += `deleted='true'`
             } else {
-                postParams.Filters = 'deleted=false'
+                postParams.Filters += `deleted='true'`
+            }
+            if (this.Type) {
+                postParams.Filters += `;Type='${this.Type}'`
+            }
+            // 位置分类InfoLocal
+            //专业 InfoSystem
+            // 可视化InfoTypeId
+            // 搜索 Name
+            if (this.keyword) {
+                postParams.Filters += `;Name contain '${this.keyword}'`
             }
             queryLegend({ postParams }).then(res => {
                 console.log(res)
@@ -263,10 +291,17 @@ export default {
         },
         addSuccess() {
             this.getTableList()
+        },
+        treeConfirm(data) {
+            console.log(data)
+        },
+        focusChange(status) {
+            console.log('focusChange', status)
         }
     },
     mounted() {
         this.getTypeId()
+        this.visualization()
         this.getTableList()
     }
 }
@@ -310,6 +345,9 @@ export default {
         justify-content: flex-end;
         margin-top: 28px;
     }
+    /deep/ .p-select-input-content {
+        line-height: 32px;
+    }
 }
 </style>
 <style lang="less">