|
@@ -80,6 +80,9 @@
|
|
<el-form-item size="mini" v-else label="权限标识" :label-width="formLabelWidth" prop="permission">
|
|
<el-form-item size="mini" v-else label="权限标识" :label-width="formLabelWidth" prop="permission">
|
|
<el-input v-model="form.permission" autocomplete="off"></el-input>
|
|
<el-input v-model="form.permission" autocomplete="off"></el-input>
|
|
</el-form-item>
|
|
</el-form-item>
|
|
|
|
+ <el-form-item label="是否显示" v-if="form.weight === 0" :label-width="formLabelWidth">
|
|
|
|
+ <el-switch v-model="form.ifShow"></el-switch>
|
|
|
|
+ </el-form-item>
|
|
<el-form-item size="mini" label="排序" :label-width="formLabelWidth">
|
|
<el-form-item size="mini" label="排序" :label-width="formLabelWidth">
|
|
<el-input v-model="form.sort" autocomplete="off"></el-input>
|
|
<el-input v-model="form.sort" autocomplete="off"></el-input>
|
|
</el-form-item>
|
|
</el-form-item>
|
|
@@ -111,6 +114,7 @@ export default {
|
|
sort: '',
|
|
sort: '',
|
|
weight: 0,
|
|
weight: 0,
|
|
permission: '',
|
|
permission: '',
|
|
|
|
+ ifShow: true,
|
|
},
|
|
},
|
|
formLabelWidth: '90px',
|
|
formLabelWidth: '90px',
|
|
rules: {
|
|
rules: {
|
|
@@ -152,6 +156,7 @@ export default {
|
|
sort: this.form.sort,
|
|
sort: this.form.sort,
|
|
weight: this.form.weight,
|
|
weight: this.form.weight,
|
|
permission: this.form.permission,
|
|
permission: this.form.permission,
|
|
|
|
+ ifShow: this.form.ifShow
|
|
}
|
|
}
|
|
addMenu(params)
|
|
addMenu(params)
|
|
.then(res => {
|
|
.then(res => {
|
|
@@ -179,6 +184,7 @@ export default {
|
|
this.form.sort = data.sort;
|
|
this.form.sort = data.sort;
|
|
this.form.permission = data.permission;
|
|
this.form.permission = data.permission;
|
|
this.form.weight = data.weight;
|
|
this.form.weight = data.weight;
|
|
|
|
+ this.form.ifShow = data.ifShow;
|
|
},
|
|
},
|
|
addMenu() {
|
|
addMenu() {
|
|
this.dialogFormVisible = true;
|
|
this.dialogFormVisible = true;
|
|
@@ -201,6 +207,7 @@ export default {
|
|
sort: this.form.sort,
|
|
sort: this.form.sort,
|
|
permission: this.form.permission,
|
|
permission: this.form.permission,
|
|
weight: this.form.weight,
|
|
weight: this.form.weight,
|
|
|
|
+ ifShow: this.form.ifShow
|
|
};
|
|
};
|
|
editMenu(params)
|
|
editMenu(params)
|
|
.then(res => {
|
|
.then(res => {
|
|
@@ -221,18 +228,11 @@ export default {
|
|
this.form.sort = '';
|
|
this.form.sort = '';
|
|
this.form.weight = 0;
|
|
this.form.weight = 0;
|
|
this.form.permission = '';
|
|
this.form.permission = '';
|
|
|
|
+ this.form.ifShow = true;
|
|
this.showType = false;
|
|
this.showType = false;
|
|
this.dialogFormVisible = false
|
|
this.dialogFormVisible = false
|
|
},
|
|
},
|
|
init() {
|
|
init() {
|
|
- // getMenu()
|
|
|
|
- // .then(res => {
|
|
|
|
- // if(res.code === 10000) {
|
|
|
|
- // // this.tableData = res.data;
|
|
|
|
- // // console.log(res.data)
|
|
|
|
- // }
|
|
|
|
- // })
|
|
|
|
-
|
|
|
|
let params = {
|
|
let params = {
|
|
userId: localStorage.getItem('gold_UserId')
|
|
userId: localStorage.getItem('gold_UserId')
|
|
}
|
|
}
|
|
@@ -252,22 +252,6 @@ export default {
|
|
]
|
|
]
|
|
}
|
|
}
|
|
})
|
|
})
|
|
- // getMenuList().then(res => {
|
|
|
|
- // if(res.code === 10000) {
|
|
|
|
- // // this.menuTreeData = [
|
|
|
|
- // // {
|
|
|
|
- // // id: -1,
|
|
|
|
- // // parentId: 0,
|
|
|
|
- // // title: '顶级',
|
|
|
|
- // // value: 0,
|
|
|
|
- // // pid: 0,
|
|
|
|
- // // weight: 0,
|
|
|
|
- // // children: res.data,
|
|
|
|
- // // }
|
|
|
|
- // // ]
|
|
|
|
- // // console.log(res)
|
|
|
|
- // }
|
|
|
|
- // })
|
|
|
|
}
|
|
}
|
|
},
|
|
},
|
|
mounted() {
|
|
mounted() {
|