¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <div> |
| | | <basic-container> |
| | | <avue-form :option="option" v-model="form" @submit="handleSubmit"/> |
| | | </basic-container> |
| | | <basic-container> |
| | | <flow-design :is-display="true" :process-definition-id="processDefinitionId"></flow-design> |
| | | </basic-container> |
| | | </div> |
| | | </template> |
| | | |
| | | <script> |
| | | import {leaveProcess} from "@/api/work/process"; |
| | | |
| | | export default { |
| | | data() { |
| | | return { |
| | | processDefinitionId: '', |
| | | form: {}, |
| | | option: { |
| | | group: [ |
| | | { |
| | | icon: 'el-icon-info', |
| | | label: '请ååºç¡ä¿¡æ¯', |
| | | prop: 'group1', |
| | | column: [ |
| | | { |
| | | label: '审æ¹äººå', |
| | | prop: 'taskUser', |
| | | type: 'select', |
| | | dicUrl: `/api/ubcs-user/user-list`, |
| | | props: { |
| | | label: "account", |
| | | value: "id" |
| | | }, |
| | | span: 24, |
| | | rules: [ |
| | | { |
| | | required: true, |
| | | message: 'è¯·éæ©å®¡æ¹äººå', |
| | | trigger: 'blur' |
| | | } |
| | | ] |
| | | }, |
| | | { |
| | | label: 'å¼å§æ¶é´', |
| | | prop: 'startTime', |
| | | type: 'datetime', |
| | | valueFormat: 'yyyy-MM-dd HH:mm:ss', |
| | | rules: [ |
| | | { |
| | | required: true, |
| | | message: 'è¯·éæ©å¼å§æ¶é´', |
| | | trigger: 'blur' |
| | | } |
| | | ] |
| | | }, |
| | | { |
| | | label: 'ç»ææ¶é´', |
| | | prop: 'endTime', |
| | | type: 'datetime', |
| | | valueFormat: 'yyyy-MM-dd HH:mm:ss', |
| | | rules: [ |
| | | { |
| | | required: true, |
| | | message: 'è¯·éæ©ç»ææ¶é´', |
| | | trigger: 'blur' |
| | | } |
| | | ] |
| | | }, |
| | | { |
| | | label: '请åçç±', |
| | | prop: 'reason', |
| | | type: 'textarea', |
| | | span: 24, |
| | | rules: [ |
| | | { |
| | | required: true, |
| | | message: '请è¾å
¥è¯·åçç±', |
| | | trigger: 'blur' |
| | | } |
| | | ] |
| | | }, |
| | | ] |
| | | }, |
| | | ], |
| | | } |
| | | } |
| | | }, |
| | | created() { |
| | | this.processDefinitionId = this.$route.params.processDefinitionId; |
| | | }, |
| | | methods: { |
| | | handleSubmit() { |
| | | const params = { |
| | | processDefinitionId: this.$route.params.processDefinitionId, |
| | | ...this.form, |
| | | }; |
| | | leaveProcess(params).then(resp => { |
| | | const data = resp.data; |
| | | if (data.success) { |
| | | this.$message.success(data.msg); |
| | | this.$router.$avueRouter.closeTag(); |
| | | this.$router.push({path: `/work/start`}); |
| | | } else { |
| | | this.$message.error(data.msg || 'æäº¤å¤±è´¥'); |
| | | } |
| | | }); |
| | | } |
| | | } |
| | | } |
| | | </script> |