diff --git a/sgzb-ui/src/api/iotDevice/index.js b/sgzb-ui/src/api/iotDevice/index.js index 4c4003cf..ea4d130c 100644 --- a/sgzb-ui/src/api/iotDevice/index.js +++ b/sgzb-ui/src/api/iotDevice/index.js @@ -19,7 +19,7 @@ export function getDeviceListApi(query) { // 查询绑定记录 export function getDeviceBindRecordApi(query) { return request({ - url: '/material/xxxx', + url: '/material/iotMachine/getRecordList', method: 'get', params: query }) diff --git a/sgzb-ui/src/views/iotDevice/config.js b/sgzb-ui/src/views/iotDevice/config.js index 70cb8ce4..1ecf2392 100644 --- a/sgzb-ui/src/views/iotDevice/config.js +++ b/sgzb-ui/src/views/iotDevice/config.js @@ -11,10 +11,10 @@ export const dialogConfig = { ], columnsList: [ - { t_width: '', t_props: 'machineTypeName', t_label: '绑定设备名称' }, - { t_width: '', t_props: 'specificationType', t_label: '设备编号' }, - { t_width: '', t_props: 'maCode', t_label: '绑定时间' }, - { t_width: '', t_props: 'scrapNum', t_label: '解绑时间' }, + { t_props: 'typeName', t_label: '绑定设备名称' }, + { t_props: 'maCode', t_label: '设备编号' }, + { t_props: 'bindTime', t_label: '绑定时间' }, + { t_props: 'unBindTime', t_label: '解绑时间' }, ], } \ No newline at end of file diff --git a/sgzb-ui/src/views/iotDevice/index.vue b/sgzb-ui/src/views/iotDevice/index.vue index bcab24dd..222dc43c 100644 --- a/sgzb-ui/src/views/iotDevice/index.vue +++ b/sgzb-ui/src/views/iotDevice/index.vue @@ -78,7 +78,7 @@ 记录 @@ -177,6 +178,7 @@ import { getDeviceListApi, deleteDeviceApi, unbindDeviceApi, + getDeviceBindRecordApi, } from '@/api/iotDevice' export default { components: { @@ -220,9 +222,13 @@ export default { ], }, // 查看绑定记录时的参数 - sendParams: {}, + sendParams: { + iotId: '', + }, // 复选框选中的数据 selectList: [], + // 绑定记录Api + getDeviceBindRecordApi, } }, @@ -284,9 +290,10 @@ export default { }, /** 查看记录 */ - handleViewRecord() { + handleViewRecord(id) { this.dialogConfig.outerWidth = '70%' this.dialogConfig.outerTitle = '绑定记录' + this.sendParams.iotId = id this.dialogConfig.outerVisible = true },