feat: 为业务页面添加时间范围选择器的时间显示功能
- 在 onDuty 和 check 页面中,将 startDate 和 endDate 合并为 time 字段用于查询
- 在 correctPractice 基类中新增 getRangePickerShowTime 方法控制时间显示
- 为 edit-project-form 添加 confirmLoading 属性并调整地图容器布局
| | |
| | | } |
| | | |
| | | getEntityList(pageInfo, listBody) { |
| | | if (listBody.startDate) { |
| | | listBody.time = listBody.startDate + " - " + listBody.endDate; |
| | | } |
| | | return getCheckList(pageInfo, listBody); |
| | | } |
| | | |
| | |
| | | }) |
| | | } |
| | | |
| | | getRangePickerShowTime() { |
| | | return true |
| | | } |
| | | |
| | | handleImagePreviewClose = () => { |
| | | this.setState({ |
| | | imagePreviewVisible: false |
| | |
| | | } |
| | | } |
| | | |
| | | getRangePickerShowTime() { |
| | | return false |
| | | } |
| | | |
| | | getEntityList(pageInfo, listBody) { |
| | | return getCorrectPracticeList(pageInfo, listBody) |
| | | } |
| | |
| | | } |
| | | |
| | | getTitle() { |
| | | const showTime = this.getRangePickerShowTime && this.getRangePickerShowTime() |
| | | return ( |
| | | <div className="title flex"> |
| | | <div> |
| | |
| | | |
| | | |
| | | <LocaleProvider locale={zh_CN}> |
| | | <RangePicker onChange={(date, dateString) => { |
| | | <RangePicker {...(showTime ? { showTime: true } : {})} onChange={(date, dateString) => { |
| | | this.handleListBodyDateRangeChange(dateString[0], dateString[1]) |
| | | }} /> |
| | | </LocaleProvider> |
| | |
| | | } |
| | | |
| | | render() { |
| | | const { visible, onCancel, onOk, form, currentRowData } = this.props; |
| | | const { visible, onCancel, onOk, form, currentRowData, confirmLoading } = this.props; |
| | | const { getFieldDecorator } = form; |
| | | const { name, type, usageType, departmentPath, client, constructionLicense, itemCode, branchCompany, constructionCompanyInfo, supervisorCompanyInfo, developmentCompanyInfo, addressInfo, projectCost, scale } = this.state.editableData; |
| | | return ( |
| | |
| | | visible={visible} |
| | | onCancel={onCancel} |
| | | onOk={onOk} |
| | | confirmLoading={confirmLoading} |
| | | width={900} |
| | | destroyOnClose |
| | | > |
| | |
| | | </div> |
| | | <div style={{ padding: '0 10px' }}> |
| | | <div style={{ marginBottom: 10, display: 'flex' }}> |
| | | <Input |
| | | placeholder="请输入搜索关键字" |
| | | value={this.state.keyword} |
| | | onChange={(e) => this.setState({ keyword: e.target.value })} |
| | | style={{ marginRight: 10 }} |
| | | /> |
| | | <div style={{ flex: 1, marginRight: 10 }}> |
| | | <Input |
| | | placeholder="请输入搜索关键字" |
| | | value={this.state.keyword} |
| | | onChange={(e) => this.setState({ keyword: e.target.value })} |
| | | /> |
| | | <div id="mapContainer" className="mapBox" style={{ height: '400px', width: '100%', border: '1px solid #d9d9d9', marginTop: 10 }}></div> |
| | | </div> |
| | | <Button type="primary" onClick={this.handleSearch}>搜索</Button> |
| | | </div> |
| | | <div id="mapContainer" className="mapBox" style={{ height: '400px', width: '100%', border: '1px solid #d9d9d9' }}></div> |
| | | </div> |
| | | </Form> |
| | | </Modal> |
| | |
| | | } |
| | | } |
| | | |
| | | getRangePickerShowTime() { |
| | | return true |
| | | } |
| | | |
| | | getEntityList(pageInfo, listBody) { |
| | | if (listBody.startDate) { |
| | | listBody.time = listBody.startDate + " - " + listBody.endDate; |
| | | } |
| | | return getDuty(pageInfo, listBody); |
| | | } |
| | | |