大件运输联网系统前端代码
guoshilong
2023-01-02 29bf5936bf1da2eea81f3abe07dc738f5267c42c
src/views/work/send.vue
@@ -22,6 +22,12 @@
        </el-button>
        <el-button type="text"
                   size="small"
                   icon="el-icon-delete"
                   :disabled="scope.row.processIsFinished === 'finished' || scope.row.processIsFinished ==='withdraw'  "
                   @click.stop="handleCancel(scope.row)">撤 销
        </el-button>
        <el-button type="text"
                   size="small"
                   icon="el-icon-search"
                   v-if="permission.work_send_follow"
                   @click.stop="handleImage(scope.row,scope.index)">流程图
@@ -33,7 +39,7 @@
      </template>
      <template slot-scope="{row}"
                slot="processIsFinished">
        <el-tag>{{row.processIsFinished==='finished' ? '已完成' : '未完成'}}</el-tag>
        <el-tag>{{row.processIsFinished==='finished' ? '已完成' : row.processIsFinished ==='withdraw'?'自行撤销':'未完成'}}</el-tag>
      </template>
    </avue-crud>
    <flow-design is-dialog :is-display.sync="flowBox" :process-instance-id="processInstanceId"></flow-design>
@@ -42,7 +48,7 @@
<script>
  import {mapGetters} from "vuex";
  import {sendList} from "@/api/work/work";
  import {sendList, withdrawTask} from "@/api/work/work";
  import {flowCategory,flowRoute} from "@/util/flow";
  export default {
@@ -75,7 +81,7 @@
          viewBtn: false,
          delBtn: false,
          dialogWidth: 900,
          menuWidth: 150,
          menuWidth: 200,
          dialogClickModal: false,
          column: [
            {
@@ -126,7 +132,7 @@
      };
    },
    computed: {
      ...mapGetters(["permission", "flowRoutes"]),
      ...mapGetters(["permission", "flowRoutes","userInfo"]),
      ids() {
        let ids = [];
        this.selectionList.forEach(ele => {
@@ -182,6 +188,17 @@
          this.loading = false;
          this.selectionClear();
        });
      },
      handleCancel(row){
        withdrawTask(row).then(res=>{
          if (res.data.code == 200){
            this.$message.success(res.data.msg)
          }else {
            this.$message.error(res.data.msg)
          }
          this.onLoad(this.page,this.query)
        })
      }
    }
  };