|
@@ -88,7 +88,12 @@
|
|
|
</a-col>
|
|
|
|
|
|
<a-col :span="20">
|
|
|
- <a-input-search placeholder="请输入菜单名称" style="width: 180px" @search="searchMenu" />
|
|
|
+ <a-input-search
|
|
|
+ placeholder="请输入菜单名称"
|
|
|
+ style="width: 180px"
|
|
|
+ v-model="searchName"
|
|
|
+ @search="searchMenu"
|
|
|
+ />
|
|
|
</a-col>
|
|
|
</a-row>
|
|
|
</div>
|
|
@@ -160,14 +165,39 @@ export default {
|
|
|
placement: 'left', // 抽屉方向布局
|
|
|
selectList: [], // 已选功能
|
|
|
menuALL: {}, // 所有菜单
|
|
|
- bottomMenuList: [] // 后台接收快捷菜单
|
|
|
+ bottomMenuList: [], // 后台接收快捷菜单
|
|
|
+ searchName: '' // 搜索的菜单名称
|
|
|
}
|
|
|
},
|
|
|
created () {
|
|
|
this.getFooterNav() // 获取快捷导航
|
|
|
},
|
|
|
methods: {
|
|
|
- // 底部菜单跳转
|
|
|
+ // 搜索菜单
|
|
|
+ searchMenu () {
|
|
|
+ this.getMenuList()
|
|
|
+ },
|
|
|
+ // 所有菜单
|
|
|
+ getMenuList () {
|
|
|
+ this.$nextTick(() => {
|
|
|
+ let token = Vue.ls.get(ACCESS_TOKEN)
|
|
|
+ let params = { token: token, name: this.searchName }
|
|
|
+ console.log('params---->', params.name)
|
|
|
+ getUserPermissionByTokenBottom(params).then(res => {
|
|
|
+ console.log('所有菜单res---->', res)
|
|
|
+ if (res.success) {
|
|
|
+ this.menuALL = res.result.menu
|
|
|
+ }
|
|
|
+ })
|
|
|
+ })
|
|
|
+ },
|
|
|
+ // 设置快捷
|
|
|
+ showDrawer () {
|
|
|
+ // 每次打开抽屉时,重新渲染所有菜单
|
|
|
+ this.getMenuList()
|
|
|
+ this.visible = true
|
|
|
+ },
|
|
|
+ // 底部菜单跳转
|
|
|
menuPuth (item) {
|
|
|
console.log('点击快捷菜单', item)
|
|
|
this.visible = false
|
|
@@ -219,7 +249,6 @@ export default {
|
|
|
|
|
|
// 保存 快捷菜单
|
|
|
async drawerSave () {
|
|
|
- // console.log('保存')
|
|
|
await addBatch({ bottomMenuList: this.selectList }).then(res => {
|
|
|
if (res.success) {
|
|
|
// 无需其他操作
|
|
@@ -239,35 +268,12 @@ export default {
|
|
|
})
|
|
|
},
|
|
|
|
|
|
- // 所有菜单
|
|
|
- async getMenuList () {
|
|
|
- let token = Vue.ls.get(ACCESS_TOKEN)
|
|
|
- let params = { token: token }
|
|
|
- await getUserPermissionByTokenBottom(params).then(res => {
|
|
|
- // console.log('所有菜单res---->', res)
|
|
|
- if (res.success) {
|
|
|
- this.menuALL = res.result.menu
|
|
|
- // console.log('所有菜单res---->', res)
|
|
|
- }
|
|
|
- })
|
|
|
- },
|
|
|
// 抽屉取消
|
|
|
openTips () {
|
|
|
console.log('点击抽屉取消')
|
|
|
this.visible = false
|
|
|
},
|
|
|
|
|
|
- // 搜索菜单
|
|
|
- searchMenu () {
|
|
|
- console.log('设置搜索条件')
|
|
|
- },
|
|
|
- // 设置快捷
|
|
|
- showDrawer () {
|
|
|
- // 每次打开抽屉时,加载所有菜单
|
|
|
- this.getMenuList()
|
|
|
- this.visible = true
|
|
|
- },
|
|
|
-
|
|
|
// 底部导航 显示隐藏
|
|
|
handleChange () {
|
|
|
// console.log(this.isShow)
|