fix(amap):core
This commit is contained in:
parent
28201296f1
commit
9248a85e34
|
@ -19,7 +19,7 @@ import React from "react";
|
|||
import baseHttp from "@/service/base";
|
||||
import MinusCircleOutlined from "@ant-design/icons/lib/icons/MinusCircleOutlined";
|
||||
import { EmConfig } from "./em_column";
|
||||
|
||||
import TaskArchives from "../training/task_archives";
|
||||
const Emergency = (props: Store) => {
|
||||
const { emergencyStore } = props;
|
||||
const [isModalOpen, setIsModalOpen] = useState<boolean>(false);
|
||||
|
@ -79,6 +79,7 @@ const Emergency = (props: Store) => {
|
|||
>
|
||||
删除
|
||||
</Button>
|
||||
<TaskArchives taskId={record?.identity} category_identity={record.archives_category_identity}/>
|
||||
</Space>
|
||||
),
|
||||
},
|
||||
|
|
|
@ -11,6 +11,27 @@
|
|||
height: 100%;
|
||||
overflow: hidden;
|
||||
position: relative;
|
||||
.scr {
|
||||
position: absolute;
|
||||
top: 60px;
|
||||
z-index: 9;
|
||||
left: 0;
|
||||
right: 0;
|
||||
overflow: hidden;
|
||||
.scrolling-text {
|
||||
white-space: nowrap;
|
||||
display: block;
|
||||
animation: scroll 10s linear infinite;
|
||||
color: #fff;
|
||||
> span {
|
||||
display: inline-block;
|
||||
animation: scrollText 10s linear infinite; /* 动画 */
|
||||
}
|
||||
:hover >span{
|
||||
animation-play-state: paused;
|
||||
}
|
||||
}
|
||||
}
|
||||
.map_container_t {
|
||||
position: absolute;
|
||||
height: 60px;
|
||||
|
@ -25,17 +46,20 @@
|
|||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
.map_container_t_l {
|
||||
.map_container_t_c {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
flex: 1;
|
||||
justify-content: center;
|
||||
flex: 2;
|
||||
.title_img {
|
||||
margin-left: 10px;
|
||||
width: 20px;
|
||||
height: 20px;
|
||||
}
|
||||
.on_to{
|
||||
transform: rotate(-180deg) rotateY(0deg);
|
||||
}
|
||||
.twp {
|
||||
width: 160px;
|
||||
height: 30px;
|
||||
}
|
||||
> span {
|
||||
|
@ -51,25 +75,24 @@
|
|||
text-shadow: 0px 0px 10px #29ecb4;
|
||||
}
|
||||
}
|
||||
|
||||
.scr {
|
||||
.map_container_t_l {
|
||||
flex: 1;
|
||||
overflow: hidden;
|
||||
.scrolling-text {
|
||||
white-space: nowrap;
|
||||
display: block;
|
||||
animation: scroll 10s linear infinite;
|
||||
> span {
|
||||
margin-left: 15px;
|
||||
margin-right: 15px;
|
||||
color: #fff;
|
||||
> span {
|
||||
display: inline-block;
|
||||
animation: scrollText 10s linear infinite; /* 动画 */
|
||||
}
|
||||
:hover >span{
|
||||
animation-play-state: paused;
|
||||
}
|
||||
font-size: 20px;
|
||||
font-weight: normal;
|
||||
line-height: normal;
|
||||
letter-spacing: 0.1em;
|
||||
font-variation-settings: "opsz" auto;
|
||||
color: #ffffff;
|
||||
text-shadow: 0px 0px 10px #29ecb4;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
.map_container_t_r {
|
||||
flex: 1;
|
||||
text-align: right;
|
||||
|
|
|
@ -4,7 +4,6 @@ import MapContainer from "@/components/map/MapComponent";
|
|||
import HomeLeft from "@/pages/home/homeLeft/home_left";
|
||||
import HomeRight from "@/pages/home/homeRigrt/home_right";
|
||||
import HomeBottom from "@/pages/home/homeBottom/home_bottom";
|
||||
import image1 from "@/static/title_jiantou@1x.png";
|
||||
import image2 from "@/static/title_line@1x.png";
|
||||
import { SettingOutlined } from "@ant-design/icons";
|
||||
import { useNavigate } from "react-router";
|
||||
|
@ -14,11 +13,23 @@ const Home = observer(() => {
|
|||
<div className="contents_center">
|
||||
<div className="map_container_t">
|
||||
<div className="map_container_t_l">
|
||||
<img className="title_img" src={image1} alt="" />
|
||||
<span>2024年10月20号 </span>
|
||||
</div>
|
||||
<div className="map_container_t_c">
|
||||
<img className="twp on_to" src={image2} alt="" />
|
||||
<span>黄水镇武装平台</span>
|
||||
<img className="twp" src={image2} alt="" />
|
||||
</div>
|
||||
<div className="scr">
|
||||
<div className="map_container_t_r">
|
||||
<SettingOutlined
|
||||
onClick={() => {
|
||||
navigate("admin/user");
|
||||
}}
|
||||
style={{ fontSize: "20px", color: "#f9f9f9", cursor: "pointer" }}
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
<div className="scr">
|
||||
<div className="scrolling-text">
|
||||
<span>
|
||||
仓库3,2号货架,单兵装备,即将临期,
|
||||
|
@ -27,13 +38,6 @@ const Home = observer(() => {
|
|||
</span>
|
||||
</div>
|
||||
</div>
|
||||
<div className="map_container_t_r">
|
||||
<SettingOutlined
|
||||
onClick={() => {navigate("admin/user");}}
|
||||
style={{ fontSize: "20px", color: "#f9f9f9", cursor: "pointer" }}
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
<div className="map_container_l">
|
||||
<HomeLeft />
|
||||
</div>
|
||||
|
|
|
@ -0,0 +1,42 @@
|
|||
import * as echarts from "echarts";
|
||||
|
||||
export const trunEchatConfig = (data) => {
|
||||
return {
|
||||
xAxis: {
|
||||
type: "category",
|
||||
data: data.map((item) => item.name),
|
||||
axisLabel: {
|
||||
show: true,
|
||||
interval: 0,
|
||||
rotate: 30,
|
||||
},
|
||||
},
|
||||
grid: { top: "10%", bottom: "45%", right: "5%" },
|
||||
yAxis: {
|
||||
type: "value",
|
||||
splitLine: {
|
||||
show: false, // 去除网格线
|
||||
},
|
||||
},
|
||||
series: [
|
||||
{
|
||||
data: data.map((item) => item.count),
|
||||
type: "line",
|
||||
smooth: true,
|
||||
areaStyle: {
|
||||
opacity: 0.1,
|
||||
color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
|
||||
{
|
||||
offset: 0,
|
||||
color: "rgb(128, 255, 165)",
|
||||
},
|
||||
{
|
||||
offset: 1,
|
||||
color: "rgb(1, 191, 236)",
|
||||
},
|
||||
]),
|
||||
},
|
||||
},
|
||||
],
|
||||
};
|
||||
}
|
|
@ -4,59 +4,48 @@ import { inject, observer } from "mobx-react";
|
|||
import { useEffect, useState } from "react";
|
||||
import "./left.less";
|
||||
import { Col, Modal, Row } from "antd";
|
||||
import { trunEchatConfig } from "./trun_chat_config";
|
||||
const Turn = (props: Store) => {
|
||||
const { homeStore } = props;
|
||||
const { homeStore, trainingStore, folderStore } = props;
|
||||
const [isModalOpen, setisModalOpen] = useState(false);
|
||||
const [folderList, setfolderList] = useState<any>([]);
|
||||
const [imageList, setImageList] = useState<any>([]);
|
||||
const [imageUrl, setImageUrl] = useState<any>([]);
|
||||
|
||||
const initChart = (data) => {
|
||||
var myChart = echarts.init(document.getElementById("xunlian"));
|
||||
var option = {
|
||||
xAxis: {
|
||||
type: "category",
|
||||
data: data.map((item) => item.name),
|
||||
axisLabel: {
|
||||
show: true,
|
||||
interval: 0,
|
||||
rotate: 30,
|
||||
},
|
||||
},
|
||||
grid: { top: "10%", bottom: "45%", right: "5%" },
|
||||
yAxis: {
|
||||
type: "value",
|
||||
splitLine: {
|
||||
show: false, // 去除网格线
|
||||
},
|
||||
},
|
||||
series: [
|
||||
{
|
||||
data: data.map((item) => item.count),
|
||||
type: "line",
|
||||
smooth: true,
|
||||
areaStyle: {
|
||||
opacity: 0.1,
|
||||
color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
|
||||
{
|
||||
offset: 0,
|
||||
color: "rgb(128, 255, 165)",
|
||||
},
|
||||
{
|
||||
offset: 1,
|
||||
color: "rgb(1, 191, 236)",
|
||||
},
|
||||
]),
|
||||
},
|
||||
},
|
||||
],
|
||||
};
|
||||
option && myChart.setOption(option);
|
||||
trunEchatConfig(data) && myChart.setOption(trunEchatConfig(data));
|
||||
};
|
||||
|
||||
useEffect(() => {
|
||||
homeStore.getTr().then((res) => {
|
||||
initChart(res.data.record);
|
||||
});
|
||||
}, [homeStore]);
|
||||
|
||||
useEffect(() => {
|
||||
trainingStore.getlist();
|
||||
}, [trainingStore]);
|
||||
const trunHandler = () => {
|
||||
setisModalOpen(true);
|
||||
};
|
||||
const getFolderhandler = (id: string) => {
|
||||
// trainingStore.getlist();
|
||||
folderStore?.getFolderList(id).then((res) => {
|
||||
setfolderList(res?.data?.record ?? []);
|
||||
});
|
||||
};
|
||||
const getAehandler = async (id: string) => {
|
||||
// trainingStore.getlist();
|
||||
await folderStore?.getAlist(id).then(() => {
|
||||
folderStore.alist?.forEach((elem) => {
|
||||
elem.url = elem.file_url;
|
||||
elem.name = elem.file_name;
|
||||
});
|
||||
setImageList(folderStore.alist ?? []);
|
||||
});
|
||||
};
|
||||
|
||||
return (
|
||||
<>
|
||||
<div
|
||||
|
@ -78,27 +67,61 @@ const Turn = (props: Store) => {
|
|||
>
|
||||
<>
|
||||
<Row>
|
||||
<Col flex={2}>
|
||||
{[7, 8, 9, 10, 11].map((item, index) => {
|
||||
return (
|
||||
<div style={{ color: "#fff" ,margin:"10px"}} key={index}>
|
||||
<img
|
||||
height={60}
|
||||
src="https://img0.baidu.com/it/u=2135939479,1633462316&fm=253&fmt=auto&app=138&f=JPEG?w=500&h=500"
|
||||
alt=""
|
||||
/>
|
||||
</div>
|
||||
);
|
||||
})}
|
||||
<Col span={2}>
|
||||
<div style={{ color: "#fff", margin: "10px" }}>
|
||||
<p>任务列表</p>
|
||||
{trainingStore.list?.map((item) => {
|
||||
return (
|
||||
<p
|
||||
style={{ color: "#fff", cursor: "pointer" }}
|
||||
onClick={() => {
|
||||
getFolderhandler(item.archives_category_identity);
|
||||
}}
|
||||
>
|
||||
{item.title}
|
||||
</p>
|
||||
);
|
||||
})}
|
||||
</div>
|
||||
</Col>
|
||||
<Col flex={8}>
|
||||
<div style={{ color: "#fff" }} >
|
||||
<img
|
||||
style={{width:"100%",height:"800px"}}
|
||||
src="https://img0.baidu.com/it/u=2135939479,1633462316&fm=253&fmt=auto&app=138&f=JPEG?w=500&h=500"
|
||||
<Col span={2}>
|
||||
<div style={{ color: "#fff", margin: "10px" }}>
|
||||
<p>文件夹列表</p>
|
||||
{folderList?.map((item) => {
|
||||
return (
|
||||
<p
|
||||
style={{ color: "#fff", cursor: "pointer" }}
|
||||
onClick={() => {
|
||||
getAehandler(item.identity);
|
||||
}}
|
||||
>
|
||||
{item.folder_name}
|
||||
</p>
|
||||
);
|
||||
})}
|
||||
</div>
|
||||
</Col>
|
||||
<Col span={2}>
|
||||
<div style={{ color: "#fff", margin: "10px" }}>
|
||||
<p>档案列表</p>
|
||||
{imageList?.map((item) => {
|
||||
return (
|
||||
<img
|
||||
onClick={()=>{
|
||||
setImageUrl(item.file_url)
|
||||
}}
|
||||
style={{ width: "80px", height: "80px" }}
|
||||
src={item.file_url}
|
||||
alt=""
|
||||
/>
|
||||
</div>
|
||||
);
|
||||
})}
|
||||
</div>
|
||||
</Col>
|
||||
<Col span={18}>
|
||||
<div style={{ color: "#fff" }}>
|
||||
<img style={{ width: "100%", height: "800px" }} src={imageUrl} alt="" />
|
||||
</div>
|
||||
</Col>
|
||||
</Row>
|
||||
</>
|
||||
|
@ -107,4 +130,8 @@ const Turn = (props: Store) => {
|
|||
);
|
||||
};
|
||||
|
||||
export default inject("homeStore")(observer(Turn));
|
||||
export default inject(
|
||||
"homeStore",
|
||||
"trainingStore",
|
||||
"folderStore"
|
||||
)(observer(Turn));
|
||||
|
|
|
@ -81,16 +81,6 @@ const Trainings = (props: Store) => {
|
|||
训练人员管理
|
||||
</Button>
|
||||
<TaskArchives taskId={record?.identity} category_identity={record.archives_category_identity}/>
|
||||
{/* <Button
|
||||
type="dashed"
|
||||
size="small"
|
||||
onClick={() => {
|
||||
trainingStore.id = record?.identity;
|
||||
setIsModalOpenUser(true);
|
||||
}}
|
||||
>
|
||||
档案上传
|
||||
</Button> */}
|
||||
<Button
|
||||
type="dashed"
|
||||
size="small"
|
||||
|
@ -132,7 +122,6 @@ const Trainings = (props: Store) => {
|
|||
};
|
||||
useEffect(() => {
|
||||
trainingStore.getlist();
|
||||
|
||||
}, [trainingStore]);
|
||||
useEffect(() => {
|
||||
trainingCatStore.getlist().then(() => {
|
||||
|
|
Loading…
Reference in New Issue