From 0fa59e97c2e87bd7391be3089e46bd80a943e48d Mon Sep 17 00:00:00 2001 From: weidy <lastanimals@163.com> Date: 星期四, 06 七月 2023 20:04:09 +0800 Subject: [PATCH] 生命周期的换字段 --- Source/UBCS-WEB/src/components/template/SetPersonnel.vue | 25 ++++++++++++++++--------- 1 files changed, 16 insertions(+), 9 deletions(-) diff --git a/Source/UBCS-WEB/src/components/template/SetPersonnel.vue b/Source/UBCS-WEB/src/components/template/SetPersonnel.vue index 17edef3..22644e7 100644 --- a/Source/UBCS-WEB/src/components/template/SetPersonnel.vue +++ b/Source/UBCS-WEB/src/components/template/SetPersonnel.vue @@ -90,7 +90,12 @@ }, deep:true, immediate:true - } + }, + parameter:{ + handler(newval,oldval){ + console.log('瀛�',newval) + } + } }, data() { return { @@ -100,7 +105,7 @@ tags: [], typeName: [], collectParam: {}, - saveParam: this.saveParam(), + saveParam: this.setSaveParam(), users: [], rules: { processName: [ @@ -112,11 +117,13 @@ }, mounted() { - // this.apiInit() - // this.apiDict() + console.log('---',this.parameter) }, - methods: { - saveParam() { + created() { + console.log('parameter',this.parameter) + }, + methods: { + setSaveParam() { return { processName: this.parameter[this.parameterKeys.flowTemplate], topName: this.title, @@ -128,7 +135,7 @@ return this.initFrom.findIndex(i => i.taskId === arr1) }, async apiInit() { - const response = await personnelInit({ type: this.parameter[this.parameterKeys.type], templateId: this.parameter[this.parameterKeys.code] }) + const response = await personnelInit({ type: this.parameter[this.parameterKeys.type], templateId: this.parameter[this.parameterKeys.code]}) if (response.status === 200) { console.log(response) this.initFrom = response.data.data.user @@ -200,8 +207,8 @@ message: "璇烽�夋嫨鑺傜偣锛�" }); } else { - const {modelKey,modelName,processDesc,processName,templateId,topName,vars} = this.saveParam - const vals= {modelKey,modelName,processDesc,processName,templateId,topName,...vars} + const {modelKey,modelName,processDesc,processName,templateId,topName,vars,ids} = this.saveParam + const vals= {modelKey,modelName,processDesc,processName,templateId,topName,ids,...vars} const response = await personnelSave({ variables:vals, flowTaskUsers: this.collectParam.flowTaskUsers, }) if (response.status === 200) { console.log(response) -- Gitblit v1.9.3