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 React from "react";
const ReminderBox = ({ title, wait, toadd, visible, onOk }) => {
const ReminderBox = ({ title, wait, toadd, visible, onOk, close }) => {
return (
<Modal
title={
@ -38,8 +38,7 @@ const ReminderBox = ({ title, wait, toadd, visible, onOk }) => {
</div>
</div>
}
// visible={true}
visible={visible}
visible={visible}
></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 }}>
<img src="/assets/images/avatar/6.png" />
</Avatar>
{user && user.namePresent}
{user && user.displayName}
</div>
}
>

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

@ -48,10 +48,8 @@ const Login = props => {
width: 446,
height: 348,
padding: '45px 60px',
// backgroundImage: "url('/assets/images/background/loginbg.png')",
// backgroundSize: '100% 100%',
// backgroundRepeat: 'no-repeat',
background: 'linear-gradient(rgba(255,255,255,1),rgba(255,255,255,.3))',
background: 'linear-gradient(rgba(255,255,255,0.4),rgba(255,255,255,.3))',
backdropFilter:"saturate(100%) contrast(100%) blur(17px)",
position: 'absolute',
top: '33.89%',
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)}`,
msg: {
option:
"删除成 功!被删除的设备会被存放在“设备回收站”中。并植入“设备回收站”路径。",
"设备会被存放在“设备回收站”中,删除",
},
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.getAbility());
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 = [
//
@ -156,19 +173,19 @@ function cameraModal (props) {
}
function handleChoose (id) {
//
if (!addNvr && !modify) {
if (!addNvr && !modify && !axyData) {
setclickNum(id);
}
}
function turnLift () {
//
if (!addNvr && !modify) {
if (!addNvr && !modify && !axyData) {
setcameraList(cameraList.slice(0, 3));
}
}
function turnRight () {
//
if (!addNvr && !modify) {
if (!addNvr && !modify && !axyData) {
setcameraList(cameraList.slice(1, 4));
}
}
@ -388,7 +405,7 @@ function cameraModal (props) {
}}
onClick={() => handleChoose(item.id)}
>
{modify || addNvr ? item.id == clickNum ? "" : <div style={{
{modify || addNvr ||axyData? item.id == clickNum ? "" : <div style={{
width: 266,
height: 146,
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 { Table } from "@douyinfe/semi-ui";
import { Skeleton } from "@douyinfe/semi-ui";
export function skeletonScreen(line, columns) {
const data = () => {
let str = [];
for (let i = 0; i < line; i++) {
if (i == line - 1) {
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>
),
});
} 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}
/>
</>
);
export function skeletonScreen() {
return <>
<Skeleton.Title style={{width: "95%",height:24,margin:"8px 20px"}} />
<Skeleton.Title style={{width: "80%",height:28,margin:"16px 20px"}} />
<Skeleton.Title style={{width: "50%",height:28,margin:"16px 20px"}} />
<Skeleton.Title style={{width: "60%",height:28,margin:"16px 20px"}} />
<Skeleton.Title style={{width: "90%",height:28,margin:"16px 20px"}} />
<Skeleton.Title style={{width: "70%",height:28,margin:"16px 20px"}} />
<Skeleton.Title style={{width: "50%",height:28,margin:"16px 20px"}} />
<Skeleton.Title style={{width: "40%",height:28,margin:"16px 20px"}} />
<Skeleton.Title style={{width: "60%",height:28,margin:"16px 20px"}} />
<Skeleton.Title style={{width: "40%",height:28,margin:"16px 20px"}} />
</>
}

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

@ -52,7 +52,6 @@ const CameraHeader = (props) => {
console.log(props)
//
let isAxyData = props.location.search
if (isAxyData) {
setAxyData(qs.parse(isAxyData.slice(1)))
setCameraModal(true)
@ -93,7 +92,7 @@ const CameraHeader = (props) => {
return "离线"
default:
return "未知"
}F
}
}
function colorStatus (data) {
@ -673,7 +672,7 @@ const CameraHeader = (props) => {
<Skeleton
loading={loading}
active={true}
placeholder={skeletonScreen(8, setupp.length)}
placeholder={skeletonScreen()}
>
<Table
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%",
dataIndex: "",
render: (_, row) => {
console.log(row)
return (
<div style={{ display: "flex" }}>
<Button theme="borderless">
@ -539,7 +540,8 @@ const NvrHeader = (props) => {
</div>
<Skeleton
loading={loading}
placeholder={skeletonScreen(8, setupp.length)}
placeholder={skeletonScreen()}
active={true}
>
<Table
columns={setupp.filter((s) => s)}
@ -609,6 +611,9 @@ const NvrHeader = (props) => {
history.push({ pathname: '/equipmentWarehouse/camera', query: { addNvr: true, serialNo: nvrRef.current.nvrNumber() } });
setReminder(false)
}}
close={()=>{
setReminder(false)
}}
/>
</div>
</>

Loading…
Cancel
Save