xiangpei
2025-01-07 8779375b26e23113ebfa5940e4e5dbe696980f53
流程设计-任务配置-人员类型组件重构:todo角色组件分页回显问题
21个文件已修改
1个文件已添加
772 ■■■■ 已修改文件
src/components/Process/designer.vue 9 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/components/Process/panel/PropertiesPanel.vue 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/components/Process/panel/TaskConfPanel.vue 547 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/components/Process/panel/formPanel.vue 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/components/flow/Dept/MyDept.vue 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/components/flow/Expression/index.vue 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/components/flow/Role/MyRole.vue 81 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/components/flow/User/MultUser.vue 63 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/components/flow/User/SingleUser.vue 18 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/components/flow/User/index.vue 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/flowable/definition/model.vue 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/flowable/task/myProcess/send/index.vue 9 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/function/api/purchase.js 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/function/leaveApply.vue 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/index.vue 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/projectEngineering/projectLibrary/projectDetails.vue 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/projectManage/plan/planInfo.vue 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/projectProcess/detail/index.vue 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/projectProcess/index.vue 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/todo/api/allTodoList.js 4 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/todo/api/myTodoList.js 4 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/todo/processTask.vue 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/components/Process/designer.vue
@@ -66,7 +66,7 @@
import TaskListener from './panel/taskListener'
import MultiInstance from './panel/multiInstance'
import CommonPanel from './panel/commonPanel'
import UserTaskPanel from './panel/taskPanel'
import UserTaskPanel from './panel/TaskConfPanel'
import ConditionPanel from './panel/conditionPanel'
import FormPanel from './panel/formPanel'
import OtherPanel from './panel/otherPanel'
@@ -139,11 +139,9 @@
      });
      // 监听选择事件,修改当前激活的元素以及表单
      this.modelerStore.modeler.on("selection.changed", ({newSelection}) => {
        console.log("数据改变1", newSelection)
        this.initFormOnChanged(newSelection[0] || null);
      });
      this.modelerStore.modeler.on("element.changed", ({element}) => {
        console.log("数据改变2")
        // 保证 修改 "默认流转路径" 类似需要修改多个元素的事件发生的时候,更新表单的元素与原选中元素不一致。
        if (element && element.id === this.elementId) {
          this.initFormOnChanged(element);
@@ -153,24 +151,19 @@
    // 初始化数据
    initFormOnChanged(element) {
      console.log(element, "节点数据")
      let activatedElement = element;
      if (!activatedElement) {
        console.log(1)
        activatedElement =
          this.modelerStore.elRegistry.find(el => el.type === "bpmn:Process") ??
          this.modelerStore.elRegistry.find(el => el.type === "bpmn:Collaboration");
      }
      if (!activatedElement) return;
      console.log(2, activatedElement)
      this.modelerStore.element = activatedElement;
      this.elementId = activatedElement.id;
      // 确保elementId值没变也要更新form组件选中的值
      if (this.formVisible) {
        console.log(this.modelerStore.element.businessObject.formKey, "新的值")
        this.$refs.formSelect.init()
      }
      console.log(3, this.elementId)
      this.elementType = activatedElement.type.split(":")[1] || "";
      this.conditionVisible = !!(
        this.elementType === "SequenceFlow" &&
src/components/Process/panel/PropertiesPanel.vue
@@ -107,7 +107,6 @@
        }
      })
      console.log(this.canConfigPropertyList, "这是什么鬼")
      this.elementPropertyList = JSON.parse(JSON.stringify(this.bpmnElementPropertyList ?? []));
    },
    openAttributesForm(attr, index) {
src/components/Process/panel/TaskConfPanel.vue
New file
@@ -0,0 +1,547 @@
<template>
  <div>
    <el-form label-width="80px" size="small">
      <el-form-item label="异步">
        <el-switch v-model="bpmnFormData.async" active-text="是" inactive-text="否" @change="updateElementTask('async')"/>
      </el-form-item>
      <el-form-item label="用户类型">
        <el-select v-model="bpmnFormData.userType" placeholder="用户类型" @change="updateUserType">
          <el-option
            v-for="item in userTypeOption"
            :key="item.value"
            :label="item.label"
            :value="item.value"
          />
        </el-select>
      </el-form-item>
      <el-form-item label="指定人员" v-if="bpmnFormData.userType === 'assignee'">
        <single-user ref="singleUser" :select-user="delegationUserSelect && delegationUserSelect.length > 0 ? delegationUserSelect[0].userId : null" :show="singleUserShow" @close="closeSingleUser" @submit="getSingleUserSelect" :key="singleUserKey"/>
        <div v-if="expSelect">
          <el-tag class="select-tag" :key="expSelect.id + 'kfc'" type="info" closable @close="removeExp">{{expSelect.expression}}</el-tag>
        </div>
        <div v-else>
          <el-tag class="select-tag" v-for="user in delegationUserSelect" :key="user.userId + 'abc'" type="info" closable @close="removeSingleUser(user)">{{user.nickName}}</el-tag>
        </div>
        <el-button-group class="ml-4" style="margin-top: 4px">
          <!--指定人员-->
          <el-tooltip class="box-item" effect="dark" content="指定人员" :disabled="typeButDisable" placement="bottom">
            <el-button size="mini" type="primary" icon="el-icon-user" :disabled="typeButDisable" @click="editSingleUser"/>
          </el-tooltip>
          <!--选择表达式-->
          <el-tooltip class="box-item" effect="dark" content="选择表达式" :disabled="expButDisable" placement="bottom">
            <el-button size="mini" type="warning" icon="el-icon-postcard" :disabled="expButDisable" @click="editExp"/>
          </el-tooltip>
        </el-button-group>
      </el-form-item>
      <el-form-item label="候选人员" v-else-if="bpmnFormData.userType === 'candidateUsers'">
        <mult-user ref="multUser" :select-user="delegationUserSelect" :show="multUserShow" @close="closeMultUser" @submit="getMultUserSelect" :key="multUserKey"/>
        <div v-if="expSelect">
          <el-tag class="select-tag" :key="expSelect.id + 'kfc'" type="info" closable @close="removeExp">{{expSelect.expression}}</el-tag>
        </div>
        <div v-else>
          <el-tag class="select-tag" v-for="user in delegationUserSelect" :key="user.userId + 'qwe'" type="info" closable @close="removeMultUser(user)">{{user.nickName}}</el-tag>
        </div>
        <el-button-group class="ml-4" style="margin-top: 4px">
          <!--候选人员-->
          <el-tooltip class="box-item" effect="dark" content="候选人员" :disabled="typeButDisable" placement="bottom">
            <el-button size="mini" type="primary" icon="el-icon-user" :disabled="typeButDisable" @click="editMultUser"/>
          </el-tooltip>
          <!--选择表达式-->
          <el-tooltip class="box-item" effect="dark" content="选择表达式" :disabled="expButDisable" placement="bottom">
            <el-button size="mini" type="warning" icon="el-icon-postcard" :disabled="expButDisable" @click="editExp"/>
          </el-tooltip>
        </el-button-group>
      </el-form-item>
      <el-form-item label="候选角色" v-else-if="bpmnFormData.userType === 'candidateGroups'">
        <my-role ref="role" :select-values="delegationRoleSelect" :show="roleShow" @close="closeRole" @submit="getRoleSelect" :key="roleKey"/>
        <div v-if="expSelect">
          <el-tag class="select-tag" :key="expSelect.id + 'kfc'" type="info" closable @close="removeExp">{{expSelect.expression}}</el-tag>
        </div>
        <div v-else>
          <el-tag class="select-tag" v-for="role in delegationRoleSelect" :key="role.roleId + 'rty'" type="info" closable @close="removeRole(role)">{{role.roleName}}</el-tag>
        </div>
        <el-button-group class="ml-4" style="margin-top: 4px">
          <!--候选角色-->
          <el-tooltip class="box-item" effect="dark" content="候选角色" :disabled="typeButDisable" placement="bottom">
            <el-button size="mini" type="primary" icon="el-icon-user" :disabled="typeButDisable"  @click="editRole"/>
          </el-tooltip>
          <!--选择表达式-->
          <el-tooltip class="box-item" effect="dark" content="选择表达式" :disabled="expButDisable" placement="bottom">
            <el-button size="mini" type="warning" icon="el-icon-postcard" :disabled="expButDisable" @click="editExp"/>
          </el-tooltip>
        </el-button-group>
      </el-form-item>
      <el-form-item label="候选部门" v-else>
        <MyDept ref="dept" :checkeds="delegationDeptSelect" :show="deptShow" @close="closeDept" @submit="getDeptSelect" :key="deptKey"/>
        <div v-if="expSelect">
          <el-tag class="select-tag" :key="expSelect.id + 'kfc'" type="info" closable @close="removeExp">{{expSelect.expression}}</el-tag>
        </div>
        <div v-else>
          <el-tag class="select-tag" v-for="dept in delegationDeptSelect" :key="dept.id + 'zxc'" type="info" closable @close="removeDept(dept)">{{dept.label}}</el-tag>
        </div>
        <el-button-group class="ml-4" style="margin-top: 4px">
          <!--候选部门-->
          <el-tooltip class="box-item" effect="dark" content="候选部门" :disabled="typeButDisable" placement="bottom">
            <el-button size="mini" type="primary" icon="el-icon-user" :disabled="typeButDisable" @click="editDept"/>
          </el-tooltip>
          <!--选择表达式-->
          <el-tooltip class="box-item" effect="dark" content="选择表达式" :disabled="expButDisable" placement="bottom">
            <el-button size="mini" type="warning" icon="el-icon-postcard" :disabled="expButDisable" @click="editExp"/>
          </el-tooltip>
        </el-button-group>
      </el-form-item>
      <el-form-item label="优先级">
        <el-input v-model="bpmnFormData.priority" @change="updateElementTask('priority')"/>
      </el-form-item>
      <el-form-item label="到期时间">
        <el-input v-model="bpmnFormData.dueDate" @change="updateElementTask('dueDate')"/>
      </el-form-item>
    </el-form>
    <!--选择表达式-->
    <el-dialog
      title="选择表达式"
      :visible.sync="expVisible"
      width="60%"
      :close-on-press-escape="false"
      :destroy-on-close="true"
      @close="closeExp"
    >
      <flow-exp :selectValues="expSelect" @handleSingleExpSelect="getExpSelect"></flow-exp>
      <div slot="footer" class="dialog-footer">
        <el-button size="small" type="primary" @click="checkExpComplete">确 定</el-button>
      </div>
    </el-dialog>
  </div>
</template>
<script>
import FlowExp from '@/components/flow/Expression'
import {StrUtil} from '@/utils/StrUtil'
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'
export default {
  name: "TaskConfPanel",
  components: {
    FlowExp,
    MyRole,
    MyDept,
    SingleUser,
    MultUser,
  },
  /** 组件传值  */
  props : {
    id: {
      type: String,
      required: true
    },
  },
  data() {
    return {
      typeButDisable: false, // 用户类型选择按钮是否禁用
      expButDisable: false, // 用户类型选择按钮是否禁用
      roleKey: 'role',
      deptKey: 'dept',
      multUserKey: 0,
      singleUserKey: 'single',
      roleShow: false, // 角色组显示
      delegationRoleSelect: [], // 选中角色
      multUserShow: false, // 用户组显示
      singleUserShow: false, // 指定用户显示
      delegationUserSelect: [], // 选中的用户
      deptShow: false, // 部门组显示
      delegationDeptSelect: [], // 选中部门
      expSelect: null,  // 选中表达式
      num: 0, // 用于触发用户选择更新
      expVisible: false,
      isIndeterminate: true,
      checkType: 'single', // 选类
      userType: '',
      userTypeOption: [
        {label: '指定人员', value: 'assignee'},
        {label: '候选人员', value: 'candidateUsers'},
        {label: '候选角色', value: 'candidateGroups'},
        {label: '候选部门', value: 'candidateDeptGroups'},
      ],
      checkAll: false,
      bpmnFormData: {
        userType: "candidateDeptGroups",
        assignee: "",
        candidateUsers: "",
        candidateGroups: "",
        dueDate: "",
        priority: "",
        dataType: "",
        expId: "",
      },
      // 数据回显
      selectData: {
        assignee: null,
        candidateUsers: null,
        candidateGroups: [],  // 角色
        candidateDeptGroups: [], // 部门
        exp: null,
      },
      otherExtensionList:[],
    }
  },
  /** 传值监听 */
  watch: {
    id: {
      handler(newVal) {
        if (StrUtil.isNotBlank(newVal)) {
          this.resetTaskForm();
        }
      },
      immediate: true, // 立即生效
    },
  },
  created() {
  },
  methods: {
    removeExp() {
      this.getExpSelect(null)
    },
    removeDept(dept) {
      let index = this.delegationDeptSelect.indexOf(dept);
      if (index !== -1) {
        this.delegationDeptSelect.splice(index, 1);
      }
      this.getDeptSelect(this.delegationDeptSelect)
    },
    removeRole(role) {
      let index = this.delegationRoleSelect.indexOf(role);
      if (index !== -1) {
        this.delegationRoleSelect.splice(index, 1);
      }
      this.getRoleSelect(this.delegationRoleSelect)
    },
    removeMultUser(user) {
      let index = this.delegationUserSelect.indexOf(user);
      if (index !== -1) {
        this.delegationUserSelect.splice(index, 1);
      }
      this.getMultUserSelect(this.delegationUserSelect)
    },
    removeSingleUser(user) {
      // 因为只能选一个用户,所以删了就没了
      this.getSingleUserSelect(null)
    },
    editDept() {
      this.$nextTick(() => {
        this.$refs.dept.setCheckList(this.delegationDeptSelect)
      })
      this.deptShow = true
    },
    editSingleUser() {
      if (this.delegationUserSelect && this.delegationUserSelect.length > 0) {
        this.$nextTick(() => {
          this.$refs.singleUser.setChecked(this.delegationUserSelect[0])
        })
      }
      this.singleUserShow = true
    },
    editRole() {
      if (this.delegationRoleSelect && this.delegationRoleSelect.length > 0) {
        this.$nextTick(() => {
          this.$refs.role.setChecked(this.delegationRoleSelect)
        })
      }
      this.roleShow = true
    },
    editMultUser() {
      if (this.delegationUserSelect && this.delegationUserSelect.length > 0) {
        this.multUserKey += '1'
        this.$nextTick(() => {
          this.$refs.multUser.setChecked(this.delegationUserSelect)
        })
      }
      this.multUserShow = true
    },
    editExp() {
      this.expVisible = true;
    },
    getDeptSelect(deptList) {
      if (deptList && deptList.length > 0) {
        this.deleteFlowAttar();
        this.updateCustomElement('dataType', 'fixed');
        this.updateCustomElement("candidateGroups", deptList.map(item => item.id).join(","));
        this.delegationDeptSelect = deptList
        this.expButDisable = true
      } else {
        this.delegationDeptSelect = []
        this.expButDisable = false
      }
      this.deptShow = false
      this.deptKey += '1'
    },
    getMultUserSelect(userList) {
      if (userList && userList.length > 0) {
        this.deleteFlowAttar();
        this.updateCustomElement('dataType', 'fixed');
        this.updateCustomElement(this.bpmnFormData.userType, userList.map(item => item.userId).join(","));
        this.delegationUserSelect = userList
        this.expButDisable = true
      } else {
        this.delegationUserSelect = []
        this.expButDisable = false
      }
      this.multUserShow = false
      this.multUserKey += 1;
    },
    getRoleSelect(roleList) {
      if (roleList && roleList.length > 0) {
        this.deleteFlowAttar();
        this.updateCustomElement('dataType', 'fixed');
        // userType = candidateGroups
        this.updateCustomElement(this.bpmnFormData.userType, roleList.map(item => item.roleId).join(","));
        this.delegationRoleSelect = roleList
        this.expButDisable = true
      } else {
        this.delegationRoleSelect = []
        this.expButDisable = false
      }
      this.roleShow = false
      this.roleKey += '1'
    },
    getSingleUserSelect(user) {
      if (user) {
        this.deleteFlowAttar();
        this.updateCustomElement('dataType', 'fixed');
        this.updateCustomElement(this.bpmnFormData.userType, user.userId);
        this.delegationUserSelect = [user]
        this.expButDisable = true
      } else {
        this.delegationUserSelect = []
        this.expButDisable = false
        this.deleteFlowAttar();
      }
      this.singleUserShow = false
      this.singleUserKey += '1'
    },
    getExpSelect(selection) {
      console.log(selection, "选中的表达式")
      if (selection) {
        this.expSelect = selection
        this.deleteFlowAttar();
        this.bpmnFormData[this.bpmnFormData.userType] = selection.name;
        this.updateCustomElement('dataType', selection.dataType);
        this.updateCustomElement('expId', selection.id.toString());
        const userType = this.bpmnFormData.userType === "candidateDeptGroups" ? "candidateGroups" : this.bpmnFormData.userType
        this.updateCustomElement(userType, selection.expression);
        this.handleSelectData("exp", selection.id);
        this.typeButDisable = true
      } else {
        this.expSelect = null
        this.typeButDisable = false
        this.deleteFlowAttar();
      }
    },
    closeExp() {
      this.expVisible = false
    },
    closeDept() {
      this.deptShow = false
      this.deptKey += '1'
    },
    closeSingleUser() {
      this.singleUserShow = false
      this.singleUserKey += '1'
    },
    closeRole() {
      this.roleShow = false
      this.roleKey += '1'
    },
    closeMultUser() {
      this.multUserShow = false
      this.multUserKey += 1;
    },
    // 初始化表单
    resetTaskForm() {
      // 初始化设为空值
      this.bpmnFormData = {
        userType: "candidateDeptGroups",
        assignee: "",
        candidateUsers: "",
        candidateGroups: "",
        dueDate: "",
        priority: "",
        dataType: "",
        expId: "",
      }
      this.selectData = {
        assignee: null,
        candidateUsers: null,
        candidateGroups: null,
        exp: null,
      }
      // 流程节点信息上取值
      for (let key in this.bpmnFormData) {
        const value = this.modelerStore.element?.businessObject[key] || this.bpmnFormData[key];
        this.$set(this.bpmnFormData, key, value);
      }
      console.log(this.bpmnFormData, "初始化数据")
      // 人员、角色、部门信息回显
      this.checkValuesEcho(this.bpmnFormData);
    },
    // 更新节点信息
    updateElementTask(key) {
      const taskAttr = Object.create(null);
      taskAttr[key] = this.bpmnFormData[key] || "";
      this.modelerStore.modeling.updateProperties(this.modelerStore.element, taskAttr);
    },
    // 更新自定义流程节点/参数信息
    updateCustomElement(key, value) {
      const taskAttr = Object.create(null);
      taskAttr[key] = value;
      this.modelerStore.modeling.updateProperties(this.modelerStore.element, taskAttr);
    },
    // 更新人员类型
    updateUserType(val) {
      console.log(val, "人员类型")
      // 删除xml中已选择数据类型节点
      this.deleteFlowAttar();
      // 清除已选人员数据
      if (val === "candidateDeptGroups") {
        val = "candidateGroups"
        this.delegationDeptSelect = []  // 部门
      } else if (val === "candidateGroups") {
        this.delegationRoleSelect = []  // 角色
      } else if (val === "assignee" || val === "candidateUsers") {
        this.delegationUserSelect = []   // 指定用户/候选用户
      }
      this.expSelect = null  // 表达式重置为空
      this.selectData = {
        assignee: null,
        candidateUsers: null,
        candidateGroups: null,
        exp: null,
      }
      this.typeButDisable = false
      this.expButDisable = false
      // 写入userType节点信息到xml
      this.updateCustomElement('userType', val);
    },
    // 设计器右侧表单数据回显
    checkValuesEcho(formData) {
      if (formData.expId) {
        this.getExpList(formData.expId);
        this.typeButDisable = true
        this.expButDisable = false
      } else {
        this.typeButDisable = false
        this.expSelect = null
        if ("candidateGroups" === formData.userType || "candidateDeptGroups" === formData.userType) {
          this.getRoleOrDeptReview(formData.candidateGroups)
        } else {
          this.getUserList(formData[formData.userType], formData.userType);
        }
      }
    },
    // 获取表达式信息
    getExpList(expId) {
      this.expSelect = this.modelerStore.expList?.find(item => item.id.toString() === expId);
    },
    // 获取人员信息
    getUserList(val, key) {
      if (StrUtil.isNotBlank(val)) {
        this.expButDisable = true
        this.typeButDisable = false
        if ('assignee' === key) {
          const uList = this.modelerStore.userList.filter(item => item.userId == val);
          this.delegationUserSelect = uList
        } else {
          const newArr = this.modelerStore.userList?.filter(i => val.split(',').includes(i.userId.toString()))
          this.delegationUserSelect = newArr
        }
      } else {
        this.expButDisable = false
        this.delegationUserSelect = []
      }
    },
    // 获取角色信息
    getRoleOrDeptReview(ids) {
      this.delegationDeptSelect = []
      this.delegationRoleSelect = []
      if (StrUtil.isNotBlank(ids)) {
        this.expButDisable = true
        this.typeButDisable = false
        // 根据id筛选出是角色还是部门
        const roleAndDeptIds = ids.split(",");
        const deptIds = roleAndDeptIds.filter(item => item.includes("dept"));
        const roleIds = roleAndDeptIds.filter(item => !item.includes("dept"));
        if (roleIds && roleIds.length > 0) {  // 角色
          const targetRoleList = this.modelerStore.roleList?.filter(i => roleIds.includes(i.roleId.toString()))
          this.delegationRoleSelect = targetRoleList;
          this.bpmnFormData.userType = "candidateGroups"
        }
        if (deptIds && deptIds.length > 0){ // 部门
          const targetDeptList = this.modelerStore.deptList?.filter(i => deptIds.includes(i.id))
          this.delegationDeptSelect = targetDeptList
          this.bpmnFormData.userType = "candidateDeptGroups"
        }
      } else {
        this.expButDisable = false
        this.delegationDeptSelect = []
        this.delegationRoleSelect = []
      }
    },
    // ------ 流程审批人员信息弹出框 start---------
    // 处理人员回显
    handleSelectData(key, value) {
      for (let oldKey in this.selectData) {
        if (key !== oldKey) {
          this.$set(this.selectData, oldKey, null);
        } else {
          this.$set(this.selectData, oldKey, value);
        }
      }
    },
    /*表达式选中赋值*/
    checkExpComplete() {
      this.expVisible = false;
    },
    // 删除节点
    deleteFlowAttar() {
      delete this.modelerStore.element.businessObject[`dataType`]
      delete this.modelerStore.element.businessObject[`expId`]
      delete this.modelerStore.element.businessObject[`assignee`]
      delete this.modelerStore.element.businessObject[`candidateUsers`]
      delete this.modelerStore.element.businessObject[`candidateGroups`]
    },
  }
}
</script>
<style scoped>
.select-tag {
  margin-right: 3px;
}
</style>
src/components/Process/panel/formPanel.vue
@@ -39,7 +39,6 @@
  watch: {
    id: {
      handler(newVal) {
        console.log("新的id值:", newVal)
        if (StrUtil.isNotBlank(newVal)) {
          this.init()
        }
@@ -59,12 +58,9 @@
    // 方法区
    resetFlowForm() {
      this.bpmnFormData.formKey = this.modelerStore.element.businessObject.formKey;
      console.log(this.bpmnFormData.formKey, "formKey!!")
    },
    updateElementFormKey(val) {
      console.log(val, "数据改变")
      console.log(this.bpmnFormData.formKey, "数据改变")
      this.init()
      if (StrUtil.isBlank(val)) {
        delete this.modelerStore.element.businessObject[`formKey`]
@@ -80,7 +76,6 @@
          item.formId = item.formId.toString();
        })
        this.formList = res.data;
        console.log("表单信息:", this.formList)
      })
    }
  }
src/components/flow/Dept/MyDept.vue
@@ -82,7 +82,7 @@
    },
    handleCheckChange(data, checked, indeterminate) {
      if (checked) {
        if (this.checkList.indexOf(data) === -1) {
        if (this.checkList.every(item => item.id !== data.id)) {
          this.checkList.push(data)
        }
      } else {
src/components/flow/Expression/index.vue
@@ -54,7 +54,7 @@
  props: {
    // 回显数据传值
    selectValues: {
      type: Number | String,
      type: Object,
      default: null,
      required: false
    }
@@ -93,8 +93,10 @@
  watch: {
    selectValues: {
      handler(newVal) {
        if (StrUtil.isNotBlank(newVal)) {
          this.radioSelected = newVal
        if (newVal) {
          this.radioSelected = newVal.id
        } else {
          this.radioSelected = null
        }
      },
      immediate: true,
src/components/flow/Role/MyRole.vue
@@ -24,13 +24,13 @@
        </el-form-item>
      </el-form>
      <el-table ref="dataTable"  v-loading="loading" :data="roleList" @selection-change="handleMultipleRoleSelect">
      <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">
        <el-table-column label="角色编号" prop="roleId"/>
        <el-table-column label="角色名称" prop="roleName" :show-overflow-tooltip="true"/>
        <el-table-column label="权限字符" prop="roleKey" :show-overflow-tooltip="true"/>
        <el-table-column label="显示顺序" prop="roleSort"/>
        <el-table-column label="创建时间" align="center" prop="createTime">
          <template slot-scope="scope">
            <span>{{ parseTime(scope.row.createTime) }}</span>
          </template>
@@ -110,65 +110,24 @@
    };
  },
  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() {
    console.log("我家在了")
    this.getList();
  },
  methods: {
    // 保存选中的数据id,row-key就是要指定一个key标识这一行的数据
    getRowKey (row) {
      return row.roleId
    },
    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 = []
      }
      console.log("接收到的数据", val)
      this.selectRoleList = val
      this.$nextTick(() => {
        val.forEach(check => {
          this.$refs.dataTable.toggleRowSelection(check, true)
        })
      });
    },
    close() {
      this.$emit("close")
@@ -187,8 +146,8 @@
      );
    },
    // 多选框选中数据
    handleMultipleRoleSelect(selection) {
      this.selectRoleList = selection
    handleMultipleRoleSelect(rows) {
      this.selectRoleList = rows
    },
    /** 搜索按钮操作 */
    handleQuery() {
src/components/flow/User/MultUser.vue
@@ -6,6 +6,7 @@
      width="65%"
      :destroy-on-close="true"
      :close-on-click-modal="false"
      :modal-append-to-body="false"
      :modal="false"
      :before-close="close">
      <el-row :gutter="20">
@@ -53,7 +54,7 @@
            </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 type="selection" align="center" :reserve-selection="true"/>
            <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" />
@@ -96,7 +97,7 @@
    },
    // 回显数据传值
    selectUserList: {
      type: Number,
      type: Array,
      default: null,
      required: false
    },
@@ -104,9 +105,9 @@
  },
  data() {
    return {
      innerSelected: [],
      innerSelected: [], // 选中
      // 遮罩层
      loading: true,
      loading: false,
      // 选中数组
      ids: [],
      // 显示搜索条件
@@ -148,7 +149,6 @@
        { key: 5, label: `状态`, visible: true },
        { key: 6, label: `创建时间`, visible: true }
      ],
      radioSelected: 0, // 单选框传值
    };
  },
  watch: {
@@ -156,46 +156,23 @@
    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();
    this.getList();
  },
  methods: {
    getRowKeys(row) {
      return row.userId
    },
    setChecked(val) {
      this.innerSelected = 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)
            }
          })
          this.$refs.dataTable.toggleRowSelection(check, true)
        })
      });
    },
    /** 查询用户列表 */
    getList() {
@@ -215,7 +192,7 @@
    },
    // 保存选中的数据id,row-key就是要指定一个key标识这一行的数据
    getRowKey (row) {
      return row.id
      return row.userId
    },
    // 筛选节点
    filterNode(value, data) {
@@ -229,11 +206,17 @@
    },
    // 传递选中值
    handleUserSelect(selectionList) {
      console.log("选中值", selectionList)
      this.innerSelected = selectionList
      console.log("原先值", this.innerSelected)
      this.innerSelected = [...new Set(selectionList)]
      console.log("选中值", this.innerSelected)
    },
    getSelected() {
      this.$emit('submit', this.innerSelected);
    },
    close() {
      this.$emit("close")
    },
    /** 搜索按钮操作 */
    handleQuery() {
@@ -248,9 +231,7 @@
      this.$refs.tree.setCurrentKey(null);
      this.handleQuery();
    },
    close() {
      this.$emit("close")
    },
  }
};
</script>
src/components/flow/User/SingleUser.vue
@@ -147,7 +147,6 @@
        { key: 5, label: `状态`, visible: true },
        { key: 6, label: `创建时间`, visible: true }
      ],
      radioSelected: 0, // 单选框传值
      selectUserList: [] // 回显数据传值
    };
  },
@@ -179,14 +178,15 @@
      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)
                }
              })
            if (this.$refs.dataTable) {
              if (! this.innerSelected) {
                newVal.forEach(item => {
                  if (this.innerSelected.userId === item.userId) {
                    this.innerSelected = item
                    this.$refs.dataTable.toggleRowSelection(item)
                  }
                })
              }
            }
          });
        } else {
src/components/flow/User/index.vue
@@ -245,8 +245,6 @@
        this.$nextTick(() => {
          this.$refs.dataTable.clearSelection();
          this.userList.forEach(item => {
            console.log("单选值:", this.radioSelected)
            console.log(parseInt(this.radioSelected) === item.userId)
            if (parseInt(this.radioSelected) === item.userId) {
              this.$refs.dataTable.toggleRowSelection(item)
            }
src/views/flowable/definition/model.vue
@@ -104,7 +104,6 @@
    /** 指定流程办理人员列表 */
    getDataList() {
      userList().then(res => {
        console.log(this.modelerStore, "dhg")
        this.modelerStore.userList = res.data;
      })
      roleList().then(res => {
src/views/flowable/task/myProcess/send/index.vue
@@ -84,7 +84,7 @@
          <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="候选用户" value="USER"></el-option>
              <el-option label="候选人员" value="USER"></el-option>
              <el-option label="候选部门" value="DEPT"></el-option>
              <el-option label="候选角色" value="ROLE"></el-option>
            </el-select>
@@ -98,7 +98,7 @@
              <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">
          <el-form-item v-if="delegationForm.peopleType === 'FIX_USER'" label="指定人员" prop="targetId">
            <single-user ref="singleUser" :select-user="delegationForm.targetId" :show="singleUserShow" @close="closeSingleUser" @submit="getSingleUserSelect"/>
            <div style="display: flex;align-items: center">
              <div>
@@ -107,7 +107,7 @@
              <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">
          <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>
@@ -339,6 +339,8 @@
      if (deptList && deptList.length > 0) {
        this.delegationForm.targetId = deptList.map(item => item.id).join(",")
        this.delegationDeptSelect = deptList
      } else {
        this.delegationDeptSelect = []
      }
      this.deptShow = false
    },
@@ -446,7 +448,6 @@
        //   })
        // }
      }).catch(res => {
        console.log("报错了:", res)
        this.goBack();
      })
    },
src/views/function/api/purchase.js
@@ -5,7 +5,6 @@
export const getPurchaseApplyList = data => {
    const queryString = commonUtil.objectToQueryStr(data);
    console.log("aaaaaaaaaaaaaaaaaaaaaaa2", queryString);
    return request({
        url: '/purchase/list',
        method: 'post',
@@ -47,4 +46,4 @@
        method: 'post',
        data: fd
    });
}
}
src/views/function/leaveApply.vue
@@ -100,7 +100,7 @@
                <el-form-item label="部门领导">
                    <el-select v-model="form.deptleader">
                        <el-option
                            v-for="(user, i) in userList"
                            v-for="(user, i) in userList"
                            :key="i"
                            :label="user.userName"
                            :value="user.userName"
@@ -170,7 +170,6 @@
    mounted() {
        this.getLeaveApplyListAndRender(this.searchParams)
        listUser().then(res => {
            console.log("获取用户", res);
            this.userList = res.rows;
        });
    },
@@ -184,7 +183,7 @@
                const ids = this.selectionIds.join(",");
                this.deleteByIdsAndRender(ids);
            });
        },
        handleExport() {
            this.$confirm('确定导出所有数据吗?', {
src/views/index.vue
@@ -208,7 +208,6 @@
            this.queryParams.endTime = this.timeMerge[1];
        },
        handleQuery() {
            console.log(this.queryParams);
            const obj = {
                startDate: this.queryParams.startTime,
                endDate: this.queryParams.endTime,
src/views/projectEngineering/projectLibrary/projectDetails.vue
@@ -131,7 +131,6 @@
    },
    handleClick(tabTarget) {
      this.componentName = this.TABS_DATA[tabTarget.index].componentName;
      console.log(this.projectForm);
    },
    changeTable(index) {
      this.componentName = this.TABS_DATA[index].componentName;
src/views/projectManage/plan/planInfo.vue
@@ -193,7 +193,6 @@
    // 保存当前行数据
    handleSave(index) {
      this.tableData[index].projectPlanRecordId = this.projectInfoData.id;
      console.log(this.tableData[index])
      savePlanInfo(this.tableData[index], this.planInfoData.id).then(response => {
        this.$message.success('保存成功');
      });
src/views/projectProcess/detail/index.vue
@@ -232,13 +232,16 @@
    },
    search() {
      this.queryParams.currentPage = 1;
      this.tableLoading = true
      this.getList()
    },
    sizeChange(pageSize) {
      this.tableLoading = true
      this.queryParams.pageSize = pageSize;
      this.getList()
    },
    pageChange(pageNum) {
      this.tableLoading = true
      this.queryParams.currentPage = pageNum;
      this.getList()
    },
src/views/projectProcess/index.vue
@@ -393,7 +393,6 @@
  methods: {
    // 查看详情
    lookProcessDetail(row) {
      console.log(row.processDefId)
      this.$router.push({
        path: '/projectFlow/detail',
        query: {
src/views/todo/api/allTodoList.js
@@ -3,9 +3,7 @@
// 获取我的待办
export const getAllTodoList = data => {
    console.log("aaaaaaaaaaaaaaaaaaaaaaa1");
    const queryString = commonUtil.objectToQueryStr(data);
    console.log("aaaaaaaaaaaaaaaaaaaaaaa2", queryString);
    return request({
        url: '/task/manage/alllist',
        method: 'post',
@@ -14,4 +12,4 @@
            'Content-Type': 'application/x-www-form-urlencoded'
        },
    });
}
}
src/views/todo/api/myTodoList.js
@@ -3,9 +3,7 @@
// 获取我的待办
export const getMyTodoList = data => {
    console.log("aaaaaaaaaaaaaaaaaaaaaaa1");
    const queryString = commonUtil.objectToQueryStr(data);
    console.log("aaaaaaaaaaaaaaaaaaaaaaa2", queryString);
    return request({
        url: '/task/manage/mylist',
        method: 'post',
@@ -101,4 +99,4 @@
        url: url + `?taskid=${taksId}`,
        method: 'get',
    });
}
}
src/views/todo/processTask.vue
@@ -109,7 +109,6 @@
                if (this.step === "input") {
                    const id = this.$route.query.id;
                    const {content} = data;
                    console.log(id);
                    fillMeetingRecord({
                        id,
                        content
@@ -118,7 +117,7 @@
                    });
                }
            }
            if (this.taskType === "leaveapply") {
                if (
                    this.step === "destroyapply"