Commit a2b3dc6d by 姜雷

Merge branch 'develop' into test

parents 105abc71 d0af4d3b
......@@ -56,7 +56,7 @@ service.interceptors.response.use(response => {
});
// -2:其他客户端登录了;Token 过期了;
if (res.code === '-2') {
if (res.code === -2) {
if (logout) return;
logout = true;
MessageBox.confirm(
......
<template>
<div class="tab-container">
homePage
<img src="@/assets/images/request_timeout@3x.png" alt="">
</div>
</template>
......
<template>
<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">
<h3 class="title">{{title}}</h3>
<el-form-item prop="username">
<!-- <div class="title">{{title}}</div> -->
<div class="title">成师后勤管理系统</div>
<el-form-item class="loginFormItem" prop="username">
<span class="svg-container svg-container_login">
<svg-icon icon-class="user" />
</span>
<el-input name="username" type="text" v-model="loginForm.name" autoComplete="on" placeholder="username" />
</el-form-item>
<el-form-item prop="password">
<el-form-item class="loginFormItem" prop="password">
<span class="svg-container">
<svg-icon icon-class="password"></svg-icon>
</span>
......@@ -28,6 +30,7 @@
</div> -->
</el-form>
</div>
</div>
</template>
<script>
......@@ -112,6 +115,8 @@ $light_gray: #eee;
height: 100%;
width: 100%;
background-color: $bg;
background-image: url('../../assets/images/login/login_bg@3x.png');
background-size: cover;
input:-webkit-autofill {
box-shadow: 0 0 0px 1000px #293444 inset !important;
-webkit-text-fill-color: #fff !important;
......@@ -122,7 +127,7 @@ $light_gray: #eee;
-webkit-appearance: none;
border-radius: 0px;
padding: 12px 5px 12px 15px;
color: $light_gray;
color: #666;
height: 47px;
}
.el-input {
......@@ -146,25 +151,35 @@ $light_gray: #eee;
}
}
.title {
font-size: 26px;
font-weight: 400;
font-size: 40px;
color: $light_gray;
margin: 0px auto 40px auto;
margin: 0px auto 70px auto;
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 {
position: absolute;
left: 0;
right: 0;
width: 400px;
padding: 35px 35px 15px 35px;
margin: 120px auto;
top: 200px;
right: 230px;
width: 336px;
}
.loginFormItem {
height: 52px;
background-color: #fff;
border-radius: 8px;
margin-bottom: 28px;
}
.el-form-item {
border: 1px solid rgba(255, 255, 255, 0.1);
background: rgba(0, 0, 0, 0.1);
border-radius: 5px;
// background: rgba(0, 0, 0, 0.1);
// border-radius: 5px;
color: #454545;
}
.show-pwd {
......@@ -182,4 +197,46 @@ $light_gray: #eee;
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>
......@@ -233,7 +233,7 @@ export default {
this.fetchCarPlateOptions();
}
let categoryName = JSON.parse(data.row.categoryName).map(
item => (item.checked ? `${item.name}` : `□ ${item.name}`)
item => (item.checked ? `${item.name}` : `▢ ${item.name}`)
);
this.selected = {
id: data.row.id,
......@@ -352,7 +352,7 @@ export default {
},
showPrintDialog(data) {
let categoryName = JSON.parse(data.row.categoryName).map(
item => (item.checked ? `${item.name}` : `□ ${item.name}`)
item => (item.checked ? `${item.name}` : `▢ ${item.name}`)
);
this.selected = {
id: data.row.id,
......
......@@ -5,36 +5,42 @@
<div class="tableRow">
<div :span="4" class="tableCell tabelCol-4">用车部门</div>
<div :span="10" class="tableCell tabelCol-10">{{selected.department}}</div>
<div :span="6" class="tableCell tabelCol-6">用车申请时间</div>
<div :span="4" class="tableCell tabelCol-4">{{selected.department}}</div>
<div :span="6" class="tableCell tabelCol-4">用车申请时间</div>
<div :span="4" class="tableCell tabelCol-6">{{selected.createDate}}</div>
</div>
<div class="tableRow">
<div :span="4" class="tableCell tabelCol-4">申请人</div>
<div :span="10" class="tableCell tabelCol-10">{{selected.name}}</div>
<div :span="6" class="tableCell tabelCol-6">用车人数</div>
<div :span="4" class="tableCell tabelCol-4">{{selected.userCount}}</div>
<div :span="6" class="tableCell tabelCol-4">用车人数</div>
<div :span="4" class="tableCell tabelCol-6">{{selected.userCount}}</div>
</div>
<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>
<div class="tableRow">
<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 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>
<div class="tableRow">
<div :span="4" class="tableCell tabelCol-4">部门负责人<br>签字(盖章)</div>
<div :span="4" class="tableCell tabelCol-10"></div>
<div :span="4" class="tableCell tabelCol-4">派车人</div>
<div :span="4" class="tableCell tabelCol-6">
<div :span="4" class="tableCell tabelCol-4 directCol">
<div>派车人</div>
<div>派车车牌</div>
</div>
<div :span="4" class="tableCell tabelCol-6 directCol">
<span>
{{selected.dealName}}
</span>
<br />
<span>
{{selected.carPlate}}
</span>
......@@ -42,19 +48,19 @@
</div>
<div class="tableRow">
<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">{{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">{{selected.trueKilometers}}</div>
<div :span="4" class="tableCell tabelCol-4">{{selected.trueKilometers?selected.trueKilometers:''}}</div>
</div>
<div class="tableRow">
<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">用车单价</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">{{selected.totalPrice}}</div>
<div :span="4" class="tableCell tabelCol-4">{{selected.totalPrice?selected.totalPrice:''}}</div>
</div>
<div class="tableRow">
<div :span="4" class="tableCell tabelCol-4">驾驶员签字</div>
......@@ -80,6 +86,14 @@ export default {
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() {
window.vmPrint = this.printHandle;
},
......@@ -97,31 +111,28 @@ export default {
color: #000;
border-collapse: collapse;
text-align: center;
max-width: 649px;
max-height: 978px;
width: 649px;
height: 978px;
text-align: center;
margin: 0 auto;
padding-bottom: 40px;
line-height: 40px;
line-height: 45px;
.tableTitle {
font-size: 20px;
line-height: 80px;
}
.printTable {
border: 1px solid #000;
.tal {
text-indent: 20px;
text-align: left;
}
.tableRow {
display: flex;
}
.tableCell {
display: flex;
justify-content: center;
align-items: center;
padding: 10px 0;
border-bottom: 1px solid #000;
border-right: 1px solid #000;
word-break: break-all;
white-space: wrap;
}
.tableCell:last-child {
border-right: none;
......@@ -129,6 +140,16 @@ export default {
.tableRow:last-child .tableCell {
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 {
width: 16.66667%;
}
......
......@@ -53,7 +53,13 @@ const actions = {
// 登出
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, '');
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