hejianhao
2026-04-01 ac3d078133249a5c8c129a8b754a0fc65227a87b
feat: 为业务页面添加时间范围选择器的时间显示功能

- 在 onDuty 和 check 页面中,将 startDate 和 endDate 合并为 time 字段用于查询
- 在 correctPractice 基类中新增 getRangePickerShowTime 方法控制时间显示
- 为 edit-project-form 添加 confirmLoading 属性并调整地图容器布局
4个文件已修改
39 ■■■■■ 已修改文件
estate-frontend-v2024/src/views/business/check.jsx 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
estate-frontend-v2024/src/views/business/correctPractice.jsx 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
estate-frontend-v2024/src/views/business/forms/edit-project-form.jsx 18 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
estate-frontend-v2024/src/views/business/onDuty.jsx 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
estate-frontend-v2024/src/views/business/check.jsx
@@ -23,6 +23,9 @@
  }
  getEntityList(pageInfo, listBody) {
    if (listBody.startDate) {
      listBody.time = listBody.startDate + " - " + listBody.endDate;
    }
    return getCheckList(pageInfo, listBody);
  }
@@ -41,6 +44,10 @@
    })
  }
  getRangePickerShowTime() {
    return true
  }
  handleImagePreviewClose = () => {
    this.setState({
      imagePreviewVisible: false
estate-frontend-v2024/src/views/business/correctPractice.jsx
@@ -32,6 +32,10 @@
        }
    }
    getRangePickerShowTime() {
        return false
    }
    getEntityList(pageInfo, listBody) {
        return getCorrectPracticeList(pageInfo, listBody)
    }
@@ -114,6 +118,7 @@
    }
    getTitle() {
        const showTime = this.getRangePickerShowTime && this.getRangePickerShowTime()
        return (
            <div className="title flex">
                <div>
@@ -174,7 +179,7 @@
                    &nbsp;
                    &nbsp;
                    <LocaleProvider locale={zh_CN}>
                        <RangePicker onChange={(date, dateString) => {
                        <RangePicker {...(showTime ? { showTime: true } : {})} onChange={(date, dateString) => {
                            this.handleListBodyDateRangeChange(dateString[0], dateString[1])
                        }} />
                    </LocaleProvider>
estate-frontend-v2024/src/views/business/forms/edit-project-form.jsx
@@ -390,7 +390,7 @@
    }
    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 (
@@ -399,6 +399,7 @@
                visible={visible}
                onCancel={onCancel}
                onOk={onOk}
                confirmLoading={confirmLoading}
                width={900}
                destroyOnClose
            >
@@ -680,15 +681,16 @@
                    </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>
estate-frontend-v2024/src/views/business/onDuty.jsx
@@ -24,7 +24,14 @@
    }
  }
  getRangePickerShowTime() {
    return true
  }
  getEntityList(pageInfo, listBody) {
    if (listBody.startDate) {
      listBody.time = listBody.startDate + " - " + listBody.endDate;
    }
    return getDuty(pageInfo, listBody);
  }