Commit 117b682c by 姜雷

Merge branch 'develop' into 'test'

Develop See merge request !1
parents 5830405c d04b925a
......@@ -4,7 +4,7 @@ $sideBar-width: 250px;
.main-container {
display: flex;
flex-direction: column;
max-height: calc(100vh - 70px);
max-height: calc(100vh - 100px);
transition: margin-left 0.28s;
margin-left: $sideBar-width;
} // 侧边栏
......
......@@ -8,7 +8,6 @@
<UserBox></UserBox>
</div>
<div>
<sidebar class="sidebar-container"></sidebar>
<div class="main-container">
<navbar></navbar>
......@@ -16,6 +15,9 @@
<app-main></app-main>
</div>
</div>
<!-- <div class="copyright">
@copyright
</div> -->
</div>
</template>
......@@ -49,6 +51,16 @@
margin-left: 67px;
text-indent: 20px;
}
.copyright {
box-sizing: border-box;
width: 100%;
height: 30px;
line-height: 30px;
text-align: center;
position: absolute;
top: calc(100vh - 30px);
padding-left: 250px;
}
}
</style>
......
......@@ -85,9 +85,9 @@ export default {
this.$refs.loginForm.validate(valid => {
if (valid) {
this.Login(this.loginForm)
.then(() => {
.then(path => {
console.log('login done');
this.$router.push({ path: '/' });
this.$router.push({ path: path });
})
.catch(err => {
console.log(err);
......
......@@ -213,6 +213,10 @@ export default {
width: 170px;
height: 96px;
margin-right: 20px;
img {
width: 100%;
height: 100%;
}
}
.previewItem:last-child {
margin-right: 0;
......
......@@ -30,7 +30,7 @@
</el-table-column>
<el-table-column prop="sex" :formatter="getSexValue" label="性别" min-width="50">
</el-table-column>
<el-table-column prop="birthday" :formatter="(c,r,val) => $formatDate(new Date(val),'yyyy-MM-dd')" label="出生年月" min-width="80">
<el-table-column prop="birthday" :formatter="(c,r,val) => val ? $formatDate(new Date(val),'yyyy-MM-dd') : ''" label="出生年月" min-width="80">
</el-table-column>
<el-table-column prop="cellphone" label="手机号" min-width="100">
</el-table-column>
......
......@@ -23,6 +23,7 @@ export const constantRouterMap = [
name: 'home',
redirect: 'home',
meta: { title: '首页', icon: 'example' },
hidden: true,
children: [
{
path: 'home',
......
......@@ -32,7 +32,17 @@ const actions = {
}
commit(UPDATE_USERINFO, admin);
dispatch('initRoute', menu).then(() => {
resolve();
let path = '/';
if (menu.length) {
path += menu[0].menuUrl;
if (menu[0].childList && menu[0].childList.length) {
path =
path.lastIndexOf('/') === path.length - 1
? path + menu[0].childList[0].menuUrl
: path + '/' + menu[0].childList[0].menuUrl;
}
}
resolve(path);
});
})
.catch(error => {
......
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