fix(dms):修复设备类型和供应商ID匹配问题

- 将设备类型和供应商ID转换为字符串进行匹配
- 注释掉保养标签的显示
- 修复设备类型名称获取逻辑
master
zangch@mesnac.com 4 months ago
parent b334123217
commit 637223517a

@ -268,7 +268,7 @@
v-for="item in deviceTypes"
:key="item.deviceTypeId"
:label="item.deviceTypeName"
:value="item.deviceTypeId"
:value="String(item.deviceTypeId)"
/>
</el-select>
</el-form-item>
@ -288,7 +288,7 @@
v-for="item in supplierInfoList"
:key="item.supplierId"
:label="item.supplierName"
:value="item.supplierId"
:value="String(item.supplierId)"
/>
</el-select>
</el-form-item>
@ -999,7 +999,7 @@ const getMachineIcon = (type) => {
//
const getDeviceTypeName = (typeId) => {
const type = deviceTypes.value.find(t => t.deviceTypeId === typeId);
const type = deviceTypes.value.find(t => String(t.deviceTypeId) === String(typeId));
return type?.deviceTypeName || '-';
};
@ -1082,6 +1082,10 @@ const handleUpdate = async (row?: ProdBaseMachineInfoVO) => {
const res = await getDmsBaseMachineInfo(_machineId);
Object.assign(form.value, res.data);
// ID
form.value.machineType = res.data.machineType != null ? String(res.data.machineType) : undefined;
form.value.supplierId = res.data.supplierId != null ? String(res.data.supplierId) : undefined;
// -
if (res.data.ossId && res.data.photoAddress) {
const ossIdArray = res.data.ossId.split(',');
@ -1304,7 +1308,7 @@ const loadLifecycleData = async () => {
time: maint.planBeginTime || maint.createTime,
icon: markRaw(Tools),
color: '#4facfe',
tags: ['保养', getMaintLevelLabel(maint.maintLevel)],
// tags: ['', getMaintLevelLabel(maint.maintLevel)],
details: [
{ label: '保养单号', value: maint.billsMaintCode },
{ label: '保养级别', value: maint.maintLevel, dictOptions: maint_level?.value },

Loading…
Cancel
Save