fix(techproc): 修复工序表单初始化及选择逻辑

This commit is contained in:
zxy 2026-04-14 16:58:20 +08:00
parent d381961a9a
commit 7459f3766c

View File

@ -113,31 +113,37 @@ export default {
this.dialogVisible = true;
this.loading = true;
//
//
if (!this.dataForm.id) {
this.loading = false;
return;
}
//
if (this.procListLoaded) {
this.doInit();
}
},
//
doInit() {
this.$nextTick(() => {
if (this.$refs.formRef) {
this.$refs.formRef.resetFields();
if (this.dataForm.id) {
request({
url: `/api/example/techproc/${this.dataForm.id}`,
method: 'get'
}).then(res => {
this.dataForm = res.data
//
this.techProcDisplay = this.convertCodeToName(res.data.techProc)
//
this.setSelectedRows(res.data.procList || res.data.techProc)
this.loading = false
})
} else {
}
if (this.dataForm.id) {
request({
url: `/api/example/techproc/${this.dataForm.id}`,
method: 'get'
}).then(res => {
this.dataForm = res.data
//
this.techProcDisplay = this.convertCodeToName(res.data.techProc)
//
this.setSelectedRows(res.data.procList || res.data.techProc)
this.loading = false
}
});
})
} else {
this.loading = false
}
},
//
getProcList() {