Browse Source

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

release_1.3.0
wenlele 3 years ago
parent
commit
3f6aea6661
  1. 14
      code/VideoAccess-VCMP/script/1.3.1/data/1_sync_camera_data/index.js
  2. 4
      code/VideoAccess-VCMP/web/client/src/sections/openness/containers/mirroring.jsx
  3. 24
      code/VideoAccess-VCMP/web/client/src/sections/openness/containers/mirroringDetail.jsx

14
code/VideoAccess-VCMP/script/1.3.1/data/1_sync_camera_data/index.js

@ -7,17 +7,17 @@ try {
// 连接数据库
const vcmpPool = new Pool({
user: 'postgres',
host: '10.8.30.32',
database: 'video_access',
password: '123',
user: 'FashionAdmin',
host: '10.8.40.223',
database: 'video-access-test',
password: 'Fas123_',
port: 5432,
})
const anxinPool = new Pool({
user: 'FashionAdmin',
host: '10.8.30.156',
database: 'Anxinyun0726',
password: '123456',
host: '10.8.40.223',
database: 'AnxinCloud',
password: 'Fas123_',
port: 5432,
})

4
code/VideoAccess-VCMP/web/client/src/sections/openness/containers/mirroring.jsx

@ -160,7 +160,7 @@ const Mirroring = (props) => {
<div style={{ display: 'flex', padding: '34px 64px 18px 64px', flexWrap: 'wrap', }}>
{detailList.current.map((item, index) => {
return (
<div key={index} style={{ marginRight: 100 }}>
<div key={index} style={{ marginRight: 84 }}>
<div style={{ position: 'relative', width: '306px', height: 142, boxShadow: '0px 2px 4px 0px rgba(231,231,231,0.5)', }} onMouseOver={() => mouseOver(index)}>
<img
src={item.img}
@ -256,7 +256,7 @@ const Mirroring = (props) => {
</Popconfirm>
</div>
<div style={{ color: 'rgba(0,0,0,0.45)', marginTop: 10, fontSize: 12 }}>
最后编辑于{getTime(item.updateTime)}
最后编辑于{getTime(item.updateTime)||getTime(item.createTime)}
</div>
<div style={{ color: 'rgba(0,0,0,0.45)', marginTop: 8, fontSize: 12 }}>
最后发布于{getTime(item.publishTime)}

24
code/VideoAccess-VCMP/web/client/src/sections/openness/containers/mirroringDetail.jsx

@ -378,6 +378,12 @@ const MirroringDetail = (props) => {
setEditKey('')
}
function cameraAdd (item) {//
let myItemArr=[]
if(item.children){
for (let q = 0; q < item.children.length; q++) {
myItemArr.push(item.children[q].cameraId)
}
}
let myplainOptions = JSON.parse(JSON.stringify(plainOptions))
for (let j = 0; j < treeData.length; j++) {//
if (treeData[j].children) {//
@ -389,7 +395,9 @@ const MirroringDetail = (props) => {
if (treeData[j].children[k].children[l].children[p].cameraId) {
for (let i = 0; i < myplainOptions.length; i++) {
if (myplainOptions[i].value == treeData[j].children[k].children[l].children[p].cameraId) {
myplainOptions.splice(i, 1)
if(myItemArr.indexOf(myplainOptions[i].value)==-1){
myplainOptions.splice(i, 1)
}
}
}
}
@ -398,7 +406,9 @@ const MirroringDetail = (props) => {
else if (treeData[j].children[k].children[l].cameraId) {//
for (let i = 0; i < myplainOptions.length; i++) {
if (myplainOptions[i].value == treeData[j].children[k].children[l].cameraId) {
myplainOptions.splice(i, 1)
if(myItemArr.indexOf(myplainOptions[i].value)==-1){
myplainOptions.splice(i, 1)
}
}
}
}
@ -407,14 +417,17 @@ const MirroringDetail = (props) => {
else if (treeData[j].children[k].cameraId) {//
for (let i = 0; i < myplainOptions.length; i++) {
if (myplainOptions[i].value == treeData[j].children[k].cameraId) {
myplainOptions.splice(i, 1)
if(myItemArr.indexOf(myplainOptions[i].value)==-1){
myplainOptions.splice(i, 1)
}
}
}
}
}
}
}
setCheckedList([])
onChange(myItemArr)
setCheckedList(myItemArr)
setSaveShowList(myplainOptions)
setShowCameraList(myplainOptions)
setAddCamera(true)
@ -570,6 +583,7 @@ const MirroringDetail = (props) => {
let mainData = JSON.parse(JSON.stringify(treeData))
let nodeKeyArr = addCameraKey.split('-')
if (nodeKeyArr.length == 1) {
mainData[nodeKeyArr[0]].children=[]
for (let q = 0; q < plainOptions.length; q++) {
for (let w = 0; w < checkedList.length; w++) {
if (plainOptions[q].value == checkedList[w]) {
@ -617,6 +631,7 @@ const MirroringDetail = (props) => {
}
}
} else if (nodeKeyArr.length == 2) {
mainData[nodeKeyArr[0]].children[nodeKeyArr[1]].children=[]
for (let q = 0; q < plainOptions.length; q++) {
for (let w = 0; w < checkedList.length; w++) {
if (plainOptions[q].value == checkedList[w]) {
@ -668,6 +683,7 @@ const MirroringDetail = (props) => {
}
}
} else if (nodeKeyArr.length == 3) {
mainData[nodeKeyArr[0]].children[nodeKeyArr[1]].children[nodeKeyArr[2]].children=[]
for (let q = 0; q < plainOptions.length; q++) {
for (let w = 0; w < checkedList.length; w++) {
if (plainOptions[q].value == checkedList[w]) {

Loading…
Cancel
Save