无人机不显示问题
This commit is contained in:
parent
f925f563fb
commit
3068a4cb91
|
|
@ -342,9 +342,12 @@ export default {
|
||||||
// Id: "1936279217155215360"
|
// Id: "1936279217155215360"
|
||||||
// }
|
// }
|
||||||
// ];
|
// ];
|
||||||
let positionID = localStorage.getItem("PositionIds");
|
let positionID = JSON.parse(localStorage.getItem("PositionIds"));
|
||||||
if (positionID === null || positionID === undefined) {
|
if (positionID !== null || positionID !== undefined) {
|
||||||
const match = newVal.some((item) => positionID.includes(item.id));
|
const match = newVal.some((item) =>
|
||||||
|
positionID.includes(item.positionId)
|
||||||
|
);
|
||||||
|
console.log(match, "match");
|
||||||
if (match) {
|
if (match) {
|
||||||
newVal.forEach((newItem) => {
|
newVal.forEach((newItem) => {
|
||||||
if (
|
if (
|
||||||
|
|
|
||||||
|
|
@ -33,6 +33,45 @@ export default {
|
||||||
this.initSocket();
|
this.initSocket();
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
|
// let arr = [
|
||||||
|
// {
|
||||||
|
// BatchId: "1938433406643867648",
|
||||||
|
// serial_number: "JF0102501009",
|
||||||
|
// device_type: "8",
|
||||||
|
// device_type_8: 91088,
|
||||||
|
// app_lat: 39.055,
|
||||||
|
// app_lon: 117.303466,
|
||||||
|
// drone_lat: 39.040924,
|
||||||
|
// drone_lon: 117.337103,
|
||||||
|
// height: 0.0,
|
||||||
|
// altitude: 0.0,
|
||||||
|
// home_lat: 0.0,
|
||||||
|
// home_lon: 0.0,
|
||||||
|
// distance: 3299.608332218683,
|
||||||
|
// centerdistance: 198311.46836461234,
|
||||||
|
// IsWhitelist: false,
|
||||||
|
// WhiteListId: "0",
|
||||||
|
// speed_E: 0.0,
|
||||||
|
// speed_N: 0.0,
|
||||||
|
// speed_U: 0.0,
|
||||||
|
// RSSI: 0.0,
|
||||||
|
// positionId: "1937905595101351936",
|
||||||
|
// PostionName: "6号",
|
||||||
|
// DeviceId: "1937909591555837952",
|
||||||
|
// DeviceName: "JF0102501007",
|
||||||
|
// freq: 0.0,
|
||||||
|
// alarmLevel: 0,
|
||||||
|
// Time: 1744872277,
|
||||||
|
// CreateTime: "2025-06-27T11:05:13.1524513+08:00",
|
||||||
|
// Id: "1938433406669033472"
|
||||||
|
// }
|
||||||
|
// ];
|
||||||
|
// let time = setInterval(() => {
|
||||||
|
// this.signaData = arr;
|
||||||
|
// }, 1000);
|
||||||
|
// setTimeout(() => {
|
||||||
|
// clearInterval(time);
|
||||||
|
// }, 10000);
|
||||||
this.initHomeData();
|
this.initHomeData();
|
||||||
this.timeInterval = setInterval(() => {
|
this.timeInterval = setInterval(() => {
|
||||||
this.initHomeData();
|
this.initHomeData();
|
||||||
|
|
|
||||||
|
|
@ -85,19 +85,22 @@ export default {
|
||||||
localStorage.setItem("expires", res.data.expires); // 登录到期时间
|
localStorage.setItem("expires", res.data.expires); // 登录到期时间
|
||||||
localStorage.setItem("userId", res.data.userid); // 登录id
|
localStorage.setItem("userId", res.data.userid); // 登录id
|
||||||
localStorage.setItem("isAdmin", res.data.isAdmin); // 权限
|
localStorage.setItem("isAdmin", res.data.isAdmin); // 权限
|
||||||
// localStorage.setItem("PositionIds", res.data.PositionIds); // 阵地权限
|
|
||||||
this.$router.push("/");
|
|
||||||
loginPosition(res.data.positionIds).then((positionRes) => {
|
|
||||||
if (positionRes.code === 0) {
|
|
||||||
localStorage.setItem(
|
localStorage.setItem(
|
||||||
"PositionIds",
|
"PositionIds",
|
||||||
JSON.stringify(positionRes.data)
|
JSON.stringify(res.data.positionIds)
|
||||||
); // 阵地权限
|
); // 阵地权限
|
||||||
this.$message.success("登录成功");
|
this.$router.push("/");
|
||||||
} else {
|
// loginPosition(res.data.positionIds).then((positionRes) => {
|
||||||
this.$message.error(positionRes.msg);
|
// if (positionRes.code === 0) {
|
||||||
}
|
// localStorage.setItem(
|
||||||
});
|
// "PositionIds",
|
||||||
|
// JSON.stringify(positionRes.data)
|
||||||
|
// ); // 阵地权限
|
||||||
|
// this.$message.success("登录成功");
|
||||||
|
// } else {
|
||||||
|
// this.$message.error(positionRes.msg);
|
||||||
|
// }
|
||||||
|
// });
|
||||||
} else {
|
} else {
|
||||||
this.state.password = this.state.password;
|
this.state.password = this.state.password;
|
||||||
this.$message.error(res.msg);
|
this.$message.error(res.msg);
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue