Browse Source

问题修改

dev
deartibers 2 years ago
parent
commit
2780ea2c51
  1. BIN
      web/client/assets/images/install/risk.png
  2. 20
      web/client/src/sections/install/components/systemModal.jsx
  3. 57
      web/client/src/sections/install/containers/system.jsx
  4. 2
      web/client/src/sections/install/style.less

BIN
web/client/assets/images/install/risk.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 58 KiB

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

@ -31,7 +31,6 @@ function adminModal (props) {
setCustom(true) setCustom(true)
setMyprojectType('axy') setMyprojectType('axy')
} }
console.log('appArr',appArr);
// if (editObj.id) { // if (editObj.id) {
// let departmentList = [] // let departmentList = []
// for (let i = 0; i < pepList.length; i++) { // for (let i = 0; i < pepList.length; i++) {
@ -58,7 +57,7 @@ function adminModal (props) {
} }
let bindObj = JSON.parse(JSON.stringify(values)) let bindObj = JSON.parse(JSON.stringify(values))
bindObj.appId = appArr bindObj.appId = appArr
dispatch(install.postProjectBind({ ...bindObj,bindId:bindId, msg: '修改映射关系' })).then((res) => {//(PEP) dispatch(install.postProjectBind({ ...bindObj, bindId: bindId, msg: '修改映射关系' })).then((res) => {//(PEP)
if (res.success) { if (res.success) {
close(); close();
} }
@ -108,8 +107,8 @@ function adminModal (props) {
onCancel={handleCancel} onCancel={handleCancel}
> >
<div style={{ margin: "0px 25px" }}> <div style={{ margin: "0px 25px" }}>
<div style={{ width: '100%', lineHeight: 2, background: '#F4F8FF', borderRadius: 2, border: '1px solid #C7E1FF', display: 'flex'}}> <div style={{ width: '100%', lineHeight: 2, background: '#F4F8FF', borderRadius: 2, border: '1px solid #C7E1FF', display: 'flex' }}>
<div style={{ display: 'flex',marginLeft: 12,marginTop:5.5}}><IconAlertCircle style={{ color: '#0F7EFB' }} /></div> <div style={{ display: 'flex', marginLeft: 12, marginTop: 5.5 }}><IconAlertCircle style={{ color: '#0F7EFB' }} /></div>
<div style={{ color: '#0F7EFB', fontSize: 12, marginLeft: 8, marginRight: 12 }}>映射关系由项企立项项目与安心云项目关联产生若项目未在项企中有记载可选自定义项目待项企立项项后再进行修改</div> <div style={{ color: '#0F7EFB', fontSize: 12, marginLeft: 8, marginRight: 12 }}>映射关系由项企立项项目与安心云项目关联产生若项目未在项企中有记载可选自定义项目待项企立项项后再进行修改</div>
</div> </div>
<Form <Form
@ -132,7 +131,8 @@ function adminModal (props) {
getFormApi={(formApi) => (form.current = formApi)} getFormApi={(formApi) => (form.current = formApi)}
> >
<div> <div>
<Form.RadioGroup field="projectType" initValue={myprojectType} label='项目类型:' > <Form.RadioGroup field="projectType" initValue={myprojectType} label='项目类型:'
disabled={systemEdit && !pepname} >
<Form.Radio value='pep'>项企项目</Form.Radio> <Form.Radio value='pep'>项企项目</Form.Radio>
<Form.Radio value='axy'>自定义项目未在项企中立项的项目可选</Form.Radio> <Form.Radio value='axy'>自定义项目未在项企中立项的项目可选</Form.Radio>
</Form.RadioGroup> </Form.RadioGroup>
@ -143,7 +143,7 @@ function adminModal (props) {
field="name" field="name"
label='自定义项目:' label='自定义项目:'
style={{ width: 425 }} style={{ width: 425 }}
maxLength={18} maxLength={15}
initValue={pepname || ""} initValue={pepname || ""}
placeholder="请输入项目名称,且名称需与项企区分" placeholder="请输入项目名称,且名称需与项企区分"
showClear showClear
@ -159,7 +159,7 @@ function adminModal (props) {
style={{ width: 425 }} style={{ width: 425 }}
rules={[{ required: true, message: "请选择PEP项企项目" }]} rules={[{ required: true, message: "请选择PEP项企项目" }]}
initValue={pepProjectId || ""} initValue={pepProjectId || ""}
disabled={systemEdit&&!pepname} disabled={systemEdit && !pepname}
showClear showClear
> >
{ {
@ -200,13 +200,13 @@ function adminModal (props) {
{ {
anxinDelete.length > 0 ? ( anxinDelete.length > 0 ? (
<div style={{ display: 'flex' }}> <div style={{ display: 'flex' }}>
<div style={{marginTop:3}}> <div style={{ marginTop: 3 }}>
<IconAlertTriangle size='small' style={{ color: '#FE9812' }} /> <img src="/assets/images/install/risk.png" alt="" style={{ height: 24, width: 24, }} />
</div> </div>
<div style={{ <div style={{
background: 'rgba(255, 51, 0, 0.28)', color: '#FF3300', background: 'rgba(255, 51, 0, 0.28)', color: '#FF3300',
fontSize: 12, marginLeft: 8, lineHeight: 2, padding: '0px 5px', fontSize: 12, marginLeft: 8, lineHeight: 2, padding: '0px 5px',
border: '1px solid rgba(255,51,0,0.3)',width:515 border: '1px solid rgba(255,51,0,0.3)', width: 515
}}> }}>
确认关联后{anxinDelete.join('、')}将被系统移除映射关系原因是项目已在安心云中被删除 确认关联后{anxinDelete.join('、')}将被系统移除映射关系原因是项目已在安心云中被删除
</div> </div>

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

@ -1,7 +1,6 @@
import React, { useEffect, useRef, useState } from 'react'; import React, { useEffect, useRef, useState } from 'react';
import { connect } from 'react-redux'; import { connect } from 'react-redux';
import { Skeleton, Button, Pagination, Table, Popconfirm, Tooltip } from '@douyinfe/semi-ui'; import { Skeleton, Button, Pagination, Table, Popconfirm, Tooltip } from '@douyinfe/semi-ui';
import { IconAlertTriangle } from "@douyinfe/semi-icons";
import { SkeletonScreen, } from "$components"; import { SkeletonScreen, } from "$components";
import moment from "moment"; import moment from "moment";
import SystemModal from '../components/systemModal' import SystemModal from '../components/systemModal'
@ -106,9 +105,9 @@ const Example = (props) => {
<div style={{ display: 'flex', alignItems: 'center' }}> <div style={{ display: 'flex', alignItems: 'center' }}>
{ {
anxinerror ? ( anxinerror ? (
<Tooltip content={anxinerrorArr.join(',') + ',项目已在[安心云]中被删除'}> <Tooltip content={anxinerrorArr.join(',') + ',项目已在【安心云】中被删除'}>
<div style={{ marginRight: 5 }}> <div style={{ marginRight: 5 }}>
<IconAlertTriangle size='small' style={{ color: '#FE9812' }} /> <img src="/assets/images/install/risk.png" alt="" style={{ height: 24, width: 24, }} />
</div> </div>
</Tooltip>) : ('') </Tooltip>) : ('')
} }
@ -176,9 +175,9 @@ const Example = (props) => {
<div style={{ display: 'flex', alignItems: 'center' }}> <div style={{ display: 'flex', alignItems: 'center' }}>
{ {
row.pepProjectIsDelete == 1 ? ( row.pepProjectIsDelete == 1 ? (
<Tooltip content={'失效,项目已在[项企PEP]中被删除!'}> <Tooltip content={'失效,项目已在【项企PEP】中被删除!'}>
<div style={{ marginRight: 5 }}> <div style={{ marginRight: 5 }}>
<IconAlertTriangle size='small' style={{ color: '#FE9812' }} /> <img src="/assets/images/install/risk.png" alt="" style={{ height: 24, width: 24, }} />
</div> </div>
</Tooltip>) : ('') </Tooltip>) : ('')
} }
@ -214,7 +213,7 @@ const Example = (props) => {
dataIndex: "createTime", dataIndex: "createTime",
key: 'time', key: 'time',
render: (_, row) => { render: (_, row) => {
return moment(row.createTime).format("YYYY-MM-DD HH:MM:SS"); return moment(row.createTime).format("YYYY-MM-DD HH:mm:ss");
} }
}, },
{ {
@ -355,34 +354,35 @@ const Example = (props) => {
}} }}
> >
<div> <div>
<div style={{ display: 'inline-block', lineHeight: '30px', fontSize: 13, }}>勾选<span style={{ fontWeight: 400, color: '#0F7EFB', }}>{selected.length}</span>问题</div> <div style={{ display: 'inline-block', lineHeight: '30px', fontSize: 13, color: 'gray' }}>勾选<span style={{ fontWeight: 400, color: '#0F7EFB', }}> {selected.length} </span>信息</div>
<Button onClick={() => { <Button onClick={() => {
if(selected.length==tableKey.length){ if (selected.length == tableKey.length) {
setSelected([]) setSelected([])
} }
else{ else {
setSelected(tableKey) setSelected(tableKey)
} }
}} style={{ width: 93, height: 24, borderRadius: '1px', border: '1px solid #0F7EFB', color: '#0F7EFB', fontWeight: 400, margin: '0 10px' }}>全选</Button> }} 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 <Popconfirm
title="删除后对应的项目全局将无法进入和显示,对应的信鸽服务也会被禁用" title="删除后对应的项目全局将无法进入和显示,对应的信鸽服务也会被禁用"
arrowPointAtCenter={false} arrowPointAtCenter={false}
showArrow={true} showArrow={true}
position="topRight" position="topRight"
onConfirm={() => { onConfirm={() => {
dispatch(install.deleteProjectBind({ bindId: selected.join(','), msg: '删除安心云、项目管理项目绑定关系' })).then(() => { dispatch(install.deleteProjectBind({ bindId: selected.join(','), msg: '删除安心云、项目管理项目绑定关系' })).then(() => {
if (page.current > 0 && mylimits.current == selected.length) { if (page.current > 0 && mylimits.current == selected.length) {
setQuery({ limit: 10, page: page.current - 1 }) setQuery({ limit: 10, page: page.current - 1 })
} else { } else {
setQuery({ limit: 10, page: page.current }) setQuery({ limit: 10, page: page.current })
} }
setSelected([]) setSelected([])
}) })
}} }}
> >
<Button type='primary' theme='solid' style={{ width: 93, height: 24, borderRadius: '1px', border: '1px solid #0F7EFB', color: '#FFFFFF', fontWeight: 400, }}>批量删除</Button> <Button type='primary' theme='solid' style={{ fontSize: 13, width: 93, height: 24, borderRadius: '1px', border: '1px solid #0F7EFB', color: '#FFFFFF', fontWeight: 400, }}>批量删除</Button>
</Popconfirm> </Popconfirm>
</div> </div>
<div style={{ display: 'flex', }}> <div style={{ display: 'flex', }}>
<span style={{ lineHeight: "30px", fontSize: 13, color: 'rgba(0,90,189,0.8)' }}> <span style={{ lineHeight: "30px", fontSize: 13, color: 'rgba(0,90,189,0.8)' }}>
@ -397,6 +397,7 @@ const Example = (props) => {
onChange={(currentPage, pageSize) => { onChange={(currentPage, pageSize) => {
setQuery({ limit: pageSize, page: currentPage - 1 }); setQuery({ limit: pageSize, page: currentPage - 1 });
page.current = currentPage - 1 page.current = currentPage - 1
setSelected([])
}} }}
/> />
</div> </div>

2
web/client/src/sections/install/style.less

@ -4,7 +4,6 @@
font-size: 13px; font-size: 13px;
} }
} }
.roleBottom{
.semi-table{ .semi-table{
.semi-table-row:first-child{ .semi-table-row:first-child{
.semi-table-row-head{ .semi-table-row-head{
@ -13,7 +12,6 @@
} }
} }
} }
}
.adminTop{ .adminTop{
box-shadow: 0px 0px 12px 2px rgba(220,222,224,0.2); box-shadow: 0px 0px 12px 2px rgba(220,222,224,0.2);
transition: box-shadow 0.5s ease; transition: box-shadow 0.5s ease;

Loading…
Cancel
Save