|
|
@ -1,7 +1,7 @@ |
|
|
|
import React, { useEffect, useState, useRef } from 'react'; |
|
|
|
import { connect } from 'react-redux'; |
|
|
|
import '../style.less' |
|
|
|
import { Tree, Popconfirm, Typography, Input, Switch, Modal, Checkbox, CheckboxGroup, Select, Toast, Button } from "@douyinfe/semi-ui" |
|
|
|
import { Tree, Popconfirm, Typography, Input, Switch, Modal, Checkbox, CheckboxGroup, Select, Toast, Button, Notification } from "@douyinfe/semi-ui" |
|
|
|
import VideoScreen from '../components/videoScreen'; |
|
|
|
import { set } from 'nprogress'; |
|
|
|
|
|
|
@ -227,7 +227,13 @@ const MirroringDetail = (props) => { |
|
|
|
filterGroup: filterGroup |
|
|
|
} |
|
|
|
dispatch(openness.putMirror(mirrordata)).then((res) => { |
|
|
|
history.goBack() |
|
|
|
if (res.success) { |
|
|
|
sethasModify(false) |
|
|
|
Notification.success({ |
|
|
|
content: publish?'发布完成':'保存完成', |
|
|
|
duration: 3, |
|
|
|
}) |
|
|
|
} |
|
|
|
}) |
|
|
|
} |
|
|
|
} |
|
|
@ -750,7 +756,7 @@ const MirroringDetail = (props) => { |
|
|
|
setAddScreen(true) |
|
|
|
} |
|
|
|
function addLabelGroup (index) {//标签组弹框 |
|
|
|
let myAllCameraList=[] |
|
|
|
let myAllCameraList = [] |
|
|
|
for (let j = 0; j < treeData.length; j++) {//第一级 |
|
|
|
if (treeData[j].children) {//有没有子集 |
|
|
|
for (let k = 0; k < treeData[j].children.length; k++) {//第二级 |
|
|
@ -786,20 +792,20 @@ const MirroringDetail = (props) => { |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
let myFilterGroupList=JSON.parse(JSON.stringify(filterGroup)) |
|
|
|
let myFilterGroupList = JSON.parse(JSON.stringify(filterGroup)) |
|
|
|
for (let i = 0; i < myFilterGroupList.length; i++) { |
|
|
|
if(myFilterGroupList[i].filters){ |
|
|
|
if (myFilterGroupList[i].filters) { |
|
|
|
for (let j = 0; j < myFilterGroupList[i].filters.length; j++) { |
|
|
|
let idArr=JSON.parse(JSON.stringify(myFilterGroupList[i].filters[j].cameraIds)) |
|
|
|
let newArr=[] |
|
|
|
let idArr = JSON.parse(JSON.stringify(myFilterGroupList[i].filters[j].cameraIds)) |
|
|
|
let newArr = [] |
|
|
|
for (let k = 0; k < idArr.length; k++) { |
|
|
|
for (let l = 0; l < myAllCameraList.length; l++) { |
|
|
|
if(idArr[k]==myAllCameraList[l].id){ |
|
|
|
if (idArr[k] == myAllCameraList[l].id) { |
|
|
|
newArr.push(idArr[k]) |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
myFilterGroupList[i].filters[j].cameraIds=newArr |
|
|
|
myFilterGroupList[i].filters[j].cameraIds = newArr |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
@ -938,7 +944,7 @@ const MirroringDetail = (props) => { |
|
|
|
{ |
|
|
|
editHeaderName ? ( |
|
|
|
<div style={{ fontSize: 16, color: '#FFFFFF', marginLeft: 20 }}> |
|
|
|
<Input value={headerName} onBlur={() => { setEditHeaderName(false) }} onChange={(value) => setHeaderName(value)} style={{ width: 200, color: 'rgba(255,255,255,0.9)', background: 'rgba(0,0,0,0.2)' }} maxLength={20} className='inputpadding'></Input> |
|
|
|
<Input value={headerName} onBlur={() => { setEditHeaderName(false) }} onChange={(value) => { setHeaderName(value); sethasModify(true) }} style={{ width: 200, color: 'rgba(255,255,255,0.9)', background: 'rgba(0,0,0,0.2)' }} maxLength={20} className='inputpadding'></Input> |
|
|
|
</div> |
|
|
|
) : ( |
|
|
|
<div style={{ fontSize: 16, color: '#FFFFFF', marginLeft: 20 }}> |
|
|
@ -1078,7 +1084,7 @@ const MirroringDetail = (props) => { |
|
|
|
<div style={{ display: chooseNum == "1" ? "block" : "none", fontSize: 12 }} className="hasHeader"> |
|
|
|
<div style={{ height: 41, display: 'flex', alignItems: 'center', justifyContent: 'space-between', borderBottom: '1px solid rgba(226,226,226,0.2)' }}> |
|
|
|
<div style={{ marginLeft: 20 }}>header</div> |
|
|
|
<div style={{ marginRight: 13 }}><Switch checked={showHeader} onChange={(v, e) => {setShowHeader(v);sethasModify(true)}} size="small" aria-label="是否有头部"></Switch></div> |
|
|
|
<div style={{ marginRight: 13 }}><Switch checked={showHeader} onChange={(v, e) => { setShowHeader(v); sethasModify(true) }} size="small" aria-label="是否有头部"></Switch></div> |
|
|
|
</div> |
|
|
|
<div style={{ height: 41, display: 'flex', alignItems: 'center', justifyContent: 'space-between', borderBottom: '1px solid rgba(226,226,226,0.2)', cursor: 'pointer' }} onClick={() => { setComingVisible(true) }}> |
|
|
|
<div style={{ marginLeft: 20 }}>自定义样式</div> |
|
|
@ -1144,7 +1150,7 @@ const MirroringDetail = (props) => { |
|
|
|
<div style={{ marginLeft: 20, color: 'rgba(0,0,0,0.65)' }}> |
|
|
|
{ |
|
|
|
editNum == item.num ? ( |
|
|
|
<Input value={item.name} onBlur={() => { toChangeScreen(item.num, item.name) }} onChange={(value) => toEditscreen(value, index)} style={{ width: 120 }} maxLength={8} className='inputpadding' size='small'></Input> |
|
|
|
<Input value={item.name} onBlur={() => { toChangeScreen(item.num, item.name) }} onChange={(value) => { toEditscreen(value, index) }} style={{ width: 120 }} maxLength={8} className='inputpadding' size='small'></Input> |
|
|
|
) : (item.name) |
|
|
|
} |
|
|
|
</div> |
|
|
@ -1219,7 +1225,7 @@ const MirroringDetail = (props) => { |
|
|
|
<div style={{ color: 'rgba(0,0,0,0.65)' }}> |
|
|
|
{ |
|
|
|
labelEditNum == item.num ? ( |
|
|
|
<Input value={item.name} onBlur={() => { toChangeLabel(item.num, item.name, addLabelNum) }} onChange={(value) => toEditLabel(value, index)} style={{ width: 120 }} maxLength={6} className='inputpadding' size='small'></Input> |
|
|
|
<Input value={item.name} onBlur={() => { toChangeLabel(item.num, item.name, addLabelNum) }} onChange={(value) => { toEditLabel(value, index) }} style={{ width: 120 }} maxLength={6} className='inputpadding' size='small'></Input> |
|
|
|
) : (item.name) |
|
|
|
} |
|
|
|
</div> |
|
|
|