Browse Source

接口联调

release_1.3.0
deartibers 2 years ago
parent
commit
3571c81e86
  1. 28
      code/VideoAccess-VCMP/web/client/src/sections/openness/actions/mirroring.js
  2. 76
      code/VideoAccess-VCMP/web/client/src/sections/openness/containers/mirroring.jsx
  3. 3
      code/VideoAccess-VCMP/web/client/src/sections/openness/containers/mirroringDetail.jsx
  4. 6
      code/VideoAccess-VCMP/web/client/src/utils/webapi.js

28
code/VideoAccess-VCMP/web/client/src/sections/openness/actions/mirroring.js

@ -24,4 +24,30 @@ export function getCameraListAll() {//获取摄像头能力列表
msg: { option: "" },
reducer: { name: "" },
});
}
}
export function getMirrorList() {//获取摄像头能力列表
return (dispatch) =>
basicAction({
type: "get",
dispatch: dispatch,
actionType: "GET_MIRROR_LIST",
url: `${ApiTable.getMirrorList}`,
msg: { option: "" },
reducer: { name: "" },
});
}
export function delMirror(orgId) {//删除镜像信息
return (dispatch) =>
basicAction({
type: "del",
dispatch: dispatch,
actionType: "DEL_MIRROR",
url: `${ApiTable.delMirror.replace("{mirrorId}", orgId)}`,
msg: {
option:
"删除推送配置",
},
reducer: { name: "" },
});
}
// putMirrorCopy

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

@ -5,6 +5,7 @@ import '../style.less'
const Mirroring = (props) => {
const { history, dispatch, actions, user, loading, StatusPushList } = props;
const { openness } = actions;
const detailList = useRef([
{
title: '科技蓝',
@ -20,46 +21,33 @@ const Mirroring = (props) => {
color: 'blue'
},
]);
const myCustomList = useRef([
{
title: '智慧小蓝视频融合中心实例实例实例实例',
img: '/assets/images/imageImg/text.png',
color: 'blue',
lastEditTime: '2022-12-22 16:00:57',
lastReleaseTime: '2022-12-22 19:20:57',
typeId: '1511444S4545'
}, {
title: '智慧小蓝视频融合',
img: '/assets/images/imageImg/text.png',
color: 'blue',
lastEditTime: '2022-12-22 16:00:57',
lastReleaseTime: '2022-12-22 19:20:57',
typeId: '1511444S4545'
}, {
title: '智慧小蓝视频融合小蓝视频融合',
img: '/assets/images/imageImg/text.png',
color: 'blue',
lastEditTime: '2022-12-22 16:00:57',
lastReleaseTime: '2022-12-22 19:20:57',
typeId: '1511444S4545'
}, {
title: '智慧小蓝视频融合小蓝视频融合是的阿三打阿三打',
img: '/assets/images/imageImg/text.png',
color: 'blue',
lastEditTime: '2022-12-22 16:00:57',
lastReleaseTime: '2022-12-22 19:20:57',
typeId: '1511444S4545'
},
]);
const [myCustomList,setMyCustomList] = useState([])//
useEffect(() => {
getMirror()
}, []);
function getMirror(){
dispatch(openness.getMirrorList()).then((res) => {
setMyCustomList(res.payload.data)
})
}
const [maskNum, setMaskNum] = useState(1000);
function mouseOver (index) {
function mouseOver (index) {//
setMaskNum(index)
}
function mouseOut () {
function mouseOut () {//
setMaskNum(1000)
}
function todetail(){
function todetail(){//
dispatch(push('/mirroring_detail'));
}
function todelete(id){//
dispatch(openness.delMirror(id)).then((res) => {
getMirror()
})
}
function tocopy(id){
}
return (
<>
@ -142,10 +130,10 @@ const Mirroring = (props) => {
</div>
<div style={{ background: '#FFFFFF', marginTop: 20 }}>
<div style={{ padding: '18px 0px 0px 20px', color: '#34383E', fontSize: 20, fontWeight: 600 }}>应用详情</div>
<div style={{ display: 'flex', padding: '34px 64px 18px 64px', flexWrap: 'wrap', justifyContent: 'space-between' }}>
<div style={{ display: 'flex', padding: '34px 64px 18px 64px', flexWrap: 'wrap', }}>
{detailList.current.map((item, index) => {
return (
<div key={index}>
<div key={index} style={{marginRight:100}}>
<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}
@ -179,13 +167,13 @@ const Mirroring = (props) => {
<div style={{ padding: '18px 0px 0px 20px', display: 'flex', alignItems: 'center' }}>
<div style={{ color: '#34383E', fontSize: 20, fontWeight: 600 }}>我的自定义镜像服务</div>
<div style={{ height: 20, border: '1px solid #1859C1', padding: '0px 12px', fontSize: 14, color: '#1859C1', marginLeft: 4, borderRadius: 2, display: 'flex', alignItems: 'center' }}>
9
{myCustomList.length}
</div>
</div>
<div style={{ display: 'flex', padding: '19px 46px 79px 64px', flexWrap: 'wrap', justifyContent: 'space-between' }}>
{myCustomList.current.map((item, index) => {
<div style={{ display: 'flex', padding: '19px 6px 39px 64px', flexWrap: 'wrap'}}>
{myCustomList.map((item, index) => {
return (
<div style={{ height: 334, width: 362, boxShadow: '1px 2px 12px 1px rgba(217,217,217,0.7)', padding: 16 }} key={index}>
<div style={{ height: 334, width: 362, boxShadow: '1px 2px 12px 1px rgba(217,217,217,0.7)', padding: 16,marginRight:40,marginBottom:40 }} key={index}>
<img
src={item.img}
alt="设置"
@ -227,16 +215,16 @@ const Mirroring = (props) => {
style={{ width: 16, height: 16 }}
/>
</div>
<div style={{ color: '#1859C1', fontSize: 14, marginLeft: 10 }}>
<div style={{ color: '#1859C1', fontSize: 14, marginLeft: 10 }} onClick={()=>todelete(item.id)}>
删除
</div>
</div>
</div>
<div style={{ color: 'rgba(0,0,0,0.45)', marginTop: 10, fontSize: 12 }}>
最后编辑于{item.lastEditTime}
最后编辑于{item.updateTime}
</div>
<div style={{ color: 'rgba(0,0,0,0.45)', marginTop: 8, fontSize: 12 }}>
最后发布于{item.lastReleaseTime}
最后发布于{item.publishTime}
</div>
<div style={{ display: 'flex', justifyContent: 'flex-end', alignItems: 'center', marginTop: 12 }}>
<div style={{ display: 'flex', alignItems: 'center' }}>
@ -247,7 +235,7 @@ const Mirroring = (props) => {
/>
</div>
<div style={{ marginLeft: 4, background: '#1859C1', padding: '2px 8px', color: '#FFFFFF', fontSize: 12, borderRadius: 2 }}>
ID:{item.typeId}
ID:{item.mid}
</div>
</div>
</div>

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

@ -375,7 +375,7 @@ const MirroringDetail = (props) => {
</div>
</Popconfirm>
{
(item.children && item.children.length > 0 && item.children[0].cameraId) || keyArr.length > 2 ? ('') : (
(item.children && item.children.length > 0 && item.children[0].cameraId) || keyArr.length > 2||item.cameraId ? ('') : (
<div style={{ width: 12, height: 12, cursor: 'pointer', marginRight: 4 }} onClick={() => nodeAdd(item)}>
<img
src="/assets/images/imageImg/nodeadd.png"
@ -590,6 +590,7 @@ const MirroringDetail = (props) => {
}
}
}
console.log('mainDatamainDatamainData',mainData);
setTreeData(mainData);
setAddCamera(false);
setMykeyword('')

6
code/VideoAccess-VCMP/web/client/src/utils/webapi.js

@ -67,6 +67,12 @@ export const ApiTable = {
putApplication: 'application', //禁用应用
delApplication: 'application/{appId}', //删除应用
postApplication: 'application', //创建/修改应用
//镜像服务
getMirrorList: 'mirror/list', //获取镜像信息列表
delMirror: 'mirror/{mirrorId}', //删除镜像信息
putMirrorCopy: 'mirror/{mirrorId}/copy', //删除镜像信息
};
export const VideoServeApi = {

Loading…
Cancel
Save