From a5f11323f3f90ccd4ddfca8aeb5beeac74156be2 Mon Sep 17 00:00:00 2001 From: deartibers <947466799@qq.com> Date: Tue, 30 Aug 2022 10:29:38 +0800 Subject: [PATCH 1/3] =?UTF-8?q?=E9=97=AE=E9=A2=98=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../openness/containers/mirroring.jsx | 4 ++-- .../openness/containers/mirroringDetail.jsx | 24 +++++++++++++++---- 2 files changed, 22 insertions(+), 6 deletions(-) diff --git a/code/VideoAccess-VCMP/web/client/src/sections/openness/containers/mirroring.jsx b/code/VideoAccess-VCMP/web/client/src/sections/openness/containers/mirroring.jsx index 78bbf79..52b2577 100644 --- a/code/VideoAccess-VCMP/web/client/src/sections/openness/containers/mirroring.jsx +++ b/code/VideoAccess-VCMP/web/client/src/sections/openness/containers/mirroring.jsx @@ -160,7 +160,7 @@ const Mirroring = (props) => {
{detailList.current.map((item, index) => { return ( -
+
mouseOver(index)}> {
- 最后编辑于:{getTime(item.updateTime)} + 最后编辑于:{getTime(item.updateTime)||getTime(item.createTime)}
最后发布于:{getTime(item.publishTime)} diff --git a/code/VideoAccess-VCMP/web/client/src/sections/openness/containers/mirroringDetail.jsx b/code/VideoAccess-VCMP/web/client/src/sections/openness/containers/mirroringDetail.jsx index f1a5bb6..0db2ba0 100644 --- a/code/VideoAccess-VCMP/web/client/src/sections/openness/containers/mirroringDetail.jsx +++ b/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]) { From 5a52d453d0bd786b71a50137cc679195b0ac6214 Mon Sep 17 00:00:00 2001 From: "gao.zhiyuan" Date: Tue, 30 Aug 2022 10:46:58 +0800 Subject: [PATCH 2/3] =?UTF-8?q?=E8=84=9A=E6=9C=AC=E6=95=B0=E6=8D=AE?= =?UTF-8?q?=E5=BA=93?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../script/1.3.1/data/1_sync_camera_data/index.js | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/code/VideoAccess-VCMP/script/1.3.1/data/1_sync_camera_data/index.js b/code/VideoAccess-VCMP/script/1.3.1/data/1_sync_camera_data/index.js index fb4f02a..8a487a3 100644 --- a/code/VideoAccess-VCMP/script/1.3.1/data/1_sync_camera_data/index.js +++ b/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, }) From 8493d14d6f1beb1b87dad2a8cb4f12f7f0022a36 Mon Sep 17 00:00:00 2001 From: "gao.zhiyuan" Date: Tue, 30 Aug 2022 11:43:49 +0800 Subject: [PATCH 3/3] =?UTF-8?q?=E6=95=B0=E6=8D=AE=E5=BA=93=E9=85=8D?= =?UTF-8?q?=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../script/1.3.1/data/1_sync_camera_data/index.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/code/VideoAccess-VCMP/script/1.3.1/data/1_sync_camera_data/index.js b/code/VideoAccess-VCMP/script/1.3.1/data/1_sync_camera_data/index.js index 8a487a3..6b4631b 100644 --- a/code/VideoAccess-VCMP/script/1.3.1/data/1_sync_camera_data/index.js +++ b/code/VideoAccess-VCMP/script/1.3.1/data/1_sync_camera_data/index.js @@ -10,14 +10,14 @@ try { user: 'FashionAdmin', host: '10.8.40.223', database: 'video-access-test', - password: 'Fas123', + password: 'Fas123_', port: 5432, }) const anxinPool = new Pool({ user: 'FashionAdmin', host: '10.8.40.223', database: 'AnxinCloud', - password: 'Fas123', + password: 'Fas123_', port: 5432, })