update 混料批次

This commit is contained in:
lb
2023-03-14 17:07:59 +08:00
parent f9ad79f6bc
commit 977dbb7c41
4 changed files with 62 additions and 11 deletions

View File

@@ -75,6 +75,11 @@ export default {
type: Array,
default: () => ["key"],
},
attachListQueryExtra: {
// 新增时,附带 listQueryExtra 里的哪些键和对应值
type: String,
default: "",
},
initDataWhenLoad: { type: Boolean, default: true },
/** dialog configs 或许可以从 tableConfig 计算出来 computed... */
dialogConfigs: {
@@ -83,8 +88,8 @@ export default {
},
triggerUpdate: {
type: String,
default: ''
}
default: "",
},
},
computed: {
dialogType() {
@@ -99,9 +104,9 @@ export default {
triggerUpdate(val, oldVal) {
if (val && val !== oldVal) {
// get list
this.getList()
this.getList();
}
}
},
},
data() {
return {
@@ -442,9 +447,15 @@ export default {
/** 打开对话框 */
openDialog(row_id, detail_mode, tag_info) {
this.dialogVisible = true;
let extraParams = null;
if (this.attachListQueryExtra && this.listQueryExtra.length) {
this.listQueryExtra.forEach((item) => {
let found = item[this.attachListQueryExtra];
if (found !== null && found !== undefined) extraParams = found;
});
}
this.$nextTick(() => {
this.$refs["edit-dialog"].init(/** some args... */ row_id, detail_mode, tag_info);
this.$refs["edit-dialog"].init(/** some args... */ row_id, detail_mode, tag_info, extraParams);
});
},
},