bug修复

This commit is contained in:
jjLv 2024-10-12 10:33:55 +08:00
parent 76f7af32db
commit 4a7edc0560
1 changed files with 56 additions and 10 deletions

View File

@ -164,7 +164,6 @@ export default {
}, },
async mounted() { async mounted() {
this.open = true this.open = true
await this.getRanges();
if (this.editParams) { if (this.editParams) {
await Object.assign(this.projectParams, this.editParams); await Object.assign(this.projectParams, this.editParams);
// //
@ -180,6 +179,7 @@ export default {
} else { } else {
this.subSort = 1; this.subSort = 1;
} }
await this.getRanges();
this.open = false this.open = false
}, },
data() { data() {
@ -286,21 +286,67 @@ export default {
}; };
}); });
// //
let projRes = await queryProjApi({ if(this.subSort==1)
isAll: 0, {
}); let projRes = await queryProjApi({
this.projRange = projRes.data.map((item) => { isAll: 0,
return { });
label: item.proName, this.projRange = projRes.data.map((item) => {
value: item.id, return {
}; label: item.proName,
}); value: item.id,
};
});
}
if(this.subSort==2){
//
let projRes = queryProjApi({
isAll: 0
}).then(projRes =>{
this.projRange = projRes.data.map((item) => {
return {
label: item.proName,
value: item.id,
};
});
})
}
}, },
departChange(e) { departChange(e) {
this.departRange.forEach((item) => { this.departRange.forEach((item) => {
if (e === item.value) { if (e === item.value) {
this.projectParams.departName = item.label; this.projectParams.departName = item.label;
if(this.subSort==2){
//
let projRes = queryProjApi({
isAll: 0,
departId: e,
}).then(projRes =>{
this.projRange = projRes.data.map((item) => {
return {
label: item.proName,
value: item.id,
};
});
})
}
if(this.subSort==1){
//
let projRes = queryProjApi({
isAll: 0,
departId: e,
}).then(projRes =>{
this.projRange = projRes.data.map((item) => {
return {
label: item.proName,
value: item.id,
};
});
})
}
} }
}); });
}, },
projChange(e) { projChange(e) {