From 62fb43a7c2e14109093af94f7282820a0242d443 Mon Sep 17 00:00:00 2001 From: ludc Date: 星期一, 10 七月 2023 11:25:13 +0800 Subject: [PATCH] 代码整合 --- Source/UBCS-WEB/dist/src/views/work/process/leave/form.vue | 112 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 files changed, 112 insertions(+), 0 deletions(-) diff --git a/Source/UBCS-WEB/dist/src/views/work/process/leave/form.vue b/Source/UBCS-WEB/dist/src/views/work/process/leave/form.vue new file mode 100644 index 0000000..5f15d44 --- /dev/null +++ b/Source/UBCS-WEB/dist/src/views/work/process/leave/form.vue @@ -0,0 +1,112 @@ +<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> -- Gitblit v1.9.3