guanqb
2024-01-18 2769065da8a69ebf0b1a993a8f358c66ebe6ff7f
上传附件按钮在处理详情里面显示为图片
1 files modified
69 ■■■■ changed files
src/views/work/process/maintenanceFundApply/handle.vue 69 ●●●● patch | view | raw | blame | history
src/views/work/process/maintenanceFundApply/handle.vue
@@ -20,10 +20,12 @@
        </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>
@@ -62,7 +64,7 @@
  import {
    historyFlowList,
    leaveDetail
  } from "@/api/work/process";
} from "@/api/work/process"
  import {
    getList,
@@ -70,10 +72,10 @@
    update,
    add,
    getPropertyCapitalApply
  } from "@/api/property/propertyCapitalApply";
} from "@/api/property/propertyCapitalApply"
  import {
    completeTask
  } from "@/api/work/work";
} from "@/api/work/work"
  export default {
    data() {
@@ -289,6 +291,7 @@
              label: '施工方案附件',
              prop: 'constructionSchemeUrls',
              type: 'upload',
                    listType: 'picture-img',
              span: 24,
              hide: true,
              labelWidth: 140,
@@ -311,7 +314,7 @@
      }
    },
    created() {
      this.init();
        this.init()
    },
    beforeRouteUpdate(to, from, next) {
      // 在当前路由改变,但是该组件被复用时调用
@@ -319,80 +322,80 @@
      // 由于会渲染同样的 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`
        });
            })
      }
    }
  }