Browse Source

修改图片路径,更换下载依赖位置,修改设置的中文,文字替换,页面优化

master
談蓝色 10 months ago
parent
commit
641fd114a7
  1. 20
      frontend/index.html
  2. 8109
      frontend/package-lock.json
  3. 3
      frontend/package.json
  4. 0
      frontend/public/img/bj.png
  5. 0
      frontend/public/img/chimg.png
  6. 2
      frontend/src/App.jsx
  7. 10
      frontend/src/components/EmbeddingSelection/OllamaOptions/index.jsx
  8. 12
      frontend/src/components/LLMSelection/OllamaLLMOptions/index.jsx
  9. 2
      frontend/src/components/Modals/ManageWorkspace/Documents/UploadFile/FileUploadProgress/index.jsx
  10. 4
      frontend/src/components/Modals/Password/index.jsx
  11. 2
      frontend/src/components/SettingsSidebar/index.jsx
  12. 2
      frontend/src/components/Sidebar/index.jsx
  13. 26
      frontend/src/components/UserMenu/AccountModal/index.jsx
  14. 1
      frontend/src/pages/Admin/Section/index.jsx
  15. 29
      frontend/src/pages/DataAnalysis/DataAnalysis.css
  16. 65
      frontend/src/pages/DataAnalysis/index.jsx
  17. 2
      frontend/src/pages/Home/home.css
  18. 12
      frontend/src/pages/Home/index.jsx
  19. 123
      frontend/src/pages/ReportGeneration/ReportGeneration.css
  20. 36
      frontend/src/pages/ReportGeneration/index.jsx
  21. 123
      frontend/src/pages/Tendency/Tendency.css
  22. 147
      frontend/src/pages/Tendency/index.jsx
  23. 31
      frontend/src/pages/Yuqingfenxi/index.jsx
  24. 3
      frontend/src/utils/paths.js
  25. 1008
      package-lock.json
  26. 4
      package.json

20
frontend/index.html

@ -1,7 +1,7 @@
<!DOCTYPE html>
<html lang="en">
<head>
<head>
<meta charset="UTF-8" />
<link rel="icon" type="image/svg+xml" href="/favicon.png" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
@ -28,11 +28,23 @@
<link rel="icon" href="/favicon.png" />
<link rel="apple-touch-icon" href="/favicon.png" />
</head>
<body>
<style>
html,
body,
.light {
height: 100%;
margin: 0px;
padding: 0px;
font-family: '思源宋体 Light' !important;
}
</style>
</head>
<body>
<div id="root" class="h-screen"></div>
<script type="module" src="/src/main.jsx"></script>
</body>
</body>
</html>

8109
frontend/package-lock.json
File diff suppressed because it is too large
View File

3
frontend/package.json

@ -15,6 +15,7 @@
"@mintplex-labs/piper-tts-web": "^1.0.4",
"@phosphor-icons/react": "^2.1.7",
"@tremor/react": "^3.15.1",
"antd": "^5.24.2",
"dompurify": "^3.0.8",
"file-saver": "^2.0.5",
"he": "^1.2.0",
@ -22,9 +23,9 @@
"i18next": "^23.11.3",
"i18next-browser-languagedetector": "^7.2.1",
"js-levenshtein": "^1.1.6",
"katex": "^0.6.0",
"lodash.debounce": "^4.0.8",
"markdown-it": "^13.0.1",
"katex": "^0.6.0",
"moment": "^2.30.1",
"onnxruntime-web": "^1.18.0",
"pluralize": "^8.0.0",

images/bj.png → frontend/public/img/bj.png

images/chimg.png → frontend/public/img/chimg.png

2
frontend/src/App.jsx

@ -23,7 +23,7 @@ const Home = lazy(() => import("@/pages/Home")); // 新首页
const PolicyLibrary = lazy(() => import("@/pages/PolicyLibrary")); //
const DataAnalysis = lazy(() => import("@/pages/DataAnalysis")); //
const Tendency = lazy(() => import("@/pages/Tendency")); //
const Yuqingfenxi = lazy(() => import("@/pages/Yuqingfenxi")); //
const Yuqingfenxi = lazy(() => import("@/pages/Yuqingfenxi")); //
const ReportGeneration = lazy(() => import("@/pages/ReportGeneration")); //
const InvitePage = lazy(() => import("@/pages/Invite"));

10
frontend/src/components/EmbeddingSelection/OllamaOptions/index.jsx

@ -51,7 +51,7 @@ export default function OllamaEmbeddingOptions({ settings }) {
autoComplete="off"
/>
<p className="text-xs leading-[18px] font-base text-white text-opacity-60 mt-2">
Maximum length of text chunks for embedding.
嵌入文本块的最大长度
</p>
</div>
</div>
@ -107,7 +107,7 @@ export default function OllamaEmbeddingOptions({ settings }) {
onBlur={basePath.onBlur}
/>
<p className="text-xs leading-[18px] font-base text-white text-opacity-60 mt-2">
Enter the URL where Ollama is running.
输入运行Ollama的URL
</p>
</div>
</div>
@ -144,7 +144,7 @@ function OllamaEmbeddingModelSelection({ settings, basePath = null }) {
return (
<div className="flex flex-col w-60">
<label className="text-white text-sm font-semibold block mb-2">
Ollama Embedding Model
Ollama嵌入模型
</label>
<select
name="EmbeddingModelPref"
@ -158,8 +158,8 @@ function OllamaEmbeddingModelSelection({ settings, basePath = null }) {
</option>
</select>
<p className="text-xs leading-[18px] font-base text-white text-opacity-60 mt-2">
Select the Ollama model for embeddings. Models will load after
entering a valid Ollama URL.
选择用于嵌入的Ollama模型模型将在
输入有效的Ollama URL
</p>
</div>
);

12
frontend/src/components/LLMSelection/OllamaLLMOptions/index.jsx

@ -35,7 +35,7 @@ export default function OllamaLLMOptions({ settings }) {
/>
<div className="flex flex-col w-60">
<label className="text-white text-sm font-semibold block mb-2">
Max Tokens
Max 令牌
</label>
<input
type="number"
@ -51,7 +51,7 @@ export default function OllamaLLMOptions({ settings }) {
autoComplete="off"
/>
<p className="text-xs leading-[18px] font-base text-white text-opacity-60 mt-2">
Maximum number of tokens for context and response.
上下文和响应的最大令牌数
</p>
</div>
</div>
@ -77,7 +77,7 @@ export default function OllamaLLMOptions({ settings }) {
<div className="flex flex-col w-60">
<div className="flex justify-between items-center mb-2">
<label className="text-white text-sm font-semibold">
Ollama Base URL
Ollama基础URL
</label>
{loading ? (
<PreLoader size="6" />
@ -222,7 +222,7 @@ function OllamaLLMModelSelection({ settings, basePath = null }) {
return (
<div className="flex flex-col w-60">
<label className="text-white text-sm font-semibold block mb-2">
Ollama Model
Ollama 模型
</label>
<select
name="OllamaLLMModelPref"
@ -236,8 +236,8 @@ function OllamaLLMModelSelection({ settings, basePath = null }) {
</option>
</select>
<p className="text-xs leading-[18px] font-base text-white text-opacity-60 mt-2">
Select the Ollama model you want to use. Models will load after
entering a valid Ollama URL.
选择您想要使用的Ollama模型模型将在
输入有效的Ollama URL
</p>
</div>
);

2
frontend/src/components/Modals/ManageWorkspace/Documents/UploadFile/FileUploadProgress/index.jsx

@ -37,7 +37,7 @@ function FileUploadProgressComponent({
useEffect(() => {
async function uploadFile() {
setLoading(true);
setLoadingMessage("Uploading file...");
setLoadingMessage("上传文件...");
const start = Number(new Date());
const formData = new FormData();
formData.append("file", file, file.name);

4
frontend/src/components/Modals/Password/index.jsx

@ -9,8 +9,8 @@ import {
} from "../../../utils/constants";
import useLogo from "../../../hooks/useLogo";
import illustration from "@/media/illustrations/login-illustration.svg";
import chimg from "../../../../../images/chimg.png"
import bjimg from "../../../../../images/bj.png"
import chimg from "/img/chimg.png"
import bjimg from "/img/bj.png"
export default function PasswordModal({ mode = "single" }) {
const { loginLogo } = useLogo();

2
frontend/src/components/SettingsSidebar/index.jsx

@ -1,7 +1,7 @@
import React, { useEffect, useRef, useState } from "react";
import paths from "@/utils/paths";
import useLogo from "@/hooks/useLogo";
import imglog from "../../../../images/chimg.png"
import imglog from "/img/chimg.png"
import {
House,
List,

2
frontend/src/components/Sidebar/index.jsx

@ -12,7 +12,7 @@ import { Link } from "react-router-dom";
import paths from "@/utils/paths";
import { useTranslation } from "react-i18next";
import { useSidebarToggle, ToggleSidebarButton } from "./SidebarToggle";
import chimg from "../../../../images/chimg.png";
import chimg from "/img/chimg.png";
export default function Sidebar() {
const { user } = useUser();

26
frontend/src/components/UserMenu/AccountModal/index.jsx

@ -68,7 +68,7 @@ export default function AccountModal({ user, hideModal }) {
<div className="relative p-6 border-b rounded-t border-theme-modal-border">
<div className="w-full flex gap-x-2 items-center">
<h3 className="text-xl font-semibold text-white overflow-hidden overflow-ellipsis whitespace-nowrap">
Edit Account
编辑帐户
</h3>
</div>
<button
@ -104,7 +104,7 @@ export default function AccountModal({ user, hideModal }) {
<div className="flex flex-col items-center justify-center p-3">
<Plus className="w-8 h-8 text-theme-text-secondary m-2" />
<span className="text-theme-text-secondary text-opacity-80 text-sm font-semibold">
Profile Picture
上传个人头像
</span>
<span className="text-theme-text-secondary text-opacity-60 text-xs">
800 x 800
@ -118,7 +118,7 @@ export default function AccountModal({ user, hideModal }) {
onClick={handleRemovePfp}
className="mt-3 text-theme-text-secondary text-opacity-60 text-sm font-medium hover:underline"
>
Remove Profile Picture
删除头像
</button>
)}
</div>
@ -129,7 +129,7 @@ export default function AccountModal({ user, hideModal }) {
htmlFor="username"
className="block mb-2 text-sm font-medium text-theme-text-primary"
>
Username
用户名
</label>
<input
name="username"
@ -142,8 +142,8 @@ export default function AccountModal({ user, hideModal }) {
autoComplete="off"
/>
<p className="mt-2 text-xs text-white/60">
Username must be only contain lowercase letters, numbers,
underscores, and hyphens with no spaces
用户名只能包含小写字母数字
下划线和连字符不带空格
</p>
</div>
<div>
@ -151,17 +151,17 @@ export default function AccountModal({ user, hideModal }) {
htmlFor="password"
className="block mb-2 text-sm font-medium text-white"
>
New Password
新密码
</label>
<input
name="password"
type="text"
className="border-none bg-theme-settings-input-bg placeholder:text-theme-settings-input-placeholder border-gray-500 text-white text-sm rounded-lg focus:outline-primary-button active:outline-primary-button outline-none block w-full p-2.5"
placeholder={`${user.username}'s new password`}
placeholder='输入新的密码'
minLength={8}
/>
<p className="mt-2 text-xs text-white/60">
Password must be at least 8 characters long
密码长度至少为8个字符
</p>
</div>
<div className="flex flex-row gap-x-8">
@ -175,13 +175,13 @@ export default function AccountModal({ user, hideModal }) {
type="button"
className="transition-all duration-300 text-white hover:bg-zinc-700 px-4 py-2 rounded-lg text-sm"
>
Cancel
取消
</button>
<button
type="submit"
className="transition-all duration-300 bg-white text-black hover:opacity-60 px-4 py-2 rounded-lg text-sm"
>
Update Account
更新帐户
</button>
</div>
</form>
@ -205,7 +205,7 @@ function LanguagePreference() {
htmlFor="userLang"
className="block mb-2 text-sm font-medium text-white"
>
Preferred language
首选语言
</label>
<select
name="userLang"
@ -234,7 +234,7 @@ function ThemePreference() {
htmlFor="theme"
className="block mb-2 text-sm font-medium text-white"
>
Theme Preference
主题偏好
</label>
<select
name="theme"

1
frontend/src/pages/Admin/Section/index.jsx

@ -61,6 +61,7 @@ function DepartmentsContainer() {
useEffect(() => {
async function fetchDepartments() {
const _departments = await Admin.depts();
console.log(1111,_departments);
setDepartments(buildTree(_departments)); //
setLoading(false);
}

29
frontend/src/pages/DataAnalysis/DataAnalysis.css

@ -1,9 +1,7 @@
.box {
width: 100%;
min-height: 100vh;
padding: 10px 0;
/*height: auto;*/
height: 100vh;
position: absolute;
background-color: #F7F7FC;
}
@ -14,7 +12,8 @@
display: grid;
grid-template-rows: 100px 1fr;
}
.head>div:first-child img{
.head>div:first-child img {
width: 35px;
height: 35px;
position: absolute;
@ -77,35 +76,47 @@
}
.content2 {
width: 100%;
display: grid;
grid-template-rows: 1fr 50px;
box-shadow: 0 0 2px #CFCFCF;
background-color: #fff;
border-radius: 10px;
padding: 20px 15px;
}
.content2_1 {
width: 95%;
display: grid;
grid-template-columns: 50px 1fr;
width: 100%;
display: flex;
column-gap: 20px;
border-bottom: 1px solid #F0F0F5;
padding: 10px;
}
.nr1 img {
width: 100%;
}
.nr2 {
width: 100%;
}
.nr2 div:first-child {
font-size: 18px;
font-weight: bold;
}
.nr2 div:last-child {
width: 100%;
height: 60px;
color: #7E807C;
font-size: 14px;
padding: 5px 0;
margin: 5px 0 20px;
overflow: hidden;
display: -webkit-box;
box-sizing: border-box;
-webkit-line-clamp: 3;
-webkit-box-orient: vertical;
}
.content2_2 {

65
frontend/src/pages/DataAnalysis/index.jsx

@ -10,11 +10,7 @@ import tu5 from './img/5.png'
import tu6 from './img/6.png'
import tu7 from './img/7.png'
import tu8 from './img/8.png'
import tu9 from './img/9.png'
import tu10 from './img/10.png'
import tu11 from './img/11.png'
import tu12 from './img/12.png'
import tu13 from './img/13.png'
import tu14 from './img/14.png'
import { message } from "antd";
@ -63,78 +59,23 @@ function DataAnalysis() {
text: '监测医疗服务数据,分析就诊率和疾病谱变化',
img: tu8
},
// {
// name: '',
// text: '',
// img: tu9
// },
// {
// name: '',
// text: '',
// img: tu10
// },
{
name: '项目进度跟踪',
text: '实时显示项目的进度状态,对比计划与实际进度',
img: tu11
},
// {
// name: '',
// text: '',
// img: tu12
// },
// {
// name: '',
// text: '',
// img: tu13
// },
{
name: '产业分析',
text: '对新能源、盐碱化工等产业进行资源、市场、技术分析用户输入产业信息,系统自动进行分析并输出报告资源分析:评估产业所需的自然、人力资源市场分析:分析当前市场需求、竞争态势',
img: tu14
},
// {
// name: '',
// text: '',
// img: tu8
// },
// {
// name: '',
// text: '访',
// img: tu9
// },
// {
// name: '',
// text: '',
// img: tu10
// },
// {
// name: '',
// text: '',
// img: tu11
// },
// {
// name: '',
// text: '',
// img: tu12
// },
// {
// name: '',
// text: '',
// img: tu13
// },
// {
// name: '',
// text: '',
// img: tu14
// },
]
useEffect(() => {
}, []);
const bindUrl = (e) =>{
const bindUrl = (e) => {
console.log(1234, e);
if (e.url) {
window.location = e.url
@ -146,7 +87,7 @@ function DataAnalysis() {
}
const bindUrl1 = () =>{
const bindUrl1 = () => {
window.location = "/"
}
return (
@ -157,7 +98,7 @@ function DataAnalysis() {
<div className='search'>
<div className='search1'>
<img src={sou} alt="" />
<input type="text" placeholder='请输入内容' />
<input type="text" placeholder='请输入想要搜索的内容' />
</div>
<button>搜索</button>
</div>

2
frontend/src/pages/Home/home.css

@ -1,7 +1,6 @@
.box {
width: 100%;
}
.box video {
position: absolute;
top: 0;
@ -113,6 +112,7 @@
.lunType2 div {
text-align: center;
margin: 30px 0 20px;
font-family: '思源宋体 Light' !important;
}
.lunType2 img {

12
frontend/src/pages/Home/index.jsx

@ -4,8 +4,6 @@ import videoRef from "./img/bj1.mp4"
import headImg from "./img/head.png"
import { Carousel, message } from 'antd';
import moment from 'moment';
import bg from './img/card.png'
import bgHover from "./img/card_hover.png"
import icon1 from "./img/1.png"
import icon2 from "./img/2.png"
import icon3 from "./img/3.png"
@ -26,13 +24,13 @@ export default function Home() {
type: 1,
url: '/Main',
name: 'AI问政',
icon: icon1,
icon: icon3,
},
{
type: 1,
url: '/home/DataAnalysis',
name: '数据分析',
icon: icon2,
icon: icon1,
},
{
type: 1,
@ -44,19 +42,19 @@ export default function Home() {
type: 1,
url: '/home/ReportGeneration',
name: '报告生成',
icon: icon3,
icon: icon2,
},
{
type: 2,
url: '',
name: '文件上传',
icon: icon5,
icon: icon6,
},
{
type: 1,
url: '/home/PolicyLibrary',
name: '政策库',
icon: icon6,
icon: icon5,
},
{
type: 2,

123
frontend/src/pages/ReportGeneration/ReportGeneration.css

@ -0,0 +1,123 @@
.box {
width: 100%;
min-height: 100vh;
padding: 10px 0;
background-color: #F7F7FC;
}
.box1 {
width: 85%;
margin: 0 auto;
box-sizing: border-box;
display: grid;
grid-template-rows: 100px 1fr;
}
.head>div:first-child img{
width: 35px;
height: 35px;
position: absolute;
top: 25px;
left: 140px;
cursor: pointer;
}
.search {
display: flex;
align-items: center;
justify-content: center;
margin: 10px 0;
}
.search1 {
width: 40%;
position: relative;
box-shadow: 0 0 5px #CFCFCF;
border-radius: 50px;
}
.search1 input {
width: 100%;
border-bottom-left-radius: 50px;
border-top-left-radius: 50px;
padding: 8px 0 8px 50px;
}
.search1 input:focus {
outline: none;
border: 1px solid #1677FF;
}
.search1 img {
width: 30px;
height: 30px;
position: absolute;
left: 10px;
top: 0;
bottom: 0;
margin: auto;
}
.search button {
color: #fff;
background-color: #1677FF;
padding: 8px 30px 8px;
border-top-right-radius: 50px;
border-bottom-right-radius: 50px;
box-shadow: 0 0 5px #CFCFCF;
}
.content {
width: 100%;
display: grid;
grid-template-columns: 1fr 1fr 1fr 1fr;
column-gap: 20px;
row-gap: 20px;
}
.content2 {
display: grid;
grid-template-rows: 1fr 50px;
box-shadow: 0 0 2px #CFCFCF;
background-color: #fff;
border-radius: 10px;
}
.content2_1 {
width: 95%;
display: grid;
grid-template-columns: 50px 1fr;
column-gap: 20px;
border-bottom: 1px solid #F0F0F5;
padding: 10px;
}
.nr1 img {
width: 100%;
}
.nr2 div:first-child {
font-size: 18px;
font-weight: bold;
}
.nr2 div:last-child {
color: #7E807C;
font-size: 14px;
padding: 5px 0;
}
.content2_2 {
display: flex;
align-items: center;
justify-content: right;
}
.content2_2 button {
color: #645BFF;
background-color: #E6E9FF;
padding: 5px 10px;
margin-right: 20px;
border-radius: 5px;
font-size: 14px;
}

36
frontend/src/pages/ReportGeneration/index.jsx

@ -1,44 +1,14 @@
// import React, { useEffect, useRef } from 'react';
import React, { useEffect, useState, useRef } from 'react';
import '../DataAnalysis/DataAnalysis.css'
import './ReportGeneration.css'
import sou from '../DataAnalysis/img/sou.png'
import home from '../DataAnalysis/img/home.png'
import tu1 from '../DataAnalysis/img/1.png'
import tu1 from '../DataAnalysis/img/8.png'
import tu2 from '../DataAnalysis/img/2.png'
import tu3 from '../DataAnalysis/img/3.png'
import tu4 from '../DataAnalysis/img/4.png'
import tu4 from '../DataAnalysis/img/14.png'
function IframeComponent() {
// const iframeRef = useRef(null);
//
// useEffect(() => {
// if (iframeRef.current) {
// iframeRef.current.contentWindow.addEventListener('message', (event) => {
// console.log(11111, event.data);
// });
// }
//
// return () => {
// if (iframeRef.current) {
// iframeRef.current.contentWindow.removeEventListener('message', (event) => {
// console.log('Received message:', event.data);
// });
// }
// };
// }, []); //
//
// return (
// <div>
// <iframe ref={iframeRef} src="https://example.com" className='w-[100%] h-screen'/>;
// </div>
// )
const [renderKey, setRenderKey] = useState();

123
frontend/src/pages/Tendency/Tendency.css

@ -0,0 +1,123 @@
.box {
width: 100%;
min-height: 100vh;
padding: 10px 0;
background-color: #F7F7FC;
}
.box1 {
width: 85%;
margin: 0 auto;
box-sizing: border-box;
display: grid;
grid-template-rows: 100px 1fr;
}
.head>div:first-child img{
width: 35px;
height: 35px;
position: absolute;
top: 25px;
left: 140px;
cursor: pointer;
}
.search {
display: flex;
align-items: center;
justify-content: center;
margin: 10px 0;
}
.search1 {
width: 40%;
position: relative;
box-shadow: 0 0 5px #CFCFCF;
border-radius: 50px;
}
.search1 input {
width: 100%;
border-bottom-left-radius: 50px;
border-top-left-radius: 50px;
padding: 8px 0 8px 50px;
}
.search1 input:focus {
outline: none;
border: 1px solid #1677FF;
}
.search1 img {
width: 30px;
height: 30px;
position: absolute;
left: 10px;
top: 0;
bottom: 0;
margin: auto;
}
.search button {
color: #fff;
background-color: #1677FF;
padding: 8px 30px 8px;
border-top-right-radius: 50px;
border-bottom-right-radius: 50px;
box-shadow: 0 0 5px #CFCFCF;
}
.content {
width: 100%;
display: grid;
grid-template-columns: 1fr 1fr 1fr 1fr;
column-gap: 20px;
row-gap: 20px;
}
.content2 {
display: grid;
grid-template-rows: 1fr 50px;
box-shadow: 0 0 2px #CFCFCF;
background-color: #fff;
border-radius: 10px;
}
.content2_1 {
width: 95%;
display: grid;
grid-template-columns: 50px 1fr;
column-gap: 20px;
border-bottom: 1px solid #F0F0F5;
padding: 10px;
}
.nr1 img {
width: 100%;
}
.nr2 div:first-child {
font-size: 18px;
font-weight: bold;
}
.nr2 div:last-child {
color: #7E807C;
font-size: 14px;
padding: 5px 0;
}
.content2_2 {
display: flex;
align-items: center;
justify-content: right;
}
.content2_2 button {
color: #645BFF;
background-color: #E6E9FF;
padding: 5px 10px;
margin-right: 20px;
border-radius: 5px;
font-size: 14px;
}

147
frontend/src/pages/Tendency/index.jsx

@ -1,55 +1,12 @@
// import React, { useEffect, useRef } from 'react';
import React, { useEffect, useState, useRef } from 'react';
import '../DataAnalysis/DataAnalysis.css'
import './Tendency.css'
import sou from '../DataAnalysis/img/sou.png'
import home from '../DataAnalysis/img/home.png'
import tu1 from '../DataAnalysis/img/1.png'
import tu2 from '../DataAnalysis/img/2.png'
import tu3 from '../DataAnalysis/img/3.png'
import tu4 from '../DataAnalysis/img/4.png'
import tu5 from '../DataAnalysis/img/5.png'
import tu6 from '../DataAnalysis/img/6.png'
import tu7 from '../DataAnalysis/img/7.png'
import tu8 from '../DataAnalysis/img/8.png'
import tu9 from '../DataAnalysis/img/9.png'
import tu10 from '../DataAnalysis/img/10.png'
import tu11 from '../DataAnalysis/img/11.png'
import tu12 from '../DataAnalysis/img/12.png'
import tu13 from '../DataAnalysis/img/13.png'
import tu14 from '../DataAnalysis/img/14.png'
function IframeComponent() {
// const iframeRef = useRef(null);
//
// useEffect(() => {
// if (iframeRef.current) {
// iframeRef.current.contentWindow.addEventListener('message', (event) => {
// console.log(11111, event.data);
// });
// }
//
// return () => {
// if (iframeRef.current) {
// iframeRef.current.contentWindow.removeEventListener('message', (event) => {
// console.log('Received message:', event.data);
// });
// }
// };
// }, []); //
//
// return (
// <div>
// <iframe ref={iframeRef} src="https://example.com" className='w-[100%] h-screen'/>;
// </div>
// )
import tu1 from '../DataAnalysis/img/5.png'
import tu2 from '../DataAnalysis/img/8.png'
import tu3 from '../DataAnalysis/img/11.png'
function Tendency() {
const [renderKey, setRenderKey] = useState();
const list = [
@ -68,103 +25,13 @@ function IframeComponent() {
text: '对关键指标进行实时监控,当指标达到预设阈值时,自动触发警报,确保管理层能迅速响应。',
img: tu3
},
// {
// name: '',
// text: '',
// img: tu4
// },
// {
// name: '',
// text: '',
// img: tu5
// },
// {
// name: '',
// text: '',
// img: tu6
// },
// {
// name: '',
// text: '',
// img: tu7
// },
// {
// name: '',
// text: '',
// img: tu8
// },
// {
// name: '',
// text: '',
// img: tu9
// },
// {
// name: '',
// text: '',
// img: tu10
// },
// {
// name: '',
// text: '',
// img: tu11
// },
// {
// name: '',
// text: '',
// img: tu12
// },
// {
// name: '',
// text: '',
// img: tu13
// },
// {
// name: '',
// text: '',
// img: tu14
// },
// {
// name: '',
// text: '',
// img: tu8
// },
// {
// name: '',
// text: '访',
// img: tu9
// },
// {
// name: '',
// text: '',
// img: tu10
// },
// {
// name: '',
// text: '',
// img: tu11
// },
// {
// name: '',
// text: '',
// img: tu12
// },
// {
// name: '',
// text: '',
// img: tu13
// },
// {
// name: '',
// text: '',
// img: tu14
// },
]
useEffect(() => {
}, []);
const bindUrl = () =>{
const bindUrl = () => {
window.location = '/'
}
@ -206,4 +73,4 @@ function IframeComponent() {
}
export default IframeComponent;
export default Tendency;

31
frontend/src/pages/Yuqingfenxi/index.jsx

@ -1,24 +1,6 @@
// import React, { useEffect, useRef } from 'react';
import React, { useEffect, useState, useRef } from 'react';
import '../DataAnalysis/DataAnalysis.css'
import sou from '../DataAnalysis/img/sou.png'
import home from '../DataAnalysis/img/home.png'
import tu1 from '../DataAnalysis/img/1.png'
import tu2 from '../DataAnalysis/img/2.png'
import tu3 from '../DataAnalysis/img/3.png'
import tu4 from '../DataAnalysis/img/4.png'
import tu5 from '../DataAnalysis/img/5.png'
import tu6 from '../DataAnalysis/img/6.png'
import tu7 from '../DataAnalysis/img/7.png'
import tu8 from '../DataAnalysis/img/8.png'
import tu9 from '../DataAnalysis/img/9.png'
import tu10 from '../DataAnalysis/img/10.png'
import tu11 from '../DataAnalysis/img/11.png'
import tu12 from '../DataAnalysis/img/12.png'
import tu13 from '../DataAnalysis/img/13.png'
import tu14 from '../DataAnalysis/img/14.png'
function IframeComponent() {
function Yuqingfenxi() {
const iframeRef = useRef(null);
useEffect(() => {
@ -43,15 +25,6 @@ function IframeComponent() {
</div>
)
}
export default IframeComponent;
export default Yuqingfenxi;

3
frontend/src/utils/paths.js

@ -23,6 +23,9 @@ export default {
DataAnalysis: () => {
return "/home/DataAnalysis";
},
ReportGeneration:() =>{
return "/home/ReportGeneration";
}
},
onboarding: {
home: () => {

1008
package-lock.json
File diff suppressed because it is too large
View File

4
package.json

@ -30,9 +30,5 @@
"private": false,
"devDependencies": {
"cross-env": "^7.0.3"
},
"dependencies": {
"antd": "^5.24.2",
"moment": "^2.30.1"
}
}
Loading…
Cancel
Save