|
|
@ -1,9 +1,9 @@ |
|
|
|
import React, { useEffect, useRef, useState } from 'react'; |
|
|
|
import { connect } from 'react-redux'; |
|
|
|
import { Skeleton, Button, Pagination, Form, Popconfirm, Table } from '@douyinfe/semi-ui'; |
|
|
|
import { Skeleton, Button, Pagination, Form, Popconfirm, Table, Tooltip } from '@douyinfe/semi-ui'; |
|
|
|
import { SkeletonScreen, } from "$components"; |
|
|
|
import moment from "moment"; |
|
|
|
import pushModal from '../components/pushModal' |
|
|
|
import PushModal from '../components/pushModal' |
|
|
|
import '../style.less' |
|
|
|
import { Setup } from "$components"; |
|
|
|
// import { set } from 'nprogress'; |
|
|
@ -18,9 +18,8 @@ const EmPush = (props) => { |
|
|
|
const [query, setQuery] = useState({ limit: 10, page: 0 }); //页码信息 |
|
|
|
const [limits, setLimits] = useState()//每页实际条数 |
|
|
|
const mylimits = useRef(); //每页实际条数 |
|
|
|
const [selected, setSelected] = useState([]) //表格被勾选项 |
|
|
|
const [pushModal, setPushModal] = useState(false) //信鸽弹框 |
|
|
|
const [systemEdit, setSystemEdit] = useState(false) //是否是修改 |
|
|
|
const [pushEdit, setPushEdit] = useState(false) //是否是修改 |
|
|
|
const [anxincloudList, setAnxincloudList] = useState([]) //安心云列表 |
|
|
|
const [peplist, setPeplist] = useState([]) //PEP项目管理项目列表 |
|
|
|
const [appList, setAppList] = useState([]) //应用列表 |
|
|
@ -31,20 +30,39 @@ const EmPush = (props) => { |
|
|
|
const [appArr, setAppArr] = useState([]) //修改时添加应用 |
|
|
|
const [bindId, setBindId] = useState() //修改时绑定的id |
|
|
|
const [tableKey, setTableKey] = useState([]) //修改时绑定的id |
|
|
|
const [projectStatus, setProjectStatus] = useState([]); //获取项目状态列表 |
|
|
|
const page = useRef(query.page);//哪一页 |
|
|
|
const EMPUSH = "empush"; |
|
|
|
const tableList = [//表格属性 |
|
|
|
{ |
|
|
|
title: '推送信息', |
|
|
|
list: [ |
|
|
|
{ name: "策略类型", value: "pushWay" }, |
|
|
|
{ name: "推送机制", value: "noticeWay" }, |
|
|
|
{ name: "监听设备数量", value: "monitorCount" }, |
|
|
|
{ name: "累计推送次数", value: "logCount" }, |
|
|
|
] |
|
|
|
}, |
|
|
|
]; |
|
|
|
|
|
|
|
{ |
|
|
|
title: '推送信息', |
|
|
|
list: [ |
|
|
|
{ name: "策略名称", value: "name" }, |
|
|
|
{ name: "创建时间", value: "createTime" }, |
|
|
|
{ name: "关联项目", value: "projectName" }, |
|
|
|
{ name: "接收人", value: "receiverPepUser" }, |
|
|
|
{ name: "推送方式", value: "pushType" }, |
|
|
|
{ name: "监听问题模块", value: "alarmType" }, |
|
|
|
{ name: "生效项目节点", value: "timeType" }, |
|
|
|
{ name: "推送机制", value: "tactics" }, |
|
|
|
{ name: "启用状态", value: "disable" }, |
|
|
|
{ name: "推送次数", value: "pushCount" }, |
|
|
|
] |
|
|
|
}, |
|
|
|
]; |
|
|
|
const alarmTypeObj = { |
|
|
|
data_outages: '数据中断', |
|
|
|
data_exception: '数据异常', |
|
|
|
strategy_hit: '策略命中', |
|
|
|
video_exception: '视频异常', |
|
|
|
app_exception: '应用异常', |
|
|
|
device_exception: '设备异常', |
|
|
|
} |
|
|
|
const tacticsObj = { |
|
|
|
immediately: '即时推送机制', |
|
|
|
continue: '持续时长推送机制', |
|
|
|
abnormal_rate: '异常率推送机制', |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
function handleRow (record, index) {//斑马条纹 |
|
|
@ -63,61 +81,54 @@ const EmPush = (props) => { |
|
|
|
const [tableData, setTableData] = useState([]) //表格数据 |
|
|
|
|
|
|
|
useEffect(() => { |
|
|
|
attribute(); |
|
|
|
dispatch(service.getPush(query)).then((res) => {//获取推送配置列表 |
|
|
|
// console.log('res.payload.datares.payload.data',res.payload.data); |
|
|
|
// setAnxincloudList(res.payload.data) |
|
|
|
}) |
|
|
|
// dispatch(service.getPush(query)).then((res) => {//获取推送配置列表 |
|
|
|
// console.log('res.payload.datares.payload.data',res.payload.data); |
|
|
|
// setAnxincloudList(res.payload.data) |
|
|
|
// }) |
|
|
|
// dispatch(install.getProjectPmanage(query)).then((res) => {//获取PEP项目管理项目 |
|
|
|
// setPeplist(res.payload.data) |
|
|
|
// }) |
|
|
|
// dispatch(install.getProjectAppList(query)).then((res) => {//获取应用列表 |
|
|
|
// setAppList(res.payload.data) |
|
|
|
// }) |
|
|
|
getProjectStatusList() |
|
|
|
localStorage.getItem(EMPUSH) == null |
|
|
|
? localStorage.setItem( |
|
|
|
EMPUSH, |
|
|
|
JSON.stringify(['pushWay','noticeWay','logCount','monitorCount']) |
|
|
|
) |
|
|
|
: ""; |
|
|
|
? localStorage.setItem( |
|
|
|
EMPUSH, |
|
|
|
JSON.stringify(['name', 'createTime', 'projectName', 'receiverPepUser', 'alarmType', 'timeType', 'tactics', 'disable']) |
|
|
|
) |
|
|
|
: ""; |
|
|
|
attribute(); |
|
|
|
}, []) |
|
|
|
useEffect(() => { |
|
|
|
// getProjectPomsList(); |
|
|
|
getPushList(); |
|
|
|
}, [query]); |
|
|
|
|
|
|
|
function getProjectPomsList () { |
|
|
|
// dispatch(install.getProjectPoms(query)).then((res) => {//获取已绑定项目 |
|
|
|
// if (res.success) { |
|
|
|
// let mytableData = JSON.parse(JSON.stringify(res.payload.data.rows)); |
|
|
|
// let mytableKey = [] |
|
|
|
// for (let index = 0; index < mytableData.length; index++) { |
|
|
|
// mytableData[index].key = mytableData[index].id |
|
|
|
// mytableKey.push(mytableData[index].id) |
|
|
|
// } |
|
|
|
// setTableKey(mytableKey) |
|
|
|
// setTableData(mytableData) |
|
|
|
// setLimits(res.payload.data.count) |
|
|
|
// mylimits.current = res.payload.data.rows.length |
|
|
|
// } |
|
|
|
// }) |
|
|
|
function getPushList () { |
|
|
|
dispatch(service.getPush(query)).then((res) => {//获取已绑定项目 |
|
|
|
if (res.success) { |
|
|
|
// let mytableData = JSON.parse(JSON.stringify(res.payload.data.rows)); |
|
|
|
// let mytableKey = [] |
|
|
|
// for (let index = 0; index < mytableData.length; index++) { |
|
|
|
// mytableData[index].key = mytableData[index].id |
|
|
|
// mytableKey.push(mytableData[index].id) |
|
|
|
// } |
|
|
|
// setTableKey(mytableKey) |
|
|
|
// setTableData(mytableData) |
|
|
|
setTableData(res.payload.data) |
|
|
|
setLimits(res.payload.data.length) |
|
|
|
mylimits.current = res.payload.data.length |
|
|
|
} |
|
|
|
}) |
|
|
|
} |
|
|
|
const [columns, setColumns] = useState([//表格属性 |
|
|
|
{ |
|
|
|
title: "策略编号", |
|
|
|
dataIndex: "index", |
|
|
|
key: 'index', |
|
|
|
render: (text, r, index) => { |
|
|
|
return index + 1; |
|
|
|
}, |
|
|
|
}, |
|
|
|
{ |
|
|
|
title: '策略名称', |
|
|
|
dataIndex: "pepProjectName", |
|
|
|
key: 'pepProjectName', |
|
|
|
render: (_, row) => { |
|
|
|
return row.pepProjectName |
|
|
|
function getProjectStatusList () {//获取项目状态列表 |
|
|
|
dispatch(service.getProjectStatus()).then((res) => { |
|
|
|
if (res.success) { |
|
|
|
setProjectStatus(res.payload?.data) |
|
|
|
} |
|
|
|
}, |
|
|
|
}) |
|
|
|
} |
|
|
|
const [columns, setColumns] = useState([//表格属性 |
|
|
|
{ |
|
|
|
title: "操作", |
|
|
|
width: "20%", |
|
|
@ -128,38 +139,38 @@ const EmPush = (props) => { |
|
|
|
<div style={{ display: "flex" }}> |
|
|
|
<Button |
|
|
|
theme="borderless" |
|
|
|
// disabled={row.pepProjectIsDelete == 1} |
|
|
|
// onClick={() => { |
|
|
|
// setPushModal(true); |
|
|
|
// setPepname(row.name) |
|
|
|
// if (!row.name) { |
|
|
|
// setPepProjectId(row.pepProjectId) |
|
|
|
// } |
|
|
|
// else { |
|
|
|
// setPepProjectId() |
|
|
|
// } |
|
|
|
// let myanxinArr = [] |
|
|
|
// let anxinErrorList = [] |
|
|
|
// for (let i = 0; i < row.anxinProject.length; i++) { |
|
|
|
// if (row.anxinProject[i].projectState !== -1) { |
|
|
|
// myanxinArr.push(row.anxinProject[i].id) |
|
|
|
// } |
|
|
|
// else { |
|
|
|
// anxinErrorList.push(row.anxinProject[i].name) |
|
|
|
// } |
|
|
|
// } |
|
|
|
// setAnxinDelete(anxinErrorList) |
|
|
|
// let myapparr = [] |
|
|
|
// let myarrarrList = JSON.parse(JSON.stringify(row.apps)) |
|
|
|
// for (let j = 0; j < row.apps.length; j++) { |
|
|
|
// delete myarrarrList[j].projectApp |
|
|
|
// myapparr.push(JSON.stringify(myarrarrList[j])) |
|
|
|
// } |
|
|
|
// setAppArr(myapparr) |
|
|
|
// setAnxincloudArr(myanxinArr) |
|
|
|
// setBindId(row.id) |
|
|
|
// setSystemEdit(true) |
|
|
|
// }} |
|
|
|
// disabled={row.pepProjectIsDelete == 1} |
|
|
|
// onClick={() => { |
|
|
|
// setPushModal(true); |
|
|
|
// setPepname(row.name) |
|
|
|
// if (!row.name) { |
|
|
|
// setPepProjectId(row.pepProjectId) |
|
|
|
// } |
|
|
|
// else { |
|
|
|
// setPepProjectId() |
|
|
|
// } |
|
|
|
// let myanxinArr = [] |
|
|
|
// let anxinErrorList = [] |
|
|
|
// for (let i = 0; i < row.anxinProject.length; i++) { |
|
|
|
// if (row.anxinProject[i].projectState !== -1) { |
|
|
|
// myanxinArr.push(row.anxinProject[i].id) |
|
|
|
// } |
|
|
|
// else { |
|
|
|
// anxinErrorList.push(row.anxinProject[i].name) |
|
|
|
// } |
|
|
|
// } |
|
|
|
// setAnxinDelete(anxinErrorList) |
|
|
|
// let myapparr = [] |
|
|
|
// let myarrarrList = JSON.parse(JSON.stringify(row.apps)) |
|
|
|
// for (let j = 0; j < row.apps.length; j++) { |
|
|
|
// delete myarrarrList[j].projectApp |
|
|
|
// myapparr.push(JSON.stringify(myarrarrList[j])) |
|
|
|
// } |
|
|
|
// setAppArr(myapparr) |
|
|
|
// setAnxincloudArr(myanxinArr) |
|
|
|
// setBindId(row.id) |
|
|
|
// setPushEdit(true) |
|
|
|
// }} |
|
|
|
> |
|
|
|
修改 |
|
|
|
</Button> |
|
|
@ -186,12 +197,6 @@ const EmPush = (props) => { |
|
|
|
}, |
|
|
|
}, |
|
|
|
]) |
|
|
|
const rowSelection = { |
|
|
|
selectedRowKeys: selected, |
|
|
|
onChange: (selectedRowKeys, selectedRows) => { |
|
|
|
setSelected(selectedRows.map(v => v.key)) |
|
|
|
}, |
|
|
|
} |
|
|
|
//获取表格属性设置 |
|
|
|
function attribute () { |
|
|
|
const arr = localStorage.getItem(EMPUSH) |
|
|
@ -200,59 +205,184 @@ const EmPush = (props) => { |
|
|
|
|
|
|
|
const column = [ |
|
|
|
{ |
|
|
|
title: "关联项目", |
|
|
|
dataIndex: "noticeWay", |
|
|
|
key: "noticeWay", |
|
|
|
render: (_, r, index) => { |
|
|
|
return r.noticeWay; |
|
|
|
}, |
|
|
|
title: '策略名称', |
|
|
|
dataIndex: "name", |
|
|
|
key: 'name', |
|
|
|
render: (_, row) => { |
|
|
|
return row.name |
|
|
|
} |
|
|
|
}, |
|
|
|
{ |
|
|
|
title: "创建时间", |
|
|
|
dataIndex: "logCount", |
|
|
|
key: "logCount", |
|
|
|
dataIndex: "createTime", |
|
|
|
key: "createTime", |
|
|
|
render: (_, r, index) => { |
|
|
|
return (r.logCount + '次') |
|
|
|
return moment(r.createTime).format('YYYY-MM-DD HH:mm:ss'); |
|
|
|
}, |
|
|
|
}, |
|
|
|
{ |
|
|
|
title: "接收人", |
|
|
|
dataIndex: "monitorCount", |
|
|
|
key: "monitorCount", |
|
|
|
title: '关联项目', |
|
|
|
dataIndex: "projectName", |
|
|
|
key: "projectName", |
|
|
|
render: (_, row) => { |
|
|
|
let anxinerror = false |
|
|
|
let anxinerrorArr = '' |
|
|
|
if (row.pomsProject.del == true) { |
|
|
|
anxinerror = true |
|
|
|
anxinerrorArr = row.pomsProject.pepProject?.projectName || row.pomsProject.name |
|
|
|
} |
|
|
|
return ( |
|
|
|
<div style={{ display: 'flex', alignItems: 'center' }}> |
|
|
|
{ |
|
|
|
anxinerror ? ( |
|
|
|
<Tooltip content={anxinerrorArr + ',项目已在【项企PEP】或【映射关系】中被删除,请重选项目!'}> |
|
|
|
<div style={{ marginRight: 5 }}> |
|
|
|
<img src="/assets/images/install/risk.png" alt="" style={{ height: 24, width: 24, }} /> |
|
|
|
</div> |
|
|
|
</Tooltip>) : ('') |
|
|
|
} |
|
|
|
{ |
|
|
|
<div className='myseparator' style={{ display: 'flex', alignItems: 'center' }}> |
|
|
|
<Tooltip content={row.pomsProject.pepProject?.projectName || row.pomsProject.name}> |
|
|
|
<div style={{ width: row.pomsProject?.pepProject?.projectName?.length > 7 || row.pomsProject?.name?.length > 7 ? '112px' : '', whiteSpace: 'nowrap', overflow: 'hidden', textOverflow: 'ellipsis', color: row.pomsProject.del ? '#F93920' : '' }}> |
|
|
|
{row.pomsProject.pepProject?.projectName || row.pomsProject.name} |
|
|
|
</div> |
|
|
|
</Tooltip> |
|
|
|
</div> |
|
|
|
} |
|
|
|
</div> |
|
|
|
) |
|
|
|
} |
|
|
|
}, |
|
|
|
{ |
|
|
|
title: '接收人', |
|
|
|
dataIndex: "receiverPepUser", |
|
|
|
key: 'receiverPepUser', |
|
|
|
render: (_, row) => { |
|
|
|
return ( |
|
|
|
<div style={{ display: 'flex', alignItems: 'center' }}> |
|
|
|
{ |
|
|
|
row.receiverPepUser.map((item, index) => { |
|
|
|
return ( |
|
|
|
<div className='myseparator' key={index} style={{ display: 'flex', alignItems: 'center' }}> |
|
|
|
<div style={{ display: index > 1 ? 'none' : '', color: '#005ABD' }}> |
|
|
|
{item.name} |
|
|
|
</div> |
|
|
|
<div className='separator' style={{ width: 1, height: 12, border: '1px solid #DCDEE0', margin: '0px 10px', display: index > 0 ? 'none' : '' }}></div> |
|
|
|
</div> |
|
|
|
) |
|
|
|
}) |
|
|
|
} |
|
|
|
{ |
|
|
|
row.receiverPepUser.length > 2 ? ( |
|
|
|
<Tooltip content={ |
|
|
|
<div style={{ display: 'flex', flexWrap: 'wrap' }}> |
|
|
|
{ |
|
|
|
row.receiverPepUser.map((item, index) => { |
|
|
|
return ( |
|
|
|
<div key={index} style={{ color: '#005ABD' }}> |
|
|
|
{item.name}, |
|
|
|
</div> |
|
|
|
) |
|
|
|
}) |
|
|
|
} |
|
|
|
</div> |
|
|
|
} trigger="click" style={{ lineHeight: 2 }}> |
|
|
|
<div style={{ fontSize: 14, color: '#005ABD', marginLeft: 8, cursor: "pointer", }}> |
|
|
|
+{row.receiverPepUser.length - 2} |
|
|
|
</div> |
|
|
|
</Tooltip> |
|
|
|
) : ('') |
|
|
|
} |
|
|
|
</div> |
|
|
|
) |
|
|
|
} |
|
|
|
}, |
|
|
|
{ |
|
|
|
title: "推送方式", |
|
|
|
dataIndex: "pushType", |
|
|
|
key: "pushType", |
|
|
|
render: (_, r, index) => { |
|
|
|
return r.monitorCount |
|
|
|
return '邮件通知'; |
|
|
|
}, |
|
|
|
}, |
|
|
|
{ |
|
|
|
title: "监听问题", |
|
|
|
dataIndex: "pushWay", |
|
|
|
key: "pushWay", |
|
|
|
title: "监听问题模块", |
|
|
|
dataIndex: "alarmType", |
|
|
|
key: "alarmType", |
|
|
|
render: (_, row) => { |
|
|
|
return ( |
|
|
|
<div style={{ display: 'flex', alignItems: 'center' }}> |
|
|
|
{ |
|
|
|
// alarmTypeObj |
|
|
|
row.alarmType.map((item, index) => { |
|
|
|
return ( |
|
|
|
<div className='myseparator' key={index} style={{ display: 'flex', alignItems: 'center' }}> |
|
|
|
<div style={{ display: index > 1 ? 'none' : '' }}> |
|
|
|
{alarmTypeObj[item]} |
|
|
|
</div> |
|
|
|
<div className='separator' style={{ width: 1, height: 12, border: '1px solid #DCDEE0', margin: '0px 10px', display: index > 0 ? 'none' : '' }}></div> |
|
|
|
</div> |
|
|
|
) |
|
|
|
}) |
|
|
|
} |
|
|
|
{ |
|
|
|
row.alarmType.length > 2 ? ( |
|
|
|
<Tooltip content={ |
|
|
|
<div style={{ display: 'flex', flexWrap: 'wrap' }}> |
|
|
|
{ |
|
|
|
row.alarmType.map((item, index) => { |
|
|
|
return ( |
|
|
|
<div key={index} > |
|
|
|
{alarmTypeObj[item]}, |
|
|
|
</div> |
|
|
|
) |
|
|
|
}) |
|
|
|
} |
|
|
|
</div> |
|
|
|
} trigger="click" style={{ lineHeight: 2 }}> |
|
|
|
<div style={{ fontSize: 14, color: '#005ABD', marginLeft: 8, cursor: "pointer", }}> |
|
|
|
+{row.alarmType.length - 2} |
|
|
|
</div> |
|
|
|
</Tooltip> |
|
|
|
) : ('') |
|
|
|
} |
|
|
|
</div> |
|
|
|
) |
|
|
|
} |
|
|
|
}, |
|
|
|
{ |
|
|
|
title: "生效项目节点", |
|
|
|
dataIndex: "timeType", |
|
|
|
key: "timeType", |
|
|
|
render: (_, r, index) => { |
|
|
|
return r.pushWay=='email' ? '邮件通知' : '短信通知'; |
|
|
|
// projectStatus |
|
|
|
return r.timeType[0] |
|
|
|
}, |
|
|
|
}, |
|
|
|
{ |
|
|
|
title: "通知时效", |
|
|
|
dataIndex: "text1", |
|
|
|
key: "text1", |
|
|
|
title: "推送机制", |
|
|
|
dataIndex: "tactics", |
|
|
|
key: "tactics", |
|
|
|
render: (_, r, index) => { |
|
|
|
return r.text1 |
|
|
|
return tacticsObj[r.tactics] |
|
|
|
}, |
|
|
|
}, |
|
|
|
{ |
|
|
|
title: "启用状态", |
|
|
|
dataIndex: "text2", |
|
|
|
key: "text2", |
|
|
|
dataIndex: "disable", |
|
|
|
key: "disable", |
|
|
|
render: (_, r, index) => { |
|
|
|
return r.text2 |
|
|
|
// projectStatus |
|
|
|
return r.disable |
|
|
|
}, |
|
|
|
}, |
|
|
|
{ |
|
|
|
title: "推送次数", |
|
|
|
dataIndex: "time", |
|
|
|
key: "time", |
|
|
|
dataIndex: "pushCount", |
|
|
|
key: "pushCount", |
|
|
|
render: (_, r, index) => { |
|
|
|
return r.time |
|
|
|
return r.pushCount |
|
|
|
}, |
|
|
|
}, |
|
|
|
]; |
|
|
@ -260,7 +390,7 @@ const EmPush = (props) => { |
|
|
|
let colum = column.filter((item) => { |
|
|
|
return item.key === arr[i]; |
|
|
|
}); |
|
|
|
columns.splice(i + 2, 0, colum[0]); |
|
|
|
columns.splice(columns.length - 1, 0, colum[0]); |
|
|
|
} |
|
|
|
setSetupp(columns); |
|
|
|
} |
|
|
@ -332,15 +462,15 @@ const EmPush = (props) => { |
|
|
|
height: 32, |
|
|
|
borderRadius: 2, |
|
|
|
marginRight: 32, |
|
|
|
background:'#FFFFFF', |
|
|
|
color:'#005ABD', |
|
|
|
border:'1px solid #005ABD' |
|
|
|
background: '#FFFFFF', |
|
|
|
color: '#005ABD', |
|
|
|
border: '1px solid #005ABD' |
|
|
|
}} |
|
|
|
// onClick={() => { }} |
|
|
|
// onClick={() => { }} |
|
|
|
> |
|
|
|
查询 |
|
|
|
</Button> |
|
|
|
<div style={{display: 'flex', alignItems: 'center'}}> |
|
|
|
<div style={{ display: 'flex', alignItems: 'center' }}> |
|
|
|
<img title='设置' src="/assets/images/problem/setup.png" style={{ width: 18, height: 18, cursor: "pointer" }} onClick={() => setSetup(true)} /> |
|
|
|
</div> |
|
|
|
<Button |
|
|
@ -354,13 +484,7 @@ const EmPush = (props) => { |
|
|
|
}} |
|
|
|
onClick={() => { |
|
|
|
setPushModal(true); |
|
|
|
setSystemEdit(false) |
|
|
|
setPepProjectId() |
|
|
|
setPepname() |
|
|
|
setAnxinDelete([]) |
|
|
|
setAppArr([]) |
|
|
|
setAnxincloudArr() |
|
|
|
setBindId() |
|
|
|
setPushEdit(false); |
|
|
|
}} |
|
|
|
> |
|
|
|
添加推送策略 |
|
|
@ -368,7 +492,7 @@ const EmPush = (props) => { |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<div style={{ display: 'flex', justifyContent: 'space-between', alignItems: 'center', marginBottom: 20, marginTop: 5 }}> |
|
|
|
<div style={{ fontSize: 12, color: '#8B8B8B' }}>预留预留预留预留预留预留预留预留预留预留预留预留预留预留预留预留预留预留预留预留预留预留</div> |
|
|
|
<div style={{ fontSize: 12, color: '#8B8B8B' }}>EM推送提供对映射关系组的项目、结构物问题的监听和通知服务,支持对设备异常率、问题持续时间、即时响应等策略定义的动态推送。</div> |
|
|
|
</div> |
|
|
|
<div style={{ marginTop: 20 }}> |
|
|
|
<Skeleton |
|
|
@ -384,7 +508,6 @@ const EmPush = (props) => { |
|
|
|
empty="暂无数据" |
|
|
|
pagination={false} |
|
|
|
onRow={handleRow} |
|
|
|
rowSelection={rowSelection} |
|
|
|
/> |
|
|
|
</Skeleton> |
|
|
|
<div |
|
|
@ -395,35 +518,6 @@ const EmPush = (props) => { |
|
|
|
}} |
|
|
|
> |
|
|
|
<div> |
|
|
|
<div style={{ display: 'inline-block', lineHeight: '30px', fontSize: 13, color: 'gray' }}>勾选<span style={{ fontWeight: 400, color: '#0F7EFB', }}> {selected.length}条 </span>信息</div> |
|
|
|
<Button onClick={() => { |
|
|
|
if (selected.length == tableKey.length) { |
|
|
|
setSelected([]) |
|
|
|
} |
|
|
|
else { |
|
|
|
setSelected(tableKey) |
|
|
|
} |
|
|
|
}} style={{ fontSize: 13, width: 93, height: 24, borderRadius: '1px', background: '#FFFFFF', border: '1px solid #0F7EFB', color: '#0F7EFB', fontWeight: 400, margin: '0 10px' }}> |
|
|
|
{mylimits.current == selected.length ? '取消全选' : '全选'} |
|
|
|
</Button> |
|
|
|
<Popconfirm |
|
|
|
title="删除后对应的项目全局将无法进入和显示,对应的信鸽服务也会被禁用" |
|
|
|
arrowPointAtCenter={false} |
|
|
|
showArrow={true} |
|
|
|
position="topRight" |
|
|
|
onConfirm={() => { |
|
|
|
// dispatch(install.deleteProjectBind({ bindId: selected.join(','), msg: '删除安心云、项目管理项目绑定关系' })).then(() => { |
|
|
|
// if (page.current > 0 && mylimits.current == selected.length) { |
|
|
|
// setQuery({ limit: 10, page: page.current - 1 }) |
|
|
|
// } else { |
|
|
|
// setQuery({ limit: 10, page: page.current }) |
|
|
|
// } |
|
|
|
// setSelected([]) |
|
|
|
// }) |
|
|
|
}} |
|
|
|
> |
|
|
|
<Button type='primary' theme='solid' style={{ fontSize: 13, width: 93, height: 24, borderRadius: '1px', border: '1px solid #0F7EFB', color: '#FFFFFF', fontWeight: 400, }}>批量删除</Button> |
|
|
|
</Popconfirm> |
|
|
|
</div> |
|
|
|
<div style={{ display: 'flex', }}> |
|
|
|
<span style={{ lineHeight: "30px", fontSize: 13, color: 'rgba(0,90,189,0.8)' }}> |
|
|
@ -438,49 +532,38 @@ const EmPush = (props) => { |
|
|
|
onChange={(currentPage, pageSize) => { |
|
|
|
setQuery({ limit: pageSize, page: currentPage - 1 }); |
|
|
|
page.current = currentPage - 1 |
|
|
|
setSelected([]) |
|
|
|
}} |
|
|
|
/> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
{/* {//映射关系弹框 |
|
|
|
{//推送配置弹框 |
|
|
|
pushModal ? |
|
|
|
<PushModal |
|
|
|
visible={true} |
|
|
|
anxincloudList={anxincloudList} |
|
|
|
systemEdit={systemEdit} |
|
|
|
peplist={peplist} |
|
|
|
appList={appList} |
|
|
|
pepname={pepname} |
|
|
|
anxincloudArr={anxincloudArr} |
|
|
|
pepProjectId={pepProjectId} |
|
|
|
anxinDelete={anxinDelete} |
|
|
|
appArr={appArr} |
|
|
|
bindId={bindId} |
|
|
|
pushEdit={pushEdit} |
|
|
|
cancel={() => { |
|
|
|
setPushModal(false); |
|
|
|
}} |
|
|
|
close={() => { |
|
|
|
setPushModal(false); |
|
|
|
getProjectPomsList() |
|
|
|
getPushList() |
|
|
|
}} > |
|
|
|
</PushModal> : '' |
|
|
|
} */} |
|
|
|
} |
|
|
|
{setup ? ( |
|
|
|
<Setup |
|
|
|
tableType={EMPUSH} |
|
|
|
tableList={tableList} |
|
|
|
close={() => { |
|
|
|
setSetup(false); |
|
|
|
attribute(); |
|
|
|
// setcameraSetup(false); |
|
|
|
}} |
|
|
|
/> |
|
|
|
) : ( |
|
|
|
"" |
|
|
|
)} |
|
|
|
<Setup |
|
|
|
tableType={EMPUSH} |
|
|
|
tableList={tableList} |
|
|
|
close={() => { |
|
|
|
setSetup(false); |
|
|
|
attribute(); |
|
|
|
}} |
|
|
|
/> |
|
|
|
) : ( |
|
|
|
"" |
|
|
|
)} |
|
|
|
</> |
|
|
|
) |
|
|
|
} |
|
|
|