zhulizhen1111 4 年之前
父節點
當前提交
665ef31873

+ 5 - 1
src/api/equipmentList.js

@@ -1,8 +1,12 @@
 import httputils from "@/api/httputils"
-// 设备设施设备-清单接口
+// 设备设施设备-设备清单接口
 export function queryEquipmentList({ getParams }) {
     return httputils.getJson(`/api/data/glsms_asset/query`, getParams)
 }
+// 设备设施设备-材料清单接口
+export function queryMaterialList({ getParams }) {
+    return httputils.getJson(`/api/data/gcglsms_material/query`, getParams)
+}
 //楼层
 export function queryFloorList({ getParams }) {
     return httputils.getJson(`/api/plaza/fact`, getParams)

+ 12 - 0
src/components/edit.vue

@@ -59,6 +59,16 @@ export default {
         // &:hover + .hover-div {
         //     display: block;
         // }
+        &::before {
+            content: '';
+            display: inline-block;
+            width: 10px;
+            height: 10px;
+            border-radius: 50%;
+            background: chocolate;
+            position: absolute;
+            right: 8px;
+        }
     }
     .hover-div {
         position: absolute;
@@ -96,4 +106,6 @@ export default {
         }
     }
 }
+</style>
+<style lang="less">
 </style>

+ 7 - 0
src/components/menuList.vue

@@ -134,3 +134,10 @@ export default {
     }
 }
 </style>
+<style lang="less">
+.menu {
+    .el-badge__content.is-fixed {
+        top: 10px;
+    }
+}
+</style>

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

@@ -8,7 +8,9 @@
                     <div v-if='value.id.slice(2,4)=="YL"' style='width:100%;height:600px;overflow:hidden'>
                         <rotation :rotationImg='rotationImg'></rotation>
                     </div>
-                    <tableList ref='list' v-else></tableList>
+                    <tableList v-if='value.id=="GDWB1"' ref='list'></tableList>
+                    <tableList v-if='value.id=="GDWB2"' ref='list'></tableList>
+                    <tableList v-else ref='list'></tableList>
                 </el-tab-pane>
             </el-tabs>
         </el-dialog>
@@ -33,7 +35,7 @@ export default {
         showModal(item) {
             this.visible = true
             this.dialogInfo = item
-            if (Object.keys(this.dialogInfo).length > 0) {
+            if (Object.keys(this.dialogInfo).length > 0 && this.dialogInfo.children.length > 0) {
                 this.activeName = this.dialogInfo.children[0].id
                 console.log(this.activeName)
             }

+ 4 - 9
src/views/equipment/index.vue

@@ -40,13 +40,8 @@ import eqDialog from './eqDialog'
 import bottomLayer from './bottomLayer'
 import editList from '@/components/edit.vue'
 import { system, floors } from '@/utils/plugins/components.js'
-<<<<<<< HEAD
-import {
-  getFloorList
-} from '@/api/public.js'
-=======
+import { getFloorList } from '@/api/public.js'
 import { queryEquipmentList } from '@/api/equipmentList.js'
->>>>>>> 1da4dd124815c22e9c6b4953d3240c894105845b
 export default {
     data() {
         return {
@@ -90,9 +85,9 @@ export default {
     },
     mounted() {
         this.everySystem = this.system[0].children
-        this.$refs.floorMap.init();
-        getFloorList({plazaId:'964'}).then((res)=>{
-            console.log('12313',res)
+        // this.$refs.floorMap.init()
+        getFloorList({ plazaId: '964' }).then(res => {
+            console.log('12313', res)
         })
         // this.$refs.dialog.init()
         // this.$refs.floorMap.init()

+ 46 - 16
src/views/equipment/table/eqListTable.vue

@@ -1,11 +1,13 @@
 <!-- 设备清单的有select的表格 -->
 <template>
-    <div class='eq-list'>
-        <Select width='146' tipPlace='top' caption='品牌:' :selectdata='dataSelect2' :placeholder='"请选择"'></Select>
-        <Select width='120' tipPlace='top' caption='楼层:' :selectdata='dataSelect2' style='margin:0 12px'></Select>
-        <Select width='224' tipPlace='top' caption='生产厂商:' :selectdata='dataSelect2' :placeholder='"请选择"'></Select>
-        <a-input-search placeholder style='width: 192px;margin-left:12px;height:34px' @search='onSearch' />
-        <a-table size='small' style='margin-top:12px' :columns='columns' :data-source='data'></a-table>
+    <div>
+        <div class='eq-list-top'>
+            <Select width='146' tipPlace='top' caption='品牌:' :selectdata='dataSelect2' :placeholder='"请选择"'></Select>
+            <Select width='120' tipPlace='top' caption='楼层:' :selectdata='dataSelect2' style='margin:0 12px'></Select>
+            <Select width='224' tipPlace='top' caption='生产厂商:' :selectdata='dataSelect2' :placeholder='"请选择"'></Select>
+            <a-input-search placeholder style='width: 192px;margin-left:12px;height:32px;margin-top:2px;' @search='onSearch' />
+        </div>
+        <a-table size='small' style='margin-top:12px' :columns='columns' :pagination='{ pageSize: pageSize }' :data-source='data'></a-table>
     </div>
 </template>
 <script>
@@ -17,38 +19,59 @@ export default {
             columns: [
                 {
                     title: '序号',
-                    dataIndex: 'index'
+                    dataIndex: 'index',
+                    key: 'index'
                 },
                 {
                     title: '设备编号',
-                    dataIndex: 'eqLocalId'
+                    dataIndex: 'eqLocalId',
+                    key: 'eqLocalId'
                 },
                 {
                     title: '数量',
-                    dataIndex: 'count'
+                    dataIndex: 'count',
+                    key: 'count'
                 },
                 {
                     title: '品牌',
-                    dataIndex: 'brand'
+                    dataIndex: 'brand',
+                    key: 'brand'
                 },
                 {
                     title: '型号',
-                    dataIndex: 'size'
+                    dataIndex: 'size',
+                    key: 'size'
                 },
                 {
                     title: '楼层',
-                    dataIndex: 'floorName'
+                    dataIndex: 'floorName',
+                    key: 'floorName'
                 },
                 {
                     title: '安装位置',
-                    dataIndex: 'location'
+                    dataIndex: 'location',
+                    key: 'location'
                 },
                 {
                     title: '生产厂商',
-                    dataIndex: 'people'
+                    dataIndex: 'people',
+                    key: 'people'
                 }
             ],
-            data: [],
+            pageSize: 10,
+            data: [
+                { size: '11' },
+                { size: '11' },
+                { size: '11' },
+                { size: '11' },
+                { size: '11' },
+                { size: '11' },
+                { size: '11' },
+                { size: '11' },
+                { size: '11' },
+                { size: '11' },
+                { size: '11' }
+            ],
             dataSelect2: [
                 { id: 'test1', name: '选择项' },
                 { id: 'test2', name: '单平米' },
@@ -63,4 +86,11 @@ export default {
     },
     mounted() {}
 }
-</script>
+</script>
+<style lang="less" scoped>
+.eq-list {
+    .eq-list-top {
+        display: flex;
+    }
+}
+</style>