Browse Source

信鸽服务接口联调

release_1.1.2
deartibers 3 years ago
parent
commit
bb18782141
  1. BIN
      code/VideoAccess-VCMP/web/client/assets/images/background/icon_camera.png
  2. BIN
      code/VideoAccess-VCMP/web/client/assets/images/background/icon_email.png
  3. BIN
      code/VideoAccess-VCMP/web/client/assets/images/background/icon_phone.png
  4. 10
      code/VideoAccess-VCMP/web/client/src/sections/application/components/applyModal.jsx
  5. 49
      code/VideoAccess-VCMP/web/client/src/sections/offline/components/pushSideSheet.jsx
  6. 7
      code/VideoAccess-VCMP/web/client/src/sections/offline/containers/carrierpigeon.jsx

BIN
code/VideoAccess-VCMP/web/client/assets/images/background/icon_camera.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.9 KiB

After

Width:  |  Height:  |  Size: 3.8 KiB

BIN
code/VideoAccess-VCMP/web/client/assets/images/background/icon_email.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.3 KiB

After

Width:  |  Height:  |  Size: 3.5 KiB

BIN
code/VideoAccess-VCMP/web/client/assets/images/background/icon_phone.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 561 B

After

Width:  |  Height:  |  Size: 3.2 KiB

10
code/VideoAccess-VCMP/web/client/src/sections/application/components/applyModal.jsx

@ -19,7 +19,7 @@ const ApplyModal = ({ close, modalName, visible }) => {
return <Modal
title={modalName ? "修改应用" : "创建应用"}
visible={visible}
width={610}
width={494}
onCancel={() => close()}
onOk={handleOk}
>
@ -38,12 +38,12 @@ const ApplyModal = ({ close, modalName, visible }) => {
allowEmpty={false}
initValue={'' || ""}
placeholder="建议命名方式: [应用名 + 应用场景] 如:智慧昌南-消防,不超过15个字符"
style={{ width: 466 }}
placeholder="建议命名方式: [应用名 + 应用场景] 不超过15个字符"
style={{ width: 350 }}
rules={[
{
required: true,
message: "建议命名方式: [应用名 + 应用场景] 如:智慧昌南-消防,不超过15个字符",
message: "建议命名方式: [应用名 + 应用场景] 不超过15个字符",
},
]}
/>
@ -53,7 +53,7 @@ const ApplyModal = ({ close, modalName, visible }) => {
initValue={'' || null}
placeholder="请选择应用类型"
allowEmpty={false}
style={{ width: 150 }}
style={{ width: 350 }}
rules={[{ required: true, message: "请选择应用类型" }]}
>
{[{ name: 'web', id: 'web' }, { name: 'app', id: 'app' }, { name: '小程序', id: '小程序' }, { name: '其他', id: '其他' }].map((item, index) => (

49
code/VideoAccess-VCMP/web/client/src/sections/offline/components/pushSideSheet.jsx

@ -1,6 +1,6 @@
import React, { useState, useRef, useEffect } from "react";
import { connect } from "react-redux";
import { Modal, Spin,Input,Collapse ,SideSheet,Tabs, TabPane,Popover} from "@douyinfe/semi-ui";
import { Modal, Spin,Tag, Space,Collapse ,SideSheet,Tabs, TabPane,Popover} from "@douyinfe/semi-ui";
import moment from "moment";
import './pushSideSheet.less'
import { push } from "react-router-redux";
@ -13,8 +13,8 @@ function pushSideSheet (props) {
} = props;
const { offline } = actions;
const [logList, setLogList] = useState([]);//
const [noticeTest, setNoticeTest] = useState('');//
const [equipmentTest, setEquipmentTest] = useState();//
const [noticeTest, setNoticeTest] = useState([]);//
const [equipmentTest, setEquipmentTest] = useState([]);//
//
useEffect(() => {
@ -30,7 +30,8 @@ function pushSideSheet (props) {
title:getTimeTitle(journal[index].time),
time:getTimeData(journal[index].time),
cameraList:camerTest,
receiverList:receiverTest
receiverList:receiverTest,
noticeWay:journal[index].noticeWay[0],
}
)
}
@ -56,23 +57,21 @@ function pushSideSheet (props) {
for (let j = 0; j < showList.length; j++) {
for (let i = 0; i < timeList.length; i++) {
if(timeList[i].title==showList[j].title){
showList[j].timeList.push({time:timeList[i].time,cameraList:timeList[i].cameraList,receiverList:timeList[i].receiverList})
showList[j].timeList.push({time:timeList[i].time,cameraList:timeList[i].cameraList,receiverList:timeList[i].receiverList,noticeWay:timeList[i].noticeWay,})
}
}
}
setLogList(showList)
let noticeList =''
let noticeList =[]
for (let i = 0; i < pushData.cameraStatusPushReceivers.length; i++) {
noticeList=noticeList+pushData.cameraStatusPushReceivers[i].receiver+';'
noticeList.push(pushData.cameraStatusPushReceivers[i].receiver)
}
setNoticeTest(noticeList)
let equipmentList=''
let equipmentList=[]
for (let i = 0; i < pushData.cameraStatusPushMonitors.length; i++) {
noticeList=noticeList+pushData.cameraStatusPushMonitors[i].camera.name+';'
equipmentList.push(pushData.cameraStatusPushMonitors[i].camera.name)
}
setEquipmentTest(equipmentList)
console.log('pushData',pushData);
}, []);
function getTimeTitle(date){
let year = moment(date).year()+'年'
@ -94,7 +93,7 @@ function pushSideSheet (props) {
<SideSheet title={pushData.name} className='sideSheet' width={670} visible={true} onCancel={sideSheetChange}>
<Tabs type="line">
<TabPane tab="推送日志" itemKey="1">
<Collapse>
<Collapse defaultActiveKey="0">
{logList.map((item, index) => {
return (
<Collapse.Panel header={<div style={{width:'100%',textAlign:'center'}}>{item.title}</div>} itemKey={String(index)} key={index} >
@ -116,7 +115,7 @@ function pushSideSheet (props) {
}>
<div style={{marginRight:24,width:133,textOverflow:'ellipsis',whiteSpace:'nowrap',overflow:'hidden'}}>{itm.cameraList}</div>
</Popover>
<div style={{marginRight:25,width:83}} className='online' >上线及时通知</div>
<div style={{marginRight:25,width:83}} className={itm.noticeWay=='online'?'online':itm.noticeWay=='offline'?'offline':'timing'}>{itm.noticeWay=='online'?'上线及时通知':itm.noticeWay=='offline'?'离线即时通知':'24时定时统计'}</div>
</div>
)
})}
@ -129,9 +128,17 @@ function pushSideSheet (props) {
<img
src="/assets/images/background/icon_camera.png"
alt="设置"
style={{ width: 24, height: 24 }}
style={{ width: 26, height: 26 }}
/>
<div>{equipmentTest}</div>
<div style={{marginTop:1,background: '#F1F5FF',padding:14,minHeight:139}}>
<Space wrap>
{equipmentTest.map((item, index) => {
return(
<Tag color='blue' style={{height:33}} type='solid' key={index}>{item}</Tag>
)
})}
</Space>
</div>
</div>
</TabPane>
<TabPane tab="接收信息" itemKey="3">
@ -139,9 +146,17 @@ function pushSideSheet (props) {
<img
src={pushData.pushWay=='email'?"/assets/images/background/icon_email.png":"/assets/images/background/icon_phone.png"}
alt="设置"
style={{ width: 24, height: 24 }}
style={{ width: 26, height: 26 }}
/>
<div>{noticeTest}</div>
<div style={{marginTop:1,background: '#F1F5FF',padding:14,minHeight:139}}>
<Space wrap>
{noticeTest.map((item, index) => {
return(
<Tag color='blue' style={{height:33}} type='solid' key={index}>{item}</Tag>
)
})}
</Space>
</div>
</div>
</TabPane>
</Tabs>

7
code/VideoAccess-VCMP/web/client/src/sections/offline/containers/carrierpigeon.jsx

@ -198,7 +198,12 @@ const Carrierpigeon = (props) => {
</Button>
<Button onClick={()=>{
dispatch(offline.getPushLog(row.id)).then((res) => {
setJournal(res.payload.data);
if(res.success){
setJournal(res.payload.data);
}
else{
setJournal([]);
}
setPushData(row);
setSideSheetVisible(true);
});

Loading…
Cancel
Save