物资类型排序
This commit is contained in:
parent
5f43342bbc
commit
2db82be6a0
|
|
@ -90,7 +90,7 @@
|
|||
/>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="类型规格" prop="deviceType">
|
||||
<el-form-item label="类型规格xx" prop="deviceType">
|
||||
<el-row :gutter="10">
|
||||
<el-col :span="15">
|
||||
<el-select
|
||||
|
|
@ -586,6 +586,7 @@ export default {
|
|||
this.equipmentTypeList = response.data;
|
||||
// 处理并扁平化所有类型数据
|
||||
this.flattenTypeOptions = this.processTypeData(response.data);
|
||||
debugger
|
||||
// 初始显示所有选项
|
||||
this.filteredOptions = [...this.flattenTypeOptions];
|
||||
|
||||
|
|
@ -612,7 +613,8 @@ export default {
|
|||
maTypeName: parents[parents.length - 1] || '',
|
||||
specificationType: node.typeName,
|
||||
unitName: node.unitName,
|
||||
unitValue: node.unitValue
|
||||
unitValue: node.unitValue,
|
||||
maxSortPriority: node.maxSortPriority
|
||||
});
|
||||
}
|
||||
|
||||
|
|
@ -622,6 +624,10 @@ export default {
|
|||
};
|
||||
|
||||
data.forEach(node => traverse(node));
|
||||
|
||||
// 根据Api接口返回的Node节点中的 maxSortPriority字段 进行从大到小的排序
|
||||
result.sort((a, b) => b.maxSortPriority - a.maxSortPriority);
|
||||
|
||||
return result;
|
||||
},
|
||||
// 搜索处理函数
|
||||
|
|
|
|||
Loading…
Reference in New Issue