asd26269546 1 rok pred
rodič
commit
946ce225f3

+ 1 - 1
src/views/index.vue

@@ -189,8 +189,8 @@ const getData = (() => {
 		//递归将数据内的deptList 改成 children
 		const changeData = (data) => {
 			data.forEach(item => {
+				item.children = item.deptList
 				if(item.deptList && item.deptList.length > 0) {
-					item.children = item.deptList
 					changeData(item.deptList)
 				}
 				if(item.userList && item.userList.length > 0) {

+ 9 - 2
src/views/process/processApproval/index.vue

@@ -305,6 +305,7 @@ import SendSubscribeWDLY from "@/components/WDLY/process/SendSubscribeWDLY";
 import SendPurchaseWDLY from "@/components/WDLY/process/SendPurchaseWDLY";
 import { ref } from "vue";
 const StagFlowKey = ref(["contract_flow", "sale_quotation_flow"]);
+import useUserStore from "@/store/modules/user";
 const processConfig = ref({
   subscribe_flow: { name: "申购" },
   purchase_flow: { name: "采购" },
@@ -346,7 +347,13 @@ const flowForm = reactive({
   data: {},
   fileList: [],
 });
-
+//获取当前用户id
+const userStore = useUserStore();
+let userId = ''
+userStore.getInfo().then((res) => {
+  console.log(res)
+  userId = res.user.userId
+})
 const uploadData = ref({});
 const flowRules = reactive({
   // remark: [{ required: true, message: "请输入处理意见", trigger: "blur" }],
@@ -749,7 +756,7 @@ const getRecords = (_id) => {
           const element = res.recordList[i];
           if(element.status == 2) {
             // 2为审批中
-            if(element.processedUser === res.recordList[i - 1].processedUser) {
+            if(res.recordList[i - 1].processedUserId == userId) {
               // 当前审批人和上一条审批人相同,开启撤回开关
               isRevocation.value = true;
             }