فهرست منبع

报表目录名称不能修改为空

zhuth 6 سال پیش
والد
کامیت
ff63149022

+ 3 - 3
src/components/chart/list.jsx

@@ -349,14 +349,14 @@ class ChartList extends React.Component {
                     <Card title={
                         <Row className='tools' type='flex' justify='space-between'>
                             <Col style={{ display: 'flex', width: 'calc(100% - 324px)', overflow: 'hidden' }}>
+                                <Checkbox style={{ marginTop: '4px' }} value={noGroup} onChange={(e) => {
+                                    this.setState({noGroup: e.target.checked})
+                                }}>未分组</Checkbox>
                                 <Icon type="bars" onClick={() => {
                                     this.setState({
                                         visibleGroupManageMentBox: true
                                     });
                                 }}/>
-                                <Checkbox style={{ marginTop: '4px' }} value={noGroup} onChange={(e) => {
-                                    this.setState({noGroup: e.target.checked})
-                                }}>未分组</Checkbox>
                                 { this.generateGroupTags() }
                             </Col>
                             <Col className='search'>

+ 2 - 2
src/components/common/filterBox/filter.jsx

@@ -75,7 +75,7 @@ class Filter extends React.Component {
                 <DatePicker
                     key={Math.random()}
                     defaultValue={commonProps.defaultValue ? (commonProps.defaultValue.dynamic ? null : commonProps.defaultValue) : null}
-                    showToday={false}
+                    showToday={operator !== '='}
                     open={this.state['datePickerOpen' + index]}
                     onOpenChange={status => {
                         let obj = {};
@@ -84,7 +84,7 @@ class Filter extends React.Component {
                     }}
                     getCalendarContainer={trigger => {return trigger.parentNode.parentNode}}
                     onChange={(value) => {this.changeFilterValue(filter, value, index)}}
-                    renderExtraFooter={() => this.generateTimeTags(filter, index, commonProps.defaultValue)}
+                    renderExtraFooter={operator === '=' ? () => this.generateTimeTags(filter, index, commonProps.defaultValue) : null}
                 />
             </div>
 

+ 2 - 2
src/components/common/filterBox/filter2.jsx

@@ -89,7 +89,7 @@ class Filter extends React.Component {
                 <DatePicker
                     key={Math.random()}
                     defaultValue={commonProps.defaultValue ? (commonProps.defaultValue.dynamic ? null : commonProps.defaultValue) : null}
-                    showToday={false}
+                    showToday={operator !== '='}
                     open={this.state['datePickerOpen' + index]}
                     onOpenChange={status => {
                         let obj = {};
@@ -98,7 +98,7 @@ class Filter extends React.Component {
                     }}
                     getCalendarContainer={trigger => {return trigger.parentNode.parentNode}}
                     onChange={(value) => {this.changeFilterValue(filter, value, index)}}
-                    renderExtraFooter={() => this.generateTimeTags(filter, index, commonProps.defaultValue)}
+                    renderExtraFooter={operator === '=' ? () => this.generateTimeTags(filter, index, commonProps.defaultValue) : null}
                 />
             </div>
         }else if(type === 'categorical') { // 类别

+ 2 - 2
src/components/common/filterBox/filterBox.jsx

@@ -265,7 +265,7 @@ class FilterBox extends React.Component {
                 <DatePicker
                     key={Math.random()}
                     defaultValue={commonProps.defaultValue ? (commonProps.defaultValue.dynamic ? null : commonProps.defaultValue) : null}
-                    showToday={false}
+                    showToday={operator !== '='}
                     open={this.state['datePickerOpen' + index]}
                     onOpenChange={status => {
                         let obj = {};
@@ -273,7 +273,7 @@ class FilterBox extends React.Component {
                         this.setState(obj);
                     }}
                     onChange={(value) => {this.changeFilterValue(filter, value, index)}}
-                    renderExtraFooter={() => this.generateTimeTags(filter, index, commonProps.defaultValue)}
+                    renderExtraFooter={operator === '=' ? () => this.generateTimeTags(filter, index, commonProps.defaultValue) : null}
                 />
             </div>
         }else if(type === 'categorical') { // 类别

+ 2 - 2
src/components/common/filterBox/filterBox2.jsx

@@ -411,7 +411,7 @@ class FilterBox extends React.Component {
                 <DatePicker
                     key={Math.random()}
                     defaultValue={commonProps.defaultValue ? (commonProps.defaultValue.dynamic ? null : commonProps.defaultValue) : null}
-                    showToday={false}
+                    showToday={operator !== '='}
                     open={this.state['datePickerOpen' + index]}
                     onOpenChange={status => {
                         let obj = {};
@@ -419,7 +419,7 @@ class FilterBox extends React.Component {
                         this.setState(obj);
                     }}
                     onChange={(value) => {this.changeFilterValue(filter, value, index)}}
-                    renderExtraFooter={() => this.generateTimeTags(filter, index, commonProps.defaultValue)}
+                    renderExtraFooter={operator === '=' ? () => this.generateTimeTags(filter, index, commonProps.defaultValue) : null}
                 />
             </div>
         }else if(type === 'categorical') { // 类别

+ 8 - 5
src/components/dashboard/menu.jsx

@@ -136,13 +136,16 @@ class DashboardMenu extends React.Component {
                             this.setState({ editingKey: false });
                         }}/>}
                         onBlur={(e) => {
-                            if(e.target.value !== t.name) {
-                                dispatch({ type: 'dashboard/remoteModifyMenu', menu: { ...t, name: e.target.value } });
+                            let val = e.target.value;
+                            if(!!(val+'').trim() && val !== t.name) {
+                                dispatch({ type: 'dashboard/remoteModifyMenu', menu: { ...t, name: val } });
                             }
                             this.setState({ editingKey: false });
-                        }} onPressEnter={(e) => {
-                            if(e.target.value !== t.name) {
-                                dispatch({ type: 'dashboard/remoteModifyMenu', menu: { ...t, name: e.target.value } });
+                        }}
+                        onPressEnter={(e) => {
+                            let val = e.target.value;
+                            if(!!(val+'').trim() && val !== t.name) {
+                                dispatch({ type: 'dashboard/remoteModifyMenu', menu: { ...t, name: val } });
                             }
                             this.setState({ editingKey: false });
                         }}