|
@@ -327,7 +327,6 @@
|
|
|
|
|
|
</template>
|
|
</template>
|
|
<script setup lang="ts">
|
|
<script setup lang="ts">
|
|
-import { IotMaintainApi, IotMaintainVO } from '@/api/pms/maintain'
|
|
|
|
import { IotDeviceApi, IotDeviceVO } from '@/api/pms/device'
|
|
import { IotDeviceApi, IotDeviceVO } from '@/api/pms/device'
|
|
import * as UserApi from '@/api/system/user'
|
|
import * as UserApi from '@/api/system/user'
|
|
import { useUserStore } from '@/store/modules/user'
|
|
import { useUserStore } from '@/store/modules/user'
|
|
@@ -609,8 +608,6 @@ const deviceChoose = async(selectedDevices) => {
|
|
list.value.push(item)
|
|
list.value.push(item)
|
|
}
|
|
}
|
|
})
|
|
})
|
|
- // 新增完设备后 查询现有设备-bom明细中 所有设备配置的负责人姓名 逗号分隔
|
|
|
|
- // await getDevicePersons();
|
|
|
|
}
|
|
}
|
|
|
|
|
|
const deviceFormRef = ref<InstanceType<typeof MainPlanDeviceList>>()
|
|
const deviceFormRef = ref<InstanceType<typeof MainPlanDeviceList>>()
|
|
@@ -812,11 +809,7 @@ onMounted(async () => {
|
|
const plan = await IotMaintenancePlanApi.getIotMaintenancePlan(id);
|
|
const plan = await IotMaintenancePlanApi.getIotMaintenancePlan(id);
|
|
deviceLabel.value = plan.deviceName
|
|
deviceLabel.value = plan.deviceName
|
|
formData.value = plan
|
|
formData.value = plan
|
|
- // 查询保养责任人
|
|
|
|
- /* const personId = formData.value.responsiblePerson ? Number(formData.value.responsiblePerson) : 0;
|
|
|
|
- UserApi.getUser(personId).then((res) => {
|
|
|
|
- formData.value.responsiblePerson = res.nickname;
|
|
|
|
- }) */
|
|
|
|
|
|
+
|
|
// 查询保养计划明细
|
|
// 查询保养计划明细
|
|
const data = await IotMaintenanceBomApi.getMainPlanBOMs(queryParams);
|
|
const data = await IotMaintenanceBomApi.getMainPlanBOMs(queryParams);
|
|
list.value = []
|
|
list.value = []
|
|
@@ -826,8 +819,7 @@ onMounted(async () => {
|
|
// 这里可以添加必要的字段转换(如果有日期等需要格式化的字段)
|
|
// 这里可以添加必要的字段转换(如果有日期等需要格式化的字段)
|
|
lastNaturalDate: item.lastNaturalDate
|
|
lastNaturalDate: item.lastNaturalDate
|
|
}))
|
|
}))
|
|
- // 同时查询所有设备的责任人
|
|
|
|
- // await getDevicePersons();
|
|
|
|
|
|
+
|
|
}
|
|
}
|
|
} else {
|
|
} else {
|
|
formType.value = 'create';
|
|
formType.value = 'create';
|
|
@@ -837,14 +829,6 @@ onMounted(async () => {
|
|
}
|
|
}
|
|
})
|
|
})
|
|
const handleDelete = async (str: string) => {
|
|
const handleDelete = async (str: string) => {
|
|
- /* try {
|
|
|
|
- const index = list.value.findIndex((item) => (item.id+'-'+item.bomNodeId) === str)
|
|
|
|
- if (index !== -1) {
|
|
|
|
- // 通过 splice 删除元素
|
|
|
|
- list.value.splice(index, 1)
|
|
|
|
- deviceIds.value = []
|
|
|
|
- }
|
|
|
|
- } catch {} */
|
|
|
|
try {
|
|
try {
|
|
const [deviceIdStr, bomNodeId] = str.split('-')
|
|
const [deviceIdStr, bomNodeId] = str.split('-')
|
|
const deviceId = parseInt(deviceIdStr)
|
|
const deviceId = parseInt(deviceIdStr)
|