import { useI18n } from '@jeesite/core/hooks/web/useI18n'; import { BasicColumn, BasicTableProps, FormProps } from '@jeesite/core/components/Table'; import { BizMunicipalities, bizMunicipalitiesListData } from '@jeesite/biz/api/biz/municipalities'; const { t } = useI18n('biz.municipalities'); const modalProps = { title: t('地市信息选择'), }; const searchForm: FormProps = { baseColProps: { md: 8, lg: 6 }, labelWidth: 90, schemas: [ { label: t('记录时间起'), field: 'createTime_gte', component: 'DatePicker', componentProps: { format: 'YYYY-MM-DD HH:mm', showTime: { format: 'HH:mm' }, }, }, { label: t('记录时间止'), field: 'createTime_lte', component: 'DatePicker', componentProps: { format: 'YYYY-MM-DD HH:mm', showTime: { format: 'HH:mm' }, }, }, { label: t('县区名称'), field: 'countyName', component: 'Input', }, { label: t('省份编码'), field: 'provinceCode', component: 'Select', componentProps: { dictType: '', allowClear: true, }, }, { label: t('市区编码'), field: 'cityCode', component: 'Select', componentProps: { dictType: '', allowClear: true, }, }, { label: t('县区编码'), field: 'countyCode', component: 'Input', }, { label: t('街道名称'), field: 'townName', component: 'Input', }, { label: t('街道编号'), field: 'townCode', component: 'Input', }, { label: t('社区名称'), field: 'villageName', component: 'Input', }, { label: t('社区编号'), field: 'villageCode', component: 'Input', }, { label: t('数据状态'), field: 'dataStatus', component: 'Select', componentProps: { dictType: '', allowClear: true, }, }, ], }; const tableColumns: BasicColumn[] = [ { title: t('记录时间'), dataIndex: 'createTime', key: 'a.create_time', sorter: true, width: 230, align: 'left', slot: 'firstColumn', }, { title: t('县区名称'), dataIndex: 'countyName', key: 'a.county_name', sorter: true, width: 130, align: 'left', }, { title: t('省份编码'), dataIndex: 'provinceCode', key: 'a.province_code', sorter: true, width: 130, align: 'left', dictType: '', }, { title: t('市区编码'), dataIndex: 'cityCode', key: 'a.city_code', sorter: true, width: 130, align: 'left', dictType: '', }, { title: t('县区编码'), dataIndex: 'countyCode', key: 'a.county_code', sorter: true, width: 130, align: 'left', }, { title: t('街道名称'), dataIndex: 'townName', key: 'a.town_name', sorter: true, width: 130, align: 'left', }, { title: t('街道编号'), dataIndex: 'townCode', key: 'a.town_code', sorter: true, width: 130, align: 'left', }, { title: t('社区名称'), dataIndex: 'villageName', key: 'a.village_name', sorter: true, width: 130, align: 'left', }, { title: t('社区编号'), dataIndex: 'villageCode', key: 'a.village_code', sorter: true, width: 130, align: 'left', }, { title: t('更新时间'), dataIndex: 'updateTime', key: 'a.update_time', sorter: true, width: 130, align: 'center', }, { title: t('数据状态'), dataIndex: 'dataStatus', key: 'a.data_status', sorter: true, width: 130, align: 'left', dictType: '', }, ]; const tableProps: BasicTableProps = { api: bizMunicipalitiesListData, beforeFetch: (params) => { params['isAll'] = true; return params; }, columns: tableColumns, formConfig: searchForm, rowKey: 'id', }; export default { modalProps, tableProps, itemCode: 'id', itemName: 'id', isShowCode: false, };