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 baseHttp from "@/service/base";
|
||||||
import MinusCircleOutlined from "@ant-design/icons/lib/icons/MinusCircleOutlined";
|
import MinusCircleOutlined from "@ant-design/icons/lib/icons/MinusCircleOutlined";
|
||||||
import { EmConfig } from "./em_column";
|
import { EmConfig } from "./em_column";
|
||||||
|
import TaskArchives from "../training/task_archives";
|
||||||
const Emergency = (props: Store) => {
|
const Emergency = (props: Store) => {
|
||||||
const { emergencyStore } = props;
|
const { emergencyStore } = props;
|
||||||
const [isModalOpen, setIsModalOpen] = useState<boolean>(false);
|
const [isModalOpen, setIsModalOpen] = useState<boolean>(false);
|
||||||
|
@ -79,6 +79,7 @@ const Emergency = (props: Store) => {
|
||||||
>
|
>
|
||||||
删除
|
删除
|
||||||
</Button>
|
</Button>
|
||||||
|
<TaskArchives taskId={record?.identity} category_identity={record.archives_category_identity}/>
|
||||||
</Space>
|
</Space>
|
||||||
),
|
),
|
||||||
},
|
},
|
||||||
|
|
|
@ -11,6 +11,27 @@
|
||||||
height: 100%;
|
height: 100%;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
position: relative;
|
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 {
|
.map_container_t {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
height: 60px;
|
height: 60px;
|
||||||
|
@ -25,17 +46,20 @@
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
.map_container_t_l {
|
.map_container_t_c {
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
flex: 1;
|
justify-content: center;
|
||||||
|
flex: 2;
|
||||||
.title_img {
|
.title_img {
|
||||||
margin-left: 10px;
|
margin-left: 10px;
|
||||||
width: 20px;
|
width: 20px;
|
||||||
height: 20px;
|
height: 20px;
|
||||||
}
|
}
|
||||||
|
.on_to{
|
||||||
|
transform: rotate(-180deg) rotateY(0deg);
|
||||||
|
}
|
||||||
.twp {
|
.twp {
|
||||||
width: 160px;
|
|
||||||
height: 30px;
|
height: 30px;
|
||||||
}
|
}
|
||||||
> span {
|
> span {
|
||||||
|
@ -51,25 +75,24 @@
|
||||||
text-shadow: 0px 0px 10px #29ecb4;
|
text-shadow: 0px 0px 10px #29ecb4;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
.map_container_t_l {
|
||||||
.scr {
|
|
||||||
flex: 1;
|
flex: 1;
|
||||||
overflow: hidden;
|
> span {
|
||||||
.scrolling-text {
|
margin-left: 15px;
|
||||||
white-space: nowrap;
|
margin-right: 15px;
|
||||||
display: block;
|
|
||||||
animation: scroll 10s linear infinite;
|
|
||||||
color: #fff;
|
color: #fff;
|
||||||
> span {
|
font-size: 20px;
|
||||||
display: inline-block;
|
font-weight: normal;
|
||||||
animation: scrollText 10s linear infinite; /* 动画 */
|
line-height: normal;
|
||||||
}
|
letter-spacing: 0.1em;
|
||||||
:hover >span{
|
font-variation-settings: "opsz" auto;
|
||||||
animation-play-state: paused;
|
color: #ffffff;
|
||||||
}
|
text-shadow: 0px 0px 10px #29ecb4;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
.map_container_t_r {
|
.map_container_t_r {
|
||||||
flex: 1;
|
flex: 1;
|
||||||
text-align: right;
|
text-align: right;
|
||||||
|
|
|
@ -4,7 +4,6 @@ import MapContainer from "@/components/map/MapComponent";
|
||||||
import HomeLeft from "@/pages/home/homeLeft/home_left";
|
import HomeLeft from "@/pages/home/homeLeft/home_left";
|
||||||
import HomeRight from "@/pages/home/homeRigrt/home_right";
|
import HomeRight from "@/pages/home/homeRigrt/home_right";
|
||||||
import HomeBottom from "@/pages/home/homeBottom/home_bottom";
|
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 image2 from "@/static/title_line@1x.png";
|
||||||
import { SettingOutlined } from "@ant-design/icons";
|
import { SettingOutlined } from "@ant-design/icons";
|
||||||
import { useNavigate } from "react-router";
|
import { useNavigate } from "react-router";
|
||||||
|
@ -14,11 +13,23 @@ const Home = observer(() => {
|
||||||
<div className="contents_center">
|
<div className="contents_center">
|
||||||
<div className="map_container_t">
|
<div className="map_container_t">
|
||||||
<div className="map_container_t_l">
|
<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>
|
<span>黄水镇武装平台</span>
|
||||||
<img className="twp" src={image2} alt="" />
|
<img className="twp" src={image2} alt="" />
|
||||||
</div>
|
</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">
|
<div className="scrolling-text">
|
||||||
<span>
|
<span>
|
||||||
仓库3,2号货架,单兵装备,即将临期,
|
仓库3,2号货架,单兵装备,即将临期,
|
||||||
|
@ -27,13 +38,6 @@ const Home = observer(() => {
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
</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">
|
<div className="map_container_l">
|
||||||
<HomeLeft />
|
<HomeLeft />
|
||||||
</div>
|
</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 { useEffect, useState } from "react";
|
||||||
import "./left.less";
|
import "./left.less";
|
||||||
import { Col, Modal, Row } from "antd";
|
import { Col, Modal, Row } from "antd";
|
||||||
|
import { trunEchatConfig } from "./trun_chat_config";
|
||||||
const Turn = (props: Store) => {
|
const Turn = (props: Store) => {
|
||||||
const { homeStore } = props;
|
const { homeStore, trainingStore, folderStore } = props;
|
||||||
const [isModalOpen, setisModalOpen] = useState(false);
|
const [isModalOpen, setisModalOpen] = useState(false);
|
||||||
|
const [folderList, setfolderList] = useState<any>([]);
|
||||||
|
const [imageList, setImageList] = useState<any>([]);
|
||||||
|
const [imageUrl, setImageUrl] = useState<any>([]);
|
||||||
|
|
||||||
const initChart = (data) => {
|
const initChart = (data) => {
|
||||||
var myChart = echarts.init(document.getElementById("xunlian"));
|
var myChart = echarts.init(document.getElementById("xunlian"));
|
||||||
var option = {
|
trunEchatConfig(data) && myChart.setOption(trunEchatConfig(data));
|
||||||
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);
|
|
||||||
};
|
};
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
homeStore.getTr().then((res) => {
|
homeStore.getTr().then((res) => {
|
||||||
initChart(res.data.record);
|
initChart(res.data.record);
|
||||||
});
|
});
|
||||||
}, [homeStore]);
|
}, [homeStore]);
|
||||||
|
|
||||||
|
useEffect(() => {
|
||||||
|
trainingStore.getlist();
|
||||||
|
}, [trainingStore]);
|
||||||
const trunHandler = () => {
|
const trunHandler = () => {
|
||||||
setisModalOpen(true);
|
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 (
|
return (
|
||||||
<>
|
<>
|
||||||
<div
|
<div
|
||||||
|
@ -78,27 +67,61 @@ const Turn = (props: Store) => {
|
||||||
>
|
>
|
||||||
<>
|
<>
|
||||||
<Row>
|
<Row>
|
||||||
<Col flex={2}>
|
<Col span={2}>
|
||||||
{[7, 8, 9, 10, 11].map((item, index) => {
|
<div style={{ color: "#fff", margin: "10px" }}>
|
||||||
return (
|
<p>任务列表</p>
|
||||||
<div style={{ color: "#fff" ,margin:"10px"}} key={index}>
|
{trainingStore.list?.map((item) => {
|
||||||
<img
|
return (
|
||||||
height={60}
|
<p
|
||||||
src="https://img0.baidu.com/it/u=2135939479,1633462316&fm=253&fmt=auto&app=138&f=JPEG?w=500&h=500"
|
style={{ color: "#fff", cursor: "pointer" }}
|
||||||
alt=""
|
onClick={() => {
|
||||||
/>
|
getFolderhandler(item.archives_category_identity);
|
||||||
</div>
|
}}
|
||||||
);
|
>
|
||||||
})}
|
{item.title}
|
||||||
|
</p>
|
||||||
|
);
|
||||||
|
})}
|
||||||
|
</div>
|
||||||
</Col>
|
</Col>
|
||||||
<Col flex={8}>
|
<Col span={2}>
|
||||||
<div style={{ color: "#fff" }} >
|
<div style={{ color: "#fff", margin: "10px" }}>
|
||||||
<img
|
<p>文件夹列表</p>
|
||||||
style={{width:"100%",height:"800px"}}
|
{folderList?.map((item) => {
|
||||||
src="https://img0.baidu.com/it/u=2135939479,1633462316&fm=253&fmt=auto&app=138&f=JPEG?w=500&h=500"
|
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=""
|
alt=""
|
||||||
/>
|
/>
|
||||||
</div>
|
);
|
||||||
|
})}
|
||||||
|
</div>
|
||||||
|
</Col>
|
||||||
|
<Col span={18}>
|
||||||
|
<div style={{ color: "#fff" }}>
|
||||||
|
<img style={{ width: "100%", height: "800px" }} src={imageUrl} alt="" />
|
||||||
|
</div>
|
||||||
</Col>
|
</Col>
|
||||||
</Row>
|
</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>
|
</Button>
|
||||||
<TaskArchives taskId={record?.identity} category_identity={record.archives_category_identity}/>
|
<TaskArchives taskId={record?.identity} category_identity={record.archives_category_identity}/>
|
||||||
{/* <Button
|
|
||||||
type="dashed"
|
|
||||||
size="small"
|
|
||||||
onClick={() => {
|
|
||||||
trainingStore.id = record?.identity;
|
|
||||||
setIsModalOpenUser(true);
|
|
||||||
}}
|
|
||||||
>
|
|
||||||
档案上传
|
|
||||||
</Button> */}
|
|
||||||
<Button
|
<Button
|
||||||
type="dashed"
|
type="dashed"
|
||||||
size="small"
|
size="small"
|
||||||
|
@ -132,7 +122,6 @@ const Trainings = (props: Store) => {
|
||||||
};
|
};
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
trainingStore.getlist();
|
trainingStore.getlist();
|
||||||
|
|
||||||
}, [trainingStore]);
|
}, [trainingStore]);
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
trainingCatStore.getlist().then(() => {
|
trainingCatStore.getlist().then(() => {
|
||||||
|
|
Loading…
Reference in New Issue