zxl
1 天以前 d0fbf4d118248513db719e5988275cd3f0e79ee6
增加页面提示
1个文件已修改
44 ■■■■■ 已修改文件
src/views/WebViewSend.vue 44 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/WebViewSend.vue
@@ -1,6 +1,11 @@
<template>
  <div class="app-container">
    <el-card class="box-card" >
    <el-result v-if="isSuccess" icon="success" title="操作成功" subTitle="您的任务已处理完成">
      <template slot="extra">
      </template>
    </el-result>
    <el-card v-else class="box-card" >
      <div slot="header" class="clearfix header-container">
        <div class="header-title el-icon-document">{{`任务办理:` + processName}}</div>
        <div class="header-subtitle">{{projectName + '——' + flowName}}</div>
@@ -155,6 +160,7 @@
  data() {
    return {
      isWait: false,
      isSuccess: false,
      rejectLoading: false,
      submitLoading: false,
      delegationButLoading: false,
@@ -291,16 +297,14 @@
            Object.assign(param, formData);
            const api = this.isWait ? waitCompleteSubmitFormTask : completeSubmitFormTask;
            api(this.taskId, param).then(res => {
              this.$message.success(res.msg);
              this.isSuccess = true;
              this.submitLoading = false;
              this.goBack();
            }).catch(() => { this.submitLoading = false; });
          });
        } else {
          const api = this.isWait ? waitCompleteSubmitFormTask : completeSubmitFormTask;
          api(this.taskId, {}).then(res => {
            this.$message.success(res.msg);
            this.goBack();
            this.isSuccess = true;
          });
        }
      });
@@ -319,8 +323,7 @@
        this.rejectLoading = true;
        rejectTask(this.rejectForm).then(res => {
          this.rejectShow = false;
          this.$message.success("驳回成功");
          this.goBack();
          this.isSuccess = true;
        }).finally(() => { this.rejectLoading = false; });
      });
    },
@@ -336,9 +339,8 @@
          this.delegationForm.processInsId = this.procInsId;
          this.delegationButLoading = true;
          taskDelegation(this.delegationForm).then(res => {
            this.$message.success("已发起转办申请");
            this.isSuccess = true;
            this.delegationShow = false;
            this.goBack();
          }).finally(() => { this.delegationButLoading = false; });
        }
      });
@@ -367,10 +369,23 @@
    closeRole() { this.roleShow = false; },
    closeMultUser() { this.multUserShow = false; },
    // 挂起/容缺/跳过
    hangup() { this.$prompt('备注说明', '确定要挂起此任务吗').then(({ value }) => { taskHangup({ taskId: this.taskId, projectId: this.projectId, processInsId: this.procInsId, reason: value }).then(() => { this.$message.success("操作成功"); this.goBack(); }); }); },
    cancelHangup() { this.$confirm('确定要取消挂起吗?').then(() => { cancelTaskHangup({ taskId: this.taskId, projectId: this.projectId, processInsId: this.procInsId }).then(() => { this.$message.success("操作成功"); this.goBack(); }); }); },
    waitTask() { this.$prompt('备注说明', '确定要容缺此任务吗').then(({ value }) => { taskWait({ taskId: this.taskId, projectId: this.projectId, processInsId: this.procInsId, desc: value }).then(() => { this.$message.success("操作成功"); this.goBack(); }); }); },
    jumpTask() { this.$prompt('备注说明', '确定要跳过此任务吗').then(({ value }) => { taskJump({ taskId: this.taskId, projectId: this.projectId, processInsId: this.procInsId, desc: value }).then(() => { this.$message.success("操作成功"); this.goBack(); }); }); },
    hangup() {
      this.$prompt('备注说明', '确定要挂起此任务吗').then(({ value }) => {
        taskHangup({ taskId: this.taskId, projectId: this.projectId, processInsId: this.procInsId, reason: value }).then(() => { this.isSuccess = true; }); });
      },
    cancelHangup() {
      this.$confirm('确定要取消挂起吗?').then(() => {
        cancelTaskHangup({ taskId: this.taskId, projectId: this.projectId, processInsId: this.procInsId }).then(() => { this.isSuccess = true; }); });
      },
    waitTask() {
      this.$prompt('备注说明', '确定要容缺此任务吗').then(({ value }) => {
        taskWait({ taskId: this.taskId, projectId: this.projectId, processInsId: this.procInsId, desc: value }).then(() => { this.isSuccess = true; }); });
      },
    jumpTask() {
      this.$prompt('备注说明', '确定要跳过此任务吗').then(({ value }) => {
      taskJump({ taskId: this.taskId, projectId: this.projectId, processInsId: this.procInsId, desc: value }).then(() => { this.isSuccess = true; }); });
    },
    goBack() {
      // WebView 模式下通常不需要复杂的 goBack 逻辑,或者可以通知父容器
      console.log('Task completed');
@@ -404,8 +419,7 @@
      Object.assign(param, this.formData);
      this.$set(param, this.multiInstanceVars || "approval", this.checkValues);
      completeSubmitFormTask(this.taskId, param).then(res => {
        this.$message.success(res.msg);
        this.goBack();
        this.isSuccess = true;
      });
    }
  }