Commit 0e6844fc authored by 黄奎's avatar 黄奎

页面修改

parent eddaf3d6
......@@ -11,11 +11,15 @@
class="col-6 q-pr-lg q-pb-lg" label="菜单名称" :rules="[val => !!val || '请填写菜单名称']" />
<q-input filled stack-label maxlength="100" :dense="false" v-model="objOption.MenuUrl" ref="MenuUrl"
class="col-6 q-pr-lg q-pb-lg" label="菜单地址" />
<div class="col-6 q-pr-lg q-pb-lg q-pt-lg">
<q-toggle size="md" label="固定用户中心" color="primary" :false-value="0" :true-value="1"
v-model="objOption.IsUserCenter" />
</div>
<q-select class="col-6 q-pb-lg" v-model="objOption.MenuType" :options="MenuTypeOpts" emit-value map-options
label="菜单类型" @input="queryMenuList()" />
<q-select class="col-6 q-pb-lg" v-model="objOption.MenuLevel" :options="MenuLevelOpts" emit-value map-options
<q-select class="col-6 q-pb-lg" v-if="objOption.IsUserCenter==0" v-model="objOption.MenuLevel" :options="MenuLevelOpts" emit-value map-options
label="菜单等级" @input="queryMenuList()" />
<q-select :option-value="(item) => item === null ? null : item.MenuId" option-label="MenuName"
<q-select v-if="objOption.IsUserCenter==0" :option-value="(item) => item === null ? null : item.MenuId" option-label="MenuName"
v-model="objOption.ParentId" :options="MenuList" label="上级菜单" :dense="false" emit-value map-options
class="col-6 q-pb-lg" />
<q-input stack-label maxlength="50" :dense="false" v-model="objOption.MenuIcon" class="col-6 q-pr-lg q-pb-lg"
......@@ -70,7 +74,8 @@
MenuLevel: -1, //菜单等级
MenuType: -1, //菜单类型
SortNum: 0, //排序
Status: 0, //状态(0-正常,1-禁用)},
Status: 0, //状态(0-正常,1-禁用)
IsUserCenter: 0, //是否个人中心页面
},
optionTitle: "",
//菜单列表
......@@ -130,6 +135,7 @@
this.objOption.MenuType = res.Data.MenuType;
this.objOption.SortNum = res.Data.SortNum;
this.objOption.Status = res.Data.Status;
this.objOption.IsUserCenter=res.Data.IsUserCenter;
})
this.optionTitle = "修改菜单信息"
} else {
......@@ -143,6 +149,7 @@
this.objOption.MenuType = -1;
this.objOption.SortNum = 0;
this.objOption.Status = 0;
this.objOption.IsUserCenter=0;
}
},
//关闭弹窗
......
......@@ -108,8 +108,14 @@
<div class="row no-wrap q-pa-md">
<div class="column">
<div class="text-h6 q-mb-md">Settings</div>
<q-toggle label="Use Mobile Data" />
<q-toggle label="Bluetooth" />
<q-list bordered padding v-if="userCenterMenuList&&userCenterMenuList.length>0">
<q-item v-for="(uItem,uIndex) in userCenterMenuList" :to="uItem.MenuUrl" :key="uIndex">
<q-item-section avatar>
<q-icon :name="uItem.MenuIcon" />
</q-item-section>
<q-item-section>{{uItem.MenuName}}</q-item-section>
</q-item>
</q-list>
</div>
<q-separator vertical inset class="q-mx-lg" />
<div class="column items-center">
......@@ -209,7 +215,8 @@
backgroundColor: '#027be3',
width: '5px',
opacity: 0.75
}
},
userCenterMenuList: [], //用户中心菜单
}
},
watch: {
......@@ -221,9 +228,12 @@
},
userInfo: {
handler: function (newVal) {
let i = this.tab.split('_')[1]
let i = this.tab.split('_')[1];
if (newVal && newVal.MenuList) {
this.secondNavs = newVal.MenuList.length > 0 ? newVal.MenuList[i].SubList : []
this.secondNavs = newVal.MenuList.length > 0 ? newVal.MenuList[i].SubList : [];
}
if (newVal && newVal.UserCenterList) {
this.userCenterMenuList = newVal.UserCenterList;
}
},
immediate: true
......@@ -245,6 +255,8 @@
if (this.userInfo && this.userInfo.MenuList) {
this.secondNavs = this.userInfo.MenuList.length > 0 ? this.userInfo.MenuList[i].SubList : []
}
},
methods: {
logout() {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment