From 6365ab0a976afdd247742c9b3dca15deb3a7a7a1 Mon Sep 17 00:00:00 2001 From: jiangping <jp@doumee.com> Date: 星期四, 17 八月 2023 17:21:40 +0800 Subject: [PATCH] 初始化1.0.1 --- platform_web/src/components/system/menu/OperaMenuH5Window.vue | 44 +++++++++++++++++--------------------------- 1 files changed, 17 insertions(+), 27 deletions(-) diff --git a/platform_web/src/components/system/menu/OperaMenuH5Window.vue b/platform_web/src/components/system/menu/OperaMenuH5Window.vue index 0c2c453..152131d 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.parentId != null && form.id == null">涓� <em>{{parentName}}</em> 鏂板缓瀛愯彍鍗�</p> + <p class="tip" v-if="form.parent != 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.fullIcon, 'imgurl': form.icon }" + :file="{ 'imgurlfull': form.icon, '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="deletePic">鍒犻櫎</el-button> + <el-button style="margin-left: 5px; padding: 0 5px;" type="text" @click="form.icon=''">鍒犻櫎</el-button> </div> </div> </el-form-item> @@ -59,10 +59,8 @@ // 闇�鎺掗櫎閫夋嫨鐨勮彍鍗旾D excludeMenuId: null, uploadData: { - // floader: 'company/menu' - folder: 'company/menu' + floader: 'company/menu' }, - parent: {}, // 琛ㄥ崟鏁版嵁 form: { id: null, @@ -70,7 +68,6 @@ name: '', path: '', icon: '', - fullIcon: '', remark: '', type: '2' }, @@ -82,12 +79,6 @@ } } }, - - created () { - this.config({ - api: '/system/menu' - }) - }, methods: { /** * @title: 绐楀彛鏍囬 @@ -95,21 +86,18 @@ * @parent: 鏂板缓鏃剁殑涓婄骇鑿滃崟 * @type: 0骞冲彴 1銆佷紒涓� 2銆乭5 */ - open (title, target, parent) { - debugger + open (title, target, parent, type) { 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.fullIcon = '' + this.form.type = type }) return } @@ -119,18 +107,20 @@ for (const key in this.form) { this.form[key] = target[key] } - this.form.fullIcon = !!target.icon ? (target.resourcePath + target.icon) : '' }) - }, - uploadReverseSuccess(file) { - this.form.icon = file.imgurl; - this.form.fullIcon = file.imgurlfull; - }, - deletePic() { - this.form.fullIcon='' - this.form.icon='' } }, + created () { + this.config({ + api: '/system/menu' + }) + }, + methods: { + uploadReverseSuccess(file) { + // this.form. = file.imgurl; + this.form.icon = file.imgurlfull; + } + } } </script> -- Gitblit v1.9.3