ludc
2023-12-13 16913ea709f434cfebe71fd0c66b0a6931398f3e
Source/UBCS-WEB/src/views/flow/manager.vue
@@ -13,6 +13,7 @@
               @current-change="currentChange"
               @size-change="sizeChange"
               @refresh-change="refreshChange"
               @row-click="clickRowChange"
               @on-load="onLoad">
      <template slot="menuLeft">
        <el-radio-group v-model="mode" size="small">
@@ -24,19 +25,21 @@
        <el-button type="text"
                   size="small"
                   icon="el-icon-refresh"
                   v-if="permission.flow_manager_state"
                   @click.stop="handleState(scope.row,scope.index)">变更状态
                   :style="{color: scope.row.suspensionState === 1 ? '#67C23A' : '#F56C6C'}"
                   v-if="permissionList.state"
                   @click.stop="handleDoState(scope.row, scope.index)">
          {{ scope.row.suspensionState === 1 ? '激活' : '挂起' }}
        </el-button>
        <el-button type="text"
                   size="small"
                   icon="el-icon-search"
                   v-if="permission.flow_manager_image"
                   v-if="permissionList.image"
                   @click.stop="handleImage(scope.row,scope.index)">流程图
        </el-button>
        <el-button type="text"
                   size="small"
                   icon="el-icon-delete"
                   v-if="permission.flow_manager_remove"
                   v-if="permissionList.delBtn"
                   @click.stop="handleSlotDelete(scope.row,scope.index)">删除
        </el-button>
      </template>
@@ -119,6 +122,7 @@
        option: {
          height: 'auto',
          calcHeight: 30,
          columnBtn:false,
          tip: false,
          searchShow: true,
          searchMenuSpan: 6,
@@ -132,6 +136,7 @@
          dialogWidth: 900,
          menuWidth: 250,
          dialogClickModal: false,
          highlightCurrentRow: true, //行选中时高亮
          column: [
            {
              label: '租户编号',
@@ -158,7 +163,7 @@
              label: "流程分类",
              type: "select",
              row: true,
              dicUrl: "/api/blade-system/dict/dictionary?code=flow",
              dicUrl: "/api/ubcs-system/dict/dictionary?code=flow",
              props: {
                label: "dictValue",
                value: "dictKey"
@@ -200,7 +205,9 @@
      ...mapGetters(["permission"]),
      permissionList() {
        return {
          delBtn: this.vaildData(this.permission.flow_manager_remove, false),
          state:this.vaildData(this.permission.flow_manager.flow_manager_state, false),
          image:this.vaildData(this.permission.flow_manager.flow_manager_image, false),
          delBtn: this.vaildData(this.permission.flow_manager.flow_manager_delete, false),
        };
      },
      ids() {
@@ -229,8 +236,15 @@
        this.onLoad(this.page, params);
        done();
      },
      clickRowChange(row){
        this.$refs.crud.toggleSelection();
        this.selectionList = row;
        this.$refs.crud.setCurrentRow(row);
        this.$refs.crud.toggleRowSelection(row); //选中当前行
      },
      selectionChange(list) {
        this.selectionList = list;
        this.$refs.crud.setCurrentRow(this.selectionList[list.length-1]);
      },
      selectionClear() {
        this.selectionList = [];
@@ -280,15 +294,15 @@
        this.stateBox = true;
        this.selectionId = row.id;
      },
      handleDoState() {
        if (!this.flowState) {
          this.$message({
            type: "warn",
            message: "请先选择流程状态!"
          });
          return;
        }
        changeState({processId: this.selectionId, state: this.flowState}).then(res => {
      handleDoState(row) {
        // if (!this.flowState) {
        //   this.$message({
        //     type: "warn",
        //     message: "请先选择流程状态!"
        //   });
        //   return;
        // }
        changeState({processId: row.id, state: (row.suspensionState === 1 ? 'suspend' : 'active')}).then(res => {
          const data = res.data;
          if (data.success) {
            this.$message({