|
|
@ -110,7 +110,8 @@ const MirroringDetail = (props) => { |
|
|
|
const [plainOptions, setPlainOptions] = useState([]);//摄像头选择 |
|
|
|
const [checkedList, setCheckedList] = useState([]);//选中的摄像头列表 |
|
|
|
const [mykeyword, setMykeyword] = useState('');//摄像头搜索 |
|
|
|
const [allCameraList, setAllCameraList] = useState([])//标签组的摄像头列表 |
|
|
|
const [allCameraList, setAllCameraList] = useState([])//所有的摄像头 |
|
|
|
const [labelCameraList, setLabelCameraList] = useState([])//标签组的摄像头 |
|
|
|
const [showCameraList, setShowCameraList] = useState([])//展示的摄像头列表 |
|
|
|
const [saveShowList, setSaveShowList] = useState([])//展示的摄像头列表 |
|
|
|
const [addCamera, setAddCamera] = useState(false);//添加视频弹框 |
|
|
@ -749,6 +750,61 @@ const MirroringDetail = (props) => { |
|
|
|
setAddScreen(true) |
|
|
|
} |
|
|
|
function addLabelGroup (index) {//标签组弹框 |
|
|
|
let myAllCameraList=[] |
|
|
|
for (let j = 0; j < treeData.length; j++) {//第一级 |
|
|
|
if (treeData[j].children) {//有没有子集 |
|
|
|
for (let k = 0; k < treeData[j].children.length; k++) {//第二级 |
|
|
|
if (treeData[j].children[k].children) {//有没有子集 |
|
|
|
for (let l = 0; l < treeData[j].children[k].children.length; l++) {//第三级 |
|
|
|
if (treeData[j].children[k].children[l].children) {//有没有子集 |
|
|
|
for (let p = 0; p < treeData[j].children[k].children[l].children.length; p++) {//第四级 |
|
|
|
if (treeData[j].children[k].children[l].children[p].cameraId) { |
|
|
|
for (let i = 0; i < allCameraList.length; i++) { |
|
|
|
if (allCameraList[i].id == treeData[j].children[k].children[l].children[p].cameraId) { |
|
|
|
myAllCameraList.push(allCameraList[i]) |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
else if (treeData[j].children[k].children[l].cameraId) {//有没有摄像头 |
|
|
|
for (let i = 0; i < allCameraList.length; i++) { |
|
|
|
if (allCameraList[i].value == treeData[j].children[k].children[l].cameraId) { |
|
|
|
myAllCameraList.push(allCameraList[i]) |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
else if (treeData[j].children[k].cameraId) {//有没有摄像头 |
|
|
|
for (let i = 0; i < allCameraList.length; i++) { |
|
|
|
if (allCameraList[i].value == treeData[j].children[k].cameraId) { |
|
|
|
myAllCameraList.push(allCameraList[i]) |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
let myFilterGroupList=JSON.parse(JSON.stringify(filterGroup)) |
|
|
|
for (let i = 0; i < myFilterGroupList.length; i++) { |
|
|
|
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=[] |
|
|
|
for (let k = 0; k < idArr.length; k++) { |
|
|
|
for (let l = 0; l < myAllCameraList.length; l++) { |
|
|
|
if(idArr[k]==myAllCameraList[l].id){ |
|
|
|
newArr.push(idArr[k]) |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
myFilterGroupList[i].filters[j].cameraIds=newArr |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
setFilterGroup(myFilterGroupList) |
|
|
|
setLabelCameraList(myAllCameraList) |
|
|
|
setAddLabelNum(index) |
|
|
|
setAddLabel(true) |
|
|
|
} |
|
|
@ -1022,7 +1078,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)} 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> |
|
|
@ -1099,13 +1155,20 @@ const MirroringDetail = (props) => { |
|
|
|
style={{ width: '100%' }} |
|
|
|
/> |
|
|
|
</div> |
|
|
|
<div style={{ width: 12, height: 12, cursor: 'pointer', marginLeft: 4, display: 'flex' }} onClick={() => { screenDel(index) }}> |
|
|
|
<Popconfirm |
|
|
|
title="是否确认删除该选项组?" |
|
|
|
arrowPointAtCenter={false} |
|
|
|
showArrow={true} |
|
|
|
position="topRight" |
|
|
|
onConfirm={() => screenDel(index)}> |
|
|
|
<div style={{ width: 12, height: 12, cursor: 'pointer', marginLeft: 4, display: 'flex' }}> |
|
|
|
<img |
|
|
|
src="/assets/images/imageImg/nodeDel.png" |
|
|
|
alt="设置" |
|
|
|
style={{ width: '100%' }} |
|
|
|
/> |
|
|
|
</div> |
|
|
|
</Popconfirm> |
|
|
|
<div style={{ width: 12, height: 12, cursor: 'pointer', marginLeft: 4, display: 'flex' }} onClick={() => { addLabelGroup(index) }}> |
|
|
|
<img |
|
|
|
src="/assets/images/imageImg/install.png" |
|
|
@ -1178,7 +1241,7 @@ const MirroringDetail = (props) => { |
|
|
|
<div style={{ padding: '0px 20px 10px 10px' }}> |
|
|
|
<Select multiple value={item.cameraIds} style={{ width: '234px' }} onChange={(val) => { addFiltersCamera(val, index) }} maxTagCount={2} size='large'> |
|
|
|
{ |
|
|
|
allCameraList.map((itm, idx) => { |
|
|
|
labelCameraList.map((itm, idx) => { |
|
|
|
return ( |
|
|
|
<Select.Option value={itm.id} key={idx}>{itm.label}</Select.Option> |
|
|
|
) |
|
|
@ -1209,7 +1272,6 @@ const MirroringDetail = (props) => { |
|
|
|
width={610} |
|
|
|
onCancel={() => { |
|
|
|
setComingVisible(false) |
|
|
|
history.goBack() |
|
|
|
}} |
|
|
|
okText="确定" |
|
|
|
cancelText="取消" |
|
|
|