done 基本完成工艺管理
This commit is contained in:
@@ -424,20 +424,18 @@ export default {
|
||||
|
||||
updateOptions() {
|
||||
return new Promise((resolve, reject) => {
|
||||
if (!this.dataForm?.id) resolve(null);
|
||||
|
||||
if (this.watingToRefreshQueue.length) {
|
||||
this.watingToRefreshQueue.forEach((opt) => {
|
||||
console.log("[刷新数据, ", opt, "]");
|
||||
if ("fetchData" in opt) {
|
||||
opt.fetchData(this.dataForm.id).then(({ data: res }) => {
|
||||
opt.fetchData(this.dataForm.id ? this.dataForm.id : -1).then(({ data: res }) => {
|
||||
if (res.code === 0) {
|
||||
this.$set(
|
||||
opt,
|
||||
"options",
|
||||
"list" in res.data
|
||||
? res.data.list.map((i) => ({ label: i.name, value: i.id }))
|
||||
: res.data.map((i) => ({ label: i.name, value: i.id }))
|
||||
? res.data.list.map((i) => ({ label: i.code, value: i.id }))
|
||||
: res.data.map((i) => ({ label: i.code, value: i.id }))
|
||||
);
|
||||
|
||||
resolve({ done: true });
|
||||
@@ -504,7 +502,7 @@ export default {
|
||||
});
|
||||
} else {
|
||||
// 如果不是编辑
|
||||
// this.dialogVisible = true;
|
||||
this.updateOptions()
|
||||
}
|
||||
});
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user