This commit is contained in:
朱菊兰 2024-08-29 15:12:39 +08:00
parent 2bc9908f62
commit b6fb156c2c
31 changed files with 71 additions and 2919 deletions

26
package-lock.json generated
View File

@ -5842,9 +5842,23 @@
} }
}, },
"node_modules/caniuse-lite": { "node_modules/caniuse-lite": {
"version": "1.0.30001481", "version": "1.0.30001653",
"resolved": "https://registry.npmmirror.com/caniuse-lite/-/caniuse-lite-1.0.30001481.tgz", "resolved": "https://registry.npmmirror.com/caniuse-lite/-/caniuse-lite-1.0.30001653.tgz",
"integrity": "sha512-KCqHwRnaa1InZBtqXzP98LPg0ajCVujMKjqKDhZEthIpAsJl/YEIa3YvXjGXPVqzZVguccuu7ga9KOE1J9rKPQ==" "integrity": "sha512-XGWQVB8wFQ2+9NZwZ10GxTYC5hk0Fa+q8cSkr0tgvMhYhMHP/QC+WTgrePMDBWiWc/pV+1ik82Al20XOK25Gcw==",
"funding": [
{
"type": "opencollective",
"url": "https://opencollective.com/browserslist"
},
{
"type": "tidelift",
"url": "https://tidelift.com/funding/github/npm/caniuse-lite"
},
{
"type": "github",
"url": "https://github.com/sponsors/ai"
}
]
}, },
"node_modules/case-sensitive-paths-webpack-plugin": { "node_modules/case-sensitive-paths-webpack-plugin": {
"version": "2.4.0", "version": "2.4.0",
@ -21128,9 +21142,9 @@
} }
}, },
"caniuse-lite": { "caniuse-lite": {
"version": "1.0.30001481", "version": "1.0.30001653",
"resolved": "https://registry.npmmirror.com/caniuse-lite/-/caniuse-lite-1.0.30001481.tgz", "resolved": "https://registry.npmmirror.com/caniuse-lite/-/caniuse-lite-1.0.30001653.tgz",
"integrity": "sha512-KCqHwRnaa1InZBtqXzP98LPg0ajCVujMKjqKDhZEthIpAsJl/YEIa3YvXjGXPVqzZVguccuu7ga9KOE1J9rKPQ==" "integrity": "sha512-XGWQVB8wFQ2+9NZwZ10GxTYC5hk0Fa+q8cSkr0tgvMhYhMHP/QC+WTgrePMDBWiWc/pV+1ik82Al20XOK25Gcw=="
}, },
"case-sensitive-paths-webpack-plugin": { "case-sensitive-paths-webpack-plugin": {
"version": "2.4.0", "version": "2.4.0",

Binary file not shown.

Binary file not shown.

View File

@ -1,177 +0,0 @@
{
"accessors": [
{
"bufferView": 0,
"componentType": 5126,
"count": 3575,
"type": "VEC2"
},
{
"bufferView": 1,
"componentType": 5126,
"count": 3575,
"type": "VEC3"
},
{
"bufferView": 2,
"componentType": 5126,
"count": 3575,
"type": "VEC4"
},
{
"bufferView": 3,
"componentType": 5126,
"count": 3575,
"type": "VEC3",
"max": [
0.009921154,
0.00977163,
0.0100762453
],
"min": [
-0.009921154,
-0.00977163,
-0.0100762453
]
},
{
"bufferView": 4,
"componentType": 5123,
"count": 18108,
"type": "SCALAR"
}
],
"asset": {
"generator": "glTF Tools for Unity",
"version": "2.0"
},
"bufferViews": [
{
"buffer": 0,
"byteLength": 28600
},
{
"buffer": 0,
"byteOffset": 28600,
"byteLength": 42900
},
{
"buffer": 0,
"byteOffset": 71500,
"byteLength": 57200
},
{
"buffer": 0,
"byteOffset": 128700,
"byteLength": 42900
},
{
"buffer": 0,
"byteOffset": 171600,
"byteLength": 36216
}
],
"buffers": [
{
"uri": "BoomBox.bin",
"byteLength": 207816
}
],
"images": [
{
"uri": "BoomBox_baseColor.png"
},
{
"uri": "BoomBox_occlusionRoughnessMetallic.png"
},
{
"uri": "BoomBox_normal.png"
},
{
"uri": "BoomBox_emissive.png"
}
],
"meshes": [
{
"primitives": [
{
"attributes": {
"TEXCOORD_0": 0,
"NORMAL": 1,
"TANGENT": 2,
"POSITION": 3
},
"indices": 4,
"material": 0
}
],
"name": "BoomBox"
}
],
"materials": [
{
"pbrMetallicRoughness": {
"baseColorTexture": {
"index": 0
},
"metallicRoughnessTexture": {
"index": 1
}
},
"normalTexture": {
"index": 2
},
"occlusionTexture": {
"index": 1
},
"emissiveFactor": [
1.0,
1.0,
1.0
],
"emissiveTexture": {
"index": 3
},
"name": "BoomBox_Mat"
}
],
"nodes": [
{
"mesh": 0,
"rotation": [
0.0,
1.0,
0.0,
0.0
],
"scale": [ 1, 1, 1 ],
"name": "BoomBox"
}
],
"scene": 0,
"scenes": [
{
"nodes": [
0
]
}
],
"textures": [
{
"name": "baseColor",
"source": 0
},
{
"name": "occlusionRoughnessMetallic",
"source": 1
},
{
"name": "normal",
"source": 2
},
{
"name": "emissive",
"source": 3
}
]
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.1 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 130 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.7 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.6 MiB

View File

@ -1,183 +0,0 @@
{
"accessors": [
{
"bufferView": 0,
"componentType": 5126,
"count": 3575,
"type": "VEC2"
},
{
"bufferView": 1,
"componentType": 5126,
"count": 3575,
"type": "VEC3"
},
{
"bufferView": 2,
"componentType": 5126,
"count": 3575,
"type": "VEC4"
},
{
"bufferView": 3,
"componentType": 5126,
"count": 3575,
"type": "VEC3",
"max": [
0.009921154,
0.00977163,
0.0100762453
],
"min": [
-0.009921154,
-0.00977163,
-0.0100762453
]
},
{
"bufferView": 4,
"componentType": 5123,
"count": 18108,
"type": "SCALAR"
}
],
"asset": {
"generator": "glTF Tools for Unity",
"version": "2.0"
},
"bufferViews": [
{
"buffer": 0,
"byteLength": 28600
},
{
"buffer": 0,
"byteOffset": 28600,
"byteLength": 42900
},
{
"buffer": 0,
"byteOffset": 71500,
"byteLength": 57200
},
{
"buffer": 0,
"byteOffset": 128700,
"byteLength": 42900
},
{
"buffer": 0,
"byteOffset": 171600,
"byteLength": 36216
}
],
"buffers": [
{
"uri": "BoomBox.bin",
"byteLength": 207816
}
],
"extensionsUsed": [
"KHR_materials_unlit"
],
"images": [
{
"uri": "BoomBox_baseColor.png"
},
{
"uri": "BoomBox_occlusionRoughnessMetallic.png"
},
{
"uri": "BoomBox_normal.png"
},
{
"uri": "BoomBox_emissive.png"
}
],
"meshes": [
{
"primitives": [
{
"attributes": {
"TEXCOORD_0": 0,
"NORMAL": 1,
"TANGENT": 2,
"POSITION": 3
},
"indices": 4,
"material": 0
}
],
"name": "BoomBox"
}
],
"materials": [
{
"pbrMetallicRoughness": {
"baseColorTexture": {
"index": 0
},
"metallicRoughnessTexture": {
"index": 1
}
},
"normalTexture": {
"index": 2
},
"occlusionTexture": {
"index": 1
},
"emissiveFactor": [
1.0,
1.0,
1.0
],
"emissiveTexture": {
"index": 3
},
"name": "BoomBox_Mat",
"extensions": {
"KHR_materials_unlit": {}
}
}
],
"nodes": [
{
"mesh": 0,
"rotation": [
0.0,
1.0,
0.0,
0.0
],
"scale": [ 1, 1, 1 ],
"name": "BoomBox"
}
],
"scene": 0,
"scenes": [
{
"nodes": [
0
]
}
],
"textures": [
{
"name": "baseColor",
"source": 0
},
{
"name": "occlusionRoughnessMetallic",
"source": 1
},
{
"name": "normal",
"source": 2
},
{
"name": "emissive",
"source": 3
}
]
}

File diff suppressed because one or more lines are too long

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.8 KiB

After

Width:  |  Height:  |  Size: 4.2 KiB

View File

@ -24,7 +24,7 @@
work correctly both with client-side routing and a non-root public URL. work correctly both with client-side routing and a non-root public URL.
Learn how to configure a non-root public URL by running `npm run build`. Learn how to configure a non-root public URL by running `npm run build`.
--> -->
<title>React App</title> <title>数智工厂生产监控驾驶舱</title>
</head> </head>
<body style="overflow: hidden"> <body style="overflow: hidden">
<noscript>You need to enable JavaScript to run this app.</noscript> <noscript>You need to enable JavaScript to run this app.</noscript>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 9.4 KiB

View File

@ -1,25 +0,0 @@
{
"short_name": "React App",
"name": "Create React App Sample",
"icons": [
{
"src": "favicon.ico",
"sizes": "64x64 32x32 24x24 16x16",
"type": "image/x-icon"
},
{
"src": "logo192.png",
"type": "image/png",
"sizes": "192x192"
},
{
"src": "logo512.png",
"type": "image/png",
"sizes": "512x512"
}
],
"start_url": ".",
"display": "standalone",
"theme_color": "#000000",
"background_color": "#ffffff"
}

Binary file not shown.

Binary file not shown.

View File

@ -1,3 +0,0 @@
# https://www.robotstxt.org/robotstxt.html
User-agent: *
Disallow:

Binary file not shown.

Binary file not shown.

File diff suppressed because one or more lines are too long

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.4 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 971 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.6 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.1 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 644 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 90 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 401 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 79 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 942 KiB

View File

@ -1,10 +1,10 @@
import React, {useEffect, useState, useContext} from 'react'; import React, { useEffect, useState, useContext } from "react";
import intl from 'react-intl-universal'; import intl from "react-intl-universal";
import locales from "./locales/locales"; import locales from "./locales/locales";
import './App.css'; import "./App.css";
import {useAppSelector} from "./store/hooks"; import { useAppSelector } from "./store/hooks";
import {selectChangeLangAndCss} from "./store/ChangeLangAndCss"; import { selectChangeLangAndCss } from "./store/ChangeLangAndCss";
import {createBrowserRouter, RouterProvider,} from "react-router-dom"; import { createBrowserRouter, RouterProvider } from "react-router-dom";
import ErrorPage from "./page/ErrorPage"; import ErrorPage from "./page/ErrorPage";
import MainP from "./page/MainP/MainP"; import MainP from "./page/MainP/MainP";
@ -12,12 +12,12 @@ import MainE from "./page/MainE/MainE";
import MainQ from "./page/MainQ/MainQ"; import MainQ from "./page/MainQ/MainQ";
import SwitchAll from "./page/AutoSwitch/SwitchAll"; import SwitchAll from "./page/AutoSwitch/SwitchAll";
import SwitchLine from "./page/AutoSwitch/SwitchLine"; import SwitchLine from "./page/AutoSwitch/SwitchLine";
import {MyObservable} from "./context/MyObservable"; import { MyObservable } from "./context/MyObservable";
import {Observable} from "@babylonjs/core"; import { Observable } from "@babylonjs/core";
import {selectGlassStatus} from "./store/ProductionMonitoringEntity"; import { selectGlassStatus } from "./store/ProductionMonitoringEntity";
import TestPage from "./page/TestPage"; import TestPage from "./page/TestPage";
import LDPage from "./page/LDPage" import LDPage from "./page/LDPage";
import LinePage from './page/LinePage'; import LinePage from "./page/LinePage";
// const LOCALES_LIST = [ // const LOCALES_LIST = [
// { // {
@ -33,17 +33,19 @@ import LinePage from './page/LinePage';
const onGlassObservable = new Observable(); const onGlassObservable = new Observable();
function App() { function App() {
const thisLineGlassStatus = useAppSelector(selectGlassStatus) const thisLineGlassStatus = useAppSelector(selectGlassStatus);
onGlassObservable.notifyObservers(thisLineGlassStatus) onGlassObservable.notifyObservers(thisLineGlassStatus);
const Locale = useAppSelector(selectChangeLangAndCss).Locale; const Locale = useAppSelector(selectChangeLangAndCss).Locale;
const setCurrentLocale = (currentLocale: string) => { const setCurrentLocale = (currentLocale: string) => {
intl.init({ intl
.init({
currentLocale, currentLocale,
locales: locales, locales: locales,
}).then(() => { })
console.log('Language Changed to ' + currentLocale); .then(() => {
console.log("Language Changed to " + currentLocale);
}); });
}; };
@ -51,52 +53,52 @@ function App() {
const router = createBrowserRouter([ const router = createBrowserRouter([
{ {
path: "/", path: "/:LineID?",
element: <MainP/>, element: <LinePage />,
errorElement: <ErrorPage/> errorElement: <ErrorPage />,
}, },
{ {
path: "/P", path: "/P",
element: <MainP/>, element: <MainP />,
errorElement: <ErrorPage/> errorElement: <ErrorPage />,
}, },
{ {
path: "/Q", path: "/Q",
element: <MainQ/>, element: <MainQ />,
errorElement: <ErrorPage/> errorElement: <ErrorPage />,
}, },
{ {
path: "/E/:LineID?", path: "/E/:LineID?",
element: <MainE/>, element: <MainE />,
errorElement: <ErrorPage/> errorElement: <ErrorPage />,
}, },
/////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////
{ {
path: "/SA", path: "/SA",
element: <SwitchAll/>, element: <SwitchAll />,
errorElement: <ErrorPage/> errorElement: <ErrorPage />,
}, },
{ {
path: "/SL/:LineID?", path: "/SL/:LineID?",
element: <SwitchLine/>, element: <SwitchLine />,
errorElement: <ErrorPage/> errorElement: <ErrorPage />,
}, },
///////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////
{ {
path: "/TP/:LineID?", path: "/TP/:LineID?",
element: <TestPage/>, element: <TestPage />,
errorElement: <ErrorPage/> errorElement: <ErrorPage />,
}, },
{ {
path: "/LD", path: "/LD",
element: <LDPage/>, element: <LDPage />,
errorElement: <ErrorPage/> errorElement: <ErrorPage />,
}, },
/////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////
{ {
path: "/LP/:LineID?", path: "/LP/:LineID?",
element: <LinePage/>, element: <LinePage />,
errorElement: <ErrorPage/> errorElement: <ErrorPage />,
}, },
// { // {
// path: "/TP/:LineID?", // path: "/TP/:LineID?",
@ -104,11 +106,20 @@ function App() {
// errorElement: <ErrorPage/> // errorElement: <ErrorPage/>
// }, // },
]); ]);
useEffect(() => {
const timerId = setInterval(() => {
window.location.reload();
}, 43200000);
return () => {
clearInterval(timerId);
};
}, []);
return ( return (
<MyObservable.Provider value={onGlassObservable}> <MyObservable.Provider value={onGlassObservable}>
<div className="background"> <div className="background">
<RouterProvider router={router}/> <RouterProvider router={router} />
</div> </div>
</MyObservable.Provider> </MyObservable.Provider>
); );