Compare commits

..

No commits in common. "54a967b8b93a5894cda76cea3b9ee937fe32a6a3" and "6c7d39f3f6f30da9179ad7f604f2603c6f715174" have entirely different histories.

25 changed files with 391 additions and 959 deletions

View File

@ -1 +1 @@
172.16.1.106:5005 10.155.161.49:5005

View File

@ -1,6 +1,5 @@
<!DOCTYPE html> <!DOCTYPE html>
<html lang="en-us"> <html lang="en-us">
<head> <head>
<meta charset="utf-8"> <meta charset="utf-8">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"> <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
@ -9,14 +8,12 @@
<link rel="stylesheet" href="TemplateData/style.css"> <link rel="stylesheet" href="TemplateData/style.css">
</head> </head>
<style> <style>
body, body,html{
html {
width: 100%; width: 100%;
height: 100%; height: 100%;
overflow: hidden; overflow: hidden;
} }
</style> </style>
<body> <body>
<div id="unity-container" class="unity-desktop" style="width: 100%;height:100%"> <div id="unity-container" class="unity-desktop" style="width: 100%;height:100%">
<canvas id="unity-canvas" style="width: 100%;height:100%" tabindex="-1"></canvas> <canvas id="unity-canvas" style="width: 100%;height:100%" tabindex="-1"></canvas>
@ -213,21 +210,9 @@
alert(message); alert(message);
}); });
}; };
function openCar(data) {
unityInstance.SendMessage('Canvas', 'Popupwindow', data)
}
function unityBoxHandle(val) {
if (val) {
unityInstance.SendMessage('Canvas', 'Partialhiding', val)
} else {
console.log(val,'xxxxxxxxxxx');
unityInstance.SendMessage('Canvas', 'Boxshow')
}
}
document.body.appendChild(script); document.body.appendChild(script);
</script> </script>
</body> </body>
</html> </html>

View File

@ -1,234 +0,0 @@
<!DOCTYPE html>
<html lang="en-us">
<head>
<meta charset="utf-8">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>Unity WebGL Player | U3D_TobaccoWarehouseISMDTSystem</title>
<link rel="shortcut icon" href="TemplateData/favicon.ico">
<link rel="stylesheet" href="TemplateData/style.css">
</head>
<style>
body,
html {
width: 100%;
height: 100%;
overflow: hidden;
}
</style>
<body>
<div id="unity-container" class="unity-desktop" style="width: 100%;height:100%">
<canvas id="unity-canvas" style="width: 100%;height:100%" tabindex="-1"></canvas>
<div id="unity-loading-bar">
<div id="unity-logo"></div>
<div id="unity-progress-bar-empty">
<div id="unity-progress-bar-full"></div>
</div>
</div>
<div id="unity-warning"></div>
<div id="unity-footer">
<div id="unity-webgl-logo"></div>
<div id="unity-fullscreen-button"></div>
<div id="unity-build-title">U3D_TobaccoWarehouseISMDTSystem</div>
</div>
</div>
<button onclick="OpenHtmlMQTT()">Connect</button>
<button onclick="publishMessage()">Publish</button>
<button onclick="disconnectMQTT()">Disconnect</button>
<script src="./js/mqtt.min.js"></script>
<script>
var container = document.querySelector("#unity-container");
var canvas = document.querySelector("#unity-canvas");
var loadingBar = document.querySelector("#unity-loading-bar");
var progressBarFull = document.querySelector("#unity-progress-bar-full");
var fullscreenButton = document.querySelector("#unity-fullscreen-button");
var warningBanner = document.querySelector("#unity-warning");
// Shows a temporary message banner/ribbon for a few seconds, or
// a permanent error message on top of the canvas if type=='error'.
// If type=='warning', a yellow highlight color is used.
// Modify or remove this function to customize the visually presented
// way that non-critical warnings and error messages are presented to the
// user.
function unityShowBanner(msg, type) {
function updateBannerVisibility() {
warningBanner.style.display = warningBanner.children.length ? 'block' : 'none';
}
var div = document.createElement('div');
div.innerHTML = msg;
warningBanner.appendChild(div);
if (type == 'error') div.style = 'background: red; padding: 10px;';
else {
if (type == 'warning') div.style = 'background: yellow; padding: 10px;';
setTimeout(function () {
warningBanner.removeChild(div);
updateBannerVisibility();
}, 5000);
}
updateBannerVisibility();
}
var buildUrl = "Build";
var loaderUrl = buildUrl + "/webgl.loader.js";
var config = {
dataUrl: buildUrl + "/webgl.data.unityweb",
frameworkUrl: buildUrl + "/webgl.framework.js.unityweb",
codeUrl: buildUrl + "/webgl.wasm.unityweb",
streamingAssetsUrl: "StreamingAssets",
companyName: "DefaultCompany",
productName: "U3D_TobaccoWarehouseISMDTSystem",
productVersion: "0.1",
showBanner: unityShowBanner,
};
// By default, Unity keeps WebGL canvas render target size matched with
// the DOM size of the canvas element (scaled by window.devicePixelRatio)
// Set this to false if you want to decouple this synchronization from
// happening inside the engine, and you would instead like to size up
// the canvas DOM size and WebGL render target sizes yourself.
// config.matchWebGLToCanvasSize = false;
if (/iPhone|iPad|iPod|Android/i.test(navigator.userAgent)) {
// Mobile device style: fill the whole browser client area with the game canvas:
var meta = document.createElement('meta');
meta.name = 'viewport';
meta.content = 'width=device-width, height=device-height, initial-scale=1.0, user-scalable=no, shrink-to-fit=yes';
document.getElementsByTagName('head')[0].appendChild(meta);
container.className = "unity-mobile";
canvas.className = "unity-mobile";
// To lower canvas resolution on mobile devices to gain some
// performance, uncomment the following line:
// config.devicePixelRatio = 1;
} else {
// Desktop style: Render the game canvas in a window that can be maximized to fullscreen:
// canvas.style.width = "960px";
// canvas.style.height = "600px";
}
//----------------------------------------------------------------------------------MQTT-----------------------------------------------------------------------------
let client;
function OpenHtmlMQTT() {
client = mqtt.connect('ws://10.155.161.49:8083/mqtt');
client.on('connect', () => {
console.log('连接...');
const devices = [
"cm1",//去加盖机
Array.from({ length: 7 }, (_, i) => `elv${i + 1}`),//提升机
Array.from({ length: 7 }, (_, i) => `convoyor510${i + 1}`),//输送机
Array.from({ length: 51 }, (_, i) => `convoyor52${String(i + 1).padStart(2, '0')}`),//输送机
Array.from({ length: 30 }, (_, i) => `convoyor54${String(i + 1).padStart(2, '0')}`),//输送机
Array.from({ length: 4 }, (_, i) => `dpm${i + 1}`),//拆码垛机
Array.from({ length: 2 }, (_, i) => `fxj${i + 1}`),////机械手臂
Array.from({ length: 8 }, (_, i) => `car${i + 1}`),//小车
"fe1",//落地时提升机
Array.from({ length: 2 }, (_, i) => `qcbd${i + 1}`)//快换电池装置
];
devices.forEach(device => {
console.log(device);
client.subscribe(device, {
onSuccess: () => {
console.log(`已订阅: ${device}`);
},
onFailure: (err) => {
console.error(`订阅失败: ${device}:`, err);
}
});
});
// client.subscribe('car1', (err) => {
// if (!err) {
// console.log('Subscribed to car1');
// }
// });
//
});
client.on('message', (topic, message) => {
const mes = JSON.stringify({ device: topic, message: message.toString() });
// console.log(mes);
unityInstance.SendMessage('APP', 'Message', mes)
});
client.on('error', (err) => {
console.error('Connection error: ', err);
});
}
function publishMessage() {
if (client) {
client.publish('car1', 'Hello');
}
}
function disconnectMQTT() {
if (client) {
client.end(() => {
console.log('关闭连接');
});
}
}
//----------------------------------------------------------------------------------MQTT-----------------------------------------------------------------------------
loadingBar.style.display = "block";
var script = document.createElement("script");
script.src = loaderUrl;
script.onload = () => {
createUnityInstance(canvas, config, (progress) => {
progressBarFull.style.width = 100 * progress + "%";
}).then((unityInstance) => {
loadingBar.style.display = "none";
// 为window添加unityInstance对象
window.unityInstance = unityInstance
fullscreenButton.onclick = () => {
unityInstance.SetFullscreen(1);
};
}).catch((message) => {
alert(message);
});
};
function openCar(data) {
// console.log(data);
unityInstance.SendMessage('Canvas', 'Popupwindow', data)
}
function unityBoxHandle(val) {
if (val) {
unityInstance.SendMessage('Canvas', 'Partialhiding', val)
} else {
console.log(val,'xxxxxxxxxxx');
unityInstance.SendMessage('Canvas', 'Boxshow')
}
}
document.body.appendChild(script);
</script>
</body>
</html>

View File

@ -1,49 +0,0 @@
import request from '@/utils/request'
// 电池位监控
export function getBatteryMonitor(params){
return request({
url:'/api/chargingApi/MonitorRealTime',
method:'get',
params
})
}
// 获取电池编号的基本信息
export function getBatteryStatics(params){
return request({
url:'/api/chargingApi/GetBatteryStatics',
method:'get',
params
})
}
// 统计充电时间
export function countChargeTime(params){
return request({
url:'/api/chargingApi/CountChargeTime',
method:'get',
params
})
}
// 电池检测
export function getBatteryInspect(params){
return request({
url:'/api/chargingApi/GetBatteryInspect',
method:'get',
params
})
}
// 获取所有电池位编号
export function getAllBatteryNum(params){
return request({
url:'/api/chargingApi/GetAllBatteryNum',
method:'get',
params
})
}
// 获取全部电池位置
export function getBatteryLocation(params){
return request({
url:'/api/chargingApi/GetBatteryLocation',
method:'get',
params
})
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 38 KiB

After

Width:  |  Height:  |  Size: 38 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 40 KiB

After

Width:  |  Height:  |  Size: 40 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 40 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 38 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.3 KiB

View File

@ -14,12 +14,7 @@
</div> </div>
<p>电池编号</p> <p>电池编号</p>
<ul> <ul>
<li <li v-for="(item, index) in batteryNumList" :key="'li' + index">
v-for="(item, index) in batteryNumList"
:class="batteryIndex == index ? 'selectBat' : ''"
:key="'li' + index"
@click="clickBat(item)"
>
{{ item }} {{ item }}
</li> </li>
</ul> </ul>
@ -67,24 +62,20 @@
label="充电结束时间" label="充电结束时间"
align="center" align="center"
/> />
<el-table-column <el-table-column prop="errorMsg" label="故障信息" align="right" />
prop="isError"
label="故障信息"
align="right"
/>
</el-table> </el-table>
</div> </div>
<div style="float: right"> <div style="float: right">
<el-pagination <el-pagination
v-model:current-page="tableParams.index" v-model:current-page="currentPage1"
:page-size="tableParams.size" :page-size="100"
:size="tableParams.size" :size="size"
layout="total, prev, pager, next" layout="total, prev, pager, next"
:total="total" :total="1000"
prev-text="上一页" prev-text="上一页"
@current-change="getBatteryInspectData"
next-text="下一页" next-text="下一页"
> >
</el-pagination> </el-pagination>
</div> </div>
@ -98,20 +89,10 @@
import { ref, onMounted, nextTick } from "vue"; import { ref, onMounted, nextTick } from "vue";
import getPath from "@/utils/getPath"; import getPath from "@/utils/getPath";
import * as echarts from "echarts"; import * as echarts from "echarts";
import {
getBatteryMonitor,
getBatteryStatics,
countChargeTime,
getAllBatteryNum,
getBatteryInspect,
} from "@/api/batteryManagement/index.js";
import moment from "moment";
const batteryNumList = ref([ const batteryNumList = ref([
// 20230013, 20230013, 20230013, 20230013, 20230013, 20230013, 20230013, 20230013, 20230013, 20230013, 20230013, 20230013, 20230013, 20230013,
// 20230013, 20230013, 20230013, 20230013, 20230013, 20230013, 20230013, 20230013, 20230013, 20230013, 20230013, 20230013, 20230013, 20230013,
]); ]);
const selectBattery = ref("");
const batteryIndex = ref(0);
const analysisList = ref([ const analysisList = ref([
{ {
pic: getPath.analysisItem1, pic: getPath.analysisItem1,
@ -122,7 +103,7 @@ const analysisList = ref([
{ {
pic: getPath.analysisItem2, pic: getPath.analysisItem2,
name: "充电次数(次)", name: "充电次数(次)",
num: 0, num: 3,
color: "rgba(25, 174, 250, 1)", color: "rgba(25, 174, 250, 1)",
}, },
{ {
@ -135,44 +116,28 @@ const analysisList = ref([
const emit = defineEmits(["closeBattery"]); const emit = defineEmits(["closeBattery"]);
const tableList = ref([ const tableList = ref([
// { {
// startTime: "2023-03-08T17:45:04.417", startTime: "2023-03-08T17:45:04.417",
// endTime: "2023-03-08T17:45:04.417", endTime:'2023-03-08T17:45:04.417',
// isError: "", errorMsg:'无故障'
// }, },
// { {
// startTime: "2023-03-08T17:45:04.417", startTime: "2023-03-08T17:45:04.417",
// endTime: "2023-03-08T17:45:04.417", endTime:'2023-03-08T17:45:04.417',
// isError: "", errorMsg:'无故障'
// }, },
]); ]);
const total = ref(0);
const tableParams = ref({
index: 1,
size: 5,
});
function close() { function close() {
emit("closeBattery", -1); emit("closeBattery", -1);
} }
function drawLineChart(data) { function drawLineChart() {
let dom = document.querySelector("#plate-chart"); let dom = document.querySelector("#plate-chart");
dom.removeAttribute("_echarts_instance_"); dom.removeAttribute("_echarts_instance_");
let myChart; let myChart;
myChart = echarts.init(dom); myChart = echarts.init(dom);
let list = [];
data.forEach((item) => {
console.log();
list.push({
value:moment.duration(item).asMinutes().toFixed(1)
});
});
console.log(list, "数组");
// data = [];
let option = { let option = {
tooltip: { tooltip: {},
trigger: 'axis',
},
grid: { grid: {
top: "20%", top: "20%",
left: "1%", left: "1%",
@ -203,9 +168,7 @@ function drawLineChart(data) {
}, },
}, },
axisTick: { show: false }, axisTick: { show: false },
data: data.map((el, index) => { data: ["1", "2", "3"],
return index;
}),
}, },
], ],
yAxis: [ yAxis: [
@ -215,7 +178,7 @@ function drawLineChart(data) {
nameTextStyle: { nameTextStyle: {
color: "#FFF", color: "#FFF",
align: "middle", align: "middle",
padding: data.length === 0 ? [0, -35, 0, 0] : [0, 0, 0, 0], padding: [0, 0, 0, 0],
}, },
// min: 0, // min: 0,
// max: 1, // max: 1,
@ -268,9 +231,7 @@ function drawLineChart(data) {
shadowBlur: 20, //shadowBlurshadowColor,shadowOffsetX/Y, shadowBlur: 20, //shadowBlurshadowColor,shadowOffsetX/Y,
}, },
}, },
data: list.map((el) => { data: [0.3, 0.8, 0.4, 0.5, 0.8, 0.9, 0.4],
return el.value;
}),
}, },
], ],
}; };
@ -283,74 +244,11 @@ function drawLineChart(data) {
}); });
} }
//
function getAllBettery() {
getAllBatteryNum().then((res) => {
if (res.code == 200) {
batteryNumList.value = res.result;
selectBattery.value = res.result[0];
getRightData();
} else {
return;
}
});
}
//
function getRightData() {
getBetteryDetail();
getCountChargeTime();
getBatteryInspectData();
}
function clickBat(item) {
selectBattery.value = item;
getRightData();
}
//
function getBetteryDetail() {
let params = {
batteryNo: selectBattery.value,
};
getBatteryStatics(params).then((res) => {
analysisList.value.forEach((el) => {
if (el.name.indexOf("报警次数") != -1) {
el.num = res.result.errorNum;
} else if (el.name.indexOf("充电次数") != -1) {
el.num = res.result.chargeNum;
} else if (el.name.indexOf("使用寿命") != -1) {
el.num = res.result.useTime;
}
});
});
}
//
function getCountChargeTime() {
let params = {
batteryNo: selectBattery.value,
};
countChargeTime(params).then((res) => {
if (res.code == 200) {
drawLineChart(res.result);
}
});
}
//
function getBatteryInspectData() {
tableParams.value.batteryNo = selectBattery.value;
getBatteryInspect(tableParams.value).then((res) => {
total.value = res.result.totalNum;
tableList.value = res.result.data;
});
}
onMounted(() => { onMounted(() => {
// drawLineChart(); drawLineChart();
getAllBettery();
}); });
</script> </script>
<style scoped lang="scss"> <style scoped lang="scss">
.selectBat {
background-image: url("@/assets/images/dialog/num-select.png") !important;
}
.box { .box {
width: vw(1380); width: vw(1380);
height: vh(716); height: vh(716);
@ -422,7 +320,6 @@ onMounted(() => {
li { li {
width: vw(224); width: vw(224);
height: vh(36); height: vh(36);
background-size: 100% 100%;
background-image: url("@/assets/images/dialog/num-default.png"); background-image: url("@/assets/images/dialog/num-default.png");
padding-left: vw(14); padding-left: vw(14);
box-sizing: border-box; box-sizing: border-box;
@ -527,8 +424,8 @@ onMounted(() => {
.bottom { .bottom {
position: relative; position: relative;
&-box { &-box {
height: vh(180); height: vh(150);
// margin-bottom: vh(32); margin-bottom: vh(32);
} }
} }
} }

View File

@ -5,13 +5,12 @@
import { ref, onMounted,watch ,defineProps} from "vue"; import { ref, onMounted,watch ,defineProps} from "vue";
import * as echarts from "echarts"; import * as echarts from "echarts";
import getPath from "@/utils/getPath"; import getPath from "@/utils/getPath";
import { fontSize } from "@/utils/common";
const props = defineProps({ const props = defineProps({
dataMap: Object, dataMap: Object,
}); });
defineExpose({ defineExpose({
drawChart, drawChart
}); })
function drawChart() { function drawChart() {
let myChart = echarts.init( let myChart = echarts.init(
document.getElementById("pieChart" + props.dataMap.id) document.getElementById("pieChart" + props.dataMap.id)
@ -23,32 +22,25 @@ function drawChart() {
*/ */
elements: [ elements: [
{ {
type: "image", type: 'image',
style: { style: {
image: image: props.dataMap.name==='库存数量'?getPath.pieBg1:getPath.pieBg2, //
props.dataMap.name === "库存数量" width: 132,
? getPath.pieBg1 height: 132
: getPath.pieBg2, //
width: fontSize(1.32),
height: fontSize(1.32),
}, },
// left: '18.5%', // left: '18.5%',
left: "center", // 1 left: 'center', // 1
top: "center", top: 'center'
}, }
], ]
}, },
title: [ title: [{
{
text: props.dataMap.name, text: props.dataMap.name,
x: "center", x: "center",
y: "50%", y: "85",
textStyle: { textStyle: {
color: color: props.dataMap.name==='库存数量'?"rgba(174, 211, 255, 1)":"rgba(255, 247, 228, 1)",
props.dataMap.name === "库存数量"
? "rgba(174, 211, 255, 1)"
: "rgba(255, 247, 228, 1)",
fontSize: 12, fontSize: 12,
fontWeight: "normal", fontWeight: "normal",
}, },
@ -56,14 +48,13 @@ function drawChart() {
{ {
text: props.dataMap.value, text: props.dataMap.value,
x: "center", x: "center",
y: "35%", y: "50",
textStyle: { textStyle: {
color: "#fff", color: "#fff",
fontSize: 30, fontSize: 30,
fontWeight: "normal", fontWeight: "normal",
}, },
}, }],
],
tooltip: { tooltip: {
trigger: "item", trigger: "item",
formatter: "{a} <br/>{b} : {c} ({d}%)", formatter: "{a} <br/>{b} : {c} ({d}%)",
@ -85,35 +76,30 @@ function drawChart() {
value: props.dataMap.value, value: props.dataMap.value,
name: props.dataMap.name, name: props.dataMap.name,
itemStyle: { itemStyle: {
borderColor: "transparent", borderColor:'transparent',
borderWidth:0, borderWidth:0,
color: new echarts.graphic.LinearGradient(0, 1, 0, 0, [ color: new echarts.graphic.LinearGradient(0, 1, 0, 0, [
{ {
offset: 0, offset: 0,
color: color:props.dataMap.name==='库存数量'?'rgba(45, 204, 255, .3)':'rgba(255, 206, 84, .0)',
props.dataMap.name === "库存数量"
? "rgba(45, 204, 255, .3)"
: "rgba(255, 206, 84, .0)",
}, },
{ {
offset: 1, offset: 1,
color: color: props.dataMap.name==='库存数量'?'rgba(45, 204, 255, 1)':'rgba(255, 206, 84, 1)',
props.dataMap.name === "库存数量"
? "rgba(45, 204, 255, 1)"
: "rgba(255, 206, 84, 1)",
}, },
]), ]),
}, },
labelLine:{show:false}, labelLine:{show:false},
label: { show: false }, label:{show:false}
}, },
{ {
value: props.dataMap.total - props.dataMap.value, value: props.dataMap.total - props.dataMap.value,
name: "", name: "",
tooltip:{ tooltip:{
show: false, show:false
}, },
itemStyle: { itemStyle: {
color: "transparent", color: "transparent",
}, },
}, },
@ -122,10 +108,6 @@ function drawChart() {
], ],
}; };
myChart.setOption(option); myChart.setOption(option);
// window.addEventListener()
window.addEventListener("resize", function () {
myChart.resize();
});
} }
onMounted(() => { onMounted(() => {
// darwChart(); // darwChart();

View File

@ -128,6 +128,7 @@ import {
getDeviceDetail, getDeviceDetail,
} from "@/api/equipmentManagement/index"; } from "@/api/equipmentManagement/index";
const emit = defineEmits(["closeDeviceInfo"]); const emit = defineEmits(["closeDeviceInfo"]);
const tableList = ref([]); const tableList = ref([]);
// //
@ -277,7 +278,6 @@ onMounted(() => {
display: flex; display: flex;
&-left, &-left,
&-right { &-right {
font-size: 1rem;
padding: vw(20) vh(20); padding: vw(20) vh(20);
box-sizing: border-box; box-sizing: border-box;
height: 100%; height: 100%;

View File

@ -94,8 +94,8 @@
:key="index" :key="index"
> >
<p> <p>
<span style="font-size:1rem">{{item.elementName }} {{item.elementCode}}</span> <span>{{item.elementName }} {{item.elementCode}}</span>
<span style="font-size:1rem">{{ item.damageRatio*100 }}%</span> <span>{{ item.damageRatio*100 }}%</span>
</p> </p>
<div class="switch-item-progress" :style="'width:' + item.damageRatio*100 + '%'"></div> <div class="switch-item-progress" :style="'width:' + item.damageRatio*100 + '%'"></div>
<div class="switch-item-time"> <div class="switch-item-time">

View File

@ -764,7 +764,6 @@ onMounted(() => {
} }
} }
&-right { &-right {
font-size: 1rem;
.handle, .handle,
.untreated { .untreated {
width: vw(352); width: vw(352);

View File

@ -11,32 +11,20 @@
<span>监测分析统计</span> <span>监测分析统计</span>
<div class="box-content-selelct"> <div class="box-content-selelct">
<el-form :inline="true" :model="form" class="demo-form-inline"> <el-form :inline="true" :model="form" class="demo-form-inline">
<el-form-item label="电池筛选"> <el-form-item label="电池筛选">
<el-select <el-select
v-model="form.location" v-model="form.battery"
placeholder="请选择" placeholder="请选择"
clearable clearable
@change="getData()"
> >
<el-option <el-option label="Zone one" value="shanghai" />
:key="index" <el-option label="Zone two" value="beijing" />
:label="item"
:value="item"
v-for="(item, index) in batteryList"
>
</el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item label="时间筛选"> <el-form-item label="时间筛选">
<el-select v-model="form.timeFrame" placeholder="请选择"> <el-select v-model="form.date" placeholder="请选择" clearable>
<el-option <el-option label="Zone one" value="shanghai" />
:label="item + '小时'" <el-option label="Zone two" value="beijing" />
:value="item"
:key="index"
v-for="(item, index) in dateList"
/>
<!-- <el-option label="Zone one" value="shanghai" />
<el-option label="Zone two" value="beijing" /> -->
</el-select> </el-select>
</el-form-item> </el-form-item>
</el-form> </el-form>
@ -53,27 +41,16 @@
<script setup> <script setup>
import * as echarts from "echarts"; import * as echarts from "echarts";
import { onMounted, reactive, ref } from "vue"; import { onMounted, reactive, ref } from "vue";
import {
getBatteryMonitor,
getBatteryLocation,
} from "@/api/batteryManagement/index.js";
const emit = defineEmits(["closeOnline"]); const emit = defineEmits(["closeOnline"]);
function close() { function close() {
emit("closeOnline", -1); emit("closeOnline", -1);
} }
const form = reactive({ const form = reactive({
location: "", // battery: "", //
timeFrame: 1, date: "",
}); });
const batteryList = ref([]);
const dateList = ref([
1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22,
23,
]);
const list = ref([]);
// echart // echart
function drawElectricity(list) { function drawElectricity() {
let dom = document.querySelector("#electricity"); let dom = document.querySelector("#electricity");
dom.removeAttribute("_echarts_instance_"); dom.removeAttribute("_echarts_instance_");
let myChart; let myChart;
@ -92,39 +69,33 @@ function drawElectricity(list) {
}, },
}, },
tooltip: { tooltip: {
trigger: "axis", trigger: "axis",
borderColor: "rgba(174, 211, 255, 1)", borderColor:'rgba(174, 211, 255, 1)',
backgroundColor: "rgba(8, 54, 86, .7)", backgroundColor: 'rgba(8, 54, 86, .7)',
textStyle: { textStyle: {
color: "#FFF", color: "#FFF",
}, },
padding: [10, 10], padding: [10, 10],
formatter: function (params) { formatter: function (params) {
// params // params
let result = params[0].name + "<br/>"; let result = params[0].name + '<br/>';
params.forEach(function (item) { params.forEach(function (item) {
result += result += item.seriesName + ': ' + item.value + (item.seriesName=='电流'?'A':'V') + '<br/>';
item.seriesName +
": " +
item.value +
(item.seriesName == "电流" ? "A" : "V") +
"<br/>";
}); });
return result; return result;
}, }
}, },
grid: { grid: {
top: "20%", top: "20%",
right: "4%", right:'4%',
left: "2%", left:'2%',
bottom: "6%", bottom:'6%'
}, },
xAxis: [ xAxis: [
{ {
type: "category", type: "category",
data: list.map((el, index) => { data: ["3.10", "3.10", "3.10", "3.10", "3.10", "3.10", "3.10"],
return index;
}),
axisLine: { axisLine: {
lineStyle: { lineStyle: {
color: "rgba(56, 72, 89, 1)", color: "rgba(56, 72, 89, 1)",
@ -177,10 +148,10 @@ function drawElectricity(list) {
], ],
yAxis: [ yAxis: [
{ {
name: "单位:A", name:'单位:V',
nameTextStyle:{ nameTextStyle:{
color: "#fff", color:'#fff',
padding: [0, 0, 0, -10], padding:[0,0,0,-10]
}, },
type: "value", type: "value",
axisTick: { axisTick: {
@ -200,17 +171,17 @@ function drawElectricity(list) {
splitLine: { splitLine: {
show: true, show: true,
lineStyle:{ lineStyle:{
type: "dashed", type:'dashed',
color: "rgba(255,255,255,0.2)", color:'rgba(255,255,255,0.2)'
}, }
}, },
}, },
{ {
name: "单位:V", name:'单位:A',
type: "value", type: "value",
nameTextStyle:{ nameTextStyle:{
color: "#fff", color:'#fff',
padding: [0, -30, 0, 0], padding:[0,-30,0,0]
}, },
position: "right", position: "right",
axisTick: { axisTick: {
@ -234,9 +205,7 @@ function drawElectricity(list) {
{ {
name: "电流", name: "电流",
type: "line", type: "line",
data: list.map((el) => { data: [10, 10, 30, 12, 15, 3, 7],
return el.outCurrent;
}),
symbolSize: 1, symbolSize: 1,
symbol: "circle", symbol: "circle",
smooth: true, smooth: true,
@ -244,15 +213,13 @@ function drawElectricity(list) {
showSymbol: false, showSymbol: false,
lineStyle: { lineStyle: {
// width: 1, // width: 1,
color: "rgba(25, 174, 250, 1)", color: 'rgba(25, 174, 250, 1)'
}, }
}, },
{ {
name: "电压", name: "电压",
type: "line", type: "line",
data: list.map((el) => { data: [150, 120, 170, 140, 500, 160, 110],
return el.outVoltage;
}),
symbolSize: 1, symbolSize: 1,
yAxisIndex: 1, yAxisIndex: 1,
symbol: "circle", symbol: "circle",
@ -260,10 +227,11 @@ function drawElectricity(list) {
showSymbol: false, showSymbol: false,
lineStyle: { lineStyle: {
// width: 5, // width: 5,
color: "rgba(28, 238, 251, 1)", color: 'rgba(28, 238, 251, 1)'
}, },
itemStyle: { itemStyle: {
color: "rgba(28, 238, 251, 1)", color: 'rgba(28, 238, 251, 1)',
}, },
}, },
], ],
@ -271,17 +239,12 @@ function drawElectricity(list) {
myChart.setOption(option); myChart.setOption(option);
} }
// echarts // echarts
function drawHeartChart(list) { function drawHeartChart(){
let dom = document.querySelector("#heart"); let dom = document.querySelector("#heart");
dom.removeAttribute("_echarts_instance_"); dom.removeAttribute("_echarts_instance_");
let myChart; let myChart;
myChart = echarts.init(dom); myChart = echarts.init(dom);
const colorList = [ const colorList = ["rgba(25, 174, 250, 1)", "rgba(28, 238, 251, 1)", "rgba(255, 206, 84, 1)", "rgba(174, 211, 255, 1)"];
"rgba(25, 174, 250, 1)",
"rgba(28, 238, 251, 1)",
"rgba(255, 206, 84, 1)",
"rgba(174, 211, 255, 1)",
];
let option = { let option = {
legend: { legend: {
icon: "rect", icon: "rect",
@ -295,34 +258,33 @@ function drawHeartChart(list) {
}, },
}, },
tooltip: { tooltip: {
trigger: "axis", trigger: "axis",
borderColor: "rgba(174, 211, 255, 1)", borderColor:'rgba(174, 211, 255, 1)',
backgroundColor: "rgba(8, 54, 86, .7)", backgroundColor: 'rgba(8, 54, 86, .7)',
textStyle: { textStyle: {
color: "#FFF", color: "#FFF",
}, },
padding: [10, 10], padding: [10, 10],
formatter: function (params) { formatter: function (params) {
// params // params
let result = params[0].name + "<br/>"; let result = params[0].name + '<br/>';
params.forEach(function (item) { params.forEach(function (item) {
result += item.seriesName + ": " + item.value + "℃" + "<br/>"; result += item.seriesName + ': ' + item.value + '℃' + '<br/>';
}); });
return result; return result;
}, }
}, },
grid: { grid: {
top: "20%", top: "20%",
right: "4%", right:'4%',
left: "2%", left:'2%',
bottom: "6%", bottom:'6%'
}, },
xAxis: [ xAxis: [
{ {
type: "category", type: "category",
data: list.map((el, index) => { data: ["3.10", "3.10", "3.10", "3.10", "3.10", "3.10", "3.10"],
return index;
}),
axisLine: { axisLine: {
lineStyle: { lineStyle: {
color: "rgba(56, 72, 89, 1)", color: "rgba(56, 72, 89, 1)",
@ -375,10 +337,10 @@ function drawHeartChart(list) {
], ],
yAxis: [ yAxis: [
{ {
name: "单位:V", name:'单位:V',
nameTextStyle:{ nameTextStyle:{
color: "#fff", color:'#fff',
padding: [0, 0, 0, -10], padding:[0,0,0,-10]
}, },
type: "value", type: "value",
axisTick: { axisTick: {
@ -398,19 +360,18 @@ function drawHeartChart(list) {
splitLine: { splitLine: {
show: true, show: true,
lineStyle:{ lineStyle:{
type: "dashed", type:'dashed',
color: "rgba(255,255,255,0.2)", color:'rgba(255,255,255,0.2)'
}, }
}, },
}, },
], ],
series: [ series: [
{ {
name: "温度1", name: "温度1",
type: "line", type: "line",
data: list.map((el) => { data: [10, 10, 30, 12, 15, 3, 7],
return el.outTemp01;
}),
symbolSize: 1, symbolSize: 1,
symbol: "rect", symbol: "rect",
smooth: true, smooth: true,
@ -418,81 +379,59 @@ function drawHeartChart(list) {
showSymbol: false, showSymbol: false,
lineStyle: { lineStyle: {
// width: 1, // width: 1,
color: colorList[0], color: colorList[0]
}, }
}, },
{ {
name: "温度2", name: "温度2",
type: "line", type: "line",
data: list.map((el) => { data: [22, 3, 4, 5, 6, 9, 11],
return el.outTemp02;
}),
symbolSize: 1, symbolSize: 1,
symbol: "rect", symbol: "rect",
smooth: true, smooth: true,
showSymbol: false, showSymbol: false,
lineStyle: { lineStyle: {
// width: 5, // width: 5,
color: colorList[1], color: colorList[1]
}, },
}, },
{ {
name: "温度3", name: "温度3",
type: "line", type: "line",
data: list.map((el) => { data: [22, 3, 4, 5, 6, 9, 11],
return el.outTemp03;
}),
symbolSize: 1, symbolSize: 1,
symbol: "rect", symbol: "rect",
smooth: true, smooth: true,
showSymbol: false, showSymbol: false,
lineStyle: { lineStyle: {
// width: 5, // width: 5,
color: colorList[2], color: colorList[2]
}, },
}, },
{ {
name: "温度4", name: "温度4",
type: "line", type: "line",
data: list.map((el) => { data: [50, 34, 54, 11, 33, 22, 11],
return el.outTemp04;
}),
symbolSize: 1, symbolSize: 1,
symbol: "rect", symbol: "rect",
smooth: true, smooth: true,
showSymbol: false, showSymbol: false,
lineStyle: { lineStyle: {
// width: 5, // width: 5,
color: colorList[3], color: colorList[3]
}, },
itemStyle:{ itemStyle:{
color: colorList[3], color:colorList[3]
}, }
}, }
], ],
}; };
myChart.setOption(option); myChart.setOption(option);
} }
// echarts
function getData() {
getBatteryMonitor(form).then((res) => {
drawElectricity(res.result);
drawHeartChart(res.result);
});
}
function getBatteryList() {
getBatteryLocation().then((res) => {
if (res.code == 200) {
batteryList.value = res.result;
}
console.log(batteryList.value, "batteryList.value");
});
}
getBatteryList();
onMounted(() => { onMounted(() => {
getData(); drawElectricity();
drawHeartChart();
}); });
</script> </script>
<style scoped lang="scss"> <style scoped lang="scss">

View File

@ -113,7 +113,6 @@ onMounted(() => {
<style scoped lang="scss"> <style scoped lang="scss">
.box { .box {
width: vw(1380); width: vw(1380);
font-size: 1rem;
height: vh(716); height: vh(716);
position: absolute; position: absolute;
left: 0; left: 0;

View File

@ -203,7 +203,6 @@ onMounted(() => {
} }
&-left { &-left {
width: vw(340); width: vw(340);
background-size: 100% 100%;
height: vh(616); height: vh(616);
background-image: url("@/assets/images/dialog/knowledgeBase-left.png"); background-image: url("@/assets/images/dialog/knowledgeBase-left.png");
padding: vh(20) vw(20); padding: vh(20) vw(20);

View File

@ -6,13 +6,13 @@
<div class="box-btn" @click="close"></div> <div class="box-btn" @click="close"></div>
</div> </div>
<div class="box-content"> <div class="box-content">
<el-table v-fit-columns :data="list" @row-click="rowClick" style="width: 100%"> <el-table :data="list" style="width: 100%">
<el-table-column prop="itemDesc" label="品牌" min-width="20%" /> <el-table-column prop="itemDesc" label="品牌" width="150" />
<el-table-column prop="batchNum" label="批次号" min-width="25%"/> <el-table-column prop="batchNum" label="批次号" width="250"/>
<el-table-column prop="inTime" label="入库时间" min-width="20%"/> <el-table-column prop="inTime" label="入库时间" width="240"/>
<el-table-column prop="weight" label="重量(kg)" min-width="15%"/> <el-table-column prop="weight" label="重量(kg)" width="160"/>
<el-table-column prop="boxCount" label="箱数" min-width="10%"/> <el-table-column prop="boxCount" label="箱数" />
<el-table-column prop="status" label="是否入库" min-width="10%"/> <el-table-column prop="status" label="是否入库" />
</el-table> </el-table>
</div> </div>
</div> </div>
@ -22,7 +22,7 @@
import { onMounted, ref } from "vue"; import { onMounted, ref } from "vue";
import {getInventoryMessage} from '@/api/home' import {getInventoryMessage} from '@/api/home'
import getPath from "@/utils/getPath"; import getPath from "@/utils/getPath";
const emit = defineEmits(["close","rowClickHandle"]); const emit = defineEmits(["close"]);
const list = ref([ const list = ref([
{ {
batchNum: "YXZZP2303001", batchNum: "YXZZP2303001",
@ -35,9 +35,6 @@ const list = ref([
function close() { function close() {
emit("close", false); emit("close", false);
} }
function rowClick(row){
emit("rowClickHandle",row.batchNum)
}
onMounted(()=>{ onMounted(()=>{
getInventoryMessage().then(res=>{ getInventoryMessage().then(res=>{
console.log(res,'xxxxxxxx'); console.log(res,'xxxxxxxx');

View File

@ -98,15 +98,9 @@
</template> </template>
<script setup> <script setup>
import { onMounted, reactive, ref, toRefs } from "vue"; import { onMounted, reactive, ref, toRefs } from "vue";
import { getCarErrorIn12, getOverTransmission } from "@/api/home"; import {getCarErrorIn12,getOverTransmission} from '@/api/home'
import getPath from "@/utils/getPath"; import getPath from "@/utils/getPath";
const emit = defineEmits(["closeMsg"]); const emit = defineEmits(["closeMsg"]);
const props = defineProps({
mqttData:{
string:Array,
default:[]
}
})
const list = ref([ const list = ref([
// { // {
// code: "car15", // code: "car15",
@ -207,36 +201,34 @@ const list = ref([
// repairPersonnel: "", // repairPersonnel: "",
// }, // },
]); ]);
const list1 = ref([]); const list1 = ref([])
function close() { function close() {
emit("closeMsg", false); emit("closeMsg", false);
} }
// mqtt // mqtt
function realInfo(topic, message) { function realInfo(topic, message) {
if (topic == "faults_now") { if (topic == 'faults_now') {
const utf8decoder = new TextDecoder(); const utf8decoder = new TextDecoder();
const u8arr = new Uint8Array(message); const u8arr = new Uint8Array(message);
const temp = utf8decoder.decode(u8arr); // const temp = utf8decoder.decode(u8arr); //
const msg = JSON.parse(temp); //JSON const msg = JSON.parse(temp); //JSON
console.log(msg,'xxxxxxxxxxx'); list1.value = msg
list1.value = msg;
} }
} }
onMounted(()=>{ onMounted(()=>{
// //
// console.log(props);
list1.value = props.mqttData
// getCarErrorIn12().then(res=>{ // getCarErrorIn12().then(res=>{
// list1.value = res.result // list1.value = res.result
// }) // })
// window.PubScribe(null, realInfo);
// //
getOverTransmission().then((res) => { getOverTransmission().then(res=>{
list.value = res.result; list.value = res.result
}); })
// //
}); window.PubScribe(null, realInfo)
})
// //
const options = [ const options = [
{ {

View File

@ -1,7 +1,7 @@
<template> <template>
<Nav /> <Nav />
<div class="unity"> <div class="unity">
<iframe src="model/index.html" id="iframeRef" frameborder="0"></iframe> <iframe src="model/index.html" frameborder="0"></iframe>
</div> </div>
<div class="home"> <div class="home">
<div class="home-left"> <div class="home-left">
@ -68,11 +68,9 @@
> >
<p>{{ activity.msg }}</p> <p>{{ activity.msg }}</p>
<p class="home-left-messageReminder-data"> <p class="home-left-messageReminder-data">
<span <span style="color: rgba(148, 219, 255, 1)" class="home-left-messageReminder-font">{{
style="color: rgba(148, 219, 255, 1)" activity.reminderMsg
class="home-left-messageReminder-font" }}</span>
>{{ activity.reminderMsg }}</span
>
<span style="color: rgba(192, 192, 192, 1)">{{ <span style="color: rgba(192, 192, 192, 1)">{{
activity.date activity.date
}}</span> }}</span>
@ -87,22 +85,10 @@
class="w-50 m-2" class="w-50 m-2"
placeholder="请输入搜索内容" placeholder="请输入搜索内容"
:suffix-icon="Search" :suffix-icon="Search"
@change="searchCar"
/> />
</div> </div>
<div class="home-btn-reset" @click="resetUnity">刷新</div>
</div> </div>
<div class="home-right"> <div class="home-right">
<!-- 失活二层箱子激活一层箱子 重新加载三维场景 -->
<div class="home-btn">
<div
class="home-btn-unity"
v-if="unityBoxShow"
@click="unityBoxHandle(false)"
>
{{ unityBtn }}
</div>
</div>
<!-- 库存消息 --> <!-- 库存消息 -->
<div class="home-title"> <div class="home-title">
<span class="home-title-font"> 库存消息 </span> <span class="home-title-font"> 库存消息 </span>
@ -199,15 +185,11 @@
</div> </div>
</div> </div>
<!-- 故障提醒弹窗 --> <!-- 故障提醒弹窗 -->
<messageDialog v-if="isOpen" :mqttData="mqttList" @closeMsg="closeMsg" /> <messageDialog v-if="isOpen" @closeMsg="closeMsg" />
<!-- 各品牌库存弹窗 --> <!-- 各品牌库存弹窗 -->
<brand v-if="brandShow" @closeBrand="closeBrand" /> <brand v-if="brandShow" @closeBrand="closeBrand" />
<!-- 库存消息弹窗 --> <!-- 库存消息弹窗 -->
<inventoryNews <inventoryNews v-if="inventoryNewsShow" @close="closeInventoryNews" />
@rowClickHandle="unityBoxHandle"
v-if="inventoryNewsShow"
@close="closeInventoryNews"
/>
<!-- 出入库信息弹窗 --> <!-- 出入库信息弹窗 -->
<inOutBound <inOutBound
v-if="inOutShow" v-if="inOutShow"
@ -250,33 +232,7 @@ import {
getLocInfo, getLocInfo,
} from "@/api/home"; } from "@/api/home";
import { fontSize } from "@/utils/common"; import { fontSize } from "@/utils/common";
const unityBoxShow = ref(false);
//
function resetUnity() {
unityBoxShow.value = false;
document.querySelector("#iframeRef").src = "model/index.html";
}
const unityBtn = ref("隐藏二层箱子");
const unityNum = ref(0);
//
function unityBoxHandle(val) {
if (val) {
inventoryNewsShow.value = false;
unityBoxShow.value = true;
unityNum.value = 0;
unityBtn.value = "隐藏二层箱子";
} else {
unityNum.value++;
if (unityNum.value % 2 != 0) {
unityBtn.value = "展示二层箱子";
} else {
unityBtn.value = "隐藏二层箱子";
}
}
document
.querySelector("#iframeRef")
.contentWindow.unityBoxHandle(val);
}
const { proxy } = getCurrentInstance(); const { proxy } = getCurrentInstance();
// //
const deviceList = ref([ const deviceList = ref([
@ -351,7 +307,7 @@ function darwBrandChart(data) {
// moveOnMouseWheel: true, // // moveOnMouseWheel: true, //
// moveOnMouseMove: false, // // moveOnMouseMove: false, //
// }, // },
// ],ontSize // ],
yAxis: [ yAxis: [
{ {
type: "category", type: "category",
@ -476,12 +432,7 @@ const messageReminder = ref([
]); ]);
// //
const searchData = ref(); const searchData = ref();
function searchCar() {
let dom = document.querySelector("#iframeRef");
let data = searchData.value;
dom.contentWindow.openCar(data.toString());
searchData.value = "";
}
// echarts // echarts
function drawInventoryNewsEcahrt(result) { function drawInventoryNewsEcahrt(result) {
console.log(result, "库存消息"); console.log(result, "库存消息");
@ -898,7 +849,7 @@ async function getMessageReminder() {
// }); // });
// }); // });
await getOverTransmission().then((res) => { await getOverTransmission().then((res) => {
res.result.forEach((el) => { res.result.slice(0, 1).forEach((el) => {
el.msg = "超时提醒"; el.msg = "超时提醒";
el.reminderMsg = el.itemDesc + el.palletNum + " 任务超时"; el.reminderMsg = el.itemDesc + el.palletNum + " 任务超时";
el.date = el.startDate; el.date = el.startDate;
@ -906,6 +857,10 @@ async function getMessageReminder() {
}); });
}); });
} }
// mqtt
function getMqtt(msg){
console.log(msg,'数据');
}
// //
function getInventory() { function getInventory() {
getLocInfo().then((res) => { getLocInfo().then((res) => {
@ -944,41 +899,39 @@ function formatNumber(num) {
throw new Error("Invalid input"); // throw new Error("Invalid input"); //
} }
} }
const mqttList = ref([]);
// mqtt // mqtt
function realInfo(topic, message) { function realInfo(topic, message) {
if (topic == "faults_now") { if (topic == 'faults_now') {
console.log("接收数据1", message); console.log('接收数据1',message);
const utf8decoder = new TextDecoder(); const utf8decoder = new TextDecoder();
const u8arr = new Uint8Array(message); const u8arr = new Uint8Array(message);
const temp = utf8decoder.decode(u8arr); // const temp = utf8decoder.decode(u8arr); //
console.log("temp", temp); console.log("temp", temp)
const msg = JSON.parse(temp); //JSON const msg = JSON.parse(temp); //JSON
let list = [];
msg.forEach((el) => { msg.forEach((el) => {
el.msg = "维修提醒"; el.msg = "维修提醒";
el.reminderMsg = el.facCode + " 需要维修"; el.reminderMsg = el.facCode + " 需要维修";
el.date = el.errorDateTime; el.date = el.errorDateTime;
list.push(el); messageReminder.value.push(el);
}); });
messageReminder.value = list;
mqttList.value = msg;
getMessageReminder(); // getMessageReminder(); //
} }
} }
onMounted(() => { onMounted(() => {
getDeviceStatus(); // getDeviceStatus(); //
getBrandData(); // getBrandData(); //
getInventory(); // getInventory(); //
getOutboundWorkOrder(); // getOutboundWorkOrder(); //
getInboundWorkOrder(); // getInboundWorkOrder(); //
window.PubScribe(null, realInfo);
// window.getMqttData = getMqtt;
window.getMqttData = getMqtt
window.PubScribe(null, realInfo)
}); });
</script> </script>
<style scoped lang="scss"> <style scoped lang="scss">
@ -995,33 +948,6 @@ onMounted(() => {
height: 100%; height: 100%;
} }
} }
.home-btn {
position: absolute;
left: -38%;
top: 26%;
&-unity{
width: 6rem;
font-size: 1rem;
padding: 0.5rem;
background-image: url("@/assets/images/home/unityBtn-D.png");
background-size: 100% 100%;
text-align: center;
cursor: pointer;
}
> div:nth-child(2) {
margin-top: 1.5rem;
}
}
.home-btn-reset {
width: 6rem;
font-size: 1rem;
padding: 0.5rem;
margin-top: 1rem;
background-image: url("@/assets/images/home/unityBtn-D.png");
background-size: 100% 100%;
text-align: center;
cursor: pointer;
}
.home { .home {
width: 100%; width: 100%;
height: 100%; height: 100%;

View File

@ -58,7 +58,7 @@
</div> </div>
</template> </template>
<script setup> <script setup>
import Nav from "@/views/home/components/layout.vue"; import Nav from '@/views/home/components/layout.vue'
import { ref, reactive, onMounted, watch } from "vue"; import { ref, reactive, onMounted, watch } from "vue";
import { ElMessage } from "element-plus"; import { ElMessage } from "element-plus";
import { useRouter } from "vue-router"; import { useRouter } from "vue-router";
@ -94,7 +94,7 @@ function submitForm(elForm) {
localStorage.setItem("loginInfo", JSON.stringify({})); localStorage.setItem("loginInfo", JSON.stringify({}));
} }
login(ruleForm).then((res) => { login(ruleForm).then((res) => {
if (res.result == "登录成功") { if (res.result == '登录成功') {
ElMessage({ ElMessage({
message: "登录成功", message: "登录成功",
type: "success", type: "success",