物资类型排序

This commit is contained in:
syruan 2025-02-18 17:32:20 +08:00 committed by syruan
parent 5f43342bbc
commit 2db82be6a0
1 changed files with 14 additions and 8 deletions

View File

@ -90,7 +90,7 @@
/> />
</el-form-item> </el-form-item>
<el-form-item label="类型规格" prop="deviceType"> <el-form-item label="类型规格xx" prop="deviceType">
<el-row :gutter="10"> <el-row :gutter="10">
<el-col :span="15"> <el-col :span="15">
<el-select <el-select
@ -586,6 +586,7 @@ export default {
this.equipmentTypeList = response.data; this.equipmentTypeList = response.data;
// //
this.flattenTypeOptions = this.processTypeData(response.data); this.flattenTypeOptions = this.processTypeData(response.data);
debugger
// //
this.filteredOptions = [...this.flattenTypeOptions]; this.filteredOptions = [...this.flattenTypeOptions];
@ -612,7 +613,8 @@ export default {
maTypeName: parents[parents.length - 1] || '', maTypeName: parents[parents.length - 1] || '',
specificationType: node.typeName, specificationType: node.typeName,
unitName: node.unitName, unitName: node.unitName,
unitValue: node.unitValue unitValue: node.unitValue,
maxSortPriority: node.maxSortPriority
}); });
} }
@ -622,6 +624,10 @@ export default {
}; };
data.forEach(node => traverse(node)); data.forEach(node => traverse(node));
// ApiNode maxSortPriority
result.sort((a, b) => b.maxSortPriority - a.maxSortPriority);
return result; return result;
}, },
// //