¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <basic-container> |
| | | <el-form ref="form" :model="form" label-width="80px"> |
| | | <el-row type="flex" class="row-bg" justify="end"> |
| | | <el-form-item> |
| | | <el-button @click="handleCancel">å
³é</el-button> |
| | | </el-form-item> |
| | | </el-row> |
| | | <el-card shadow="hover"> |
| | | <div slot="header"> |
| | | <span>审æ¹ä¿¡æ¯</span> |
| | | </div> |
| | | <el-form-item label="ç³è¯·äºº"> |
| | | <el-input :disabled="true" v-model="form.flow.assigneeName" /> |
| | | </el-form-item> |
| | | <el-row> |
| | | <el-col :span="12"> |
| | | <el-form-item label="å¼å§æ¶é´"> |
| | | <el-input :disabled="true" v-model="form.startTime" /> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="ç»ææ¶é´"> |
| | | <el-input :disabled="true" v-model="form.endTime" /> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | <el-form-item label="请åçç±"> |
| | | <el-input :disabled="true" type="textarea" v-model="form.reason" /> |
| | | </el-form-item> |
| | | </el-card> |
| | | <el-card shadow="hover"> |
| | | <div slot="header"> |
| | | <span>æµç¨ä¿¡æ¯</span> |
| | | </div> |
| | | <el-row type="flex" class="row-bg"> |
| | | <el-timeline> |
| | | <el-timeline-item :key="flow.id" :timestamp="flow.createTime" v-for="flow in flowList" placement="top"> |
| | | <el-card shadow="hover"> |
| | | <p>{{flow.assigneeName}} å¨ [{{flow.createTime}}] å¼å§å¤ç [{{flow.historyActivityName}}] ç¯è</p> |
| | | <p v-if="flow.historyActivityDurationTime!==''">ä»»å¡åæ¶ [{{flow.historyActivityDurationTime}}]</p> |
| | | <p v-if="flow.comment!==''">æ¹å¤æè§: [{{flow.comment}}]</p> |
| | | <p v-if="flow.endTime!==''">ç»ææ¶é´: [{{flow.endTime}}]</p> |
| | | </el-card> |
| | | </el-timeline-item> |
| | | </el-timeline> |
| | | </el-row> |
| | | </el-card> |
| | | <el-card shadow="hover"> |
| | | <div slot="header"> |
| | | <span>æµç¨è·è¸ª</span> |
| | | </div> |
| | | <el-row class="row-bg"> |
| | | <flow-design :is-display="true" :process-instance-id="processInstanceId"></flow-design> |
| | | </el-row> |
| | | </el-card> |
| | | </el-form> |
| | | </basic-container> |
| | | </template> |
| | | |
| | | <script> |
| | | import {historyFlowList, leaveDetail} from "@/api/work/process"; |
| | | |
| | | export default { |
| | | data() { |
| | | return { |
| | | businessId: '', |
| | | processInstanceId: '', |
| | | src: '', |
| | | flowList: [], |
| | | form: { |
| | | flow:{ |
| | | assigneeName:'', |
| | | }, |
| | | startTime: '', |
| | | endTime: '', |
| | | reason: '', |
| | | } |
| | | } |
| | | }, |
| | | created() { |
| | | this.init(); |
| | | }, |
| | | methods: { |
| | | init() { |
| | | this.processInstanceId = this.$route.params.processInstanceId; |
| | | this.businessId = this.$route.params.businessId; |
| | | historyFlowList(this.processInstanceId).then(res => { |
| | | const data = res.data; |
| | | if (data.success) { |
| | | this.flowList = data.data; |
| | | } |
| | | }) |
| | | leaveDetail(this.businessId).then(res => { |
| | | const data = res.data; |
| | | if (data.success) { |
| | | this.form = data.data; |
| | | } |
| | | }) |
| | | }, |
| | | handleCancel() { |
| | | this.$router.$avueRouter.closeTag(); |
| | | this.$router.push({path: `/work/start`}); |
| | | } |
| | | } |
| | | } |
| | | </script> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <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> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <basic-container> |
| | | <el-form ref="form" :model="form" :rules="rules" label-width="80px"> |
| | | <el-row type="flex" class="row-bg" justify="end"> |
| | | <el-form-item> |
| | | <el-button type="primary" @click="handleAgree">åæ</el-button> |
| | | <el-button type="danger" @click="handleDisagree">驳å</el-button> |
| | | <el-button @click="handleCancel">å
³é</el-button> |
| | | </el-form-item> |
| | | </el-row> |
| | | <el-card shadow="hover"> |
| | | <div slot="header"> |
| | | <span>审æ¹ä¿¡æ¯</span> |
| | | </div> |
| | | <el-form-item label="ç³è¯·äºº"> |
| | | <el-input :disabled="true" v-model="form.flow.assigneeName"/> |
| | | </el-form-item> |
| | | <el-row> |
| | | <el-col :span="12"> |
| | | <el-form-item label="å¼å§æ¶é´"> |
| | | <el-input :disabled="true" v-model="form.startTime"/> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="ç»ææ¶é´"> |
| | | <el-input :disabled="true" v-model="form.endTime"/> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | <el-form-item label="请åçç±"> |
| | | <el-input :disabled="true" type="textarea" v-model="form.reason"/> |
| | | </el-form-item> |
| | | <el-form-item label="æ¹å¤æè§"> |
| | | <el-input type="textarea" v-model="form.comment"/> |
| | | </el-form-item> |
| | | </el-card> |
| | | <el-card shadow="hover"> |
| | | <div slot="header"> |
| | | <span>æµç¨ä¿¡æ¯</span> |
| | | </div> |
| | | <el-row type="flex" class="row-bg"> |
| | | <el-timeline> |
| | | <el-timeline-item :key="flow.id" :timestamp="flow.createTime" v-for="flow in flowList" placement="top"> |
| | | <el-card shadow="hover"> |
| | | <p>{{flow.assigneeName}} å¨ [{{flow.createTime}}] å¼å§å¤ç [{{flow.historyActivityName}}] ç¯è</p> |
| | | <p v-if="flow.historyActivityDurationTime!==''">ä»»å¡åæ¶ [{{flow.historyActivityDurationTime}}]</p> |
| | | <p v-if="flow.comment!==''">æ¹å¤æè§: [{{flow.comment}}]</p> |
| | | <p v-if="flow.endTime!==''">ç»ææ¶é´: [{{flow.endTime}}]</p> |
| | | </el-card> |
| | | </el-timeline-item> |
| | | </el-timeline> |
| | | </el-row> |
| | | </el-card> |
| | | <el-card shadow="hover"> |
| | | <div slot="header"> |
| | | <span>æµç¨è·è¸ª</span> |
| | | </div> |
| | | <el-row class="row-bg"> |
| | | <flow-design :is-display="true" :process-instance-id="processInstanceId"></flow-design> |
| | | </el-row> |
| | | </el-card> |
| | | </el-form> |
| | | </basic-container> |
| | | </template> |
| | | |
| | | <script> |
| | | import {historyFlowList, leaveDetail} from "@/api/work/process"; |
| | | import {completeTask} from "@/api/work/work"; |
| | | |
| | | export default { |
| | | data() { |
| | | return { |
| | | taskId: '', |
| | | businessId: '', |
| | | processInstanceId: '', |
| | | src: '', |
| | | flowList: [], |
| | | form: { |
| | | flow: { |
| | | assigneeName: '', |
| | | }, |
| | | startTime: '', |
| | | endTime: '', |
| | | reason: '', |
| | | comment: '', |
| | | }, |
| | | } |
| | | }, |
| | | created() { |
| | | this.init(); |
| | | }, |
| | | beforeRouteUpdate(to, from, next) { |
| | | // å¨å½åè·¯ç±æ¹åï¼ä½æ¯è¯¥ç»ä»¶è¢«å¤ç¨æ¶è°ç¨ |
| | | // 䏾便¥è¯´ï¼å¯¹äºä¸ä¸ªå¸¦æå¨æåæ°çè·¯å¾ /foo/:idï¼å¨ /foo/1 å /foo/2 ä¹é´è·³è½¬çæ¶å |
| | | // ç±äºä¼æ¸²æåæ ·ç Foo ç»ä»¶ï¼å æ¤ç»ä»¶å®ä¾ä¼è¢«å¤ç¨ãèè¿ä¸ªé©åå°±ä¼å¨è¿ä¸ªæ
åµä¸è¢«è°ç¨ |
| | | // å¯ä»¥è®¿é®ç»ä»¶å®ä¾ `this` |
| | | if (to.fullPath !== from.fullPath) { |
| | | next(); |
| | | this.init(); |
| | | } |
| | | }, |
| | | methods: { |
| | | init() { |
| | | this.taskId = this.$route.params.taskId; |
| | | this.processInstanceId = this.$route.params.processInstanceId; |
| | | this.businessId = this.$route.params.businessId; |
| | | historyFlowList(this.processInstanceId).then(res => { |
| | | const data = res.data; |
| | | if (data.success) { |
| | | this.flowList = data.data; |
| | | } |
| | | }) |
| | | leaveDetail(this.businessId).then(res => { |
| | | const data = res.data; |
| | | if (data.success) { |
| | | this.form = data.data; |
| | | } |
| | | }) |
| | | }, |
| | | handleAgree() { |
| | | if (!this.form.comment) { |
| | | this.$message.warning('请å
填忹夿è§'); |
| | | return; |
| | | } |
| | | const params = { |
| | | taskId: this.taskId, |
| | | processInstanceId: this.processInstanceId, |
| | | flag: 'ok', |
| | | comment: this.form.comment, |
| | | }; |
| | | completeTask(params).then(res => { |
| | | const data = res.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 || 'æäº¤å¤±è´¥'); |
| | | } |
| | | }) |
| | | }, |
| | | handleDisagree() { |
| | | if (!this.form.comment) { |
| | | this.$message.warning('请å
填忹夿è§'); |
| | | return; |
| | | } |
| | | const params = { |
| | | taskId: this.taskId, |
| | | processInstanceId: this.processInstanceId, |
| | | comment: this.form.comment, |
| | | }; |
| | | completeTask(params).then(res => { |
| | | const data = res.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 || 'æäº¤å¤±è´¥'); |
| | | } |
| | | }) |
| | | }, |
| | | handleCancel() { |
| | | this.$router.$avueRouter.closeTag(); |
| | | this.$router.push({path: `/work/start`}); |
| | | } |
| | | } |
| | | } |
| | | </script> |