|
@@ -33,72 +33,126 @@
|
|
/>
|
|
/>
|
|
<el-button type="primary" size="mini" style="float: right;" @click="search">查询</el-button>
|
|
<el-button type="primary" size="mini" style="float: right;" @click="search">查询</el-button>
|
|
</div>
|
|
</div>
|
|
- <el-table
|
|
|
|
- :data="deviceData"
|
|
|
|
- style="width: 100%"
|
|
|
|
- >
|
|
|
|
- <el-table-column
|
|
|
|
- label="设备安装时间"
|
|
|
|
- prop="gmtCreated"
|
|
|
|
- />
|
|
|
|
- <el-table-column
|
|
|
|
- label="设备编号"
|
|
|
|
- prop="deviceCode"
|
|
|
|
- />
|
|
|
|
- <el-table-column
|
|
|
|
- label="设备尺寸"
|
|
|
|
- prop="deviceSize"
|
|
|
|
- />
|
|
|
|
- <el-table-column
|
|
|
|
- label="设备型号"
|
|
|
|
- prop="deviceType"
|
|
|
|
- />
|
|
|
|
- <el-table-column
|
|
|
|
- label="设备地区"
|
|
|
|
- prop="region"
|
|
|
|
- />
|
|
|
|
- <el-table-column
|
|
|
|
- label="设备地址"
|
|
|
|
- prop="address"
|
|
|
|
- />
|
|
|
|
- <el-table-column
|
|
|
|
- align="right"
|
|
|
|
|
|
+ <div v-show="type === '2' || type === '1,2' || type === '2,1'">
|
|
|
|
+ <el-table
|
|
|
|
+ :data="deviceData"
|
|
|
|
+ style="width: 100%"
|
|
|
|
+ >
|
|
|
|
+ <el-table-column
|
|
|
|
+ label="设备安装时间"
|
|
|
|
+ prop="gmtCreated"
|
|
|
|
+ />
|
|
|
|
+ <el-table-column
|
|
|
|
+ label="设备编号"
|
|
|
|
+ prop="deviceCode"
|
|
|
|
+ />
|
|
|
|
+ <el-table-column
|
|
|
|
+ label="设备尺寸"
|
|
|
|
+ prop="deviceSize"
|
|
|
|
+ />
|
|
|
|
+ <el-table-column
|
|
|
|
+ label="设备型号"
|
|
|
|
+ prop="deviceType"
|
|
|
|
+ />
|
|
|
|
+ <el-table-column
|
|
|
|
+ label="设备地区"
|
|
|
|
+ prop="region"
|
|
|
|
+ />
|
|
|
|
+ <el-table-column
|
|
|
|
+ label="设备地址"
|
|
|
|
+ prop="address"
|
|
|
|
+ />
|
|
|
|
+ <el-table-column
|
|
|
|
+ label="状态"
|
|
|
|
+ >
|
|
|
|
+ <template slot-scope="scope">
|
|
|
|
+ <span>
|
|
|
|
+ {{ scope.row.status === 'UNNORMAL' ? '不正常' : '正常' }}
|
|
|
|
+ </span>
|
|
|
|
+ </template>
|
|
|
|
+ </el-table-column>
|
|
|
|
+ <el-table-column
|
|
|
|
+ align="right"
|
|
|
|
+ >
|
|
|
|
+ <template slot-scope="scope">
|
|
|
|
+ <el-button
|
|
|
|
+ size="mini"
|
|
|
|
+ style="float: left; margin: 0 10px 0 0;"
|
|
|
|
+ @click="handleMaintainMessage(scope.$index, scope.row)"
|
|
|
|
+ >
|
|
|
|
+ 维护信息
|
|
|
|
+ </el-button>
|
|
|
|
+ <el-button
|
|
|
|
+ v-show="scope.row.status === 'UNNORMAL'"
|
|
|
|
+ size="mini"
|
|
|
|
+ style="float: left; margin: 0 10px 0 0;"
|
|
|
|
+ type="danger"
|
|
|
|
+ @click="handleMaintain(scope.$index, scope.row)"
|
|
|
|
+ >
|
|
|
|
+ 立即维护
|
|
|
|
+ </el-button>
|
|
|
|
+ </template>
|
|
|
|
+ </el-table-column>
|
|
|
|
+ </el-table>
|
|
|
|
+ </div>
|
|
|
|
+ <div v-show="type === '0'">
|
|
|
|
+ <el-table
|
|
|
|
+ :data="deviceData"
|
|
|
|
+ style="width: 100%"
|
|
>
|
|
>
|
|
- <template slot-scope="scope">
|
|
|
|
- <el-button
|
|
|
|
- v-show="type === '0'"
|
|
|
|
- size="mini"
|
|
|
|
- style="float: left; margin: 0 10px 0 0;"
|
|
|
|
- @click="handleInstall(scope.$index, scope.row)"
|
|
|
|
- >
|
|
|
|
- 安装信息
|
|
|
|
- </el-button>
|
|
|
|
- <el-button
|
|
|
|
- size="mini"
|
|
|
|
- style="float: left; margin: 0 10px 0 0;"
|
|
|
|
- @click="handleMaintainMessage(scope.$index, scope.row)"
|
|
|
|
- >
|
|
|
|
- 维护信息
|
|
|
|
- </el-button>
|
|
|
|
- <el-button
|
|
|
|
- v-show="type === '2' || type === '1,2' || type === '2,1'"
|
|
|
|
- size="mini"
|
|
|
|
- style="float: left; margin: 0 10px 0 0;"
|
|
|
|
- @click="handleMaintain(scope.$index, scope.row)"
|
|
|
|
- >
|
|
|
|
- 立即维护
|
|
|
|
- </el-button>
|
|
|
|
- <el-button
|
|
|
|
- v-show="type === '0'"
|
|
|
|
- size="mini"
|
|
|
|
- style="float: left; margin: 0 10px 0 0;"
|
|
|
|
- @click="handleUse(scope.$index, scope.row)"
|
|
|
|
- >
|
|
|
|
- 使用日志
|
|
|
|
- </el-button>
|
|
|
|
- </template>
|
|
|
|
- </el-table-column>
|
|
|
|
- </el-table>
|
|
|
|
|
|
+ <el-table-column
|
|
|
|
+ label="设备安装时间"
|
|
|
|
+ prop="gmtCreated"
|
|
|
|
+ />
|
|
|
|
+ <el-table-column
|
|
|
|
+ label="设备编号"
|
|
|
|
+ prop="deviceCode"
|
|
|
|
+ />
|
|
|
|
+ <el-table-column
|
|
|
|
+ label="设备尺寸"
|
|
|
|
+ prop="deviceSize"
|
|
|
|
+ />
|
|
|
|
+ <el-table-column
|
|
|
|
+ label="设备型号"
|
|
|
|
+ prop="deviceType"
|
|
|
|
+ />
|
|
|
|
+ <el-table-column
|
|
|
|
+ label="设备地区"
|
|
|
|
+ prop="region"
|
|
|
|
+ />
|
|
|
|
+ <el-table-column
|
|
|
|
+ label="设备地址"
|
|
|
|
+ prop="address"
|
|
|
|
+ />
|
|
|
|
+ <el-table-column
|
|
|
|
+ align="right"
|
|
|
|
+ >
|
|
|
|
+ <template slot-scope="scope">
|
|
|
|
+ <el-button
|
|
|
|
+ size="mini"
|
|
|
|
+ style="float: left; margin: 0 10px 0 0;"
|
|
|
|
+ @click="handleInstall(scope.$index, scope.row)"
|
|
|
|
+ >
|
|
|
|
+ 安装信息
|
|
|
|
+ </el-button>
|
|
|
|
+ <el-button
|
|
|
|
+ size="mini"
|
|
|
|
+ style="float: left; margin: 0 10px 0 0;"
|
|
|
|
+ @click="handleMaintainMessage(scope.$index, scope.row)"
|
|
|
|
+ >
|
|
|
|
+ 维护信息
|
|
|
|
+ </el-button>
|
|
|
|
+ <el-button
|
|
|
|
+ size="mini"
|
|
|
|
+ style="float: left; margin: 0 10px 0 0;"
|
|
|
|
+ @click="handleUse(scope.$index, scope.row)"
|
|
|
|
+ >
|
|
|
|
+ 使用日志
|
|
|
|
+ </el-button>
|
|
|
|
+ </template>
|
|
|
|
+ </el-table-column>
|
|
|
|
+ </el-table>
|
|
|
|
+ </div>
|
|
<el-dialog :title="gridTile" :visible.sync="dialogTableVisible">
|
|
<el-dialog :title="gridTile" :visible.sync="dialogTableVisible">
|
|
<el-table :data="gridData">
|
|
<el-table :data="gridData">
|
|
<el-table-column
|
|
<el-table-column
|
|
@@ -115,19 +169,19 @@
|
|
width="60%"
|
|
width="60%"
|
|
>
|
|
>
|
|
<div class="install">
|
|
<div class="install">
|
|
- 安装日期: {{ gridData.length > 0 ? gridData[0].deviceLog.gmtCreated : '' }}
|
|
|
|
|
|
+ 安装日期: {{ gridInstallData.length > 0 ? gridInstallData[0].deviceLog.gmtCreated : '' }}
|
|
</div>
|
|
</div>
|
|
<div class="install">
|
|
<div class="install">
|
|
- 安装人员: {{ gridData.length > 0 ? gridData[0].deviceModifier.name : '' }}
|
|
|
|
|
|
+ 安装人员: {{ gridInstallData.length > 0 ? gridInstallData[0].deviceModifier.name : '' }}
|
|
</div>
|
|
</div>
|
|
<div class="install">
|
|
<div class="install">
|
|
- 安装地区: {{ gridData.length > 0 ? gridData[0].device.region : '' }}
|
|
|
|
|
|
+ 安装地区: {{ gridInstallData.length > 0 ? gridInstallData[0].device.region : '' }}
|
|
</div>
|
|
</div>
|
|
<div class="install">
|
|
<div class="install">
|
|
- 安装地址: {{ gridData.length > 0 ? gridData[0].device.address : '' }}
|
|
|
|
|
|
+ 安装地址: {{ gridInstallData.length > 0 ? gridInstallData[0].device.address : '' }}
|
|
</div>
|
|
</div>
|
|
<div class="install">
|
|
<div class="install">
|
|
- 备注信息: {{ gridData.length > 0 ? gridData[0].deviceLog.description : '' }}
|
|
|
|
|
|
+ 备注信息: {{ gridInstallData.length > 0 ? gridInstallData[0].deviceLog.description : '' }}
|
|
</div>
|
|
</div>
|
|
</el-dialog>
|
|
</el-dialog>
|
|
<el-dialog title="立即维护" :visible.sync="dialogFormVisible">
|
|
<el-dialog title="立即维护" :visible.sync="dialogFormVisible">
|
|
@@ -155,6 +209,7 @@ export default {
|
|
dialogTableVisible: false,
|
|
dialogTableVisible: false,
|
|
dialogVisible: false,
|
|
dialogVisible: false,
|
|
gridData: [],
|
|
gridData: [],
|
|
|
|
+ gridInstallData: [],
|
|
gridTile: '',
|
|
gridTile: '',
|
|
type: getType(),
|
|
type: getType(),
|
|
uid: getToken(),
|
|
uid: getToken(),
|
|
@@ -169,7 +224,8 @@ export default {
|
|
deviceCode: '',
|
|
deviceCode: '',
|
|
deviceId: '',
|
|
deviceId: '',
|
|
opType: 'MODIFIED',
|
|
opType: 'MODIFIED',
|
|
- description: ''
|
|
|
|
|
|
+ description: '',
|
|
|
|
+ status: 'NORMAL'
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
},
|
|
@@ -218,8 +274,7 @@ export default {
|
|
deviceCode: row.deviceCode,
|
|
deviceCode: row.deviceCode,
|
|
opType: 'INSTALL'
|
|
opType: 'INSTALL'
|
|
}).then(() => {
|
|
}).then(() => {
|
|
- this.gridData = this.$store.getters.logData
|
|
|
|
- // this.gridData.push(row)
|
|
|
|
|
|
+ this.gridInstallData = this.$store.getters.logData
|
|
this.dialogVisible = true
|
|
this.dialogVisible = true
|
|
})
|
|
})
|
|
},
|
|
},
|
|
@@ -260,13 +315,12 @@ export default {
|
|
opType: 'USE'
|
|
opType: 'USE'
|
|
}).then(() => {
|
|
}).then(() => {
|
|
this.gridData = this.$store.getters.logData
|
|
this.gridData = this.$store.getters.logData
|
|
- // this.gridData.push(row)
|
|
|
|
this.gridTile = '使用日志'
|
|
this.gridTile = '使用日志'
|
|
this.information = [{
|
|
this.information = [{
|
|
label: '设备连接时间',
|
|
label: '设备连接时间',
|
|
type: 'deviceLog[gmtCreated]'
|
|
type: 'deviceLog[gmtCreated]'
|
|
}, {
|
|
}, {
|
|
- label: '设备连接日期',
|
|
|
|
|
|
+ label: '设备连接用户',
|
|
type: 'deviceModifier[name]'
|
|
type: 'deviceModifier[name]'
|
|
}]
|
|
}]
|
|
this.dialogTableVisible = true
|
|
this.dialogTableVisible = true
|
|
@@ -277,7 +331,7 @@ export default {
|
|
// this.dialogTableVisible = true
|
|
// this.dialogTableVisible = true
|
|
},
|
|
},
|
|
handSolve() {
|
|
handSolve() {
|
|
- this.$store.dispatch('install/addDeviceLog', this.solveForm)
|
|
|
|
|
|
+ this.$store.dispatch('admin/addDeviceLogMaintain', this.solveForm)
|
|
this.dialogFormVisible = false
|
|
this.dialogFormVisible = false
|
|
}
|
|
}
|
|
}
|
|
}
|