Browse Source

(*)短信提醒只在异常显示

dev
ww664853070 1 year ago
parent
commit
5919ea8b77
  1. 13
      web/client/src/sections/fillion/components/patrolTable.js

13
web/client/src/sections/fillion/components/patrolTable.js

@ -95,7 +95,6 @@ const DetailForm = (props) => {
]; ];
const changeBoolean = (bool) => { const changeBoolean = (bool) => {
//console.log('bool', bool)
return bool ? '无异常' : '有异常' return bool ? '无异常' : '有异常'
} }
const renderContent = (data) => { 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(() => { useEffect(() => {
console.log(anspectionNotificationPhoneList, '数据');
let phoneList = [] let phoneList = []
if (anspectionNotificationPhoneList && anspectionNotificationPhoneList.length) { if (anspectionNotificationPhoneList && anspectionNotificationPhoneList.length) {
phoneList = anspectionNotificationPhoneList.map(e => { phoneList = anspectionNotificationPhoneList.map(e => {
return e.phone return e.phone
}) })
} }
console.log(phoneList, '789789789789');
setPhoneList(phoneList) setPhoneList(phoneList)
}, [anspectionNotificationPhoneList]) }, [anspectionNotificationPhoneList])
@ -834,7 +830,6 @@ const PatrolTable = (props) => {
const handleOk = () => { const handleOk = () => {
// setIsModalOpen(false); // setIsModalOpen(false);
form.validateFields().then(values => { form.validateFields().then(values => {
console.log(values, '----------');
dispatch(addAnspectionNotificationPhone(values)).then(res => { dispatch(addAnspectionNotificationPhone(values)).then(res => {
if (res.success) { if (res.success) {
setIsModalOpen(false); setIsModalOpen(false);
@ -864,7 +859,10 @@ const PatrolTable = (props) => {
sm: { span: 20, offset: 4 }, sm: { span: 20, offset: 4 },
}, },
}; };
let routerUrl = window.location.href
routerUrl = routerUrl.substring(routerUrl.length - 14)
console.log(routerUrl, '=========');
return ( return (
<div className='card-protable'> <div className='card-protable'>
<Card > <Card >
@ -910,7 +908,10 @@ const PatrolTable = (props) => {
: '' : ''
} }
<Button style={{ marginLeft: 20 }}>查询</Button> <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> */} {/* <Button style={{ marginLeft: 20 }} onClick={handleExport} >导出</Button> */}
</div> : '' </div> : ''

Loading…
Cancel
Save