Commit 41f9441c authored by zhanglw's avatar zhanglw

下班,登录后台操作

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