From 961a54152717ed343a6e16e923c67ef4afc1d5f1 Mon Sep 17 00:00:00 2001
From: Mr.Shi <1878285526@qq.com>
Date: 星期二, 22 八月 2023 11:16:32 +0800
Subject: [PATCH] 大屏
---
platform_web/src/components/system/menu/OperaMenuH5Window.vue | 44 +++++++++++++++++++++++++++-----------------
1 files changed, 27 insertions(+), 17 deletions(-)
diff --git a/platform_web/src/components/system/menu/OperaMenuH5Window.vue b/platform_web/src/components/system/menu/OperaMenuH5Window.vue
index 152131d..0c2c453 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="涓婁紶鍥炬爣"
@@ -29,7 +29,7 @@
@uploadBegin="isUploading=true"
/>
<div style="display: flex; flex-direction: column-reverse;" v-if="!!form.icon">
- <el-button style="margin-left: 5px; padding: 0 5px;" type="text" @click="form.icon=''">鍒犻櫎</el-button>
+ <el-button style="margin-left: 5px; padding: 0 5px;" type="text" @click="deletePic">鍒犻櫎</el-button>
</div>
</div>
</el-form-item>
@@ -59,8 +59,10 @@
// 闇�鎺掗櫎閫夋嫨鐨勮彍鍗旾D
excludeMenuId: null,
uploadData: {
- floader: 'company/menu'
+ // floader: 'company/menu'
+ folder: 'company/menu'
},
+ parent: {},
// 琛ㄥ崟鏁版嵁
form: {
id: null,
@@ -68,6 +70,7 @@
name: '',
path: '',
icon: '',
+ fullIcon: '',
remark: '',
type: '2'
},
@@ -79,6 +82,12 @@
}
}
},
+
+ created () {
+ this.config({
+ api: '/system/menu'
+ })
+ },
methods: {
/**
* @title: 绐楀彛鏍囬
@@ -86,18 +95,21 @@
* @parent: 鏂板缓鏃剁殑涓婄骇鑿滃崟
* @type: 0骞冲彴 1銆佷紒涓� 2銆乭5
*/
- open (title, target, parent, type) {
+ open (title, target, parent) {
+ debugger
this.title = title
+
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
+ this.form.fullIcon = ''
})
return
}
@@ -107,20 +119,18 @@
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;
+ },
+ deletePic() {
+ this.form.fullIcon=''
+ this.form.icon=''
}
- }
+ },
}
</script>
--
Gitblit v1.9.3