代码提交
This commit is contained in:
parent
54a967b8b9
commit
bb61d5f03b
Binary file not shown.
Binary file not shown.
File diff suppressed because one or more lines are too long
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
@ -1 +1 @@
|
|||
172.16.1.106:5005
|
||||
172.16.1.117:5005
|
Binary file not shown.
Before Width: | Height: | Size: 2.5 MiB |
Binary file not shown.
Before Width: | Height: | Size: 24 KiB |
|
@ -1,15 +1,13 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en-us">
|
||||
|
||||
<head>
|
||||
<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>
|
||||
|
||||
<body>
|
||||
</head>
|
||||
<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">
|
||||
|
@ -19,11 +17,11 @@
|
|||
</div>
|
||||
</div>
|
||||
<div id="unity-warning"> </div>
|
||||
<!-- <div id="unity-footer">
|
||||
<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>
|
||||
</div>
|
||||
<script>
|
||||
|
||||
|
@ -33,7 +31,7 @@
|
|||
var progressBarFull = document.querySelector("#unity-progress-bar-full");
|
||||
var fullscreenButton = document.querySelector("#unity-fullscreen-button");
|
||||
var warningBanner = document.querySelector("#unity-warning");
|
||||
|
||||
var unity
|
||||
// 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.
|
||||
|
@ -50,7 +48,7 @@
|
|||
if (type == 'error') div.style = 'background: red; padding: 10px;';
|
||||
else {
|
||||
if (type == 'warning') div.style = 'background: yellow; padding: 10px;';
|
||||
setTimeout(function () {
|
||||
setTimeout(function() {
|
||||
warningBanner.removeChild(div);
|
||||
updateBannerVisibility();
|
||||
}, 5000);
|
||||
|
@ -96,23 +94,22 @@
|
|||
} else {
|
||||
// Desktop style: Render the game canvas in a window that can be maximized to fullscreen:
|
||||
|
||||
canvas.style.width = "100%";
|
||||
canvas.style.height = "100%";
|
||||
// canvas.style.width = "960px";
|
||||
// canvas.style.height = "600px";
|
||||
}
|
||||
|
||||
// loadingBar.style.display = "block";
|
||||
var unity
|
||||
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) => {
|
||||
unity = unityInstance
|
||||
// loadingBar.style.display = "none";
|
||||
// fullscreenButton.onclick = () => {
|
||||
// unityInstance.SetFullscreen(1);
|
||||
// };
|
||||
window.unity = unityInstance
|
||||
loadingBar.style.display = "none";
|
||||
fullscreenButton.onclick = () => {
|
||||
unityInstance.SetFullscreen(1);
|
||||
};
|
||||
}).catch((message) => {
|
||||
alert(message);
|
||||
});
|
||||
|
@ -159,9 +156,9 @@
|
|||
function modelStatus(val) {
|
||||
window.parent.modelStatus(val)
|
||||
}
|
||||
|
||||
document.body.appendChild(script);
|
||||
|
||||
</script>
|
||||
</body>
|
||||
|
||||
</body>
|
||||
</html>
|
|
@ -116,21 +116,47 @@
|
|||
alert(message);
|
||||
});
|
||||
};
|
||||
//切换模型
|
||||
function changeModel(data){
|
||||
unity.SendMessage('Controller','Displaymodel',data)
|
||||
//切换小车
|
||||
function changeShuttlebus(data) {
|
||||
unity.SendMessage('GameObject', 'Shuttlebus', data)
|
||||
}
|
||||
function open(){
|
||||
unity.SendMessage('提升机','Unfold')
|
||||
//提升机1
|
||||
function changeHoister(data) {
|
||||
unity.SendMessage('GameObject', 'Hoister', data)
|
||||
}
|
||||
function close(){
|
||||
unity.SendMessage('提升机','Restore')
|
||||
//提升机2
|
||||
function changeHoister2(data) {
|
||||
unity.SendMessage('GameObject', 'Hoister2', data)
|
||||
}
|
||||
function opencar(){
|
||||
unity.SendMessage('AGV','Unfold')
|
||||
//快换电池
|
||||
function changeBattery(data) {
|
||||
unity.SendMessage('GameObject', 'Battery', data)
|
||||
}
|
||||
function closecar(){
|
||||
unity.SendMessage('AGV','Restore')
|
||||
// function open() {
|
||||
// unity.SendMessage('GameObject', 'Unfold')
|
||||
// }
|
||||
// function close() {
|
||||
// unity.SendMessage('提升机', 'Restore')
|
||||
// }
|
||||
//大模型爆炸
|
||||
function opencar() {
|
||||
unity.SendMessage('GameObject', 'Explode')
|
||||
}
|
||||
//大模型还原
|
||||
function closecar() {
|
||||
unity.SendMessage('GameObject', 'ResetPositions')
|
||||
}
|
||||
//小模型爆炸
|
||||
function openSmall() {
|
||||
unity.SendMessage('GameObject', 'Blowup')
|
||||
}
|
||||
//小模型还原
|
||||
function closeSmall() {
|
||||
unity.SendMessage('GameObject', 'Restore')
|
||||
}
|
||||
//接收状态
|
||||
function modelStatus(val) {
|
||||
window.parent.modelStatus(val)
|
||||
}
|
||||
document.body.appendChild(script);
|
||||
|
||||
|
|
|
@ -1,9 +0,0 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<configuration>
|
||||
<system.webServer>
|
||||
<staticContent>
|
||||
<mimeMap fileExtension=".unity3d" mimeType="application/octet-stream" />
|
||||
<mimeMap fileExtension=".unityweb" mimeType="application/octet-stream" />
|
||||
</staticContent>
|
||||
</system.webServer>
|
||||
</configuration>
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
@ -1 +1 @@
|
|||
172.16.1.106:5005
|
||||
172.16.1.117:5005
|
|
@ -1,6 +1,5 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en-us">
|
||||
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
||||
|
@ -16,9 +15,8 @@
|
|||
overflow: hidden;
|
||||
}
|
||||
</style>
|
||||
|
||||
<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>
|
||||
<div id="unity-loading-bar">
|
||||
<div id="unity-logo"></div>
|
||||
|
@ -32,15 +30,15 @@
|
|||
<div id="unity-fullscreen-button"></div>
|
||||
<div id="unity-build-title">U3D_TobaccoWarehouseISMDTSystem</div>
|
||||
</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>
|
||||
<button onclick="OpenHtmlMQTT()">Connect</button>
|
||||
<button onclick="publishMessage()">Publish</button>
|
||||
<button onclick="disconnectMQTT()">Disconnect</button>
|
||||
<script src="./js/mqtt.min.js"></script>
|
||||
|
||||
|
||||
<script>
|
||||
<script>
|
||||
|
||||
var container = document.querySelector("#unity-container");
|
||||
var canvas = document.querySelector("#unity-canvas");
|
||||
|
@ -128,15 +126,15 @@
|
|||
|
||||
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: 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}`),//小车
|
||||
Array.from({length: 8}, (_, i) => `car${i + 1}`),//小车
|
||||
"fe1",//落地时提升机
|
||||
Array.from({ length: 2 }, (_, i) => `qcbd${i + 1}`)//快换电池装置
|
||||
Array.from({length: 2}, (_, i) => `qcbd${i + 1}`)//快换电池装置
|
||||
];
|
||||
|
||||
devices.forEach(device => {
|
||||
|
@ -163,7 +161,7 @@
|
|||
|
||||
client.on('message', (topic, message) => {
|
||||
|
||||
const mes = JSON.stringify({ device: topic, message: message.toString() });
|
||||
const mes = JSON.stringify({device: topic, message: message.toString()});
|
||||
|
||||
// console.log(mes);
|
||||
|
||||
|
@ -214,20 +212,22 @@
|
|||
});
|
||||
};
|
||||
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')
|
||||
|
||||
}
|
||||
}
|
||||
function hideBox() {
|
||||
unityInstance.SendMessage('Canvas', 'HiddenBox', '')
|
||||
}
|
||||
document.body.appendChild(script);
|
||||
|
||||
</script>
|
||||
</script>
|
||||
</body>
|
||||
|
||||
</html>
|
|
@ -221,11 +221,14 @@
|
|||
if (val) {
|
||||
unityInstance.SendMessage('Canvas', 'Partialhiding', val)
|
||||
} else {
|
||||
console.log(val,'xxxxxxxxxxx');
|
||||
console.log(val, 'xxxxxxxxxxx');
|
||||
unityInstance.SendMessage('Canvas', 'Boxshow')
|
||||
|
||||
}
|
||||
}
|
||||
function hideBox() {
|
||||
unityInstance.SendMessage('Canvas', 'HiddenBox', '')
|
||||
}
|
||||
document.body.appendChild(script);
|
||||
|
||||
</script>
|
||||
|
|
Binary file not shown.
After Width: | Height: | Size: 3.9 KiB |
|
@ -11,6 +11,7 @@ import getPath from "@/utils/getPath";
|
|||
import { fontSize } from "@/utils/common";
|
||||
const props = defineProps({
|
||||
dataMap: Object,
|
||||
type:String,
|
||||
});
|
||||
const chartData = ref({});
|
||||
watch(
|
||||
|
@ -22,7 +23,7 @@ watch(
|
|||
},
|
||||
{ deep: true }
|
||||
);
|
||||
|
||||
console.log(props.dataMap,'props.dataMap');
|
||||
function initChart() {
|
||||
let myChart = echarts.init(
|
||||
document.getElementById("classProportion" + props.dataMap.id)
|
||||
|
@ -80,14 +81,13 @@ function initChart() {
|
|||
// },
|
||||
{
|
||||
type: "text",
|
||||
name:'name',
|
||||
z: 100,
|
||||
left: "center",
|
||||
top: "72%",
|
||||
style: {
|
||||
fill: "#fff",
|
||||
textAlign: 'left',
|
||||
text: `${props.dataMap.name.length>7 ? props.dataMap.name.slice(0,7) + '...' : props.dataMap.name}`,
|
||||
text: `${props.dataMap.name.length>14 ? props.dataMap.name.slice(0,14) + '...' : props.dataMap.name}`,
|
||||
fontSize: `0.8rem`,
|
||||
width: 20,
|
||||
whiteSpace: 'nowrap',
|
||||
|
@ -111,11 +111,12 @@ function initChart() {
|
|||
{
|
||||
type: "text",
|
||||
z: 100,
|
||||
name:props.dataMap.weight,
|
||||
left: "center",
|
||||
top: "85%",
|
||||
style: {
|
||||
fill: "rgba(255, 206, 84, 1)",
|
||||
text: `${props.dataMap.weight ? props.dataMap.weight : ""}`,
|
||||
text: `${props.dataMap.weight.length>16 ? props.dataMap.weight.slice(0,16) + '...' : props.dataMap.weight}`,
|
||||
fontSize: `1.1rem`,
|
||||
},
|
||||
},
|
||||
|
@ -168,7 +169,7 @@ function initChart() {
|
|||
polar: [
|
||||
{
|
||||
center: ["50%", "35%"], //中心点位置
|
||||
radius: ["74%", "67%"], //图形大小
|
||||
radius: props.type?["54%", "50%"]:["50%", "46%"], //图形大小
|
||||
},
|
||||
],
|
||||
|
||||
|
@ -176,7 +177,7 @@ function initChart() {
|
|||
{
|
||||
type: "pie",
|
||||
name: "内层细圆环",
|
||||
radius: ["95%", "85%"],
|
||||
radius: props.type?["67%", "60%"]:["67%", "60%"],
|
||||
center: ["50%", "35%"],
|
||||
startAngle: 90,
|
||||
hoverAnimation: false,
|
||||
|
@ -219,7 +220,7 @@ function initChart() {
|
|||
{
|
||||
type: "pie",
|
||||
name: "内层细圆环",
|
||||
radius: ["72%", "67%"],
|
||||
radius: props.type?["54%", "50%"]:["50%", "46%"],
|
||||
center: ["50%", "35%"],
|
||||
startAngle: 90,
|
||||
hoverAnimation: false,
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
{{ props.title === "维修统计" ? "维修统计" : props.title }}
|
||||
</div>
|
||||
|
||||
<div class="el-select2">
|
||||
<div class="el-select2" v-if="!props.hideSelect">
|
||||
<el-select
|
||||
v-model="params.facName"
|
||||
placeholder="请选择"
|
||||
|
@ -84,7 +84,7 @@
|
|||
</el-table>
|
||||
</div>
|
||||
<!-- 故障分析 -->
|
||||
<div class="box-content-table" v-else-if="props.title === '故障分析'">
|
||||
<div class="box-content-table" v-else-if="props.title === '故障分析'||props.title === '维修统计'">
|
||||
<el-table :data="tableList" style="width: 100%">
|
||||
<el-table-column prop="errorDateTime" label="报错时间" align="center" />
|
||||
<el-table-column prop="facCode" label="设备编码" align="center" />
|
||||
|
@ -96,7 +96,7 @@
|
|||
</el-table>
|
||||
</div>
|
||||
<!-- 维修统计 -->
|
||||
<div class="box-content-table" v-else-if="props.title === '维修统计'">
|
||||
<!-- <div class="box-content-table" v-else-if="props.title === '维修统计'">
|
||||
<el-table :data="tableList" style="width: 100%">
|
||||
<el-table-column prop="errorDateTime" label="故障时间" align="center" />
|
||||
<el-table-column prop="facCode" label="设备编码" align="center" />
|
||||
|
@ -111,7 +111,7 @@
|
|||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</div>
|
||||
</div> -->
|
||||
|
||||
<div style="float: right">
|
||||
<el-pagination
|
||||
|
@ -144,6 +144,7 @@ import {
|
|||
const emit = defineEmits(["close"]);
|
||||
const props = defineProps({
|
||||
title: String,
|
||||
hideSelect:Boolean
|
||||
});
|
||||
|
||||
const tableList = ref([
|
||||
|
|
|
@ -61,7 +61,9 @@
|
|||
<div class="box-content-box4">
|
||||
<div class="title">
|
||||
<span>维修统计</span>
|
||||
<!-- <span class="more" @click="openDialog"></span> -->
|
||||
<span class="more" @click="openDialog"></span>
|
||||
<!-- <span class="more" @click="openDialog($event, 1)"></span> -->
|
||||
|
||||
</div>
|
||||
<div class="maintenance">
|
||||
<div class="maintenance-left">
|
||||
|
@ -97,6 +99,7 @@
|
|||
@close="receiveMsg"
|
||||
v-if="maintenanceDialogShow"
|
||||
:title="dialogTitle"
|
||||
:hideSelect="hideSelect"
|
||||
/>
|
||||
</template>
|
||||
<script setup>
|
||||
|
@ -115,6 +118,8 @@ function close() {
|
|||
emit("closeHealth", -1);
|
||||
}
|
||||
const maintenanceDialogShow = ref(false);
|
||||
// 设备下拉是否显示
|
||||
const hideSelect = ref(false)
|
||||
const dialogTitle = ref("");
|
||||
// 关闭弹窗
|
||||
function receiveMsg(val) {
|
||||
|
@ -128,16 +133,27 @@ function openDialog(event, val) {
|
|||
} else {
|
||||
dialogTitle.value = event.target.previousElementSibling.innerText;
|
||||
maintenanceDialogShow.value = true;
|
||||
hideSelect.value = true
|
||||
}
|
||||
// console.log(event.target.previousElementSibling.innerText);
|
||||
}
|
||||
// 设备健康指数ecahrts
|
||||
function drawHealthIndex(list) {
|
||||
const color = [
|
||||
"rgba(25, 174, 250, 0.7)",
|
||||
"rgba(28, 238, 251, 0.7)",
|
||||
"rgba(255, 206, 84, 0.7)",
|
||||
"rgba(174, 211, 255, 0.7)",
|
||||
// const color = [
|
||||
// "rgba(25, 174, 250, 0.7)",
|
||||
// "rgba(28, 238, 251, 0.7)",
|
||||
// "rgba(255, 206, 84, 0.7)",
|
||||
// "rgba(174, 211, 255, 0.7)",
|
||||
// ];
|
||||
var color = [
|
||||
"rgba(23, 151, 217, 1)",
|
||||
// "rgba(28, 238, 251, 1)",
|
||||
"rgba(255, 215, 0,1)",
|
||||
// "rgba(0, 245, 194, 1)",
|
||||
"rgba(255, 255, 224,1)",
|
||||
// "rgba(0, 245, 194, 1)",
|
||||
"rgba(28, 238, 251, 1)",
|
||||
"rgba(255, 192, 203,1)",
|
||||
];
|
||||
let result = []
|
||||
let total = list.totalCount;
|
||||
|
@ -287,28 +303,35 @@ function drawHealthIndex(list) {
|
|||
itemStyle: dataStyle,
|
||||
hoverAnimation: false,
|
||||
startAngle: 90,
|
||||
data:result.map((el) => {
|
||||
if (el.name === "往复式提升机") {
|
||||
data:result.map((el,index) => {
|
||||
return {
|
||||
value: el.value,
|
||||
name: el.name,
|
||||
itemStyle: {
|
||||
normal: {
|
||||
color: "rgba(28, 238, 251, 0.62)",
|
||||
},
|
||||
},
|
||||
};
|
||||
} else {
|
||||
return {
|
||||
value: el.value,
|
||||
value:el.value,
|
||||
name:el.name,
|
||||
itemStyle: {
|
||||
normal: {
|
||||
color: "rgba(4, 132, 189, 0.62)",
|
||||
},
|
||||
},
|
||||
};
|
||||
itemStyle:{
|
||||
color:color[index]
|
||||
}
|
||||
}
|
||||
// if (el.name === "往复式提升机") {
|
||||
// return {
|
||||
// value: el.value,
|
||||
// name: el.name,
|
||||
// itemStyle: {
|
||||
// normal: {
|
||||
// color: "rgba(28, 238, 251, 0.62)",
|
||||
// },
|
||||
// },
|
||||
// };
|
||||
// } else {
|
||||
// return {
|
||||
// value: el.value,
|
||||
// name:el.name,
|
||||
// itemStyle: {
|
||||
// normal: {
|
||||
// color: "rgba(4, 132, 189, 0.62)",
|
||||
// },
|
||||
// },
|
||||
// };
|
||||
// }
|
||||
}),
|
||||
},
|
||||
],
|
||||
|
@ -320,11 +343,12 @@ function drawHealthIndex(list) {
|
|||
}
|
||||
// 备件更换统计echarts
|
||||
function drawSpareParts(list) {
|
||||
const color = [
|
||||
"rgba(25, 174, 250, 0.7)",
|
||||
"rgba(28, 238, 251, 0.7)",
|
||||
"rgba(255, 206, 84, 0.7)",
|
||||
"rgba(174, 211, 255, 0.7)",
|
||||
var color = [
|
||||
"rgba(255, 192, 203,1)",
|
||||
"rgba(28, 238, 251, 1)",
|
||||
"rgba(255, 255, 224,1)",
|
||||
"rgba(255, 215, 0,1)",
|
||||
"rgba(23, 151, 217, 1)",
|
||||
];
|
||||
let result = []
|
||||
let total = list.totalCount;
|
||||
|
|
|
@ -128,11 +128,21 @@ const tableList = ref([
|
|||
]);
|
||||
// 已完成维保统计
|
||||
function drawLeftChart(list) {
|
||||
const color = [
|
||||
"rgba(25, 174, 250, 0.7)",
|
||||
"rgba(28, 238, 251, 0.7)",
|
||||
"rgba(255, 206, 84, 0.7)",
|
||||
"rgba(174, 211, 255, 0.7)",
|
||||
// const color = [
|
||||
// "rgba(25, 174, 250, 0.7)",
|
||||
// "rgba(28, 238, 251, 0.7)",
|
||||
// "rgba(255, 206, 84, 0.7)",
|
||||
// "rgba(174, 211, 255, 0.7)",
|
||||
// ];
|
||||
var color = [
|
||||
"rgba(23, 151, 217, 1)",
|
||||
// "rgba(28, 238, 251, 1)",
|
||||
"rgba(255, 215, 0,1)",
|
||||
// "rgba(0, 245, 194, 1)",
|
||||
"rgba(255, 255, 224,1)",
|
||||
// "rgba(0, 245, 194, 1)",
|
||||
"rgba(28, 238, 251, 1)",
|
||||
"rgba(255, 192, 203,1)",
|
||||
];
|
||||
let result = [];
|
||||
let total = list.totalCount;
|
||||
|
@ -298,11 +308,18 @@ function drawLeftChart(list) {
|
|||
}
|
||||
// 保养计划
|
||||
function drawRightChart(list) {
|
||||
const color = [
|
||||
"rgba(25, 174, 250, 0.7)",
|
||||
"rgba(28, 238, 251, 0.7)",
|
||||
"rgba(255, 206, 84, 0.7)",
|
||||
"rgba(174, 211, 255, 0.7)",
|
||||
// const color = [
|
||||
// "rgba(25, 174, 250, 0.7)",
|
||||
// "rgba(28, 238, 251, 0.7)",
|
||||
// "rgba(255, 206, 84, 0.7)",
|
||||
// "rgba(174, 211, 255, 0.7)",
|
||||
// ];
|
||||
var color = [
|
||||
"rgba(255, 192, 203,1)",
|
||||
"rgba(28, 238, 251, 1)",
|
||||
"rgba(255, 255, 224,1)",
|
||||
"rgba(255, 215, 0,1)",
|
||||
"rgba(23, 151, 217, 1)",
|
||||
];
|
||||
let result = [];
|
||||
let total = list.totalCount;
|
||||
|
|
|
@ -10,7 +10,6 @@
|
|||
<div class="box-content-left-title">
|
||||
<span>文件列表</span>
|
||||
<!-- 选择框 -->
|
||||
|
||||
<el-select
|
||||
@clear="clearHandle"
|
||||
@change="GetPageGuideDocsData(params1.code)"
|
||||
|
@ -93,7 +92,13 @@ const params1 = {
|
|||
pageIndex: 1,
|
||||
pageSize: 10,
|
||||
};
|
||||
|
||||
function addPdf(fileName){
|
||||
if (fileName.endsWith('.pdf')) {
|
||||
return fileName
|
||||
}else{
|
||||
return fileName + '.pdf'
|
||||
}
|
||||
}
|
||||
//下载
|
||||
async function download(item) {
|
||||
const response = await downloadPdf(
|
||||
|
@ -102,7 +107,7 @@ async function download(item) {
|
|||
const url = window.URL.createObjectURL(new Blob([response]));
|
||||
const link = document.createElement("a");
|
||||
link.href = url;
|
||||
link.setAttribute("download", item.fileName);
|
||||
link.setAttribute("download", addPdf(item.fileName));
|
||||
document.body.appendChild(link);
|
||||
link.click();
|
||||
}
|
||||
|
|
|
@ -11,7 +11,7 @@
|
|||
<div class="swiper">
|
||||
<transition
|
||||
:name="btnName"
|
||||
v-for="(item, index) in Math.ceil(chartList.length / 8)"
|
||||
v-for="(item, index) in Math.ceil(chartList.length / 6)"
|
||||
:key="item.id"
|
||||
>
|
||||
<div
|
||||
|
@ -20,11 +20,11 @@
|
|||
>
|
||||
<div
|
||||
class="box-content-chart-item"
|
||||
v-for="item in chartList.slice(index * 8, 8 * (index + 1))"
|
||||
v-for="item in chartList.slice(index * 6, 6 * (index + 1))"
|
||||
:key="item.id"
|
||||
>
|
||||
<div class="chart">
|
||||
<pieChart :dataMap="item" />
|
||||
<pieChart :dataMap="item" type="2" />
|
||||
</div>
|
||||
<div class="line"></div>
|
||||
</div>
|
||||
|
@ -36,12 +36,15 @@
|
|||
</div>
|
||||
<div class="box-content-inBound">
|
||||
<div class="box-content-inBound-title">
|
||||
<span> {{props.title==='入库信息'?'入库信息统计':'出库信息统计'}} </span>
|
||||
<span>
|
||||
{{ props.title === "入库信息" ? "入库信息统计" : "出库信息统计" }}
|
||||
</span>
|
||||
<div>
|
||||
<ul v-if="storeList">
|
||||
<li><span>单位:</span><span>公斤</span></li>
|
||||
<li>
|
||||
<span>总量:</span><span>{{ formatNumber(storeList.totalWeight) }}</span>
|
||||
<span>总量:</span
|
||||
><span>{{ formatNumber(storeList.totalWeight) }}</span>
|
||||
</li>
|
||||
<li>
|
||||
<span>品牌总量:</span><span>{{ storeList.brandNum }}</span>
|
||||
|
@ -223,7 +226,7 @@ function getChartList() {
|
|||
kg: ele.number + "箱",
|
||||
name: ele.name,
|
||||
value: (ele.percentage * 100).toFixed(2),
|
||||
weight: ele.weight + '公斤',
|
||||
weight: ele.weight + "公斤",
|
||||
msg: true,
|
||||
};
|
||||
});
|
||||
|
@ -236,7 +239,8 @@ function getChartList() {
|
|||
kg: ele.number + "箱",
|
||||
name: ele.name,
|
||||
value: (ele.percentage * 100).toFixed(2),
|
||||
weight: ele.weight + '公斤',
|
||||
// weight: ele.weight +'0000000000' + '公斤',
|
||||
weight: ele.weight + "公斤",
|
||||
msg: true,
|
||||
};
|
||||
});
|
||||
|
@ -278,14 +282,14 @@ function getAllBrandName(boolean) {
|
|||
params.brandName = brandList.value[0];
|
||||
getBrandChart();
|
||||
//获取比例图标
|
||||
getChartList()
|
||||
getChartList();
|
||||
});
|
||||
} else {
|
||||
getOutBrandNames(params).then((res) => {
|
||||
brandList.value = res.result;
|
||||
params.brandName = brandList.value[0];
|
||||
getBrandChart();
|
||||
getChartList()
|
||||
getChartList();
|
||||
});
|
||||
}
|
||||
}
|
||||
|
@ -307,8 +311,8 @@ function getBrandChart(boolean) {
|
|||
if (props.title === "入库信息") {
|
||||
getBrandTimeCount(params).then((res) => {
|
||||
drawBarChart(res.result);
|
||||
getChartList()
|
||||
getStoreDetail()
|
||||
getChartList();
|
||||
getStoreDetail();
|
||||
getBrandNames(params).then((res) => {
|
||||
brandList.value = res.result;
|
||||
params.brandName = brandList.value[0];
|
||||
|
@ -317,8 +321,8 @@ function getBrandChart(boolean) {
|
|||
} else {
|
||||
getOutBrandTimeCount(params).then((res) => {
|
||||
drawBarChart(res.result);
|
||||
getChartList()
|
||||
getStoreDetail()
|
||||
getChartList();
|
||||
getStoreDetail();
|
||||
getOutBrandNames(params).then((res) => {
|
||||
brandList.value = res.result;
|
||||
params.brandName = brandList.value[0];
|
||||
|
@ -376,11 +380,27 @@ function drawBarChart(res) {
|
|||
show: true,
|
||||
formatter: function (data) {
|
||||
// 如果数值大于1000,则以千位分隔
|
||||
console.log(data,'xxxxxxxxxx');
|
||||
if(params.month){
|
||||
return params.year +'-'+ params.month +'-'+ data.name+ ' : ' + `<span style='color:rgba(28, 238, 251, 1)'>${data.value}</span>` + '公斤'
|
||||
}else{
|
||||
return params.year +'-'+ data.name+ ' : ' + `<span style='color:rgba(28, 238, 251, 1)'>${data.value}</span>` + '公斤'
|
||||
console.log(data, "xxxxxxxxxx");
|
||||
if (params.month) {
|
||||
return (
|
||||
params.year +
|
||||
"-" +
|
||||
params.month +
|
||||
"-" +
|
||||
data.name +
|
||||
" : " +
|
||||
`<span style='color:rgba(28, 238, 251, 1)'>${data.value}</span>` +
|
||||
"公斤"
|
||||
);
|
||||
} else {
|
||||
return (
|
||||
params.year +
|
||||
"-" +
|
||||
data.name +
|
||||
" : " +
|
||||
`<span style='color:rgba(28, 238, 251, 1)'>${data.value}</span>` +
|
||||
"公斤"
|
||||
);
|
||||
}
|
||||
},
|
||||
},
|
||||
|
@ -580,11 +600,12 @@ onMounted(() => {
|
|||
// margin-left: vw(35);
|
||||
// }
|
||||
&-item {
|
||||
margin-right: vw(40);
|
||||
// width: 16.5%;
|
||||
// margin-right: vw(40);
|
||||
// width: vw(100);
|
||||
// height: vh(170);
|
||||
.chart {
|
||||
width: vw(110);
|
||||
width: vw(192);
|
||||
height: vh(190);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -3,7 +3,7 @@ import axios from 'axios';
|
|||
// 创建axios实例
|
||||
const service = axios.create({
|
||||
baseURL: import.meta.env.VITE_APP_BASE_API, // api的base_url
|
||||
timeout: 5000 // 请求超时时间
|
||||
timeout: 60000 // 请求超时时间
|
||||
});
|
||||
// 请求拦截器
|
||||
service.interceptors.request.use(
|
||||
|
|
|
@ -21,7 +21,10 @@
|
|||
<div v-if="listIndex == index" style="display: flex; width: 100%">
|
||||
<div
|
||||
class="box-content-chart-item"
|
||||
v-for="(item, index) in list.slice(index * 5, 5 * (index + 1))"
|
||||
v-for="(item, index) in list.slice(
|
||||
index * 5,
|
||||
5 * (index + 1)
|
||||
)"
|
||||
:key="item.id"
|
||||
>
|
||||
<div class="chart">
|
||||
|
@ -36,13 +39,27 @@
|
|||
</div>
|
||||
<div class="box-content-search">
|
||||
<div>
|
||||
<el-input
|
||||
<!-- <el-input
|
||||
v-model="tableParams.name"
|
||||
@change="getTableList"
|
||||
class="w-50 m-2"
|
||||
placeholder="请输入搜索内容"
|
||||
:prefix-icon="Search"
|
||||
/> -->
|
||||
<el-select
|
||||
@clear="clearHandle"
|
||||
@change="tableParams.index=1;getTableList()"
|
||||
clearable
|
||||
v-model="tableParams.name"
|
||||
placeholder="请选择品牌名"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in list"
|
||||
:key="item.name"
|
||||
:label="item.name"
|
||||
:value="item.name"
|
||||
/>
|
||||
</el-select>
|
||||
<!-- <el-select
|
||||
style="margin-left:1rem"
|
||||
v-model="tableParams.orderByLoc"
|
||||
|
@ -81,21 +98,39 @@
|
|||
</div>
|
||||
</div>
|
||||
<div class="box-content-table">
|
||||
<el-table :data="tableList" @sort-change="sortHandle" style="width: 100%">
|
||||
<el-table-column type="index" label="序号" :index="indexMethod" width="80" />
|
||||
<el-table-column prop="palletNum" label="托盘号" />
|
||||
<el-table-column prop="storeLoc" sortable="custom" label="当前存放位置" />
|
||||
<el-table
|
||||
:data="tableList"
|
||||
@sort-change="sortHandle"
|
||||
style="width: 100%"
|
||||
>
|
||||
<el-table-column
|
||||
type="index"
|
||||
label="序号"
|
||||
:index="indexMethod"
|
||||
width="80"
|
||||
/>
|
||||
<el-table-column prop="palletNum" label="托盘号" width="100"/>
|
||||
<el-table-column
|
||||
prop="storeLoc"
|
||||
sortable="custom"
|
||||
label="当前存放位置"
|
||||
/>
|
||||
<el-table-column
|
||||
prop="itemDesc"
|
||||
:show-overflow-tooltip="true"
|
||||
label="物料描述"
|
||||
width="160"
|
||||
/>
|
||||
<el-table-column prop="batchNum" :show-overflow-tooltip="true" label="批次" />
|
||||
<el-table-column prop="status" label="状态" />
|
||||
<el-table-column
|
||||
prop="batchNum"
|
||||
:show-overflow-tooltip="true"
|
||||
label="批次"
|
||||
/>
|
||||
<el-table-column prop="status" label="状态" width="100" />
|
||||
<el-table-column prop="inputTime" label="入库时间" />
|
||||
<!-- <el-table-column prop="number" label="编号" /> -->
|
||||
<el-table-column prop="upWeight" label="上箱重量" />
|
||||
<el-table-column prop="downWeight" label="下箱重量" />
|
||||
<el-table-column prop="upWeight" label="上箱重量" width="100" />
|
||||
<el-table-column prop="downWeight" label="下箱重量" width="100"/>
|
||||
</el-table>
|
||||
<div style="float: right">
|
||||
<el-pagination
|
||||
|
@ -245,7 +280,6 @@ const tableParams = reactive({
|
|||
function getTableList() {
|
||||
getBrandTable(tableParams).then((res) => {
|
||||
tableList.value = res.result.data;
|
||||
|
||||
tableTotal.value = res.result.totalNum;
|
||||
});
|
||||
}
|
||||
|
@ -267,13 +301,12 @@ function getChartData() {
|
|||
list.value = res.result.map((el, index) => {
|
||||
return {
|
||||
name: el.name,
|
||||
kg: el.stockNum + '箱',
|
||||
kg: el.stockNum + "箱",
|
||||
value: el.weightPercent,
|
||||
id: index,
|
||||
weight: el.weight + '公斤',
|
||||
weight: el.weight + "公斤",
|
||||
};
|
||||
});
|
||||
|
||||
console.log(list.value, "数据");
|
||||
});
|
||||
}
|
||||
|
@ -283,7 +316,7 @@ onMounted(() => {
|
|||
// 获取货位 批次数据
|
||||
getBrandBox().then((res) => {
|
||||
for (let key in res.result) {
|
||||
console.log(res.result, key,'huowei');
|
||||
console.log(res.result, key, "huowei");
|
||||
if (key === "inventoryNum") {
|
||||
areaNum.storeNum = res.result[key];
|
||||
} else if (key === "fullBoxNum") {
|
||||
|
@ -377,23 +410,23 @@ function sortHandle(event) {
|
|||
position: relative;
|
||||
height: vh(190);
|
||||
&-item:nth-child(1) {
|
||||
margin-left: vw(25);
|
||||
// margin-left: vw(25);
|
||||
}
|
||||
&-item {
|
||||
// width: vw(120);
|
||||
display: flex;
|
||||
height: vh(190);
|
||||
.chart {
|
||||
width: vw(110);
|
||||
width: vw(180);
|
||||
height: vh(190);
|
||||
position: relative;
|
||||
}
|
||||
.line {
|
||||
width: vw(89);
|
||||
width: vw(70);
|
||||
height: vh(12);
|
||||
margin: 0 vw(28);
|
||||
// margin: 0 vw(28);
|
||||
position: relative;
|
||||
top: 40%;
|
||||
top: 35%;
|
||||
background-image: url("@/assets/images/dialog/line.png");
|
||||
background-size: 100% 100%;
|
||||
}
|
||||
|
|
|
@ -227,9 +227,9 @@ onMounted(() => {
|
|||
// 维修
|
||||
// console.log(props);
|
||||
list1.value = props.mqttData
|
||||
// getCarErrorIn12().then(res=>{
|
||||
// list1.value = res.result
|
||||
// })
|
||||
getCarErrorIn12().then(res=>{
|
||||
list1.value = res.result
|
||||
})
|
||||
// window.PubScribe(null, realInfo);
|
||||
// 超时
|
||||
getOverTransmission().then((res) => {
|
||||
|
|
|
@ -85,12 +85,15 @@
|
|||
<el-input
|
||||
v-model="searchData"
|
||||
class="w-50 m-2"
|
||||
placeholder="请输入搜索内容"
|
||||
placeholder="请输入箱号"
|
||||
:suffix-icon="Search"
|
||||
@change="searchCar"
|
||||
/>
|
||||
</div>
|
||||
<div class="home-btn-reset" @click="resetUnity">刷新</div>
|
||||
<div class="home-reset">
|
||||
<div class="home-reset-data" @click="resetData">刷新数据</div>
|
||||
<div class="home-reset-model" @click="resetModel">刷新场景</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="home-right">
|
||||
<!-- 失活二层箱子,激活一层箱子 重新加载三维场景 -->
|
||||
|
@ -102,10 +105,11 @@
|
|||
>
|
||||
{{ unityBtn }}
|
||||
</div>
|
||||
<!-- <div class="home-btn-unity" @click="hideenBox">隐藏箱子</div> -->
|
||||
</div>
|
||||
<!-- 库存消息 -->
|
||||
<div class="home-title">
|
||||
<span class="home-title-font"> 库存消息 </span>
|
||||
<span class="home-title-font"> 库存信息 </span>
|
||||
<span class="home-title-more" @click="openInventoryNews"> </span>
|
||||
</div>
|
||||
<div class="home-right-inventoryNews" id="inventoryNews"></div>
|
||||
|
@ -250,21 +254,34 @@ import {
|
|||
getLocInfo,
|
||||
} from "@/api/home";
|
||||
import { fontSize } from "@/utils/common";
|
||||
const unityBoxShow = ref(false);
|
||||
const unityBoxShow = ref(true);
|
||||
// 重新加载三维场景
|
||||
function resetUnity() {
|
||||
unityBoxShow.value = false;
|
||||
function resetModel() {
|
||||
document.querySelector("#iframeRef").src = "model/index.html";
|
||||
}
|
||||
function resetData() {
|
||||
unityBoxShow.value = false;
|
||||
getDeviceStatus(); //获取设备状态
|
||||
getBrandData(); //获取各品牌库存情况
|
||||
getInventory(); //库存消息
|
||||
getOutboundWorkOrder(); //出库工单
|
||||
getInboundWorkOrder(); //入库工单
|
||||
getMessageReminder();
|
||||
}
|
||||
function hideenBox() {
|
||||
document.querySelector("#iframeRef").contentWindow.hideBox();
|
||||
}
|
||||
const unityBtn = ref("隐藏二层箱子");
|
||||
const unityNum = ref(0);
|
||||
const isStoreClick = ref(false);
|
||||
// 与三维箱子进行交互
|
||||
function unityBoxHandle(val) {
|
||||
if (val) {
|
||||
inventoryNewsShow.value = false;
|
||||
unityBoxShow.value = true;
|
||||
unityNum.value = 0;
|
||||
unityBtn.value = "隐藏二层箱子";
|
||||
isStoreClick.value = true;
|
||||
document.querySelector("#iframeRef").contentWindow.unityBoxHandle(val);
|
||||
} else {
|
||||
unityNum.value++;
|
||||
if (unityNum.value % 2 != 0) {
|
||||
|
@ -272,10 +289,12 @@ function unityBoxHandle(val) {
|
|||
} else {
|
||||
unityBtn.value = "隐藏二层箱子";
|
||||
}
|
||||
if (isStoreClick.value) {
|
||||
document.querySelector("#iframeRef").contentWindow.unityBoxHandle();
|
||||
}else{
|
||||
document.querySelector("#iframeRef").contentWindow.hideBox(val);
|
||||
}
|
||||
}
|
||||
document
|
||||
.querySelector("#iframeRef")
|
||||
.contentWindow.unityBoxHandle(val);
|
||||
}
|
||||
const { proxy } = getCurrentInstance();
|
||||
// 设备状态列表
|
||||
|
@ -874,8 +893,12 @@ function getDeviceStatus() {
|
|||
});
|
||||
}
|
||||
const brandList = ref([]);
|
||||
const brandTimer = ref(null);
|
||||
// 各品牌库存情况接口方法
|
||||
function getBrandData() {
|
||||
if (brandTimer.value) {
|
||||
clearTimeout(brandTimer.value);
|
||||
}
|
||||
getInventoryInfo().then((res) => {
|
||||
// darwBrandChart(res.result);
|
||||
// for (let key in res.result[1]) {
|
||||
|
@ -885,18 +908,21 @@ function getBrandData() {
|
|||
// });
|
||||
// }
|
||||
brandList.value = res.result;
|
||||
brandTimer.value = setTimeout(() => {
|
||||
getBrandData();
|
||||
}, 30000);
|
||||
});
|
||||
}
|
||||
// 消息提醒
|
||||
async function getMessageReminder() {
|
||||
// await getCarErrorIn12().then((res) => {
|
||||
// res.result.slice(0, 1).forEach((el) => {
|
||||
// el.msg = "维修提醒";
|
||||
// el.reminderMsg = el.facName + el.facCode + " 需要维修";
|
||||
// el.date = el.errorDateTime;
|
||||
// messageReminder.value.push(el);
|
||||
// });
|
||||
// });
|
||||
await getCarErrorIn12().then((res) => {
|
||||
res.result.slice(0, 1).forEach((el) => {
|
||||
el.msg = "维修提醒";
|
||||
el.reminderMsg = el.facName + el.facCode + " 需要维修";
|
||||
el.date = el.errorDateTime;
|
||||
messageReminder.value.push(el);
|
||||
});
|
||||
});
|
||||
await getOverTransmission().then((res) => {
|
||||
res.result.forEach((el) => {
|
||||
el.msg = "超时提醒";
|
||||
|
@ -906,23 +932,42 @@ async function getMessageReminder() {
|
|||
});
|
||||
});
|
||||
}
|
||||
|
||||
const inventoryTimer = ref(null);
|
||||
// 获取库存消息接口方法
|
||||
function getInventory() {
|
||||
if (inventoryTimer.value) {
|
||||
clearTimeout(inventoryTimer.value);
|
||||
}
|
||||
getLocInfo().then((res) => {
|
||||
drawInventoryNewsEcahrt(res.result);
|
||||
inventoryTimer.value = setTimeout(() => {
|
||||
getInventory;
|
||||
}, 30000);
|
||||
});
|
||||
}
|
||||
// 出库工单接口
|
||||
const outTimer = ref(null);
|
||||
function getOutboundWorkOrder() {
|
||||
if (outTimer.value) {
|
||||
clearTimeout(outTimer.value);
|
||||
}
|
||||
getOutOrder().then((res) => {
|
||||
outboundWorkOrder.value = res.result;
|
||||
outboundWorkOrder.value.forEach((el) => {
|
||||
el.pic = getPath.outDevice;
|
||||
});
|
||||
outTimer.value = setTimeout(() => {
|
||||
getOutboundWorkOrder();
|
||||
}, 30000);
|
||||
});
|
||||
}
|
||||
// 入库工单接口
|
||||
const inTimer = ref(null);
|
||||
function getInboundWorkOrder() {
|
||||
if (inTimer.value) {
|
||||
clearTimeout(inTimer.value);
|
||||
}
|
||||
getInOrder().then((res) => {
|
||||
inboundWorkOrder.value = res.result;
|
||||
inboundWorkOrder.value.forEach((el) => {
|
||||
|
@ -930,6 +975,9 @@ function getInboundWorkOrder() {
|
|||
el.inWeight = formatNumber(el.inWeight);
|
||||
el.planWeight = formatNumber(el.planWeight);
|
||||
});
|
||||
inTimer.value = setTimeout(() => {
|
||||
getInboundWorkOrder();
|
||||
}, 30000);
|
||||
});
|
||||
}
|
||||
function formatNumber(num) {
|
||||
|
@ -963,25 +1011,35 @@ function realInfo(topic, message) {
|
|||
});
|
||||
messageReminder.value = list;
|
||||
mqttList.value = msg;
|
||||
getMessageReminder(); //消息提醒
|
||||
// getMessageReminder(); //消息提醒
|
||||
}
|
||||
}
|
||||
onMounted(() => {
|
||||
getDeviceStatus(); //获取设备状态
|
||||
|
||||
getBrandData(); //获取各品牌库存情况
|
||||
|
||||
getInventory(); //库存消息
|
||||
|
||||
getOutboundWorkOrder(); //出库工单
|
||||
getInboundWorkOrder(); //入库工单
|
||||
window.PubScribe(null, realInfo);
|
||||
getMessageReminder();
|
||||
// window.PubScribe(null, realInfo);
|
||||
// window.getMqttData = getMqtt;
|
||||
|
||||
|
||||
});
|
||||
</script>
|
||||
<style scoped lang="scss">
|
||||
// 底部刷新数据和刷新场景按钮
|
||||
.home-reset {
|
||||
display: flex;
|
||||
margin-top: vh(20);
|
||||
div {
|
||||
background-image: url("@/assets/images/home/unityBtn-D.png");
|
||||
background-size: 100% 100%;
|
||||
padding: vw(5) vh(8);
|
||||
cursor: pointer;
|
||||
}
|
||||
div:nth-child(2) {
|
||||
margin-left: vw(20);
|
||||
}
|
||||
}
|
||||
.kg {
|
||||
font-size: 0.875rem;
|
||||
margin-left: 0.2rem;
|
||||
|
@ -996,32 +1054,37 @@ onMounted(() => {
|
|||
}
|
||||
}
|
||||
.home-btn {
|
||||
position: absolute;
|
||||
left: -38%;
|
||||
top: 26%;
|
||||
&-unity{
|
||||
width: 6rem;
|
||||
position: fixed;
|
||||
right: vw(20);
|
||||
top: vh(10);
|
||||
|
||||
display: flex;
|
||||
&-unity {
|
||||
// width: 6rem;
|
||||
padding: vw(2) vw(8);
|
||||
line-height: vh(32);
|
||||
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;
|
||||
margin-left: vw(20);
|
||||
}
|
||||
}
|
||||
.home-btn-reset {
|
||||
width: 6rem;
|
||||
width: 3rem;
|
||||
height: 3rem;
|
||||
font-size: 1rem;
|
||||
padding: 0.5rem;
|
||||
margin-top: 1rem;
|
||||
background-image: url("@/assets/images/home/unityBtn-D.png");
|
||||
background-image: url("@/assets/images/home/refresh.png");
|
||||
background-size: 100% 100%;
|
||||
text-align: center;
|
||||
cursor: pointer;
|
||||
}
|
||||
position: absolute;
|
||||
left: 105%;
|
||||
bottom: 8.5%;
|
||||
}
|
||||
.home {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
|
|
|
@ -23,17 +23,17 @@ export default defineConfig({
|
|||
proxy: {
|
||||
// https://cn.vitejs.dev/config/#server-proxy
|
||||
'/dev-api': {
|
||||
target: 'http://172.16.1.106:5005/',
|
||||
target: 'http://172.16.1.117:5005/',
|
||||
changeOrigin: true,
|
||||
rewrite: (p) => p.replace(/^\/dev-api/, '')
|
||||
},
|
||||
'/api': {
|
||||
target: 'http://172.16.1.106:5005/api',
|
||||
target: 'http://172.16.1.117:5005/api',
|
||||
changeOrigin: true,
|
||||
rewrite: (p) => p.replace(/^\/api/, '')
|
||||
},
|
||||
'/preview': {
|
||||
target: 'http://172.16.1.106:5005/',
|
||||
target: 'http://172.16.1.117:5005/',
|
||||
changeOrigin: true,
|
||||
rewrite: (p) => p.replace(/^\/preview/, '')
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue