diff --git a/src/views/plugin/workflow/design/index.vue b/src/views/plugin/workflow/design/index.vue index 26fc587..676dc9b 100644 --- a/src/views/plugin/workflow/design/index.vue +++ b/src/views/plugin/workflow/design/index.vue @@ -73,7 +73,8 @@ import { getDetail as getFormByKey } from '@/api/plugin/workflow/form' import { submit, getDetail } from '@/api/plugin/workflow/model' import { getList as buttonList } from '@/api/plugin/workflow/button' -import { userList } from '@/api/plugin/workflow/process' +import { getList as formList } from '@/api/plugin/workflow/form' +import { getList as conditionList } from '@/api/plugin/workflow/condition' import { fullscreenToggel } from "@/util/util"; @@ -309,9 +310,9 @@ export default { }, mounted() { this.getButtonList() - // this.getUserList() this.getUserListV2() this.getFormList() + this.getConditionList() }, methods: { handleNextStep() { @@ -444,7 +445,7 @@ export default { } }, getButtonList() { - buttonList(1, 99, { status: 1 }).then(res => { + buttonList(1, -1, { status: 1 }).then(res => { const list = res.data.data.records.map(l => { return { label: l.name, @@ -456,44 +457,11 @@ export default { }) }, getFormList() { - this.$axios.get('/api/blade-workflow/design/form/list?size=-1&status=1').then(res => { + formList(1, -1, { 'status_equal': '1' }).then(res => { this.formList = res.data.data.records this.findObject(this.step1.option.group, 'formKey').dicData = this.formList }) }, - getUserList() { - const userConfig = { - leftColumns: [{ - title: '姓名', - dataIndex: 'realName', - align: 'center' - }, { - title: '部门', - dataIndex: 'deptName', - align: 'center' - }, { - title: '职位', - dataIndex: 'postName', - align: 'center' - }], - rightColumns: [{ - title: '姓名', - dataIndex: 'realName', - align: 'center' - },], - filterKey: 'realName', - } - userList(1, 99, {}).then(res => { - userConfig.data = res.data.data.records.map(r => { - return { - key: r.id, - realName: r.realName, - deptName: r.deptName - } - }) - this.$set(this.step2.option, 'user', userConfig) - }) - }, getUserListV2() { this.$set(this.step2.option, 'user', { version: 'v2', @@ -504,6 +472,11 @@ export default { customUrl: '/api/blade-workflow/design/condition/list' }) }, + getConditionList() { + conditionList(1, -1, { type: 'flow', status: 1 }).then(res => { + this.$set(this.step2.option, 'condition', res.data.data.records) + }) + }, handleFullScreen() { fullscreenToggel() this.$store.commit('SET_COLLAPSE')