Commit 117b682c by 姜雷

Merge branch 'develop' into 'test'

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