Browse Source

首页更换,界面优化

master
談蓝色 10 months ago
parent
commit
e8ada08aee
  1. 36
      frontend/src/App.jsx
  2. 2
      frontend/src/pages/Admin/Users/UserRow/index.jsx
  3. 33
      frontend/src/pages/DataAnalysis/index.jsx
  4. 14
      frontend/src/pages/GeneralView/index.jsx
  5. 4
      frontend/src/pages/Home/home.css
  6. 10
      frontend/src/pages/Home/index.jsx
  7. 30
      frontend/src/pages/Industry/index.jsx
  8. 30
      frontend/src/pages/Report/index.jsx
  9. 15
      frontend/src/pages/ReportGeneration/index.jsx
  10. 30
      frontend/src/pages/Talents/index.jsx
  11. 14
      frontend/src/pages/Tendency/index.jsx
  12. 30
      frontend/src/pages/TrendPrediction/index.jsx
  13. 30
      frontend/src/pages/Yuqingfenxi/index.jsx
  14. 21
      frontend/src/utils/paths.js

36
frontend/src/App.jsx

@ -12,7 +12,6 @@ import Login from "@/pages/Login";
import SimpleSSOPassthrough from "@/pages/Login/SSO/simple"; import SimpleSSOPassthrough from "@/pages/Login/SSO/simple";
import OnboardingFlow from "@/pages/OnboardingFlow"; import OnboardingFlow from "@/pages/OnboardingFlow";
import i18n from "./i18n"; import i18n from "./i18n";
import { PfpProvider } from "./PfpContext"; import { PfpProvider } from "./PfpContext";
import { LogoProvider } from "./LogoContext"; import { LogoProvider } from "./LogoContext";
import { FullScreenLoader } from "./components/Preloader"; import { FullScreenLoader } from "./components/Preloader";
@ -23,13 +22,8 @@ const Home = lazy(() => import("@/pages/Home")); // 新首页
const PolicyLibrary = lazy(() => import("@/pages/PolicyLibrary")); // const PolicyLibrary = lazy(() => import("@/pages/PolicyLibrary")); //
const DataAnalysis = lazy(() => import("@/pages/DataAnalysis")); // const DataAnalysis = lazy(() => import("@/pages/DataAnalysis")); //
const Tendency = lazy(() => import("@/pages/Tendency")); // const Tendency = lazy(() => import("@/pages/Tendency")); //
const Yuqingfenxi = lazy(() => import("@/pages/Yuqingfenxi")); //
const Economics = lazy(() => import("@/pages/Economics")); //
const Talents = lazy(() => import("@/pages/Talents")); //
const Industry = lazy(() => import("@/pages/Industry")); //
const TrendPrediction = lazy(() => import("@/pages/TrendPrediction")); //
const ReportGeneration = lazy(() => import("@/pages/ReportGeneration")); // const ReportGeneration = lazy(() => import("@/pages/ReportGeneration")); //
const Report = lazy(() => import("@/pages/Report")); // 1
const GeneralView = lazy(() => import("@/pages/GeneralView")); //
const InvitePage = lazy(() => import("@/pages/Invite")); const InvitePage = lazy(() => import("@/pages/Invite"));
const WorkspaceChat = lazy(() => import("@/pages/WorkspaceChat")); const WorkspaceChat = lazy(() => import("@/pages/WorkspaceChat"));
@ -111,38 +105,18 @@ export default function App() {
path="/home/Tendency" path="/home/Tendency"
element={<ManagerRoute Component={Tendency} />} element={<ManagerRoute Component={Tendency} />}
/> />
<Route
path="/home/Yuqingfenxi"
element={<ManagerRoute Component={Yuqingfenxi} />}
/>
<Route
path="/home/TrendPrediction"
element={<ManagerRoute Component={TrendPrediction} />}
/>
<Route
path="/home/Economics"
element={<ManagerRoute Component={Economics} />}
/>
<Route
path="/home/Talents"
element={<ManagerRoute Component={Talents} />}
/>
<Route
path="/home/Industry"
element={<ManagerRoute Component={Industry} />}
/>
<Route <Route
path="/home/DataAnalysis" path="/home/DataAnalysis"
element={<ManagerRoute Component={DataAnalysis} />} element={<ManagerRoute Component={DataAnalysis} />}
/>
<Route
path="/home/GeneralView"
element={<ManagerRoute Component={GeneralView} />}
/> />
<Route <Route
path="/home/ReportGeneration" path="/home/ReportGeneration"
element={<ManagerRoute Component={ReportGeneration} />} element={<ManagerRoute Component={ReportGeneration} />}
/> />
<Route
path="/home/Report"
element={<ManagerRoute Component={Report} />}
/>
<Route path="/login" element={<Login />} /> <Route path="/login" element={<Login />} />
<Route <Route
path="/sso/simple" path="/sso/simple"

2
frontend/src/pages/Admin/Users/UserRow/index.jsx

@ -64,7 +64,7 @@ export default function UserRow({ currUser, user }) {
{user.username} {user.username}
</th> </th>
<td className="px-6 py-4">{titleCase(user.role)}</td> <td className="px-6 py-4">{titleCase(user.role)}</td>
<td className="px-6 py-4">{user.createdAt}</td>
<td className="px-6 py-4">{new Date(user.createdAt).toLocaleDateString()}</td>
<td className="px-6 py-4 flex items-center gap-x-6"> <td className="px-6 py-4 flex items-center gap-x-6">
{canModify && ( {canModify && (
<button <button

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

@ -3,7 +3,6 @@ import { useNavigate } from 'react-router-dom';
import './DataAnalysis.css' import './DataAnalysis.css'
import sou from './img/sou.png' import sou from './img/sou.png'
import home from './img/home.png' import home from './img/home.png'
import tu12 from './img/12.png'
import tu3 from './img/3.png' import tu3 from './img/3.png'
import tu4 from './img/4.png' import tu4 from './img/4.png'
import tu5 from './img/5.png' import tu5 from './img/5.png'
@ -13,35 +12,47 @@ import tu8 from './img/8.png'
import tu9 from './img/9.png' import tu9 from './img/9.png'
import tu10 from './img/10.png' import tu10 from './img/10.png'
import tu11 from './img/11.png' import tu11 from './img/11.png'
import tu12 from './img/12.png'
import { message } from "antd"; import { message } from "antd";
function DataAnalysis() { function DataAnalysis() {
const [renderKey, setRenderKey] = useState();
const navigate = useNavigate();
const navigate = useNavigate()
const list = [ const list = [
{ {
name: '舆情分析', name: '舆情分析',
text: '收集群众反馈意见,对意见进行分类,并分析对应舆情状态', text: '收集群众反馈意见,对意见进行分类,并分析对应舆情状态',
img: tu3, img: tu3,
url: '/home/Yuqingfenxi'
url: '/home/GeneralView',
address:'http://ds1.chenhaitech.com/chat/8HbpWwY8Y6TtGD0v'
}, },
{ {
name: '经济发展分析', name: '经济发展分析',
text: '整合并分析经济数据,输出经济趋势分析报告,自动生成包含图表和文字解读的分析报告', text: '整合并分析经济数据,输出经济趋势分析报告,自动生成包含图表和文字解读的分析报告',
img: tu4, img: tu4,
url: '/home/Economics'
url: '/home/GeneralView',
address:'http://ds1.chenhaitech.com/chat/2pnkwYTDbuK3HXLL'
}, },
{ {
name: '人才分析', name: '人才分析',
text: '分析人才流动情况、就业情况、人才数量、性别占比、岗位数量、录用率等', text: '分析人才流动情况、就业情况、人才数量、性别占比、岗位数量、录用率等',
img: tu8, img: tu8,
url: '/home/Talents'
url: '/home/GeneralView',
address:'http://ds1.chenhaitech.com/chat/3hcCJ8mzo1s1v6yy'
}, },
{ {
name: '产业分析', name: '产业分析',
text: '对新能源、盐碱化工等产业进行资源、市场、技术分析用户输入产业信息,系统自动进行分析并输出报告资源分析:评估产业所需的自然、人力资源市场分析:分析当前市场需求、竞争态势', text: '对新能源、盐碱化工等产业进行资源、市场、技术分析用户输入产业信息,系统自动进行分析并输出报告资源分析:评估产业所需的自然、人力资源市场分析:分析当前市场需求、竞争态势',
img: tu12, img: tu12,
url: '/home/Industry'
url: '/home/GeneralView',
address:'http://ds1.chenhaitech.com/chat/qcAjlNGBDeqI168Z'
},
{
name: '医疗服务分析',
text: '监测医疗服务数据,分析就诊率和疾病谱变化',
img: tu10,
url: '/home/GeneralView',
address:'http://ds1.chenhaitech.com/chat/C2CammcosZDDXzQ7'
}, },
{ {
name: '沙漠化分析', name: '沙漠化分析',
@ -58,17 +69,11 @@ function DataAnalysis() {
text: '分析不同区域内环境治理前后生态指标', text: '分析不同区域内环境治理前后生态指标',
img: tu7 img: tu7
}, },
{ {
name: '教育资源分析', name: '教育资源分析',
text: '分析教育资源的分布情况,评估教育公平性', text: '分析教育资源的分布情况,评估教育公平性',
img: tu9 img: tu9
}, },
{
name: '医疗服务分析',
text: '监测医疗服务数据,分析就诊率和疾病谱变化',
img: tu10
},
{ {
name: '项目进度跟踪', name: '项目进度跟踪',
text: '实时显示项目的进度状态,对比计划与实际进度', text: '实时显示项目的进度状态,对比计划与实际进度',
@ -82,7 +87,7 @@ function DataAnalysis() {
const bindUrl = (e) => { const bindUrl = (e) => {
if (e.url) { if (e.url) {
navigate(e.url)
navigate(e.url,{state:{address:e.address}})
} else { } else {
message.info({ message.info({
content: e.name + '开发中...' content: e.name + '开发中...'

frontend/src/pages/Economics/index.jsx → frontend/src/pages/GeneralView/index.jsx

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

@ -27,10 +27,10 @@
position: absolute; position: absolute;
left: 0; left: 0;
right: 0; right: 0;
top: 16px;
top: 9px;
margin: auto; margin: auto;
font-weight: bold; font-weight: bold;
font-size: 26px;
font-size: 36px;
letter-spacing: 4px; letter-spacing: 4px;
color: transparent; color: transparent;

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

@ -44,7 +44,7 @@ export default function Home() {
{ {
type: 1, type: 1,
url: '/home/DataAnalysis', url: '/home/DataAnalysis',
name: '数据分析',
name: '智析中心',
icon: icon1, icon: icon1,
}, },
{ {
@ -56,19 +56,19 @@ export default function Home() {
{ {
type: 1, type: 1,
url: '/home/ReportGeneration', url: '/home/ReportGeneration',
name: '报告生成',
name: '智汇报告',
icon: icon2, icon: icon2,
}, },
{ {
type: 2, type: 2,
url: '', url: '',
name: '文件上传',
name: '智策融汇',
icon: icon6, icon: icon6,
}, },
{ {
type: 1, type: 1,
url: '/home/PolicyLibrary', url: '/home/PolicyLibrary',
name: '政策库',
name: '政策库',
icon: icon5, icon: icon5,
}, },
{ {
@ -121,7 +121,7 @@ export default function Home() {
</video> </video>
<div className="cen_box"> <div className="cen_box">
<div className="head"> <div className="head">
<div className="head1_1">阿拉善盟AI行政数据分析与决策参考系统</div>
<div className="head1_1">阿拉善盟AI智策中枢</div>
<img src={headImg} alt="" /> <img src={headImg} alt="" />
<div className="head2"> <div className="head2">
<div>{time}</div> <div>{time}</div>

30
frontend/src/pages/Industry/index.jsx

@ -1,30 +0,0 @@
import React, { useEffect, useState, useRef } from 'react';
function Industry() {
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="http://ds1.chenhaitech.com/chat/qcAjlNGBDeqI168Z" className='w-[100%] h-screen'/>;
</div>
)
}
export default Industry;

30
frontend/src/pages/Report/index.jsx

@ -1,30 +0,0 @@
import React, { useEffect, useState, useRef } from 'react';
function Report() {
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="http://ds1.chenhaitech.com/chat/9miqAsKQCQjCOATH" className='w-[100%] h-screen'/>;
</div>
)
}
export default Report;

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

@ -19,7 +19,8 @@ function IframeComponent() {
name: '报告生成', name: '报告生成',
text: '根据分析结果和用户需求,自动生成各类报告,并支持多种输出格式。', text: '根据分析结果和用户需求,自动生成各类报告,并支持多种输出格式。',
img: tu17, img: tu17,
url: '/home/Report'
url: '/home/GeneralView',
address: 'http://ds1.chenhaitech.com/chat/9miqAsKQCQjCOATH'
}, },
{ {
name: '报告模板', name: '报告模板',
@ -45,15 +46,15 @@ function IframeComponent() {
const bindUrl = (e) => { const bindUrl = (e) => {
if (e.url) { if (e.url) {
navigate(e.url)
navigate(e.url,{state:{address:e.address}})
} else { } else {
message.info({
content: e.name + '开发中...'
})
message.info({
content: e.name + '开发中...'
})
} }
}
}
const bindUrl1 = () =>{
const bindUrl1 = () => {
window.location = '/' window.location = '/'
} }

30
frontend/src/pages/Talents/index.jsx

@ -1,30 +0,0 @@
import React, { useEffect, useState, useRef } from 'react';
function Talents() {
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="http://ds1.chenhaitech.com/chat/3hcCJ8mzo1s1v6yy" className='w-[100%] h-screen'/>;
</div>
)
}
export default Talents;

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

@ -9,14 +9,14 @@ import tu14 from '../DataAnalysis/img/14.png'
import tu15 from '../DataAnalysis/img/15.png' import tu15 from '../DataAnalysis/img/15.png'
function Tendency() { function Tendency() {
const [renderKey, setRenderKey] = useState();
const navigate = useNavigate(); const navigate = useNavigate();
const list = [ const list = [
{ {
name: '趋势预测', name: '趋势预测',
text: '利用机器学习算法对历史数据进行分析,预测未来一段时间内的数据变化趋势,如经济发展、人口流动、环境状况等。', text: '利用机器学习算法对历史数据进行分析,预测未来一段时间内的数据变化趋势,如经济发展、人口流动、环境状况等。',
img: tu13, img: tu13,
url: '/home/TrendPrediction'
url: '/home/GeneralView',
address: 'http://ds1.chenhaitech.com/chat/TBbQM3inivFUO1yT'
}, },
{ {
name: '异常监测', name: '异常监测',
@ -36,13 +36,13 @@ function Tendency() {
const bindUrl = (e) => { const bindUrl = (e) => {
if (e.url) { if (e.url) {
navigate(e.url)
navigate(e.url, { state: { address: e.address } })
} else { } else {
message.info({
content: e.name + '开发中...'
})
message.info({
content: e.name + '开发中...'
})
} }
}
}
const bindUrl1 = () => { const bindUrl1 = () => {
window.location = '/' window.location = '/'

30
frontend/src/pages/TrendPrediction/index.jsx

@ -1,30 +0,0 @@
import React, { useEffect, useState, useRef } from 'react';
function TrendPrediction() {
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="http://ds1.chenhaitech.com/chat/TBbQM3inivFUO1yT" className='w-[100%] h-screen'/>;
</div>
)
}
export default TrendPrediction;

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

@ -1,30 +0,0 @@
import React, { useEffect, useState, useRef } from 'react';
function Yuqingfenxi() {
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="http://ds1.chenhaitech.com/chat/8HbpWwY8Y6TtGD0v" className='w-[100%] h-screen'/>;
</div>
)
}
export default Yuqingfenxi;

21
frontend/src/utils/paths.js

@ -17,30 +17,15 @@ export default {
Tendency: () => { Tendency: () => {
return "/home/Tendency"; return "/home/Tendency";
}, },
Yuqingfenxi: () => {
return "/home/Yuqingfenxi";
},
Economics: () => {
return "/home/Economics";
},
TrendPrediction: () => {
return "/home/TrendPrediction";
},
Industry: () => {
return "/home/Industry";
},
Talents: () => {
return "/home/Talents";
},
DataAnalysis: () => { DataAnalysis: () => {
return "/home/DataAnalysis"; return "/home/DataAnalysis";
}, },
ReportGeneration:() =>{ ReportGeneration:() =>{
return "/home/ReportGeneration"; return "/home/ReportGeneration";
}, },
Report:() =>{
return "/home/Report";
}
GeneralView:() =>{
return "/home/GeneralView";
},
}, },
onboarding: { onboarding: {
home: () => { home: () => {

Loading…
Cancel
Save