From 1299915419dcb8737131fe639a6c70dbd051e1b8 Mon Sep 17 00:00:00 2001 From: ssc <273702440@qq.com> Date: Mon, 15 May 2023 13:23:24 +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 --- .../workflow/api/design/form-variable.js | 50 ++++++++++ .../components/nf-form-variable/index.vue | 94 +++++++++++++++++++ .../workflow/components/nf-theme/index.vue | 64 +++++++++++++ src/views/plugin/workflow/mixins/ex-form.js | 6 ++ .../workflow/pages/external/Leave/detail.vue | 17 ++-- .../workflow/pages/external/Leave/start.vue | 2 +- .../workflow/pages/process/form/detail.vue | 17 ++-- 7 files changed, 233 insertions(+), 17 deletions(-) create mode 100644 src/views/plugin/workflow/api/design/form-variable.js create mode 100644 src/views/plugin/workflow/components/nf-form-variable/index.vue create mode 100644 src/views/plugin/workflow/components/nf-theme/index.vue diff --git a/src/views/plugin/workflow/api/design/form-variable.js b/src/views/plugin/workflow/api/design/form-variable.js new file mode 100644 index 0000000..638dc59 --- /dev/null +++ b/src/views/plugin/workflow/api/design/form-variable.js @@ -0,0 +1,50 @@ +import request from '@/axios'; + +const prefix = '/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/components/nf-form-variable/index.vue b/src/views/plugin/workflow/components/nf-form-variable/index.vue new file mode 100644 index 0000000..e4fd790 --- /dev/null +++ b/src/views/plugin/workflow/components/nf-form-variable/index.vue @@ -0,0 +1,94 @@ + + + + + \ No newline at end of file diff --git a/src/views/plugin/workflow/components/nf-theme/index.vue b/src/views/plugin/workflow/components/nf-theme/index.vue new file mode 100644 index 0000000..f710327 --- /dev/null +++ b/src/views/plugin/workflow/components/nf-theme/index.vue @@ -0,0 +1,64 @@ + + + + + \ No newline at end of file diff --git a/src/views/plugin/workflow/mixins/ex-form.js b/src/views/plugin/workflow/mixins/ex-form.js index 2eda517..b874c04 100644 --- a/src/views/plugin/workflow/mixins/ex-form.js +++ b/src/views/plugin/workflow/mixins/ex-form.js @@ -211,6 +211,8 @@ export default { } } 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) @@ -257,6 +259,8 @@ export default { } } 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) @@ -344,6 +348,8 @@ export default { reject() return } + variables['wf_form_option'] = JSON.stringify(this.option) + variables['wf_form_variable'] = JSON.stringify(this.form) const { taskId, processInstanceId, diff --git a/src/views/plugin/workflow/pages/external/Leave/detail.vue b/src/views/plugin/workflow/pages/external/Leave/detail.vue index 9699ab9..1f098f1 100644 --- a/src/views/plugin/workflow/pages/external/Leave/detail.vue +++ b/src/views/plugin/workflow/pages/external/Leave/detail.vue @@ -4,14 +4,13 @@

{{ process.processDefinitionName }}

-
- 主题: + + :theme-list="themeList" + > +
@@ -95,6 +94,8 @@ import NfExamineForm from '../../../components/nf-exam-form/index.vue' import NfButton from '../../../components/nf-button/index.vue' import NfFlow from '../../../components/nf-flow/index.vue' +import NfTheme from '../../../components/nf-theme/index.vue' +import NfFormVariable from '../../../components/nf-form-variable/index.vue' import NfUserSelect from '../../../components/nf-user-select/index.vue' import exForm from '../../../mixins/ex-form' @@ -102,7 +103,7 @@ import theme from '../../../mixins/theme' export default { mixins: [exForm, theme], - components: { NfUserSelect, NfExamineForm, NfButton, NfFlow }, + components: { NfUserSelect, NfExamineForm, NfButton, NfFlow, NfTheme, NfFormVariable }, watch: { '$route.query.p': { handler(val) { diff --git a/src/views/plugin/workflow/pages/external/Leave/start.vue b/src/views/plugin/workflow/pages/external/Leave/start.vue index 772bc25..cd0bc17 100755 --- a/src/views/plugin/workflow/pages/external/Leave/start.vue +++ b/src/views/plugin/workflow/pages/external/Leave/start.vue @@ -259,7 +259,7 @@ export default { submit({ id: data.id, processInsId }).then(() => { this.$message.success("发起成功") this.handleCloseTag('/plugin/workflow/pages/process/send') - done() + if (typeof done == 'function') done() }) }).catch(() => { this.loading = false diff --git a/src/views/plugin/workflow/pages/process/form/detail.vue b/src/views/plugin/workflow/pages/process/form/detail.vue index 360e65a..abdfb24 100644 --- a/src/views/plugin/workflow/pages/process/form/detail.vue +++ b/src/views/plugin/workflow/pages/process/form/detail.vue @@ -4,14 +4,13 @@

{{ process.processDefinitionName }}

-
- 主题: + + :theme-list="themeList" + > +
@@ -109,12 +108,14 @@ import NfExamineForm from '../../../components/nf-exam-form/index.vue' import NfButton from '../../../components/nf-button/index.vue' import NfFlow from '../../../components/nf-flow/index.vue' import NfUserSelect from '../../../components/nf-user-select/index.vue' +import NfTheme from '../../../components/nf-theme/index.vue' +import NfFormVariable from '../../../components/nf-form-variable/index.vue' import exForm from '../../../mixins/ex-form' import theme from '../../../mixins/theme' export default { mixins: [exForm, theme], - components: { NfUserSelect, NfExamineForm, NfButton, NfFlow }, + components: { NfUserSelect, NfExamineForm, NfButton, NfFlow, NfTheme, NfFormVariable }, watch: { '$route.params.params': { handler(val) {