import { BasicColumn, FormSchema } from '/@/components/Table';
import { dict, getTown, getHylb } from '/@/api/common/api'
import { useUserStore } from '/@/store/modules/user';
import { convertTreeData } from '/@/utils/modifFiled';
import { ref } from 'vue';

const userStore: any = useUserStore();
export const useSuspectsData = () => {
    const suspects = ref([]);
    // 获取行业分类
    const getIsSuspect = async () => {
        suspects.value = await dict({ key: 'dk_hyfl' });
    };
    getIsSuspect();
    return { data: suspects };
};

export const useCategoryData = () => {
    let allCategory = [];
    const treeData = ref([]);
    // 获取行业类别
    const getData = async () => {
        allCategory = await getHylb({});
        // allCategory = convertTreeData(allCategory); // 只显示前2级
        // allCategory.forEach((item: any) => {
        //     item.disabled = true; // 第1层级不能选中
        // });
        treeData.value = allCategory;
    };
    getData();
    // 改变行业分类
    function changeIsSuspect(v) {
        if (v == 1) {
            // 只显示42号类
            treeData.value = allCategory.filter((item) => item['is42']);
        } else {
            treeData.value = allCategory;
        }
    }
    return { data: treeData, changeIsSuspect };
};
// 获取等级
const userIdent = ref<any>([])
export const getUserLevel = () => {
    const getIsSuspect = async () => {
        if (userStore?.userInfo?.userIdentity == '1') {
            userIdent.value = [{
                text: '市级',
                value: '1'

            }, {
                text: '区县',
                value: '2'
            }
            ]
        }
    };
    getIsSuspect();

    return { data: userIdent };
}
export const Columns: BasicColumn[] = [

    {
        title: '市',
        dataIndex: 'name',
        resizable: true,
    },
    {
        title: '地块名称',
        dataIndex: 'wrdkmc',
        resizable: true,
    },
    {
        title: '地块编码',
        dataIndex: 'wrdkbm',
        resizable: true,
    },
    {
        title: '《污染地块土壤环境管理办法》',
        dataIndex: 'wrdktrhjglbf',
        resizable: true,
    },
    {
        title: '《土壤污染防治法》第59条第一款',
        dataIndex: 'trwrfzfdyt',
        resizable: true,
    },
    {
        title: '《土壤污染防治法》第59条第二款',
        dataIndex: 'trwrfzfdet',
        resizable: true,
    },
    {
        title: '《土壤污染防治法》第67条（超标）',
        dataIndex: 'trwrfzfcb',
        resizable: true,
    },
    {
        title: '《土壤污染防治法》第44条',
        dataIndex: 'trwrfzf',
        resizable: true,
    },
    {
        title: '《工矿用地土壤环境管理办法》 第16条',
        dataIndex: 'gkydtrhjglbf',
        resizable: true,
    },

    {
        title: '省级条例或其他',
        dataIndex: 'sjtlhqt',
        resizable: true,
    },
    {
        title: '行业门类',
        dataIndex: 'hyml',
        resizable: true,
    },
    {
        title: '行业大类',
        dataIndex: 'hydl',
        resizable: true,
    },
    {
        title: '行业中类',
        dataIndex: 'hyzl',
        resizable: true,
    },
    {
        title: '行业小类',
        dataIndex: 'hyxl',
        resizable: true,
    },
    {
        title: '涉及的专项工作',
        dataIndex: 'gzlx',
        resizable: true,
    },
    {
        title: '涉及的重点区域',
        dataIndex: 'gzfw',
        resizable: true,
    },
]
export const searchFormSchema: FormSchema[] = [
    {
        label: '市',
        field: 'cityCode',
        component: 'ApiSelect',
        ifShow: () => {
            return userStore?.userInfo?.userIdentity == '1' ? true : false
        },
        componentProps: ({ formModel, formActionType }) => {
            return {
                api: getTown,
                params: 440000, // 行政区划编码
                labelField: 'name',
                valueField: 'id',
                onChange: (val: any) => {
                    const { updateSchema } = formActionType;
                    formModel.countryCode = undefined;
                    if (val) {
                        updateSchema({
                            field: 'countryCode',
                            componentProps: {
                                api: getTown,
                                params: val,
                                labelField: 'name',
                                valueField: 'id',
                            },
                        });
                    } else {
                        updateSchema({
                            field: 'countryCode',
                            componentProps: {
                                api: undefined,
                                labelField: 'name',
                                valueField: 'id',
                            },
                        });
                    }
                },
            };
        },
    },
    {
        label: '县',
        field: 'countryCode',
        component: 'ApiSelect',
        ifShow: () => {
            return (userStore?.userInfo?.userIdentity == '2' || userStore?.userInfo?.userIdentity == '1') ? true : false
        },
        componentProps: ({ formModel, formActionType }) => {
            if (userStore?.userInfo?.userIdentity == '2') {
                const { updateSchema } = formActionType;
                updateSchema({
                    label: '区县',
                    field: 'countryCode',
                    ifShow: true,
                    componentProps: {
                        api: getTown,
                        params: userStore?.userInfo?.codeRegion,
                        labelField: 'name',
                        valueField: 'id',
                    },
                });
            }
            return {
                labelField: 'name',
                valueField: 'id',
            }
        },
    },
    {
        label: '行业类别',
        field: 'hylb',
        component: 'TreeSelect',
        slot: 'category',
    },
    {
        label: '地块名称',
        field: 'wrdkbm',
        component: 'Input',
        componentProps: {
            placeholder: '地块名称或地块编码'
        }
    },
]
// 法理依据
export const FlColumns: BasicColumn[] = [

    {
        title: '市',
        dataIndex: 'name',
        resizable: true,
    },

    {
        title: '《污染地块土壤环境管理办法》',
        dataIndex: 'wrdktrhjglbf',
        resizable: true,
    },
    {
        title: '《土壤污染防治法》第59条第一款',
        dataIndex: 'trwrfzfdyt',
        resizable: true,
    },
    {
        title: '《土壤污染防治法》第59条第二款',
        dataIndex: 'trwrfzfdet',
        resizable: true,
    },
    {
        title: '《土壤污染防治法》第67条（超标）',
        dataIndex: 'trwrfzfcb',
        resizable: true,
    },

    {
        title: '《工矿用地土壤环境管理办法》 第16条',
        dataIndex: 'gkydtrhjglbf',
        resizable: true,
    },

    {
        title: '省级条例或其他',
        dataIndex: 'sjtlhqt',
        resizable: true,
    },
    {
        title: '未填报',
        dataIndex: 'wtb',
        resizable: true,
    },

]
export const FlsearchFormSchema: FormSchema[] = [
    {
        label: '等级',
        field: 'level',
        component: 'ApiSelect',
        show: () => {
            return userStore?.userInfo?.userIdentity == '1' ? true : false
        },
        slot: 'userLevle'
    },
    {
        label: '市',
        field: 'cityCode',
        component: 'ApiSelect',
        show: ({ values }) => {
            return values.level == '2' ? true : false
        },
        componentProps: () => {
            return {
                api: getTown,
                params: 440000, // 行政区划编码
                labelField: 'name',
                valueField: 'id',

            };
        },
    },
    {
        label: '政策依据',
        field: 'faliyiju',
        component: 'JSearchSelect',
        componentProps: {
            dict: 'dk_zcyj',
        },
    },

    // {
    //     label: '行业类别',
    //     field: 'hylb',
    //     component: 'TreeSelect',
    //     slot: 'category',
    // },

    // {
    //     label: '是否超标',
    //     field: 'sfcb',
    //     component: 'ApiSelect',
    //     componentProps: {
    //         api: dict,
    //         params: { key: 'qd_sfcb' },
    //         labelField: 'text',
    //         valueField: 'value',
    //     }
    // },
]
// 地块工作类型情况统计
export const DkgzColumns: BasicColumn[] = [

    {
        title: '市',
        dataIndex: 'name',
        resizable: true,
    },

    {
        title: '危险化学品搬迁',
        dataIndex: 'wxhxpbq',
        resizable: true,
    },
    {
        title: '长江经济带整治化工行业整治',
        dataIndex: 'cjjjd',
        resizable: true,
    },
    {
        title: '其他',
        dataIndex: 'qt',
        resizable: true,
    },
    {
        title: '未确定',
        dataIndex: 'wqd',
        resizable: true,
    },

]
export const DkgzsearchFormSchema: FormSchema[] = [
    {
        label: '等级',
        field: 'level',
        component: 'ApiSelect',
        show: () => {
            return userStore?.userInfo?.userIdentity == '1' ? true : false
        },
        slot: 'userLevle'
    },
    {
        label: '市',
        field: 'cityCode',
        component: 'ApiSelect',
        show: ({ values }) => {
            return values.level == '2' ? true : false
        },
        componentProps: () => {
            return {
                api: getTown,
                params: 440000, // 行政区划编码
                labelField: 'name',
                valueField: 'id',

            };
        },
    },

    // {
    //     label: '行业类别',
    //     field: 'hylb',
    //     component: 'TreeSelect',
    //     slot: 'category',
    // },

    // {
    //     label: '政策依据',
    //     field: 'faliyiju',
    //     component: 'JSearchSelect',
    //     componentProps: {
    //         dict: 'dk_zcyj',
    //     },
    // },
]
// 地块工作范围情况统计
export const DkfwColumns: BasicColumn[] = [

    {
        title: '市',
        dataIndex: 'name',
        resizable: true,
    },

    {
        title: '京津冀',
        dataIndex: 'jjj',
        resizable: true,
    },
    {
        title: '长江经济带',
        dataIndex: 'cjjjd',
        resizable: true,
    },
    {
        title: '黄河流域',
        dataIndex: 'hhly',
        resizable: true,
    },
    {
        title: '粤港澳大湾区',
        dataIndex: 'egadwq',
        resizable: true,
    },
    {
        title: '其他',
        dataIndex: 'qt',
        resizable: true,
    },
    {
        title: '未确定',
        dataIndex: 'wqd',
        resizable: true,
    },

]
export const DkfwsearchFormSchema: FormSchema[] = [
    {
        label: '等级',
        field: 'level',
        component: 'ApiSelect',
        show: () => {
            return userStore?.userInfo?.userIdentity == '1' ? true : false
        },
        slot: 'userLevle'
    },
    {
        label: '市',
        field: 'cityCode',
        component: 'ApiSelect',
        show: ({ values }) => {
            return values.level == '2' ? true : false
        },
        componentProps: ({ }) => {
            return {
                api: getTown,
                params: 440000, // 行政区划编码
                labelField: 'name',
                valueField: 'id',

            };
        },
    },

    // {
    //     label: '行业类别',
    //     field: 'hylb',
    //     component: 'TreeSelect',
    //     slot: 'category',
    // },

]

// 地块初步调查情况 详细调查情况
export const DkcbColumns: BasicColumn[] = [

    {
        title: '地块名称',
        dataIndex: 'wrdkmc',
        resizable: true,
    },

    {
        title: '地块编码',
        dataIndex: 'wrdkbm',
        resizable: true,
    },
    {
        title: '调查是否超标',
        dataIndex: 'pollueted',
        resizable: true,
    },
    {
        title: '土壤受污染程度',
        dataIndex: 'trwrwcd',
        resizable: true,
    },
    {
        title: '是否只进行书面调查',
        dataIndex: 'jxsmdc',
        resizable: true,
    },
    {
        title: '公示截图',
        dataIndex: 'gspic',
        resizable: true,
    },
    {
        title: '调查报告',
        dataIndex: 'dcbglj',
        resizable: true,
    },
    {
        title: '边界文件',
        dataIndex: 'dkshp',
        resizable: true,
    },
    {
        title: '边界图片',
        dataIndex: 'dkpic',
        resizable: true,
    },
    {
        title: '检测报告',
        dataIndex: 'bglj',
        resizable: true,
    },
]
export const DkcbsearchFormSchema: FormSchema[] = [
    {
        label: '市',
        field: 'cityCode',
        component: 'ApiSelect',
        ifShow: () => {
            return userStore?.userInfo?.userIdentity == '1' ? true : false
        },
        componentProps: ({ formModel, formActionType }) => {
            return {
                api: getTown,
                params: 440000, // 行政区划编码
                labelField: 'name',
                valueField: 'id',
                onChange: (val: any) => {
                    const { updateSchema } = formActionType;
                    formModel.countryCode = undefined;
                    if (val) {
                        updateSchema({
                            field: 'countryCode',
                            componentProps: {
                                api: getTown,
                                params: val,
                                labelField: 'name',
                                valueField: 'id',
                            },
                        });
                    } else {
                        updateSchema({
                            field: 'countryCode',
                            componentProps: {
                                api: undefined,
                                labelField: 'name',
                                valueField: 'id',
                            },
                        });
                    }
                },
            };
        },
    },
    {
        label: '县',
        field: 'countryCode',
        component: 'ApiSelect',
        ifShow: () => {
            return (userStore?.userInfo?.userIdentity == '2' || userStore?.userInfo?.userIdentity == '1') ? true : false
        },
        componentProps: ({ formModel, formActionType }) => {
            if (userStore?.userInfo?.userIdentity == '2') {
                const { updateSchema } = formActionType;
                updateSchema({
                    label: '区县',
                    field: 'countryCode',
                    ifShow: true,
                    componentProps: {
                        api: getTown,
                        params: userStore?.userInfo?.codeRegion,
                        labelField: 'name',
                        valueField: 'id',
                    },
                });
            }
            return {
                labelField: 'name',
                valueField: 'id',
            }
        },
    },
    // {
    //     label: '政策依据',
    //     field: 'faliyiju',
    //     component: 'JSearchSelect',
    //     componentProps: {
    //         dict: 'dk_zcyj',
    //     },
    // },
    // {
    //     label: '行业类别',
    //     field: 'hylb',
    //     component: 'TreeSelect',
    //     slot: 'category',
    // },
    {
        label: '是否超标',
        field: 'sfcb',
        component: 'ApiSelect',
        componentProps: {
            api: dict,
            params: { key: 'qd_sfcb' },
            labelField: 'text',
            valueField: 'value',
        }
    },
    {
        label: '地块名称',
        field: 'wrdkbm',
        component: 'Input',
        componentProps: {
            placeholder: '地块名称或地块编码'
        }
    },
    {
        label: '土壤受污染程度',
        field: 'trwrwcd',
        component: 'JSearchSelect',
        componentProps: {
            dict: 'dk_trwr',
        },
    },
]

// 初调+详调
export const CdxdColumns: BasicColumn[] = [

    {
        title: '地块名称',
        dataIndex: 'wrdkmc',
        resizable: true,
    },

    {
        title: '地块编码',
        dataIndex: 'wrdkbm',
        resizable: true,
    },
    {
        title: '土壤受污染程度',
        dataIndex: 'trwrwcd',
        resizable: true,
    },
    {
        title: '初调是否超标',
        dataIndex: 'pollueted',
        resizable: true,
    },
    {
        title: '初调公示截图',
        dataIndex: 'gspic',
        resizable: true,
    },
    {
        title: '初调调查报告',
        dataIndex: 'dcbglj',
        resizable: true,
    },
    {
        title: '初调边界文件',
        dataIndex: 'dkshp',
        resizable: true,
    },
    {
        title: '初调边界图片',
        dataIndex: 'dkpic',
        resizable: true,
    },
    {
        title: '初调检测报告',
        dataIndex: 'bglj',
        resizable: true,
    },

    {
        title: '详调是否超标',
        dataIndex: 'xxpollueted',
        resizable: true,
    },
    {
        title: '详调公示截图',
        dataIndex: 'xxgspic',
        resizable: true,
    },
    {
        title: '详调调查报告',
        dataIndex: 'xxdcbglj',
        resizable: true,
    },
    {
        title: '详调边界文件',
        dataIndex: 'xxdkshp',
        resizable: true,
    },
    {
        title: '详调边界图片',
        dataIndex: 'xxdkpic',
        resizable: true,
    },
    {
        title: '详调检测报告',
        dataIndex: 'xxbglj',
        resizable: true,
    },
]
export const CdxdsearchFormSchema: FormSchema[] = [
    {
        label: '市',
        field: 'cityCode',
        component: 'ApiSelect',
        ifShow: () => {
            return userStore?.userInfo?.userIdentity == '1' ? true : false
        },
        componentProps: ({ formModel, formActionType }) => {
            return {
                api: getTown,
                params: 440000, // 行政区划编码
                labelField: 'name',
                valueField: 'id',
                onChange: (val: any) => {
                    const { updateSchema } = formActionType;
                    formModel.countryCode = undefined;
                    if (val) {
                        updateSchema({
                            field: 'countryCode',
                            componentProps: {
                                api: getTown,
                                params: val,
                                labelField: 'name',
                                valueField: 'id',
                            },
                        });
                    } else {
                        updateSchema({
                            field: 'countryCode',
                            componentProps: {
                                api: undefined,
                                labelField: 'name',
                                valueField: 'id',
                            },
                        });
                    }
                },
            };
        },
    },
    {
        label: '县',
        field: 'countryCode',
        component: 'ApiSelect',
        ifShow: () => {
            return (userStore?.userInfo?.userIdentity == '2' || userStore?.userInfo?.userIdentity == '1') ? true : false
        },
        componentProps: ({ formModel, formActionType }) => {
            if (userStore?.userInfo?.userIdentity == '2') {
                const { updateSchema } = formActionType;
                updateSchema({
                    label: '区县',
                    field: 'countryCode',
                    ifShow: true,
                    componentProps: {
                        api: getTown,
                        params: userStore?.userInfo?.codeRegion,
                        labelField: 'name',
                        valueField: 'id',
                    },
                });
            }
            return {
                labelField: 'name',
                valueField: 'id',
            }
        },
    },
    // {
    //     label: '政策依据',
    //     field: 'faliyiju',
    //     component: 'JSearchSelect',
    //     componentProps: {
    //         dict: 'dk_zcyj',
    //     },
    // },
    // {
    //     label: '行业类别',
    //     field: 'hylb',
    //     component: 'TreeSelect',
    //     slot: 'category',
    // },
    {
        label: '地块名称',
        field: 'wrdkbm',
        component: 'Input',
        componentProps: {
            placeholder: '地块名称或地块编码'
        }
    },

]

// 地块调查填报情况统计
export const DktbColumns: BasicColumn[] = [
    {
        title: '市',
        dataIndex: 'name',
        resizable: true,
    },

    {
        title: '地块总数',
        dataIndex: 'total',
        resizable: true,
    },
    {
        title: '采取初步调查地块数',
        dataIndex: 'cddk',
        resizable: true,
    },
    {
        title: '采取详细调查地块数',
        dataIndex: 'xddk',
        resizable: true,
    },
    {
        title: '采取初调+详调地块数',
        dataIndex: 'cdxddk',
        resizable: true,
    },
    {
        title: '未填报地块数',
        dataIndex: 'wtbdk',
        resizable: true,
    },
    {
        title: '初调评审通过地块数',
        dataIndex: 'cdpsdk',
        resizable: true,
    },
    {
        title: '详调评审通过地块数',
        dataIndex: 'xdpsdk',
        resizable: true,
    },
    {
        title: '初调+详调评审通过地块数',
        dataIndex: 'cdxdpsdk',
        resizable: true,
    },
    {
        title: '未通过评审地块数',
        dataIndex: 'wtgdk',
        resizable: true,
    },
]
export const DktbsearchFormSchema: FormSchema[] = [
    {
        label: '等级',
        field: 'level',
        component: 'ApiSelect',
        show: () => {
            return userStore?.userInfo?.userIdentity == '1' ? true : false
        },
        slot: 'userLevle'
    },
    {
        label: '市',
        field: 'cityCode',
        component: 'ApiSelect',
        show: ({ values }) => {
            return values.level == '2' ? true : false
        },
        componentProps: () => {
            return {
                api: getTown,
                params: 440000, // 行政区划编码
                labelField: 'name',
                valueField: 'id',

            };
        },
    },
    // {
    //     label: '政策依据',
    //     field: 'faliyiju',
    //     component: 'JSearchSelect',
    //     componentProps: {
    //         dict: 'dk_zcyj',
    //     },
    // },

]

// 地块风险评估填报情况
export const DkfxpgColumns: BasicColumn[] = [
    {
        title: '市',
        dataIndex: 'cityName',
        resizable: true,
    },
    {
        title: '县',
        dataIndex: 'countryName',
        resizable: true,
    },
    {
        title: '地块名称',
        dataIndex: 'wrdkmc',
        resizable: true,
    },

    {
        title: '地块编码',
        dataIndex: 'wrdkbm',
        resizable: true,
    },
    {
        title: '主要风险',
        dataIndex: 'zyfx',
        resizable: true,
    },
    {
        title: '评审情况',
        dataIndex: 'psqk',
        resizable: true,
    },

    {
        title: '公示截图',
        dataIndex: 'gspic',
        resizable: true,
    },
    {
        title: '风险评估报告',
        dataIndex: 'fxpgbglj',
        resizable: true,
    },
    {
        title: '边界文件',
        dataIndex: 'dkshp',
        resizable: true,
    },
    {
        title: '边界图片',
        dataIndex: 'dkpic',
        resizable: true,
    },

]
export const DkfxpgsearchFormSchema: FormSchema[] = [
    {
        label: '市',
        field: 'cityCode',
        component: 'ApiSelect',
        ifShow: () => {
            return userStore?.userInfo?.userIdentity == '1' ? true : false
        },
        componentProps: ({ formModel, formActionType }) => {
            return {
                api: getTown,
                params: 440000, // 行政区划编码
                labelField: 'name',
                valueField: 'id',
                onChange: (val: any) => {
                    const { updateSchema } = formActionType;
                    formModel.countryCode = undefined;
                    if (val) {
                        updateSchema({
                            field: 'countryCode',
                            componentProps: {
                                api: getTown,
                                params: val,
                                labelField: 'name',
                                valueField: 'id',
                            },
                        });
                    } else {
                        updateSchema({
                            field: 'countryCode',
                            componentProps: {
                                api: undefined,
                                labelField: 'name',
                                valueField: 'id',
                            },
                        });
                    }
                },
            };
        },
    },
    {
        label: '县',
        field: 'countryCode',
        component: 'ApiSelect',
        ifShow: () => {
            return (userStore?.userInfo?.userIdentity == '2' || userStore?.userInfo?.userIdentity == '1') ? true : false
        },
        componentProps: ({ formModel, formActionType }) => {
            if (userStore?.userInfo?.userIdentity == '2') {
                const { updateSchema } = formActionType;
                updateSchema({
                    label: '区县',
                    field: 'countryCode',
                    ifShow: true,
                    componentProps: {
                        api: getTown,
                        params: userStore?.userInfo?.codeRegion,
                        labelField: 'name',
                        valueField: 'id',
                    },
                });
            }
            return {
                labelField: 'name',
                valueField: 'id',
            }
        },
    },

    // {
    //     label: '行业类别',
    //     field: 'hylb',
    //     component: 'TreeSelect',
    //     slot: 'category',
    // },
    {
        label: '评审情况',
        field: 'psqk',
        component: 'JSearchSelect',
        componentProps: {
            dict: 'dk_psqk',
        },
    },
    // {
    //     label: '政策依据',
    //     field: 'faliyiju',
    //     component: 'JSearchSelect',
    //     componentProps: {
    //         dict: 'dk_zcyj',
    //     },
    // },

]

// 地块风险评估填报情况统计
export const DkfxpgtbColumns: BasicColumn[] = [
    {
        title: '市',
        dataIndex: 'name',
        resizable: true,
    },
    {
        title: '地块数',
        dataIndex: 'total',
        resizable: true,
    },


    {
        title: '主要风险',
        resizable: true,
        children: [
            {
                title: '公众健康风险',
                dataIndex: 'gzjkfx',
            },
            {
                title: '其他',
                dataIndex: 'qt',
            },
            {
                title: '未确定',
                dataIndex: 'wqd',
            },
        ],
    },
    {
        title: '地块评审情况',
        resizable: true,
        children: [
            {
                title: '风险可接受',
                dataIndex: 'fxkjs',
            },
            {
                title: '风险管控',
                dataIndex: 'fxgk',
            },
            {
                title: '修复',
                dataIndex: 'xf',
            },
            {
                title: '管控及修复',
                dataIndex: 'gkjxf',
            },
            {
                title: '未评审',
                dataIndex: 'wps',
            },
        ],
    },
]
export const DkfxpgtbsearchFormSchema: FormSchema[] = [
    {
        label: '等级',
        field: 'level',
        component: 'ApiSelect',
        show: () => {
            return userStore?.userInfo?.userIdentity == '1' ? true : false
        },
        slot: 'userLevle'
    },
    {
        label: '市',
        field: 'cityCode',
        component: 'ApiSelect',
        show: ({ values }) => {
            return values.level == '2' ? true : false
        },
        componentProps: () => {
            return {
                api: getTown,
                params: 440000, // 行政区划编码
                labelField: 'name',
                valueField: 'id',

            };
        },
    },
    // {
    //     label: '行业类别',
    //     field: 'hylb',
    //     component: 'TreeSelect',
    //     slot: 'category',
    // },
    // {
    //     label: '政策依据',
    //     field: 'faliyiju',
    //     component: 'JSearchSelect',
    //     componentProps: {
    //         dict: 'dk_zcyj',
    //     },
    // },

]

// 地块管控修复填报情况
export const DkgkxftbColumns: BasicColumn[] = [
    {
        title: '市',
        dataIndex: 'cityName',
        resizable: true,
    },
    {
        title: '县',
        dataIndex: 'countryName',
        resizable: true,
    },
    {
        title: '地块名称',
        dataIndex: 'wrdkmc',
        resizable: true,
    },
    {
        title: '地块编码',
        dataIndex: 'wrdkbm',
        resizable: true,
    },
    {
        title: '行业类别',
        dataIndex: 'hylb',
        resizable: true,
    },
    {
        title: '管控修复措施',
        dataIndex: 'gkxfcs',
        resizable: true,
    },
    {
        title: '方案数量',
        dataIndex: 'fasl',
        resizable: true,
    },
    {
        title: '方案标题',
        dataIndex: 'bt',
        resizable: true,
    },
    {
        title: '方案评审情况',
        dataIndex: 'psqk',
        resizable: true,
    },
    {
        title: '公示截图',
        dataIndex: 'gspic',
        resizable: true,
    },
    {
        title: '方案文件',
        dataIndex: 'falj',
        resizable: true,
    },
    {
        title: '边界文件',
        dataIndex: 'dkshp',
        resizable: true,
    },
    {
        title: '边界图片',
        dataIndex: 'dkpic',
        resizable: true,
    },

]
export const DkgkxfsearchFormSchema: FormSchema[] = [
    {
        label: '市',
        field: 'cityCode',
        component: 'ApiSelect',
        ifShow: () => {
            return userStore?.userInfo?.userIdentity == '1' ? true : false
        },
        componentProps: ({ formModel, formActionType }) => {
            return {
                api: getTown,
                params: 440000, // 行政区划编码
                labelField: 'name',
                valueField: 'id',
                onChange: (val: any) => {
                    const { updateSchema } = formActionType;
                    formModel.countryCode = undefined;
                    if (val) {
                        updateSchema({
                            field: 'countryCode',
                            componentProps: {
                                api: getTown,
                                params: val,
                                labelField: 'name',
                                valueField: 'id',
                            },
                        });
                    } else {
                        updateSchema({
                            field: 'countryCode',
                            componentProps: {
                                api: undefined,
                                labelField: 'name',
                                valueField: 'id',
                            },
                        });
                    }
                },
            };
        },
    },
    {
        label: '县',
        field: 'countryCode',
        component: 'ApiSelect',
        ifShow: () => {
            return (userStore?.userInfo?.userIdentity == '2' || userStore?.userInfo?.userIdentity == '1') ? true : false
        },
        componentProps: ({ formModel, formActionType }) => {
            if (userStore?.userInfo?.userIdentity == '2') {
                const { updateSchema } = formActionType;
                updateSchema({
                    label: '区县',
                    field: 'countryCode',
                    ifShow: true,
                    componentProps: {
                        api: getTown,
                        params: userStore?.userInfo?.codeRegion,
                        labelField: 'name',
                        valueField: 'id',
                    },
                });
            }
            return {
                labelField: 'name',
                valueField: 'id',
            }
        },
    },

    {
        label: '行业类别',
        field: 'hylb',
        component: 'TreeSelect',
        slot: 'category',
    },
    {
        label: '管控修复措施',
        field: 'gkxfcs',
        component: 'JSearchSelect',
        componentProps: {
            dict: 'dk_gkxfcs',
        },
    },
    // {
    //     label: '政策依据',
    //     field: 'faliyiju',
    //     component: 'JSearchSelect',
    //     componentProps: {
    //         dict: 'dk_zcyj',
    //     },
    // },


]

// 管控修复方案情况统计
export const DkxffaColumns: BasicColumn[] = [
    {
        title: '市',
        dataIndex: 'name',
        resizable: true,
    },
    {
        title: '地块数量',
        dataIndex: 'total',
        resizable: true,
    },
    {
        title: '方案数',
        dataIndex: 'fasl',
        resizable: true,
    },
    {
        title: '风险管控方案数',
        dataIndex: 'fxgkfas',
        resizable: true,
    },
    {
        title: '修复效果方案数',
        dataIndex: 'xffas',
        resizable: true,
    },
    {
        title: '管控及修复方案数',
        dataIndex: 'gkjxffas',
        resizable: true,
    },
    {
        title: '风险管控通过方案数',
        dataIndex: 'fxgktgfas',
        resizable: true,
    },
    {
        title: '修复通过方案数',
        dataIndex: 'xftgfas',
        resizable: true,
    },
    {
        title: '管控及修复通过方案数',
        dataIndex: 'gkjxftgfas',
        resizable: true,
    },

]
export const DkxffasearchFormSchema: FormSchema[] = [
    {
        label: '等级',
        field: 'level',
        component: 'ApiSelect',
        show: () => {
            return userStore?.userInfo?.userIdentity == '1' ? true : false
        },
        slot: 'userLevle'
    },
    {
        label: '市',
        field: 'cityCode',
        component: 'ApiSelect',
        show: ({ values }) => {
            return values.level == '2' ? true : false
        },
        componentProps: () => {
            return {
                api: getTown,
                params: 440000, // 行政区划编码
                labelField: 'name',
                valueField: 'id',

            };
        },
    },
    // {
    //     label: '行业类别',
    //     field: 'hylb',
    //     component: 'TreeSelect',
    //     slot: 'category',
    // },
    // {
    //     label: '政策依据',
    //     field: 'faliyiju',
    //     component: 'JSearchSelect',
    //     componentProps: {
    //         dict: 'dk_zcyj',
    //     },
    // },



]

// 地块效果评估填报情况
export const DkqkColumns: BasicColumn[] = [
    {
        title: '市',
        dataIndex: 'cityName',
        resizable: true,
    },
    {
        title: '县',
        dataIndex: 'countryName',
        resizable: true,
    },
    {
        title: '地块名称',
        dataIndex: 'wrdkmc',
        resizable: true,
    },
    {
        title: '地块编码',
        dataIndex: 'wrdkbm',
        resizable: true,
    },
    {
        title: '行业类别',
        dataIndex: 'hylb',
        resizable: true,
    },
    {
        title: '效果评估分类',
        dataIndex: 'gkxfcs',
        resizable: true,
    },
    {
        title: '地块评审状态',
        dataIndex: 'gkxfcs',
        resizable: true,
    },
    {
        title: '方案数量',
        dataIndex: 'fasl',
        resizable: true,
    },
    {
        title: '效果评估方案',
        dataIndex: 'bt',
        resizable: true,
    },

    {
        title: '公示截图',
        dataIndex: 'gspic',
        resizable: true,
    },
    {
        title: '效果评估报告',
        dataIndex: 'psqk',
        resizable: true,
    },

    {
        title: '边界文件',
        dataIndex: 'dkshp',
        resizable: true,
    },
    {
        title: '边界图片',
        dataIndex: 'dkpic',
        resizable: true,
    },
    {
        title: '检测报告',
        dataIndex: 'falj',
        resizable: true,
    },

]
export const DkqksearchFormSchema: FormSchema[] = [
    {
        label: '市',
        field: 'cityCode',
        component: 'ApiSelect',
        ifShow: () => {
            return userStore?.userInfo?.userIdentity == '1' ? true : false
        },
        componentProps: ({ formModel, formActionType }) => {
            return {
                api: getTown,
                params: 440000, // 行政区划编码
                labelField: 'name',
                valueField: 'id',
                onChange: (val: any) => {
                    const { updateSchema } = formActionType;
                    formModel.countryCode = undefined;
                    if (val) {
                        updateSchema({
                            field: 'countryCode',
                            componentProps: {
                                api: getTown,
                                params: val,
                                labelField: 'name',
                                valueField: 'id',
                            },
                        });
                    } else {
                        updateSchema({
                            field: 'countryCode',
                            componentProps: {
                                api: undefined,
                                labelField: 'name',
                                valueField: 'id',
                            },
                        });
                    }
                },
            };
        },
    },
    {
        label: '县',
        field: 'countryCode',
        component: 'ApiSelect',
        ifShow: () => {
            return (userStore?.userInfo?.userIdentity == '2' || userStore?.userInfo?.userIdentity == '1') ? true : false
        },
        componentProps: ({ formModel, formActionType }) => {
            if (userStore?.userInfo?.userIdentity == '2') {
                const { updateSchema } = formActionType;
                updateSchema({
                    label: '区县',
                    field: 'countryCode',
                    ifShow: true,
                    componentProps: {
                        api: getTown,
                        params: userStore?.userInfo?.codeRegion,
                        labelField: 'name',
                        valueField: 'id',
                    },
                });
            }
            return {
                labelField: 'name',
                valueField: 'id',
            }
        },
    },

    {
        label: '行业类别',
        field: 'hylb',
        component: 'TreeSelect',
        slot: 'category',
    },
    {
        label: '效果评估分类',
        field: 'gkxfcs',
        component: 'JSearchSelect',
        componentProps: {
            dict: 'dk_gkxfcs',
        },
    },
    // {
    //     label: '政策依据',
    //     field: 'faliyiju',
    //     component: 'JSearchSelect',
    //     componentProps: {
    //         dict: 'dk_zcyj',
    //     },
    // },


]

// 效果评估方案情况统计
export const XgpgColumns: BasicColumn[] = [
    {
        title: '市',
        dataIndex: 'name',
        resizable: true,
    },
    {
        title: '地块数',
        dataIndex: 'total',
        resizable: true,
    },
    {
        title: '效果评估方案数',
        dataIndex: 'fasl',
        resizable: true,
    },

    {
        title: '风险管控效果评估方案数',
        dataIndex: 'xffas',
        resizable: true,
    },
    {
        title: '修复效果评估方案数',
        dataIndex: 'gkjxffas',
        resizable: true,
    },
    {
        title: '管控及修复效果评估方案数',
        dataIndex: 'fxgktgfas',
        resizable: true,
    },
    {
        title: '风险管控效果评估通过方案数',
        dataIndex: 'xftgfas',
        resizable: true,
    },
    {
        title: '修复效果评估通过方案数',
        dataIndex: 'gkjxftgfas',
        resizable: true,
    },
    {
        title: '管控及修复效果评估通过方案数',
        dataIndex: 'gkjxftgfas',
        resizable: true,
    },

]
export const XgpgsearchFormSchema: FormSchema[] = [
    {
        label: '等级',
        field: 'level',
        component: 'ApiSelect',
        show: () => {
            return userStore?.userInfo?.userIdentity == '1' ? true : false
        },
        slot: 'userLevle'
    },
    {
        label: '市',
        field: 'cityCode',
        component: 'ApiSelect',
        show: ({ values }) => {
            return values.level == '2' ? true : false
        },
        componentProps: () => {
            return {
                api: getTown,
                params: 440000, // 行政区划编码
                labelField: 'name',
                valueField: 'id',

            };
        },
    },
    // {
    //     label: '行业类别',
    //     field: 'hylb',
    //     component: 'TreeSelect',
    //     slot: 'category',
    // },
    // {
    //     label: '政策依据',
    //     field: 'faliyiju',
    //     component: 'JSearchSelect',
    //     componentProps: {
    //         dict: 'dk_zcyj',
    //     },
    // },



]

// 地块后期监管信息
export const HqglColumns: BasicColumn[] = [
    {
        title: '市',
        dataIndex: 'cityName',
        resizable: true,
    },
    {
        title: '县',
        dataIndex: 'countryName',
        resizable: true,
    },
    {
        title: '地块名称',
        dataIndex: 'wrdkmc',
        resizable: true,
    },
    {
        title: '地块编码',
        dataIndex: 'wrdkbm',
        resizable: true,
    },
    {
        title: '土壤环境监测结论',
        dataIndex: 'trhjjcjl',
        resizable: true,
    },
    {
        title: '地下水环境监测结论',
        dataIndex: 'dxshjjcjl',
        resizable: true,
    },

    {
        title: '地表水环境监测结论',
        dataIndex: 'dbshjjcjl',
        resizable: true,
    },
    {
        title: '空气环境监测结论',
        dataIndex: 'kqhjjcjl',
        resizable: true,
    },
    {
        title: '监测单位',
        dataIndex: 'jcdw',
        resizable: true,
    },
    {
        title: '统一社会信用代码',
        dataIndex: 'gsyyzzh',
        resizable: true,
    },
    {
        title: '监测时间',
        dataIndex: 'jcsj',
        resizable: true,
    },

]
export const HqglsearchFormSchema: FormSchema[] = [
    {
        label: '市',
        field: 'cityCode',
        component: 'ApiSelect',
        ifShow: () => {
            return userStore?.userInfo?.userIdentity == '1' ? true : false
        },
        componentProps: ({ formModel, formActionType }) => {
            return {
                api: getTown,
                params: 440000, // 行政区划编码
                labelField: 'name',
                valueField: 'id',
                onChange: (val: any) => {
                    const { updateSchema } = formActionType;
                    formModel.countryCode = undefined;
                    if (val) {
                        updateSchema({
                            field: 'countryCode',
                            componentProps: {
                                api: getTown,
                                params: val,
                                labelField: 'name',
                                valueField: 'id',
                            },
                        });
                    } else {
                        updateSchema({
                            field: 'countryCode',
                            componentProps: {
                                api: undefined,
                                labelField: 'name',
                                valueField: 'id',
                            },
                        });
                    }
                },
            };
        },
    },
    {
        label: '县',
        field: 'countryCode',
        component: 'ApiSelect',
        ifShow: () => {
            return (userStore?.userInfo?.userIdentity == '2' || userStore?.userInfo?.userIdentity == '1') ? true : false
        },
        componentProps: ({ formModel, formActionType }) => {
            if (userStore?.userInfo?.userIdentity == '2') {
                const { updateSchema } = formActionType;
                updateSchema({
                    label: '区县',
                    field: 'countryCode',
                    ifShow: true,
                    componentProps: {
                        api: getTown,
                        params: userStore?.userInfo?.codeRegion,
                        labelField: 'name',
                        valueField: 'id',
                    },
                });
            }
            return {
                labelField: 'name',
                valueField: 'id',
            }
        },
    },

    // {
    //     label: '行业类别',
    //     field: 'hylb',
    //     component: 'TreeSelect',
    //     slot: 'category',
    // },
    {
        label: '监测时间',
        field: 'data',
        component: 'RangeDate',
        componentProps: {
            format: 'YYYY-MM-DD',
            //范围文本描述用集合
            placeholder: ['请选择开始日期', '请选择结束日期']
        },
    },
    {
        label: '地块名称',
        field: 'wrdkbm',
        component: 'Input',
        componentProps: {
            placeholder: '地块名称或地块编码'
        }
    },
    {
        label: '监测单位',
        field: 'jcdw',
        component: 'Input',
        componentProps: {

        },
    },
    {
        label: '统一社会信用代码',
        field: 'gkxfcs',
        component: 'Input',
        componentProps: {

        },
    },
    // {
    //     label: '政策依据',
    //     field: 'faliyiju',
    //     component: 'JSearchSelect',
    //     componentProps: {
    //         dict: 'dk_zcyj',
    //     },
    // },
]

// 地块后期监管记录统计
export const HqgljlColumns: BasicColumn[] = [
    {
        title: '市',
        dataIndex: 'name',
        resizable: true,
    },
    // {
    //     title: '县',
    //     dataIndex: 'countryName',
    //     resizable: true,
    // },
    {
        title: '监管地块数',
        dataIndex: 'total',
        resizable: true,
    },
    {
        title: '监管记录数',
        dataIndex: 'jltotal',
        resizable: true,
    },

    {
        title: '土壤环境监测（地块数）',
        resizable: true,
        children: [
            {
                title: '达标',
                dataIndex: 'trhjjcdb',
            },
            {
                title: '不达标',
                dataIndex: 'trhjjcbdb',
            },
            {
                title: '未监测',
                dataIndex: 'trhjjcwjc',
            },
        ],

    },
    {
        title: '地下水环境监测（地块数）',
        resizable: true,
        children: [
            {
                title: '达标',
                dataIndex: 'dxshjjcjldb',
            },
            {
                title: '不达标',
                dataIndex: 'dxshjjcjlbdb',
            },
            {
                title: '未监测',
                dataIndex: 'dxshjjcjlwjc',
            },
        ],
    },
    {
        title: '地表水环境监测（地块数）',

        resizable: true,
        children: [
            {
                title: '达标',
                dataIndex: 'dbshjjcjldb',
            },
            {
                title: '不达标',
                dataIndex: 'dbshjjcjlbdb',
            },
            {
                title: '未监测',
                dataIndex: 'dbshjjcjlwjc',
            },
        ],
    },
    {
        title: '空气环境监测（地块数）',
        resizable: true,
        children: [
            {
                title: '达标',
                dataIndex: 'kqhjjcjldb',
            },
            {
                title: '不达标',
                dataIndex: 'kqhjjcjlwdb',
            },
            {
                title: '未监测',
                dataIndex: 'kqhjjcjlwjc',
            },
        ],
    },


]
export const HqgljlsearchFormSchema: FormSchema[] = [
    {
        label: '等级',
        field: 'level',
        component: 'ApiSelect',
        show: () => {
            return userStore?.userInfo?.userIdentity == '1' ? true : false
        },
        slot: 'userLevle'
    },
    {
        label: '市',
        field: 'cityCode',
        component: 'ApiSelect',
        show: ({ values }) => {
            return values.level == '2' ? true : false
        },
        componentProps: () => {
            return {
                api: getTown,
                params: 440000, // 行政区划编码
                labelField: 'name',
                valueField: 'id',

            };
        },
    },
    {
        label: '监测时间',
        field: 'data',
        component: 'RangeDate',
        componentProps: {
            format: 'YYYY-MM-DD',
            //范围文本描述用集合
            placeholder: ['请选择开始日期', '请选择结束日期']
        },
    },
    // {
    //     label: '政策依据',
    //     field: 'faliyiju',
    //     component: 'JSearchSelect',
    //     componentProps: {
    //         dict: 'dk_zcyj',
    //     },
    // },

]

// 地块监督记录信息
export const DkjdColumns: BasicColumn[] = [
    {
        title: '市',
        dataIndex: 'cityName',
        resizable: true,
    },
    {
        title: '县',
        dataIndex: 'countryName',
        resizable: true,
    },
    {
        title: '地块名称',
        dataIndex: 'wrdkmc',
        resizable: true,
    },
    {
        title: '地块编码',
        dataIndex: 'wrdkbm',
        resizable: true,
    },
    {
        title: '监督管理标题',
        dataIndex: 'jdglbt',
        resizable: true,
    },
    {
        title: '监督管理单位',
        dataIndex: 'jdgldw',
        resizable: true,
    },

    {
        title: '督查情况',
        dataIndex: 'dcqk',
        resizable: true,
    },
    {
        title: '监督管理时间',
        dataIndex: 'jdglsj',
        resizable: true,
    },

]
export const DkjdsearchFormSchema: FormSchema[] = [
    {
        label: '市',
        field: 'cityCode',
        component: 'ApiSelect',
        ifShow: () => {
            return userStore?.userInfo?.userIdentity == '1' ? true : false
        },
        componentProps: ({ formModel, formActionType }) => {
            return {
                api: getTown,
                params: 440000, // 行政区划编码
                labelField: 'name',
                valueField: 'id',
                onChange: (val: any) => {
                    const { updateSchema } = formActionType;
                    formModel.countryCode = undefined;
                    if (val) {
                        updateSchema({
                            field: 'countryCode',
                            componentProps: {
                                api: getTown,
                                params: val,
                                labelField: 'name',
                                valueField: 'id',
                            },
                        });
                    } else {
                        updateSchema({
                            field: 'countryCode',
                            componentProps: {
                                api: undefined,
                                labelField: 'name',
                                valueField: 'id',
                            },
                        });
                    }
                },
            };
        },
    },
    {
        label: '县',
        field: 'countryCode',
        component: 'ApiSelect',
        ifShow: () => {
            return (userStore?.userInfo?.userIdentity == '2' || userStore?.userInfo?.userIdentity == '1') ? true : false
        },
        componentProps: ({ formModel, formActionType }) => {
            if (userStore?.userInfo?.userIdentity == '2') {
                const { updateSchema } = formActionType;
                updateSchema({
                    label: '区县',
                    field: 'countryCode',
                    ifShow: true,
                    componentProps: {
                        api: getTown,
                        params: userStore?.userInfo?.codeRegion,
                        labelField: 'name',
                        valueField: 'id',
                    },
                });
            }
            return {
                labelField: 'name',
                valueField: 'id',
            }
        },
    },

    // {
    //     label: '行业类别',
    //     field: 'hylb',
    //     component: 'TreeSelect',
    //     slot: 'category',
    // },
    {
        label: '监测时间',
        field: 'data',
        component: 'RangeDate',
        componentProps: {
            format: 'YYYY-MM-DD',
            //范围文本描述用集合
            placeholder: ['请选择开始日期', '请选择结束日期']
        },
    },
    {
        label: '地块名称',
        field: 'wrdkbm',
        component: 'Input',
        componentProps: {
            placeholder: '地块名称或地块编码'
        }
    },
    {
        label: '监测单位',
        field: 'jcdw',
        component: 'Input',
        componentProps: {

        },
    },
    // {
    //     label: '政策依据',
    //     field: 'faliyiju',
    //     component: 'JSearchSelect',
    //     componentProps: {
    //         dict: 'dk_zcyj',
    //     },
    // },
]

//地块监督记录统计
export const DkjdtjColumns: BasicColumn[] = [
    {
        title: '市',
        dataIndex: 'cityName',
        resizable: true,
    },

    {
        title: '监督地块数',
        dataIndex: 'jddks',
        resizable: true,
    },
    {
        title: '监督记录数',
        dataIndex: 'jdjls',
        resizable: true,
    },
    {
        title: '监督管理单位',
        dataIndex: 'jdgldw',
        resizable: true,
    },
    {
        title: '监督管理单位监督记录数',
        dataIndex: 'jddws',
        resizable: true,
    },
]
export const DkjdtjsearchFormSchema: FormSchema[] = [
    {
        label: '等级',
        field: 'level',
        component: 'ApiSelect',
        show: () => {
            return userStore?.userInfo?.userIdentity == '1' ? true : false
        },
        slot: 'userLevle'
    },
    {
        label: '市',
        field: 'cityCode',
        component: 'ApiSelect',
        show: ({ values }) => {
            return values.level == '2' ? true : false
        },
        componentProps: () => {
            return {
                api: getTown,
                params: 440000, // 行政区划编码
                labelField: 'name',
                valueField: 'id',

            };
        },
    },

    // {
    //     label: '行业类别',
    //     field: 'hylb',
    //     component: 'TreeSelect',
    //     slot: 'category',
    // },
    {
        label: '监测时间',
        field: 'data',
        component: 'RangeDate',
        componentProps: {
            format: 'YYYY-MM-DD',
            //范围文本描述用集合
            placeholder: ['请选择开始日期', '请选择结束日期']
        },
    },


    // {
    //     label: '政策依据',
    //     field: 'faliyiju',
    //     component: 'JSearchSelect',
    //     componentProps: {
    //         dict: 'dk_zcyj',
    //     },
    // },
]

//政策信息完成情况
export const ZcwcColumns: BasicColumn[] = [
    {
        title: '市',
        dataIndex: 'name',
        resizable: true,
    },
    {
        title: '地块总数',
        dataIndex: 'total',
        resizable: true,
    },
    {
        title: '已完成地块数',
        dataIndex: 'wcdk',
        resizable: true,
    },
    {
        title: '尚未完成地块数',
        dataIndex: 'wwcdk',
        resizable: true,
    },
    {
        title: '属于42号令的地块数',
        dataIndex: 'is42',
        resizable: true,
    },
]
export const ZcwcsearchFormSchema: FormSchema[] = [
    {
        label: '等级',
        field: 'level',
        component: 'ApiSelect',
        show: () => {
            return userStore?.userInfo?.userIdentity == '1' ? true : false
        },
        slot: 'userLevle'
    },
    {
        label: '市',
        field: 'cityCode',
        component: 'ApiSelect',
        show: ({ values }) => {
            return values.level == '2' ? true : false
        },
        componentProps: () => {
            return {
                api: getTown,
                params: 440000, // 行政区划编码
                labelField: 'name',
                valueField: 'id',

            };
        },
    },
]

//矢量数据更新情况
export const SlColumns: BasicColumn[] = [
    {
        title: '市',
        dataIndex: 'name',
        resizable: true,
    },

    {
        title: '地块总数',
        dataIndex: 'total',
        resizable: true,
    },
    {
        title: '矢量文件上传的地块数',
        dataIndex: 'slwjscdk',
        resizable: true,
    },
    {
        title: '属于土壤法矢量文件上传的地块数',
        resizable: true,
        children: [
            {
                title: '矢量文件总数',
                dataIndex: 'trfdk',
            },
            {
                title: '超标',
                dataIndex: 'ywccbdk',
            },
            {
                title: '未超标',
                dataIndex: 'ywwcbdk',
            },
            {
                title: '未确定',
                dataIndex: 'ywwqddk',
            },
        ]
    },
    {
        title: '属于42号令矢量文件上传的地块数',
        resizable: true,
        children: [
            {
                title: '矢量文件总数',
                dataIndex: 'sy42hldk',
            },
            {
                title: '超标',
                dataIndex: 'sy42hlywccbdk',
            },
            {
                title: '未超标',
                dataIndex: 'sy42hlywwcbdk',
            },
            {
                title: '未确定',
                dataIndex: 'sy42hlywwqddk',
            },
        ]
    },
]
export const SlsearchFormSchema: FormSchema[] = [
    {
        label: '等级',
        field: 'level',
        component: 'ApiSelect',
        show: () => {
            return userStore?.userInfo?.userIdentity == '1' ? true : false
        },
        slot: 'userLevle'
    },
    {
        label: '市',
        field: 'cityCode',
        component: 'ApiSelect',
        show: ({ values }) => {
            return values.level == '2' ? true : false
        },
        componentProps: () => {
            return {
                api: getTown,
                params: 440000, // 行政区划编码
                labelField: 'name',
                valueField: 'id',

            };
        },
    },
    // {
    //     label: '日期选择',
    //     field: 'startTime',
    //     component: 'DatePicker',
    //     componentProps: {
    //         format: 'YYYY-MM-DD',
    //         //返回值格式化（绑定值的格式）
    //         valueFormat: 'YYYY-MM-DD',
    //     }
    // }
]

// 现场核查情况
export const HcColumns: BasicColumn[] = [
    {
        title: '市',
        dataIndex: 'cityName',
        resizable: true,
    },

    {
        title: '地块总数',
        dataIndex: 'dkzs',
        resizable: true,
    },
    {
        title: '完成现场核查的地块数',
        dataIndex: 'wchcdks',
        resizable: true,
    },
    {
        title: '属于42号令的地块数',
        dataIndex: 'sy42dks',
        resizable: true,
    },
    {
        title: '属于42号令的地块数现场核查数',
        dataIndex: 'sy42wchcdks',
        resizable: true,
    },
]
export const HcsearchFormSchema: FormSchema[] = [
    {
        label: '等级',
        field: 'level',
        component: 'ApiSelect',
        show: () => {
            return userStore?.userInfo?.userIdentity == '1' ? true : false
        },
        slot: 'userLevle'
    },
    {
        label: '市',
        field: 'cityCode',
        component: 'ApiSelect',
        show: ({ values }) => {
            return values.level == '2' ? true : false
        },
        componentProps: () => {
            return {
                api: getTown,
                params: 440000, // 行政区划编码
                labelField: 'name',
                valueField: 'id',

            };
        },
    },

]
//地块调查矢量文件上传情况
export const SlwjColumns: BasicColumn[] = [
    {
        title: '市',
        dataIndex: 'cityName',
        resizable: true,
    },

    {
        title: '地块名称',
        dataIndex: 'wrdkmc',
        resizable: true,
    },
    {
        title: '地块编码',
        dataIndex: 'wrdkbm',
        resizable: true,
    },
    {
        title: '是否超标',
        dataIndex: 'pollueted',
        resizable: true,
    },
    {
        title: '政策依据',
        dataIndex: 'faliYiju',
        resizable: true,
    },
    {
        title: '初调矢量文件上传日期',
        dataIndex: 'cdsj',
        resizable: true,
    },
    {
        title: '详调矢量文件上传日期',
        dataIndex: 'xdsj',
        resizable: true,
    },
]
export const SlwjsearchFormSchema: FormSchema[] = [
    {
        label: '等级',
        field: 'level',
        component: 'ApiSelect',
        show: () => {
            return userStore?.userInfo?.userIdentity == '1' ? true : false
        },
        slot: 'userLevle'
    },
    {
        label: '市',
        field: 'cityCode',
        component: 'ApiSelect',
        show: ({ values }) => {
            return values.level == '2' ? true : false
        },
        componentProps: () => {
            return {
                api: getTown,
                params: 440000, // 行政区划编码
                labelField: 'name',
                valueField: 'id',

            };
        },
    },
    {
        label: '是否超标',
        field: 'sfcb',
        component: 'ApiSelect',
        componentProps: {
            api: dict,
            params: { key: 'qd_sfcb' },
            labelField: 'text',
            valueField: 'value',
        }
    },
    {
        label: '政策依据',
        field: 'faliyiju',
        component: 'JSearchSelect',
        componentProps: {
            dict: 'dk_zcyj',
        },
    },
    // {
    //     label: '上传日期',
    //     field: 'startTime',
    //     component: 'DatePicker',
    //     componentProps: {
    //         format: 'YYYY-MM-DD',
    //         //返回值格式化（绑定值的格式）
    //         valueFormat: 'YYYY-MM-DD',
    //     }
    // }

]