gaoluyang
9 小时以前 5eb145f6ab64a130aab5519b3da3f536c23b4f8c
src/views/collaborativeApproval/approvalProcess/components/infoFormDia.vue
@@ -53,7 +53,11 @@
                  :key="node.id"
                  style="margin-right: 30px; text-align: center; margin-bottom: 10px;"
                >
                  <div>节点{{ index + 1 }} →</div>
                  <div>
                    <span v-if="index === 0">发起</span>
                    <span v-else>审批</span>
                    →
                  </div>
                  <el-select
                    v-model="node.userId"
                    placeholder="选择人员"
@@ -126,8 +130,8 @@
  approveProcessAdd, approveProcessGetInfo,
  approveProcessUpdate,
  getDept
} from "../../../../api/collaborativeApproval/approvalProcess.js";
import {userListNoPage, getUserProfile} from "../../../../api/system/user.js";
} from "@/api/collaborativeApproval/approvalProcess.js";
import {userListNoPageByTenantId} from "@/api/system/user.js";
const { proxy } = getCurrentInstance()
const emit = defineEmits(['close'])
import useUserStore from "@/store/modules/user";
@@ -156,6 +160,7 @@
});
const { form, rules } = toRefs(data);
const productOptions = ref([]);
const currentApproveStatus = ref(0)
// 审批人节点相关
const approverNodes = ref([
@@ -174,7 +179,7 @@
const openDialog = (type, row) => {
  operationType.value = type;
  dialogFormVisible.value = true;
  userListNoPage().then((res) => {
   userListNoPageByTenantId().then((res) => {
    userList.value = res.data;
  });
  getProductOptions();
@@ -182,13 +187,13 @@
   approverNodes.value = [
      { id: 1, userId: null }
   ]
   console.log(userStore)
  form.value.approveUser = userStore.id;
  form.value.approveTime = getCurrentDate();
  
  // 获取当前用户信息并设置部门ID
  form.value.approveDeptId = userStore.currentDeptId
  if (operationType.value === 'edit') {
      currentApproveStatus.value = row.approveStatus
    approveProcessGetInfo({id: row.approveId,approveReason: '1'}).then(res => {
         form.value = {...res.data}
      // 反显审批人
@@ -237,7 +242,7 @@
  }
  proxy.$refs.formRef.validate(valid => {
    if (valid) {
      if (operationType.value === "add") {
      if (operationType.value === "add" || currentApproveStatus.value == 3) {
        approveProcessAdd(form.value).then(res => {
          proxy.$modal.msgSuccess("提交成功");
          closeDia();