|
@@ -1,8 +1,7 @@
|
|
|
//图表弹窗
|
|
|
-import React, { useState } from 'react';
|
|
|
-import { Button, DatePicker, Modal, Form, Row, Col } from 'antd';
|
|
|
-import dayjs from 'dayjs';
|
|
|
import ChartModule from '@/components/ManagementPage/chartModule';
|
|
|
+import { Button, Col, DatePicker, Form, Modal, Row } from 'antd';
|
|
|
+import dayjs from 'dayjs';
|
|
|
const FormItem = Form.Item;
|
|
|
function chartModal(props) {
|
|
|
const {
|
|
@@ -18,7 +17,7 @@ function chartModal(props) {
|
|
|
onCancel,
|
|
|
sTimeInitialValue,
|
|
|
eTimeInitialValue,
|
|
|
- type = true //true 显示 false 隐藏时间查询
|
|
|
+ type = true, //true 显示 false 隐藏时间查询
|
|
|
} = props;
|
|
|
const handleSearch = () => {
|
|
|
form.validateFields((err, fieldsValue) => {
|
|
@@ -39,7 +38,7 @@ function chartModal(props) {
|
|
|
title={title}
|
|
|
width="90%"
|
|
|
>
|
|
|
- {type &&
|
|
|
+ {type && (
|
|
|
<Form
|
|
|
layout="inline"
|
|
|
// labelAlign="left"
|
|
@@ -51,14 +50,26 @@ function chartModal(props) {
|
|
|
<FormItem label="开始时间">
|
|
|
{form.getFieldDecorator('start_date', {
|
|
|
initialValue: sTimeInitialValue || dayjs().subtract(1, 'M'),
|
|
|
- })(<DatePicker allowClear={false} placeholder="选择开始日期" />)}
|
|
|
+ })(
|
|
|
+ <DatePicker
|
|
|
+ inputReadOnly
|
|
|
+ allowClear={false}
|
|
|
+ placeholder="选择开始日期"
|
|
|
+ />,
|
|
|
+ )}
|
|
|
</FormItem>
|
|
|
</Col>
|
|
|
<Col span={10}>
|
|
|
<FormItem label="结束时间">
|
|
|
{form.getFieldDecorator('end_date', {
|
|
|
initialValue: eTimeInitialValue || dayjs(),
|
|
|
- })(<DatePicker allowClear={false} placeholder="选择结束日期" />)}
|
|
|
+ })(
|
|
|
+ <DatePicker
|
|
|
+ inputReadOnly
|
|
|
+ allowClear={false}
|
|
|
+ placeholder="选择结束日期"
|
|
|
+ />,
|
|
|
+ )}
|
|
|
</FormItem>
|
|
|
</Col>
|
|
|
<Col span={2}>
|
|
@@ -73,7 +84,7 @@ function chartModal(props) {
|
|
|
</Col>
|
|
|
</Row>
|
|
|
</Form>
|
|
|
- }
|
|
|
+ )}
|
|
|
<div style={{ height: 400, marginTop: 20 }}>
|
|
|
<ChartModule
|
|
|
yName={yName}
|