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

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

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