|
|
@ -95,7 +95,6 @@ const DetailForm = (props) => { |
|
|
|
]; |
|
|
|
|
|
|
|
const changeBoolean = (bool) => { |
|
|
|
//console.log('bool', bool)
|
|
|
|
return bool ? '无异常' : '有异常' |
|
|
|
} |
|
|
|
const renderContent = (data) => { |
|
|
@ -616,7 +615,6 @@ const PatrolNameList = (props) => { |
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
// console.log('selectedKeys', selectedKeys, selected, selectedNodes, node)
|
|
|
|
|
|
|
|
}; |
|
|
|
|
|
|
@ -816,14 +814,12 @@ const PatrolTable = (props) => { |
|
|
|
} |
|
|
|
} |
|
|
|
useEffect(() => { |
|
|
|
console.log(anspectionNotificationPhoneList, '数据'); |
|
|
|
let phoneList = [] |
|
|
|
if (anspectionNotificationPhoneList && anspectionNotificationPhoneList.length) { |
|
|
|
phoneList = anspectionNotificationPhoneList.map(e => { |
|
|
|
return e.phone |
|
|
|
}) |
|
|
|
} |
|
|
|
console.log(phoneList, '789789789789'); |
|
|
|
setPhoneList(phoneList) |
|
|
|
|
|
|
|
}, [anspectionNotificationPhoneList]) |
|
|
@ -834,7 +830,6 @@ const PatrolTable = (props) => { |
|
|
|
const handleOk = () => { |
|
|
|
// setIsModalOpen(false);
|
|
|
|
form.validateFields().then(values => { |
|
|
|
console.log(values, '----------'); |
|
|
|
dispatch(addAnspectionNotificationPhone(values)).then(res => { |
|
|
|
if (res.success) { |
|
|
|
setIsModalOpen(false); |
|
|
@ -864,7 +859,10 @@ const PatrolTable = (props) => { |
|
|
|
sm: { span: 20, offset: 4 }, |
|
|
|
}, |
|
|
|
}; |
|
|
|
let routerUrl = window.location.href |
|
|
|
routerUrl = routerUrl.substring(routerUrl.length - 14) |
|
|
|
|
|
|
|
console.log(routerUrl, '========='); |
|
|
|
return ( |
|
|
|
<div className='card-protable'> |
|
|
|
<Card > |
|
|
@ -910,7 +908,10 @@ const PatrolTable = (props) => { |
|
|
|
: '' |
|
|
|
} |
|
|
|
<Button style={{ marginLeft: 20 }}>查询</Button> |
|
|
|
<Button onClick={() => { showModal() }} style={{ float: 'right', marginRight: 30 }}> 短信提醒</Button> |
|
|
|
{ |
|
|
|
routerUrl == 'patrol_anomaly' ? <Button onClick={() => { showModal() }} style={{ float: 'right', marginRight: 30 }}> 短信提醒</Button> : '' |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
{/* <Button style={{ marginLeft: 20 }} onClick={handleExport} >导出</Button> */} |
|
|
|
</div> : '' |
|
|
@ -926,7 +927,7 @@ const PatrolTable = (props) => { |
|
|
|
</Card> |
|
|
|
<Modal title="短信提醒" maskClosable={false} destroyOnClose={true} visible={isModalOpen} onOk={handleOk} onCancel={handleCancel}> |
|
|
|
<Form form={form} name="dynamic_form_item" {...formItemLayoutWithOutLabel} > |
|
|
|
<Form.List |
|
|
|
<Form.List |
|
|
|
name="phone" |
|
|
|
initialValue={phoneList} |
|
|
|
> |
|
|
|