From 00f13b20ead6ce11edb8200690f46cdc893ca268 Mon Sep 17 00:00:00 2001 From: ssc <273702440@qq.com> Date: Mon, 15 May 2023 13:18:54 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E5=8F=91=E8=B5=B7/=E9=80=9A=E8=BF=87?= =?UTF-8?q?=E6=97=B6=E8=AE=B0=E5=BD=95=E8=A1=A8=E5=8D=95=E5=8F=98=E9=87=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/plugin/workflow/form-variable.js | 50 +++++++++ src/views/plugin/workflow/mixins/ex-form.js | 6 ++ .../workflow/process/components/detail.vue | 13 ++- .../process/components/form-variable.vue | 102 ++++++++++++++++++ .../workflow/process/components/theme.vue | 68 ++++++++++++ .../process/external/Leave/detail.vue | 12 +-- 6 files changed, 238 insertions(+), 13 deletions(-) create mode 100644 src/api/plugin/workflow/form-variable.js create mode 100644 src/views/plugin/workflow/process/components/form-variable.vue create mode 100644 src/views/plugin/workflow/process/components/theme.vue diff --git a/src/api/plugin/workflow/form-variable.js b/src/api/plugin/workflow/form-variable.js new file mode 100644 index 0000000..ccd7d13 --- /dev/null +++ b/src/api/plugin/workflow/form-variable.js @@ -0,0 +1,50 @@ +import request from '@/router/axios'; + +const prefix = '/api/blade-workflow/design/form/variable' + +export const getList = (current, size, params) => { + return request({ + url: `${prefix}/list`, + method: 'get', + params: { + ...params, + current, + size, + } + }) +} + +export const getDetail = (params) => { + return request({ + url: `${prefix}/detail`, + method: 'get', + params + }) +} + +export const remove = (ids) => { + return request({ + url: `${prefix}/remove`, + method: 'post', + params: { + ids, + } + }) +} + +export const add = (row) => { + return request({ + url: `${prefix}/submit`, + method: 'post', + data: row + }) +} + +export const update = (row) => { + return request({ + url: `${prefix}/update`, + method: 'post', + data: row + }) +} + diff --git a/src/views/plugin/workflow/mixins/ex-form.js b/src/views/plugin/workflow/mixins/ex-form.js index 4bcff6b..aebdfc4 100644 --- a/src/views/plugin/workflow/mixins/ex-form.js +++ b/src/views/plugin/workflow/mixins/ex-form.js @@ -162,6 +162,8 @@ export default { form = { ...form, copyUser, assignee } } if (valid) { + form['wf_form_option'] = JSON.stringify(this.option) + form['wf_form_variable'] = JSON.stringify(form) startProcess(form).then(res => { if (isExForm === true) { resolve(res, done) @@ -201,6 +203,8 @@ export default { form = { ...form, copyUser, assignee } } if (valid) { + form['wf_form_option'] = JSON.stringify(this.option) + form['wf_form_variable'] = JSON.stringify(form) startProcessByKey(form).then(res => { if (isExForm === true) { resolve(res, done) @@ -266,6 +270,8 @@ export default { reject() return } + variables['wf_form_option'] = JSON.stringify(this.option) + variables['wf_form_variable'] = JSON.stringify(this.form) const { taskId, processInstanceId, processDefinitionName, processDefinitionId } = this.process const param = { taskId, processInstanceId, processDefinitionName, processDefinitionId, pass, diff --git a/src/views/plugin/workflow/process/components/detail.vue b/src/views/plugin/workflow/process/components/detail.vue index 521b8df..608e603 100644 --- a/src/views/plugin/workflow/process/components/detail.vue +++ b/src/views/plugin/workflow/process/components/detail.vue @@ -7,12 +7,9 @@ :offset-top="114">
-
- 主题: +
+ +
@@ -99,6 +96,8 @@ import WfExamineForm from './examForm.vue' import WfButton from './button.vue' import WfFlow from './flow.vue' +import WfTheme from './theme.vue' +import WfFormVariable from './form-variable.vue' import userSelect from './user-select' import exForm from '../../mixins/ex-form' @@ -106,7 +105,7 @@ import theme from '../../mixins/theme' export default { mixins: [exForm, theme], - components: { userSelect, WfExamineForm, WfButton, WfFlow }, + components: { userSelect, WfExamineForm, WfButton, WfFlow, WfTheme, WfFormVariable }, watch: { '$route.params.params': { handler(val) { diff --git a/src/views/plugin/workflow/process/components/form-variable.vue b/src/views/plugin/workflow/process/components/form-variable.vue new file mode 100644 index 0000000..0eee1de --- /dev/null +++ b/src/views/plugin/workflow/process/components/form-variable.vue @@ -0,0 +1,102 @@ + + + + + \ No newline at end of file diff --git a/src/views/plugin/workflow/process/components/theme.vue b/src/views/plugin/workflow/process/components/theme.vue new file mode 100644 index 0000000..5e59aa6 --- /dev/null +++ b/src/views/plugin/workflow/process/components/theme.vue @@ -0,0 +1,68 @@ + + + + + \ No newline at end of file diff --git a/src/views/plugin/workflow/process/external/Leave/detail.vue b/src/views/plugin/workflow/process/external/Leave/detail.vue index a76c643..012ccb3 100644 --- a/src/views/plugin/workflow/process/external/Leave/detail.vue +++ b/src/views/plugin/workflow/process/external/Leave/detail.vue @@ -7,11 +7,9 @@ :offset-top="114">
-
- 主题: +
+ +
@@ -91,6 +89,8 @@ import WfExamineForm from '@/views/plugin/workflow/process/components/examForm.vue' import WfButton from '@/views/plugin/workflow/process/components/button.vue' import WfFlow from '@/views/plugin/workflow/process/components/flow.vue' +import WfTheme from '@/views/plugin/workflow/process/components/theme.vue' +import WfFormVariable from '@/views/plugin/workflow/process/components/form-variable.vue' import userSelect from '@/views/plugin/workflow/process/components/user-select' import exForm from '@/views/plugin/workflow/mixins/ex-form' @@ -98,7 +98,7 @@ import theme from '@/views/plugin/workflow/mixins/theme' export default { mixins: [exForm, theme], - components: { userSelect, WfExamineForm, WfButton, WfFlow }, + components: { userSelect, WfExamineForm, WfButton, WfFlow, WfTheme, WfFormVariable }, watch: { '$route.query.p': { handler(val) {