Commit 41f9441c authored by zhanglw's avatar zhanglw

下班,登录后台操作

parent aadc30f6
...@@ -66,3 +66,5 @@ export const completeZC = '/api/tRealTimeOrder/completeZC'; //卡车界面点击 ...@@ -66,3 +66,5 @@ export const completeZC = '/api/tRealTimeOrder/completeZC'; //卡车界面点击
export const crossDB = '/api/tRealTimeOrder/crossDB'; //卡车界面点击到达卸点 export const crossDB = '/api/tRealTimeOrder/crossDB'; //卡车界面点击到达卸点
export const completeXC = '/api/tRealTimeOrder/completeXC'; //卡车界面点击完成装车 export const completeXC = '/api/tRealTimeOrder/completeXC'; //卡车界面点击完成装车
export const navigationRoute = '/api/navigationRoute'; //获取导航路径 export const navigationRoute = '/api/navigationRoute'; //获取导航路径
export const logOutStatus = '/api/logOnStatus/logOutRemoveOrder'; //退出时订单操作
export const logOnStatus = '/api/logOnStatus/logOnAndRecordTime'; //登陆时后台额外操作
...@@ -8,25 +8,25 @@ ...@@ -8,25 +8,25 @@
<el-form ref="loginForm" :model="loginForm"> <el-form ref="loginForm" :model="loginForm">
<el-form-item class="userInpBody"> <el-form-item class="userInpBody">
<div class="userIcon"> <div class="userIcon">
<img src="../assets/imgs/yonghuming.png" /> <img src="../assets/imgs/yonghuming.png"/>
</div> </div>
<el-input <el-input
v-model="loginForm.username" v-model="loginForm.username"
id="userInp" id="userInp"
placeholder="输入用户名" placeholder="输入用户名"
@focus="showkey('username')" @focus="showkey('username')"
></el-input> ></el-input>
</el-form-item> </el-form-item>
<el-form-item class="passWordInpBody"> <el-form-item class="passWordInpBody">
<div class="passWordIcon"> <div class="passWordIcon">
<img src="../assets/imgs/mima.png" /> <img src="../assets/imgs/mima.png"/>
</div> </div>
<el-input <el-input
type="password" type="password"
v-model="loginForm.password" v-model="loginForm.password"
id="passWordInp" id="passWordInp"
placeholder="输入密码" placeholder="输入密码"
@focus="showkey('password')" @focus="showkey('password')"
></el-input> ></el-input>
</el-form-item> </el-form-item>
</el-form> </el-form>
...@@ -38,17 +38,18 @@ ...@@ -38,17 +38,18 @@
</template> </template>
<script> <script>
import { httpGet, httpPostForJson, putForJson } from "@/common/httpBean.js"; import {httpGet, httpPostForJson, putForJson} from "@/common/httpBean.js";
import { import {
login, login,
code, code,
apiEquipmentQuery, apiEquipmentQuery,
vehicleInformationQuery, vehicleInformationQuery,
personalCenterInforQuery, personalCenterInforQuery,
logOnStatus,
} from "@/axios/api.js"; } from "@/axios/api.js";
import { encrypt } from "@/utils/rsaEncrypt.js"; import {encrypt} from "@/utils/rsaEncrypt.js";
import Cookies from "js-cookie"; import Cookies from "js-cookie";
import { config as appConfig } from "../config.js"; import {config as appConfig} from "../config.js";
// import Keyboard from '../components/simpleKeyboard/index.vue' // import Keyboard from '../components/simpleKeyboard/index.vue'
export default { export default {
...@@ -56,8 +57,8 @@ export default { ...@@ -56,8 +57,8 @@ export default {
data() { data() {
return { return {
loginForm: { loginForm: {
username: "testkc", username: "",
password: "123456", password: "",
uuid: "", uuid: "",
}, },
loading: false, loading: false,
...@@ -65,8 +66,7 @@ export default { ...@@ -65,8 +66,7 @@ export default {
keyboardShowType: "", keyboardShowType: "",
//设备OAID testkc test999 //设备OAID testkc test999
//testcc deviceOAID: "test888", //testcc deviceOAID: "test888",
// deviceOAID: "test999", deviceOAID: "",
deviceOAID: "140945db5f9b8e04",
//判断设备是否与车绑定 //判断设备是否与车绑定
bindingStatus: false, bindingStatus: false,
//绑定的车牌号 //绑定的车牌号
...@@ -80,17 +80,18 @@ export default { ...@@ -80,17 +80,18 @@ export default {
this.getCookie(); this.getCookie();
}, },
mounted() { mounted() {
console.log(window, 1111111);
//两种方法相互冲突,每次只需要一种,并且获取的id不一样 //两种方法相互冲突,每次只需要一种,并且获取的id不一样
//app获取设备号方法 //app获取设备号方法
// this.appGetDeviceId(); this.appGetDeviceId();
//5+app获取OAID方法 //5+app获取OAID方法
if (window.plus) { // if (window.plus) {
this.plusReady(); // this.plusReady();
} else { // } else {
document.addEventListener("plusready", this.plusReady, false); // document.addEventListener("plusready", this.plusReady, false);
} // }
}, },
components: { components: {
// Keyboard // Keyboard
...@@ -98,41 +99,45 @@ export default { ...@@ -98,41 +99,45 @@ export default {
methods: { methods: {
//app获取设备号方法 //app获取设备号方法
appGetDeviceId() { appGetDeviceId() {
// let that = this; let that = this;
let appDeviceId1 = window.Device.getDeviceId();
// let appDeviceId1 = window.Device.getDeviceId(); // let appDeviceId1 = window.Device.getDeviceId();
// // let appDeviceId1 = window.Device.getDeviceId(); if (appDeviceId1) {
// console.log("app设备号", window.Device); that.deviceOAID = appDeviceId1;
// if (appDeviceId1) { //查询设备表是否存在该设备编号
// that.deviceOAID = appDeviceId1; httpGet(apiEquipmentQuery, {name: that.deviceOAID}).then(
// //查询设备表是否存在该设备编号 (resSheiBei) => {
// httpGet(apiEquipmentQuery, { name: that.deviceOAID }).then( if (resSheiBei.code == 200 && resSheiBei.data.totalElements != 0) {
// (resSheiBei) => { //查询车辆表中设备是否与车辆绑定
// if (resSheiBei.code == 200 && resSheiBei.data.totalElements != 0) { httpGet(vehicleInformationQuery, {
// //查询车辆表中设备是否与车辆绑定 equipmentName: that.deviceOAID,
// httpGet(vehicleInformationQuery, { }).then((resCar) => {
// equipmentName: that.deviceOAID, if (resCar.code == 200 && resCar.data.totalElements != 0) {
// }).then((resCar) => { that.bindingStatus = true;
// if (resCar.code == 200 && resCar.data.totalElements != 0) { } else {
// that.bindingStatus = true; that.bindingStatus = false;
// } else { }
// that.bindingStatus = false; });
// } } else {
// }); httpPostForJson(apiEquipmentQuery, {
// } else { name: that.deviceOAID,
// httpPostForJson(apiEquipmentQuery, { status: "正常",
// name: that.deviceOAID, }).then((res) => {
// status: "正常", that.bindingStatus = false;
// }).then((res) => { });
// that.bindingStatus = false; }
// }); }
// } );
// } }
// );
// }
}, },
//5+app获取OAID方法 //5+app获取OAID方法
plusReady() { plusReady() {
// let that = this; let that = this;
console.log("设备身份码:" + plus.device.imei);
console.log("用户识别码:" + plus.device.imsi);
console.log("设备型号信息:" + plus.device.model);
console.log("设备厂商信息:" + plus.device.vendor);
console.log("设备唯一标识号:" + plus.device.uuid);
// plus.device.getOAID({ // plus.device.getOAID({
// success: function (e) { // success: function (e) {
// console.log("oaid", e.oaid); // console.log("oaid", e.oaid);
...@@ -170,6 +175,45 @@ export default { ...@@ -170,6 +175,45 @@ export default {
// that.bindingStatus = false; // that.bindingStatus = false;
// }, // },
// }); // });
//无法获取oaid的设备尝试获取uuid或imei
plus.device.getInfo({
success: function (e) {
console.log('getDeviceInfo success: ' + JSON.stringify(e));
that.deviceOAID = e.uuid;
//查询设备表是否存在该设备编号
httpGet(apiEquipmentQuery, {name: that.deviceOAID}).then(
(resSheiBei) => {
if (
resSheiBei.code == 200 &&
resSheiBei.data.totalElements != 0
) {
//查询车辆表中设备是否与车辆绑定
httpGet(vehicleInformationQuery, {
equipmentName: that.deviceOAID,
}).then((resCar) => {
if (resCar.code == 200 && resCar.data.totalElements != 0) {
that.bindingStatus = true;
} else {
that.bindingStatus = false;
}
});
} else {
httpPostForJson(apiEquipmentQuery, {
name: that.deviceOAID,
status: "正常",
}).then((res) => {
that.bindingStatus = false;
});
}
}
);
},
fail: function (e) {
console.log('getDeviceInfo failed: ' + JSON.stringify(e));
that.bindingStatus = false;
}
});
}, },
getCode() { getCode() {
httpGet(code).then((res) => { httpGet(code).then((res) => {
...@@ -196,46 +240,46 @@ export default { ...@@ -196,46 +240,46 @@ export default {
}); });
return; return;
} }
httpGet(apiEquipmentQuery, { name: this.deviceOAID }).then( httpGet(apiEquipmentQuery, {name: this.deviceOAID}).then(
(resSheiBei) => { (resSheiBei) => {
if (resSheiBei.code == 200 && resSheiBei.data.totalElements != 0) { if (resSheiBei.code == 200 && resSheiBei.data.totalElements != 0) {
//查询车辆表中设备是否与车辆绑定 //查询车辆表中设备是否与车辆绑定
httpGet(vehicleInformationQuery, { httpGet(vehicleInformationQuery, {
equipmentName: this.deviceOAID, equipmentName: this.deviceOAID,
}).then((resCar) => { }).then((resCar) => {
if (resCar.code == 200 && resCar.data.totalElements != 0) { if (resCar.code == 200 && resCar.data.totalElements != 0) {
this.bindingCar = resCar.data.content[0].number; this.bindingCar = resCar.data.content[0].number;
this.bindingStatus = true; this.bindingStatus = true;
this.LoginInitiation(); this.LoginInitiation();
} else { } else {
this.$message({
showClose: true,
message:
"请在后台系统中将该设备与车辆绑定后再进行登录!设备号:" +
this.deviceOAID,
type: "warning",
duration: 0,
});
this.bindingStatus = false;
}
});
} else {
httpPostForJson(apiEquipmentQuery, {
name: this.deviceOAID,
status: "正常",
}).then((res) => {
this.$message({ this.$message({
showClose: true, showClose: true,
message: message:
"请在后台系统中将该设备与车辆绑定后再进行登录!设备号:" + "请在后台系统中将该设备与车辆绑定后再进行登录!设备号:" +
this.deviceOAID, this.deviceOAID,
type: "warning", type: "warning",
duration: 0, duration: 0,
}); });
this.bindingStatus = false; this.bindingStatus = false;
}
});
} else {
httpPostForJson(apiEquipmentQuery, {
name: this.deviceOAID,
status: "正常",
}).then((res) => {
this.$message({
showClose: true,
message:
"请在后台系统中将该设备与车辆绑定后再进行登录!设备号:" +
this.deviceOAID,
type: "warning",
duration: 0,
}); });
this.bindingStatus = false; }
});
} }
}
); );
}, },
//进行登录 //进行登录
...@@ -264,8 +308,8 @@ export default { ...@@ -264,8 +308,8 @@ export default {
} else { } else {
localStorage.setItem(appConfig.TOKEN_KEY, res.token); localStorage.setItem(appConfig.TOKEN_KEY, res.token);
localStorage.setItem( localStorage.setItem(
appConfig.USER_KEY, appConfig.USER_KEY,
JSON.stringify(res.user) JSON.stringify(res.user)
); );
if (user.rememberMe) { if (user.rememberMe) {
Cookies.set("username", user.username, { Cookies.set("username", user.username, {
...@@ -282,19 +326,15 @@ export default { ...@@ -282,19 +326,15 @@ export default {
httpGet(personalCenterInforQuery, { httpGet(personalCenterInforQuery, {
userName: user.username, userName: user.username,
}).then((respersonal) => { }).then((respersonal) => {
if ( if (respersonal.code == 200 && respersonal.data.totalElements != 0) {
respersonal.code == 200 &&
respersonal.data.totalElements != 0
) {
let lastpersonalData = respersonal.data.content[0]; let lastpersonalData = respersonal.data.content[0];
lastpersonalData.car = that.bindingCar; lastpersonalData.car = that.bindingCar;
putForJson(personalCenterInforQuery, lastpersonalData).then( putForJson(personalCenterInforQuery, lastpersonalData).then((res) => {
(res) => { that.$router.push({
that.$router.push({ path: "/MLargeScreen/index?" + user.username,
path: "/MLargeScreen/index?" + user.username, })
}); putForJson(logOnStatus,{equipmentName:that.deviceOAID,userName:user.username}).then((res) => {});
} });
);
} }
}); });
} }
...@@ -348,19 +388,21 @@ export default { ...@@ -348,19 +388,21 @@ export default {
width: 100vw; width: 100vw;
background-image: url("../assets/imgs/bg.png"); background-image: url("../assets/imgs/bg.png");
} }
.projectName { .projectName {
text-align: center; text-align: center;
font-size: 40px; font-size: 40px;
font-weight: 600; font-weight: 600;
background-image: -webkit-linear-gradient( background-image: -webkit-linear-gradient(
bottom, bottom,
rgb(36, 162, 254), rgb(36, 162, 254),
rgb(255, 255, 255) rgb(255, 255, 255)
); );
background-clip: text; background-clip: text;
-webkit-text-fill-color: transparent; -webkit-text-fill-color: transparent;
letter-spacing: 3px; letter-spacing: 3px;
} }
.loginBody { .loginBody {
position: relative; position: relative;
padding-top: 9vh; padding-top: 9vh;
...@@ -372,6 +414,7 @@ export default { ...@@ -372,6 +414,7 @@ export default {
background-size: 100% 110%; background-size: 100% 110%;
margin-top: -5vh; margin-top: -5vh;
} }
.loginTitle { .loginTitle {
margin-left: 4vw; margin-left: 4vw;
text-align: center; text-align: center;
...@@ -379,6 +422,7 @@ export default { ...@@ -379,6 +422,7 @@ export default {
color: rgb(47, 213, 255); color: rgb(47, 213, 255);
letter-spacing: 6px; letter-spacing: 6px;
} }
.loginText { .loginText {
margin-top: 20px; margin-top: 20px;
margin-left: 50px; margin-left: 50px;
...@@ -388,21 +432,25 @@ export default { ...@@ -388,21 +432,25 @@ export default {
letter-spacing: 6px; letter-spacing: 6px;
margin-bottom: 10px; margin-bottom: 10px;
} }
.loginInoputs { .loginInoputs {
margin-top: 10vh; margin-top: 10vh;
position: absolute; position: absolute;
right: 6vw; right: 6vw;
} }
.userInpBody { .userInpBody {
padding: 2px; padding: 2px;
border: 1px solid rgb(18, 70, 113); border: 1px solid rgb(18, 70, 113);
margin-bottom: 20px; margin-bottom: 20px;
} }
.el-form-item__content { .el-form-item__content {
display: flex; display: flex;
width: 25vw; width: 25vw;
height: 10vh; height: 10vh;
} }
.userIcon { .userIcon {
padding: 1vh 2vh 0vh 2vh; padding: 1vh 2vh 0vh 2vh;
box-sizing: border-box; box-sizing: border-box;
...@@ -410,10 +458,12 @@ export default { ...@@ -410,10 +458,12 @@ export default {
height: 10vh; height: 10vh;
background-color: rgb(18, 70, 113); background-color: rgb(18, 70, 113);
} }
.userIcon > img { .userIcon > img {
width: 5vh; width: 5vh;
height: 5vh; height: 5vh;
} }
#userInp { #userInp {
height: 100%; height: 100%;
width: 100%; width: 100%;
...@@ -423,6 +473,7 @@ export default { ...@@ -423,6 +473,7 @@ export default {
font-size: 20px; font-size: 20px;
color: rgb(47, 213, 255); color: rgb(47, 213, 255);
} }
/* .el-input input::-webkit-input-placeholder { /* .el-input input::-webkit-input-placeholder {
color:rgb(47,213,255); color:rgb(47,213,255);
} */ } */
...@@ -432,6 +483,7 @@ export default { ...@@ -432,6 +483,7 @@ export default {
border: 1px solid rgb(18, 70, 113); border: 1px solid rgb(18, 70, 113);
margin-bottom: 50px; margin-bottom: 50px;
} }
.passWordIcon { .passWordIcon {
padding: 1vh 2vh 0vh 2vh; padding: 1vh 2vh 0vh 2vh;
box-sizing: border-box; box-sizing: border-box;
...@@ -439,10 +491,12 @@ export default { ...@@ -439,10 +491,12 @@ export default {
height: 10vh; height: 10vh;
background-color: rgb(18, 70, 113); background-color: rgb(18, 70, 113);
} }
.passWordIcon > img { .passWordIcon > img {
width: 5vh; width: 5vh;
height: 5vh; height: 5vh;
} }
#passWordInp { #passWordInp {
height: 100%; height: 100%;
width: 100%; width: 100%;
...@@ -452,6 +506,7 @@ export default { ...@@ -452,6 +506,7 @@ export default {
font-size: 20px; font-size: 20px;
color: rgb(47, 213, 255); color: rgb(47, 213, 255);
} }
.loginBtn { .loginBtn {
width: 100%; width: 100%;
height: 10vh; height: 10vh;
...@@ -472,19 +527,21 @@ export default { ...@@ -472,19 +527,21 @@ export default {
width: 100vw; width: 100vw;
background-image: url("../assets/imgs/bg.png"); background-image: url("../assets/imgs/bg.png");
} }
.projectName { .projectName {
text-align: center; text-align: center;
font-size: 70px; font-size: 70px;
font-weight: 600; font-weight: 600;
background-image: -webkit-linear-gradient( background-image: -webkit-linear-gradient(
bottom, bottom,
rgb(36, 162, 254), rgb(36, 162, 254),
rgb(255, 255, 255) rgb(255, 255, 255)
); );
background-clip: text; background-clip: text;
-webkit-text-fill-color: transparent; -webkit-text-fill-color: transparent;
letter-spacing: 3px; letter-spacing: 3px;
} }
.loginBody { .loginBody {
position: relative; position: relative;
padding-top: 9vh; padding-top: 9vh;
...@@ -495,6 +552,7 @@ export default { ...@@ -495,6 +552,7 @@ export default {
background-image: url("../assets/imgs/kuang.png"); background-image: url("../assets/imgs/kuang.png");
background-size: 100% 100%; background-size: 100% 100%;
} }
.loginTitle { .loginTitle {
margin-left: 50px; margin-left: 50px;
text-align: center; text-align: center;
...@@ -502,6 +560,7 @@ export default { ...@@ -502,6 +560,7 @@ export default {
color: rgb(47, 213, 255); color: rgb(47, 213, 255);
letter-spacing: 6px; letter-spacing: 6px;
} }
.loginText { .loginText {
margin-top: 20px; margin-top: 20px;
margin-left: 50px; margin-left: 50px;
...@@ -511,19 +570,23 @@ export default { ...@@ -511,19 +570,23 @@ export default {
letter-spacing: 6px; letter-spacing: 6px;
margin-bottom: 10px; margin-bottom: 10px;
} }
.loginInoputs { .loginInoputs {
margin-top: 15vh; margin-top: 15vh;
position: absolute; position: absolute;
right: 13vh; right: 13vh;
} }
.userInpBody { .userInpBody {
padding: 2px; padding: 2px;
border: 1px solid rgb(18, 70, 113); border: 1px solid rgb(18, 70, 113);
margin-bottom: 20px; margin-bottom: 20px;
} }
.el-form-item__content { .el-form-item__content {
display: flex; display: flex;
} }
.userIcon { .userIcon {
padding: 11px; padding: 11px;
box-sizing: border-box; box-sizing: border-box;
...@@ -531,6 +594,7 @@ export default { ...@@ -531,6 +594,7 @@ export default {
height: 50px; height: 50px;
background-color: rgb(18, 70, 113); background-color: rgb(18, 70, 113);
} }
#userInp { #userInp {
height: 100%; height: 100%;
width: 100%; width: 100%;
...@@ -541,6 +605,7 @@ export default { ...@@ -541,6 +605,7 @@ export default {
color: rgb(47, 213, 255); color: rgb(47, 213, 255);
letter-spacing: 2px; letter-spacing: 2px;
} }
/* .el-input input::-webkit-input-placeholder { /* .el-input input::-webkit-input-placeholder {
color:rgb(47,213,255); color:rgb(47,213,255);
} */ } */
...@@ -550,6 +615,7 @@ export default { ...@@ -550,6 +615,7 @@ export default {
border: 1px solid rgb(18, 70, 113); border: 1px solid rgb(18, 70, 113);
margin-bottom: 50px; margin-bottom: 50px;
} }
.passWordIcon { .passWordIcon {
padding: 11px; padding: 11px;
box-sizing: border-box; box-sizing: border-box;
...@@ -557,6 +623,7 @@ export default { ...@@ -557,6 +623,7 @@ export default {
height: 50px; height: 50px;
background-color: rgb(18, 70, 113); background-color: rgb(18, 70, 113);
} }
#passWordInp { #passWordInp {
height: 100%; height: 100%;
width: 80%; width: 80%;
...@@ -567,6 +634,7 @@ export default { ...@@ -567,6 +634,7 @@ export default {
color: rgb(47, 213, 255); color: rgb(47, 213, 255);
letter-spacing: 2px; letter-spacing: 2px;
} }
.loginBtn { .loginBtn {
width: 100%; width: 100%;
height: 60px; height: 60px;
...@@ -583,6 +651,7 @@ export default { ...@@ -583,6 +651,7 @@ export default {
margin: 0; margin: 0;
padding: 0; padding: 0;
} }
.keyboardStyle { .keyboardStyle {
position: absolute; position: absolute;
top: 0; top: 0;
......
...@@ -8,25 +8,25 @@ ...@@ -8,25 +8,25 @@
<el-form ref="loginForm" :model="loginForm"> <el-form ref="loginForm" :model="loginForm">
<el-form-item class="userInpBody"> <el-form-item class="userInpBody">
<div class="userIcon"> <div class="userIcon">
<img src="../assets/imgs/yonghuming.png" /> <img src="../assets/imgs/yonghuming.png"/>
</div> </div>
<el-input <el-input
v-model="loginForm.username" v-model="loginForm.username"
id="userInp" id="userInp"
placeholder="输入用户名" placeholder="输入用户名"
@focus="showkey('username')" @focus="showkey('username')"
></el-input> ></el-input>
</el-form-item> </el-form-item>
<el-form-item class="passWordInpBody"> <el-form-item class="passWordInpBody">
<div class="passWordIcon"> <div class="passWordIcon">
<img src="../assets/imgs/mima.png" /> <img src="../assets/imgs/mima.png"/>
</div> </div>
<el-input <el-input
type="password" type="password"
v-model="loginForm.password" v-model="loginForm.password"
id="passWordInp" id="passWordInp"
placeholder="输入密码" placeholder="输入密码"
@focus="showkey('password')" @focus="showkey('password')"
></el-input> ></el-input>
</el-form-item> </el-form-item>
</el-form> </el-form>
...@@ -38,17 +38,18 @@ ...@@ -38,17 +38,18 @@
</template> </template>
<script> <script>
import { httpGet, httpPostForJson, putForJson } from "@/common/httpBean.js"; import {httpGet, httpPostForJson, putForJson} from "@/common/httpBean.js";
import { import {
login, login,
code, code,
apiEquipmentQuery, apiEquipmentQuery,
vehicleInformationQuery, vehicleInformationQuery,
personalCenterInforQuery, personalCenterInforQuery,
logOnStatus,
} from "@/axios/api.js"; } from "@/axios/api.js";
import { encrypt } from "@/utils/rsaEncrypt.js"; import {encrypt} from "@/utils/rsaEncrypt.js";
import Cookies from "js-cookie"; import Cookies from "js-cookie";
import { config as appConfig } from "../config.js"; import {config as appConfig} from "../config.js";
// import Keyboard from '../components/simpleKeyboard/index.vue' // import Keyboard from '../components/simpleKeyboard/index.vue'
export default { export default {
...@@ -56,8 +57,8 @@ export default { ...@@ -56,8 +57,8 @@ export default {
data() { data() {
return { return {
loginForm: { loginForm: {
username: "", username: "testkc",
password: "", password: "123456",
uuid: "", uuid: "",
}, },
loading: false, loading: false,
...@@ -65,7 +66,8 @@ export default { ...@@ -65,7 +66,8 @@ export default {
keyboardShowType: "", keyboardShowType: "",
//设备OAID testkc test999 //设备OAID testkc test999
//testcc deviceOAID: "test888", //testcc deviceOAID: "test888",
deviceOAID: "", deviceOAID: "test999",
// deviceOAID: "140945db5f9b8e04",
//判断设备是否与车绑定 //判断设备是否与车绑定
bindingStatus: false, bindingStatus: false,
//绑定的车牌号 //绑定的车牌号
...@@ -79,18 +81,17 @@ export default { ...@@ -79,18 +81,17 @@ export default {
this.getCookie(); this.getCookie();
}, },
mounted() { mounted() {
console.log(window, 1111111);
//两种方法相互冲突,每次只需要一种,并且获取的id不一样 //两种方法相互冲突,每次只需要一种,并且获取的id不一样
//app获取设备号方法 //app获取设备号方法
this.appGetDeviceId(); // this.appGetDeviceId();
//5+app获取OAID方法 //5+app获取OAID方法
// if (window.plus) { if (window.plus) {
// this.plusReady(); this.plusReady();
// } else { } else {
// document.addEventListener("plusready", this.plusReady, false); document.addEventListener("plusready", this.plusReady, false);
// } }
}, },
components: { components: {
// Keyboard // Keyboard
...@@ -98,45 +99,41 @@ export default { ...@@ -98,45 +99,41 @@ export default {
methods: { methods: {
//app获取设备号方法 //app获取设备号方法
appGetDeviceId() { appGetDeviceId() {
let that = this; // let that = this;
let appDeviceId1 = window.Device.getDeviceId();
// let appDeviceId1 = window.Device.getDeviceId(); // let appDeviceId1 = window.Device.getDeviceId();
if (appDeviceId1) { // // let appDeviceId1 = window.Device.getDeviceId();
that.deviceOAID = appDeviceId1; // console.log("app设备号", window.Device);
//查询设备表是否存在该设备编号 // if (appDeviceId1) {
httpGet(apiEquipmentQuery, { name: that.deviceOAID }).then( // that.deviceOAID = appDeviceId1;
(resSheiBei) => { // //查询设备表是否存在该设备编号
if (resSheiBei.code == 200 && resSheiBei.data.totalElements != 0) { // httpGet(apiEquipmentQuery, { name: that.deviceOAID }).then(
//查询车辆表中设备是否与车辆绑定 // (resSheiBei) => {
httpGet(vehicleInformationQuery, { // if (resSheiBei.code == 200 && resSheiBei.data.totalElements != 0) {
equipmentName: that.deviceOAID, // //查询车辆表中设备是否与车辆绑定
}).then((resCar) => { // httpGet(vehicleInformationQuery, {
if (resCar.code == 200 && resCar.data.totalElements != 0) { // equipmentName: that.deviceOAID,
that.bindingStatus = true; // }).then((resCar) => {
} else { // if (resCar.code == 200 && resCar.data.totalElements != 0) {
that.bindingStatus = false; // that.bindingStatus = true;
} // } else {
}); // that.bindingStatus = false;
} else { // }
httpPostForJson(apiEquipmentQuery, { // });
name: that.deviceOAID, // } else {
status: "正常", // httpPostForJson(apiEquipmentQuery, {
}).then((res) => { // name: that.deviceOAID,
that.bindingStatus = false; // status: "正常",
}); // }).then((res) => {
} // that.bindingStatus = false;
} // });
); // }
} // }
// );
// }
}, },
//5+app获取OAID方法 //5+app获取OAID方法
plusReady() { plusReady() {
let that = this; // let that = this;
console.log("设备身份码:" + plus.device.imei);
console.log("用户识别码:" + plus.device.imsi);
console.log("设备型号信息:" + plus.device.model);
console.log("设备厂商信息:" + plus.device.vendor);
console.log("设备唯一标识号:" + plus.device.uuid);
// plus.device.getOAID({ // plus.device.getOAID({
// success: function (e) { // success: function (e) {
// console.log("oaid", e.oaid); // console.log("oaid", e.oaid);
...@@ -174,45 +171,6 @@ export default { ...@@ -174,45 +171,6 @@ export default {
// that.bindingStatus = false; // that.bindingStatus = false;
// }, // },
// }); // });
//无法获取oaid的设备尝试获取uuid或imei
plus.device.getInfo({
success:function(e){
console.log('getDeviceInfo success: '+JSON.stringify(e));
that.deviceOAID = e.uuid;
//查询设备表是否存在该设备编号
httpGet(apiEquipmentQuery, { name: that.deviceOAID }).then(
(resSheiBei) => {
if (
resSheiBei.code == 200 &&
resSheiBei.data.totalElements != 0
) {
//查询车辆表中设备是否与车辆绑定
httpGet(vehicleInformationQuery, {
equipmentName: that.deviceOAID,
}).then((resCar) => {
if (resCar.code == 200 && resCar.data.totalElements != 0) {
that.bindingStatus = true;
} else {
that.bindingStatus = false;
}
});
} else {
httpPostForJson(apiEquipmentQuery, {
name: that.deviceOAID,
status: "正常",
}).then((res) => {
that.bindingStatus = false;
});
}
}
);
},
fail:function(e){
console.log('getDeviceInfo failed: '+JSON.stringify(e));
that.bindingStatus = false;
}
});
}, },
getCode() { getCode() {
httpGet(code).then((res) => { httpGet(code).then((res) => {
...@@ -239,46 +197,46 @@ export default { ...@@ -239,46 +197,46 @@ export default {
}); });
return; return;
} }
httpGet(apiEquipmentQuery, { name: this.deviceOAID }).then( httpGet(apiEquipmentQuery, {name: this.deviceOAID}).then(
(resSheiBei) => { (resSheiBei) => {
if (resSheiBei.code == 200 && resSheiBei.data.totalElements != 0) { if (resSheiBei.code == 200 && resSheiBei.data.totalElements != 0) {
//查询车辆表中设备是否与车辆绑定 //查询车辆表中设备是否与车辆绑定
httpGet(vehicleInformationQuery, { httpGet(vehicleInformationQuery, {
equipmentName: this.deviceOAID, equipmentName: this.deviceOAID,
}).then((resCar) => { }).then((resCar) => {
if (resCar.code == 200 && resCar.data.totalElements != 0) { if (resCar.code == 200 && resCar.data.totalElements != 0) {
this.bindingCar = resCar.data.content[0].number; this.bindingCar = resCar.data.content[0].number;
this.bindingStatus = true; this.bindingStatus = true;
this.LoginInitiation(); this.LoginInitiation();
} else { } else {
this.$message({
showClose: true,
message:
"请在后台系统中将该设备与车辆绑定后再进行登录!设备号:" +
this.deviceOAID,
type: "warning",
duration: 0,
});
this.bindingStatus = false;
}
});
} else {
httpPostForJson(apiEquipmentQuery, {
name: this.deviceOAID,
status: "正常",
}).then((res) => {
this.$message({ this.$message({
showClose: true, showClose: true,
message: message:
"请在后台系统中将该设备与车辆绑定后再进行登录!设备号:" + "请在后台系统中将该设备与车辆绑定后再进行登录!设备号:" +
this.deviceOAID, this.deviceOAID,
type: "warning", type: "warning",
duration: 0, duration: 0,
}); });
this.bindingStatus = false; this.bindingStatus = false;
}
});
} else {
httpPostForJson(apiEquipmentQuery, {
name: this.deviceOAID,
status: "正常",
}).then((res) => {
this.$message({
showClose: true,
message:
"请在后台系统中将该设备与车辆绑定后再进行登录!设备号:" +
this.deviceOAID,
type: "warning",
duration: 0,
}); });
this.bindingStatus = false; }
});
} }
}
); );
}, },
//进行登录 //进行登录
...@@ -307,8 +265,8 @@ export default { ...@@ -307,8 +265,8 @@ export default {
} else { } else {
localStorage.setItem(appConfig.TOKEN_KEY, res.token); localStorage.setItem(appConfig.TOKEN_KEY, res.token);
localStorage.setItem( localStorage.setItem(
appConfig.USER_KEY, appConfig.USER_KEY,
JSON.stringify(res.user) JSON.stringify(res.user)
); );
if (user.rememberMe) { if (user.rememberMe) {
Cookies.set("username", user.username, { Cookies.set("username", user.username, {
...@@ -325,19 +283,15 @@ export default { ...@@ -325,19 +283,15 @@ export default {
httpGet(personalCenterInforQuery, { httpGet(personalCenterInforQuery, {
userName: user.username, userName: user.username,
}).then((respersonal) => { }).then((respersonal) => {
if ( if (respersonal.code == 200 && respersonal.data.totalElements != 0) {
respersonal.code == 200 &&
respersonal.data.totalElements != 0
) {
let lastpersonalData = respersonal.data.content[0]; let lastpersonalData = respersonal.data.content[0];
lastpersonalData.car = that.bindingCar; lastpersonalData.car = that.bindingCar;
putForJson(personalCenterInforQuery, lastpersonalData).then( putForJson(personalCenterInforQuery, lastpersonalData).then((res) => {
(res) => { that.$router.push({
that.$router.push({ path: "/MLargeScreen/index?" + user.username,
path: "/MLargeScreen/index?" + user.username, });
}); putForJson(logOnStatus,{equipmentName:that.deviceOAID,userName:user.username}).then((res) => {});
} });
);
} }
}); });
} }
...@@ -391,19 +345,21 @@ export default { ...@@ -391,19 +345,21 @@ export default {
width: 100vw; width: 100vw;
background-image: url("../assets/imgs/bg.png"); background-image: url("../assets/imgs/bg.png");
} }
.projectName { .projectName {
text-align: center; text-align: center;
font-size: 40px; font-size: 40px;
font-weight: 600; font-weight: 600;
background-image: -webkit-linear-gradient( background-image: -webkit-linear-gradient(
bottom, bottom,
rgb(36, 162, 254), rgb(36, 162, 254),
rgb(255, 255, 255) rgb(255, 255, 255)
); );
background-clip: text; background-clip: text;
-webkit-text-fill-color: transparent; -webkit-text-fill-color: transparent;
letter-spacing: 3px; letter-spacing: 3px;
} }
.loginBody { .loginBody {
position: relative; position: relative;
padding-top: 9vh; padding-top: 9vh;
...@@ -415,6 +371,7 @@ export default { ...@@ -415,6 +371,7 @@ export default {
background-size: 100% 110%; background-size: 100% 110%;
margin-top: -5vh; margin-top: -5vh;
} }
.loginTitle { .loginTitle {
margin-left: 4vw; margin-left: 4vw;
text-align: center; text-align: center;
...@@ -422,6 +379,7 @@ export default { ...@@ -422,6 +379,7 @@ export default {
color: rgb(47, 213, 255); color: rgb(47, 213, 255);
letter-spacing: 6px; letter-spacing: 6px;
} }
.loginText { .loginText {
margin-top: 20px; margin-top: 20px;
margin-left: 50px; margin-left: 50px;
...@@ -431,21 +389,25 @@ export default { ...@@ -431,21 +389,25 @@ export default {
letter-spacing: 6px; letter-spacing: 6px;
margin-bottom: 10px; margin-bottom: 10px;
} }
.loginInoputs { .loginInoputs {
margin-top: 10vh; margin-top: 10vh;
position: absolute; position: absolute;
right: 6vw; right: 6vw;
} }
.userInpBody { .userInpBody {
padding: 2px; padding: 2px;
border: 1px solid rgb(18, 70, 113); border: 1px solid rgb(18, 70, 113);
margin-bottom: 20px; margin-bottom: 20px;
} }
.el-form-item__content { .el-form-item__content {
display: flex; display: flex;
width: 25vw; width: 25vw;
height: 10vh; height: 10vh;
} }
.userIcon { .userIcon {
padding: 1vh 2vh 0vh 2vh; padding: 1vh 2vh 0vh 2vh;
box-sizing: border-box; box-sizing: border-box;
...@@ -453,10 +415,12 @@ export default { ...@@ -453,10 +415,12 @@ export default {
height: 10vh; height: 10vh;
background-color: rgb(18, 70, 113); background-color: rgb(18, 70, 113);
} }
.userIcon > img { .userIcon > img {
width: 5vh; width: 5vh;
height: 5vh; height: 5vh;
} }
#userInp { #userInp {
height: 100%; height: 100%;
width: 100%; width: 100%;
...@@ -466,6 +430,7 @@ export default { ...@@ -466,6 +430,7 @@ export default {
font-size: 20px; font-size: 20px;
color: rgb(47, 213, 255); color: rgb(47, 213, 255);
} }
/* .el-input input::-webkit-input-placeholder { /* .el-input input::-webkit-input-placeholder {
color:rgb(47,213,255); color:rgb(47,213,255);
} */ } */
...@@ -475,6 +440,7 @@ export default { ...@@ -475,6 +440,7 @@ export default {
border: 1px solid rgb(18, 70, 113); border: 1px solid rgb(18, 70, 113);
margin-bottom: 50px; margin-bottom: 50px;
} }
.passWordIcon { .passWordIcon {
padding: 1vh 2vh 0vh 2vh; padding: 1vh 2vh 0vh 2vh;
box-sizing: border-box; box-sizing: border-box;
...@@ -482,10 +448,12 @@ export default { ...@@ -482,10 +448,12 @@ export default {
height: 10vh; height: 10vh;
background-color: rgb(18, 70, 113); background-color: rgb(18, 70, 113);
} }
.passWordIcon > img { .passWordIcon > img {
width: 5vh; width: 5vh;
height: 5vh; height: 5vh;
} }
#passWordInp { #passWordInp {
height: 100%; height: 100%;
width: 100%; width: 100%;
...@@ -495,6 +463,7 @@ export default { ...@@ -495,6 +463,7 @@ export default {
font-size: 20px; font-size: 20px;
color: rgb(47, 213, 255); color: rgb(47, 213, 255);
} }
.loginBtn { .loginBtn {
width: 100%; width: 100%;
height: 10vh; height: 10vh;
...@@ -515,19 +484,21 @@ export default { ...@@ -515,19 +484,21 @@ export default {
width: 100vw; width: 100vw;
background-image: url("../assets/imgs/bg.png"); background-image: url("../assets/imgs/bg.png");
} }
.projectName { .projectName {
text-align: center; text-align: center;
font-size: 70px; font-size: 70px;
font-weight: 600; font-weight: 600;
background-image: -webkit-linear-gradient( background-image: -webkit-linear-gradient(
bottom, bottom,
rgb(36, 162, 254), rgb(36, 162, 254),
rgb(255, 255, 255) rgb(255, 255, 255)
); );
background-clip: text; background-clip: text;
-webkit-text-fill-color: transparent; -webkit-text-fill-color: transparent;
letter-spacing: 3px; letter-spacing: 3px;
} }
.loginBody { .loginBody {
position: relative; position: relative;
padding-top: 9vh; padding-top: 9vh;
...@@ -538,6 +509,7 @@ export default { ...@@ -538,6 +509,7 @@ export default {
background-image: url("../assets/imgs/kuang.png"); background-image: url("../assets/imgs/kuang.png");
background-size: 100% 100%; background-size: 100% 100%;
} }
.loginTitle { .loginTitle {
margin-left: 50px; margin-left: 50px;
text-align: center; text-align: center;
...@@ -545,6 +517,7 @@ export default { ...@@ -545,6 +517,7 @@ export default {
color: rgb(47, 213, 255); color: rgb(47, 213, 255);
letter-spacing: 6px; letter-spacing: 6px;
} }
.loginText { .loginText {
margin-top: 20px; margin-top: 20px;
margin-left: 50px; margin-left: 50px;
...@@ -554,19 +527,23 @@ export default { ...@@ -554,19 +527,23 @@ export default {
letter-spacing: 6px; letter-spacing: 6px;
margin-bottom: 10px; margin-bottom: 10px;
} }
.loginInoputs { .loginInoputs {
margin-top: 15vh; margin-top: 15vh;
position: absolute; position: absolute;
right: 13vh; right: 13vh;
} }
.userInpBody { .userInpBody {
padding: 2px; padding: 2px;
border: 1px solid rgb(18, 70, 113); border: 1px solid rgb(18, 70, 113);
margin-bottom: 20px; margin-bottom: 20px;
} }
.el-form-item__content { .el-form-item__content {
display: flex; display: flex;
} }
.userIcon { .userIcon {
padding: 11px; padding: 11px;
box-sizing: border-box; box-sizing: border-box;
...@@ -574,6 +551,7 @@ export default { ...@@ -574,6 +551,7 @@ export default {
height: 50px; height: 50px;
background-color: rgb(18, 70, 113); background-color: rgb(18, 70, 113);
} }
#userInp { #userInp {
height: 100%; height: 100%;
width: 100%; width: 100%;
...@@ -584,6 +562,7 @@ export default { ...@@ -584,6 +562,7 @@ export default {
color: rgb(47, 213, 255); color: rgb(47, 213, 255);
letter-spacing: 2px; letter-spacing: 2px;
} }
/* .el-input input::-webkit-input-placeholder { /* .el-input input::-webkit-input-placeholder {
color:rgb(47,213,255); color:rgb(47,213,255);
} */ } */
...@@ -593,6 +572,7 @@ export default { ...@@ -593,6 +572,7 @@ export default {
border: 1px solid rgb(18, 70, 113); border: 1px solid rgb(18, 70, 113);
margin-bottom: 50px; margin-bottom: 50px;
} }
.passWordIcon { .passWordIcon {
padding: 11px; padding: 11px;
box-sizing: border-box; box-sizing: border-box;
...@@ -600,6 +580,7 @@ export default { ...@@ -600,6 +580,7 @@ export default {
height: 50px; height: 50px;
background-color: rgb(18, 70, 113); background-color: rgb(18, 70, 113);
} }
#passWordInp { #passWordInp {
height: 100%; height: 100%;
width: 80%; width: 80%;
...@@ -610,6 +591,7 @@ export default { ...@@ -610,6 +591,7 @@ export default {
color: rgb(47, 213, 255); color: rgb(47, 213, 255);
letter-spacing: 2px; letter-spacing: 2px;
} }
.loginBtn { .loginBtn {
width: 100%; width: 100%;
height: 60px; height: 60px;
...@@ -626,6 +608,7 @@ export default { ...@@ -626,6 +608,7 @@ export default {
margin: 0; margin: 0;
padding: 0; padding: 0;
} }
.keyboardStyle { .keyboardStyle {
position: absolute; position: absolute;
top: 0; top: 0;
......
...@@ -105,7 +105,14 @@ ...@@ -105,7 +105,14 @@
import Avatar from '@/assets/images/avatar.png' import Avatar from '@/assets/images/avatar.png'
import { encrypt } from "@/utils/rsaEncrypt.js"; import { encrypt } from "@/utils/rsaEncrypt.js";
import { httpGet, httpPostForJson, putForJson, httpDelForJson} from "@/common/httpBean.js" import { httpGet, httpPostForJson, putForJson, httpDelForJson} from "@/common/httpBean.js"
import {updatePass,personalCenterInforQuery,vehicleInformationQuery,vehicleInformationUpdate,dingDanBiaoCaoZuo} from "@/axios/api.js" import {
updatePass,
personalCenterInforQuery,
vehicleInformationQuery,
vehicleInformationUpdate,
logOutStatus,
} from "@/axios/api.js"
export default { export default {
data() { data() {
...@@ -148,7 +155,7 @@ export default { ...@@ -148,7 +155,7 @@ export default {
cancelButtonText: '取消', cancelButtonText: '取消',
type: 'warning' type: 'warning'
}).then(() => { }).then(() => {
httpGet(vehicleInformationQuery,{number:this.carnumber}).then((res1) => { httpGet(vehicleInformationQuery,{number:this.$parent.carnumber}).then((res1) => {
if(res1.code == 200){ if(res1.code == 200){
if(res1.data.totalElements == 0){ if(res1.data.totalElements == 0){
return return
...@@ -157,17 +164,10 @@ export default { ...@@ -157,17 +164,10 @@ export default {
putForJson(vehicleInformationUpdate,{id:res1.data.content[0].id,odo:0,oddStatus:1,workStatus:0,weightStatus:0}).then((res2) => { putForJson(vehicleInformationUpdate,{id:res1.data.content[0].id,odo:0,oddStatus:1,workStatus:0,weightStatus:0}).then((res2) => {
//人员信息表中与车辆解绑 //人员信息表中与车辆解绑
putForJson(personalCenterInforQuery,{id:this.personalInformationData.id,car:''}).then((res3) => { putForJson(personalCenterInforQuery,{id:this.personalInformationData.id,car:''}).then((res3) => {
this.logout(); //删除当前进行的订单
//删除调度单子 httpDelForJson(logOutStatus,{carNumber:this.$parent.carnumber}).then((res3) => {
// httpGet(dingDanBiaoCaoZuo,{carNo:this.carnumber}).then((res3Del) => { this.logout();
// if(res3Del.code == 200 && res3Del.data.content.length != 0){ });
// httpDelForJson(dingDanBiaoCaoZuo,[res3Del.data.content[0].id,this.carnumber,res3Del.data.content[0].odd]).then((res3DelSon) => {
// this.logout();
// });
// }else{
// this.logout();
// }
// })
}) })
}); });
} }
...@@ -258,12 +258,7 @@ export default { ...@@ -258,12 +258,7 @@ export default {
putForJson(vehicleInformationUpdate,{id:res1.data.content[0].id,odo:0,oddStatus:1,workStatus:0,weightStatus:0}).then((res2) => {}); putForJson(vehicleInformationUpdate,{id:res1.data.content[0].id,odo:0,oddStatus:1,workStatus:0,weightStatus:0}).then((res2) => {});
//人员信息表中与车辆解绑 //人员信息表中与车辆解绑
putForJson(personalCenterInforQuery,{id:this.personalInformationData.id,car:''}).then((res3) => {}) putForJson(personalCenterInforQuery,{id:this.personalInformationData.id,car:''}).then((res3) => {})
//删除调度单子
httpGet(dingDanBiaoCaoZuo,{carNo:this.carnumber}).then((res3Del) => {
if(res3Del.code == 200 && res3Del.data.content.length != 0){
httpDelForJson(dingDanBiaoCaoZuo,[res3Del.data.content[0].id,this.carnumber,res3Del.data.content[0].odd]).then((res3DelSon) => {});
}
})
} }
} }
}); });
......
...@@ -57,6 +57,7 @@ import qzc from "@/assets/audio/qzc.mp3"; ...@@ -57,6 +57,7 @@ import qzc from "@/assets/audio/qzc.mp3";
import gdb from "@/assets/audio/gdb.mp3"; import gdb from "@/assets/audio/gdb.mp3";
import wdd from "@/assets/audio/wdd.mp3"; import wdd from "@/assets/audio/wdd.mp3";
import ddwc from "@/assets/audio/ddwc.mp3"; import ddwc from "@/assets/audio/ddwc.mp3";
import xbl from "@/assets/audio/xbl.mp3";
export default { export default {
data() { data() {
...@@ -86,6 +87,10 @@ export default { ...@@ -86,6 +87,10 @@ export default {
queryOrder(){ queryOrder(){
httpGet(tRealTimeOrder,{carNumber: this.carNumber}).then((res) => { httpGet(tRealTimeOrder,{carNumber: this.carNumber}).then((res) => {
if(res.code===200 && res.data){ if(res.code===200 && res.data){
if(!this.$parent.isLastOrder && res.data.isLastOrder){
this.$parent.isLastOrder = true;
this.audioPlayByUrl(xbl);
}
if(res.data.id!==this.orderObj.id && res.data.status===1){ if(res.data.id!==this.orderObj.id && res.data.status===1){
//有新的订单 //有新的订单
this.$parent.kcListView = false; this.$parent.kcListView = false;
...@@ -97,9 +102,6 @@ export default { ...@@ -97,9 +102,6 @@ export default {
if(this.orderObj.mdd.length>5){ if(this.orderObj.mdd.length>5){
this.orderObj.mdd = this.orderObj.mdd.substr(0,5)+'...' this.orderObj.mdd = this.orderObj.mdd.substr(0,5)+'...'
} }
// if(this.orderObj.xcArea.length>5){
// this.orderObj.xcArea = this.orderObj.xcArea.substr(0,5)+'...'
// }
this.audioPlayByUrl(xdd); this.audioPlayByUrl(xdd);
} else { } else {
if (res.data.id !== this.orderObj) { if (res.data.id !== this.orderObj) {
...@@ -108,12 +110,6 @@ export default { ...@@ -108,12 +110,6 @@ export default {
if(this.orderObj.mdd.length>6){ if(this.orderObj.mdd.length>6){
this.orderObj.mdd = this.orderObj.mdd.substr(0,5)+'...' this.orderObj.mdd = this.orderObj.mdd.substr(0,5)+'...'
} }
// if(this.orderObj.zcArea.length>6){
// this.orderObj.zcArea = this.orderObj.zcArea.substr(0,5)+'...'
// }
// if(this.orderObj.xcArea.length>6){
// this.orderObj.xcArea = this.orderObj.xcArea.substr(0,5)+'...'
// }
} }
this.orderObj.status = res.data.status; this.orderObj.status = res.data.status;
if (this.orderObj.status === 6) { if (this.orderObj.status === 6) {
......
...@@ -4,6 +4,10 @@ ...@@ -4,6 +4,10 @@
<img src="../../assets/images/truckTuPian/jjtz.png" height="15"/> <img src="../../assets/images/truckTuPian/jjtz.png" height="15"/>
<span style="padding:5px">收到<span style="color:red">紧急通知</span>,请点击确认!</span> <span style="padding:5px">收到<span style="color:red">紧急通知</span>,请点击确认!</span>
</div> </div>
<div v-show="isLastOrder" class="roadblockStyle" style="font-size:14px;bottom:20vh;left:15vw;width:28vw;display:flex;justify-content:center;align-items:center;" @click="nowLogout()">
<img src="../../assets/images/truckTuPian/xbicon.png" height="32"/>
<span style="padding:5px">可以<span style="color:red">下班</span>了,卸车完成后请<span style="color:red;text-decoration:underline">退出登录</span>!</span>
</div>
<div class="topViews"> <div class="topViews">
<div class="topTitle">{{ systemTitle }}</div> <div class="topTitle">{{ systemTitle }}</div>
<div class="topcontent"> <div class="topcontent">
...@@ -244,6 +248,7 @@ export default { ...@@ -244,6 +248,7 @@ export default {
kcListView: false, kcListView: false,
localName: null, localName: null,
trailLine: null,//导航开启后的行驶轨迹 trailLine: null,//导航开启后的行驶轨迹
isLastOrder: false,
}; };
}, },
mounted() { mounted() {
...@@ -493,6 +498,21 @@ export default { ...@@ -493,6 +498,21 @@ export default {
} }
} }
).addTo(layer); ).addTo(layer);
if(res.msg){
this.$notify({
title: res.msg,
type: "success",
duration: 5000,
dangerouslyUseHTMLString: true,
});
}
}else{
this.$notify({
title: '网络异常',
type: "warning",
duration: 5000,
dangerouslyUseHTMLString: true,
});
} }
}); });
}, },
...@@ -1588,6 +1608,9 @@ export default { ...@@ -1588,6 +1608,9 @@ export default {
indexListeningDelFn(index) { indexListeningDelFn(index) {
this.$refs.voiceApplicationMethod.selectDeleteSituation(index); this.$refs.voiceApplicationMethod.selectDeleteSituation(index);
}, },
nowLogout(){
this.$refs.personalCenterMethod.openLogOut();
},
//获取当前时间 //获取当前时间
currentTimeFn() { currentTimeFn() {
var date = new Date(); var date = new Date();
...@@ -1626,6 +1649,7 @@ export default { ...@@ -1626,6 +1649,7 @@ export default {
this.$refs.voiceApplicationMethod.xintiaoCloseFn(); this.$refs.voiceApplicationMethod.xintiaoCloseFn();
this.$refs.startOrderReceivingMethod.dingshiqiCloseFn(); this.$refs.startOrderReceivingMethod.dingshiqiCloseFn();
this.websocketcloseIndex(); this.websocketcloseIndex();
this.isLastOrder = false;
if (this.zongTimer1) { if (this.zongTimer1) {
clearInterval(this.zongTimer1); clearInterval(this.zongTimer1);
this.zongTimer1 = null; this.zongTimer1 = null;
......
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