zjl #3

Manually merged
juzi merged 2 commits from zjl into master 2024-09-11 10:18:50 +08:00
31 changed files with 71 additions and 2919 deletions
Showing only changes of commit b6fb156c2c - Show all commits

26
package-lock.json generated
View File

@ -5842,9 +5842,23 @@
}
},
"node_modules/caniuse-lite": {
"version": "1.0.30001481",
"resolved": "https://registry.npmmirror.com/caniuse-lite/-/caniuse-lite-1.0.30001481.tgz",
"integrity": "sha512-KCqHwRnaa1InZBtqXzP98LPg0ajCVujMKjqKDhZEthIpAsJl/YEIa3YvXjGXPVqzZVguccuu7ga9KOE1J9rKPQ=="
"version": "1.0.30001653",
"resolved": "https://registry.npmmirror.com/caniuse-lite/-/caniuse-lite-1.0.30001653.tgz",
"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": {
"version": "2.4.0",
@ -21128,9 +21142,9 @@
}
},
"caniuse-lite": {
"version": "1.0.30001481",
"resolved": "https://registry.npmmirror.com/caniuse-lite/-/caniuse-lite-1.0.30001481.tgz",
"integrity": "sha512-KCqHwRnaa1InZBtqXzP98LPg0ajCVujMKjqKDhZEthIpAsJl/YEIa3YvXjGXPVqzZVguccuu7ga9KOE1J9rKPQ=="
"version": "1.0.30001653",
"resolved": "https://registry.npmmirror.com/caniuse-lite/-/caniuse-lite-1.0.30001653.tgz",
"integrity": "sha512-XGWQVB8wFQ2+9NZwZ10GxTYC5hk0Fa+q8cSkr0tgvMhYhMHP/QC+WTgrePMDBWiWc/pV+1ik82Al20XOK25Gcw=="
},
"case-sensitive-paths-webpack-plugin": {
"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.
Learn how to configure a non-root public URL by running `npm run build`.
-->
<title>React App</title>
<title>数智工厂生产监控驾驶舱</title>
</head>
<body style="overflow: hidden">
<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 intl from 'react-intl-universal';
import React, { useEffect, useState, useContext } from "react";
import intl from "react-intl-universal";
import locales from "./locales/locales";
import './App.css';
import {useAppSelector} from "./store/hooks";
import {selectChangeLangAndCss} from "./store/ChangeLangAndCss";
import {createBrowserRouter, RouterProvider,} from "react-router-dom";
import "./App.css";
import { useAppSelector } from "./store/hooks";
import { selectChangeLangAndCss } from "./store/ChangeLangAndCss";
import { createBrowserRouter, RouterProvider } from "react-router-dom";
import ErrorPage from "./page/ErrorPage";
import MainP from "./page/MainP/MainP";
@ -12,12 +12,12 @@ import MainE from "./page/MainE/MainE";
import MainQ from "./page/MainQ/MainQ";
import SwitchAll from "./page/AutoSwitch/SwitchAll";
import SwitchLine from "./page/AutoSwitch/SwitchLine";
import {MyObservable} from "./context/MyObservable";
import {Observable} from "@babylonjs/core";
import {selectGlassStatus} from "./store/ProductionMonitoringEntity";
import { MyObservable } from "./context/MyObservable";
import { Observable } from "@babylonjs/core";
import { selectGlassStatus } from "./store/ProductionMonitoringEntity";
import TestPage from "./page/TestPage";
import LDPage from "./page/LDPage"
import LinePage from './page/LinePage';
import LDPage from "./page/LDPage";
import LinePage from "./page/LinePage";
// const LOCALES_LIST = [
// {
@ -33,17 +33,19 @@ import LinePage from './page/LinePage';
const onGlassObservable = new Observable();
function App() {
const thisLineGlassStatus = useAppSelector(selectGlassStatus)
onGlassObservable.notifyObservers(thisLineGlassStatus)
const thisLineGlassStatus = useAppSelector(selectGlassStatus);
onGlassObservable.notifyObservers(thisLineGlassStatus);
const Locale = useAppSelector(selectChangeLangAndCss).Locale;
const setCurrentLocale = (currentLocale: string) => {
intl.init({
intl
.init({
currentLocale,
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([
{
path: "/",
element: <MainP/>,
errorElement: <ErrorPage/>
path: "/:LineID?",
element: <LinePage />,
errorElement: <ErrorPage />,
},
{
path: "/P",
element: <MainP/>,
errorElement: <ErrorPage/>
element: <MainP />,
errorElement: <ErrorPage />,
},
{
path: "/Q",
element: <MainQ/>,
errorElement: <ErrorPage/>
element: <MainQ />,
errorElement: <ErrorPage />,
},
{
path: "/E/:LineID?",
element: <MainE/>,
errorElement: <ErrorPage/>
element: <MainE />,
errorElement: <ErrorPage />,
},
///////////////////////////////////////////////////////////////////////////
{
path: "/SA",
element: <SwitchAll/>,
errorElement: <ErrorPage/>
element: <SwitchAll />,
errorElement: <ErrorPage />,
},
{
path: "/SL/:LineID?",
element: <SwitchLine/>,
errorElement: <ErrorPage/>
element: <SwitchLine />,
errorElement: <ErrorPage />,
},
/////////////////////////////////////////////////////////////////////////////
{
path: "/TP/:LineID?",
element: <TestPage/>,
errorElement: <ErrorPage/>
element: <TestPage />,
errorElement: <ErrorPage />,
},
{
path: "/LD",
element: <LDPage/>,
errorElement: <ErrorPage/>
element: <LDPage />,
errorElement: <ErrorPage />,
},
///////////////////////////////////////////////////////////////
{
path: "/LP/:LineID?",
element: <LinePage/>,
errorElement: <ErrorPage/>
element: <LinePage />,
errorElement: <ErrorPage />,
},
// {
// path: "/TP/:LineID?",
@ -104,11 +106,20 @@ function App() {
// errorElement: <ErrorPage/>
// },
]);
useEffect(() => {
const timerId = setInterval(() => {
window.location.reload();
}, 43200000);
return () => {
clearInterval(timerId);
};
}, []);
return (
<MyObservable.Provider value={onGlassObservable}>
<div className="background">
<RouterProvider router={router}/>
<RouterProvider router={router} />
</div>
</MyObservable.Provider>
);