Commit 187c5ce4 authored by 皮倩雯's avatar 皮倩雯

fix: '重构事件模块代码'

parent 651866fa
Pipeline #42958 skipped with stages
......@@ -22,7 +22,7 @@ import styles from './incident.less';
const CheckboxGroup = Checkbox.Group;
const { TabPane } = Tabs;
const ChangeAdd = props => {
const { callBackSubmit = () => {}, isType, pickItem, visible, filed11, newCheckedList } = props;
const { callBackSubmit = () => {}, pickItem, visible, filed11, newCheckedList } = props;
const [title, setTitle] = useState([]);
const [checkedList, setCheckedList] = useState([]); // 选中复选框内容
const [searchWord, setSearchWord] = useState(''); // 关键字
......@@ -77,7 +77,6 @@ const ChangeAdd = props => {
stt: data,
title,
filed22: filed1,
isType,
});
setKeyValue('0');
setSearchWord('');
......
......@@ -18,15 +18,7 @@ import DragTable from '@/components/DragTable/DragTable';
import styles from './incident.less';
const CheckboxGroup = Checkbox.Group;
const EditModal = props => {
const {
callBackSubmit = () => {},
pickItem,
visible,
filed,
characterValue,
newCheckedList,
flag,
} = props;
const { callBackSubmit = () => {}, pickItem, visible, filed, newCheckedList, flag } = props;
const [loading, setLoading] = useState(false);
const [value, setValue] = useState('');
const [checkValue, setCheckValue] = useState([]);
......@@ -86,8 +78,7 @@ const EditModal = props => {
setCheckedList(checkedListArr);
const indeterminateArr = [...indeterminate];
const checkAllArr = [...checkAll];
indeterminateArr[index] =
!!list.length && list.length < filed[title].length;
indeterminateArr[index] = !!list.length && list.length < filed[title].length;
checkAllArr[index] = list.length === filed[title].length;
setIndeterminate(indeterminateArr);
setCheckAll(checkAllArr);
......@@ -239,8 +230,7 @@ const EditModal = props => {
}
});
indeterminateArr.push(
!!checkArr[index].length &&
checkArr[index].length < filed[item].length,
!!checkArr[index].length && checkArr[index].length < filed[item].length,
);
checkAllArr.push(checkArr[index].length === filed[item].length);
});
......@@ -292,10 +282,7 @@ const EditModal = props => {
>
{visible && (
<div className={styles.listCard}>
<div
className={styles.cardItem}
style={{ borderRight: '1px solid #99bbe8' }}
>
<div className={styles.cardItem} style={{ borderRight: '1px solid #99bbe8' }}>
{flag === 0 ? (
<>
<div className={styles.cardContent}>
......
......@@ -396,23 +396,14 @@ const incident = () => {
console.log(tableData[pickItem]);
setSortData(tableData[pickItem]);
};
// const process = record => {
// setProcessVisible(true);
// setFormObj(record);
// setTitle1(record.name)
// }
const process1 = record => {
history.push({
pathname: '/bsmanger/workOrder/incidentFlow',
state: { formObj: record, title1: record.name, rember },
});
};
// const auxiliaryView = record => {
// setFormObj(record);
// setViewVisible(true)
// setTitle2(record.name)
// }
const auxiliaryView1 = record => {
history.push({
pathname: '/bsmanger/workOrder/incidentView',
......@@ -444,13 +435,6 @@ const incident = () => {
}
});
};
const onOK1 = () => {
setProcessVisible(false);
setFlag(flag + 1);
};
const onOK11 = () => {
setViewVisible(false);
};
return (
<div className={styles.incidentContainer}>
<div className={styles.contentContainers}>
......@@ -467,6 +451,7 @@ const incident = () => {
style={{
fontSize: '15px ',
fontWeight: 'bold',
marginLeft: '14px',
}}
>
事件列表
......@@ -478,7 +463,7 @@ const incident = () => {
color: '#1890FF',
fontSize: '25px',
verticalAlign: 'middle',
marginLeft: '58%',
marginLeft: '51%',
}}
/>
</Tooltip>
......@@ -582,14 +567,6 @@ const incident = () => {
callBackSubmit={onSubmit}
placement="right"
/>
{/* <ProcessModal
visible={processVisible}
formObj={formObj}
title1={title1}
maxLength={maxLength}
onCancel={() => setProcessVisible(false)}
callBackSubmit={onOK1}
/> */}
<SortModal
title="调整顺序"
visible={sortVisible}
......@@ -598,13 +575,6 @@ const incident = () => {
onCancel={() => setSortVisible(false)}
callBackSubmit={onOK}
/>
{/* <ViewModal
formObj={formObj}
visible={viewVisible}
onCancel={() => setViewVisible(false)}
title2={title2}
callBackSubmit={onOK11}
/> */}
</div>
</div>
);
......
......@@ -589,6 +589,7 @@ const WebDic = () => {
console.log(selectID);
if (select.nodeID === selectID) {
setSelectID('');
setSubData([]);
}
}
......
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