Browse Source

Merge branch 'dev_trial' of https://gitea.free-sun.vip/free-sun/FS-IOT into dev_trial

release_0.0.2
巴林闲侠 3 years ago
parent
commit
f6a7c66c68
  1. 1
      code/VideoAccess-VCMP/web/client/src/components/videoPlayer/videoPlay.jsx
  2. 2
      code/VideoAccess-VCMP/web/client/src/sections/equipmentWarehouse/components/nvrCamera.jsx
  3. 6
      code/VideoAccess-VCMP/web/client/src/sections/equipmentWarehouse/components/sideSheet.jsx
  4. 22
      code/VideoAccess-VCMP/web/client/src/sections/equipmentWarehouse/containers/camera.jsx
  5. 2
      code/VideoAccess-VCMP/web/package.json
  6. 4
      code/VideoAccess-VCMP/web/webpack.config.js

1
code/VideoAccess-VCMP/web/client/src/components/videoPlayer/videoPlay.jsx

@ -27,6 +27,7 @@ const VideoPlay = ({
// replayUrl: 'ezopen://open.ys7.com/G75922040/1.rec',
},
}) => {
console.log(videoObj);
const [jessibuca, setjessibuca] = useState(null)
const [isPlaying, setIsPlaying] = useState(false)
const [operationState, setoperationState] = useState()

2
code/VideoAccess-VCMP/web/client/src/sections/equipmentWarehouse/components/nvrCamera.jsx

@ -59,6 +59,7 @@ function nvrCamera ({ dispatch, actions, nvrRef, cameraData, addNvr, nvrNumber }
let data = res.payload.data.map((item, index) => {
if (item.camera) {
item.name = item.camera.name;
item.support = item.camera.cloudControl
}
if (item.id == cameraData.gbId) {
item = oneData;
@ -66,6 +67,7 @@ function nvrCamera ({ dispatch, actions, nvrRef, cameraData, addNvr, nvrNumber }
if (index == 0) {
item = modifyData;
}
return item;
});
setNVRcameraList(data);

6
code/VideoAccess-VCMP/web/client/src/sections/equipmentWarehouse/components/sideSheet.jsx

@ -138,6 +138,7 @@ function SideSheets (props) {
rowId
)
).then((res) => {
console.log(res.payload.data);
setNvrDetails(res.payload.data);
projectScrollbar = new PerfectScrollbar("#project_information", {
suppressScrollX: true,
@ -163,6 +164,7 @@ function SideSheets (props) {
const statusNvr = nvrDetails.gbNvr
const statusCamera = nvrDetails.gbCamera
console.log();
function colorStatus (data) {
switch (data) {
case "ON":
@ -179,8 +181,8 @@ function SideSheets (props) {
<SideSheet
visible={visible}
title={cameraSetup ?
<><img src={`/assets/images/background/${nvrDetails.forbidden ? "red" : colorStatus(statusNvr ? statusNvr.online : "")}.png`} style={{ marginRight: "10px" }} />污水管理出出口</>
: <><img src={`/assets/images/background/${colorStatus(statusCamera ? statusCamera.online : "")}.png`} style={{ marginRight: "10px" }} />智慧设备NVR</>
<><img src={`/assets/images/background/${nvrDetails.forbidden ? "red" : colorStatus(statusNvr ? statusCamera.online : "")}.png`} style={{ marginRight: "10px" }} />污水管理出出口</>
: <><img src={`/assets/images/background/${colorStatus(statusCamera ? statusNvr.online : "")}.png`} style={{ marginRight: "10px" }} />智慧设备NVR</>
}
style={{ background: "#F9FBFF" }}
size="large"

22
code/VideoAccess-VCMP/web/client/src/sections/equipmentWarehouse/containers/camera.jsx

@ -11,6 +11,7 @@ import {
Tag,
Skeleton,
Popconfirm,
Row,
} from "@douyinfe/semi-ui";
import { SimpleFileDownButton, VideoPlayModal } from "$components";
import "../style.less";
@ -38,6 +39,7 @@ const CameraHeader = (props) => {
const [parentCamera, setParentCamera] = useState(""); //
const [addNvr, setAddNvr] = useState(false); //nvrNVR
const [nvrNumber, setNvrNumber] = useState();
const [videoObj, setVideoObj] = useState(); //
const [axyData, setAxyData] = useState();
const { equipmentWarehouse } = actions;
const api = useRef();
@ -118,7 +120,7 @@ const CameraHeader = (props) => {
return (
<div>
{row.name}
<span style={{ color: "blue" }}
<span style={{ color: "#1859C1" }}
onClick={() => {
if (deviceClickb.current) {
if (row.type == "nvr") {
@ -148,6 +150,7 @@ const CameraHeader = (props) => {
width: "20%",
dataIndex: "",
render: (_, row) => {
console.log(row);
return (
<div style={{ display: "flex" }}>
<Button
@ -184,8 +187,22 @@ const CameraHeader = (props) => {
<Button
theme="borderless"
onClick={() => {
// setRowId(row.id);
if (row.type == "yingshi") {
// console.log(row.serialNo);
// console.log(row.secretYingshi.token);
// console.log(row.gbCamera.playUrl.liveUrl.sd.ezopen);
// console.log(row.gbCamera.playUrl.liveUrl.hd.ezopen);
setVideoObj({
type:row.type,
serialNo: row.serialNo,
yingshiToken: row.secretYingshi.token,
playUrlSd: row.gbCamera.playUrl.liveUrl.sd.ezopen,
playUrlHd: row.gbCamera.playUrl.liveUrl.hd.ezopen,
})
}
setVideoPlay(true)
}}
>
播放
@ -780,6 +797,7 @@ const CameraHeader = (props) => {
{videoPlay ?
<VideoPlayModal
visible={true}
videoObj={videoObj}
close={() => {
setVideoPlay(false)
}} />

2
code/VideoAccess-VCMP/web/package.json

@ -52,7 +52,7 @@
"@fs/attachment": "^1.0.0",
"@peace/components": "0.0.35",
"@peace/utils": "^0.0.48",
"@semi-bot/semi-theme-fsiot": "^0.0.2",
"@semi-bot/semi-theme-fscamera": "^1.0.0",
"@vitejs/plugin-react": "^1.3.1",
"@vitejs/plugin-react-refresh": "^1.3.6",
"args": "^5.0.1",

4
code/VideoAccess-VCMP/web/webpack.config.js

@ -37,8 +37,8 @@ module.exports = {
}),
new SemiWebpackPlugin({
theme: {
name: '@semi-bot/semi-theme-fsiot',
include: '~@semi-bot/semi-theme-fsiot/scss/local.scss'
name: '@semi-bot/semi-theme-fscamera',
include: '~@semi-bot/semi-theme-fscamera/scss/local.scss'
}
}),
],

Loading…
Cancel
Save