物资类型排序

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
@ -521,13 +521,13 @@ export default {
// } else if (val && val.length == 0) { // } else if (val && val.length == 0) {
// this.maForm.unitId = ""; // this.maForm.unitId = "";
// } // }
if(val.typeKey=='fbs'){ if(val.typeKey=='fbs'){
this.isFileFbs=true; this.isFileFbs=true;
this.rules['bmFileInfos'][0].required=true; this.rules['bmFileInfos'][0].required=true;
}else{ }else{
this.isFileFbs=false; this.isFileFbs=false;
this.rules['bmFileInfos'][0].required=false; this.rules['bmFileInfos'][0].required=false;
} }
setTimeout(()=>{ setTimeout(()=>{
getListProject({ unitId: this.maForm.unitId }).then((response) => { getListProject({ unitId: this.maForm.unitId }).then((response) => {
this.projectList = response.data; this.projectList = response.data;
@ -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;
}, },
// //
@ -687,7 +693,7 @@ export default {
this.maForm.projectId this.maForm.projectId
); );
this.equipmentList = response.data.leaseApplyDetailsList; this.equipmentList = response.data.leaseApplyDetailsList;
// bmFileInfos // bmFileInfos
if (this.maForm.bmFileInfos.length > 0) { if (this.maForm.bmFileInfos.length > 0) {
this.isFileFbs = true this.isFileFbs = true
} }
@ -918,7 +924,7 @@ export default {
} }
} }
}, },
// //
picturePreview(file) { picturePreview(file) {
this.dialogImageUrl = file.url; this.dialogImageUrl = file.url;
@ -1280,7 +1286,7 @@ export default {
height: 100%; height: 100%;
object-fit: cover; object-fit: cover;
justify-content: center; justify-content: center;
// border: 1px solid #ddd; // border: 1px solid #ddd;
// border-radius: 4px; // border-radius: 4px;
} }