From b57c81c1da4ad71edf2073c21e7cebb38123b961 Mon Sep 17 00:00:00 2001
From: peng <peng.com>
Date: 星期一, 27 十月 2025 17:08:00 +0800
Subject: [PATCH] 页面调整

---
 manager/src/views/userAction/userActionRecord.vue |   86 ++++++++++++++++++++++++------------------
 1 files changed, 49 insertions(+), 37 deletions(-)

diff --git a/manager/src/views/userAction/userActionRecord.vue b/manager/src/views/userAction/userActionRecord.vue
index 85a6a68..25b7e87 100644
--- a/manager/src/views/userAction/userActionRecord.vue
+++ b/manager/src/views/userAction/userActionRecord.vue
@@ -66,7 +66,7 @@
         </Page>
       </Row>
     </Card>
-    
+
     <!-- 鐢ㄦ埛琛屼负璇︽儏寮圭獥 -->
     <Modal
       v-model="detailModalVisible"
@@ -79,19 +79,19 @@
         <!-- 璇︽儏绛涢�夋潯浠� -->
         <Row @keydown.enter.native="handleDetailSearch">
           <Form ref="detailSearchForm" :model="detailSearchForm" inline :label-width="80" style="width: 100%" class="search-form">
-            <Form-item label="鐢ㄦ埛鏄电О" prop="userName">
-              <Input type="text" v-model="detailSearchForm.userName" placeholder="璇疯緭鍏ョ敤鎴锋樀绉�" clearable style="width: 200px" />
-            </Form-item>
+<!--            <Form-item label="鐢ㄦ埛鏄电О" prop="userName">-->
+<!--              <Input type="text" v-model="detailSearchForm.userName" placeholder="璇疯緭鍏ョ敤鎴锋樀绉�" clearable style="width: 200px" />-->
+<!--            </Form-item>-->
             <Form-item label="椤甸潰绫诲瀷" prop="pageCode">
-              <Select 
-                v-model="detailSearchForm.pageCode" 
-                clearable 
+              <Select
+                v-model="detailSearchForm.pageCode"
+                clearable
                 filterable
                 style="width: 200px"
                 placeholder="璇烽�夋嫨椤甸潰绫诲瀷">
-                <Option 
-                  v-for="item in pageTypeOptions" 
-                  :key="item.value" 
+                <Option
+                  v-for="item in pageTypeOptions"
+                  :key="item.value"
                   :value="item.value"
                   :label="item.label">
                   {{ item.label }}
@@ -218,7 +218,7 @@
       ],
       columns: [
         {
-          title: "鐢ㄦ埛鍚嶇О",
+          title: "鐢ㄦ埛id",
           key: "userId",
           minWidth: 120
         },
@@ -295,7 +295,8 @@
                 },
                 on: {
                   click: () => {
-                    this.goToGoodsDetail(params.row.pageParams);
+                    // 淇敼锛氫娇鐢ㄦ柊绐楀彛鎵撳紑鍟嗗搧璇︽儏椤甸潰锛屼繚鐣欏脊绐�
+                    this.openGoodsDetailInNewTab(params.row.pageParams);
                   }
                 }
               }, '鏌ョ湅鍟嗗搧璇︽儏') : null,
@@ -308,7 +309,8 @@
                 },
                 on: {
                   click: () => {
-                    this.goToOrderDetail(params.row.pageParams);
+                    // 淇敼锛氫娇鐢ㄦ柊绐楀彛鎵撳紑璁㈠崟璇︽儏椤甸潰锛屼繚鐣欏脊绐�
+                    this.openOrderDetailInNewTab(params.row.pageParams);
                   }
                 }
               }, '鏌ョ湅璁㈠崟璇︽儏') : null
@@ -333,7 +335,7 @@
       },
       detailColumns: [
         {
-          title: "鐢ㄦ埛鍚嶇О",
+          title: "鐢ㄦ埛Id",
           key: "userId",
           minWidth: 120
         },
@@ -342,11 +344,7 @@
           key: "nickName",
           minWidth: 100
         },
-        {
-          title: "浼氳瘽ID",
-          key: "sessionId",
-          minWidth: 150
-        },
+
         {
           title: "椤甸潰绫诲瀷",
           key: "pageCode",
@@ -383,11 +381,6 @@
           }
         },
         {
-          title: "椤甸潰鍚嶇О",
-          key: "pageNameCn",
-          minWidth: 150
-        },
-        {
           title: "杩涘叆鏃堕棿",
           key: "enterTime",
           minWidth: 160
@@ -418,7 +411,8 @@
                   },
                   on: {
                     click: () => {
-                      this.goToGoodsDetail(params.row.pageParams);
+                      // 淇敼锛氫娇鐢ㄦ柊绐楀彛鎵撳紑鍟嗗搧璇︽儏椤甸潰锛屼繚鐣欏脊绐�
+                      this.openGoodsDetailInNewTab(params.row.pageParams);
                     }
                   }
                 }, '鏌ョ湅鍟嗗搧璇︽儏')
@@ -434,7 +428,8 @@
                   },
                   on: {
                     click: () => {
-                      this.goToOrderDetail(params.row.pageParams);
+                      // 淇敼锛氫娇鐢ㄦ柊绐楀彛鎵撳紑璁㈠崟璇︽儏椤甸潰锛屼繚鐣欏脊绐�
+                      this.openOrderDetailInNewTab(params.row.pageParams);
                     }
                   }
                 }, '鏌ョ湅璁㈠崟璇︽儏')
@@ -608,8 +603,8 @@
         this.getDataListWithoutValidation();
       });
     },
-    // 璺宠浆鍒板晢鍝佽鎯呴〉闈�
-    goToGoodsDetail(pageParams) {
+    // 鍦ㄦ柊鏍囩椤典腑鎵撳紑鍟嗗搧璇︽儏椤甸潰
+    openGoodsDetailInNewTab(pageParams) {
       try {
         // 瑙f瀽pageParams JSON瀛楃涓�
         const params = JSON.parse(pageParams);
@@ -621,20 +616,23 @@
           return;
         }
 
-        // 璺宠浆鍒板晢鍝佽鎯呴〉闈紝浼犻�掑弬鏁�
-        this.$router.push({
+        // 鏋勯�犲晢鍝佽鎯呴〉闈㈢殑URL
+        const routeData = this.$router.resolve({
           name: "goods-detail",
           query: {
             id: params.goodsId
           }
         });
+
+        // 鍦ㄦ柊鏍囩椤典腑鎵撳紑
+        window.open(routeData.href, '_blank');
       } catch (error) {
         console.error("瑙f瀽pageParams鍑洪敊:", error);
         this.$Message.error("鍙傛暟瑙f瀽澶辫触");
       }
     },
-    // 璺宠浆鍒拌鍗曡鎯呴〉闈�
-    goToOrderDetail(pageParams) {
+    // 鍦ㄦ柊鏍囩椤典腑鎵撳紑璁㈠崟璇︽儏椤甸潰
+    openOrderDetailInNewTab(pageParams) {
       try {
         // 瑙f瀽pageParams JSON瀛楃涓�
         const params = JSON.parse(pageParams);
@@ -646,13 +644,16 @@
           return;
         }
 
-        // 璺宠浆鍒拌鍗曡鎯呴〉闈紝浼犻�掕鍗曞彿鍙傛暟
-        this.$router.push({
+        // 鏋勯�犺鍗曡鎯呴〉闈㈢殑URL
+        const routeData = this.$router.resolve({
           name: "order-detail",
           query: {
             sn: params.sn
           }
         });
+
+        // 鍦ㄦ柊鏍囩椤典腑鎵撳紑
+        window.open(routeData.href, '_blank');
       } catch (error) {
         console.error("瑙f瀽pageParams鍑洪敊:", error);
         this.$Message.error("鍙傛暟瑙f瀽澶辫触");
@@ -672,7 +673,7 @@
     // 鑾峰彇璇︽儏鏁版嵁
     getDetailData() {
       this.detailTableLoading = true;
-      
+
       // 澶勭悊鏃堕棿鏍煎紡
       const params = { ...this.detailSearchForm };
       if (params.beginDate) {
@@ -681,7 +682,7 @@
       if (params.endDate) {
         params.endDate = this.formatDate(params.endDate);
       }
-      
+
       // 璋冪敤涓巙serAction.vue鐩稿悓鐨勬帴鍙o紝浣嗗鍔爑serId鍙傛暟
       userStayList(params).then(res => {
         if (res.code === 200) {
@@ -730,6 +731,17 @@
       console.log("nextTick鍥炶皟锛岃皟鐢╥nit鏂规硶");
       this.init();
     });
+  },
+  // 娣诲姞璺敱鐩戝惉锛屽鐞嗛〉闈㈠洖鏄鹃棶棰�
+  watch: {
+    $route(to, from) {
+      // 褰撹矾鐢卞彂鐢熷彉鍖栨椂锛屽鏋滃綋鍓嶆槸userActionRecord椤甸潰锛屽垯閲嶆柊鍔犺浇鏁版嵁
+      if (to.name === 'user-action-record') {
+        this.$nextTick(() => {
+          this.getDataListWithoutValidation();
+        });
+      }
+    }
   }
 };
 </script>
@@ -773,4 +785,4 @@
 .mt_10 {
   padding: 10px 0;
 }
-</style>
\ No newline at end of file
+</style>

--
Gitblit v1.8.0