zhulizhen1111 hace 4 años
padre
commit
ec8d2eecb0

+ 2 - 2
src/api/equipmentList.js

@@ -45,6 +45,6 @@ export function queryxxx({ getParams }) {
 }
 
 // 设备设施-楼层电井口(间)控制商铺范围清单
-export function queryx({ getParams }) {
-    return httputils.getJson(`/data/X`, getParams)
+export function queryShops({ getParams }) {
+    return httputils.getJson(`/data/v_glsms_shops/query`, getParams)
 }

+ 2 - 2
src/utils/format.js

@@ -3,7 +3,7 @@ const formatTime = (time) => {
     return time > 10 ? time : "0" + time
 }
 const formatter = (date) => {
-    return moment.unix(date / 1000).format("YYYY.MM.DD")
+    return moment.unix(date / 1000).format("YYYY.MM.DD hh:mm")
 }
 const number_format = (number, decimals, dec_point, thousands_sep) => {
     /*
@@ -19,7 +19,7 @@ const number_format = (number, decimals, dec_point, thousands_sep) => {
         sep = typeof thousands_sep === "undefined" ? "," : thousands_sep,
         dec = typeof dec_point === "undefined" ? "." : dec_point,
         s = "",
-        toFixedFix = function (n, prec) {
+        toFixedFix = function(n, prec) {
             var k = Math.pow(10, prec)
             return "" + Math.ceil(n * k) / k
         }

+ 25 - 8
src/views/equipment/eqDialog.vue

@@ -45,13 +45,31 @@
                         <tableList v-else-if='value.id.slice(0,4)=="RDQD"' :param='param' ref='list1' major='弱电'></tableList>
                         <tableList v-else-if='value.id.slice(0,4)=="NTQD"' :param='param' ref='list2' major='暖通'></tableList>
                         <!-- 维保表格 -->
-                        <wb-table v-else-if='value.id.slice(2,4)=="WB"' :smsxt='smsxt' :difference='difference' :major='dialogInfo.id'></wb-table>
+                        <wb-table
+                            v-else-if='value.id.slice(2,4)=="WB"'
+                            :smsxt='smsxt'
+                            :tabLabel='tabLabel'
+                            :difference='difference'
+                            :major='dialogInfo.id'
+                        ></wb-table>
                         <!-- 维修的表格 -->
-                        <wx-table v-else-if='value.id.slice(2,4)=="WX"' :smsxt='smsxt' :difference='difference' :major='dialogInfo.id'></wx-table>
+                        <wx-table
+                            v-else-if='value.id.slice(2,4)=="WX"'
+                            :smsxt='smsxt'
+                            :tabLabel='tabLabel'
+                            :difference='difference'
+                            :major='dialogInfo.id'
+                        ></wx-table>
                         <!-- 专维 -->
-                        <zw-table v-else-if='value.id.slice(2,4)=="ZW"' :smsxt='smsxt' :difference='difference' :major='dialogInfo.id'></zw-table>
+                        <zw-table
+                            v-else-if='value.id.slice(2,4)=="ZW"'
+                            :smsxt='smsxt'
+                            :tabLabel='tabLabel'
+                            :difference='difference'
+                            :major='dialogInfo.id'
+                        ></zw-table>
                         <!-- 其他 -->
-                        <other-table v-else-if='value.id.slice(2,4)=="QT"' ref='qtList' :smsxt='smsxt' :major='dialogInfo.id'></other-table>
+                        <other-table v-else-if='value.id.slice(2,4)=="QT"' ref='qtList' :tabLabel='tabLabel' :smsxt='smsxt' :major='dialogInfo.id'></other-table>
                     </el-tab-pane>
                 </el-tabs>
             </div>
@@ -82,7 +100,8 @@ export default {
             param: '', //区分清单tab
             typecode: '', //区分原理图的tab
             difference: '', //区分给水排水
-            rotationImg: []
+            rotationImg: [],
+            tabLabel: ''
         }
     },
     mounted() {},
@@ -134,9 +153,7 @@ export default {
             if (this.dialogInfo.children[0].id.slice(2, 4) == 'YL') {
                 this.initImage(this.typecode)
             }
-            if (tab.label == '其他事项') {
-                this.$refs.qtList.getList()
-            }
+            this.tabLabel = tab.label
         },
         tabClick(value) {
             console.log(value, '-----.')

+ 21 - 35
src/views/equipment/table/djspTable.vue

@@ -7,7 +7,7 @@
                 size='small'
                 @change='getList'
                 prefix-icon='el-icon-search'
-                v-model='keyword'
+                v-model='welldes'
                 clearable
                 style='width:192px;margin-right:12px'
             ></el-input>
@@ -16,7 +16,7 @@
                 size='small'
                 @change='getList'
                 prefix-icon='el-icon-search'
-                v-model='keyword'
+                v-model='shopsnum'
                 clearable
                 style='width:192px;margin-right:12px'
             ></el-input>
@@ -36,65 +36,51 @@
                 <template slot-scope='{row}'>{{row.shopsnum || '--'}}</template>
             </el-table-column>
         </el-table>
-        <div class='foot'>
-            <el-pagination
-                background
-                layout='prev, pager, next'
-                :total='total'
-                :page-size='size'
-                @prev-click='pageChanged'
-                @next-click='pageChanged'
-                @current-change='pageChanged'
-            ></el-pagination>
-        </div>
+        <div class='foot'></div>
     </div>
 </template>
 <script>
 import Select from '@/components/Select/Select.vue'
 import EqDetail from './eqDetaileDialog'
-import { queryEquipmentList } from '@/api/equipmentList.js'
+import { queryShops } from '@/api/equipmentList.js'
 import { mapGetters } from 'vuex'
 
 export default {
     components: { Select, EqDetail },
     data() {
         return {
-            dataSelect2: [
-                { id: 'test1', name: '选择项' },
-                { id: 'test2', name: '单平米' },
-                { id: 'test3', name: '下级分项' },
-                { id: 'test4', name: '滑动平均滑动平均' }
-            ],
             tableData: [],
-            total: 0,
-            currentPage: 1,
-            size: 10,
             floor: '',
             innerVisible: false, //详情弹框
-            keyword: ''
+            shopsnum: '',
+            welldes: ''
         }
     },
     computed: {
         ...mapGetters(['floorSelect'])
     },
-    props: ['major'],
+
     methods: {
         pageChanged(page) {
             this.currentPage = page
             this.getList()
         },
         getList() {
-            let postParams = {
-                // tab_code: this.param
+            let getParams = {}
+            if (this.floor) {
+                getParams.floor = this.floorSelect
+            }
+            getParams.keyword = ''
+            if (this.welldes) {
+                getParams.keyword += `${this.welldes}:welldes;`
+            }
+            if (this.shopsnum) {
+                getParams.keyword += `${this.shopsnum}:shopsnum;`
             }
-            let data = {
-                page: this.currentPage,
-                size: this.size,
-                plazaId: this.$store.state.plazaId,
-                major: this.major,
-                keyword: this.keyword
+            if (getParams.keyword == '') {
+                delete getParams.keyword
             }
-            queryEquipmentList({ data, postParams }).then(res => {
+            queryShops({ getParams }).then(res => {
                 console.log(res)
                 this.tableData = res.data.data
                 this.total = res.data.count
@@ -103,7 +89,7 @@ export default {
     },
 
     mounted() {
-        // this.getList()
+        this.getList()
     }
 }
 </script>

+ 2 - 2
src/views/equipment/table/eqDetaileDialog.vue

@@ -55,7 +55,7 @@
             <el-table-column prop='assetnum' label='设备编号' show-overflow-tooltip resizable>
                 <template slot-scope='{row}'>{{row.assetnum || '--'}}</template>
             </el-table-column>
-            <el-table-column prop='sl' label='数量'>
+            <el-table-column prop='sl' label='数量' width='100'>
                 <template slot-scope='{row}'>{{row.sl || '--'}}</template>
             </el-table-column>
             <el-table-column prop='sbglgs' label='管理归属' show-overflow-tooltip resizable>
@@ -70,7 +70,7 @@
             <el-table-column prop='sbxh' label='型号' show-overflow-tooltip resizable>
                 <template slot-scope='{row}'>{{row.sbxh || '--'}}</template>
             </el-table-column>
-            <el-table-column prop='floor' sortable label='楼层'>
+            <el-table-column prop='floor' sortable label='楼层' width='100'>
                 <template slot-scope='{row}'>{{row.floor || '--'}}</template>
             </el-table-column>
             <el-table-column prop='wzjc' label='安装位置' show-overflow-tooltip resizable>

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

@@ -36,7 +36,7 @@
             <el-table-column prop='sbjc' label='设备名称' width='160'>
                 <template slot-scope='{row}'>{{row.sbjc || '--'}}</template>
             </el-table-column>
-            <el-table-column prop='sl' label='数量'>
+            <el-table-column prop='sl' label='数量' width='100'>
                 <template slot-scope='{row}'>{{row.sl || '--'}}</template>
             </el-table-column>
             <el-table-column prop='brand' label='品牌'>
@@ -45,7 +45,7 @@
             <el-table-column prop='sbxh' label='型号' show-overflow-tooltip resizable>
                 <template slot-scope='{row}'>{{row.sbxh || '--'}}</template>
             </el-table-column>
-            <el-table-column prop='floor' label='楼层'>
+            <el-table-column prop='floor' label='楼层' width='100'>
                 <template slot-scope='{row}'>{{row.floor || '--'}}</template>
             </el-table-column>
             <el-table-column prop='wzjc' label='安装位置' show-overflow-tooltip resizable>

+ 7 - 1
src/views/equipment/table/otherTable.vue

@@ -102,7 +102,7 @@ export default {
             handleOption: []
         }
     },
-    props: ['major', 'smsxt'],
+    props: ['major', 'smsxt', 'tabLabel'],
     computed: {
         ...mapGetters(['floorSelect'])
     },
@@ -195,6 +195,12 @@ export default {
                 this.tabFind()
                 this.getList()
             }
+        },
+        tabLabel(newV, oldV) {
+            if (newV !== oldV) {
+                this.tabFind()
+                this.getList()
+            }
         }
     },
     mounted() {

+ 2 - 2
src/views/equipment/table/standTable.vue

@@ -37,7 +37,7 @@
                 <template slot-scope='{row}'>{{row.sbjc || '--'}}</template>
             </el-table-column>
             <!-- sbjc -->
-            <el-table-column prop='sl' label='数量'>
+            <el-table-column prop='sl' label='数量' width='100'>
                 <template slot-scope='{row}'>{{row.sl || '--'}}</template>
             </el-table-column>
             <el-table-column prop='brand' label='品牌'>
@@ -46,7 +46,7 @@
             <el-table-column prop='sbxh' label='型号' show-overflow-tooltip resizable>
                 <template slot-scope='{row}'>{{row.sbxh || '--'}}</template>
             </el-table-column>
-            <el-table-column prop='floor' label='楼层'>
+            <el-table-column prop='floor' label='楼层' width='100'>
                 <template slot-scope='{row}'>{{row.floor || '--'}}</template>
             </el-table-column>
             <el-table-column prop='manufacturer' label='生产厂商' show-overflow-tooltip resizable>

+ 1 - 1
src/views/equipment/table/tjTable.vue

@@ -18,7 +18,7 @@
             <el-table-column prop='lb' label='类别' width='160'>
                 <template slot-scope='{row}'>{{row.lb || '--'}}</template>
             </el-table-column>
-            <el-table-column prop='sl' label='数量'>
+            <el-table-column prop='sl' label='数量' width='100'>
                 <template slot-scope='{row}'>{{row.sl || '--'}}</template>
             </el-table-column>
             <el-table-column prop='brand' label='品牌'>

+ 9 - 3
src/views/equipment/table/wbTable.vue

@@ -98,10 +98,10 @@
                     <div style='cursor:pointer;color: #0091ff;' @click='clickPic(row.glsmsImage)'>{{row.glsmsImage?row.glsmsImage.length+'张':'--'}}</div>
                 </template>
             </el-table-column>
-            <el-table-column prop='reportdate' label='填报时间' width='120'>
+            <el-table-column prop='reportdate' label='填报时间' width='140'>
                 <template slot-scope='{row}'>{{row.reportdate?formatter(row.reportdate):'--'}}</template>
             </el-table-column>
-            <el-table-column prop='sjjssj' label='验收时间' width='120'>
+            <el-table-column prop='sjjssj' label='验收时间' width='140'>
                 <template slot-scope='{row}'>{{row.sjjssj?formatter(row.sjjssj): '--'}}</template>
             </el-table-column>
             <el-table-column prop='wonum' label='任务编号' show-overflow-tooltip resizable>
@@ -158,7 +158,7 @@ export default {
             matters: ''
         }
     },
-    props: ['smsxt', 'major', 'difference'],
+    props: ['smsxt', 'major', 'difference', 'tabLabel'],
     computed: {
         ...mapGetters(['floorSelect'])
     },
@@ -234,6 +234,12 @@ export default {
             if (newV !== oldV) {
                 this.getList()
             }
+        },
+        tabLabel(newV, oldV) {
+            if (newV !== oldV) {
+                this.tabFind()
+                this.getList()
+            }
         }
     },
     mounted() {

+ 9 - 3
src/views/equipment/table/wxTable.vue

@@ -106,10 +106,10 @@
                     <div style='cursor:pointer;color: #0091ff;' @click='clickPic(row.glsmsImage)'>{{row.glsmsImage?row.glsmsImage.length+'张':'--'}}</div>
                 </template>
             </el-table-column>
-            <el-table-column prop='reportdate' label='填报时间' width='120'>
+            <el-table-column prop='reportdate' label='填报时间' width='140'>
                 <template slot-scope='{row}'>{{row.reportdate?formatter(row.reportdate): '--'}}</template>
             </el-table-column>
-            <el-table-column prop='sjjssj' label='验收时间' width='120'>
+            <el-table-column prop='sjjssj' label='验收时间' width='140'>
                 <template slot-scope='{row}'>{{row.sjjssj?formatter(row.sjjssj): '--'}}</template>
             </el-table-column>
             <el-table-column prop='wonum' label='工单编号' show-overflow-tooltip resizable>
@@ -169,7 +169,7 @@ export default {
     computed: {
         ...mapGetters(['floorSelect'])
     },
-    props: ['smsxt', 'major', 'difference'],
+    props: ['smsxt', 'major', 'difference', 'tabLabel'],
     methods: {
         //多余输入框监听
         confirm(wonum) {
@@ -241,6 +241,12 @@ export default {
             if (newV !== oldV) {
                 this.getList()
             }
+        },
+        tabLabel(newV, oldV) {
+            if (newV !== oldV) {
+                this.tabFind()
+                this.getList()
+            }
         }
     },
     mounted() {

+ 9 - 3
src/views/equipment/table/zwTable.vue

@@ -83,10 +83,10 @@
             <el-table-column prop='sxjd' label='当前阶段' show-overflow-tooltip resizable>
                 <template slot-scope='{row}'>{{row.sxjd || '--'}}</template>
             </el-table-column>
-            <el-table-column prop='lxsjwcsj' label='立项日期' show-overflow-tooltip resizable>
+            <el-table-column prop='lxsjwcsj' label='立项日期' show-overflow-tooltip resizable width='140'>
                 <template slot-scope='{row}'>{{row.lxsjwcsj?formatter(row.lxsjwcsj):'--'}}</template>
             </el-table-column>
-            <el-table-column prop='yssjwcsj' label='验收日期' show-overflow-tooltip resizable>
+            <el-table-column prop='yssjwcsj' label='验收日期' show-overflow-tooltip resizable width='140'>
                 <template slot-scope='{row}'>{{row.yssjwcsj?formatter(row.yssjwcsj):'--'}}</template>
             </el-table-column>
             <el-table-column prop='status' label='验收结果' show-overflow-tooltip resizable>
@@ -146,7 +146,7 @@ export default {
     computed: {
         ...mapGetters(['floorSelect'])
     },
-    props: ['smsxt', 'major', 'difference'],
+    props: ['smsxt', 'major', 'difference', 'tabLabel'],
     methods: {
         //多余输入框监听
         confirm(status, yssjwcsj) {
@@ -279,6 +279,12 @@ export default {
                 this.tabFind()
                 this.getList()
             }
+        },
+        tabLabel(newV, oldV) {
+            if (newV !== oldV) {
+                this.tabFind()
+                this.getList()
+            }
         }
     },
     mounted() {