物资类型排序
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
|
||||
|
|
@ -521,13 +521,13 @@ export default {
|
|||
// } else if (val && val.length == 0) {
|
||||
// this.maForm.unitId = "";
|
||||
// }
|
||||
if(val.typeKey=='fbs'){
|
||||
if(val.typeKey=='fbs'){
|
||||
this.isFileFbs=true;
|
||||
this.rules['bmFileInfos'][0].required=true;
|
||||
}else{
|
||||
}else{
|
||||
this.isFileFbs=false;
|
||||
this.rules['bmFileInfos'][0].required=false;
|
||||
}
|
||||
}
|
||||
setTimeout(()=>{
|
||||
getListProject({ unitId: this.maForm.unitId }).then((response) => {
|
||||
this.projectList = response.data;
|
||||
|
|
@ -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;
|
||||
},
|
||||
// 搜索处理函数
|
||||
|
|
@ -687,7 +693,7 @@ export default {
|
|||
this.maForm.projectId
|
||||
);
|
||||
this.equipmentList = response.data.leaseApplyDetailsList;
|
||||
// 如果 bmFileInfos有值
|
||||
// 如果 bmFileInfos有值
|
||||
if (this.maForm.bmFileInfos.length > 0) {
|
||||
this.isFileFbs = true
|
||||
}
|
||||
|
|
@ -918,7 +924,7 @@ export default {
|
|||
}
|
||||
}
|
||||
},
|
||||
|
||||
|
||||
//图片查看
|
||||
picturePreview(file) {
|
||||
this.dialogImageUrl = file.url;
|
||||
|
|
@ -1280,7 +1286,7 @@ export default {
|
|||
height: 100%;
|
||||
object-fit: cover;
|
||||
justify-content: center;
|
||||
|
||||
|
||||
// border: 1px solid #ddd;
|
||||
// border-radius: 4px;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue