Commit e3b04df6 authored by 黄奎's avatar 黄奎
parents 0b9cea8b 721a1426
...@@ -11,7 +11,7 @@ export default { ...@@ -11,7 +11,7 @@ export default {
</script> </script>
<style> <style>
@import "//at.alicdn.com/t/font_1769104_25q16n3sqko.css"; @import "//at.alicdn.com/t/font_1769104_sg5novwcbz.css";
@import "./assets/css/common.css"; @import "./assets/css/common.css";
@import "./assets/css/zkcss.css"; @import "./assets/css/zkcss.css";
html, html,
......
...@@ -197,7 +197,7 @@ ...@@ -197,7 +197,7 @@
.el-submenu .el-menu-item { .el-submenu .el-menu-item {
padding-left: 0 !important; padding-left: 0 !important;
min-width: 130px !important; min-width: 129px !important;
padding: 0 !important; padding: 0 !important;
text-align: center; text-align: center;
} }
...@@ -269,7 +269,7 @@ ...@@ -269,7 +269,7 @@
.mainContainer .main_routerPage { .mainContainer .main_routerPage {
padding: 20px; padding: 20px;
/* height:100%; */ overflow-y: scroll;
} }
</style> </style>
...@@ -380,7 +380,7 @@ ...@@ -380,7 +380,7 @@
</ul> </ul>
</div> </div>
</div> </div>
<div class="main_routerPage"> <div class="main_routerPage" :style="{height: Height+'px'}">
<router-view /> <router-view />
</div> </div>
</div> </div>
...@@ -395,6 +395,7 @@ ...@@ -395,6 +395,7 @@
showTwo: false, showTwo: false,
defaultActive: '1-1', defaultActive: '1-1',
currentUser: {}, currentUser: {},
Height:0,
MenuList: [], //菜单列表 MenuList: [], //菜单列表
}; };
}, },
...@@ -432,6 +433,11 @@ ...@@ -432,6 +433,11 @@
}, },
mounted() { mounted() {
this.getMenuList(); this.getMenuList();
this.Height = document.documentElement.clientHeight - 60;
//监听浏览器窗口变化 
window.onresize = () => {
this.Height = document.documentElement.clientHeight - 60
}
} }
}; };
......
...@@ -79,22 +79,26 @@ ...@@ -79,22 +79,26 @@
<el-option label="三级" :key="3" :value="3"></el-option> <el-option label="三级" :key="3" :value="3"></el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item label="父级菜单编号" prop="ParentId"> <el-form-item label="父级菜单编号" v-if="addMsg.MenuLevel!=1" prop="ParentId">
<el-select style="width:234px;" size="small" v-model="addMsg.ParentId"> <el-select style="width:234px;" size="small" v-model="addMsg.ParentId">
<el-option label="编号1" :key="0" :value="0"></el-option> <el-option
<el-option label="编号2" :key="1" :value="1"></el-option> v-for="item in parentList"
:key="item.MenuId"
:label="item.MenuName"
:value="item.MenuId">
</el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item label="图标" prop="IconClass"> <el-form-item label="图标" prop="IconClass">
<el-input type="text" style="width:234px" size="small" maxlength="25" v-model="addMsg.IconClass"></el-input> <el-input type="text" style="width:234px" size="small" maxlength="25" v-model="addMsg.IconClass"></el-input>
</el-form-item> </el-form-item>
<el-form-item label="排序"> <el-form-item label="排序">
<el-input type="text" style="width:234px" size="small" maxlength="25" v-model="addMsg.SortNum"></el-input> <el-input type="text" style="width:234px" @keyup.native="checkInteger(addMsg,'SortNum')" size="small" maxlength="25" v-model="addMsg.SortNum"></el-input>
</el-form-item> </el-form-item>
</el-form> </el-form>
<span slot="footer" class="dialog-footer"> <span slot="footer" class="dialog-footer">
<el-button size="small" @click="menuDialog = false">取 消</el-button> <el-button size="small" @click="menuDialog = false">取 消</el-button>
<el-button size="small" type="primary" @click="addMenu()">确 定</el-button> <el-button size="small" type="primary" @click="submitForm('addMsg')">确 定</el-button>
</span> </span>
</el-dialog> </el-dialog>
</div> </div>
...@@ -121,8 +125,18 @@ ...@@ -121,8 +125,18 @@
Status: 0, Status: 0,
SortNum: 0, SortNum: 0,
}, },
parentList:[],
menurules: { menurules: {
MenuName: [{
required: true,
message: '请填写菜单名称。',
trigger: 'blur'
}],
// MenuUrl: [{
// required: true,
// message: '请填写菜单链接。',
// trigger: 'blur'
// }]
} }
}; };
}, },
...@@ -134,6 +148,16 @@ ...@@ -134,6 +148,16 @@
this.msg.pageIndex = val; this.msg.pageIndex = val;
this.getPageList(); this.getPageList();
}, },
submitForm(addMsg) {
//提交创建、修改表单
this.$refs[addMsg].validate(valid => {
if (valid) {
this.addMenu();
} else {
return false;
}
});
},
//重置菜单 //重置菜单
resetMsg(){ resetMsg(){
let msg = { let msg = {
...@@ -177,6 +201,7 @@ ...@@ -177,6 +201,7 @@
if (res.data.resultCode == 1) { if (res.data.resultCode == 1) {
this.addMsg = res.data.data; this.addMsg = res.data.data;
this.menuDialog=true; this.menuDialog=true;
this.getChildMenuList(this.addMsg.MenuLevel);
} else { } else {
this.Info(res.data.message); this.Info(res.data.message);
} }
...@@ -213,14 +238,14 @@ ...@@ -213,14 +238,14 @@
} }
}) })
}, },
//恢复菜单 //获取父级菜单编号
getChildMenuList(MenuLevel) { getChildMenuList(MenuLevel) {
this.parentList=[];
this.apipost("/api/Tenant/GetMenuChildList", { this.apipost("/api/Tenant/GetMenuChildList", {
MenuLevel: MenuLevel, MenuLevel: MenuLevel-1,
}, res => { }, res => {
console.log(res);
if (res.data.resultCode == 1) { if (res.data.resultCode == 1) {
this.parentList=res.data.data;
} else { } else {
this.Info(res.data.message); this.Info(res.data.message);
} }
...@@ -229,6 +254,7 @@ ...@@ -229,6 +254,7 @@
}, },
mounted() { mounted() {
this.getPageList(); this.getPageList();
this.getChildMenuList(1);
} }
}; };
......
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