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} > <> - +