董国庆
2025-03-17 3fdfaf5caad7eb780afc0fd7c80beac6cf69e88a
management/src/pages/appeal-management/index.jsx
@@ -2,23 +2,26 @@
import { PageContainer, ProTable } from '@ant-design/pro-components';
import { Button, InputNumber, Select, Space } from 'antd';
import { useRef, useState } from 'react';
import { Access, useAccess } from 'umi';
import { Access, useAccess,history } from 'umi';
import moment from 'moment';
import { getList } from './service';
import { exportExcell,downLoad } from '@/utils/utils';
// import { add, edit, del, getList } from './service';
const Account = () => {
    const actionRef = useRef();
    const addViewRef = useRef();
    const [modalVisible, handleModalVisible] = useState(false);
    const access = useAccess();
    const formRef = useRef();
    const columns = [
        {
            title: '录入人',
            dataIndex: 'name',
            dataIndex: 'reportUserName',
        },
        {
            title: '录入联系方式',
            dataIndex: 'name',
            dataIndex: 'reportUserPhone',
        },
        {
            title: '群众姓名',
@@ -26,29 +29,29 @@
        },
        {
            title: '群众联系方式',
            dataIndex: 'name',
            dataIndex: 'contactNumber',
        },
        {
            title: '发生时间',
            dataIndex: 'name',
            dataIndex: 'time',
            valueType:'dateRange',
            render: (text, record) => {
                return record.time ? moment(record.time).format('YYYY-MM-DD HH:mm:ss') : '';
            }
        },
        {
            title: '问题类型',
            dataIndex: 'name',
            valueEnum: {
                1: '正常',
                2: '冻结',
            },
            dataIndex: 'problemType',
        },
        {
            title: '状态',
            dataIndex: 'name',
            dataIndex: 'status',
            valueEnum: {
                1: '上报待审核',
                2: '正在办理',
                0: '正在办理',
                1: '延期办理',
                2: '超时办理',
                3: '已办结',
                4:'延期办理',
                5:'超时办理'
                4: '上报待审核',
            },
        },
        {
@@ -63,7 +66,7 @@
                                <Button
                                    type="link"
                                    onClick={() => {
                                        history.push('/appeal-management/detail')
                                        history.push('/appeal-management/detail?id=' + record.id)
                                    }}
                                >
                                    查看详情
@@ -76,8 +79,7 @@
                                <Button
                                    type="link"
                                    onClick={() => {
                                        addViewRef.current.refreshData(record);
                                        handleModalVisible(true);
                                        downLoad(`/api/huacheng-sangeshenbian/complaint/download-file/${record.id}/1`, '社区问题单导出.docx');
                                    }}
                                >
                                    社区问题单导出
@@ -90,8 +92,7 @@
                                <Button
                                    type="link"
                                    onClick={() => {
                                        addViewRef.current.refreshData(record);
                                        handleModalVisible(true);
                                        downLoad(`/api/huacheng-sangeshenbian/complaint/download-file/${record.id}/2`, '问题处理单导出.docx');
                                    }}
                                >
                                    问题处理单导出
@@ -104,8 +105,7 @@
                                <Button
                                    type="link"
                                    onClick={() => {
                                        addViewRef.current.refreshData(record);
                                        handleModalVisible(true);
                                        downLoad(`/api/huacheng-sangeshenbian/complaint/download-file/${record.id}/3`, '协调通知单导出.docx');
                                    }}
                                >
                                    协调通知单导出
@@ -121,13 +121,26 @@
        <div>
            <PageContainer header={{
                breadcrumb: {},
            }}>
            }}
            title={'诉求管理'}
            >
                <ProTable
                    rowKey="id"
                    actionRef={actionRef}
                    columns={columns}
                    pagination={false}
                    formRef={formRef}
                    request={async (params) => {
                        if(params.time && params.time.length > 0) {
                            params.startTime =moment(params.time[0]).format('YYYY-MM-DD HH:mm:ss');
                            params.endTime = moment(params.time[1]).format('YYYY-MM-DD HH:mm:ss');
                            delete params.time
                        }else{
                            delete params.startTime
                            delete params.endTime
                        }
                        return buildProTableDataSource(getList, params);
                    }}
                    search={{ labelWidth: 'auto' }}
@@ -137,7 +150,10 @@
                                <Button
                                    type="primary"
                                    onClick={() => {
                                        const params = {
                                          ...formRef.current.getFieldsValue(),
                                        };
                                        exportExcell('述求管理.xlsx', params, '/api/huacheng-sangeshenbian/complaint/export');
                                    }}
                                >
                                    导出