| | |
| | | }, |
| | | users:{ |
| | | handler(val){ |
| | | console.log('监听users',val) |
| | | this.collectParam.flowTaskUsers = val |
| | | }, |
| | | deep:true, |
| | | immediate:true |
| | | } |
| | | }, |
| | | parameter:{ |
| | | handler(newval,oldval){ |
| | | console.log('子',newval,oldval) |
| | | this.saveParam=newval |
| | | },deep:true, |
| | | immediate:true |
| | | } |
| | | }, |
| | | data() { |
| | | return { |
| | |
| | | tags: [], |
| | | typeName: [], |
| | | collectParam: {}, |
| | | saveParam: this.setSaveParam(), |
| | | saveParam: {}, |
| | | users: [], |
| | | rules: { |
| | | processName: [ |
| | |
| | | }, |
| | | |
| | | mounted() { |
| | | // this.apiInit() |
| | | // this.apiDict() |
| | | console.log('---',this.parameter) |
| | | }, |
| | | methods: { |
| | | created() { |
| | | }, |
| | | methods: { |
| | | setSaveParam() { |
| | | return { |
| | | processName: this.parameter[this.parameterKeys.flowTemplate], |
| | |
| | | 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 |
| | | this.tags = response.data.data.collect |
| | | const { modelKey, templateId, modelName } = response.data.data.flow |
| | |
| | | this.collectParam = { modelKey, templateId, flowTaskUsers: flowTaskUsers } |
| | | this.users = response.data.data.user |
| | | console.log(this.collectParam) |
| | | console.log('this.saveParam.before',this.saveParam) |
| | | this.saveParam = { ...this.saveParam, modelKey, templateId, modelName } |
| | | console.log('this.saveParam',this.saveParam) |
| | | if (this.tags.length !== 0) this.handleClickTag(this.tags[0]) |
| | | } |
| | | }, |
| | |
| | | console.log(this.collectParam.flowTaskUsers) |
| | | console.log(len == 0) |
| | | console.log(len != this.initFrom.length) |
| | | console.log('saveParam',this.saveParam) |
| | | if (len == 0 && len != this.initFrom.length) { |
| | | this.$message({ |
| | | type: "error", |
| | |
| | | } else { |
| | | const {modelKey,modelName,processDesc,processName,templateId,topName,vars,ids} = this.saveParam |
| | | const vals= {modelKey,modelName,processDesc,processName,templateId,topName,ids,...vars} |
| | | console.log('vals',vals); |
| | | const response = await personnelSave({ variables:vals, flowTaskUsers: this.collectParam.flowTaskUsers, }) |
| | | if (response.status === 200) { |
| | | console.log(response) |