Browse Source

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

release_0.0.2
巴林闲侠 2 years ago
parent
commit
06f310034e
  1. 5
      code/VideoAccess-VCMP/web/client/src/components/reminderBox.jsx
  2. 2
      code/VideoAccess-VCMP/web/client/src/layout/components/header/index.jsx
  3. 6
      code/VideoAccess-VCMP/web/client/src/sections/auth/containers/login.jsx
  4. 2
      code/VideoAccess-VCMP/web/client/src/sections/equipmentWarehouse/actions/nvr.js
  5. 31
      code/VideoAccess-VCMP/web/client/src/sections/equipmentWarehouse/components/cameraModal.jsx
  6. 116
      code/VideoAccess-VCMP/web/client/src/sections/equipmentWarehouse/components/skeletonScreen.jsx
  7. 5
      code/VideoAccess-VCMP/web/client/src/sections/equipmentWarehouse/containers/camera.jsx
  8. 7
      code/VideoAccess-VCMP/web/client/src/sections/equipmentWarehouse/containers/nvr.jsx

5
code/VideoAccess-VCMP/web/client/src/components/reminderBox.jsx

@ -1,7 +1,7 @@
import { Button, Checkbox, Modal } from "@douyinfe/semi-ui"; import { Button, Checkbox, Modal } from "@douyinfe/semi-ui";
import React from "react"; import React from "react";
const ReminderBox = ({ title, wait, toadd, visible, onOk }) => { const ReminderBox = ({ title, wait, toadd, visible, onOk, close }) => {
return ( return (
<Modal <Modal
title={ title={
@ -38,8 +38,7 @@ const ReminderBox = ({ title, wait, toadd, visible, onOk }) => {
</div> </div>
</div> </div>
} }
// visible={true} visible={visible}
visible={visible}
></Modal> ></Modal>
); );
}; };

2
code/VideoAccess-VCMP/web/client/src/layout/components/header/index.jsx

@ -63,7 +63,7 @@ const Header = (props) => {
<Avatar size="small" color="light-blue" style={{ margin: 4 }}> <Avatar size="small" color="light-blue" style={{ margin: 4 }}>
<img src="/assets/images/avatar/6.png" /> <img src="/assets/images/avatar/6.png" />
</Avatar> </Avatar>
{user && user.namePresent} {user && user.displayName}
</div> </div>
} }
> >

6
code/VideoAccess-VCMP/web/client/src/sections/auth/containers/login.jsx

@ -48,10 +48,8 @@ const Login = props => {
width: 446, width: 446,
height: 348, height: 348,
padding: '45px 60px', padding: '45px 60px',
// backgroundImage: "url('/assets/images/background/loginbg.png')", background: 'linear-gradient(rgba(255,255,255,0.4),rgba(255,255,255,.3))',
// backgroundSize: '100% 100%', backdropFilter:"saturate(100%) contrast(100%) blur(17px)",
// backgroundRepeat: 'no-repeat',
background: 'linear-gradient(rgba(255,255,255,1),rgba(255,255,255,.3))',
position: 'absolute', position: 'absolute',
top: '33.89%', top: '33.89%',
right: '16.43%', right: '16.43%',

2
code/VideoAccess-VCMP/web/client/src/sections/equipmentWarehouse/actions/nvr.js

@ -48,7 +48,7 @@ export function delNvr(orgId) {
url: `${ApiTable.delNvr.replace("{nvrId}", orgId)}`, url: `${ApiTable.delNvr.replace("{nvrId}", orgId)}`,
msg: { msg: {
option: option:
"删除成 功!被删除的设备会被存放在“设备回收站”中。并植入“设备回收站”路径。", "设备会被存放在“设备回收站”中,删除",
}, },
reducer: { name: "" }, reducer: { name: "" },
}); });

31
code/VideoAccess-VCMP/web/client/src/sections/equipmentWarehouse/components/cameraModal.jsx

@ -52,9 +52,26 @@ function cameraModal (props) {
dispatch(equipmentWarehouse.getCameraKind()); dispatch(equipmentWarehouse.getCameraKind());
dispatch(equipmentWarehouse.getAbility()); dispatch(equipmentWarehouse.getAbility());
cameraData.type == "nvr" || addNvr ? setcameraList(cameraList.slice(1, 4)) : ""; cameraData.type == "nvr" || addNvr ? setcameraList(cameraList.slice(1, 4)) : "";
// if(){ //axyData
if (axyData) {
// } console.log(axyData)
switch (axyData.openCamera) {
case "nvr":
setcameraList(cameraList.slice(1, 4))
setclickNum(2)
break
case "ipc":
setcameraList(cameraList.slice(0, 3))
setclickNum(3)
break
case "yingshi":
setcameraList(cameraList.slice(0, 3))
setclickNum(1)
break
default:
break
}
}
}, []); }, []);
const cameraList = [ const cameraList = [
// //
@ -156,19 +173,19 @@ function cameraModal (props) {
} }
function handleChoose (id) { function handleChoose (id) {
// //
if (!addNvr && !modify) { if (!addNvr && !modify && !axyData) {
setclickNum(id); setclickNum(id);
} }
} }
function turnLift () { function turnLift () {
// //
if (!addNvr && !modify) { if (!addNvr && !modify && !axyData) {
setcameraList(cameraList.slice(0, 3)); setcameraList(cameraList.slice(0, 3));
} }
} }
function turnRight () { function turnRight () {
// //
if (!addNvr && !modify) { if (!addNvr && !modify && !axyData) {
setcameraList(cameraList.slice(1, 4)); setcameraList(cameraList.slice(1, 4));
} }
} }
@ -388,7 +405,7 @@ function cameraModal (props) {
}} }}
onClick={() => handleChoose(item.id)} onClick={() => handleChoose(item.id)}
> >
{modify || addNvr ? item.id == clickNum ? "" : <div style={{ {modify || addNvr ||axyData? item.id == clickNum ? "" : <div style={{
width: 266, width: 266,
height: 146, height: 146,
borderRadius: 3, borderRadius: 3,

116
code/VideoAccess-VCMP/web/client/src/sections/equipmentWarehouse/components/skeletonScreen.jsx

@ -1,106 +1,18 @@
import React, { useState, useEffect } from "react"; import React, { useState, useEffect } from "react";
import { Table } from "@douyinfe/semi-ui"; import { Skeleton } from "@douyinfe/semi-ui";
export function skeletonScreen(line, columns) { export function skeletonScreen() {
const data = () => { return <>
let str = []; <Skeleton.Title style={{width: "95%",height:24,margin:"8px 20px"}} />
for (let i = 0; i < line; i++) { <Skeleton.Title style={{width: "80%",height:28,margin:"16px 20px"}} />
if (i == line - 1) { <Skeleton.Title style={{width: "50%",height:28,margin:"16px 20px"}} />
str.push({ <Skeleton.Title style={{width: "60%",height:28,margin:"16px 20px"}} />
createUserId: ( <Skeleton.Title style={{width: "90%",height:28,margin:"16px 20px"}} />
<div <Skeleton.Title style={{width: "70%",height:28,margin:"16px 20px"}} />
style={{ <Skeleton.Title style={{width: "50%",height:28,margin:"16px 20px"}} />
width: 30, <Skeleton.Title style={{width: "40%",height:28,margin:"16px 20px"}} />
height: 14, <Skeleton.Title style={{width: "60%",height:28,margin:"16px 20px"}} />
background: "rgba(217, 216, 216, 0.3)", <Skeleton.Title style={{width: "40%",height:28,margin:"16px 20px"}} />
}} </>
></div>
),
operation: (
<div
style={{
width: 50,
height: 14,
background: "rgba(217, 216, 216, 0.3)",
}}
></div>
),
});
} else {
str.push({
createUserId: (
<div
style={{
width: 30,
height: 14,
background: "rgba(217, 216, 216, 0.3)",
}}
></div>
),
operation: (
<div
style={{
width: 50,
height: 14,
background: "rgba(217, 216, 216, 0.3)",
}}
></div>
),
});
}
}
return str;
};
const column = () => {
let str = [];
for (let i = 0; i < columns; i++) {
if (i == columns - 1) {
str.push({
title: (
<div
style={{
width: 30,
height: 14,
background: "rgba(217, 216, 216, 0.5)",
}}
></div>
),
dataIndex: "operation",
key: i,
width: "20%",
});
} else {
str.push({
title: (
<div
style={{
width: 30,
height: 14,
background: "rgba(217, 216, 216, 0.5)",
}}
></div>
),
dataIndex: "createUserId",
key: i,
});
}
}
return str;
};
return (
<>
<Table
columns={column()}
dataSource={data()}
bordered={false}
empty="暂无数据"
style={{
padding: "0px 20px",
}}
pagination={false}
/>
</>
);
} }

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

@ -52,7 +52,6 @@ const CameraHeader = (props) => {
console.log(props) console.log(props)
// //
let isAxyData = props.location.search let isAxyData = props.location.search
if (isAxyData) { if (isAxyData) {
setAxyData(qs.parse(isAxyData.slice(1))) setAxyData(qs.parse(isAxyData.slice(1)))
setCameraModal(true) setCameraModal(true)
@ -93,7 +92,7 @@ const CameraHeader = (props) => {
return "离线" return "离线"
default: default:
return "未知" return "未知"
}F }
} }
function colorStatus (data) { function colorStatus (data) {
@ -673,7 +672,7 @@ const CameraHeader = (props) => {
<Skeleton <Skeleton
loading={loading} loading={loading}
active={true} active={true}
placeholder={skeletonScreen(8, setupp.length)} placeholder={skeletonScreen()}
> >
<Table <Table
columns={setupp.filter((s) => s)} columns={setupp.filter((s) => s)}

7
code/VideoAccess-VCMP/web/client/src/sections/equipmentWarehouse/containers/nvr.jsx

@ -118,6 +118,7 @@ const NvrHeader = (props) => {
width: "20%", width: "20%",
dataIndex: "", dataIndex: "",
render: (_, row) => { render: (_, row) => {
console.log(row)
return ( return (
<div style={{ display: "flex" }}> <div style={{ display: "flex" }}>
<Button theme="borderless"> <Button theme="borderless">
@ -539,7 +540,8 @@ const NvrHeader = (props) => {
</div> </div>
<Skeleton <Skeleton
loading={loading} loading={loading}
placeholder={skeletonScreen(8, setupp.length)} placeholder={skeletonScreen()}
active={true}
> >
<Table <Table
columns={setupp.filter((s) => s)} columns={setupp.filter((s) => s)}
@ -609,6 +611,9 @@ const NvrHeader = (props) => {
history.push({ pathname: '/equipmentWarehouse/camera', query: { addNvr: true, serialNo: nvrRef.current.nvrNumber() } }); history.push({ pathname: '/equipmentWarehouse/camera', query: { addNvr: true, serialNo: nvrRef.current.nvrNumber() } });
setReminder(false) setReminder(false)
}} }}
close={()=>{
setReminder(false)
}}
/> />
</div> </div>
</> </>

Loading…
Cancel
Save