<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>
|
<avue-form :option="option" v-model="form"/>
|
</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} from "@/api/work/process";
|
import {detailOption} from "@/const/applicationCarChange/applicationCarChange";
|
import {carChangeDetail} from "@/api/applicationCarChange/applicationCarChange";
|
export default {
|
name: "detail",
|
data() {
|
return {
|
businessId: '',
|
processInstanceId: '',
|
src: '',
|
flowList: [],
|
form: {},
|
option:detailOption
|
}
|
},
|
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;
|
}
|
})
|
carChangeDetail(this.businessId).then(res => {
|
const data = res.data;
|
if (data.success) {
|
this.form = data.data;
|
this.initForm();
|
}
|
})
|
},
|
handleCancel() {
|
this.$router.$avueRouter.closeTag();
|
this.$router.push({path: `/work/start`});
|
},
|
initForm(){
|
let form = this.form;
|
|
let car= this.form.carEntity
|
let carId = car.id
|
|
//保留原form中的字段
|
let common = Object.assign({},form)
|
|
form = Object.assign(form,car)
|
|
//覆盖回原form
|
form = Object.assign(form,common)
|
|
this.form.carEntity.id =carId
|
}
|
}
|
}
|
</script>
|
|
<style scoped>
|
|
</style>
|