iot设备绑定记录接口调试完成

This commit is contained in:
BianLzhaoMin 2024-08-05 17:02:58 +08:00
parent 2f62f9f2ed
commit 5a98e03656
3 changed files with 15 additions and 8 deletions

View File

@ -19,7 +19,7 @@ export function getDeviceListApi(query) {
// 查询绑定记录 // 查询绑定记录
export function getDeviceBindRecordApi(query) { export function getDeviceBindRecordApi(query) {
return request({ return request({
url: '/material/xxxx', url: '/material/iotMachine/getRecordList',
method: 'get', method: 'get',
params: query params: query
}) })

View File

@ -11,10 +11,10 @@ export const dialogConfig = {
], ],
columnsList: [ columnsList: [
{ t_width: '', t_props: 'machineTypeName', t_label: '绑定设备名称' }, { t_props: 'typeName', t_label: '绑定设备名称' },
{ t_width: '', t_props: 'specificationType', t_label: '设备编号' }, { t_props: 'maCode', t_label: '设备编号' },
{ t_width: '', t_props: 'maCode', t_label: '绑定时间' }, { t_props: 'bindTime', t_label: '绑定时间' },
{ t_width: '', t_props: 'scrapNum', t_label: '解绑时间' }, { t_props: 'unBindTime', t_label: '解绑时间' },
], ],
} }

View File

@ -78,7 +78,7 @@
<el-button <el-button
type="text" type="text"
icon="el-icon-tickets" icon="el-icon-tickets"
@click="handleViewRecord()" @click="handleViewRecord(row.iotId)"
>记录</el-button >记录</el-button
> >
<el-button <el-button
@ -161,6 +161,7 @@
<TableModel <TableModel
:config="dialogConfig" :config="dialogConfig"
:sendParams="sendParams" :sendParams="sendParams"
:sendApi="getDeviceBindRecordApi"
v-else v-else
/> />
</template> </template>
@ -177,6 +178,7 @@ import {
getDeviceListApi, getDeviceListApi,
deleteDeviceApi, deleteDeviceApi,
unbindDeviceApi, unbindDeviceApi,
getDeviceBindRecordApi,
} from '@/api/iotDevice' } from '@/api/iotDevice'
export default { export default {
components: { components: {
@ -220,9 +222,13 @@ export default {
], ],
}, },
// //
sendParams: {}, sendParams: {
iotId: '',
},
// //
selectList: [], selectList: [],
// Api
getDeviceBindRecordApi,
} }
}, },
@ -284,9 +290,10 @@ export default {
}, },
/** 查看记录 */ /** 查看记录 */
handleViewRecord() { handleViewRecord(id) {
this.dialogConfig.outerWidth = '70%' this.dialogConfig.outerWidth = '70%'
this.dialogConfig.outerTitle = '绑定记录' this.dialogConfig.outerTitle = '绑定记录'
this.sendParams.iotId = id
this.dialogConfig.outerVisible = true this.dialogConfig.outerVisible = true
}, },