From d52b2bdc62a5722a96d3999a9ed96640f3945f91 Mon Sep 17 00:00:00 2001
From: k94314517 <8417338+k94314517@user.noreply.gitee.com>
Date: 星期五, 11 八月 2023 18:14:41 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/master'

---
 platform_web/src/components/system/menu/OperaMenuH5Window.vue |   35 ++++++++++++++++++++---------------
 1 files changed, 20 insertions(+), 15 deletions(-)

diff --git a/platform_web/src/components/system/menu/OperaMenuH5Window.vue b/platform_web/src/components/system/menu/OperaMenuH5Window.vue
index 152131d..2adcdd2 100644
--- a/platform_web/src/components/system/menu/OperaMenuH5Window.vue
+++ b/platform_web/src/components/system/menu/OperaMenuH5Window.vue
@@ -6,7 +6,7 @@
     :confirm-working="isWorking"
     @confirm="confirm"
   >
-    <p class="tip" v-if="form.parent != null && form.id == null">涓� <em>{{parentName}}</em> 鏂板缓瀛愯彍鍗�</p>
+    <p class="tip" v-if="form.parentId != null && form.id == null">涓� <em>{{parentName}}</em> 鏂板缓瀛愯彍鍗�</p>
     <el-form :model="form" ref="form" :rules="rules">
       <el-form-item label="涓婄骇鑿滃崟" prop="parentId">
         <MenuSelect v-if="visible" v-model="form.parentId" placeholder="璇烽�夋嫨涓婄骇鑿滃崟" type="2" :exclude-id="excludeMenuId" clearable :inline="false"/>
@@ -20,7 +20,7 @@
       <el-form-item label="鍥炬爣" prop="icon" class="form-item-icon">
         <div style="display: flex;">
           <UploadAvatarImage
-            :file="{ 'imgurlfull': form.icon, 'imgurl': form.icon }"
+            :file="{ 'imgurlfull': form.fullIcon, 'imgurl': form.icon }"
             :uploadData="uploadData"
             customStyle="width: 80px; height: 80px;"
             tipsLabel="涓婁紶鍥炬爣"
@@ -61,6 +61,7 @@
       uploadData: {
         floader: 'company/menu'
       },
+      parent: {},
       // 琛ㄥ崟鏁版嵁
       form: {
         id: null,
@@ -68,6 +69,7 @@
         name: '',
         path: '',
         icon: '',
+        fullIcon: '',
         remark: '',
         type: '2'
       },
@@ -79,6 +81,12 @@
       }
     }
   },
+  
+  created () {
+    this.config({
+      api: '/system/menu'
+    })
+  },
   methods: {
     /**
      * @title: 绐楀彛鏍囬
@@ -86,18 +94,21 @@
      * @parent: 鏂板缓鏃剁殑涓婄骇鑿滃崟
      * @type: 0骞冲彴 1銆佷紒涓� 2銆乭5
      */
-    open (title, target, parent, type) {
+    open (title, target, parent) {
+      debugger
       this.title = title
+      
+      console.log('-----',parent);
       this.visible = true
       // 鏂板缓锛宮enu涓虹┖鏃惰〃绀烘柊寤鸿彍鍗�
       if (target == null) {
         this.excludeMenuId = null
         this.$nextTick(() => {
           this.$refs.form.resetFields()
+          this.parent = parent
           this.form.id = null
           this.form.parentId = parent == null ? null : parent.id
           this.parentName = parent == null ? null : parent.name
-          this.form.type = type
         })
         return
       }
@@ -107,20 +118,14 @@
         for (const key in this.form) {
           this.form[key] = target[key]
         }
+        this.form.fullIcon = !!target.icon ? (target.resourcePath + target.icon) : ''
       })
-    }
-  },
-  created () {
-    this.config({
-      api: '/system/menu'
-    })
-  },
-  methods: {
+    },
     uploadReverseSuccess(file) {
-      // this.form. = file.imgurl;
-      this.form.icon = file.imgurlfull;
+      this.form.icon = file.imgurl;
+      this.form.fullIcon = file.imgurlfull;
     }
-  }
+  },
 }
 </script>
 

--
Gitblit v1.9.3