From 745815f637e5385b2cbc23a6ae02401bb8b6c675 Mon Sep 17 00:00:00 2001
From: Ben Lin <maobin001@msn.com>
Date: 星期六, 08 三月 2025 14:22:36 +0800
Subject: [PATCH] 详情页面优化

---
 src/store/modules/queryInpage.ts |   22 ++++++++++++++++------
 1 files changed, 16 insertions(+), 6 deletions(-)

diff --git a/src/store/modules/queryInpage.ts b/src/store/modules/queryInpage.ts
index d1b907c..4c4a1e5 100644
--- a/src/store/modules/queryInpage.ts
+++ b/src/store/modules/queryInpage.ts
@@ -4,11 +4,12 @@
  * @version:
  * @Date: 2024-06-18 15:09:47
  * @LastEditors: Ben Lin
- * @LastEditTime: 2024-10-21 20:32:10
+ * @LastEditTime: 2024-10-23 22:52:45
  */
 import { defineStore } from 'pinia';
 import { store } from '@/store';
 import { isNullOrEmpty } from '/@/utils/is';
+import { useUserStore } from './user';
 
 interface QueryState {
   curSearchInfo: any[];
@@ -21,7 +22,7 @@
   state: (): QueryState => ({
     curSearchInfo: [],
     curPageName: '',
-    curCPInfo: []
+    curCPInfo: [],
   }),
   getters: {
     getCurSearchInfo(state): any[] {
@@ -43,6 +44,15 @@
           this.curSearchInfo.map((item) => {
             if (item.name == val.name) {
               item.searchInfo = val.searchInfo;
+              item.ByOrg = isNullOrEmpty(val.ByOrg) ? false : val.ByOrg;
+              item.searchInfo.option = !item.ByOrg
+                ? ''
+                : {
+                    //鏍规嵁鎹偣鏌ヨ锛屽繀闇�甯﹁繖涓弬鏁�
+                    UserId: useUserStore().getUserInfo.userId,
+                    ByOrg: true,
+                    CurOrg: useUserStore().getUserInfo.orgCode,
+                  };
             }
           });
         }
@@ -76,11 +86,11 @@
      * @param {string} tid
      * @return {*}
      */
-    async submitFunc(name, f) {
-      this.setCurSearchInfo({ name: name, searchInfo: f.getFieldsValue() });
+    async submitFunc(name, f, ByOrg: boolean) {
+      this.setCurSearchInfo({ name: name, searchInfo: f.getFieldsValue(), ByOrg: ByOrg });
     },
-    async resetFunc(name, f) {
-      this.setCurSearchInfo({ name: name, searchInfo: f.getFieldsValue() });
+    async resetFunc(name, f, ByOrg: boolean) {
+      this.setCurSearchInfo({ name: name, searchInfo: f.getFieldsValue(), ByOrg: ByOrg });
     },
   },
 });

--
Gitblit v1.9.3