| | |
| | | </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-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.historyActivityDurationTime !== ''">任务历时 [{{ flow.historyActivityDurationTime }}] |
| | | </p> |
| | | <p v-if="flow.comment!==''">批复意见: [{{flow.comment}}]</p> |
| | | <p v-if="flow.endTime!==''">结束时间: [{{flow.endTime}}]</p> |
| | | </el-card> |
| | |
| | | import { |
| | | historyFlowList, |
| | | leaveDetail |
| | | } from "@/api/work/process"; |
| | | } from "@/api/work/process" |
| | | |
| | | import { |
| | | getList, |
| | |
| | | update, |
| | | add, |
| | | getPropertyCapitalApply |
| | | } from "@/api/property/propertyCapitalApply"; |
| | | } from "@/api/property/propertyCapitalApply" |
| | | import { |
| | | completeTask |
| | | } from "@/api/work/work"; |
| | | } from "@/api/work/work" |
| | | |
| | | export default { |
| | | data() { |
| | |
| | | label: '施工方案附件', |
| | | prop: 'constructionSchemeUrls', |
| | | type: 'upload', |
| | | listType: 'picture-img', |
| | | span: 24, |
| | | hide: true, |
| | | labelWidth: 140, |
| | |
| | | } |
| | | }, |
| | | created() { |
| | | this.init(); |
| | | this.init() |
| | | }, |
| | | beforeRouteUpdate(to, from, next) { |
| | | // 在当前路由改变,但是该组件被复用时调用 |
| | |
| | | // 由于会渲染同样的 Foo 组件,因此组件实例会被复用。而这个钩子就会在这个情况下被调用 |
| | | // 可以访问组件实例 `this` |
| | | if (to.fullPath !== from.fullPath) { |
| | | next(); |
| | | this.init(); |
| | | next() |
| | | this.init() |
| | | } |
| | | }, |
| | | methods: { |
| | | init() { |
| | | this.taskId = this.$route.params.taskId; |
| | | this.processInstanceId = this.$route.params.processInstanceId; |
| | | this.businessId = this.$route.params.businessId; |
| | | 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; |
| | | const data = res.data |
| | | if (data.success) { |
| | | this.flowList = data.data; |
| | | this.flowList = data.data |
| | | } |
| | | }) |
| | | getPropertyCapitalApply(this.businessId).then(res => { |
| | | const data = res.data; |
| | | const data = res.data |
| | | if (data.success) { |
| | | this.form = data.data; |
| | | this.form = data.data |
| | | } |
| | | }) |
| | | }, |
| | | handleAgree() { |
| | | if (!this.form.comment) { |
| | | this.$message.warning('请先填写批复意见'); |
| | | return; |
| | | 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; |
| | | const data = res.data |
| | | if (data.success) { |
| | | this.$message.success(data.msg); |
| | | this.$router.$avueRouter.closeTag(); |
| | | this.$message.success(data.msg) |
| | | this.$router.$avueRouter.closeTag() |
| | | this.$router.push({ |
| | | path: `/work/todo` |
| | | }); |
| | | }) |
| | | } else { |
| | | this.$message.error(data.msg || '提交失败'); |
| | | this.$message.error(data.msg || '提交失败') |
| | | } |
| | | }) |
| | | }, |
| | | handleDisagree() { |
| | | if (!this.form.comment) { |
| | | this.$message.warning('请先填写批复意见'); |
| | | return; |
| | | this.$message.warning('请先填写批复意见') |
| | | return |
| | | } |
| | | const params = { |
| | | taskId: this.taskId, |
| | | processInstanceId: this.processInstanceId, |
| | | comment: this.form.comment, |
| | | }; |
| | | } |
| | | completeTask(params).then(res => { |
| | | const data = res.data; |
| | | const data = res.data |
| | | if (data.success) { |
| | | this.$message.success(data.msg); |
| | | this.$router.$avueRouter.closeTag(); |
| | | this.$message.success(data.msg) |
| | | this.$router.$avueRouter.closeTag() |
| | | this.$router.push({ |
| | | path: `/work/todo` |
| | | }); |
| | | }) |
| | | } else { |
| | | this.$message.error(data.msg || '提交失败'); |
| | | this.$message.error(data.msg || '提交失败') |
| | | } |
| | | }) |
| | | }, |
| | | handleCancel() { |
| | | this.$router.$avueRouter.closeTag(); |
| | | this.$router.$avueRouter.closeTag() |
| | | this.$router.push({ |
| | | path: `/work/todo` |
| | | }); |
| | | }) |
| | | } |
| | | } |
| | | } |