提交 4cf52814 编写于 作者: tony001's avatar tony001

提交自定义组件

上级 90ca1f11
.login{ .login{
width: 100vh; width: 100vh;
height: 100vh; height: 100vh;
// background-image: url('../assets/images/login_bg.jpg'); > img{
background-size: cover; width: 100vw;
background-position: center; height: 100vh;
position: relative; }
.login-logo{
position: fixed;
left: 80px;
top: 80px;
}
.login-content{
position: fixed;
left: 10%;
top: 30%;
width: 60%;
>span{
color: #fff;
font-size: 84px;
}
}
&-con{ &-con{
position: fixed; position: fixed;
right: 160px; right: 160px;
top: 50%; top: 50%;
transform: translateY(-60%); transform: translateY(-60%);
width: 300px; width: 300px;
.ivu-card-head {
padding: 14px 6px;
>p{
line-height: 20px;
font-size: 14px;
color: #17233d;
font-weight: 700;
}
}
&-header{ &-header{
font-size: 16px; font-size: 16px;
font-weight: 300; font-weight: 300;
......
<template> <template>
<div class='login'> <div class='login'>
<img src="/assets/img/login_bg.png"/>
<div class="login-logo">
<img src ="/assets/img/logo.svg"/>
</div>
<div class="login-content">
<span>{{appTitle}}</span>
</div>
<div class='login-con'> <div class='login-con'>
<card :bordered="false"> <card :bordered="false">
<p slot='title'> <p slot='title'>
...@@ -55,7 +62,15 @@ export default class Login extends Vue { ...@@ -55,7 +62,15 @@ export default class Login extends Vue {
* @type {*} * @type {*}
* @memberof Login * @memberof Login
*/ */
public form: any = { loginname: null, password: null }; public form: any = { loginname: 'guest', password: 'guest' };
/**
* 应用标题
*
* @type {string}
* @memberof Login
*/
public appTitle:string = Environment.AppTitle;
/** /**
* 值规则 * 值规则
...@@ -118,8 +133,12 @@ export default class Login extends Vue { ...@@ -118,8 +133,12 @@ export default class Login extends Vue {
post.then((response: any) => { post.then((response: any) => {
if (response && response.status === 200) { if (response && response.status === 200) {
const data = response.data; const data = response.data;
if(data && data.token){
localStorage.setItem('token', data.token); localStorage.setItem('token', data.token);
}
if(data && data.user){
localStorage.setItem('user', JSON.stringify(data.user)); localStorage.setItem('user', JSON.stringify(data.user));
}
const url: any = this.$route.query.redirect ? this.$route.query.redirect : '*'; const url: any = this.$route.query.redirect ? this.$route.query.redirect : '*';
this.$router.push({ path: url }); this.$router.push({ path: url });
} }
......
...@@ -154,7 +154,8 @@ body { ...@@ -154,7 +154,8 @@ body {
.dashboard{ .dashboard{
padding: 8px; padding: 8px;
} }
.portlet-container{ .portlet-card, .portlet-container{
// .portlet-container{
background: #efefef; background: #efefef;
} }
.portlet-container::after{ .portlet-container::after{
......
import { UserDefaultComponent } from './user-default-register'; import { UserDefaultComponent } from './user-default-register';
import AppOrgPNum from './components/app-org-p-num/app-org-p-num.vue'
import AppOrgVocNumList from './components/app-org-voc-num-list/app-org-voc-num-list.vue'
export const UserComponent = { export const UserComponent = {
install(v: any, opt: any) { install(v: any, opt: any) {
UserDefaultComponent.install(v, opt); UserDefaultComponent.install(v, opt);
v.component('app-org-p-num', AppOrgPNum);
v.component('app-org-voc-num-list', AppOrgVocNumList);
} }
}; };
\ No newline at end of file
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
<row v-if="!isHasCustomized"> <row v-if="!isHasCustomized">
<div style = ''> <div style = ''>
<i-col :xs="{ span: 8, offset: 0}" :sm="{ span: 8, offset: 0}" :md="{ span: 8, offset: 0 }" :lg="{ span: 8, offset: 0 }"> <i-col :xs="{ span: 8, offset: 0}" :sm="{ span: 8, offset: 0}" :md="{ span: 8, offset: 0 }" :lg="{ span: 8, offset: 0 }">
<card :bordered="false" dis-hover :padding="0"> <card class="portlet-card" :bordered="false" dis-hover :padding="0">
<span> <span>
<view_db_sysportlet1 <view_db_sysportlet1
:viewState="viewState" :viewState="viewState"
...@@ -20,7 +20,7 @@ ...@@ -20,7 +20,7 @@
</card> </card>
</i-col> </i-col>
<i-col :xs="{ span: 16, offset: 0}" :sm="{ span: 16, offset: 0}" :md="{ span: 16, offset: 0 }" :lg="{ span: 16, offset: 0 }"> <i-col :xs="{ span: 16, offset: 0}" :sm="{ span: 16, offset: 0}" :md="{ span: 16, offset: 0 }" :lg="{ span: 16, offset: 0 }">
<card :bordered="false" dis-hover :padding="0"> <card class="portlet-card" :bordered="false" dis-hover :padding="0">
<span> <span>
<view_db_sysportlet2 <view_db_sysportlet2
:viewState="viewState" :viewState="viewState"
...@@ -34,7 +34,7 @@ ...@@ -34,7 +34,7 @@
</card> </card>
</i-col> </i-col>
<i-col :xs="{ span: 8, offset: 0}" :sm="{ span: 8, offset: 0}" :md="{ span: 8, offset: 0 }" :lg="{ span: 8, offset: 0 }"> <i-col :xs="{ span: 8, offset: 0}" :sm="{ span: 8, offset: 0}" :md="{ span: 8, offset: 0 }" :lg="{ span: 8, offset: 0 }">
<card :bordered="false" dis-hover :padding="0"> <card class="portlet-card" :bordered="false" dis-hover :padding="0">
<span> <span>
<view_db_sysportlet4 <view_db_sysportlet4
:viewState="viewState" :viewState="viewState"
...@@ -48,7 +48,7 @@ ...@@ -48,7 +48,7 @@
</card> </card>
</i-col> </i-col>
<i-col :xs="{ span: 8, offset: 0}" :sm="{ span: 8, offset: 0}" :md="{ span: 8, offset: 0 }" :lg="{ span: 8, offset: 0 }"> <i-col :xs="{ span: 8, offset: 0}" :sm="{ span: 8, offset: 0}" :md="{ span: 8, offset: 0 }" :lg="{ span: 8, offset: 0 }">
<card :bordered="false" dis-hover :padding="0"> <card class="portlet-card" :bordered="false" dis-hover :padding="0">
<span> <span>
<view_db_sysportlet3 <view_db_sysportlet3
:viewState="viewState" :viewState="viewState"
...@@ -62,7 +62,7 @@ ...@@ -62,7 +62,7 @@
</card> </card>
</i-col> </i-col>
<i-col :xs="{ span: 8, offset: 0}" :sm="{ span: 8, offset: 0}" :md="{ span: 8, offset: 0 }" :lg="{ span: 8, offset: 0 }"> <i-col :xs="{ span: 8, offset: 0}" :sm="{ span: 8, offset: 0}" :md="{ span: 8, offset: 0 }" :lg="{ span: 8, offset: 0 }">
<card :bordered="false" dis-hover :padding="0"> <card class="portlet-card" :bordered="false" dis-hover :padding="0">
<span> <span>
<view_db_sysportlet5 <view_db_sysportlet5
:viewState="viewState" :viewState="viewState"
......
...@@ -3,6 +3,10 @@ ...@@ -3,6 +3,10 @@
.app-list { .app-list {
flex-grow: 1; flex-grow: 1;
overflow-y: auto; overflow-y: auto;
height: 100%;
>div{
height: 100%;
}
.app-list-item { .app-list-item {
line-height: 34px; line-height: 34px;
} }
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册