Browse Source

下拉框、tab页

guoxiaohuan 4 years ago
parent
commit
de925322a8

+ 2 - 2
package.json

@@ -9,9 +9,9 @@
     },
     "dependencies": {
         "@saga-web/base": "^2.1.9",
-        "@saga-web/big": "^1.0.6",
+        "@saga-web/big": "^1.0.17",
         "@saga-web/draw": "^2.1.80",
-        "@saga-web/feng-map": "^1.0.4",
+        "@saga-web/feng-map": "^1.0.7",
         "@saga-web/graphy": "^2.1.52",
         "ant-design-vue": "^1.4.10",
         "axios": "^0.19.2",

+ 10 - 0
src/api/public.js

@@ -3,3 +3,13 @@ import httputils from '@/api/httputils'
 export function queryPic({ data, getParams }) {
     return httputils.getJson(`/api/data/glsms_proimgup/query`, data, getParams)
 }
+
+// 查询下拉框
+export function querySelect({ data, postParams }) {
+    return httputils.fetchJson(`/api/data/base/queryOptions`, data, postParams)
+}
+
+// 查询Tab数据统计数量
+export function queryTab({ data, postParams }) {
+    return httputils.fetchJson(`/api/data/base/queryTabStatistics`, data, postParams)
+}

+ 3 - 4
src/views/equipment/eqDialog.vue

@@ -50,10 +50,9 @@ export default {
         }
     },
     mounted() {
-        console.log(this.$refs)
-        if (this.$refs.list1) {
-            this.$refs.list1.getList(this.activeName)
-        }
+        // if (this.$refs.list1) {
+        //     this.$refs.list1.getList(this.activeName)
+        // }
     },
     components: { tableList, tjTable, wbTable, zwTable, lookPage, GDQDTable },
     methods: {

+ 50 - 5
src/views/equipment/index.vue

@@ -47,6 +47,7 @@ import bottomLayer from './bottomLayer'
 import editList from '@/components/edit.vue'
 import { system, floors } from '@/utils/plugins/components.js'
 import { getFloorList } from '@/api/public.js'
+import { querySelect, queryTab } from '@/api/public.js'
 export default {
     data() {
         return {
@@ -59,14 +60,56 @@ export default {
                 floorName: 'F1',
                 floorId: 'f1'
             },
-            dialogInfo: {}
+            dialogInfo: {},
+            brand: [], //品牌
+            manufacturer: []
         }
     },
     components: { floorList, eqDialog, floorMap, bottomLayer, editList },
     methods: {
+        // 查询下拉框
+        query() {
+            let postParams = [
+                {
+                    columnName: { brand: 'brand', manufacturer: 'manufacturer' }, //列名称
+                    params: {
+                        // classstructureid: '1572'
+                    },
+                    tableName: 'glsms_asset' //视图名称
+                }
+            ]
+            let data = {
+                major: '弱电',
+                plazaId: '1001145'
+            }
+
+            querySelect({ data, postParams }).then(res => {
+                this.brand = res.data.data.glsms_asset.brand
+                this.manufacturer = res.data.data.glsms_asset.manufacturer
+            })
+        },
+        tabFind() {
+            let postParams = [
+                {
+                    params: {
+                        classstructureid: '1593'
+                    },
+                    tableName: 'glsms_asset' //视图名称
+                }
+            ]
+            let data = {
+                major: '弱电',
+                plazaId: '1001145'
+            }
+            queryTab({ data, postParams }).then(res => {
+                console.log(res.data.data)
+            })
+        },
+        // 查询tab页
         tabSyatem(item) {
             this.systemId = item.id
-            ;(this.everySystem = item.children), (this.systemName = item.name)
+            this.everySystem = item.children
+            this.systemName = item.name
         },
         emitFloor(item) {
             this.floorInfo = item
@@ -79,11 +122,13 @@ export default {
         }
     },
     mounted() {
+        this.query()
+        this.tabFind()
         this.everySystem = this.system[0].children
         // this.$refs.floorMap.init()
-        getFloorList({ plazaId: '964' }).then(res => {
-            console.log('12313', res)
-        })
+        // getFloorList({ plazaId: '964' }).then(res => {
+        //     console.log('12313', res)
+        // })
         // this.$refs.dialog.init()
         // this.$refs.floorMap.init()
     }

+ 3 - 1
src/views/equipment/table/GDQDTable.vue

@@ -54,7 +54,7 @@ export default {
                 { id: 'test3', name: '下级分项' },
                 { id: 'test4', name: '滑动平均滑动平均' }
             ],
-            innerVisible: true,
+            innerVisible: false, //详情弹框
             input: '',
             floorSelect: []
         }
@@ -78,6 +78,8 @@ export default {
                 plazaId: this.$store.state.plazaId,
                 major: this.major
             }
+            // console.log({ data, postParams })
+            // return
             queryEquipmentList({ data, postParams }).then(res => {
                 console.log(res)
                 this.tableData = res.data.data

+ 2 - 1
src/views/equipment/table/eqListTable.vue

@@ -49,7 +49,8 @@ export default {
             tableData: [],
             total: 0,
             currentPage: 1,
-            size: 10
+            size: 10,
+            floorSelect: []
         }
     },
     computed: {