Commit 72b2135a authored by 涂伟's avatar 涂伟

fix: '运维通用事件配置事件选择逻辑优化'

parent 74b673d6
Pipeline #94356 passed with stages
...@@ -1842,7 +1842,7 @@ const AddModal = (props) => { ...@@ -1842,7 +1842,7 @@ const AddModal = (props) => {
<Row> <Row>
<Col span={24}> <Col span={24}>
<Item <Item
label="通用事件" label="关联事件"
name="usualEvent" name="usualEvent"
// style={{ height: '112px' }} // style={{ height: '112px' }}
labelCol={{ span: 5 }} labelCol={{ span: 5 }}
...@@ -1856,7 +1856,7 @@ const AddModal = (props) => { ...@@ -1856,7 +1856,7 @@ const AddModal = (props) => {
style={{ display: 'flex', alignItems: 'center' }} style={{ display: 'flex', alignItems: 'center' }}
icon={<PlusOutlined />} icon={<PlusOutlined />}
> >
新增通用事件 新增关联事件
</Button> </Button>
<Table <Table
dataSource={tableData.current} dataSource={tableData.current}
......
...@@ -87,6 +87,7 @@ const incident = () => { ...@@ -87,6 +87,7 @@ const incident = () => {
const [pickItem, setPickItem] = useState(''); const [pickItem, setPickItem] = useState('');
const [hoverItemIndex, setHoverItemIndex] = useState(0); // hover流程索引 const [hoverItemIndex, setHoverItemIndex] = useState(0); // hover流程索引
const [keepIdValue, setKeepIdValue] = useState([]); const [keepIdValue, setKeepIdValue] = useState([]);
const [businessType, setBusinessType] = useState([]);
const [editBusinessVisible, setEditBusinessVisible] = useState(false); const [editBusinessVisible, setEditBusinessVisible] = useState(false);
const [searchValue, setSearchValue] = useState(''); const [searchValue, setSearchValue] = useState('');
const [showSearchStyle, setShowSearchStyle] = useState(false); // 是否显示模糊查询样式 const [showSearchStyle, setShowSearchStyle] = useState(false); // 是否显示模糊查询样式
...@@ -261,6 +262,9 @@ const incident = () => { ...@@ -261,6 +262,9 @@ const incident = () => {
}).then(res => { }).then(res => {
setTreeLoading(false); setTreeLoading(false);
if (res.code === 0) { if (res.code === 0) {
if(!searchValue) {
setBusinessType(res.data)
}
setKeepIdValue(res.data); setKeepIdValue(res.data);
let arr = formateArrDataA(res.data, 'businessType'); let arr = formateArrDataA(res.data, 'businessType');
let newArr = []; let newArr = [];
...@@ -707,7 +711,7 @@ const incident = () => { ...@@ -707,7 +711,7 @@ const incident = () => {
selectData={select} selectData={select}
callBackSubmit={onSubmit} callBackSubmit={onSubmit}
placement="right" placement="right"
businessArr={keepIdValue.filter(item => item.businessType === '通用事件')} businessArr={businessType.filter(item => item.businessType === '通用事件')}
/> />
<SortModal <SortModal
title="调整顺序" title="调整顺序"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment