diff --git a/front/src/views/home/infrastructurePage.vue b/front/src/views/home/infrastructurePage.vue index f766b30a..97714e61 100644 --- a/front/src/views/home/infrastructurePage.vue +++ b/front/src/views/home/infrastructurePage.vue @@ -752,6 +752,7 @@ setSubmit, getYuyue, getSoldierList, + getMaxApplyNum, } from '@/api/home' import mybus from '@/myplugins/mybus' import dayjs from 'dayjs' @@ -1776,15 +1777,30 @@ const dept = reactive({}) // eslint-disable-next-line no-undef if (infrastructure) { - console.log('infrastructure------------>', infrastructure) - // eslint-disable-next-line no-undef dept.deptId = infrastructure.deptId || '' // eslint-disable-next-line no-undef dept.deptName = infrastructure.deptName || '' } - const apply = () => { + + // 西海岸--判断设备最大数量个数 + const judegNumber = () => { + return new Promise((resolve, reject) => { + getMaxApplyNum(selectedRowKeys.value.length).then(res => { + resolve(res) + }).catch(err => { + reject(err) + }) + }) + } + + const apply = async () => { if (selectedRowKeys.value.length != 0) { + // 判断最大数量 + let maxNumRes = await judegNumber(); + if (maxNumRes.data.code != 0) { + return message.warning(maxNumRes.data.msg) + } console.log('一键申请', selectedList.value) let arr = [ { @@ -1921,9 +1937,9 @@ }, { title: '归属', - dataIndex: 'nodeName', + dataIndex: 'managementUnitName', width: '60%', - key: 'nodeName', + key: 'managementUnitName', }, { title: '状态',