xiangpei
2025-01-02 23fdfa68682eef52fee5a8d257c002cdd375a563
转办:候选用户、候选角色实现
3个文件已修改
3个文件已添加
785 ■■■■■ 已修改文件
src/components/flow/Dept/MyDept.vue 105 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/components/flow/Dept/index.vue 4 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/components/flow/Role/MyRole.vue 207 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/components/flow/User/MultUser.vue 259 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/components/flow/User/SingleUser.vue 49 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/flowable/task/myProcess/send/index.vue 161 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/components/flow/Dept/MyDept.vue
New file
@@ -0,0 +1,105 @@
<template>
  <div>
    <el-dialog
      :title="`选择候选部门`"
      :visible.sync="show"
      width="65%"
      :destroy-on-close="true"
      :close-on-click-modal="false"
      :modal="false"
      :before-close="close">
      <el-tree
        ref="tree"
        :data="deptTree"
        show-checkbox
        node-key="id"
        :check-strictly="true"
        :default-expanded-keys="['dept:100']"
        @check-change="handleCheckChange"
        >
      </el-tree>
      <span slot="footer" class="dialog-footer">
        <el-button type="primary" @click="submit">确 定</el-button>
      </span>
    </el-dialog>
  </div>
</template>
<script>
import {flowableDeptTreeSelect} from "@/api/system/user";
export default {
  name: "MyDept",
  props: {
    show: {
      required: true,
      type: Boolean
    },
    checkeds: {
      required: true
    }
  },
  watch: {
    checkeds: {
      handler(newV) {
        if (newV && newV.length > 0) {
          this.checkList = newV
          this.$nextTick(() => {
            if (this.$refs.tree) {
              this.$refs.tree.setCheckedKeys(newV.map(item => item.id));
            }
          });
        } else {
          this.checkList = []
        }
      },
      deep: true
    },
  },
  data() {
    return {
      deptTree: [],
      checkList: [],
    }
  },
  created() {
    flowableDeptTreeSelect().then(res => {
      this.deptTree = res.data
    })
  },
  methods: {
    setCheckList(newV) {
      if (newV && newV.length > 0) {
        this.checkList = newV
        this.$nextTick(() => {
          if (this.$refs.tree) {
            this.$refs.tree.setCheckedKeys(newV.map(item => item.id));
          }
        });
      } else {
        this.checkList = []
      }
    },
    handleCheckChange(data, checked, indeterminate) {
      if (checked) {
        if (this.checkList.indexOf(data) === -1) {
          this.checkList.push(data)
        }
      } else {
        this.checkList = this.checkList.filter(item => item !== data)
      }
      console.log(data, checked, indeterminate);
    },
    close() {
      this.$emit("close")
    },
    submit() {
      this.$emit("submit", this.checkList)
    }
  }
}
</script>
<style scoped>
</style>
src/components/flow/Dept/index.vue
@@ -74,7 +74,9 @@
    },
    handleCheckChange(data, checked, indeterminate) {
      if (checked) {
        this.checkList.push(data)
        if (this.checkList.indexOf(data) === -1) {
          this.checkList.push(data)
        }
      } else {
        this.checkList = this.checkList.filter(item => item !== data)
      }
src/components/flow/Role/MyRole.vue
New file
@@ -0,0 +1,207 @@
<template>
  <div>
    <el-dialog
      :title="`选择候选角色`"
      :visible.sync="show"
      width="65%"
      :destroy-on-close="true"
      :close-on-click-modal="false"
      :modal="false"
      :before-close="close">
      <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch">
        <el-form-item label="角色名称" prop="roleName">
          <el-input
            v-model="queryParams.roleName"
            placeholder="请输入角色名称"
            clearable
            style="width: 240px"
            @keyup.enter.native="handleQuery"
          />
        </el-form-item>
        <el-form-item>
          <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
          <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
        </el-form-item>
      </el-form>
      <el-table ref="dataTable"  v-loading="loading" :data="roleList" @selection-change="handleMultipleRoleSelect">
        <el-table-column type="selection" width="50" align="center" />
        <el-table-column label="角色编号" prop="roleId" width="120" />
        <el-table-column label="角色名称" prop="roleName" :show-overflow-tooltip="true" width="150" />
        <el-table-column label="权限字符" prop="roleKey" :show-overflow-tooltip="true" width="150" />
        <el-table-column label="显示顺序" prop="roleSort" width="100" />
        <el-table-column label="创建时间" align="center" prop="createTime" width="180">
          <template slot-scope="scope">
            <span>{{ parseTime(scope.row.createTime) }}</span>
          </template>
        </el-table-column>
      </el-table>
      <pagination
        v-show="total>0"
        :total="total"
        :page-sizes="[5,10]"
        layout="prev, pager, next"
        :page.sync="queryParams.pageNum"
        :limit.sync="queryParams.pageSize"
        @pagination="getList"
      />
      <span slot="footer" class="dialog-footer">
        <el-button type="primary" @click="submit">确 定</el-button>
      </span>
    </el-dialog>
  </div>
</template>
<script>
import { listRole} from "@/api/system/role";
import {StrUtil} from "@/utils/StrUtil";
export default {
  name: "MyRole",
  dicts: ['sys_normal_disable'],
  // 接受父组件的值
  props: {
    show: {
      type: Boolean,
      required: true,
      default: true
    },
    // 回显数据传值
    selectValues: {
      type: Array,
      default: [],
      required: false
    }
  },
  data() {
    return {
      // 遮罩层
      loading: true,
      // 选中数组
      ids: [],
      // 非单个禁用
      single: true,
      // 非多个禁用
      multiple: true,
      // 显示搜索条件
      showSearch: true,
      // 总条数
      total: 0,
      // 角色表格数据
      roleList: [],
      // 弹出层标题
      title: "",
      // 是否显示弹出层
      open: false,
      // 查询参数
      queryParams: {
        pageNum: 1,
        pageSize: 5,
        roleName: undefined,
        roleKey: undefined,
        status: undefined
      },
      // 表单参数
      form: {},
      radioSelected: 0, // 单选框传值
      selectRoleList: [] // 回显数据传值
    };
  },
  watch: {
    selectValues: {
      deep: true,
      handler(newVal) {
        if (newVal && newVal.length > 0) {
          this.$nextTick(() => {
            this.$refs.dataTable.clearSelection();
            this.selectRoleList = []
            newVal.forEach(item => {
              this.roleList.forEach(role => {
                if (item.roleId === role.roleId) {
                  this.selectRoleList.push(role)
                  this.$refs.dataTable.toggleRowSelection(role)
                }
              })
            });
          })
        } else {
          this.selectRoleList = []
        }
      }
    },
    roleList: {
      deep: true,
      handler(newVal) {
        if (newVal && newVal.length > 0) {
          this.$nextTick(() => {
            this.$refs.dataTable.clearSelection();
            this.selectValues.forEach(item => {
              newVal.forEach(role => {
                if (item.roleId === role.roleId) {
                  this.$refs.dataTable.toggleRowSelection(role)
                }
              })
            });
          })
        }
      }
    }
  },
  mounted() {
    this.getList();
  },
  methods: {
    setChecked(val) {
      if (val && val.length > 0) {
        this.$nextTick(() => {
          this.$refs.dataTable.clearSelection();
          this.selectRoleList = val
          val.forEach(check => {
            this.roleList.forEach(item => {
              if (check.roleId === item.roleId) {
                this.$refs.dataTable.toggleRowSelection(item)
              }
            })
          })
        });
      } else {
        this.selectRoleList = []
      }
    },
    close() {
      this.$emit("close")
    },
    submit() {
      this.$emit("submit", this.selectRoleList)
    },
    /** 查询角色列表 */
    getList() {
      this.loading = true;
      listRole(this.queryParams).then(response => {
          this.roleList = response.rows;
          this.total = response.total;
          this.loading = false;
        }
      );
    },
    // 多选框选中数据
    handleMultipleRoleSelect(selection) {
      this.selectRoleList = selection
    },
    /** 搜索按钮操作 */
    handleQuery() {
      this.queryParams.pageNum = 1;
      this.getList();
    },
    /** 重置按钮操作 */
    resetQuery() {
      this.handleQuery();
    },
  }
};
</script>
<style scoped>
</style>
src/components/flow/User/MultUser.vue
New file
@@ -0,0 +1,259 @@
<template>
  <div>
    <el-dialog
      :title="`选择转办接收人员`"
      :visible.sync="show"
      width="65%"
      :destroy-on-close="true"
      :close-on-click-modal="false"
      :modal="false"
      :before-close="close">
      <el-row :gutter="20">
        <!--部门数据-->
        <el-col :span="6" :xs="24">
          <div class="head-container">
            <el-input
              v-model="deptName"
              placeholder="请输入部门名称"
              clearable
              size="small"
              prefix-icon="el-icon-search"
              style="margin-bottom: 20px"
            />
          </div>
          <div class="head-container">
            <el-tree
              :data="deptOptions"
              :props="defaultProps"
              :expand-on-click-node="false"
              :filter-node-method="filterNode"
              ref="tree"
              node-key="id"
              default-expand-all
              highlight-current
              @node-click="handleNodeClick"
            />
          </div>
        </el-col>
        <!--用户数据-->
        <el-col :span="18" :xs="24">
          <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
            <el-form-item label="用户名称" prop="userName">
              <el-input
                v-model="queryParams.userName"
                placeholder="请输入用户名称"
                clearable
                style="width: 150px"
                @keyup.enter.native="handleQuery"
              />
            </el-form-item>
            <el-form-item>
              <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
              <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
            </el-form-item>
          </el-form>
          <el-table ref="dataTable" v-loading="loading" :row-key="getRowKey" :data="userList" @selection-change="handleUserSelect">
            <el-table-column type="selection" align="center" />
            <el-table-column label="用户编号" align="center" key="userId" prop="userId" v-if="columns[0].visible" />
            <el-table-column label="登录账号" align="center" key="userName" prop="userName" v-if="columns[1].visible" :show-overflow-tooltip="true" />
            <el-table-column label="用户姓名" align="center" key="nickName" prop="nickName" v-if="columns[2].visible" :show-overflow-tooltip="true" />
            <el-table-column label="部门" align="center" key="deptName" prop="dept.deptName" v-if="columns[3].visible" :show-overflow-tooltip="true" />
            <el-table-column label="手机号码" align="center" key="phonenumber" prop="phonenumber" v-if="columns[4].visible" width="120" />
          </el-table>
          <pagination
            v-show="total>0"
            :total="total"
            :page-sizes="[5,10]"
            layout="prev, pager, next"
            :page.sync="queryParams.pageNum"
            :limit.sync="queryParams.pageSize"
            @pagination="getList"
          />
        </el-col>
      </el-row>
      <span slot="footer" class="dialog-footer">
        <el-button type="danger" @click="getSelected">确认</el-button>
      </span>
    </el-dialog>
  </div>
</template>
<script>
import { listUser, deptTreeSelect } from "@/api/system/user";
import Treeselect from "@riophae/vue-treeselect";
import "@riophae/vue-treeselect/dist/vue-treeselect.css";
import {StrUtil} from '@/utils/StrUtil'
export default {
  name: "SingleUser",
  dicts: ['sys_normal_disable', 'sys_user_sex'],
  components: { Treeselect },
  // 接受父组件的值
  props: {
    show: {
      required: true,
      type: Boolean
    },
    // 回显数据传值
    selectUserList: {
      type: Number,
      default: null,
      required: false
    },
  },
  data() {
    return {
      innerSelected: [],
      // 遮罩层
      loading: true,
      // 选中数组
      ids: [],
      // 显示搜索条件
      showSearch: true,
      // 总条数
      total: 0,
      // 用户表格数据
      userList: [],
      // 弹出层标题
      title: "",
      // 部门树选项
      deptOptions: undefined,
      // 是否显示弹出层
      open: false,
      // 部门名称
      deptName: undefined,
      // 表单参数
      form: {},
      defaultProps: {
        children: "children",
        label: "label"
      },
      // 查询参数
      queryParams: {
        pageNum: 1,
        pageSize: 5,
        userName: undefined,
        phonenumber: undefined,
        status: undefined,
        deptId: undefined
      },
      // 列信息
      columns: [
        { key: 0, label: `用户编号`, visible: true },
        { key: 1, label: `用户名称`, visible: true },
        { key: 2, label: `用户昵称`, visible: true },
        { key: 3, label: `部门`, visible: true },
        { key: 4, label: `手机号码`, visible: true },
        { key: 5, label: `状态`, visible: true },
        { key: 6, label: `创建时间`, visible: true }
      ],
      radioSelected: 0, // 单选框传值
    };
  },
  watch: {
    // 根据名称筛选部门树
    deptName(val) {
      this.$refs.tree.filter(val);
    },
    selectUserList: {
      deep: true,
      handler(newVal) {
        console.log(this.selectValues, "传入的值是")
        this.setChecked(newVal)
      },
    },
    userList: {
      deep: true,
      handler(newVal) {
        this.$nextTick(() => {
          this.$refs.dataTable.clearSelection();
          this.innerSelected.forEach(check => {
            newVal.forEach(item => {
              if (check.userId === item.userId) {
                this.$refs.dataTable.toggleRowSelection(item)
              }
            })
          })
        });
      },
    },
  },
  mounted() {
    this.getList();
    this.getDeptTree();
  },
  methods: {
    setChecked(val) {
      this.$nextTick(() => {
        this.$refs.dataTable.clearSelection();
        this.innerSelected = val
        val.forEach(check => {
          this.userList.forEach(item => {
            if (check.userId === item.userId) {
              this.$refs.dataTable.toggleRowSelection(item)
            }
          })
        })
      });
    },
    /** 查询用户列表 */
    getList() {
      this.loading = true;
      listUser(this.queryParams).then(response => {
          this.userList = response.rows;
          this.total = response.total;
          this.loading = false;
        }
      );
    },
    /** 查询部门下拉树结构 */
    getDeptTree() {
      deptTreeSelect().then(response => {
        this.deptOptions = response.data;
      });
    },
    // 保存选中的数据id,row-key就是要指定一个key标识这一行的数据
    getRowKey (row) {
      return row.id
    },
    // 筛选节点
    filterNode(value, data) {
      if (!value) return true;
      return data.label.indexOf(value) !== -1;
    },
    // 节点单击事件
    handleNodeClick(data) {
      this.queryParams.deptId = data.id;
      this.handleQuery();
    },
    // 传递选中值
    handleUserSelect(selectionList) {
      console.log("选中值", selectionList)
      this.innerSelected = selectionList
    },
    getSelected() {
      this.$emit('submit', this.innerSelected);
    },
    /** 搜索按钮操作 */
    handleQuery() {
      this.queryParams.pageNum = 1;
      this.getList();
    },
    /** 重置按钮操作 */
    resetQuery() {
      this.dateRange = [];
      this.resetForm("queryForm");
      this.queryParams.deptId = undefined;
      this.$refs.tree.setCurrentKey(null);
      this.handleQuery();
    },
    close() {
      this.$emit("close")
    },
  }
};
</script>
<style scoped>
</style>
src/components/flow/User/SingleUser.vue
@@ -96,7 +96,6 @@
    },
    // 回显数据传值
    selectUser: {
      type: Number,
      default: null,
      required: false
    },
@@ -160,18 +159,40 @@
    selectUser: {
      deep: true,
      handler(newVal) {
        console.log(this.selectValues, "传入的值是")
        this.$nextTick(() => {
          this.$refs.dataTable.clearSelection();
        if (newVal) {
          this.$nextTick(() => {
            this.$refs.dataTable.clearSelection();
            this.userList.forEach(item => {
              if (newVal === item.userId) {
                this.innerSelected = item
                this.$refs.dataTable.toggleRowSelection(item)
              }
            })
        });
          });
        } else {
          this.innerSelected = null;
        }
      },
      // immediate: true
    },
    userLst: {
      deep: true,
      handler(newVal) {
        if (newVal) {
          this.$nextTick(() => {
            this.$refs.dataTable.clearSelection();
            if (! this.innerSelected) {
              newVal.forEach(item => {
                if (this.innerSelected.userId === item.userId) {
                  this.innerSelected = item
                  this.$refs.dataTable.toggleRowSelection(item)
                }
              })
            }
          });
        } else {
          this.innerSelected = null;
        }
      },
    },
  },
  mounted() {
@@ -180,15 +201,19 @@
  },
  methods: {
    setChecked(val) {
      if (val) {
        this.$nextTick(() => {
          this.$refs.dataTable.clearSelection();
            this.userList.forEach(item => {
              if (val === item.userId) {
                this.innerSelected = item
                this.$refs.dataTable.toggleRowSelection(item)
              }
            })
          this.userList.forEach(item => {
            if (val.userId === item.userId) {
              this.innerSelected = item
              this.$refs.dataTable.toggleRowSelection(item)
            }
          })
        });
      } else {
        this.innerSelected = null
      }
    },
    /** 查询用户列表 */
    getList() {
src/views/flowable/task/myProcess/send/index.vue
@@ -84,23 +84,45 @@
          <el-form-item label="用户类型" prop="peopleType">
            <el-select v-model="delegationForm.peopleType" @change="peopleTypeChange" placeholder="请选择用户类型">
              <el-option label="指定人员" value="FIX_USER"></el-option>
              <el-option label="候选用户" disabled value="USER"></el-option>
              <el-option label="候选用户" value="USER"></el-option>
              <el-option label="候选部门" value="DEPT"></el-option>
              <el-option label="候选角色" disabled  value="ROLE"></el-option>
              <el-option label="候选角色" value="ROLE"></el-option>
            </el-select>
          </el-form-item>
          <el-form-item v-if="delegationForm.peopleType === 'DEPT'" label="候选部门" prop="targetId">
            <Dept ref="dept" :checkeds="delegationDeptSelect" :show="deptShow" @close="closeDept" @submit="getDeptSelect"/>
            <MyDept ref="dept" :checkeds="delegationDeptSelect" :show="deptShow" @close="closeDept" @submit="getDeptSelect"/>
            <div style="display: flex;align-items: center">
              <div>{{deptNames}}</div>
              <el-button style="margin-left: 8px" type="text" @click="editDept">编辑</el-button>
              <div>
                <el-tag v-for="dept in delegationDeptSelect" :key="dept.id + 'zxc'" type="info" closable @close="removeDept(dept)">{{dept.label}}</el-tag>
              </div>
              <el-button style="margin-left: 8px" type="text" @click="editDept">选择</el-button>
            </div>
          </el-form-item>
          <el-form-item v-if="delegationForm.peopleType === 'FIX_USER'" label="指定用户" prop="targetId">
            <single-user ref="singleUser" :select-user="delegationForm.targetId" :show="singleUserShow" @close="closeUser" @submit="getSingleUserSelect"/>
            <single-user ref="singleUser" :select-user="delegationForm.targetId" :show="singleUserShow" @close="closeSingleUser" @submit="getSingleUserSelect"/>
            <div style="display: flex;align-items: center">
              <div>{{delegationUserSelect.map(item => item.nickName).join(',')}}</div>
              <el-button style="margin-left: 8px" type="text" @click="editUser">编辑</el-button>
              <div>
                <el-tag v-for="user in delegationUserSelect" :key="user.userId + 'abc'" type="info" closable @close="removeSingleUser(user)">{{user.nickName}}</el-tag>
              </div>
              <el-button style="margin-left: 8px" type="text" @click="editSingleUser">选择</el-button>
            </div>
          </el-form-item>
          <el-form-item v-if="delegationForm.peopleType === 'USER'" label="候选用户" prop="targetId">
            <mult-user ref="multUser" :select-user="delegationUserSelect" :show="multUserShow" @close="closeMultUser" @submit="getMultUserSelect"/>
            <div style="display: flex;align-items: center">
              <div>
                <el-tag v-for="user in delegationUserSelect" :key="user.userId + 'qwe'" type="info" closable @close="removeMultUser(user)">{{user.nickName}}</el-tag>
              </div>
              <el-button style="margin-left: 8px" type="text" @click="editMultUser">选择</el-button>
            </div>
          </el-form-item>
          <el-form-item v-if="delegationForm.peopleType === 'ROLE'" label="候选角色" prop="targetId">
            <my-role ref="role" :select-values="delegationRoleSelect" :show="roleShow" @close="closeRole" @submit="getRoleSelect"/>
            <div style="display: flex;align-items: center">
              <div>
                <el-tag v-for="role in delegationRoleSelect" :key="role.roleId + 'rty'" type="info" closable @close="removeRole(role)">{{role.roleName}}</el-tag>
              </div>
              <el-button style="margin-left: 8px" type="text" @click="editRole">选择</el-button>
            </div>
          </el-form-item>
        </el-form>
@@ -116,13 +138,13 @@
<script>
import {definitionStart, flowXmlAndNode} from "@/api/flowable/definition";
import BpmnViewer from '@/components/Process/viewer';
import Dept from '@/components/flow/Dept'
import MyDept from '@/components/flow/Dept/MyDept'
import SingleUser from '@/components/flow/User/SingleUser'
import MultUser from '@/components/flow/User/MultUser'
import MyRole from '@/components/flow/Role/MyRole'
import {completeSubmitFormTask} from "@/api/flowable/process";
import { flowTaskForm } from "@/api/flowable/todo";
import {getNextFlowNodeByStart} from "@/api/flowable/todo";
import FlowUser from '@/components/flow/User'
import FlowRole from '@/components/flow/Role'
import {rejectTask} from "@/api/flowable/process";
import {taskDelegation} from "@/api/projectProcess/projectProcess";
@@ -130,18 +152,20 @@
  name: "Record",
  components: {
    BpmnViewer,
    FlowUser,
    FlowRole,
    Dept,
    MyRole,
    MyDept,
    SingleUser,
    MultUser,
  },
  props: {},
  data() {
    return {
      roleShow: false, // 角色组显示
      delegationRoleSelect: [], // 选中角色
      multUserShow: false, // 用户组显示
      singleUserShow: false, // 指定用户显示
      delegationUserSelect: [], // 选中的用户
      deptShow: false, // 部门显示
      deptNames: '', // 选中的部门名称
      deptShow: false, // 部门组显示
      delegationDeptSelect: [], // 选中部门
      delegationFormRules: {
        peopleType: [
@@ -204,10 +228,45 @@
    this.getFlowFormData(this.taskId);
  },
  methods: {
    removeDept(dept) {
      let index = this.delegationDeptSelect.indexOf(dept);
      if (index !== -1) {
        this.delegationDeptSelect.splice(index, 1);
      }
      this.delegationForm.targetId = this.delegationDeptSelect.map(item => item.id).join(",")
    },
    removeRole(role) {
      let index = this.delegationRoleSelect.indexOf(role);
      if (index !== -1) {
        this.delegationRoleSelect.splice(index, 1);
      }
      this.delegationForm.targetId = this.delegationRoleSelect.map(item => item.roleId).join(",")
    },
    removeMultUser(user) {
      let index = this.delegationUserSelect.indexOf(user);
      if (index !== -1) {
        this.delegationUserSelect.splice(index, 1);
      }
      this.delegationForm.targetId = this.delegationUserSelect.map(item => item.userId).join(",")
    },
    removeSingleUser(user) {
      // 因为只能选一个用户,所以删了就没了
      this.delegationUserSelect = []
      this.delegationForm.targetId = ''
    },
    getTips() {
      if (this.delegationForm.peopleType === 'USER' || this.delegationForm.peopleType === 'FIX_USER') {
        return this.delegationUserSelect.map(item => item.nickName).join("、")
      } else if (this.delegationForm.peopleType === 'DEPT') {
        return this.delegationDeptSelect.map(item => item.label).join("、")
      } else if (this.delegationForm.peopleType === 'ROLE') {
        return this.delegationRoleSelect.map(item => item.roleName).join("、")
      }
    },
    delegation() {
      this.$refs['delegationForm'].validate((valid) => {
        if (valid) {
          this.$confirm(`确定要将此任务交由【${this.deptNames}】处理吗?`, '提示', {
          this.$confirm(`确定要将此任务交由【${this.getTips()}】处理吗?`, '提示', {
            confirmButtonText: '确定',
            cancelButtonText: '取消',
            type: 'warning'
@@ -236,6 +295,10 @@
        this.deptShow = true
      } else if (val === 'FIX_USER') {
        this.singleUserShow = true
      } else if (val === 'USER') {
        this.multUserShow = true
      } else if (val === 'ROLE') {
        this.roleShow = true
      }
    },
    editDept() {
@@ -244,20 +307,56 @@
      })
      this.deptShow = true
    },
    editUser() {
      this.$nextTick(() => {
        this.$refs.singleUser.setChecked(this.delegationForm.targetId)
      })
    editSingleUser() {
      if (this.delegationUserSelect && this.delegationUserSelect.length > 0) {
        this.$nextTick(() => {
          this.$refs.singleUser.setChecked(this.delegationUserSelect[0])
        })
      }
      this.singleUserShow = true
    },
    getDeptSelect(list, names) {
      console.log(list, names)
      if (list) {
        this.delegationForm.targetId = list
        this.delegationDeptSelect = list.split(",")
        this.deptNames = names
    editRole() {
      if (this.delegationRoleSelect && this.delegationRoleSelect.length > 0) {
        this.$nextTick(() => {
          this.$refs.role.setChecked(this.delegationRoleSelect)
        })
      }
      this.roleShow = true
    },
    editMultUser() {
      if (this.delegationForm.targetId) {
        this.$nextTick(() => {
          this.$refs.multUser.setChecked(this.delegationUserSelect)
        })
      }
      this.multUserShow = true
    },
    getDeptSelect(deptList) {
      if (deptList && deptList.length > 0) {
        this.delegationForm.targetId = deptList.map(item => item.id).join(",")
        this.delegationDeptSelect = deptList
      }
      this.deptShow = false
    },
    getMultUserSelect(userList) {
      if (userList && userList.length > 0) {
        this.delegationForm.targetId = userList.map(item => item.userId).join(",")
        this.delegationUserSelect = userList
      } else {
        this.delegationForm.targetId = ''
        this.delegationUserSelect = []
      }
      this.multUserShow = false
    },
    getRoleSelect(roleList) {
      if (roleList && roleList.length > 0) {
        this.delegationForm.targetId = roleList.map(item => item.roleId).join(",")
        this.delegationRoleSelect = roleList
      } else {
        this.delegationForm.targetId = ''
        this.delegationRoleSelect = []
      }
      this.roleShow = false
    },
    getSingleUserSelect(user) {
      if (user) {
@@ -272,9 +371,15 @@
    closeDept() {
      this.deptShow = false
    },
    closeUser() {
    closeSingleUser() {
      this.singleUserShow = false
    },
    closeRole() {
      this.roleShow = false
    },
    closeMultUser() {
      this.multUserShow = false
    },
    openDelegation(taskName) {
      this.delegationForm.taskName = taskName
      this.delegationForm.taskId = this.taskId