guoxiaohuan vor 4 Jahren
Ursprung
Commit
faacf7da8e
3 geänderte Dateien mit 100 neuen und 83 gelöschten Zeilen
  1. 10 7
      src/views/other/gcfzDialog.vue
  2. 59 45
      src/views/room/detail.vue
  3. 31 31
      src/views/room/index.vue

+ 10 - 7
src/views/other/gcfzDialog.vue

@@ -42,7 +42,7 @@ export default {
             bgjlTable: [],
             floors: '',
             searVal: '',
-            dateVal: ''
+            dateVal: '',
         }
     },
     mounted() {
@@ -54,10 +54,10 @@ export default {
         query() {
             let getParams = {
                 plazaId: this.$store.state.plazaId,
-                orderBy: 'floor,1'
+                orderBy: 'floor,1',
             }
 
-            querygcfzyfhz({ getParams }).then(res => {
+            querygcfzyfhz({ getParams }).then((res) => {
                 if (res.result == 'success') {
                     //console.log('汇总统计报', res)
                     this.loading = false
@@ -85,7 +85,7 @@ export default {
             let getParams = {
                 plazaId: this.$store.state.plazaId,
                 page: this.page,
-                size: this.size
+                size: this.size,
             }
             if (this.floors) {
                 getParams.floor = this.floors
@@ -97,7 +97,7 @@ export default {
                 getParams.recordtimeStartDate = this.dateVal[0] + '000000'
                 getParams.recordtimeEndDate = this.dateVal[1] + '000000'
             }
-            queryfzyfchange({ getParams }).then(res => {
+            queryfzyfchange({ getParams }).then((res) => {
                 if (res.result == 'success') {
                     //console.log('变更记录', res)
                     this.total = res.count
@@ -114,8 +114,8 @@ export default {
             } else {
                 this.queryChange()
             }
-        }
-    }
+        },
+    },
 }
 </script>
 <style lang="less" scoped>
@@ -144,6 +144,9 @@ export default {
     .el-input--suffix .el-input__inner {
         padding-right: 20px;
     }
+    .el-dialog__title {
+        color: #ffffff;
+    }
 }
 .el-dialog__wrapper {
     transition-duration: 0.3s;

+ 59 - 45
src/views/room/detail.vue

@@ -13,10 +13,10 @@
                 v-model='mcbhChange'
             ></el-input>
             <Select
-                width='146'
+                width='200'
                 v-model='sbglgsStr'
                 style='margin-right:12px'
-                v-if='sbglgs.length>=0'
+                v-if='sbglgs.length>0'
                 tipPlace='top'
                 caption='管理归属:'
                 @change='changeSbglgsStr'
@@ -24,9 +24,9 @@
                 :selectdata='sbglgs'
             ></Select>
             <Select
-                width='146'
+                width='200'
                 style='margin-right:12px'
-                v-if='sb_status.length>=0'
+                v-if='sb_status.length>0'
                 tipPlace='top'
                 caption='设备状态:'
                 size='small'
@@ -38,6 +38,7 @@
                 clearable
                 @keyup.enter.native='queryDetail'
                 @blur='queryDetail'
+                @change='queryDetail'
                 placeholder='搜索品牌型号'
                 style='width:196px;margin-right:12px'
                 size='small'
@@ -108,11 +109,12 @@
             :border='true'
             v-loading='loadingDetail'
             :data='detailData'
+            @row-click='innerTable'
             style='width:100%;margin-top:12px'
             :header-cell-style='{background:"rgba(245,246,247,1)",fontFamily:"MicrosoftYaHei",color:"rgba(100,108,115,1)",lineHeight:"16px",fontSize:"12px"}'
         >
             <el-table-column type='index' label='序号' width='50'></el-table-column>
-            <el-table-column prop='sbjc' label='设备名称' min-width='150' :show-overflow-tooltip='true' resizable>
+            <el-table-column prop='sbjc' label='设备名称' width='450' :show-overflow-tooltip='true' resizable>
                 <template slot-scope='{row}'>{{row.sbjc||'--'}}</template>
             </el-table-column>
             <el-table-column prop='assetnum' label='设备内码' :show-overflow-tooltip='true'>
@@ -130,19 +132,19 @@
             <el-table-column prop='brand' label='品牌' :show-overflow-tooltip='true'>
                 <template slot-scope='{row}'>{{row.brand||'--'}}</template>
             </el-table-column>
-            <el-table-column prop='sbxh' label='型号' :show-overflow-tooltip='true'>
+            <el-table-column prop='sbxh' width='200' label='型号' :show-overflow-tooltip='true'>
                 <template slot-scope='{row}'>{{row.sbxh||'--'}}</template>
             </el-table-column>
             <el-table-column prop='floor' label='楼层' width='70' :show-overflow-tooltip='true'>
                 <template slot-scope='{row}'>{{row.floorcode||'--'}}</template>
             </el-table-column>
-            <el-table-column prop='wzjc' label='安装位置' min-width='150' :show-overflow-tooltip='true'>
+            <el-table-column prop='wzjc' label='安装位置' width='300' :show-overflow-tooltip='true'>
                 <template slot-scope='{row}'>{{row.wzjc||'--'}}</template>
             </el-table-column>
-            <el-table-column prop='manufacturer' label='生产厂商' min-width='150' :show-overflow-tooltip='true'>
+            <el-table-column prop='manufacturer' label='生产厂商' width='250' :show-overflow-tooltip='true'>
                 <template slot-scope='{row}'>{{row.manufacturer||'--'}}</template>
             </el-table-column>
-            <el-table-column prop='fws' label='服务商' min-width='150' :show-overflow-tooltip='true'>
+            <el-table-column prop='fws' label='服务商' width='250' :show-overflow-tooltip='true'>
                 <template slot-scope='{row}'>{{row.fws||'--'}}</template>
             </el-table-column>
         </el-table>
@@ -175,8 +177,8 @@ export default {
             sbglgs: [],
             input: '',
             floorStr: '',
-            sbglgsStr: '',
-            statusStr: '',
+            sbglgsStr: '全部',
+            statusStr: '全部',
             loadingDetail: true,
             totalDetail: 0,
             pageDetail: 1,
@@ -187,17 +189,23 @@ export default {
                 wbsxjlInput5: '',
                 rwbhInput5: '',
                 ycgdbhInput5: '',
-                ssmsInput5: ''
+                ssmsInput5: '',
             },
             mcbhChange: '',
-            ssppbh: ''
+            ssppbh: '',
+            allArr: [
+                {
+                    id: '全部',
+                    name: '全部',
+                },
+            ],
         }
     },
     components: {
-        Select
+        Select,
     },
     computed: {
-        ...mapGetters(['floorSelect', 'plazaId'])
+        ...mapGetters(['floorSelect', 'plazaId']),
     },
     mounted() {
         if (this.row) {
@@ -208,15 +216,21 @@ export default {
     watch: {
         row: {
             deep: true,
-            handler: function(newV, oldV) {
+            handler: function (newV, oldV) {
                 if (newV != oldV) {
                     this.queryDetail()
                     this.query()
                 }
-            }
-        }
+            },
+        },
     },
     methods: {
+        innerTable(row) {
+            console.log(row)
+            if (row.assetuid) {
+                window.open(`http://gcgl.wanda.cn/maximo/ui/?event=loadapp&value=assetdevic&uniqueid=${row.assetuid}`)
+            }
+        },
         indexMethod(index) {
             return (this.page - 1) * this.size + index + 1
         },
@@ -248,7 +262,7 @@ export default {
                 sbxh: this.row.sbxh || '--',
                 brand: this.row.brand || '--',
                 location: this.location,
-                classstructureid: this.row.classstructureid
+                classstructureid: this.row.classstructureid,
                 // type_code: this.row.type_code
             }
             // if (this.floorChange) {
@@ -260,15 +274,15 @@ export default {
             let data = {
                 plazaId: this.plazaId,
                 page: this.pageDetail,
-                size: this.sizeDetail
+                size: this.sizeDetail,
             }
             if (this.floorStr) {
                 postParams.floor = this.floorStr
             }
-            if (this.sbglgsStr) {
+            if (this.sbglgsStr && this.sbglgsStr != '全部') {
                 postParams.sbglgs = this.sbglgsStr
             }
-            if (this.statusStr) {
+            if (this.statusStr && this.statusStr != '全部') {
                 postParams.sb_status = this.statusStr
             }
 
@@ -315,7 +329,7 @@ export default {
                 }
             }
 
-            queryHxsbDetail({ data, postParams }).then(res => {
+            queryHxsbDetail({ data, postParams }).then((res) => {
                 //console.log('钻取表', res)
                 this.loadingDetail = false
                 this.detailData = res.data.data ? res.data.data : []
@@ -328,56 +342,53 @@ export default {
                 {
                     columnName: { sbglgs: 'sbglgs', sb_status: 'sb_status' },
                     params: {
-                        type_code: this.row.type_code
+                        type_code: this.row.type_code,
                     },
-                    tableName: 'sms_asset'
-                }
+                    tableName: 'sms_asset',
+                },
             ]
             let data = {
-                plazaId: this.plazaId
+                plazaId: this.plazaId,
             }
-            querySelect({ data, postParams }).then(res => {
+            querySelect({ data, postParams }).then((res) => {
                 //console.log('管理归属', res)
                 if (res.data.data) {
                     let sb_status = [],
+                        arr = [],
+                        arr1 = [],
                         sbglgs = []
                     this.sb_status = []
-                    this.sb_status.push({
-                        id: '',
-                        name: '全部'
-                    })
+                    this.sbglgs = []
                     sb_status = res.data.data.sms_asset ? res.data.data.sms_asset.sb_status : []
                     sbglgs = res.data.data.sms_asset ? res.data.data.sms_asset.sbglgs : []
                     if (sb_status.length > 0) {
-                        sb_status.forEach(el => {
+                        sb_status.forEach((el) => {
                             let obj = {
                                 id: el.key,
-                                name: el.value
+                                name: el.value,
                             }
-                            this.sb_status.push(obj)
+                            arr1.push(obj)
                         })
                     }
-                    this.sbglgs = []
-                    this.sbglgs.push({
-                        name: '全部',
-                        id: ''
-                    })
+                    this.sb_status = this.allArr.concat(arr1)
+
                     if (sbglgs.length > 0) {
-                        sbglgs.forEach(el => {
+                        sbglgs.forEach((el) => {
                             let obj = {
                                 id: el.key,
-                                name: el.value
+                                name: el.value,
                             }
-                            this.sbglgs.push(obj)
+                            arr.push(obj)
                         })
                     }
                 }
+                this.sbglgs = this.allArr.concat(arr)
             })
         },
         confirm() {
             this.queryDetail()
-        }
-    }
+        },
+    },
 }
 </script>
 <style lang="less" scoped>
@@ -438,5 +449,8 @@ export default {
     .el-table th {
         padding: 8px 0;
     }
+    /deep/.el-table tr {
+        cursor: pointer;
+    }
 }
 </style>

+ 31 - 31
src/views/room/index.vue

@@ -474,8 +474,8 @@ export default {
             allArr: [
                 {
                     id: '全部',
-                    name: '全部'
-                }
+                    name: '全部',
+                },
             ],
             //
             total2: 0,
@@ -495,7 +495,7 @@ export default {
             isReplaceData: [
                 { id: '全部', name: '全部' },
                 { id: '1', name: '是' },
-                { id: '0', name: '否' }
+                { id: '0', name: '否' },
             ],
             sfghSelect: '全部',
             sbmcInput4: '',
@@ -526,7 +526,7 @@ export default {
             ycgdtbsj: '',
             ycgdyssj: '',
             smsxtArr: {},
-            type: ''
+            type: '',
         }
     },
     components: {
@@ -534,10 +534,10 @@ export default {
         roomTable2,
         roomTable3,
         roomTable4,
-        roomTable5
+        roomTable5,
     },
     computed: {
-        ...mapGetters(['floorSelect', 'plazaId'])
+        ...mapGetters(['floorSelect', 'plazaId']),
     },
     methods: {
         handleClick(tab) {
@@ -569,12 +569,12 @@ export default {
                 location: this.location,
                 module: '1002',
                 // system: system,
-                plazaId: this.plazaId
+                plazaId: this.plazaId,
             }
             if (system) {
                 getParams.system = system
             }
-            queryPic({ getParams }).then(res => {
+            queryPic({ getParams }).then((res) => {
                 //console.log('机房布置图', res)
                 this.tableImg = res.data ? res.data : []
                 //判断有没有图片,有图片默认显示按钮是第一个tab,没有图片显示的是第二个tab
@@ -595,7 +595,7 @@ export default {
                 location: this.location,
                 plazaId: this.plazaId,
                 page: this.page1,
-                size: this.size1
+                size: this.size1,
             }
             if (this.floor2 && this.floor2 != '全部') {
                 getParams.floor = this.floor2
@@ -628,7 +628,7 @@ export default {
                     getParams.keyword = `${this.kzhlInput}:control`
                 }
             }
-            queryDygjcxline({ getParams }).then(res => {
+            queryDygjcxline({ getParams }).then((res) => {
                 if (res.result == 'success') {
                     this.loading1 = false
                     this.total1 = res.count
@@ -642,12 +642,12 @@ export default {
         // 核心设备
         Index2() {
             let postParams = {
-                location: this.location
+                location: this.location,
             }
             let data = {
                 plazaId: this.plazaId,
                 page: this.page2,
-                size: this.size2
+                size: this.size2,
             }
             if (this.sbjcInput) {
                 if (data.keyword) {
@@ -673,7 +673,7 @@ export default {
             // if (this.floorChange) {
             //     postParams.gname = this.floorChange
             // }
-            queryHxsb({ data, postParams }).then(res => {
+            queryHxsb({ data, postParams }).then((res) => {
                 this.loading2 = false
                 this.total2 = res.data.count
                 this.table3 = res.data.data ? res.data.data : []
@@ -702,7 +702,7 @@ export default {
                 plazaId: this.plazaId,
                 page: this.page3,
                 size: this.size3,
-                orderBy: 'sjjssj,0;location,1'
+                orderBy: 'sjjssj,0;location,1',
             }
             if (this.sfghSelect && this.sfghSelect != '全部') {
                 getParams.ismodel = this.sfghSelect
@@ -741,7 +741,7 @@ export default {
                 getParams.sjjssjStartDate = this.yssjDate[0] + '000000'
                 getParams.sjjssjEndDate = this.yssjDate[1] + '000000'
             }
-            queryWxjf({ getParams }).then(res => {
+            queryWxjf({ getParams }).then((res) => {
                 //console.log('维修', res)
                 if (res.result == 'success') {
                     this.loading3 = false
@@ -758,7 +758,7 @@ export default {
                 plazaId: this.plazaId,
                 page: this.page4,
                 size: this.size4,
-                orderBy: 'wb_gzglid,0;assetnum,1;reportedby,0;'
+                orderBy: 'wb_gzglid,0;assetnum,1;reportedby,0;',
             }
             //
             // 任务开始日期
@@ -783,7 +783,7 @@ export default {
             }
             //
             // 是否正常
-            if (this.iszcSelect5 && this.iszcSelect5 != '正常') {
+            if (this.iszcSelect5 && this.iszcSelect5 != '全部') {
                 data.zt = this.iszcSelect5
             }
             // 任务状态
@@ -818,7 +818,7 @@ export default {
                     data.keyword = `${this.ycgdbhInput5}:wonum`
                 }
             }
-            queryWb({ data, postParams }).then(res => {
+            queryWb({ data, postParams }).then((res) => {
                 //console.log('维保', res)
                 this.loading4 = false
                 this.total4 = res.data.count
@@ -837,13 +837,13 @@ export default {
             let postParams = [
                 {
                     columnName: { status: 'status', zt: 'zt' },
-                    tableName: 'sms_wbzy'
-                }
+                    tableName: 'sms_wbzy',
+                },
             ]
             let data = {
-                plazaId: this.plazaId
+                plazaId: this.plazaId,
             }
-            querySelect({ data, postParams }).then(res => {
+            querySelect({ data, postParams }).then((res) => {
                 //console.log('下拉框', res)
                 let status = [],
                     zt = [],
@@ -853,20 +853,20 @@ export default {
                 status = res.data.data.sms_wbzy.status ? res.data.data.sms_wbzy.status : []
                 zt = res.data.data.sms_wbzy.zt ? res.data.data.sms_wbzy.zt : []
                 if (status.length > 0) {
-                    status.forEach(el => {
+                    status.forEach((el) => {
                         let obj = {
                             id: el.key,
-                            name: el.value
+                            name: el.value,
                         }
                         arr.push(obj)
                     })
                     this.status = this.allArr.concat(arr)
                 }
                 if (zt.length > 0) {
-                    zt.forEach(el => {
+                    zt.forEach((el) => {
                         let obj = {
                             id: el.key,
-                            name: el.value == '正常' ? '是' : '否'
+                            name: el.value == '正常' ? '是' : '否',
                         }
                         arr1.push(obj)
                     })
@@ -880,10 +880,10 @@ export default {
             let params = {
                 getParams: {
                     locationid: this.location,
-                    plazaId: this.plazaId
-                }
+                    plazaId: this.plazaId,
+                },
             }
-            querySystem(params).then(res => {
+            querySystem(params).then((res) => {
                 this.smsxtArr = res.data ? res.data[0] : {}
                 // 5201 设备间   5204设备间  5209设备间
                 this.showLocationflid = false
@@ -920,13 +920,13 @@ export default {
                 this.$router.push({ path: '/home/equipment', query: { smsxt: this.smsxtArr.smsxt } })
             }
             // }
-        }
+        },
     },
     mounted() {
         if (this.floorSelect.length > 0) {
             this.floorSelect2 = this.allArr.concat(this.floorSelect)
         }
-    }
+    },
 }
 </script>
 <style lang="less" scoped>