diff --git a/package-lock.json b/package-lock.json
index 36d6c1d..3baf165 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -71,6 +71,7 @@
"react-app-polyfill": "^3.0.0",
"react-dev-utils": "^12.0.1",
"react-dom": "^18.2.0",
+ "react-player": "^2.16.0",
"react-refresh": "^0.11.0",
"react-router": "^6.4.2",
"react-router-dom": "^6.4.2",
@@ -15903,6 +15904,11 @@
"resolved": "https://registry.npmmirror.com/lines-and-columns/-/lines-and-columns-1.2.4.tgz",
"integrity": "sha512-7ylylesZQ/PV29jhEDl3Ufjo6ZX7gCqJr5F7PKrqc93v7fzSymt1BpwEU8nAUXs8qzzvqhbjhK5QZg6Mt/HkBg=="
},
+ "node_modules/load-script": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmmirror.com/load-script/-/load-script-1.0.0.tgz",
+ "integrity": "sha512-kPEjMFtZvwL9TaZo0uZ2ml+Ye9HUMmPwbYRJ324qF9tqMejwykJ5ggTyvzmrbBeapCAbk98BSbTeovHEEP1uCA=="
+ },
"node_modules/loader-runner": {
"version": "4.3.0",
"resolved": "https://registry.npmmirror.com/loader-runner/-/loader-runner-4.3.0.tgz",
@@ -16173,6 +16179,11 @@
"node": ">= 4.0.0"
}
},
+ "node_modules/memoize-one": {
+ "version": "5.2.1",
+ "resolved": "https://registry.npmmirror.com/memoize-one/-/memoize-one-5.2.1.tgz",
+ "integrity": "sha512-zYiwtZUcYyXKo/np96AGZAckk+FWWsUdJ3cHGGmld7+AhvcWmQyGCYUh1hc4Q/pkOhb65dQR/pqCyK0cOaHz4Q=="
+ },
"node_modules/memory-fs": {
"version": "0.4.1",
"resolved": "https://registry.npmmirror.com/memory-fs/-/memory-fs-0.4.1.tgz",
@@ -20268,11 +20279,31 @@
"resolved": "https://registry.npmmirror.com/react-error-overlay/-/react-error-overlay-6.0.11.tgz",
"integrity": "sha512-/6UZ2qgEyH2aqzYZgQPxEnz33NJ2gNsnHA2o5+o4wW9bLM/JYQitNP9xPhsXwC08hMMovfGe/8retsdDsczPRg=="
},
+ "node_modules/react-fast-compare": {
+ "version": "3.2.2",
+ "resolved": "https://registry.npmmirror.com/react-fast-compare/-/react-fast-compare-3.2.2.tgz",
+ "integrity": "sha512-nsO+KSNgo1SbJqJEYRE9ERzo7YtYbou/OqjSQKxV7jcKox7+usiUVZOAC+XnDOABXggQTno0Y1CpVnuWEc1boQ=="
+ },
"node_modules/react-is": {
"version": "17.0.2",
"resolved": "https://registry.npmmirror.com/react-is/-/react-is-17.0.2.tgz",
"integrity": "sha512-w2GsyukL62IJnlaff/nRegPQR94C/XXamvMWmSHRJ4y7Ts/4ocGRmTHvOs8PSE6pB3dWOrD/nueuU5sduBsQ4w=="
},
+ "node_modules/react-player": {
+ "version": "2.16.0",
+ "resolved": "https://registry.npmmirror.com/react-player/-/react-player-2.16.0.tgz",
+ "integrity": "sha512-mAIPHfioD7yxO0GNYVFD1303QFtI3lyyQZLY229UEAp/a10cSW+hPcakg0Keq8uWJxT2OiT/4Gt+Lc9bD6bJmQ==",
+ "dependencies": {
+ "deepmerge": "^4.0.0",
+ "load-script": "^1.0.0",
+ "memoize-one": "^5.1.1",
+ "prop-types": "^15.7.2",
+ "react-fast-compare": "^3.0.1"
+ },
+ "peerDependencies": {
+ "react": ">=16.6.0"
+ }
+ },
"node_modules/react-refresh": {
"version": "0.11.0",
"resolved": "https://registry.npmmirror.com/react-refresh/-/react-refresh-0.11.0.tgz",
@@ -45134,6 +45165,11 @@
"resolved": "https://registry.npmmirror.com/lines-and-columns/-/lines-and-columns-1.2.4.tgz",
"integrity": "sha512-7ylylesZQ/PV29jhEDl3Ufjo6ZX7gCqJr5F7PKrqc93v7fzSymt1BpwEU8nAUXs8qzzvqhbjhK5QZg6Mt/HkBg=="
},
+ "load-script": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmmirror.com/load-script/-/load-script-1.0.0.tgz",
+ "integrity": "sha512-kPEjMFtZvwL9TaZo0uZ2ml+Ye9HUMmPwbYRJ324qF9tqMejwykJ5ggTyvzmrbBeapCAbk98BSbTeovHEEP1uCA=="
+ },
"loader-runner": {
"version": "4.3.0",
"resolved": "https://registry.npmmirror.com/loader-runner/-/loader-runner-4.3.0.tgz",
@@ -45363,6 +45399,11 @@
"fs-monkey": "^1.0.4"
}
},
+ "memoize-one": {
+ "version": "5.2.1",
+ "resolved": "https://registry.npmmirror.com/memoize-one/-/memoize-one-5.2.1.tgz",
+ "integrity": "sha512-zYiwtZUcYyXKo/np96AGZAckk+FWWsUdJ3cHGGmld7+AhvcWmQyGCYUh1hc4Q/pkOhb65dQR/pqCyK0cOaHz4Q=="
+ },
"memory-fs": {
"version": "0.4.1",
"resolved": "https://registry.npmmirror.com/memory-fs/-/memory-fs-0.4.1.tgz",
@@ -48183,11 +48224,28 @@
"resolved": "https://registry.npmmirror.com/react-error-overlay/-/react-error-overlay-6.0.11.tgz",
"integrity": "sha512-/6UZ2qgEyH2aqzYZgQPxEnz33NJ2gNsnHA2o5+o4wW9bLM/JYQitNP9xPhsXwC08hMMovfGe/8retsdDsczPRg=="
},
+ "react-fast-compare": {
+ "version": "3.2.2",
+ "resolved": "https://registry.npmmirror.com/react-fast-compare/-/react-fast-compare-3.2.2.tgz",
+ "integrity": "sha512-nsO+KSNgo1SbJqJEYRE9ERzo7YtYbou/OqjSQKxV7jcKox7+usiUVZOAC+XnDOABXggQTno0Y1CpVnuWEc1boQ=="
+ },
"react-is": {
"version": "17.0.2",
"resolved": "https://registry.npmmirror.com/react-is/-/react-is-17.0.2.tgz",
"integrity": "sha512-w2GsyukL62IJnlaff/nRegPQR94C/XXamvMWmSHRJ4y7Ts/4ocGRmTHvOs8PSE6pB3dWOrD/nueuU5sduBsQ4w=="
},
+ "react-player": {
+ "version": "2.16.0",
+ "resolved": "https://registry.npmmirror.com/react-player/-/react-player-2.16.0.tgz",
+ "integrity": "sha512-mAIPHfioD7yxO0GNYVFD1303QFtI3lyyQZLY229UEAp/a10cSW+hPcakg0Keq8uWJxT2OiT/4Gt+Lc9bD6bJmQ==",
+ "requires": {
+ "deepmerge": "^4.0.0",
+ "load-script": "^1.0.0",
+ "memoize-one": "^5.1.1",
+ "prop-types": "^15.7.2",
+ "react-fast-compare": "^3.0.1"
+ }
+ },
"react-refresh": {
"version": "0.11.0",
"resolved": "https://registry.npmmirror.com/react-refresh/-/react-refresh-0.11.0.tgz",
diff --git a/package.json b/package.json
index 0face37..e14b8cc 100644
--- a/package.json
+++ b/package.json
@@ -66,6 +66,7 @@
"react-app-polyfill": "^3.0.0",
"react-dev-utils": "^12.0.1",
"react-dom": "^18.2.0",
+ "react-player": "^2.16.0",
"react-refresh": "^0.11.0",
"react-router": "^6.4.2",
"react-router-dom": "^6.4.2",
diff --git a/src/components/map/MapComponent.tsx b/src/components/map/MapComponent.tsx
index def0fc8..602ed81 100644
--- a/src/components/map/MapComponent.tsx
+++ b/src/components/map/MapComponent.tsx
@@ -16,7 +16,7 @@ export default function MapContainer() {
const Amap = await AMapLoader.load({
key: "d58999d072ed7e5897d3900a769cfda0", // 申请好的Web端开发者Key,首次调用 load 时必填
version: "2.0", // 指定要加载的 JSAPI 的版本,缺省时默认为 1.4.15
- plugins: ["AMap.Scale","AMap.MoveAnimation"],
+ plugins: ["AMap.Scale","AMap.MoveAnimation","AMap.Weather"],
});
amap = new Amap.Map("container", {
@@ -30,9 +30,10 @@ export default function MapContainer() {
// addMaket(Amap,amap);
MapUtl.loadMap = Amap;
MapUtl.amap = amap;
+ var weather = new Amap.Weather();
+ MapUtl.wecherInfo = weather
amap.setFitView();
};
-
return
;
}
diff --git a/src/components/map/MapFrom.tsx b/src/components/map/MapFrom.tsx
index e21feda..bbebf75 100644
--- a/src/components/map/MapFrom.tsx
+++ b/src/components/map/MapFrom.tsx
@@ -47,6 +47,7 @@ export default function MapFrom(props:any) {
});
mouseTool.marker();
});
+
setmaps(Amap);
};
diff --git a/src/components/map/mapUtil.ts b/src/components/map/mapUtil.ts
index 205ba39..cc19c38 100644
--- a/src/components/map/mapUtil.ts
+++ b/src/components/map/mapUtil.ts
@@ -2,6 +2,7 @@ class MapUtl {
static makerList: any[] = [];
static amap: any = null;
static loadMap: any = null;
+ static wecherInfo: any = null;
static addMaker(data: any) {
const { lng, lat, title, users } = data;
@@ -61,12 +62,14 @@ class MapUtl {
});
MapUtl.amap.setFitView();
marker.moveAlong(lineArr, {
- // 每一段的时长
duration: 500,//可根据实际采集时间间隔设置
- // JSAPI2.0 是否延道路自动设置角度在 moveAlong 里设置
autoRotation: true,
});
}
+
+ static getWecher(){
+
+ }
}
export default MapUtl;
\ No newline at end of file
diff --git a/src/pages/OrgChart.tsx b/src/pages/OrgChart.tsx
index 49a6f19..a0cb0e3 100644
--- a/src/pages/OrgChart.tsx
+++ b/src/pages/OrgChart.tsx
@@ -84,7 +84,7 @@ const OrgChartSelf = (props: Store) => {
backgroundColor: "#fff",
}}
width={50}
- // src="https://img1.baidu.com/it/u=1746619441,3368766734&fm=253&fmt=auto&app=138&f=JPEG?w=400&h=400"
+ src="https://pic.aigexing.net/uploads/5/1253/3721116011/92968290915/8785297.jpg"
alt=""
/>
{v1.user_name}
@@ -103,7 +103,7 @@ const OrgChartSelf = (props: Store) => {
backgroundColor: "#fff",
}}
width={50}
- // src="https://img1.baidu.com/it/u=1746619441,3368766734&fm=253&fmt=auto&app=138&f=JPEG?w=400&h=400"
+ src="https://pic.aigexing.net/uploads/5/1253/3721116011/92968290915/8785297.jpg"
alt=""
/>
{v1.user_name}
@@ -140,7 +140,7 @@ const OrgChartSelf = (props: Store) => {
backgroundColor: "#fff",
}}
width={50}
- // src="https://img1.baidu.com/it/u=1746619441,3368766734&fm=253&fmt=auto&app=138&f=JPEG?w=400&h=400"
+ src="https://pic.aigexing.net/uploads/5/1253/3721116011/92968290915/8785297.jpg"
alt=""
/>
{v1.user_name}
diff --git a/src/pages/dep/index.tsx b/src/pages/dep/index.tsx
index e4e1335..ffccaf7 100644
--- a/src/pages/dep/index.tsx
+++ b/src/pages/dep/index.tsx
@@ -16,7 +16,6 @@ const Dep = (props: Store) => {
const formRef = React.useRef(null);
const [record, setRecord] = useState(null);
const [tagId, setId] = useState(null);
- const [stoList, setStolist] = useState([]);
const columns: ColumnsType = [
{ title: "部门名称", dataIndex: "dep_name" },
{ title: "部门描述", dataIndex: "remark" },
@@ -51,7 +50,6 @@ const Dep = (props: Store) => {
},
];
const edit = (record) => {
-
let data = {
...record,
head_img: [{ url: record.head_img }],
@@ -71,9 +69,7 @@ const Dep = (props: Store) => {
setIsModalOpen(false);
};
useEffect(() => {
- depStore.getlist().then(() => {
- setStolist(depStore.list);
- });
+ depStore.getlist();
}, [depStore]);
const defaultConfig = [
{
@@ -132,7 +128,7 @@ const Dep = (props: Store) => {
open={isModalOpen}
afterClose={() => formRef.current?.resetFields()}
onOk={() => formRef.current?.submit()}
- okText="确定"
+ okText="确定"
cancelText="取消"
onCancel={() => {
setId(null);
@@ -153,13 +149,9 @@ const Dep = (props: Store) => {
onFinishFailed={onFinishFailed}
>
<>
-
+
- {
);
};
-export default inject("emergencyStore")(observer(Emergency));
+export default inject("emergencyStore", "trainingStore")(observer(Emergency));
diff --git a/src/pages/home/home.less b/src/pages/home/home.less
index f609a9c..90491da 100644
--- a/src/pages/home/home.less
+++ b/src/pages/home/home.less
@@ -27,7 +27,7 @@
display: inline-block;
animation: scrollText 10s linear infinite; /* 动画 */
}
- :hover >span{
+ :hover > span {
animation-play-state: paused;
}
}
@@ -56,7 +56,7 @@
width: 20px;
height: 20px;
}
- .on_to{
+ .on_to {
transform: rotate(-180deg) rotateY(0deg);
}
.twp {
@@ -91,10 +91,11 @@
}
}
-
-
.map_container_t_r {
flex: 1;
+ display: flex;
+ align-items: center;
+ justify-content: space-between;
text-align: right;
padding-right: 10px;
}
@@ -148,3 +149,12 @@
}
}
}
+
+.map_video_container {
+ position: absolute;
+ width: 200px;
+ height: 400px;
+ top: 40px;
+ z-index: 9;
+ right: 288px;
+}
diff --git a/src/pages/home/home.tsx b/src/pages/home/home.tsx
index 0b88e9e..775ee1e 100644
--- a/src/pages/home/home.tsx
+++ b/src/pages/home/home.tsx
@@ -8,9 +8,13 @@ import image2 from "@/static/title_line@1x.png";
import { SettingOutlined } from "@ant-design/icons";
import { useNavigate } from "react-router";
import { useEffect, useState } from "react";
+import MapUtl from "@/components/map/mapUtil";
+import ReactPlayer from "react-player";
+
const Home = observer(() => {
const navigate = useNavigate();
const [times, setTimes] = useState();
+ const [wechaer, setWechaer] = useState();
const updateTime = () => {
const date = new Date();
const month = (date.getMonth() + 1).toString().padStart(2, "0");
@@ -26,6 +30,11 @@ const Home = observer(() => {
// 每秒钟更新一次时间
useEffect(() => {
let tim = setInterval(updateTime, 1000);
+ setTimeout(() => {
+ MapUtl.wecherInfo?.getLive("双流区", (err, data) => {
+ setWechaer(data);
+ });
+ }, 2000);
return () => {
clearInterval(tim);
};
@@ -42,6 +51,20 @@ const Home = observer(() => {
+
+
天气:{wechaer?.weather}
+
风向:{wechaer?.windDirection}
+
风级:{wechaer?.windPower}
+
湿度:{wechaer?.humidity}
+
{
navigate("admin/user");
@@ -63,6 +86,16 @@ const Home = observer(() => {
+
+ {/* */}
+
diff --git a/src/pages/home/homeLeft/home_left.tsx b/src/pages/home/homeLeft/home_left.tsx
index 41878d7..ca878cf 100644
--- a/src/pages/home/homeLeft/home_left.tsx
+++ b/src/pages/home/homeLeft/home_left.tsx
@@ -3,8 +3,6 @@ import Orgin from "./orgin";
import Pover from "./pover";
import Turn from './turn';
const HomeLeft = () => {
-
-
// const openDispatch = () => {
// 位置移动
// MapUtl.makerList[0].setPosition([103.55, 30.342]);
diff --git a/src/pages/home/homeLeft/turn.tsx b/src/pages/home/homeLeft/turn.tsx
index 982c24a..b669a39 100644
--- a/src/pages/home/homeLeft/turn.tsx
+++ b/src/pages/home/homeLeft/turn.tsx
@@ -73,6 +73,7 @@ const Turn = (props: Store) => {
{trainingStore.list?.map((item) => {
return (
{
type="dashed"
size="small"
onClick={() => {
- trainingStore.back(record?.identity);
+ trainingStore.back(record?.identity,2);
}}
>
物资归还
diff --git a/src/pages/user/user.tsx b/src/pages/user/user.tsx
index 216d1fa..e5d8d55 100644
--- a/src/pages/user/user.tsx
+++ b/src/pages/user/user.tsx
@@ -8,6 +8,7 @@ import React from "react";
import { columns, defaultConfig } from "./user_config";
import "./user.less";
import Move from "./move";
+import dayjs from "dayjs";
const { Option } = Select;
const User = (props: Store) => {
@@ -24,15 +25,16 @@ const User = (props: Store) => {
const edit = (record) => {
record = {
...record,
+ vet_in_time: dayjs(record.vet_in_time),
+ vet_out_time: dayjs(record.vet_out_time),
imageUrl: [{ url: record.imageUrl }],
};
setProjectConfig(defaultConfig(team, per));
setIsModalOpen(true);
- formRef.current?.setFieldsValue(record);
setRecord(record);
setId(record.id);
};
- const onFinish = (values: any) => {
+ const onFinish = async (values: any) => {
let data = {
...values,
};
@@ -42,10 +44,17 @@ const User = (props: Store) => {
data.head_img = "";
}
if (!userId) {
- usrStore.add(data);
+ let res = await usrStore.add(data);
+ console.log(res);
+ if (res) {
+ setIsModalOpen(false);
+ }
} else {
+ let res = await usrStore.putItem(userId, data);
+ if (res) {
+ setIsModalOpen(false);
+ }
}
- setIsModalOpen(false);
};
useEffect(() => {
usrStore.getlist();
@@ -74,6 +83,7 @@ const User = (props: Store) => {
const addHandler = () => {
setProjectConfig(defaultConfig(team, per));
setId(null);
+ setRecord(null)
setIsModalOpen(true);
};
const onFinishFailed = () => {};
@@ -104,7 +114,6 @@ const User = (props: Store) => {
编辑
-