diff --git a/src/api/EquipmentLedger/equ-out.js b/src/api/EquipmentLedger/equ-out.js index ec6d9577..b36115ea 100644 --- a/src/api/EquipmentLedger/equ-out.js +++ b/src/api/EquipmentLedger/equ-out.js @@ -43,3 +43,11 @@ export const addProjectOutAPI = (data) => { data: data, }) } + +// 获取省份 +export const getProvinceListAPI = () => { + return request({ + url: '/material-mall/cnarea/provinces', + method: 'GET', + }) +} \ No newline at end of file diff --git a/src/views/EquipmentEntryApply/EquipmentDetailList.vue b/src/views/EquipmentEntryApply/EquipmentDetailList.vue index be3467ae..c8a8b2e7 100644 --- a/src/views/EquipmentEntryApply/EquipmentDetailList.vue +++ b/src/views/EquipmentEntryApply/EquipmentDetailList.vue @@ -248,14 +248,14 @@ 编辑 删除 diff --git a/src/views/EquipmentEntryApply/equipmentInput/add.vue b/src/views/EquipmentEntryApply/equipmentInput/add.vue index 455852d7..f5754b72 100644 --- a/src/views/EquipmentEntryApply/equipmentInput/add.vue +++ b/src/views/EquipmentEntryApply/equipmentInput/add.vue @@ -198,10 +198,10 @@ - + 编辑 删除 diff --git a/src/views/EquipmentLedger/details.vue b/src/views/EquipmentLedger/details.vue index 82b5fa4c..f642544c 100644 --- a/src/views/EquipmentLedger/details.vue +++ b/src/views/EquipmentLedger/details.vue @@ -59,7 +59,7 @@ - + @@ -101,6 +101,11 @@ + + + + +
diff --git a/src/views/EquipmentLedger/index.vue b/src/views/EquipmentLedger/index.vue index 3d5ec81c..f0aae7b1 100644 --- a/src/views/EquipmentLedger/index.vue +++ b/src/views/EquipmentLedger/index.vue @@ -84,9 +84,9 @@ - + @@ -752,7 +752,8 @@ import { getManufacturerSelectApi } from '@/api/EquipmentLedger/index.js' import { firstLevel, secondAndThirdLevel } from '@/api/EquipmentEntryApply' -import { getMaxFeatureAPI } from '@/api/EquipmentLedger/equ-out.js' +import { getMaxFeatureAPI, getProvinceListAPI } from '@/api/EquipmentLedger/equ-out.js' +import { deptTreeSelect } from '@/api/system/user' export default { name: 'EquipmentLedger', @@ -765,7 +766,7 @@ export default { // 查询参数 queryParams: { province: undefined, // 省份 - propertyUnit: undefined, // 产权单位 + propertyUnitId: undefined, // 产权单位 name: undefined, // 装备名称 specificationModel: undefined, // 规格型号 major: undefined, // 专业 @@ -901,6 +902,29 @@ export default { } }, methods: { + // 获取省份 + getProvinceList() { + getProvinceListAPI().then((res) => { + this.provinceList = res.data + }) + }, + // 获取产权单位 + getDeptTreeSelect() { + deptTreeSelect().then((res) => { + this.propertyUnitList = this.filterTree(res.data) + console.log('🚀 ~ getDeptTreeSelect ~ this.propertyUnitList:', this.propertyUnitList) + }) + }, + filterTree(nodes) { + return nodes + .map(node => { + if (node.children) { + node.children = this.filterTree(node.children) + } + return node + }) + .filter(node => node.status !== '1') + }, // 获取厂家 getManufacturerSelectList() { getManufacturerSelectApi().then((res) => { @@ -1340,8 +1364,10 @@ export default { }, async created() { + this.getProvinceList() this.getFirstLevel() this.getManufacturerSelectList() + this.getDeptTreeSelect() // 并行加载初始数据 await Promise.all([this.getDeviceTree(), this.getDeviceStatusCount()]) // 最后加载列表数据 diff --git a/src/views/EquipmentRetire/index.vue b/src/views/EquipmentRetire/index.vue index d86d42f2..18256299 100644 --- a/src/views/EquipmentRetire/index.vue +++ b/src/views/EquipmentRetire/index.vue @@ -80,11 +80,11 @@ - - - + + + - +