Browse Source

类型添加完成

dev
wenlele 2 years ago
parent
commit
aac030adae
  1. 33
      web/client/src/sections/control/containers/control.jsx
  2. 11
      web/client/src/sections/install/components/systemModal.jsx
  3. 895
      web/client/src/sections/install/containers/system.jsx
  4. 8
      web/client/src/sections/problem/components/sideSheet.jsx

33
web/client/src/sections/control/containers/control.jsx

@ -155,13 +155,7 @@ const Control = ({ dispatch, actions, user, history, loading, socket, pepProject
}) })
} else { } else {
if (ProblemAlarm?.length > 0) { if (ProblemAlarm?.length > 0) {
ProblemAlarm.sort((a, b) => { ProblemAlarm.sort((a, b) => (moment(a.StartTime).isBefore(b.StartTime) ? 1 : -1))
if (moment(a.StartTime).isBefore(b.StartTime)) {
return 1
} else {
return -1
}
})
setProblemsList([...ProblemAlarm, ...problemsList]) setProblemsList([...ProblemAlarm, ...problemsList])
} }
} }
@ -187,19 +181,12 @@ const Control = ({ dispatch, actions, user, history, loading, socket, pepProject
} }
}) })
} }
newest.sort((a, b) => { newest.sort((a, b) => (moment(a.time).isBefore(b.time) ? 1 : -1))
if (moment(a.time).isBefore(b.time)) {
return 1
} else {
return -1
}
})
querydata.current = [...newest, ...querydata.current] querydata.current = [...newest, ...querydata.current]
setQueryData1([...querydata.current]) setQueryData1([...querydata.current])
} }
}, [socketData]) }, [socketData])
console.log(querydata.current);
useEffect(() => { useEffect(() => {
consoleToollink() consoleToollink()
@ -423,13 +410,7 @@ const Control = ({ dispatch, actions, user, history, loading, socket, pepProject
id: v.id, id: v.id,
})) }))
} }
data.sort((a, b) => { data.sort((a, b) => (moment(a.time).isBefore(b.time) ? 1 : -1))
if (moment(a.time).isBefore(b.time)) {
return 1
} else {
return -1
}
})
// console.log(data) // console.log(data)
querydata.current = data querydata.current = data
setQueryData1(data) setQueryData1(data)
@ -505,13 +486,7 @@ const Control = ({ dispatch, actions, user, history, loading, socket, pepProject
id: v.id, id: v.id,
})) }))
} }
data.sort((a, b) => { data.sort((a, b) => (moment(a.time).isBefore(b.time) ? 1 : -1))
if (moment(a.time).isBefore(b.time)) {
return 1
} else {
return -1
}
})
querydata.current = data querydata.current = data
setQueryData1(data) setQueryData1(data)
} }

11
web/client/src/sections/install/components/systemModal.jsx

@ -20,7 +20,8 @@ function adminModal (props) {
anxincloudArr,// anxincloudArr,//
anxinDelete,//, anxinDelete,//,
appArr,// appArr,//
bindId bindId,
mapping //
} = props; } = props;
const { install } = actions; const { install } = actions;
const form = useRef();// const form = useRef();//
@ -236,16 +237,14 @@ function adminModal (props) {
} }
</Form.Select> </Form.Select>
<Form.Select <Form.Select
label="添加映射分类:" label="映射分类:"
field="mappingClass" field="mappingClass"
multiple
filter filter
placeholder="请选择映射类型" placeholder="请选择映射类型"
style={{ width: 425 }} style={{ width: 425 }}
initValue={appArr || []} initValue={mapping}
showClear showClear
renderSelectedItem={renderMultipleWithCustomTag} >
>
{ {
[ [
{ name: '智慧类', value: 'wisdom' }, { name: '智慧类', value: 'wisdom' },

895
web/client/src/sections/install/containers/system.jsx

@ -8,472 +8,477 @@ import '../style.less'
import { set } from 'nprogress'; import { set } from 'nprogress';
const Example = (props) => { const Example = (props) => {
const { dispatch, actions, user, loading, socket } = props const { dispatch, actions, user, loading, socket } = props
const { install } = actions; const { install } = actions;
const [query, setQuery] = useState({ limit: 10, page: 0 }); // const [query, setQuery] = useState({ limit: 10, page: 0 }); //
const [limits, setLimits] = useState()// const [limits, setLimits] = useState()//
const mylimits = useRef(); // const mylimits = useRef(); //
const [selected, setSelected] = useState([]) // const [selected, setSelected] = useState([]) //
const [systemModal, setSystemModal] = useState(false) // const [systemModal, setSystemModal] = useState(false) //
const [systemEdit, setSystemEdit] = useState(false) // const [systemEdit, setSystemEdit] = useState(false) //
const [anxincloudList, setAnxincloudList] = useState([]) // const [anxincloudList, setAnxincloudList] = useState([]) //
const [peplist, setPeplist] = useState([]) //PEP const [peplist, setPeplist] = useState([]) //PEP
const [appList, setAppList] = useState([]) // const [appList, setAppList] = useState([]) //
const [pepProjectId, setPepProjectId] = useState() //id const [pepProjectId, setPepProjectId] = useState() //id
const [anxincloudArr, setAnxincloudArr] = useState([]) // const [anxincloudArr, setAnxincloudArr] = useState([]) //
const [pepname, setPepname] = useState() // const [pepname, setPepname] = useState() //
const [anxinDelete, setAnxinDelete] = useState([]) //, const [anxinDelete, setAnxinDelete] = useState([]) //,
const [appArr, setAppArr] = useState([]) // const [appArr, setAppArr] = useState([]) //
const [bindId, setBindId] = useState() //id const [bindId, setBindId] = useState() //id
const [tableKey, setTableKey] = useState([]) //id const [tableKey, setTableKey] = useState([]) //id
const page = useRef(query.page);// const page = useRef(query.page);//
const [mapping, setMapping] = useState() //
function handleRow (record, index) {// function handleRow (record, index) {//
// //
if (index % 2 === 0) { if (index % 2 === 0) {
return { return {
style: { style: {
background: '#FAFCFF', background: '#FAFCFF',
} }
}; };
} else { } else {
return {}; return {};
} }
} }
const [tableData, setTableData] = useState([]) // const [tableData, setTableData] = useState([]) //
const getPepProject = ()=>{ const getPepProject = () => {
dispatch(install.getProjectPmanage(query)).then((res) => {//PEP dispatch(install.getProjectPmanage(query)).then((res) => {//PEP
setPeplist(res.payload.data) setPeplist(res.payload.data)
}) })
} }
useEffect(() => { useEffect(() => {
dispatch(install.getProjectAnxincloud(query)).then((res) => {// dispatch(install.getProjectAnxincloud(query)).then((res) => {//
setAnxincloudList(res.payload.data) setAnxincloudList(res.payload.data)
}) })
getPepProject() getPepProject()
dispatch(install.getProjectAppList(query)).then((res) => {// dispatch(install.getProjectAppList(query)).then((res) => {//
setAppList(res.payload.data) setAppList(res.payload.data)
}) })
console.log('user',user); console.log('user', user);
}, []) }, [])
useEffect(() => { useEffect(() => {
getProjectPomsList(); getProjectPomsList();
}, [query]); }, [query]);
function getProjectPomsList () { function getProjectPomsList () {
dispatch(install.getProjectPoms(query)).then((res) => {// dispatch(install.getProjectPoms(query)).then((res) => {//
if (res.success) { if (res.success) {
let mytableData = JSON.parse(JSON.stringify(res.payload.data.rows)); let mytableData = JSON.parse(JSON.stringify(res.payload.data.rows));
let mytableKey = [] let mytableKey = []
for (let index = 0; index < mytableData.length; index++) { for (let index = 0; index < mytableData.length; index++) {
mytableData[index].key = mytableData[index].id mytableData[index].key = mytableData[index].id
mytableKey.push(mytableData[index].id) mytableKey.push(mytableData[index].id)
}
setTableKey(mytableKey)
setTableData(mytableData)
setLimits(res.payload.data.count)
mylimits.current = res.payload.data.rows.length
} }
}) setTableKey(mytableKey)
} setTableData(mytableData)
const [columns, setColumns] = useState([// setLimits(res.payload.data.count)
{ mylimits.current = res.payload.data.rows.length
title: "序号", }
dataIndex: "index", })
key: 'index', }
render: (text, r, index) => { const [columns, setColumns] = useState([//
return index + 1; {
}, title: "序号",
}, dataIndex: "index",
{ key: 'index',
title: 'PEP项企项目名称', render: (text, r, index) => {
dataIndex: "pepProjectName", return index + 1;
key: 'pepProjectName', },
render: (_, row) => { },
return ( {
<div style={{ display: 'flex', alignItems: 'center' }}> title: 'PEP项企项目名称',
{ dataIndex: "pepProjectName",
row.pepProjectIsDelete == 1 ? ( key: 'pepProjectName',
<Tooltip content={'失效,项目已在【项企PEP】中被删除!'}> render: (_, row) => {
<div style={{ marginRight: 5 }}> return (
<img src="/assets/images/install/risk.png" alt="" style={{ height: 24, width: 24, }} /> <div style={{ display: 'flex', alignItems: 'center' }}>
</div> {
</Tooltip>) : ('') row.pepProjectIsDelete == 1 ? (
} <Tooltip content={'失效,项目已在【项企PEP】中被删除!'}>
<Tooltip content={row.pepProjectName || row.name}> <div style={{ marginRight: 5 }}>
<div style={{ color: row.pepProjectIsDelete == 1 ? 'rgb(249, 57, 32)' : '', width: row?.pepProjectName?.length > 7 || row?.name?.length > 7 ? '112px' : '', whiteSpace: 'nowrap', overflow: 'hidden', textOverflow: 'ellipsis' }}> <img src="/assets/images/install/risk.png" alt="" style={{ height: 24, width: 24, }} />
{row.pepProjectName || row.name} </div>
</div> </Tooltip>) : ('')
}
<Tooltip content={row.pepProjectName || row.name}>
<div style={{ color: row.pepProjectIsDelete == 1 ? 'rgb(249, 57, 32)' : '', width: row?.pepProjectName?.length > 7 || row?.name?.length > 7 ? '112px' : '', whiteSpace: 'nowrap', overflow: 'hidden', textOverflow: 'ellipsis' }}>
{row.pepProjectName || row.name}
</div>
</Tooltip>
{
row.pepProjectName ? (
<div style={{
height: 18, marginLeft: 4,
background: 'linear-gradient(180deg, #EBF5FF 0%, #EBF5FF 0%, #D3E8FF 100%)',
borderRadius: 2, display: 'flex', alignItems: 'center'
}}>
<div>
<img src="/assets/images/install/icon_zhengque.png" alt="" style={{ height: 10, width: 10, marginLeft: 4, marginRight: 9 }} />
</div>
<div style={{ color: '#0F7EFB', fontSize: 11, marginRight: 12 }}>
{row.constructionStatus}
</div>
</div>
) : (
<div style={{
height: 18, marginLeft: 4,
background: 'linear-gradient(180deg, #99C7DD 0%, #3048FC 100%)',
borderRadius: 2, display: 'flex', alignItems: 'center'
}}>
<div>
<img src="/assets/images/install/icon_POMS.png" alt="" style={{ height: 10, width: 10, marginLeft: 4, marginRight: 9 }} />
</div>
<div style={{ color: '#FFFFFF', fontSize: 11, marginRight: 12 }}>
POMS
</div>
</div>
)
}
</div>
)
}
},
{
title: '安心云项目名称',
dataIndex: "anxinProject",
key: 'anxinProject',
width: 500,
render: (_, row) => {
let anxinerror = false
let anxinerrorArr = []
for (let i = 0; i < row.anxinProject.length; i++) {
if (row.anxinProject[i].projectState == -1) {
anxinerror = true
anxinerrorArr.push(row.anxinProject[i].name)
}
}
return (
<div style={{ display: 'flex', alignItems: 'center' }}>
{
anxinerror ? (
<Tooltip content={anxinerrorArr.join(',') + ',项目已在【安心云】中被删除'}>
<div style={{ marginRight: 5 }}>
<img src="/assets/images/install/risk.png" alt="" style={{ height: 24, width: 24, }} />
</div>
</Tooltip>) : ('')
}
{
row.anxinProject.map((item, index) => {
return (
<div className='myseparator' key={index} style={{ display: 'flex', alignItems: 'center' }}>
{
row.anxinProject.length >= 3 ? (
<Tooltip content={item.name}>
<div style={{ width: item.name.length > 7 ? '112px' : '', whiteSpace: 'nowrap', overflow: 'hidden', textOverflow: 'ellipsis', display: index > 2 ? 'none' : '', color: item.projectState == -1 ? '#F93920' : '' }}>
{item.name}
</div>
</Tooltip>
) : row.anxinProject.length == 2 ? (
<Tooltip content={item.name}>
<div style={{ width: item.name.length > 12 ? '173.5px' : '', whiteSpace: 'nowrap', overflow: 'hidden', textOverflow: 'ellipsis', color: item.projectState == -1 ? '#F93920' : '' }}>
{item.name}
</div>
</Tooltip>
) : (
<Tooltip content={item.name}>
<div style={{ width: item.name.length > 25 ? '358px' : '', whiteSpace: 'nowrap', overflow: 'hidden', textOverflow: 'ellipsis', color: item.projectState == -1 ? '#F93920' : '' }}>
{item.name}
</div>
</Tooltip>
)
}
<div className='separator' style={{ width: 1, height: 12, border: '1px solid #DCDEE0', margin: '0px 10px', display: index > 1 ? 'none' : '' }}></div>
</div>
)
})
}
{
row.anxinProject.length > 3 ? (
<Tooltip content={
<div style={{ display: 'flex', flexWrap: 'wrap' }}>
{
row.anxinProject.map((item, index) => {
return (
<div key={index} style={{ color: item.projectState == -1 ? '#F93920' : '' }}>
{item.name}<span style={{ color: '#FFFFFF' }}>,</span>
</div>
)
})
}
</div>
} trigger="click" style={{ lineHeight: 2 }}>
<div style={{ fontSize: 14, color: '#005ABD', marginLeft: 8, cursor: "pointer", }}>
+{row.anxinProject.length - 3}
</div>
</Tooltip> </Tooltip>
{ ) : ('')
row.pepProjectName ? ( }
<div style={{ </div>
height: 18, marginLeft: 4, )
background: 'linear-gradient(180deg, #EBF5FF 0%, #EBF5FF 0%, #D3E8FF 100%)', }
borderRadius: 2, display: 'flex', alignItems: 'center' },
}}> {
<div> title: '关联时间',
<img src="/assets/images/install/icon_zhengque.png" alt="" style={{ height: 10, width: 10, marginLeft: 4, marginRight: 9 }} /> dataIndex: "createTime",
</div> key: 'time',
<div style={{ color: '#0F7EFB', fontSize: 11, marginRight: 12 }}> render: (_, row) => {
{row.constructionStatus} return moment(row.createTime).format("YYYY-MM-DD HH:mm:ss")
</div> }
</div> },
) : ( {
<div style={{ title: '修改时间',
height: 18, marginLeft: 4, dataIndex: "updateTime",
background: 'linear-gradient(180deg, #99C7DD 0%, #3048FC 100%)', key: 'updateTime',
borderRadius: 2, display: 'flex', alignItems: 'center' render: (_, row) => {
}}> return moment(row.updateTime).format("YYYY-MM-DD HH:mm:ss")
<div> }
<img src="/assets/images/install/icon_POMS.png" alt="" style={{ height: 10, width: 10, marginLeft: 4, marginRight: 9 }} /> },
</div> {
<div style={{ color: '#FFFFFF', fontSize: 11, marginRight: 12 }}> title: '添加人员',
POMS dataIndex: "pepUserName",
</div> key: 'pepUserName',
</div> render: (_, row) => {
) return row.pepUserName
}
},
{
title: "管理",
width: "20%",
dataIndex: "text",
key: 'text',
render: (_, row) => {
return (
<div style={{ display: "flex" }}>
<Button
theme="borderless"
disabled={row.pepProjectIsDelete == 1}
onClick={() => {
setSystemModal(true);
setPepname(row.name)
if (!row.name) {
setPepProjectId(row.pepProjectId)
} }
</div> else {
) setPepProjectId()
}
},
{
title: '安心云项目名称',
dataIndex: "anxinProject",
key: 'anxinProject',
width: 500,
render: (_, row) => {
let anxinerror = false
let anxinerrorArr = []
for (let i = 0; i < row.anxinProject.length; i++) {
if (row.anxinProject[i].projectState == -1) {
anxinerror = true
anxinerrorArr.push(row.anxinProject[i].name)
}
}
return (
<div style={{ display: 'flex', alignItems: 'center' }}>
{
anxinerror ? (
<Tooltip content={anxinerrorArr.join(',') + ',项目已在【安心云】中被删除'}>
<div style={{ marginRight: 5 }}>
<img src="/assets/images/install/risk.png" alt="" style={{ height: 24, width: 24, }} />
</div>
</Tooltip>) : ('')
} }
{ let myanxinArr = []
row.anxinProject.map((item, index) => { let anxinErrorList = []
return ( for (let i = 0; i < row.anxinProject.length; i++) {
<div className='myseparator' key={index} style={{ display: 'flex', alignItems: 'center' }}> if (row.anxinProject[i].projectState !== -1) {
{ myanxinArr.push(row.anxinProject[i].id)
row.anxinProject.length >= 3 ? ( }
<Tooltip content={item.name}> else {
<div style={{ width: item.name.length > 7 ? '112px' : '', whiteSpace: 'nowrap', overflow: 'hidden', textOverflow: 'ellipsis', display: index > 2 ? 'none' : '', color: item.projectState == -1 ? '#F93920' : '' }}> anxinErrorList.push(row.anxinProject[i].name)
{item.name} }
</div>
</Tooltip>
) : row.anxinProject.length == 2 ? (
<Tooltip content={item.name}>
<div style={{ width: item.name.length > 12 ? '173.5px' : '', whiteSpace: 'nowrap', overflow: 'hidden', textOverflow: 'ellipsis', color: item.projectState == -1 ? '#F93920' : '' }}>
{item.name}
</div>
</Tooltip>
) : (
<Tooltip content={item.name}>
<div style={{ width: item.name.length > 25 ? '358px' : '', whiteSpace: 'nowrap', overflow: 'hidden', textOverflow: 'ellipsis', color: item.projectState == -1 ? '#F93920' : '' }}>
{item.name}
</div>
</Tooltip>
)
}
<div className='separator' style={{ width: 1, height: 12, border: '1px solid #DCDEE0', margin: '0px 10px', display: index > 1 ? 'none' : '' }}></div>
</div>
)
})
} }
{ setAnxinDelete(anxinErrorList)
row.anxinProject.length > 3 ? ( let myapparr = []
<Tooltip content={ let myarrarrList = JSON.parse(JSON.stringify(row.apps))
<div style={{ display: 'flex', flexWrap: 'wrap' }}> for (let j = 0; j < row.apps.length; j++) {
{ delete myarrarrList[j].projectApp
row.anxinProject.map((item, index) => { myapparr.push(JSON.stringify(myarrarrList[j]))
return (
<div key={index} style={{ color: item.projectState == -1 ? '#F93920' : '' }}>
{item.name}<span style={{ color: '#FFFFFF' }}>,</span>
</div>
)
})
}
</div>
} trigger="click" style={{ lineHeight: 2 }}>
<div style={{ fontSize: 14, color: '#005ABD', marginLeft: 8, cursor: "pointer", }}>
+{row.anxinProject.length - 3}
</div>
</Tooltip>
) : ('')
} }
</div>
) setAppArr(myapparr)
} setAnxincloudArr(myanxinArr)
}, setBindId(row.id)
{ setMapping(row?.mappingClass)
title: '关联时间', setSystemEdit(true)
dataIndex: "createTime", }}
key: 'time', >
render: (_, row) => { 修改
return moment(row.createTime).format("YYYY-MM-DD HH:mm:ss"); </Button>
} <Popconfirm
}, title="删除后对应的项目全局将无法进入和显示,对应的信鸽服务也会被删除"
{ arrowPointAtCenter={false}
title: '修改时间', showArrow={true}
dataIndex: "updateTime", position="topRight"
key: 'updateTime', onConfirm={() => {
render: (_, row) => { dispatch(install.deleteProjectBind({ bindId: row?.id, msg: '删除安心云、项目管理项目绑定关系' })).then(() => {
return moment(row.updateTime).format("YYYY-MM-DD HH:mm:ss"); getPepProject()
} if (page.current > 0 && mylimits.current < 2) {
}, setQuery({ limit: 10, page: page.current - 1 })
{ } else {
title: '添加人员', setQuery({ limit: 10, page: page.current })
dataIndex: "pepUserName", }
key: 'pepUserName', })
render: (_, row) => { }}
return row.pepUserName >
} <Button theme="borderless">删除</Button>
}, </Popconfirm>
{ </div >
title: "管理", );
width: "20%", },
dataIndex: "text", },
key: 'text', ])
render: (_, row) => { const rowSelection = {
return ( selectedRowKeys: selected,
<div style={{ display: "flex" }}> // onSelect: (record, selected) => {
<Button // // console.log(`select row: ${selected}`, record);
theme="borderless" // },
disabled={row.pepProjectIsDelete == 1} // onSelectAll: (selected, selectedRows) => {
onClick={() => { // // console.log(`select all rows: ${selected}`, selectedRows);
setSystemModal(true); // },
setPepname(row.name) onChange: (selectedRowKeys, selectedRows) => {
if (!row.name) { setSelected(selectedRows.map(v => v.key))
setPepProjectId(row.pepProjectId) },
} }
else { return (
setPepProjectId() <>
} <div style={{ background: '#FFFFFF', margin: '8px 12px', padding: '20px 20px 0px 20px' }}>
let myanxinArr = [] <div style={{ display: 'flex', alignItems: 'center', justifyContent: 'space-between' }}>
let anxinErrorList = [] <div style={{ display: 'flex', alignItems: 'center' }}>
for (let i = 0; i < row.anxinProject.length; i++) { <div style={{ width: 0, height: 20, borderLeft: '3px solid #005ABD', borderTop: '3px solid transparent', borderBottom: '3px solid transparent' }}></div>
if (row.anxinProject[i].projectState !== -1) { <div style={{ fontFamily: "YouSheBiaoTiHei", fontSize: 24, color: '#101531', marginLeft: 8 }}>系统映射</div>
myanxinArr.push(row.anxinProject[i].id) <div style={{ marginLeft: 6, fontSize: 12, color: '#969799', fontFamily: "DINExp", }}>ASSOCIATION & MAPPING</div>
} </div>
else { <div style={{ marginRight: 20 }}>
anxinErrorList.push(row.anxinProject[i].name) <Button
} theme="solid"
} type="primary"
setAnxinDelete(anxinErrorList) style={{
let myapparr = [] width: 108,
let myarrarrList = JSON.parse(JSON.stringify(row.apps)) height: 32,
for (let j = 0; j < row.apps.length; j++) { borderRadius: 2,
delete myarrarrList[j].projectApp marginLeft: 40
myapparr.push(JSON.stringify(myarrarrList[j])) }}
} onClick={() => {
setAppArr(myapparr) setSystemModal(true);
setAnxincloudArr(myanxinArr) setSystemEdit(false)
setBindId(row.id) setPepProjectId()
setSystemEdit(true) setPepname()
}} setAnxinDelete([])
> setAppArr([])
修改 setAnxincloudArr()
</Button> setBindId()
<Popconfirm setMapping('')
title="删除后对应的项目全局将无法进入和显示,对应的信鸽服务也会被删除" }}
arrowPointAtCenter={false} >
showArrow={true} 添加映射关系
position="topRight" </Button>
onConfirm={() => { </div>
dispatch(install.deleteProjectBind({ bindId: row?.id, msg: '删除安心云、项目管理项目绑定关系' })).then(() => { </div>
getPepProject() <div style={{ display: 'flex', justifyContent: 'space-between', alignItems: 'center', marginBottom: 20, marginTop: 5 }}>
if (page.current > 0 && mylimits.current < 2) { <div style={{ fontSize: 12, color: '#8B8B8B' }}>平台通过映射能力将多个系统的结构化非结构化半结构化数据按照平台算法进行分类关联形成整体项目信息结构以项企PEP的项目名称进行规范</div>
setQuery({ limit: 10, page: page.current - 1 })
} else {
setQuery({ limit: 10, page: page.current })
}
})
}}
>
<Button theme="borderless">删除</Button>
</Popconfirm>
</div>
);
},
},
])
const rowSelection = {
selectedRowKeys: selected,
// onSelect: (record, selected) => {
// // console.log(`select row: ${selected}`, record);
// },
// onSelectAll: (selected, selectedRows) => {
// // console.log(`select all rows: ${selected}`, selectedRows);
// },
onChange: (selectedRowKeys, selectedRows) => {
setSelected(selectedRows.map(v => v.key))
},
}
return (
<>
<div style={{ background: '#FFFFFF', margin: '8px 12px', padding: '20px 20px 0px 20px' }}>
<div style={{ display: 'flex', alignItems: 'center', justifyContent: 'space-between' }}>
<div style={{ display: 'flex', alignItems: 'center' }}>
<div style={{ width: 0, height: 20, borderLeft: '3px solid #005ABD', borderTop: '3px solid transparent', borderBottom: '3px solid transparent' }}></div>
<div style={{ fontFamily: "YouSheBiaoTiHei", fontSize: 24, color: '#101531', marginLeft: 8 }}>系统映射</div>
<div style={{ marginLeft: 6, fontSize: 12, color: '#969799', fontFamily: "DINExp", }}>ASSOCIATION & MAPPING</div>
</div>
<div style={{ marginRight: 20 }}>
<Button
theme="solid"
type="primary"
style={{
width: 108,
height: 32,
borderRadius: 2,
marginLeft: 40
}}
onClick={() => {
setSystemModal(true);
setSystemEdit(false)
setPepProjectId()
setPepname()
setAnxinDelete([])
setAppArr([])
setAnxincloudArr()
setBindId()
}}
>
添加映射关系
</Button>
</div>
</div>
<div style={{ display: 'flex', justifyContent: 'space-between', alignItems: 'center', marginBottom: 20, marginTop: 5 }}>
<div style={{ fontSize: 12, color: '#8B8B8B' }}>平台通过映射能力将多个系统的结构化非结构化半结构化数据按照平台算法进行分类关联形成整体项目信息结构以项企PEP的项目名称进行规范</div>
</div>
<div style={{ marginTop: 20 }}>
<Skeleton
loading={loading}
active={true}
placeholder={SkeletonScreen()}
>
<Table
columns={columns}
dataSource={tableData}
bordered={false}
empty="暂无数据"
pagination={false}
onRow={handleRow}
rowSelection={rowSelection}
/>
</Skeleton>
<div
style={{
display: "flex",
justifyContent: "space-between",
padding: "20px 20px",
}}
>
<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)' }}>
{limits}条信息
</span>
<Pagination
className="22"
total={limits}
showSizeChanger
currentPage={query.page + 1}
pageSizeOpts={[10, 20, 30, 40]}
onChange={(currentPage, pageSize) => {
setQuery({ limit: pageSize, page: currentPage - 1 });
page.current = currentPage - 1
setSelected([])
}}
/>
</div>
</div>
</div>
</div> </div>
{// <div style={{ marginTop: 20 }}>
systemModal ? <Skeleton
<SystemModal loading={loading}
visible={true} active={true}
anxincloudList={anxincloudList} placeholder={SkeletonScreen()}
systemEdit={systemEdit} >
peplist={peplist} <Table
appList={appList} columns={columns}
pepname={pepname} dataSource={tableData}
anxincloudArr={anxincloudArr} bordered={false}
pepProjectId={pepProjectId} empty="暂无数据"
anxinDelete={anxinDelete} pagination={false}
appArr={appArr} onRow={handleRow}
bindId={bindId} rowSelection={rowSelection}
cancel={() => { />
setSystemModal(false); </Skeleton>
<div
style={{
display: "flex",
justifyContent: "space-between",
padding: "20px 20px",
}}
>
<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([])
})
}} }}
close={() => { >
setSystemModal(false); <Button type='primary' theme='solid' style={{ fontSize: 13, width: 93, height: 24, borderRadius: '1px', border: '1px solid #0F7EFB', color: '#FFFFFF', fontWeight: 400, }}>批量删除</Button>
getProjectPomsList() </Popconfirm>
getPepProject() </div>
}} > <div style={{ display: 'flex', }}>
</SystemModal> : '' <span style={{ lineHeight: "30px", fontSize: 13, color: 'rgba(0,90,189,0.8)' }}>
} {limits}条信息
</> </span>
) <Pagination
className="22"
total={limits}
showSizeChanger
currentPage={query.page + 1}
pageSizeOpts={[10, 20, 30, 40]}
onChange={(currentPage, pageSize) => {
setQuery({ limit: pageSize, page: currentPage - 1 });
page.current = currentPage - 1
setSelected([])
}}
/>
</div>
</div>
</div>
</div>
{//
systemModal ?
<SystemModal
visible={true}
anxincloudList={anxincloudList}
systemEdit={systemEdit}
peplist={peplist}
appList={appList}
pepname={pepname}
anxincloudArr={anxincloudArr}
pepProjectId={pepProjectId}
anxinDelete={anxinDelete}
mapping={mapping}
appArr={appArr}
bindId={bindId}
cancel={() => {
setSystemModal(false);
}}
close={() => {
setSystemModal(false);
getProjectPomsList()
getPepProject()
}} >
</SystemModal> : ''
}
</>
)
} }
function mapStateToProps (state) { function mapStateToProps (state) {
const { auth, global, ProjectPoms } = state; const { auth, global, ProjectPoms } = state;
return { return {
loading: ProjectPoms.isRequesting, loading: ProjectPoms.isRequesting,
user: auth.user, user: auth.user,
actions: global.actions, actions: global.actions,
// members: members.data, // members: members.data,
}; };
} }
export default connect(mapStateToProps)(Example); export default connect(mapStateToProps)(Example);

8
web/client/src/sections/problem/components/sideSheet.jsx

@ -32,13 +32,7 @@ function SideSheets ({ dispatch, actions, close, alarmId }) {
dispatch(problem.getAlarmDataDetailAgg({ alarmId: alarmId })).then((res) => { dispatch(problem.getAlarmDataDetailAgg({ alarmId: alarmId })).then((res) => {
if (res?.success) { if (res?.success) {
let dataSort = res.payload.data || [] let dataSort = res.payload.data || []
dataSort.sort((a, b) => { dataSort.sort((a, b) => (moment(a.hours).isBefore(b.hours) ? -1 : 1))
if (moment(a.hours).isBefore(b.hours)) {
return -1
} else {
return 1
}
})
let data = { let data = {
grid: { grid: {
left: '5%', left: '5%',

Loading…
Cancel
Save