CaiYuanYiTiHua/src/views/demo/keyproblem/keyissuesI/patchsummary/patchsummary.data.ts

293 lines
6.0 KiB
TypeScript
Raw Normal View History

2024-09-09 15:27:50 +08:00
import { BasicColumn, FormSchema } from '@/components/Table';
import { getChildrenTree } from '@/api/demo/system';
import { getLoad } from '@/api/sys/sysDataItemDetail';
2024-09-09 15:27:50 +08:00
import {
patchSourceOptions,
yearOptions,
markTypeOptions,
2024-09-12 08:57:15 +08:00
keyProblemMapStatusOptions,
2024-09-09 15:27:50 +08:00
mapTypeOptions,
} from '@/utils/global';
export const columns: BasicColumn[] = [
{
title: '图斑来源',
dataIndex: 'tubanlaiyuan',
},
{
title: '区县',
dataIndex: 'countyname',
width: 100,
},
{
title: '乡镇',
dataIndex: 'streetname',
},
{
title: '社区/村',
dataIndex: 'communityname',
},
{
title: '图斑编号',
dataIndex: 'caseno',
width: 200,
},
{
title: '图斑类型',
dataIndex: 'typename',
},
{
title: '图斑面积',
dataIndex: 'area',
width: 110,
},
{
title: '农用地面积',
dataIndex: 'nongyongdiarea',
width: 110,
},
{
title: '耕地面积',
dataIndex: 'gengdiarea',
width: 110,
},
{
title: '永农面积',
dataIndex: 'yongjiujibennongtianarea',
width: 110,
},
{
title: '当前状态',
dataIndex: 'handlestatusname',
width: 80,
},
{
title: '判定结果',
dataIndex: 'isillegal',
width: 80,
},
{
title: '下发时间',
dataIndex: 'identificationtime',
},
{
title: '项目名称',
dataIndex: 'xiangmumc',
},
{
title: '项目主体',
dataIndex: 'xiangmuzhuti',
},
{
title: '实际用途',
dataIndex: 'actualuseto',
},
2024-09-13 16:47:00 +08:00
// {
// title: '违法类型',
// dataIndex: 'weifaleixing',
// },
2024-09-09 15:27:50 +08:00
{
title: '整改措施',
dataIndex: 'measurename',
},
];
export const searchFormSchema: FormSchema[] = [
{
field: 'year',
component: 'Select',
colProps: { span: 4 },
label: '年份',
componentProps: {
options: yearOptions,
},
},
{
field: 'tubanlaiyuan',
label: '图斑来源',
component: 'ApiSelect',
2024-09-09 15:27:50 +08:00
colProps: { span: 4 },
componentProps: ({ formModel }) => {
return {
api: getLoad,
params: { code: 'zd1tbly' },
// 接口参数
resultField: 'result',
labelField: 'itemName',
valueField: 'itemValue',
};
2024-09-09 15:27:50 +08:00
},
},
{
field: 'picihao',
label: '批次',
component: 'Select',
colProps: { span: 4 },
componentProps: {
options: [],
},
},
2024-09-12 08:57:15 +08:00
2024-09-09 15:27:50 +08:00
{
field: 'typename',
label: '图斑类型',
component: 'ApiSelect',
2024-09-09 15:27:50 +08:00
colProps: { span: 4 },
componentProps: ({ formModel }) => {
return {
api: getLoad,
params: { code: 'zd1tblx' },
// 接口参数
resultField: 'result',
labelField: 'itemName',
valueField: 'itemValue',
};
2024-09-09 15:27:50 +08:00
},
},
{
field: 'isBuildName',
label: '标注类型',
component: 'Select',
colProps: { span: 4 },
componentProps: {
options: markTypeOptions,
},
},
{
field: 'countyid',
label: '区县',
component: 'ApiSelect',
colProps: { span: 4 },
componentProps: ({ tableAction, formModel }) => {
return {
api: getChildrenTree,
params: { parentId: 371300 },
// 接口参数
resultField: 'result',
labelField: 'name',
valueField: 'id',
onChange: () => {
formModel.streetid = '';
},
};
},
},
{
field: 'streetid',
label: '乡镇',
component: 'ApiSelect',
colProps: { span: 4 },
componentProps: ({ formModel }) => {
return {
api: formModel.countyid && getChildrenTree,
params: { parentId: formModel.countyid },
// 接口参数
resultField: 'result',
labelField: 'name',
valueField: 'id',
};
},
},
2024-09-12 08:57:15 +08:00
// {
// field: 'communityid',
// label: '村',
// component: 'ApiSelect',
// colProps: { span: 4 },
// componentProps: ({ formModel }) => {
// return {
// api: formModel.countyid && formModel.streetid && getChildrenTree,
// params: { parentId: formModel.streetid },
// // 接口参数
// resultField: 'result',
// labelField: 'name',
// valueField: 'id',
// };
// },
// },
2024-09-09 15:27:50 +08:00
{
field: 'nowStatus',
label: '当前状态',
component: 'Select',
componentProps: {
2024-09-12 08:57:15 +08:00
options: keyProblemMapStatusOptions,
2024-09-09 15:27:50 +08:00
},
colProps: { span: 4 },
slot: 'dangqianzhuangtai',
},
{
field: 'isIllegal',
label: '判定结果',
component: 'Select',
colProps: { span: 4 },
componentProps: {
options: mapTypeOptions,
},
},
2024-09-12 08:57:15 +08:00
// {
// field: 'weifaleixing',
// label: '违法类型',
// component: 'Select',
// colProps: { span: 4 },
// componentProps: {
// options: [
// { label: '非农化违法用地', value: '0' },
// { label: '非粮化违法用地', value: '1' },
// ],
// },
// },
2024-09-09 15:27:50 +08:00
{
field: 'measureName',
label: '整改措施',
component: 'Select',
colProps: { span: 4 },
componentProps: {
options: [
2024-09-12 08:57:15 +08:00
{ label: '拆除', value: '1' },
{ label: '拆除复耕', value: '2' },
2024-09-09 15:27:50 +08:00
],
},
},
// 增加图斑面积、耕地面积、永农面积的筛选项;
{
field: 'tubanmianji',
label: '图斑面积',
colProps: { span: 4 },
slot: 'tubanmianji',
},
{
field: 'gengdimianji',
label: '耕地面积',
colProps: { span: 4 },
slot: 'gengdimianji',
},
{
field: 'jibennongtianmianji',
label: '永农面积',
colProps: { span: 4 },
slot: 'jibennongtianmianji',
},
{
field: 'originalcaseno',
label: '标识号',
component: 'Input',
colProps: { span: 4 },
},
2024-09-12 08:57:15 +08:00
{
field: '[startTime, endTime]',
label: '下发时间',
component: 'RangePicker',
colProps: { span: 5 },
componentProps: {
format: 'YYYY-MM-DD',
placeholder: ['开始日期', '结束日期'],
},
},
2024-09-09 15:27:50 +08:00
{
field: 'caseNo',
label: '图斑编号',
component: 'Input',
2024-09-12 08:57:15 +08:00
colProps: { span: 6 },
2024-09-09 15:27:50 +08:00
},
];