|  |  |  | 
|---|
|  |  |  | <el-form-item label="菜单名称" prop="name" required> | 
|---|
|  |  |  | <el-input v-model="form.name" placeholder="请输入菜单名称" v-trim maxlength="50"/> | 
|---|
|  |  |  | </el-form-item> | 
|---|
|  |  |  | <el-form-item label="访问路径" prop="path"> | 
|---|
|  |  |  | <el-form-item label="h5访问路径" prop="path"> | 
|---|
|  |  |  | <el-input v-model="form.path" placeholder="请输入访问路径" v-trim maxlength="200"/> | 
|---|
|  |  |  | </el-form-item> | 
|---|
|  |  |  | <el-form-item label="小程序访问路径" prop="pathSec"> | 
|---|
|  |  |  | <el-input v-model="form.pathSec" placeholder="请输入访问路径" v-trim maxlength="200"/> | 
|---|
|  |  |  | </el-form-item> | 
|---|
|  |  |  | <el-form-item label="图标" prop="icon" class="form-item-icon"> | 
|---|
|  |  |  | <div style="display: flex;"> | 
|---|
|  |  |  | 
|---|
|  |  |  | @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> | 
|---|
|  |  |  | 
|---|
|  |  |  | // 需排除选择的菜单ID | 
|---|
|  |  |  | excludeMenuId: null, | 
|---|
|  |  |  | uploadData: { | 
|---|
|  |  |  | floader: 'company/menu' | 
|---|
|  |  |  | // floader: 'company/menu' | 
|---|
|  |  |  | folder: 'company/menu' | 
|---|
|  |  |  | }, | 
|---|
|  |  |  | parent: {}, | 
|---|
|  |  |  | // 表单数据 | 
|---|
|  |  |  | 
|---|
|  |  |  | parentId: null, | 
|---|
|  |  |  | name: '', | 
|---|
|  |  |  | path: '', | 
|---|
|  |  |  | pathSec: '', | 
|---|
|  |  |  | icon: '', | 
|---|
|  |  |  | fullIcon: '', | 
|---|
|  |  |  | remark: '', | 
|---|
|  |  |  | 
|---|
|  |  |  | debugger | 
|---|
|  |  |  | this.title = title | 
|---|
|  |  |  |  | 
|---|
|  |  |  | console.log('-----',parent); | 
|---|
|  |  |  | this.visible = true | 
|---|
|  |  |  | // 新建,menu为空时表示新建菜单 | 
|---|
|  |  |  | if (target == null) { | 
|---|
|  |  |  | 
|---|
|  |  |  | this.form.id = null | 
|---|
|  |  |  | this.form.parentId = parent == null ? null : parent.id | 
|---|
|  |  |  | this.parentName = parent == null ? null : parent.name | 
|---|
|  |  |  | this.form.fullIcon = '' | 
|---|
|  |  |  | }) | 
|---|
|  |  |  | return | 
|---|
|  |  |  | } | 
|---|
|  |  |  | 
|---|
|  |  |  | uploadReverseSuccess(file) { | 
|---|
|  |  |  | this.form.icon = file.imgurl; | 
|---|
|  |  |  | this.form.fullIcon = file.imgurlfull; | 
|---|
|  |  |  | }, | 
|---|
|  |  |  | deletePic() { | 
|---|
|  |  |  | this.form.fullIcon='' | 
|---|
|  |  |  | this.form.icon='' | 
|---|
|  |  |  | } | 
|---|
|  |  |  | }, | 
|---|
|  |  |  | } | 
|---|