Commit a2b3dc6d by 姜雷

Merge branch 'develop' into test

parents 105abc71 d0af4d3b
...@@ -56,7 +56,7 @@ service.interceptors.response.use(response => { ...@@ -56,7 +56,7 @@ service.interceptors.response.use(response => {
}); });
// -2:其他客户端登录了;Token 过期了; // -2:其他客户端登录了;Token 过期了;
if (res.code === '-2') { if (res.code === -2) {
if (logout) return; if (logout) return;
logout = true; logout = true;
MessageBox.confirm( MessageBox.confirm(
......
<template> <template>
<div class="tab-container"> <div class="tab-container">
homePage <img src="@/assets/images/request_timeout@3x.png" alt="">
</div> </div>
</template> </template>
......
<template> <template>
<div class="login-container"> <div class="login-container">
<div class="login-form-wrap">
<el-form autoComplete="on" :model="loginForm" :rules="loginRules" ref="loginForm" label-position="left" label-width="0px" class="card-box login-form"> <el-form autoComplete="on" :model="loginForm" :rules="loginRules" ref="loginForm" label-position="left" label-width="0px" class="card-box login-form">
<h3 class="title">{{title}}</h3> <!-- <div class="title">{{title}}</div> -->
<el-form-item prop="username"> <div class="title">成师后勤管理系统</div>
<el-form-item class="loginFormItem" prop="username">
<span class="svg-container svg-container_login"> <span class="svg-container svg-container_login">
<svg-icon icon-class="user" /> <svg-icon icon-class="user" />
</span> </span>
<el-input name="username" type="text" v-model="loginForm.name" autoComplete="on" placeholder="username" /> <el-input name="username" type="text" v-model="loginForm.name" autoComplete="on" placeholder="username" />
</el-form-item> </el-form-item>
<el-form-item prop="password"> <el-form-item class="loginFormItem" prop="password">
<span class="svg-container"> <span class="svg-container">
<svg-icon icon-class="password"></svg-icon> <svg-icon icon-class="password"></svg-icon>
</span> </span>
...@@ -28,6 +30,7 @@ ...@@ -28,6 +30,7 @@
</div> --> </div> -->
</el-form> </el-form>
</div> </div>
</div>
</template> </template>
<script> <script>
...@@ -112,6 +115,8 @@ $light_gray: #eee; ...@@ -112,6 +115,8 @@ $light_gray: #eee;
height: 100%; height: 100%;
width: 100%; width: 100%;
background-color: $bg; background-color: $bg;
background-image: url('../../assets/images/login/login_bg@3x.png');
background-size: cover;
input:-webkit-autofill { input:-webkit-autofill {
box-shadow: 0 0 0px 1000px #293444 inset !important; box-shadow: 0 0 0px 1000px #293444 inset !important;
-webkit-text-fill-color: #fff !important; -webkit-text-fill-color: #fff !important;
...@@ -122,7 +127,7 @@ $light_gray: #eee; ...@@ -122,7 +127,7 @@ $light_gray: #eee;
-webkit-appearance: none; -webkit-appearance: none;
border-radius: 0px; border-radius: 0px;
padding: 12px 5px 12px 15px; padding: 12px 5px 12px 15px;
color: $light_gray; color: #666;
height: 47px; height: 47px;
} }
.el-input { .el-input {
...@@ -146,25 +151,35 @@ $light_gray: #eee; ...@@ -146,25 +151,35 @@ $light_gray: #eee;
} }
} }
.title { .title {
font-size: 26px; font-size: 40px;
font-weight: 400;
color: $light_gray; color: $light_gray;
margin: 0px auto 40px auto; margin: 0px auto 70px auto;
text-align: center; text-align: center;
font-weight: bold; }
.login-form-wrap {
width: 1290px;
height: 730px;
background: url('../../assets/images/login/login_screen_bg@3x.png') center
no-repeat;
margin: 100px auto 0;
position: relative;
} }
.login-form { .login-form {
position: absolute; position: absolute;
left: 0; top: 200px;
right: 0; right: 230px;
width: 400px; width: 336px;
padding: 35px 35px 15px 35px; }
margin: 120px auto; .loginFormItem {
height: 52px;
background-color: #fff;
border-radius: 8px;
margin-bottom: 28px;
} }
.el-form-item { .el-form-item {
border: 1px solid rgba(255, 255, 255, 0.1); border: 1px solid rgba(255, 255, 255, 0.1);
background: rgba(0, 0, 0, 0.1); // background: rgba(0, 0, 0, 0.1);
border-radius: 5px; // border-radius: 5px;
color: #454545; color: #454545;
} }
.show-pwd { .show-pwd {
...@@ -182,4 +197,46 @@ $light_gray: #eee; ...@@ -182,4 +197,46 @@ $light_gray: #eee;
bottom: 28px; bottom: 28px;
} }
} }
@media screen and (max-width: 1334px) {
.login-container {
background-image: url('../../assets/images/login/login_bg@2x.png');
input {
padding: 12px 5px 12px 15px;
height: 31px;
}
.el-input {
height: 31px;
}
.login-form-wrap {
width: 860px;
height: 487px;
background: url('../../assets/images/login/login_screen_bg@2x.png') center;
}
.login-form {
top: 133.333px;
right: 152.333px;
width: 224px;
}
.title {
font-size: 26px;
margin: 0px auto 46px auto;
}
.loginFormItem {
height: 34px;
background-color: #fff;
border-radius: 8px;
margin-bottom: 28px;
.el-form-item__content {
line-height: 22px;
}
}
.svg-container {
padding: 6px 5px 6px 15px;
width: 20px;
&_login {
font-size: 14px;
}
}
}
}
</style> </style>
...@@ -233,7 +233,7 @@ export default { ...@@ -233,7 +233,7 @@ export default {
this.fetchCarPlateOptions(); this.fetchCarPlateOptions();
} }
let categoryName = JSON.parse(data.row.categoryName).map( let categoryName = JSON.parse(data.row.categoryName).map(
item => (item.checked ? `${item.name}` : `□ ${item.name}`) item => (item.checked ? `${item.name}` : `▢ ${item.name}`)
); );
this.selected = { this.selected = {
id: data.row.id, id: data.row.id,
...@@ -352,7 +352,7 @@ export default { ...@@ -352,7 +352,7 @@ export default {
}, },
showPrintDialog(data) { showPrintDialog(data) {
let categoryName = JSON.parse(data.row.categoryName).map( let categoryName = JSON.parse(data.row.categoryName).map(
item => (item.checked ? `${item.name}` : `□ ${item.name}`) item => (item.checked ? `${item.name}` : `▢ ${item.name}`)
); );
this.selected = { this.selected = {
id: data.row.id, id: data.row.id,
......
...@@ -5,36 +5,42 @@ ...@@ -5,36 +5,42 @@
<div class="tableRow"> <div class="tableRow">
<div :span="4" class="tableCell tabelCol-4">用车部门</div> <div :span="4" class="tableCell tabelCol-4">用车部门</div>
<div :span="10" class="tableCell tabelCol-10">{{selected.department}}</div> <div :span="10" class="tableCell tabelCol-10">{{selected.department}}</div>
<div :span="6" class="tableCell tabelCol-6">用车申请时间</div> <div :span="6" class="tableCell tabelCol-4">用车申请时间</div>
<div :span="4" class="tableCell tabelCol-4">{{selected.department}}</div> <div :span="4" class="tableCell tabelCol-6">{{selected.createDate}}</div>
</div> </div>
<div class="tableRow"> <div class="tableRow">
<div :span="4" class="tableCell tabelCol-4">申请人</div> <div :span="4" class="tableCell tabelCol-4">申请人</div>
<div :span="10" class="tableCell tabelCol-10">{{selected.name}}</div> <div :span="10" class="tableCell tabelCol-10">{{selected.name}}</div>
<div :span="6" class="tableCell tabelCol-6">用车人数</div> <div :span="6" class="tableCell tabelCol-4">用车人数</div>
<div :span="4" class="tableCell tabelCol-4">{{selected.userCount}}</div> <div :span="4" class="tableCell tabelCol-6">{{selected.userCount}}</div>
</div> </div>
<div class="tableRow tableMinHeightBig"> <div class="tableRow tableMinHeightBig">
<div :span="4" class="tableCell tabelCol-4">用车类型<br>(勾选)</div> <div :span="4" class="tableCell tabelCol-4">
<span>用车类型<br>(勾选)</span>
</div>
<div :span="20" class="tableCell tabelCol-20 tal">{{selected.categoryName}}</div> <div :span="20" class="tableCell tabelCol-20 tal">{{selected.categoryName}}</div>
</div> </div>
<div class="tableRow"> <div class="tableRow">
<div :span="4" class="tableCell tabelCol-4">用车起始时间</div> <div :span="4" class="tableCell tabelCol-4">用车起始时间</div>
<div :span="20" class="tableCell tabelCol-20 tal">{{selected.beginDate}} - {{selected.endDate}}(共 {{2}} 天)</div> <div :span="20" class="tableCell tabelCol-20 tal">{{selected.beginDate}} - {{selected.endDate}}(共 {{day}} 天)</div>
</div> </div>
<div class="tableRow tableMinHeightBig"> <div class="tableRow tableMinHeightBig">
<div :span="4" class="tableCell tabelCol-4">用车详细路线</div> <div :span="4" class="tableCell tabelCol-4">
<span>用车详细路线</span>
</div>
<div :span="20" class="tableCell tabelCol-20 tal">{{selected.lineDescription}}</div> <div :span="20" class="tableCell tabelCol-20 tal">{{selected.lineDescription}}</div>
</div> </div>
<div class="tableRow"> <div class="tableRow">
<div :span="4" class="tableCell tabelCol-4">部门负责人<br>签字(盖章)</div> <div :span="4" class="tableCell tabelCol-4">部门负责人<br>签字(盖章)</div>
<div :span="4" class="tableCell tabelCol-10"></div> <div :span="4" class="tableCell tabelCol-10"></div>
<div :span="4" class="tableCell tabelCol-4">派车人</div> <div :span="4" class="tableCell tabelCol-4 directCol">
<div :span="4" class="tableCell tabelCol-6"> <div>派车人</div>
<div>派车车牌</div>
</div>
<div :span="4" class="tableCell tabelCol-6 directCol">
<span> <span>
{{selected.dealName}} {{selected.dealName}}
</span> </span>
<br />
<span> <span>
{{selected.carPlate}} {{selected.carPlate}}
</span> </span>
...@@ -42,19 +48,19 @@ ...@@ -42,19 +48,19 @@
</div> </div>
<div class="tableRow"> <div class="tableRow">
<div :span="4" class="tableCell tabelCol-4">出车公里数</div> <div :span="4" class="tableCell tabelCol-4">出车公里数</div>
<div :span="4" class="tableCell tabelCol-4">{{selected.startKilometers}}</div> <div :span="4" class="tableCell tabelCol-4">{{selected.startKilometers?selected.startKilometers:''}}</div>
<div :span="4" class="tableCell tabelCol-4">收车公里数</div> <div :span="4" class="tableCell tabelCol-4">收车公里数</div>
<div :span="4" class="tableCell tabelCol-4">{{selected.stopKilometers}}</div> <div :span="4" class="tableCell tabelCol-4">{{selected.stopKilometers?selected.stopKilometers:''}}</div>
<div :span="4" class="tableCell tabelCol-4">实际公里数</div> <div :span="4" class="tableCell tabelCol-4">实际公里数</div>
<div :span="4" class="tableCell tabelCol-4">{{selected.trueKilometers}}</div> <div :span="4" class="tableCell tabelCol-4">{{selected.trueKilometers?selected.trueKilometers:''}}</div>
</div> </div>
<div class="tableRow"> <div class="tableRow">
<div :span="4" class="tableCell tabelCol-4">资金来源</div> <div :span="4" class="tableCell tabelCol-4">资金来源</div>
<div :span="4" class="tableCell tabelCol-4">{{selected.priceSource}}</div> <div :span="4" class="tableCell tabelCol-4">{{selected.priceSource}}</div>
<div :span="4" class="tableCell tabelCol-4">用车单价</div> <div :span="4" class="tableCell tabelCol-4">用车单价</div>
<div :span="4" class="tableCell tabelCol-4">{{selected.price}}</div> <div :span="4" class="tableCell tabelCol-4">{{selected.price?selected.price:''}}</div>
<div :span="4" class="tableCell tabelCol-4">用车金额</div> <div :span="4" class="tableCell tabelCol-4">用车金额</div>
<div :span="4" class="tableCell tabelCol-4">{{selected.totalPrice}}</div> <div :span="4" class="tableCell tabelCol-4">{{selected.totalPrice?selected.totalPrice:''}}</div>
</div> </div>
<div class="tableRow"> <div class="tableRow">
<div :span="4" class="tableCell tabelCol-4">驾驶员签字</div> <div :span="4" class="tableCell tabelCol-4">驾驶员签字</div>
...@@ -80,6 +86,14 @@ export default { ...@@ -80,6 +86,14 @@ export default {
selected: JSON.parse(data), selected: JSON.parse(data),
}; };
}, },
computed: {
day() {
let sed =
new Date(this.selected.endDate) - new Date(this.selected.beginDate);
return Math.ceil(sed / 1000 / 60 / 60 / 24);
},
},
created() { created() {
window.vmPrint = this.printHandle; window.vmPrint = this.printHandle;
}, },
...@@ -97,31 +111,28 @@ export default { ...@@ -97,31 +111,28 @@ export default {
color: #000; color: #000;
border-collapse: collapse; border-collapse: collapse;
text-align: center; text-align: center;
max-width: 649px; width: 649px;
max-height: 978px; height: 978px;
text-align: center; text-align: center;
margin: 0 auto; margin: 0 auto;
padding-bottom: 40px; line-height: 45px;
line-height: 40px;
.tableTitle { .tableTitle {
font-size: 20px; font-size: 20px;
line-height: 80px; line-height: 80px;
} }
.printTable { .printTable {
border: 1px solid #000; border: 1px solid #000;
.tal {
text-indent: 20px;
text-align: left;
}
.tableRow { .tableRow {
display: flex; display: flex;
} }
.tableCell { .tableCell {
display: flex;
justify-content: center;
align-items: center;
padding: 10px 0; padding: 10px 0;
border-bottom: 1px solid #000; border-bottom: 1px solid #000;
border-right: 1px solid #000; border-right: 1px solid #000;
word-break: break-all; word-break: break-all;
white-space: wrap;
} }
.tableCell:last-child { .tableCell:last-child {
border-right: none; border-right: none;
...@@ -129,6 +140,16 @@ export default { ...@@ -129,6 +140,16 @@ export default {
.tableRow:last-child .tableCell { .tableRow:last-child .tableCell {
border-bottom: none; border-bottom: none;
} }
.tal {
text-indent: 20px;
text-align: left;
justify-content: flex-start;
align-items: flex-start;
}
.directCol {
flex-direction: column;
line-height: 36px;
}
.tabelCol-4 { .tabelCol-4 {
width: 16.66667%; width: 16.66667%;
} }
......
...@@ -53,7 +53,13 @@ const actions = { ...@@ -53,7 +53,13 @@ const actions = {
// 登出 // 登出
LogOut({ commit, state }) { LogOut({ commit, state }) {
return logout(state.token).then(() => { return logout(state.token)
.then(() => {
commit(SET_TOKEN, '');
removeToken();
})
.catch(err => {
console.log(err);
commit(SET_TOKEN, ''); commit(SET_TOKEN, '');
removeToken(); removeToken();
}); });
......
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