// import React, { useEffect, useRef } from 'react'; // import { connect } from 'react-redux'; // import { Spin, Button, Modal, Form, Switch } from 'antd'; // import ProForm, { ProFormText, ProFormSelect } from '@ant-design/pro-form'; // import { useState } from 'react'; // const ConfigModal = (props) => { // const { dispatch, actions, user, loading, visible, close, editData, allAreas, reportType } = props // const [excuteTimeOptions, setExcuteTimeOptions] = useState([]) // const formRef = useRef() // const { report } = actions // useEffect(() => { // let excuteTimeOptions = [] // for (let i = 0; i < 24; i++) { // let curT = i // if (curT < 10) { // curT = '0' + curT // } // excuteTimeOptions.push({ // value: curT + ':00', // label: curT + ':00', // }) // excuteTimeOptions.push({ // value: curT + ':30', // label: curT + ':30', // }) // } // setExcuteTimeOptions(excuteTimeOptions); // }, []) // return ( // { // formRef.current.validateFields().then(v => { // v.excuteTime = String(v.excuteTime) // console.log(v); // dispatch(editData ? report.editReportConfig(v, editData.id) : report.addReportConfig(v)).then(res => { // if (res.success) { // dispatch(report.getReportConfig()) // close() // } // }) // }) // }} // onCancel={() => { // close() // }} // > // // // // { // return { // value: a.id, // label: a.name, // } // })} // cacheForSwr // name="regionId" // label="区域" // required // rules={[{ required: true, message: '请选择区域' }]} // /> // // // // // // // ) // } // function mapStateToProps (state) { // const { auth, global, allAreas } = state; // console.log(allAreas); // return { // user: auth.user, // actions: global.actions, // allAreas: allAreas.data || [] // }; // } // export default connect(mapStateToProps)(ConfigModal);