物资类型排序
This commit is contained in:
parent
5f43342bbc
commit
2db82be6a0
|
|
@ -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));
|
||||||
|
|
||||||
|
// 根据Api接口返回的Node节点中的 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;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue