Browse Source

选择多个项目

dev
wenlele 2 years ago
parent
commit
4fffb881b9
  1. 2
      web/client/src/sections/problem/components/tableData.jsx
  2. 4
      web/client/src/sections/service/components/pushModal.jsx
  3. 38
      web/client/src/sections/service/containers/emPush.jsx

2
web/client/src/sections/problem/components/tableData.jsx

@ -379,7 +379,7 @@ const TableData = ({ route, dispatch, actions, collectData, setSetup, exhibition
placeholder={SkeletonScreen()}
>
{(() => {
// console.log(tableData);
// console.log(route);
return <Table
columns={exhibition}
dataSource={route == 'useAbnormal' || route == 'videoAbnormal' ? tableData.slice(query.page * query.limit, (query.page + 1) * query.limit) || [] : tableData}

4
web/client/src/sections/service/components/pushModal.jsx

@ -74,7 +74,7 @@ function pushModal (props) {
})
}
function getProjectStructureList (value) {//
dispatch(service.getProjectStructure({ pomsProjectId: value })).then((res) => {
dispatch(service.getProjectStructure({ pomsProjectId:value.join(',') })).then((res) => {
if (res.success) {
let mylist = []
for (let i = 0; i < res.payload?.data.length; i++) {
@ -188,6 +188,7 @@ function pushModal (props) {
}
}
if (key == 'pomsProjectId') {
getProjectStructureList(values.pomsProjectId)//
for (let i = 0; i < projectPoms.length; i++) {
if (values.pomsProjectId == projectPoms[i].id) {
@ -232,6 +233,7 @@ function pushModal (props) {
style={{ width: 695 }}
rules={[{ required: true, message: "请选择项目" }]}
initValue={editObj?.pomsProjectId || ""}
multiple
filter
>
{

38
web/client/src/sections/service/containers/emPush.jsx

@ -245,17 +245,27 @@ const EmPush = (props) => {
dataIndex: "projectName",
key: "projectName",
render: (_, row) => {
let projectData = []
row.pomsProject?.map(v => {
projectData.push({
projectName: v.pepProject?.projectName,
name: v.name,
anxinerror: v.del,
constructionStatus: v.pepProject?.constructionStatus,
})
})
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' }}>
projectData.map((u, index) => <div style={{ display: 'flex', alignItems: 'center' }}>
{
anxinerror ? (
<Tooltip content={anxinerrorArr + ',项目已在【项企PEP】或【映射关系】中被删除,请重选项目!'}>
u.anxinerror ? (
<Tooltip content={(u.projectName || u.name) + ',项目已在【项企PEP】或【映射关系】中被删除,请重选项目!'}>
<div style={{ marginRight: 5 }}>
<img src="/assets/images/install/risk.png" alt="" style={{ height: 24, width: 24, }} />
</div>
@ -263,17 +273,17 @@ const EmPush = (props) => {
}
{
<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}
<Tooltip content={(u.projectName || u.name)}>
<div style={{ width: u.projectName?.length > 7 || u.name?.length > 7 ? '112px' : '', whiteSpace: 'nowrap', overflow: 'hidden', textOverflow: 'ellipsis', color: row.pomsProject.del ? '#F93920' : '' }}>
{u.projectName || u.name}
</div>
</Tooltip>
</div>
}
{
row.pomsProject?.pepProject?.projectName ? (
u.projectName ? (
<div style={{
height: 18, marginLeft: 4,
height: 18, marginLeft: 4, width: 76,
background: 'linear-gradient(180deg, #EBF5FF 0%, #EBF5FF 0%, #D3E8FF 100%)',
borderRadius: 2, display: 'flex', alignItems: 'center'
}}>
@ -281,15 +291,7 @@ const EmPush = (props) => {
<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 }}>
{
val.map((ite, idx) => {
return (
<div key={idx}>
{ite.id == row.pomsProject?.pepProject.constructionStatusId ? ite.construction_status : ''}
</div>
)
})
}
{u.constructionStatus}
</div>
</div>
) : (
@ -307,7 +309,7 @@ const EmPush = (props) => {
</div>
)
}
</div>
</div>)
)
}
},

Loading…
Cancel
Save