diff --git a/src/api/perception-devices/construction-site.js b/src/api/perception-devices/construction-site.js index afcf36fe..ccb59000 100644 --- a/src/api/perception-devices/construction-site.js +++ b/src/api/perception-devices/construction-site.js @@ -19,5 +19,5 @@ export const editConstructionSiteDataAPI = (data) => { } // 删除接口 export const deleteConstructionSiteDataAPI = (data) => { - return request.post('/smart-site/constInfo/delData', data) + return request.post('/smart-site/constInfo/deleteData', data) } diff --git a/src/views/perception-devices/construction-site/config.js b/src/views/perception-devices/construction-site/config.js index 645566d0..2355ce85 100644 --- a/src/views/perception-devices/construction-site/config.js +++ b/src/views/perception-devices/construction-site/config.js @@ -1,6 +1,6 @@ export const formLabel = [ { f_label: '搜索关键词', f_model: 'keyWord', f_type: 'ipt', isShow: false }, - { f_label: '设备类型', f_model: 'deviceType', f_type: 'sel', isShow: false }, + { f_label: '设备类型', f_model: 'typeId', f_type: 'sel', isShow: false, f_selList: [] }, ] export const columnsList = [ { t_props: 'name', t_label: '施工信息' }, diff --git a/src/views/perception-devices/construction-site/index.vue b/src/views/perception-devices/construction-site/index.vue index cbc19829..be2dbce3 100644 --- a/src/views/perception-devices/construction-site/index.vue +++ b/src/views/perception-devices/construction-site/index.vue @@ -54,6 +54,7 @@ import { getConstructionSiteListAPI, deleteConstructionSiteDataAPI, } from '@/api/perception-devices/construction-site.js' +import { getDeviceTypeAPI } from '@/api/common.js' export default { components: { TableModel, @@ -135,6 +136,22 @@ export default { } this.dialogConfig.outerVisible = false }, + + // 获取设备类型 + async getDeviceTypeData() { + const { data: res } = await getDeviceTypeAPI() + const typeList = res.map((e) => { + return { + label: e.typeName, + value: e.id, + } + }) + + this.formLabel[1].f_selList = typeList + }, + }, + created() { + this.getDeviceTypeData() }, }