|
@@ -55,8 +55,7 @@
|
|
|
v-model='wzjc'
|
|
|
></el-input>
|
|
|
<!-- 多余的筛选 -->
|
|
|
- <!-- 注释 -->
|
|
|
- <!-- <input-dialog :type='1' @confirm='confirm'></input-dialog> -->
|
|
|
+ <input-dialog :type='1' @confirm='confirm'></input-dialog>
|
|
|
</div>
|
|
|
<div class='table1'>
|
|
|
<el-table
|
|
@@ -65,7 +64,7 @@
|
|
|
:key='key'
|
|
|
:border='true'
|
|
|
style='width: 100%;'
|
|
|
- :height='160'
|
|
|
+ :height='145'
|
|
|
:max-height='250'
|
|
|
:row-style='{height: "30px"}'
|
|
|
>
|
|
@@ -76,6 +75,7 @@
|
|
|
<el-table-column prop='assetnum' label='设备内码' show-overflow-tooltip resizable width='80'>
|
|
|
<template slot-scope='{row}'>{{row.assetnum || '--'}}</template>
|
|
|
</el-table-column>
|
|
|
+ <!-- 注释数量列 -->
|
|
|
<!-- <el-table-column prop='sl' label='数量' width='60'>
|
|
|
<template slot-scope='{row}'>{{row.sl>=0?row.sl:'--'}}</template>
|
|
|
</el-table-column>-->
|
|
@@ -127,16 +127,26 @@
|
|
|
<div class='table-bottom'>
|
|
|
<div class='title'>
|
|
|
<div class='text'>维保:</div>
|
|
|
- <div class='d-tab d-tab-left' :class='{active:currentTab === 1}' @click='()=> currentTab = 1'>重要维保</div>
|
|
|
- <div class='d-tab d-tab-right' :class='{active:currentTab === 2}' @click='()=> currentTab = 2'>日常维保</div>
|
|
|
+ <div class='d-tab d-tab-left' :class='{active:currentTab === 0}' @click='changeTab(0)'>重要维保</div>
|
|
|
+ <div class='d-tab d-tab-right' :class='{active:currentTab === 1}' @click='changeTab(1)'>日常维保</div>
|
|
|
<div class='text text-r'>维修:</div>
|
|
|
- <div class='d-tab d-tab-left' :class='{active:currentTab === 3}' @click='()=> currentTab = 3'>重要维修</div>
|
|
|
- <div class='d-tab d-tab-right' :class='{active:currentTab === 4}' @click='()=> currentTab = 4'>日常维修</div>
|
|
|
+ <div class='d-tab d-tab-left' :class='{active:currentTab === 2}' @click='changeTab(2)'>重要维修</div>
|
|
|
+ <div class='d-tab d-tab-right' :class='{active:currentTab === 3}' @click='changeTab(3)'>日常维修</div>
|
|
|
<!-- <el-tabs v-model='activeName' class='tab2' @tab-click='changeTable'> -->
|
|
|
</div>
|
|
|
<!-- TODO: 显示各个表格 -->
|
|
|
<div class='table2-container'>
|
|
|
- <wbTable ref='wb1' :smsxt='1004' tabLabel='重要维保' diff :assetnum='11266' :size='3' />
|
|
|
+ <component
|
|
|
+ :is='currentComponent'
|
|
|
+ :ref='currentComponent'
|
|
|
+ :smsxt='rowData.system_code'
|
|
|
+ :tabLabel='tabLabel[currentComponent]'
|
|
|
+ :diff='diff'
|
|
|
+ :assetnum='rowData.assetnum'
|
|
|
+ :size='3'
|
|
|
+ ></component>
|
|
|
+ <!-- :max-height='220' -->
|
|
|
+ <!-- <wbTable ref='wb1' :smsxt='1004' tabLabel='重要维保' diff :assetnum='11266' :size='3' /> -->
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
@@ -148,6 +158,10 @@ import { queryAsset } from '@/api/equipmentList.js'
|
|
|
import { querySelect } from '@/api/public.js'
|
|
|
import inputDialog from './inputDIalog'
|
|
|
import wbTable from './wbTable'
|
|
|
+import rcwbTable from './rcwbTable'
|
|
|
+import wxTable from './wxTable'
|
|
|
+import rcwxTable from './rcwxTable'
|
|
|
+import { cloneDeep } from '../../../components/Select/utils'
|
|
|
|
|
|
export default {
|
|
|
data() {
|
|
@@ -175,14 +189,21 @@ export default {
|
|
|
statusOption: [],
|
|
|
floorAllSelect: [],
|
|
|
key: 0,
|
|
|
- currentTab: 1,
|
|
|
+ currentTab: 0, //选中页签,默认重要维保
|
|
|
+ currentComponent: 'wbTable', //选中的组件,默认 重要维保
|
|
|
+ componentArr: ['wbTable', 'rcwbTable', 'wxTable', 'rcwxTable'], //下部表格组件列表
|
|
|
+ tabLabel: {
|
|
|
+ //下部表格组件列表使用label
|
|
|
+ wbTable: '重要维保',
|
|
|
+ rcwbTable: '日常维保',
|
|
|
+ wxTable: '重要维修',
|
|
|
+ rcwxTable: '日常维保',
|
|
|
+ },
|
|
|
+ diff: '', //?
|
|
|
+ rowData: {}, //行数据,供下部表格使用参数
|
|
|
}
|
|
|
},
|
|
|
- components: {
|
|
|
- Select,
|
|
|
- inputDialog,
|
|
|
- wbTable,
|
|
|
- },
|
|
|
+ components: { Select, inputDialog, wbTable, rcwbTable, wxTable, rcwxTable },
|
|
|
computed: {
|
|
|
...mapGetters(['floorSelect']),
|
|
|
},
|
|
@@ -193,8 +214,15 @@ export default {
|
|
|
this.getFloorAllSelect()
|
|
|
},
|
|
|
methods: {
|
|
|
+ // 上部表格行点击
|
|
|
innerTable(row) {
|
|
|
console.log(row)
|
|
|
+ // 设置下部表格使用的行数据
|
|
|
+ this.rowData = cloneDeep(row)
|
|
|
+ // TODO:
|
|
|
+ this.$nextTick(() => {
|
|
|
+ this.$refs[this.currentComponent].startMethods()
|
|
|
+ })
|
|
|
if (row.assetuid) {
|
|
|
window.open(`http://gcgl.wanda.cn/maximo/ui/?event=loadapp&value=assetdevic&uniqueid=${row.assetuid}`)
|
|
|
}
|
|
@@ -343,6 +371,12 @@ export default {
|
|
|
this.tableData = res.data.data
|
|
|
this.total = res.data.count
|
|
|
this.key++
|
|
|
+ // 设置下部表格使用的行数据
|
|
|
+ if (this.tableData[0]) {
|
|
|
+ this.rowData = cloneDeep(this.tableData[0])
|
|
|
+ } else {
|
|
|
+ this.rowData = {}
|
|
|
+ }
|
|
|
})
|
|
|
},
|
|
|
getFloorAllSelect() {
|
|
@@ -361,8 +395,13 @@ export default {
|
|
|
this.page = 1
|
|
|
}
|
|
|
},
|
|
|
- handleClickWb() {},
|
|
|
- changeTable() {},
|
|
|
+ // 更改tab页签
|
|
|
+ changeTab(index) {
|
|
|
+ this.currentTab = index
|
|
|
+ this.currentComponent = this.componentArr[index]
|
|
|
+ // TODO:
|
|
|
+ this.$refs[currentComponent].startMethods()
|
|
|
+ },
|
|
|
},
|
|
|
watch: {
|
|
|
row: {
|