From 38b4e2bc4303d480200fd714a69e285e1462e83e Mon Sep 17 00:00:00 2001
From: feige <feige@qq.com>
Date: 星期三, 03 五月 2023 22:23:32 +0800
Subject: [PATCH] 修改了router/index.js中的魅宠详情 另外跳转是跳转到魅宠详情,pet/index.vue中已经修改 petInfo中route.params拿到的是pid,而不是id,之后可以拿到数据了

---
 ruoyi-ui/src/api/pet/index.js      |    4 +-
 ruoyi-ui/.env.development          |    2 
 ruoyi-ui/src/views/pet/petInfo.vue |   59 ++++++-----------------------
 ruoyi-ui/src/views/pet/index.vue   |    2 
 ruoyi-ui/src/router/index.js       |   10 ++--
 5 files changed, 22 insertions(+), 55 deletions(-)

diff --git a/ruoyi-ui/.env.development b/ruoyi-ui/.env.development
index a707833..8de5684 100644
--- a/ruoyi-ui/.env.development
+++ b/ruoyi-ui/.env.development
@@ -1,5 +1,5 @@
 # 椤甸潰鏍囬
-VUE_APP_TITLE = 鑻ヤ緷绠$悊绯荤粺
+VUE_APP_TITLE =  寮犳皬APP绠$悊绯荤粺
 
 # 寮�鍙戠幆澧冮厤缃�
 ENV = 'development'
diff --git a/ruoyi-ui/src/api/pet/index.js b/ruoyi-ui/src/api/pet/index.js
index 098d00e..19fb76a 100644
--- a/ruoyi-ui/src/api/pet/index.js
+++ b/ruoyi-ui/src/api/pet/index.js
@@ -47,9 +47,9 @@
   //榄呭疇涓讳汉淇℃伅
 
   //鏍规嵁瀹犵墿id鏌ヨ涓讳汉淇℃伅
-  export function getPetowner(id,pid) {
+  export function getPetowner(id) {
     return request({
-      url: '/zfMaster/' + id + '/pid='+pid,
+      url: '/zfMaster/' + id,
       method: 'get',
     })
   }
diff --git a/ruoyi-ui/src/router/index.js b/ruoyi-ui/src/router/index.js
index a2d11cb..d70d2f4 100644
--- a/ruoyi-ui/src/router/index.js
+++ b/ruoyi-ui/src/router/index.js
@@ -230,19 +230,19 @@
       }
     ]
   },
-  //榄呭疇澶囧繕褰�
+  //榄呭疇璇︽儏
   {
     path: '/familymodel/pet',
     component: Layout,
     // permissions: [],
     hidden: true,
-    permissions: ['familymodel:pet:list'],
+    permissions: ['familymodel:pet:info'],
 
     children: [
       {
-        path: 'petnote/:pid(\\d+)',
-        component: () => import('@/views/pet/petnote'),
-        name: 'petnote',
+        path: 'petInfo/:pid(\\d+)',
+        component: () => import('@/views/pet/petInfo'),
+        name: 'petInfo',
         meta: { title: '澶囧繕褰�',activeMenu: '/familymodel/zfPetNote'}
       }
     ]
diff --git a/ruoyi-ui/src/views/pet/index.vue b/ruoyi-ui/src/views/pet/index.vue
index 0fcdd19..cec544d 100644
--- a/ruoyi-ui/src/views/pet/index.vue
+++ b/ruoyi-ui/src/views/pet/index.vue
@@ -145,7 +145,7 @@
            </template>
           </el-table-column>
       <el-table-column label="棰滆壊" prop="color" sortable width="100" />
-      
+
       <!-- <el-table-column label="涓讳汉濮撳悕" prop="holder" sortable width="100" /> -->
       <el-table-column label="灞呬綇鍦板潃" prop="address" sortable width="100" />
       <el-table-column label="璇佷欢鍙风爜" prop="idNum" sortable width="100" />
diff --git a/ruoyi-ui/src/views/pet/petInfo.vue b/ruoyi-ui/src/views/pet/petInfo.vue
index db77c9b..782ece2 100644
--- a/ruoyi-ui/src/views/pet/petInfo.vue
+++ b/ruoyi-ui/src/views/pet/petInfo.vue
@@ -205,7 +205,7 @@
 
 
     </el-container>
-    
+
     <el-dialog  :visible.sync="dialogVisible">
       <img w-full :src="dialogImageUrl" alt="Preview Image" />
     </el-dialog>
@@ -300,7 +300,7 @@
   computed: {},
   watch: {},
   created() {
-    const id = this.$route.params && this.$route.params.id;
+    const id = this.$route.params && this.$route.params.pid;
     let jd;
     if(this.$route.query.detail!=undefined)
     {
@@ -320,58 +320,25 @@
       this.loading = true;
       getPetList(id).then((response) => {
         this.petList = response.data;
-        let paths = response.data.url.split(",");
-        for(let i = 0; i < paths.length; i++)
-        {
-          if(paths[i]!="") {
+        console.log(response.data)
 
-            let pth = paths[i].substr(paths[i].length - 4, paths[i].length)
-
-            if (_this.fot.includes(pth) === true)
-              _this.fileList.push({name:paths[i],url: process.env.VUE_APP_BASE_TRUE_API+paths[i]})
-            else {
-              // alert(paths[i])
-              let nms = paths[i].split("\/")
-              let nm = nms[nms.length - 1]
-              _this.fileListOther.push({name:nm, url: process.env.VUE_APP_BASE_TRUE_API+paths[i]})
-            }
-          }
-        }
-        
-        
         this.loading = false;
-   
       });
       this.getCateInfor()
-      
+
     };
-    if (id,pid) {
+    if (id) {
       this.loading = true;
-      getPetownerList(id,pid).then((response) => {
+      getPetownerList(id).then((response) => {
         this.petownerList = response.data;
-        let paths = response.data.url.split(",");
-        for(let i = 0; i < paths.length; i++)
-        {
-          if(paths[i]!="") {
+        console.log(response.data)
 
-            let pth = paths[i].substr(paths[i].length - 4, paths[i].length)
-
-            if (_this.fot.includes(pth) === true)
-              _this.fileList.push({name:paths[i],url: process.env.VUE_APP_BASE_TRUE_API+paths[i]})
-            else {
-              // alert(paths[i])
-              let nms = paths[i].split("\/")
-              let nm = nms[nms.length - 1]
-              _this.fileListOther.push({name:nm, url: process.env.VUE_APP_BASE_TRUE_API+paths[i]})
-            }
-          }
-        }
         this.loading = false;
-      
-   
+
+
       });
       this.getCateInfor()
-      
+
     };
     this.getList();
   },
@@ -419,7 +386,7 @@
         saveAs(blob, filename)
       })
     },
-  
+
 
    /** 澶囧繕褰� */
         Petnote(pid){
@@ -430,11 +397,11 @@
       const Base64 = require('js-base64').Base64
       this.desurl = process.env.VUE_APP_BASE_OTHER_API+'onlinePreview?url='+encodeURIComponent(Base64.encode(this.dialogFileUrl));
       myWindow=window.open(this.desurl,'','width=1200,height=800,top=150,left=300');
-        
+
       },
 //鍒犻櫎鍥剧墖
     handleRemoveFile(file,) {
-  
+
       for(let i = 0; i < this.fileListOther.length; i++)
       {
         if(this.fileListOther[i].url==file.url)

--
Gitblit v1.9.1