fix(amap):core

This commit is contained in:
wang_yp 2024-10-25 00:11:41 +08:00
parent 9b3a268310
commit 622bc2ea8b
21 changed files with 949 additions and 668 deletions

376
package-lock.json generated
View File

@ -86,6 +86,7 @@
"tailwindcss": "^3.0.2", "tailwindcss": "^3.0.2",
"terser-webpack-plugin": "^5.2.5", "terser-webpack-plugin": "^5.2.5",
"typescript": "^4.8.4", "typescript": "^4.8.4",
"video.js": "^8.18.1",
"web-vitals": "^2.1.4", "web-vitals": "^2.1.4",
"webpack": "^5.64.4", "webpack": "^5.64.4",
"webpack-dev-server": "^4.6.0", "webpack-dev-server": "^4.6.0",
@ -5256,6 +5257,67 @@
"@uppy/core": "^2.3.3" "@uppy/core": "^2.3.3"
} }
}, },
"node_modules/@videojs/http-streaming": {
"version": "3.15.0",
"resolved": "https://registry.npmmirror.com/@videojs/http-streaming/-/http-streaming-3.15.0.tgz",
"integrity": "sha512-6rjaqEa87gVFqDFsHaLKXGrDqL3NhNZRNi6wkMw+uyt1lrLD2OFY0SfRQRNl7Vmmx0pt5FRJoRJYlnKsowyElA==",
"dependencies": {
"@babel/runtime": "^7.12.5",
"@videojs/vhs-utils": "^4.1.1",
"aes-decrypter": "^4.0.2",
"global": "^4.4.0",
"m3u8-parser": "^7.2.0",
"mpd-parser": "^1.3.1",
"mux.js": "7.0.3",
"video.js": "^7 || ^8"
},
"engines": {
"node": ">=8",
"npm": ">=5"
},
"peerDependencies": {
"video.js": "^8.19.0"
}
},
"node_modules/@videojs/http-streaming/node_modules/mux.js": {
"version": "7.0.3",
"resolved": "https://registry.npmmirror.com/mux.js/-/mux.js-7.0.3.tgz",
"integrity": "sha512-gzlzJVEGFYPtl2vvEiJneSWAWD4nfYRHD5XgxmB2gWvXraMPOYk+sxfvexmNfjQUFpmk6hwLR5C6iSFmuwCHdQ==",
"dependencies": {
"@babel/runtime": "^7.11.2",
"global": "^4.4.0"
},
"bin": {
"muxjs-transmux": "bin/transmux.js"
},
"engines": {
"node": ">=8",
"npm": ">=5"
}
},
"node_modules/@videojs/vhs-utils": {
"version": "4.1.1",
"resolved": "https://registry.npmmirror.com/@videojs/vhs-utils/-/vhs-utils-4.1.1.tgz",
"integrity": "sha512-5iLX6sR2ownbv4Mtejw6Ax+naosGvoT9kY+gcuHzANyUZZ+4NpeNdKMUhb6ag0acYej1Y7cmr/F2+4PrggMiVA==",
"dependencies": {
"@babel/runtime": "^7.12.5",
"global": "^4.4.0"
},
"engines": {
"node": ">=8",
"npm": ">=5"
}
},
"node_modules/@videojs/xhr": {
"version": "2.7.0",
"resolved": "https://registry.npmmirror.com/@videojs/xhr/-/xhr-2.7.0.tgz",
"integrity": "sha512-giab+EVRanChIupZK7gXjHy90y3nncA2phIOyG3Ne5fvpiMJzvqYwiTOnEVW2S4CoYcuKJkomat7bMXA/UoUZQ==",
"dependencies": {
"@babel/runtime": "^7.5.5",
"global": "~4.4.0",
"is-function": "^1.0.1"
}
},
"node_modules/@wangeditor/basic-modules": { "node_modules/@wangeditor/basic-modules": {
"version": "1.1.7", "version": "1.1.7",
"resolved": "https://registry.npmmirror.com/@wangeditor/basic-modules/-/basic-modules-1.1.7.tgz", "resolved": "https://registry.npmmirror.com/@wangeditor/basic-modules/-/basic-modules-1.1.7.tgz",
@ -5664,6 +5726,14 @@
"@xtuc/long": "4.2.2" "@xtuc/long": "4.2.2"
} }
}, },
"node_modules/@xmldom/xmldom": {
"version": "0.8.10",
"resolved": "https://registry.npmmirror.com/@xmldom/xmldom/-/xmldom-0.8.10.tgz",
"integrity": "sha512-2WALfTl4xo2SkGCYRt6rDTFfk9R1czmBvUQy12gK2KuRKIpWEhcbbzy8EZXtz/jkRqHX8bFEc6FC1HjX4TUWYw==",
"engines": {
"node": ">=10.0.0"
}
},
"node_modules/@xtuc/ieee754": { "node_modules/@xtuc/ieee754": {
"version": "1.2.0", "version": "1.2.0",
"resolved": "https://registry.npmmirror.com/@xtuc/ieee754/-/ieee754-1.2.0.tgz", "resolved": "https://registry.npmmirror.com/@xtuc/ieee754/-/ieee754-1.2.0.tgz",
@ -5767,6 +5837,17 @@
"node": ">=8.9" "node": ">=8.9"
} }
}, },
"node_modules/aes-decrypter": {
"version": "4.0.2",
"resolved": "https://registry.npmmirror.com/aes-decrypter/-/aes-decrypter-4.0.2.tgz",
"integrity": "sha512-lc+/9s6iJvuaRe5qDlMTpCFjnwpkeOXp8qP3oiZ5jsj1MRg+SBVUmmICrhxHvc8OELSmc+fEyyxAuppY6hrWzw==",
"dependencies": {
"@babel/runtime": "^7.12.5",
"@videojs/vhs-utils": "^4.1.1",
"global": "^4.4.0",
"pkcs7": "^1.0.4"
}
},
"node_modules/agent-base": { "node_modules/agent-base": {
"version": "6.0.2", "version": "6.0.2",
"resolved": "https://registry.npmmirror.com/agent-base/-/agent-base-6.0.2.tgz", "resolved": "https://registry.npmmirror.com/agent-base/-/agent-base-6.0.2.tgz",
@ -9336,6 +9417,11 @@
"url": "https://github.com/fb55/entities?sponsor=1" "url": "https://github.com/fb55/entities?sponsor=1"
} }
}, },
"node_modules/dom-walk": {
"version": "0.1.2",
"resolved": "https://registry.npmmirror.com/dom-walk/-/dom-walk-0.1.2.tgz",
"integrity": "sha512-6QvTW9mrGeIegrFXdtQi9pk7O/nSK6lSdXW2eqUspN5LWD7UTji2Fqw5V2YLjBpHEoU9Xl/eUWNpDeZvoyOv2w=="
},
"node_modules/dom7": { "node_modules/dom7": {
"version": "3.0.0", "version": "3.0.0",
"resolved": "https://registry.npmmirror.com/dom7/-/dom7-3.0.0.tgz", "resolved": "https://registry.npmmirror.com/dom7/-/dom7-3.0.0.tgz",
@ -11742,6 +11828,15 @@
"resolved": "https://registry.npmmirror.com/glob-to-regexp/-/glob-to-regexp-0.4.1.tgz", "resolved": "https://registry.npmmirror.com/glob-to-regexp/-/glob-to-regexp-0.4.1.tgz",
"integrity": "sha512-lkX1HJXwyMcprw/5YUZc2s7DrpAiHB21/V+E1rHUrVNokkvB6bqMzT0VfV6/86ZNabt1k14YOIaT7nDvOX3Iiw==" "integrity": "sha512-lkX1HJXwyMcprw/5YUZc2s7DrpAiHB21/V+E1rHUrVNokkvB6bqMzT0VfV6/86ZNabt1k14YOIaT7nDvOX3Iiw=="
}, },
"node_modules/global": {
"version": "4.4.0",
"resolved": "https://registry.npmmirror.com/global/-/global-4.4.0.tgz",
"integrity": "sha512-wv/LAoHdRE3BeTGz53FAamhGlPLhlssK45usmGFThIi4XqnBmjKQ16u+RNbP7WvigRZDxUsM0J3gcQ5yicaL0w==",
"dependencies": {
"min-document": "^2.19.0",
"process": "^0.11.10"
}
},
"node_modules/global-modules": { "node_modules/global-modules": {
"version": "2.0.0", "version": "2.0.0",
"resolved": "https://registry.npmmirror.com/global-modules/-/global-modules-2.0.0.tgz", "resolved": "https://registry.npmmirror.com/global-modules/-/global-modules-2.0.0.tgz",
@ -13058,6 +13153,11 @@
"node": ">=8" "node": ">=8"
} }
}, },
"node_modules/is-function": {
"version": "1.0.2",
"resolved": "https://registry.npmmirror.com/is-function/-/is-function-1.0.2.tgz",
"integrity": "sha512-lw7DUp0aWXYg+CBCN+JKkcE0Q2RayZnSvnZBlwgxHBQhqt5pZNVy4Ri7H9GmmXkdu7LUthszM+Tor1u/2iBcpQ=="
},
"node_modules/is-generator-fn": { "node_modules/is-generator-fn": {
"version": "2.1.0", "version": "2.1.0",
"resolved": "https://registry.npmmirror.com/is-generator-fn/-/is-generator-fn-2.1.0.tgz", "resolved": "https://registry.npmmirror.com/is-generator-fn/-/is-generator-fn-2.1.0.tgz",
@ -16172,6 +16272,16 @@
"lz-string": "bin/bin.js" "lz-string": "bin/bin.js"
} }
}, },
"node_modules/m3u8-parser": {
"version": "7.2.0",
"resolved": "https://registry.npmmirror.com/m3u8-parser/-/m3u8-parser-7.2.0.tgz",
"integrity": "sha512-CRatFqpjVtMiMaKXxNvuI3I++vUumIXVVT/JpCpdU/FynV/ceVw1qpPyyBNindL+JlPMSesx+WX1QJaZEJSaMQ==",
"dependencies": {
"@babel/runtime": "^7.12.5",
"@videojs/vhs-utils": "^4.1.1",
"global": "^4.4.0"
}
},
"node_modules/magic-string": { "node_modules/magic-string": {
"version": "0.25.9", "version": "0.25.9",
"resolved": "https://registry.npmmirror.com/magic-string/-/magic-string-0.25.9.tgz", "resolved": "https://registry.npmmirror.com/magic-string/-/magic-string-0.25.9.tgz",
@ -16398,6 +16508,14 @@
"node": ">=6" "node": ">=6"
} }
}, },
"node_modules/min-document": {
"version": "2.19.0",
"resolved": "https://registry.npmmirror.com/min-document/-/min-document-2.19.0.tgz",
"integrity": "sha512-9Wy1B3m3f66bPPmU5hdA4DR4PB2OfDU/+GS3yAB7IQozE3tqXaVv2zOjgla7MEGSRv95+ILmOuvhLkOK6wJtCQ==",
"dependencies": {
"dom-walk": "^0.1.0"
}
},
"node_modules/min-indent": { "node_modules/min-indent": {
"version": "1.0.1", "version": "1.0.1",
"resolved": "https://registry.npmmirror.com/min-indent/-/min-indent-1.0.1.tgz", "resolved": "https://registry.npmmirror.com/min-indent/-/min-indent-1.0.1.tgz",
@ -16667,6 +16785,20 @@
"rimraf": "bin.js" "rimraf": "bin.js"
} }
}, },
"node_modules/mpd-parser": {
"version": "1.3.1",
"resolved": "https://registry.npmmirror.com/mpd-parser/-/mpd-parser-1.3.1.tgz",
"integrity": "sha512-1FuyEWI5k2HcmhS1HkKnUAQV7yFPfXPht2DnRRGtoiiAAW+ESTbtEXIDpRkwdU+XyrQuwrIym7UkoPKsZ0SyFw==",
"dependencies": {
"@babel/runtime": "^7.12.5",
"@videojs/vhs-utils": "^4.0.0",
"@xmldom/xmldom": "^0.8.3",
"global": "^4.4.0"
},
"bin": {
"mpd-to-m3u8-json": "bin/parse.js"
}
},
"node_modules/ms": { "node_modules/ms": {
"version": "2.1.3", "version": "2.1.3",
"resolved": "https://registry.npmmirror.com/ms/-/ms-2.1.3.tgz", "resolved": "https://registry.npmmirror.com/ms/-/ms-2.1.3.tgz",
@ -16690,6 +16822,22 @@
"integrity": "sha512-cnAsSVxIDsYt0v7HmC0hWZFwwXSh+E6PgCrREDuN/EsjgLwA5XRmlMHhSiDPrt6HxY1gTivEa/Zh7GtODoLevQ==", "integrity": "sha512-cnAsSVxIDsYt0v7HmC0hWZFwwXSh+E6PgCrREDuN/EsjgLwA5XRmlMHhSiDPrt6HxY1gTivEa/Zh7GtODoLevQ==",
"peer": true "peer": true
}, },
"node_modules/mux.js": {
"version": "7.1.0",
"resolved": "https://registry.npmmirror.com/mux.js/-/mux.js-7.1.0.tgz",
"integrity": "sha512-NTxawK/BBELJrYsZThEulyUMDVlLizKdxyAsMuzoCD1eFj97BVaA8D/CvKsKu6FOLYkFojN5CbM9h++ZTZtknA==",
"dependencies": {
"@babel/runtime": "^7.11.2",
"global": "^4.4.0"
},
"bin": {
"muxjs-transmux": "bin/transmux.js"
},
"engines": {
"node": ">=8",
"npm": ">=5"
}
},
"node_modules/mz": { "node_modules/mz": {
"version": "2.7.0", "version": "2.7.0",
"resolved": "https://registry.npmmirror.com/mz/-/mz-2.7.0.tgz", "resolved": "https://registry.npmmirror.com/mz/-/mz-2.7.0.tgz",
@ -17737,6 +17885,17 @@
"node": ">= 6" "node": ">= 6"
} }
}, },
"node_modules/pkcs7": {
"version": "1.0.4",
"resolved": "https://registry.npmmirror.com/pkcs7/-/pkcs7-1.0.4.tgz",
"integrity": "sha512-afRERtHn54AlwaF2/+LFszyAANTCggGilmcmILUzEjvs3XgFZT+xE6+QWQcAGmu4xajy+Xtj7acLOPdx5/eXWQ==",
"dependencies": {
"@babel/runtime": "^7.5.5"
},
"bin": {
"pkcs7": "bin/cli.js"
}
},
"node_modules/pkg-dir": { "node_modules/pkg-dir": {
"version": "4.2.0", "version": "4.2.0",
"resolved": "https://registry.npmmirror.com/pkg-dir/-/pkg-dir-4.2.0.tgz", "resolved": "https://registry.npmmirror.com/pkg-dir/-/pkg-dir-4.2.0.tgz",
@ -19265,7 +19424,6 @@
"version": "0.11.10", "version": "0.11.10",
"resolved": "https://registry.npmmirror.com/process/-/process-0.11.10.tgz", "resolved": "https://registry.npmmirror.com/process/-/process-0.11.10.tgz",
"integrity": "sha512-cdGef/drWFoydD1JsMzuFf8100nZl+GT+yacc2bEced5f9Rjk4z+WtFUTBu9PhOi9j/jfmBPu0mMEY4wIdAF8A==", "integrity": "sha512-cdGef/drWFoydD1JsMzuFf8100nZl+GT+yacc2bEced5f9Rjk4z+WtFUTBu9PhOi9j/jfmBPu0mMEY4wIdAF8A==",
"peer": true,
"engines": { "engines": {
"node": ">= 0.6.0" "node": ">= 0.6.0"
} }
@ -32352,6 +32510,53 @@
"url": "https://github.com/sponsors/wooorm" "url": "https://github.com/sponsors/wooorm"
} }
}, },
"node_modules/video.js": {
"version": "8.18.1",
"resolved": "https://registry.npmmirror.com/video.js/-/video.js-8.18.1.tgz",
"integrity": "sha512-oQ4M/HD2fFgEPHfmVMWxGykRFIpOmVhK0XZ4PSsPTgN2jH6E6+92f/RI2mDXDb0yu+Fxv9fxMUm0M7Z2K3Zo9w==",
"dependencies": {
"@babel/runtime": "^7.12.5",
"@videojs/http-streaming": "^3.14.2",
"@videojs/vhs-utils": "^4.1.1",
"@videojs/xhr": "2.7.0",
"aes-decrypter": "^4.0.2",
"global": "4.4.0",
"m3u8-parser": "^7.2.0",
"mpd-parser": "^1.2.2",
"mux.js": "^7.0.1",
"videojs-contrib-quality-levels": "4.1.0",
"videojs-font": "4.2.0",
"videojs-vtt.js": "0.15.5"
}
},
"node_modules/videojs-contrib-quality-levels": {
"version": "4.1.0",
"resolved": "https://registry.npmmirror.com/videojs-contrib-quality-levels/-/videojs-contrib-quality-levels-4.1.0.tgz",
"integrity": "sha512-TfrXJJg1Bv4t6TOCMEVMwF/CoS8iENYsWNKip8zfhB5kTcegiFYezEA0eHAJPU64ZC8NQbxQgOwAsYU8VXbOWA==",
"dependencies": {
"global": "^4.4.0"
},
"engines": {
"node": ">=16",
"npm": ">=8"
},
"peerDependencies": {
"video.js": "^8"
}
},
"node_modules/videojs-font": {
"version": "4.2.0",
"resolved": "https://registry.npmmirror.com/videojs-font/-/videojs-font-4.2.0.tgz",
"integrity": "sha512-YPq+wiKoGy2/M7ccjmlvwi58z2xsykkkfNMyIg4xb7EZQQNwB71hcSsB3o75CqQV7/y5lXkXhI/rsGAS7jfEmQ=="
},
"node_modules/videojs-vtt.js": {
"version": "0.15.5",
"resolved": "https://registry.npmmirror.com/videojs-vtt.js/-/videojs-vtt.js-0.15.5.tgz",
"integrity": "sha512-yZbBxvA7QMYn15Lr/ZfhhLPrNpI/RmCSCqgIff57GC2gIrV5YfyzLfLyZMj0NnZSAz8syB4N0nHXpZg9MyrMOQ==",
"dependencies": {
"global": "^4.3.1"
}
},
"node_modules/vm-browserify": { "node_modules/vm-browserify": {
"version": "1.1.2", "version": "1.1.2",
"resolved": "https://registry.npmmirror.com/vm-browserify/-/vm-browserify-1.1.2.tgz", "resolved": "https://registry.npmmirror.com/vm-browserify/-/vm-browserify-1.1.2.tgz",
@ -37309,6 +37514,51 @@
"nanoid": "^3.1.25" "nanoid": "^3.1.25"
} }
}, },
"@videojs/http-streaming": {
"version": "3.15.0",
"resolved": "https://registry.npmmirror.com/@videojs/http-streaming/-/http-streaming-3.15.0.tgz",
"integrity": "sha512-6rjaqEa87gVFqDFsHaLKXGrDqL3NhNZRNi6wkMw+uyt1lrLD2OFY0SfRQRNl7Vmmx0pt5FRJoRJYlnKsowyElA==",
"requires": {
"@babel/runtime": "^7.12.5",
"@videojs/vhs-utils": "^4.1.1",
"aes-decrypter": "^4.0.2",
"global": "^4.4.0",
"m3u8-parser": "^7.2.0",
"mpd-parser": "^1.3.1",
"mux.js": "7.0.3",
"video.js": "^7 || ^8"
},
"dependencies": {
"mux.js": {
"version": "7.0.3",
"resolved": "https://registry.npmmirror.com/mux.js/-/mux.js-7.0.3.tgz",
"integrity": "sha512-gzlzJVEGFYPtl2vvEiJneSWAWD4nfYRHD5XgxmB2gWvXraMPOYk+sxfvexmNfjQUFpmk6hwLR5C6iSFmuwCHdQ==",
"requires": {
"@babel/runtime": "^7.11.2",
"global": "^4.4.0"
}
}
}
},
"@videojs/vhs-utils": {
"version": "4.1.1",
"resolved": "https://registry.npmmirror.com/@videojs/vhs-utils/-/vhs-utils-4.1.1.tgz",
"integrity": "sha512-5iLX6sR2ownbv4Mtejw6Ax+naosGvoT9kY+gcuHzANyUZZ+4NpeNdKMUhb6ag0acYej1Y7cmr/F2+4PrggMiVA==",
"requires": {
"@babel/runtime": "^7.12.5",
"global": "^4.4.0"
}
},
"@videojs/xhr": {
"version": "2.7.0",
"resolved": "https://registry.npmmirror.com/@videojs/xhr/-/xhr-2.7.0.tgz",
"integrity": "sha512-giab+EVRanChIupZK7gXjHy90y3nncA2phIOyG3Ne5fvpiMJzvqYwiTOnEVW2S4CoYcuKJkomat7bMXA/UoUZQ==",
"requires": {
"@babel/runtime": "^7.5.5",
"global": "~4.4.0",
"is-function": "^1.0.1"
}
},
"@wangeditor/basic-modules": { "@wangeditor/basic-modules": {
"version": "1.1.7", "version": "1.1.7",
"resolved": "https://registry.npmmirror.com/@wangeditor/basic-modules/-/basic-modules-1.1.7.tgz", "resolved": "https://registry.npmmirror.com/@wangeditor/basic-modules/-/basic-modules-1.1.7.tgz",
@ -37660,6 +37910,11 @@
"@xtuc/long": "4.2.2" "@xtuc/long": "4.2.2"
} }
}, },
"@xmldom/xmldom": {
"version": "0.8.10",
"resolved": "https://registry.npmmirror.com/@xmldom/xmldom/-/xmldom-0.8.10.tgz",
"integrity": "sha512-2WALfTl4xo2SkGCYRt6rDTFfk9R1czmBvUQy12gK2KuRKIpWEhcbbzy8EZXtz/jkRqHX8bFEc6FC1HjX4TUWYw=="
},
"@xtuc/ieee754": { "@xtuc/ieee754": {
"version": "1.2.0", "version": "1.2.0",
"resolved": "https://registry.npmmirror.com/@xtuc/ieee754/-/ieee754-1.2.0.tgz", "resolved": "https://registry.npmmirror.com/@xtuc/ieee754/-/ieee754-1.2.0.tgz",
@ -37736,6 +37991,17 @@
"regex-parser": "^2.2.11" "regex-parser": "^2.2.11"
} }
}, },
"aes-decrypter": {
"version": "4.0.2",
"resolved": "https://registry.npmmirror.com/aes-decrypter/-/aes-decrypter-4.0.2.tgz",
"integrity": "sha512-lc+/9s6iJvuaRe5qDlMTpCFjnwpkeOXp8qP3oiZ5jsj1MRg+SBVUmmICrhxHvc8OELSmc+fEyyxAuppY6hrWzw==",
"requires": {
"@babel/runtime": "^7.12.5",
"@videojs/vhs-utils": "^4.1.1",
"global": "^4.4.0",
"pkcs7": "^1.0.4"
}
},
"agent-base": { "agent-base": {
"version": "6.0.2", "version": "6.0.2",
"resolved": "https://registry.npmmirror.com/agent-base/-/agent-base-6.0.2.tgz", "resolved": "https://registry.npmmirror.com/agent-base/-/agent-base-6.0.2.tgz",
@ -40463,6 +40729,11 @@
} }
} }
}, },
"dom-walk": {
"version": "0.1.2",
"resolved": "https://registry.npmmirror.com/dom-walk/-/dom-walk-0.1.2.tgz",
"integrity": "sha512-6QvTW9mrGeIegrFXdtQi9pk7O/nSK6lSdXW2eqUspN5LWD7UTji2Fqw5V2YLjBpHEoU9Xl/eUWNpDeZvoyOv2w=="
},
"dom7": { "dom7": {
"version": "3.0.0", "version": "3.0.0",
"resolved": "https://registry.npmmirror.com/dom7/-/dom7-3.0.0.tgz", "resolved": "https://registry.npmmirror.com/dom7/-/dom7-3.0.0.tgz",
@ -42260,6 +42531,15 @@
"resolved": "https://registry.npmmirror.com/glob-to-regexp/-/glob-to-regexp-0.4.1.tgz", "resolved": "https://registry.npmmirror.com/glob-to-regexp/-/glob-to-regexp-0.4.1.tgz",
"integrity": "sha512-lkX1HJXwyMcprw/5YUZc2s7DrpAiHB21/V+E1rHUrVNokkvB6bqMzT0VfV6/86ZNabt1k14YOIaT7nDvOX3Iiw==" "integrity": "sha512-lkX1HJXwyMcprw/5YUZc2s7DrpAiHB21/V+E1rHUrVNokkvB6bqMzT0VfV6/86ZNabt1k14YOIaT7nDvOX3Iiw=="
}, },
"global": {
"version": "4.4.0",
"resolved": "https://registry.npmmirror.com/global/-/global-4.4.0.tgz",
"integrity": "sha512-wv/LAoHdRE3BeTGz53FAamhGlPLhlssK45usmGFThIi4XqnBmjKQ16u+RNbP7WvigRZDxUsM0J3gcQ5yicaL0w==",
"requires": {
"min-document": "^2.19.0",
"process": "^0.11.10"
}
},
"global-modules": { "global-modules": {
"version": "2.0.0", "version": "2.0.0",
"resolved": "https://registry.npmmirror.com/global-modules/-/global-modules-2.0.0.tgz", "resolved": "https://registry.npmmirror.com/global-modules/-/global-modules-2.0.0.tgz",
@ -43209,6 +43489,11 @@
"resolved": "https://registry.npmmirror.com/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", "resolved": "https://registry.npmmirror.com/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz",
"integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==" "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg=="
}, },
"is-function": {
"version": "1.0.2",
"resolved": "https://registry.npmmirror.com/is-function/-/is-function-1.0.2.tgz",
"integrity": "sha512-lw7DUp0aWXYg+CBCN+JKkcE0Q2RayZnSvnZBlwgxHBQhqt5pZNVy4Ri7H9GmmXkdu7LUthszM+Tor1u/2iBcpQ=="
},
"is-generator-fn": { "is-generator-fn": {
"version": "2.1.0", "version": "2.1.0",
"resolved": "https://registry.npmmirror.com/is-generator-fn/-/is-generator-fn-2.1.0.tgz", "resolved": "https://registry.npmmirror.com/is-generator-fn/-/is-generator-fn-2.1.0.tgz",
@ -45510,6 +45795,16 @@
"resolved": "https://registry.npmmirror.com/lz-string/-/lz-string-1.5.0.tgz", "resolved": "https://registry.npmmirror.com/lz-string/-/lz-string-1.5.0.tgz",
"integrity": "sha512-h5bgJWpxJNswbU7qCrV0tIKQCaS3blPDrqKWx+QxzuzL1zGUzij9XCWLrSLsJPu5t+eWA/ycetzYAO5IOMcWAQ==" "integrity": "sha512-h5bgJWpxJNswbU7qCrV0tIKQCaS3blPDrqKWx+QxzuzL1zGUzij9XCWLrSLsJPu5t+eWA/ycetzYAO5IOMcWAQ=="
}, },
"m3u8-parser": {
"version": "7.2.0",
"resolved": "https://registry.npmmirror.com/m3u8-parser/-/m3u8-parser-7.2.0.tgz",
"integrity": "sha512-CRatFqpjVtMiMaKXxNvuI3I++vUumIXVVT/JpCpdU/FynV/ceVw1qpPyyBNindL+JlPMSesx+WX1QJaZEJSaMQ==",
"requires": {
"@babel/runtime": "^7.12.5",
"@videojs/vhs-utils": "^4.1.1",
"global": "^4.4.0"
}
},
"magic-string": { "magic-string": {
"version": "0.25.9", "version": "0.25.9",
"resolved": "https://registry.npmmirror.com/magic-string/-/magic-string-0.25.9.tgz", "resolved": "https://registry.npmmirror.com/magic-string/-/magic-string-0.25.9.tgz",
@ -45689,6 +45984,14 @@
"resolved": "https://registry.npmmirror.com/mimic-fn/-/mimic-fn-2.1.0.tgz", "resolved": "https://registry.npmmirror.com/mimic-fn/-/mimic-fn-2.1.0.tgz",
"integrity": "sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg==" "integrity": "sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg=="
}, },
"min-document": {
"version": "2.19.0",
"resolved": "https://registry.npmmirror.com/min-document/-/min-document-2.19.0.tgz",
"integrity": "sha512-9Wy1B3m3f66bPPmU5hdA4DR4PB2OfDU/+GS3yAB7IQozE3tqXaVv2zOjgla7MEGSRv95+ILmOuvhLkOK6wJtCQ==",
"requires": {
"dom-walk": "^0.1.0"
}
},
"min-indent": { "min-indent": {
"version": "1.0.1", "version": "1.0.1",
"resolved": "https://registry.npmmirror.com/min-indent/-/min-indent-1.0.1.tgz", "resolved": "https://registry.npmmirror.com/min-indent/-/min-indent-1.0.1.tgz",
@ -45880,6 +46183,17 @@
} }
} }
}, },
"mpd-parser": {
"version": "1.3.1",
"resolved": "https://registry.npmmirror.com/mpd-parser/-/mpd-parser-1.3.1.tgz",
"integrity": "sha512-1FuyEWI5k2HcmhS1HkKnUAQV7yFPfXPht2DnRRGtoiiAAW+ESTbtEXIDpRkwdU+XyrQuwrIym7UkoPKsZ0SyFw==",
"requires": {
"@babel/runtime": "^7.12.5",
"@videojs/vhs-utils": "^4.0.0",
"@xmldom/xmldom": "^0.8.3",
"global": "^4.4.0"
}
},
"ms": { "ms": {
"version": "2.1.3", "version": "2.1.3",
"resolved": "https://registry.npmmirror.com/ms/-/ms-2.1.3.tgz", "resolved": "https://registry.npmmirror.com/ms/-/ms-2.1.3.tgz",
@ -45900,6 +46214,15 @@
"integrity": "sha512-cnAsSVxIDsYt0v7HmC0hWZFwwXSh+E6PgCrREDuN/EsjgLwA5XRmlMHhSiDPrt6HxY1gTivEa/Zh7GtODoLevQ==", "integrity": "sha512-cnAsSVxIDsYt0v7HmC0hWZFwwXSh+E6PgCrREDuN/EsjgLwA5XRmlMHhSiDPrt6HxY1gTivEa/Zh7GtODoLevQ==",
"peer": true "peer": true
}, },
"mux.js": {
"version": "7.1.0",
"resolved": "https://registry.npmmirror.com/mux.js/-/mux.js-7.1.0.tgz",
"integrity": "sha512-NTxawK/BBELJrYsZThEulyUMDVlLizKdxyAsMuzoCD1eFj97BVaA8D/CvKsKu6FOLYkFojN5CbM9h++ZTZtknA==",
"requires": {
"@babel/runtime": "^7.11.2",
"global": "^4.4.0"
}
},
"mz": { "mz": {
"version": "2.7.0", "version": "2.7.0",
"resolved": "https://registry.npmmirror.com/mz/-/mz-2.7.0.tgz", "resolved": "https://registry.npmmirror.com/mz/-/mz-2.7.0.tgz",
@ -46701,6 +47024,14 @@
"resolved": "https://registry.npmmirror.com/pirates/-/pirates-4.0.6.tgz", "resolved": "https://registry.npmmirror.com/pirates/-/pirates-4.0.6.tgz",
"integrity": "sha512-saLsH7WeYYPiD25LDuLRRY/i+6HaPYr6G1OUlN39otzkSTxKnubR9RTxS3/Kk50s1g2JTgFwWQDQyplC5/SHZg==" "integrity": "sha512-saLsH7WeYYPiD25LDuLRRY/i+6HaPYr6G1OUlN39otzkSTxKnubR9RTxS3/Kk50s1g2JTgFwWQDQyplC5/SHZg=="
}, },
"pkcs7": {
"version": "1.0.4",
"resolved": "https://registry.npmmirror.com/pkcs7/-/pkcs7-1.0.4.tgz",
"integrity": "sha512-afRERtHn54AlwaF2/+LFszyAANTCggGilmcmILUzEjvs3XgFZT+xE6+QWQcAGmu4xajy+Xtj7acLOPdx5/eXWQ==",
"requires": {
"@babel/runtime": "^7.5.5"
}
},
"pkg-dir": { "pkg-dir": {
"version": "4.2.0", "version": "4.2.0",
"resolved": "https://registry.npmmirror.com/pkg-dir/-/pkg-dir-4.2.0.tgz", "resolved": "https://registry.npmmirror.com/pkg-dir/-/pkg-dir-4.2.0.tgz",
@ -47610,8 +47941,7 @@
"process": { "process": {
"version": "0.11.10", "version": "0.11.10",
"resolved": "https://registry.npmmirror.com/process/-/process-0.11.10.tgz", "resolved": "https://registry.npmmirror.com/process/-/process-0.11.10.tgz",
"integrity": "sha512-cdGef/drWFoydD1JsMzuFf8100nZl+GT+yacc2bEced5f9Rjk4z+WtFUTBu9PhOi9j/jfmBPu0mMEY4wIdAF8A==", "integrity": "sha512-cdGef/drWFoydD1JsMzuFf8100nZl+GT+yacc2bEced5f9Rjk4z+WtFUTBu9PhOi9j/jfmBPu0mMEY4wIdAF8A=="
"peer": true
}, },
"process-nextick-args": { "process-nextick-args": {
"version": "2.0.1", "version": "2.0.1",
@ -57701,6 +58031,46 @@
"integrity": "sha512-/juG65kTL4Cy2su4P8HjtkTxk6VmJDiOPBufWniqQ6wknac6jNiXS9vU+hO3wgusiyqWlzTbVHi0dyJqRONg3w==", "integrity": "sha512-/juG65kTL4Cy2su4P8HjtkTxk6VmJDiOPBufWniqQ6wknac6jNiXS9vU+hO3wgusiyqWlzTbVHi0dyJqRONg3w==",
"peer": true "peer": true
}, },
"video.js": {
"version": "8.18.1",
"resolved": "https://registry.npmmirror.com/video.js/-/video.js-8.18.1.tgz",
"integrity": "sha512-oQ4M/HD2fFgEPHfmVMWxGykRFIpOmVhK0XZ4PSsPTgN2jH6E6+92f/RI2mDXDb0yu+Fxv9fxMUm0M7Z2K3Zo9w==",
"requires": {
"@babel/runtime": "^7.12.5",
"@videojs/http-streaming": "^3.14.2",
"@videojs/vhs-utils": "^4.1.1",
"@videojs/xhr": "2.7.0",
"aes-decrypter": "^4.0.2",
"global": "4.4.0",
"m3u8-parser": "^7.2.0",
"mpd-parser": "^1.2.2",
"mux.js": "^7.0.1",
"videojs-contrib-quality-levels": "4.1.0",
"videojs-font": "4.2.0",
"videojs-vtt.js": "0.15.5"
}
},
"videojs-contrib-quality-levels": {
"version": "4.1.0",
"resolved": "https://registry.npmmirror.com/videojs-contrib-quality-levels/-/videojs-contrib-quality-levels-4.1.0.tgz",
"integrity": "sha512-TfrXJJg1Bv4t6TOCMEVMwF/CoS8iENYsWNKip8zfhB5kTcegiFYezEA0eHAJPU64ZC8NQbxQgOwAsYU8VXbOWA==",
"requires": {
"global": "^4.4.0"
}
},
"videojs-font": {
"version": "4.2.0",
"resolved": "https://registry.npmmirror.com/videojs-font/-/videojs-font-4.2.0.tgz",
"integrity": "sha512-YPq+wiKoGy2/M7ccjmlvwi58z2xsykkkfNMyIg4xb7EZQQNwB71hcSsB3o75CqQV7/y5lXkXhI/rsGAS7jfEmQ=="
},
"videojs-vtt.js": {
"version": "0.15.5",
"resolved": "https://registry.npmmirror.com/videojs-vtt.js/-/videojs-vtt.js-0.15.5.tgz",
"integrity": "sha512-yZbBxvA7QMYn15Lr/ZfhhLPrNpI/RmCSCqgIff57GC2gIrV5YfyzLfLyZMj0NnZSAz8syB4N0nHXpZg9MyrMOQ==",
"requires": {
"global": "^4.3.1"
}
},
"vm-browserify": { "vm-browserify": {
"version": "1.1.2", "version": "1.1.2",
"resolved": "https://registry.npmmirror.com/vm-browserify/-/vm-browserify-1.1.2.tgz", "resolved": "https://registry.npmmirror.com/vm-browserify/-/vm-browserify-1.1.2.tgz",

View File

@ -81,6 +81,7 @@
"tailwindcss": "^3.0.2", "tailwindcss": "^3.0.2",
"terser-webpack-plugin": "^5.2.5", "terser-webpack-plugin": "^5.2.5",
"typescript": "^4.8.4", "typescript": "^4.8.4",
"video.js": "^8.18.1",
"web-vitals": "^2.1.4", "web-vitals": "^2.1.4",
"webpack": "^5.64.4", "webpack": "^5.64.4",
"webpack-dev-server": "^4.6.0", "webpack-dev-server": "^4.6.0",

View File

@ -27,12 +27,6 @@ const onMessage = (e: any) => {
// socketService.on("message", onMessage); // socketService.on("message", onMessage);
const App = () => { const App = () => {
useEffect(() => {
return () => {
console.log("uninstall");
// socketService.off("message", onMessage);
};
}, []);
return ( return (
<> <>
<Outlet /> <Outlet />

View File

@ -5,7 +5,6 @@ import { FormSelect } from "./select";
import AliUpload from "../ali_upload"; import AliUpload from "../ali_upload";
import MyEditor from "../edittor"; import MyEditor from "../edittor";
import MapFrom from "../map/MapFrom"; import MapFrom from "../map/MapFrom";
import Dumbselect from "./dump_seleft";
const { TextArea } = Input; const { TextArea } = Input;
const SimpleForm = (props: SimpleFormData) => { const SimpleForm = (props: SimpleFormData) => {
const [form] = Form.useForm(); const [form] = Form.useForm();

View File

@ -1,41 +0,0 @@
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="initial-scale=1.0, user-scalable=no, width=device-width">
<title>给多个点添加信息窗体</title>
<link rel="stylesheet" href="https://cache.amap.com/lbs/static/main1119.css" />
<script type="text/javascript"
src="https://webapi.amap.com/maps?v=2.0&key=d58999d072ed7e5897d3900a769cfda0"></script>
</head>
<body>
<div id="container"></div>
<script type="text/javascript">
//初始化地图对象,加载地图
var map = new AMap.Map("container", {
resizeEnable: true,
mapStyle: "amap://styles/darkblue",
center: [103.55, 30.34],
viewMode: "2D", // 是否为3D地图模式
zoom: 11, // 初始化地图级别
});
var infoWindow = new AMap.InfoWindow({ offset: new AMap.Pixel(0, -30) });
var marker = new AMap.Marker({
position: [103.55, 30.34],
map: map
});
marker.content = '我是第1个Marker';
marker.on('click', markerClick);
marker.emit('click', { target: marker });
function markerClick(e) {
infoWindow.setContent(e.target.content);
infoWindow.open(map, e.target.getPosition());
}
map.setFitView();
</script>
</body>
</html>

View File

@ -1,334 +0,0 @@
import "./org_chart.less";
import OrgChart from "@/components/org/OrgChart";
import { OrgChartNodeDataType } from "@/components/org";
const OrgChartSelf = () => {
const data: OrgChartNodeDataType = {
key: 0,
label: "黄水武装",
children: [
{
key: 1,
label: "武装部长",
children: [
{
key: 11,
label: "文物社区支部",
children: [
{
key: 21,
label: "wangpeng",
},
{
key: 22,
label: "wangpeng1",
},
],
},
{
key: 12,
label: "花龙村支部",
children: [
{
key: 22,
label: "一组",
},
{
key: 24,
label: "二组",
children: [
{
key: 23,
label: "王鹏",
},
{
key: 29,
label: "王鹏1",
},
]
},
],
},
{ key: 13, label: "云华社区支部", children: [
{
key: 26,
label: "一组",
},
{
key: 28,
label: "二组",
},
],},
],
},
{
key: 2,
label: "教导员",
children: [],
},
],
};
return (
<>
<OrgChart
data={data}
direction={"horizontal"}
renderNode={(e) => {
return <div style={{textAlign:"center"}}>
<img width={70} height={70} src="https://ww3.sinaimg.cn/mw690/006i0nC8ly1hpzqtw0eibj31o01o0kd2.jpg" alt="" />
<span style={{ color: "#fff",display:"block" }}>{e.label}</span>
</div>
}}
/>
</>
);
};
const data = [
{
depName: "镇武装部党委",
depId: 1,
userList: [
{
position: "武装部长",
userName: "李部长",
userId: 1,
},
{
position: "教导员",
userName: "王教导",
userId: 2,
},
],
children: [
{
depName: " 武装力量党支部",
depId: 2,
children: [
{
depName: " 文武社区支部",
depId: 3,
children: [
{
depName: " 一小组",
depId: 6,
userList: [
{
position: "一小组长",
userName: "一小组长1",
userId: 6,
},
{
position: "二小组长12",
userName: "二小组长2",
userId: 8,
},
{
position: "战士",
userName: "王小三3",
userId: 11,
},
{
position: "战士",
userName: "王小四4",
userId: 12,
},
{
position: "二小组长34",
userName: "二小组长5",
userId: 8,
},
{
position: "战士",
userName: "王小三6",
userId: 11,
},
{
position: "战士",
userName: "王小四7",
userId: 13,
},
],
},
{
depName: " 二小组",
depId: 7,
userList: [
{
position: "二小组长8",
userName: "二小组长9",
userId: 7,
},
{
position: "二小组长10",
userName: "二小组长11",
userId: 8,
},
{
position: "战士",
userName: "王小三14",
userId: 11,
},
{
position: "战士",
userName: "王小四",
userId: 12,
},
],
},
],
userList: [
{
position: "文武社区支部书记",
userName: "书记名称",
userId: 3,
},
],
},
{
depName: " 花龙村支部",
depId: 4,
children: [
{
depName: " 一小组",
depId: 7,
userList: [
{
position: "一小组长",
userName: "一小组长",
userId: 7,
},
{
position: "二小组长2",
userName: "二小组长11",
userId: 8,
},
{
position: "战士",
userName: "王小三",
userId: 11,
},
{
position: "战士",
userName: "王小四12",
userId: 12,
},
{
position: "二小组长3",
userName: "二小组长",
userId: 8,
},
{
position: "战士",
userName: "王小四32",
userId: 12,
},
],
},
{
depName: " 二小组",
depId: 8,
userList: [
{
position: "二小组长4",
userName: "二小组长4",
userId: 8,
},
{
position: "战士",
userName: "王小三",
userId: 11,
},
{
position: "战士",
userName: "王小四12",
userId: 12,
},
{
position: "战士",
userName: "王小五",
userId: 13,
},
],
},
],
userList: [
{
position: "花龙村支部书记",
userName: "书记名称",
userId: 4,
},
],
},
{
depName: " 云华社区支部",
depId: 5,
children: [
{
depName: " 一小组",
depId: 8,
userList: [
{
position: "一小组长",
userName: "小组长",
userId: 8,
},
{
position: "战士",
userName: "王喜哦",
userId: 12,
},
{
position: "战士",
userName: "王喜吃",
userId: 13,
},
],
},
{
depName: " 二小组",
depId: 9,
userList: [
{
position: "二小组长5",
userName: "小组长",
userId: 9,
},
{
position: "战士",
userName: "王小二",
userId: 10,
},
{
position: "战士",
userName: "王小三",
userId: 11,
},
{
position: "战士",
userName: "王小四3",
userId: 12,
},
{
position: "战士",
userName: "王小五",
userId: 13,
},
],
},
],
userList: [
{
position: "云华社区支部书记",
userName: "书记名称",
userId: 5,
},
],
},
],
},
],
},
];
export default OrgChartSelf;

View File

@ -21,11 +21,11 @@
.scrolling-text { .scrolling-text {
white-space: nowrap; white-space: nowrap;
display: block; display: block;
animation: scroll 10s linear infinite; animation: scroll 20s linear infinite;
color: #fff; color: #fff;
> span { > span {
display: inline-block; display: inline-block;
animation: scrollText 10s linear infinite; /* 动画 */ animation: scrollText 20s linear infinite; /* 动画 */
} }
:hover > span { :hover > span {
animation-play-state: paused; animation-play-state: paused;
@ -152,9 +152,8 @@
.map_video_container { .map_video_container {
position: absolute; position: absolute;
width: 200px; width: 300px;
height: 400px; height: 300px;
top: 40px; top: 60px;
z-index: 9; right: 300px;
right: 288px;
} }

View File

@ -7,43 +7,17 @@ import HomeBottom from "@/pages/home/homeBottom/home_bottom";
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";
import { useEffect, useState } from "react";
import MapUtl from "@/components/map/mapUtil";
import Video from "./video"; import Video from "./video";
import Weather from "./homeLeft/weather";
import Timer from "./homeLeft/timer";
const Home = observer(() => { const Home = observer(() => {
const navigate = useNavigate(); const navigate = useNavigate();
const [times, setTimes] = useState<any>();
const [wechaer, setWechaer] = useState<any>();
const updateTime = () => {
const date = new Date();
const month = (date.getMonth() + 1).toString().padStart(2, "0");
const strDate = date.getDate().toString().padStart(2, "0");
const starHours = date.getHours().toString().padStart(2, "0");
const starMinutes = date.getMinutes().toString().padStart(2, "0");
const starSeconds = date.getSeconds().toString().padStart(2, "0");
const format = `${date.getFullYear()}-${month}-${strDate}
${starHours}:${starMinutes}:${starSeconds}`;
setTimes(format);
};
// 每秒钟更新一次时间
useEffect(() => {
let tim = setInterval(updateTime, 1000);
setTimeout(() => {
MapUtl.wecherInfo?.getLive("双流区", (err, data) => {
setWechaer(data);
});
}, 2000);
return () => {
clearInterval(tim);
};
}, []);
return ( return (
<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">
<span>{times} </span> <Timer />
</div> </div>
<div className="map_container_t_c"> <div className="map_container_t_c">
<img className="twp on_to" src={image2} alt="" /> <img className="twp on_to" src={image2} alt="" />
@ -51,20 +25,7 @@ const Home = observer(() => {
<img className="twp" src={image2} alt="" /> <img className="twp" src={image2} alt="" />
</div> </div>
<div className="map_container_t_r"> <div className="map_container_t_r">
<div <Weather />
style={{
flex: "1",
display: "flex",
alignItems: "center",
justifyContent: "space-around",
color: "#fff",
}}
>
<p>:{wechaer?.weather}</p>
<p>:{wechaer?.windDirection}</p>
<p>:{wechaer?.windPower}</p>
<p>湿:{wechaer?.humidity}</p>
</div>
<SettingOutlined <SettingOutlined
onClick={() => { onClick={() => {
navigate("admin/user"); navigate("admin/user");
@ -87,7 +48,7 @@ const Home = observer(() => {
</div> </div>
<MapContainer /> <MapContainer />
<div className="map_video_container"> <div className="map_video_container">
<Video /> <Video />
</div> </div>
<div className="map_container_r"> <div className="map_container_r">
<HomeRight /> <HomeRight />

View File

@ -0,0 +1,26 @@
import { useEffect, useState } from "react";
const Timer = () => {
const [times, setTimes] = useState<any>();
const updateTime = () => {
const date = new Date();
const month = (date.getMonth() + 1).toString().padStart(2, "0");
const strDate = date.getDate().toString().padStart(2, "0");
const starHours = date.getHours().toString().padStart(2, "0");
const starMinutes = date.getMinutes().toString().padStart(2, "0");
const starSeconds = date.getSeconds().toString().padStart(2, "0");
const format = `${date.getFullYear()}-${month}-${strDate}
${starHours}:${starMinutes}:${starSeconds}`;
setTimes(format);
};
useEffect(() => {
let tim = setInterval(updateTime, 1000);
return () => {
clearInterval(tim);
};
}, []);
return <span>{times} </span>;
};
export default Timer;

View File

@ -0,0 +1,31 @@
import MapUtl from "@/components/map/mapUtil";
import { useEffect, useState } from "react";
const Weather = () => {
const [wechaer, setWechaer] = useState<any>();
useEffect(() => {
setTimeout(() => {
MapUtl.wecherInfo?.getLive("双流区", (err, data) => {
setWechaer(data);
});
}, 2000);
}, []);
return (
<div
style={{
flex: "1",
display: "flex",
alignItems: "center",
justifyContent: "space-around",
color: "#fff",
}}
>
<p>:{wechaer?.weather}</p>
<p>:{wechaer?.windDirection}</p>
<p>:{wechaer?.windPower}</p>
<p>湿:{wechaer?.humidity}</p>
</div>
);
};
export default Weather;

View File

@ -1,27 +1,62 @@
import { Store } from "antd/es/form/interface"; import { Store } from "antd/es/form/interface";
import { inject, observer } from "mobx-react"; import { inject, observer } from "mobx-react";
import { useEffect } from "react"; import { useEffect, useRef } from "react";
import ReactPlayer from "react-player"; import videojs from "video.js";
import "video.js/dist/video-js.css";
const videoJsOptions = {
autoplay: true,
controls: true,
responsive: true,
fluid: true,
sources: [
{
src: "http://112.19.145.68:18000/hls/stream_1_0/playlist.m3u8",
type: "application/x-mpegURL",
},
],
};
const Video = (props: Store) => { const Video = (props: Store) => {
const { homeStore } = props; const { homeStore, onReady } = props;
const videoRef = useRef<HTMLDivElement>(null);
const playerRef = useRef<any>(null); // 使用 any 类型
useEffect(() => { useEffect(() => {
homeStore.getNewTask(); homeStore.getNewTask();
}, [homeStore]); }, [homeStore]);
useEffect(() => {
if (!playerRef.current && videoRef.current) {
const videoElement = document.createElement("video-js");
videoElement.classList.add("vjs-big-play-centered");
videoRef.current.appendChild(videoElement);
const player = (playerRef.current = videojs(
videoElement,
videoJsOptions,
() => {
videojs.log("player is ready");
onReady && onReady(player);
}
));
} else {
const player = playerRef.current;
player?.autoplay(videoJsOptions.autoplay);
player.src(videoJsOptions.sources);
}
}, [videoRef, onReady]);
useEffect(() => {
const player = playerRef.current;
return () => {
if (player && !player.isDisposed()) {
player.dispose();
playerRef.current = null;
}
};
}, [playerRef]);
return ( return (
<> <>
{homeStore.showVideo ? ( <div data-vjs-player style={{ width: "100%", height: "100%" }}>
<ReactPlayer <div ref={videoRef} style={{ width: "100%", height: "100%" }} />
className="react-player" </div>
url="https://www.119.gov.cn/images/qmxfxw/expd/2024/07/01/1719818550990010367.mp4" //地址
width="100%" //宽度
height="100%" //高度
playing={true} //是否自动播放
controls //控制
/>
) : (
<></>
)}
</> </>
); );
}; };

View File

@ -43,6 +43,7 @@
} }
} }
.pv_table { .pv_table {
height: 430px;
.table { .table {
width: 100%; width: 100%;
overflow-x: auto; overflow-x: auto;

View File

@ -19,8 +19,8 @@ const Banner = (props: Store) => {
setFileList(v); setFileList(v);
}; };
useEffect(() => { useEffect(() => {
sysStore.getlist().then(() => { sysStore.getbanner().then(() => {
let data = sysStore.list let data = sysStore.bannerList
data.forEach((e)=>{ data.forEach((e)=>{
e.fileNmae = e.file_name e.fileNmae = e.file_name
e.name = e.file_name e.name = e.file_name
@ -30,7 +30,7 @@ const Banner = (props: Store) => {
}); });
}, [sysStore]); }, [sysStore]);
const save = () => { const save = () => {
sysStore.add({ list: files }); sysStore.addBanner({ list: files });
}; };
return ( return (
<div> <div>

150
src/pages/system/dict.tsx Normal file
View File

@ -0,0 +1,150 @@
import { Button, Space, Modal, FormInstance, Form, Select } from "antd";
import { inject, observer } from "mobx-react";
import BTable from "@/components/b_table";
import { useEffect, useState } from "react";
import { Store } from "antd/lib/form/interface";
import SimpleForm from "@/components/form/simple_form";
import React from "react";
import { columns, defaultCatConfig } from "./dict_column";
const { Option } = Select;
const list = [
{ id: 1, name: "婚姻" },
{ id: 2, name: "政治面貌" },
{ id: 3, name: "文化程度" },
{ id: 4, name: "民族" },
{ id: 5, name: "单位性质" },
{ id: 6, name: "服役军兵种" },
{ id: 7, name: "军衔" },
{ id: 8, name: "技术职称" },
{ id: 9, name: "职务级别" },
];
const Dict = (props: Store) => {
const { sysStore } = props;
const [isModalOpen, setIsModalOpen] = useState<boolean>(false);
const [projectConfig, setProjectConfig] = useState<any>([]);
const formRef = React.useRef<FormInstance>(null);
const [record, setRecord] = useState<any>(null);
useEffect(() => {
sysStore.getlist({ drop_type: 0 });
setProjectConfig(defaultCatConfig);
}, [sysStore]);
const column_widget = (any, record) => {
return (
<Space wrap>
<Button
type="dashed"
size="small"
onClick={() => {
edit(record);
}}
>
</Button>
<Button
type="dashed"
danger
size="small"
onClick={() => {
sysStore.deleteItem(record.id);
}}
>
</Button>
</Space>
);
};
const edit = (record) => {
setIsModalOpen(true);
setRecord(record);
};
const onFinish = (values: any) => {
if (!record?.id) {
sysStore.add(values);
} else {
sysStore.putItem(record.id, values);
}
setIsModalOpen(false);
};
const onFinishFailed = () => {};
return (
<div className="contentBox">
<Space direction="vertical" size="middle" style={{ display: "flex" }}>
<Space direction="horizontal" size={"middle"}>
<Button
type="default"
onClick={() => {
setRecord(null);
setProjectConfig(defaultCatConfig);
setIsModalOpen(true);
}}
>
</Button>
</Space>
<BTable
store={sysStore}
columns={[
...columns,
{
title: "操作",
dataIndex: "id",
ellipsis: {
showTitle: false,
},
render: (any, record) => column_widget(any, record),
},
]}
dataSource={sysStore.list}
/>
<Modal
title={!record?.id ? "添加字典" : "编辑字典"}
width={500}
open={isModalOpen}
afterClose={() => formRef.current?.resetFields()}
onOk={() => formRef.current?.submit()}
okText="确定"
cancelText="取消"
onCancel={() => {
setIsModalOpen(false);
}}
>
<SimpleForm
formRef={formRef}
createCallback={() => {
if (record?.id) {
formRef.current?.setFieldsValue(record);
} else {
formRef.current?.setFieldsValue(null);
}
}}
formName="card_basic"
colProps={25}
subBtnName="提交"
formDatas={projectConfig}
onFinish={onFinish}
initialValues={true}
onFinishFailed={onFinishFailed}
>
<>
<Form.Item key="drop_type" label="类型" name="drop_type" rules={[]}>
<Select placeholder="">
{list?.map((v: any) => {
return (
<Option key={v.id} value={v.id}>
{v.name}
</Option>
);
})}
</Select>
</Form.Item>
</>
</SimpleForm>
</Modal>
</Space>
</div>
);
};
export default inject("sysStore")(observer(Dict));

View File

@ -0,0 +1,34 @@
import { FormType } from "@/components/form/interface";
import { UserDataType } from "@/model/userModel";
import { ColumnsType } from "antd/lib/table";
export const columns: ColumnsType<UserDataType> = [
{
title: "分类名称",
dataIndex: "name",
},
{
title: "分类",
dataIndex: "drop_type",
render: (drop_type) => <>{[
{ id: 1, name: "婚姻" },
{ id: 2, name: "政治面貌" },
{ id: 3, name: "文化程度" },
{ id: 4, name: "民族" },
{ id: 5, name: "单位性质" },
{ id: 6, name: "服役军兵种" },
{ id: 7, name: "军衔" },
{ id: 8, name: "技术职称" },
{ id: 9, name: "职务级别" },
].find((v) => v.id === drop_type)?.name || ""}</>,
},
];
export const defaultCatConfig = [
{
type: FormType.input,
label: "字典名称",
name: "name",
value: "",
rules: [{ required: true, message: "请输入字典名称!" }],
},
];

View File

@ -1,5 +1,6 @@
import { Tabs, TabsProps } from "antd"; import { Tabs, TabsProps } from "antd";
import Banner from "./banner"; import Banner from "./banner";
import Dict from "./dict";
const SystemPage = () => { const SystemPage = () => {
const items: TabsProps["items"] = [ const items: TabsProps["items"] = [
@ -8,7 +9,11 @@ const SystemPage = () => {
label: "banner管理", label: "banner管理",
children: <Banner />, children: <Banner />,
}, },
{
key: "2",
label: "数据字典",
children: <Dict />,
},
]; ];
return ( return (
<> <>

View File

@ -80,6 +80,7 @@ class BaseStore<B> implements BaseStoreInterface<B> {
// 获取列表 // 获取列表
async getlist(params?: any) { async getlist(params?: any) {
this.listStatus = true; this.listStatus = true;
console.log("123")
try { try {
let res = await baseHttp.get(this.urlConfig.LIST, { let res = await baseHttp.get(this.urlConfig.LIST, {
size: this.page?.Size ?? 20, size: this.page?.Size ?? 20,
@ -107,7 +108,6 @@ class BaseStore<B> implements BaseStoreInterface<B> {
this.listStatus = false; this.listStatus = false;
} catch (error) { } catch (error) {
this.listStatus = false; this.listStatus = false;
console.log(error);
} }
} }
list!: Array<B>; list!: Array<B>;

View File

@ -1,15 +1,34 @@
// 档案分类 // 档案分类
import { action, makeObservable, observable } from "mobx";
import BaseStore from "./baseStore"; import BaseStore from "./baseStore";
import baseHttp from "@/service/base";
import { TagDataType } from "@/model/userModel"; import { TagDataType } from "@/model/userModel";
class SysConfig { class SysConfig {
static LIST: string = "sys/banner" static LISTBannler: string = "sys/banner"
static ADD: string = "sys/banner" static ADDBanner: string = "sys/banner"
static LIST: string = "sys/drop"
static ADD: string = "sys/drop"
} }
class SysStore extends BaseStore<TagDataType> { class SysStore extends BaseStore<TagDataType> {
constructor() { constructor() {
super(SysConfig) super(SysConfig)
makeObservable(this, {
addBanner: action,
getbanner: action,
bannerList: observable,
})
} }
async addBanner(param: any) {
await baseHttp.post(SysConfig.ADDBanner, param)
this.getbanner();
}
async getbanner() {
let res = await baseHttp.get(SysConfig.LISTBannler, {})
this.bannerList = res.data.record
}
bannerList:Array<any> = []
} }
export const sysStore = new SysStore() export const sysStore = new SysStore()

View File

@ -27,117 +27,129 @@
<script> <script>
let ws; let ws;
let pc; let pc;
const call = () => { let configuration;
console.log(ws); var url =
pc?.createOffer().then(function (offer) { 'http://127.0.0.1:12214/v1/public/webRtcConfig?service=turn&username=flutter-webrtc';
pc?.setLocalDescription(offer); fetch(url)
ws.send(JSON.stringify({ .then(response => response.json())
type: "offer", "data": { .then(data => {
"to": "576030", let res = data.data.credential;
"from": "31283192", configuration = {
"description": offer, iceServers: [
"media": "video", {
"session_id": "576030-31283192", urls: res.uris[0],
} "username": res.username,
})) "credential": res.password
// socketService.send({ type: 'offer', data: offer }) },
}).catch(function (error) { ]
// 错误处理
console.error(error);
});
}
navigator.mediaDevices.getUserMedia({ video: true, audio: true })
.then(stream => {
const configuration = {
iceServers: [{ urls: 'stun:rw.quwanya.cn/rtc' }]
};
pc = new RTCPeerConnection(configuration)
pc.ontrack = function (event) {
if (event.track.kind === 'audio') {
return
}
let el = document.createElement(event.track.kind)
el.srcObject = event.streams[0]
el.autoplay = true
el.controls = true
document.getElementById('remoteVideos').appendChild(el)
event.track.onmute = function (event) {
el.play()
}
event.streams[0].onremovetrack = ({ track }) => {
if (el.parentNode) {
el.parentNode.removeChild(el)
}
}
}
document.getElementById('localVideo').srcObject = stream
stream.getTracks().forEach(track => pc.addTrack(track, stream))
ws = new WebSocket("ws://127.0.0.1:12214/ws?id=admin123")
pc.onicecandidate = e => {
if (!e.candidate) {
return
}
ws.send(JSON.stringify({ type: 'candidate', data: e }))
}
ws.addEventListener('open', function (event) {
ws.send(JSON.stringify({
type: "new", "data": {
"name": "AppleWebKit/537.36 (KHTML, like Gecko) Chrome/129.0.0.0 Safari/537.36 )",
"id": "31283192",
"user_agent": "flutter-webrtc/js"
}
}))
});
ws.onclose = function (evt) {
// window.alert("Websocket has closed")
}
ws.onmessage = function (evt) {
let msg = JSON.parse(evt.data)
if (!msg) {
return console.log('failed to parse msg')
}
switch (msg.type) {
case 'offer':
let offer = msg.data.description
pc.setRemoteDescription(offer)
pc.createAnswer().then(answer => {
pc.setLocalDescription(answer)
ws.send(JSON.stringify({
type: 'answer', data: {
'to': msg.data.from,
'from': "31283192",
'description': { 'sdp': answer.sdp, 'type': answer.type },
'session_id': msg.data.from + "-31283192",
}
}))
})
return
case 'candidate':
let candidate = msg.data.candidate
if (!candidate) {
return console.log('failed to parse candidate')
}
pc.addIceCandidate(candidate)
case "answer":
pc?.setRemoteDescription(msg.data.description)
// let answer = JSON.parse(msg.content.body)
// if (!answer) {
// return console.log('failed to parse answer')
// }
// console.log(answer)
// this.setOffer(answer.data.description)
// break;
}
}
ws.onerror = function (evt) {
console.log("ERROR: " + evt.data)
} }
}) })
const call = () => {
navigator.mediaDevices.getUserMedia({ video: true, audio: true })
.then(stream => {
pc = new RTCPeerConnection(configuration)
pc.ontrack = function (event) {
if (event.track.kind === 'audio') {
return
}
let el = document.createElement(event.track.kind)
el.srcObject = event.streams[0]
el.autoplay = true
el.controls = true
document.getElementById('remoteVideos').appendChild(el)
event.track.onmute = function (event) {
el.play()
}
event.streams[0].onremovetrack = ({ track }) => {
if (el.parentNode) {
el.parentNode.removeChild(el)
}
}
}
document.getElementById('localVideo').srcObject = stream
stream.getTracks().forEach(track => pc.addTrack(track, stream))
pc.onicecandidate = e => {
if (!e.candidate) {
return
}
ws.send(JSON.stringify({ type: 'candidate', data: e }))
}
pc?.createOffer().then(function (offer) {
pc?.setLocalDescription(offer);
ws.send(JSON.stringify({
type: "offer", "data": {
"to": "31283192",
"from": "31283191",
"description": offer,
"media": "video",
"session_id": "31283192-31283191",
}
}))
// socketService.send({ type: 'offer', data: offer })
}).catch(function (error) {
// 错误处理
console.error(error);
});
}).catch((e) => {
console.log(e);
})
}
// wss://rw.quwanya.cn/ws
initSocket = () => {
ws = new WebSocket("ws://127.0.0.1:12214/wsadmin?id=31283192")
ws.addEventListener('open', function (event) {
ws.send(JSON.stringify({
type: "peerRoot", "data": {
"name": "AppleWebKit/537.36 (KHTML, like Gecko) Chrome/129.0.0.0 Safari/537.36 )",
"id": "31283192",
"user_agent": "flutter-webrtc/js"
}
}))
});
ws.onclose = function (evt) {
console.log(evt);
}
ws.onmessage = function (evt) {
let msg = JSON.parse(evt.data)
if (!msg) {
return console.log('failed to parse msg')
}
console.log(msg);
switch (msg.type) {
case 'offer':
let offer = msg.data.description
pc.setRemoteDescription(offer)
pc.createAnswer().then(answer => {
pc.setLocalDescription(answer)
ws.send(JSON.stringify({
type: 'answer', data: {
'to': msg.data.from,
'from': "31283192",
'description': { 'sdp': answer.sdp, 'type': answer.type },
'session_id': msg.data.from + "-31283192",
}
}))
})
return
case 'candidate':
let candidate = msg.content.body
if (!candidate) {
return console.log('failed to parse candidate')
}
pc.addIceCandidate(candidate)
case "answer":
pc?.setRemoteDescription(msg.data.description)
}
}
ws.onerror = function (evt) {
console.log("ERROR: " + evt.data)
}
}
initSocket()
</script> </script>
</html> </html>

View File

@ -27,112 +27,131 @@
<script> <script>
let ws; let ws;
let pc; let pc;
let configuration;
var url =
'http://127.0.0.1:12214/v1/public/webRtcConfig?service=turn&username=flutter-webrtc';
fetch(url)
.then(response => response.json())
.then(data => {
let res = data.data.credential;
configuration = {
iceServers: [
{
urls: res.uris[0],
"username": res.username,
"credential": res.password
},
]
}
})
const call = () => { const call = () => {
console.log(ws); console.log(ws);
pc?.createOffer().then(function (offer) { navigator.mediaDevices.getUserMedia({ video: true, audio: true })
pc?.setLocalDescription(offer); .then(stream => {
ws.send(JSON.stringify({ pc = new RTCPeerConnection(configuration)
type: "offer", "data": { pc.ontrack = function (event) {
"to": "01J8RT7YMKZNVWTYAECJ55S6W0", if (event.track.kind === 'audio') {
"from": "31283192", return
"description": offer, }
"media": "video", let el = document.createElement(event.track.kind)
"session_id": "01J8RT7YMKZNVWTYAECJ55S6W0-31283192", el.srcObject = event.streams[0]
el.autoplay = true
el.controls = true
document.getElementById('remoteVideos').appendChild(el)
event.track.onmute = function (event) {
el.play()
}
event.streams[0].onremovetrack = ({ track }) => {
if (el.parentNode) {
el.parentNode.removeChild(el)
}
}
} }
})) document.getElementById('localVideo').srcObject = stream
// socketService.send({ type: 'offer', data: offer }) stream.getTracks().forEach(track => pc.addTrack(track, stream))
}).catch(function (error) { pc.onicecandidate = e => {
// 错误处理 if (!e.candidate) {
console.error(error); return
}); }
ws.send(JSON.stringify({ type: 'candidate', data: e }))
}
pc?.createOffer().then(function (offer) {
pc?.setLocalDescription(offer);
ws.send(JSON.stringify({
type: "offer", "data": {
"to": "31283191",
"from": "31283192",
"description": offer,
"media": "video",
"session_id": "31283191-31283192",
}
}))
// socketService.send({ type: 'offer', data: offer })
}).catch(function (error) {
// 错误处理
console.error(error);
});
}).catch((e) => {
console.log(e);
})
} }
// wss://rw.quwanya.cn/ws // wss://rw.quwanya.cn/ws
initSocket = () => {
navigator.mediaDevices.getUserMedia({ video: true, audio: true }) ws = new WebSocket("ws://127.0.0.1:12214/wsadmin?id=31283191")
.then(stream => { ws.addEventListener('open', function (event) {
const configuration = { ws.send(JSON.stringify({
iceServers: [{ urls: 'stun:127.0.0.1:19302' }] type: "peerRoot", "data": {
}; "name": "AppleWebKit/537.36 (KHTML, like Gecko) Chrome/129.0.0.0 Safari/537.36 )",
pc = new RTCPeerConnection(configuration) "id": "31283191",
pc.ontrack = function (event) { "user_agent": "flutter-webrtc/js"
if (event.track.kind === 'audio') { }
}))
});
ws.onclose = function (evt) {
console.log(evt);
// window.alert("Websocket has closed")
}
ws.onmessage = function (evt) {
let msg = JSON.parse(evt.data)
if (!msg) {
return console.log('failed to parse msg')
}
console.log(msg.type);
switch (msg.type) {
case 'offer':
let offer = msg.data.description
pc.setRemoteDescription(offer)
pc.createAnswer().then(answer => {
pc.setLocalDescription(answer)
ws.send(JSON.stringify({
type: 'answer', data: {
'to': msg.data.from,
'from': "31283192",
'description': { 'sdp': answer.sdp, 'type': answer.type },
'session_id': msg.data.from + "-31283192",
}
}))
})
return return
}
let el = document.createElement(event.track.kind) case 'candidate':
el.srcObject = event.streams[0] let candidate = msg.data.candidate
el.autoplay = true if (!candidate) {
el.controls = true return console.log('failed to parse candidate')
document.getElementById('remoteVideos').appendChild(el)
event.track.onmute = function (event) {
el.play()
}
event.streams[0].onremovetrack = ({ track }) => {
if (el.parentNode) {
el.parentNode.removeChild(el)
} }
} pc.addIceCandidate(candidate)
case "answer":
pc?.setRemoteDescription(msg.data.description)
} }
}
document.getElementById('localVideo').srcObject = stream ws.onerror = function (evt) {
stream.getTracks().forEach(track => pc.addTrack(track, stream)) console.log("ERROR: " + evt.data)
ws = new WebSocket("ws://rw.quwanya.cn:12217/ws") }
pc.onicecandidate = e => { }
if (!e.candidate) { initSocket()
return
}
ws.send(JSON.stringify({ type: 'candidate', data: e }))
}
ws.addEventListener('open', function (event) {
ws.send(JSON.stringify({
type: "new", "data": {
"name": "AppleWebKit/537.36 (KHTML, like Gecko) Chrome/129.0.0.0 Safari/537.36 )",
"id": "31283192",
"user_agent": "flutter-webrtc/js"
}
}))
});
ws.onclose = function (evt) {
window.alert("Websocket has closed")
}
ws.onmessage = function (evt) {
let msg = JSON.parse(evt.data)
if (!msg) {
return console.log('failed to parse msg')
}
switch (msg.type) {
case 'offer':
let offer = msg.data.description
pc.setRemoteDescription(offer)
pc.createAnswer().then(answer => {
pc.setLocalDescription(answer)
ws.send(JSON.stringify({
type: 'answer', data: {
'to': msg.data.from,
'from': "31283192",
'description': { 'sdp': answer.sdp, 'type': answer.type },
'session_id': msg.data.from + "-31283192",
}
}))
})
return
case 'candidate':
let candidate = msg.data.candidate
if (!candidate) {
return console.log('failed to parse candidate')
}
pc.addIceCandidate(candidate)
case "answer":
pc?.setRemoteDescription(msg.data.description)
}
}
ws.onerror = function (evt) {
console.log("ERROR: " + evt.data)
}
}).catch(window.alert)
</script> </script>
</html> </html>

View File

@ -1,10 +1,10 @@
class Config { class Config {
static baseUrl = "https://rw.quwanya.cn/"; // static baseUrl = "https://rw.quwanya.cn/";
static uploadUrl = "https://rw.quwanya.cn/"; static uploadUrl = "https://rw.quwanya.cn/";
static ws = "wss://rw.quwanya.cn/wsadmin?id=admin"; // static ws = "wss://rw.quwanya.cn/wsadmin?id=admin";
static rtc = "wss://rw.quwanya.cn/ws"; static rtc = "wss://rw.quwanya.cn/ws";
// static ws = "ws://127.0.0.1:12214/ws?id=admin"; static ws = "ws://127.0.0.1:12214/ws?id=admin";
// static baseUrl = "http://127.0.0.1:12214/"; static baseUrl = "http://127.0.0.1:12214/";
// static uploadUrl = "http://127.0.0.1:12214/"; // static uploadUrl = "http://127.0.0.1:12214/";
} }