From a4d7993d0b44faffe2e548250a9d2bc27c77e521 Mon Sep 17 00:00:00 2001 From: xiejun <xj@2023> Date: 星期三, 19 七月 2023 12:27:46 +0800 Subject: [PATCH] 集成获取分类接口(包含编码规则码段码值信息) --- Source/UBCS-WEB/src/components/template/SetPersonnel.vue | 46 ++++++++++++++++++++++++++++------------------ 1 files changed, 28 insertions(+), 18 deletions(-) diff --git a/Source/UBCS-WEB/src/components/template/SetPersonnel.vue b/Source/UBCS-WEB/src/components/template/SetPersonnel.vue index 7980a59..cf03538 100644 --- a/Source/UBCS-WEB/src/components/template/SetPersonnel.vue +++ b/Source/UBCS-WEB/src/components/template/SetPersonnel.vue @@ -52,7 +52,9 @@ typeof: String, default: '娴佺▼瀹℃壒' }, - // 鍙傛暟锛氶�夋嫨鐨刬d锛屽涓互鏁扮粍鏂瑰紡浼犻�掞細['id','id']锛屾ā鏉縤d锛屾ā鏉跨敤閫旓紝娴佺▼鍚嶅瓧锛屾祦绋嬫ā鏉� + // 鍙傛暟锛氶�夋嫨鐨刬d锛屽涓互鏁扮粍鏂瑰紡浼犻�掞細['id','id']锛屾ā鏉縤d锛屾ā鏉跨敤閫旓紝娴佺▼鍚嶅瓧锛屾祦绋嬫ā鏉�, + // flowTemplate锛� + // vars锛歰bject鏍煎紡锛屽悕瀛椾负vars锛岄噷闈ey閿�硷紝鑷繁闅忔剰 parameter: { typeof: Object, default: () => { } @@ -74,6 +76,7 @@ visible(n) { this.dialogVisible = n; if (n) { + this.saveParam=this.setSaveParam(); this.apiInit() this.apiDict() } @@ -88,7 +91,12 @@ }, deep:true, immediate:true - } + }, + parameter:{ + handler(newval,oldval){ + console.log('瀛�',newval) + } + } }, data() { return { @@ -98,7 +106,7 @@ tags: [], typeName: [], collectParam: {}, - saveParam: this.saveParam(), + saveParam: this.setSaveParam(), users: [], rules: { processName: [ @@ -110,22 +118,23 @@ }, mounted() { - // this.apiInit() - // this.apiDict() }, - methods: { - saveParam() { + created() { + }, + methods: { + setSaveParam() { return { processName: this.parameter[this.parameterKeys.flowTemplate], topName: this.title, ids: this.parameter[this.parameterKeys.ids], + vars:this.parameter['vars'] } }, userIndex(arr1) { 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 @@ -197,16 +206,17 @@ message: "璇烽�夋嫨鑺傜偣锛�" }); } else { - console.log('baoc') - // const response = await personnelSave({ ...this.saveParam, flowTaskUsers: this.collectParam.flowTaskUsers }) - // if (response.status === 200) { - // console.log(response) - // this.$message({ - // type: 'success', - // message: response.data.msg - // }); - // this.done() - // } + 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) + this.$message({ + type: 'success', + message: response.data.msg + }); + this.done() + } } } catch { -- Gitblit v1.9.3