提交 3461903c authored 作者: gjx's avatar gjx

添加同步国家库页面以及接口

上级 45b6b1d5
<template> <template>
<div class="dk-list"> <BasicTable @register="registerTable">
<Form @submits="submit" :FormData="FormData" /> <template #form-category="{ model, field }">
<div class="flex justify-end py-3 mr-5 my-5"> <a-tree-select
<a-space wrap> v-model:value="model[field]"
<a-button type="primary"> show-search
placeholder="请选择"
同步国家库 allow-clear
</a-button> tree-default-expand-all
<a-button type="primary"> :field-names="{ label: 'name', value: 'id', children: 'children' }"
:tree-data="treeData"
名录导出 tree-node-filter-prop="label"
</a-button> >
</a-space> <template #suffixIcon>
</div> <SmileOutlined />
<a-table :columns="columns" class="w-[98%] mx-auto" :row-selection="rowSelection" :data-source="list" </template>
:pagination="pagination" show-less-items @change="handleTableChange"> </a-tree-select>
<template #bodyCell="{ index, column }"> </template>
<template v-if="column.key === 'index'"> <template #tableTitle>
<span> <a-button type="primary" preIcon="ant-design:export-outlined" v-auth="'tbgj-dc'" @click="onExportXls"> 导出</a-button>
{{ index + 1 }} </template>
</span> </BasicTable>
</template>
<template v-if="column.key === 'action'">
<div>
<a-button type="primary" ghost class="mr-1" size="small">查看</a-button>
<a-button type="primary" ghost class="mr-1" size="small">暂不上报</a-button>
</div>
</template>
</template>
</a-table>
</div>
</template> </template>
<script setup lang="ts"> <script setup lang="ts">
import { ref, reactive } from 'vue'; import { BasicTable } from '@/components/Table';
import Form from '/@/components/FormModel.vue' import { useListPage } from '/@/hooks/system/useListPage';
import { list as getList } from '/@/api/qdml' import { Columns, searchFormSchema, useCategoryData } from './data';
import { getTown, dict } from '/@/api/common/api' import { sbcjml, sbcjmlExcel } from './api';
const pageNo = ref<any>(1) const { tableContext, onExportXls } = useListPage({
const pageSize = ref<any>(10) tableProps: {
const pagination = ref<any>({ title: '',
total: 0, api: sbcjml,
pageNo: pageNo.value, columns: Columns,
pagination: pageSize.value canResize: false,
}); rowSelection: { type: 'radio' },
// 获取城镇的 rowKey: 'wrdkid',
async function tomnData(v: any) { clickToRowSelect: true,
const res = await getTown(v) showActionColumn: false,
if (v === '440000') { beforeFetch(params: any) {
FormData.value[0].data = res if (params.data) {
} else { const arry = params.data.split(',');
FormData.value[1].value = null params.startTime = arry[0];
FormData.value[1].data = res params.endTime = arry[1];
} }
},
} formConfig: {
tomnData('440000') labelWidth: 120,
// 获取行业类编 schemas: searchFormSchema,
async function getClass(v: any) { autoSubmitOnEnter: true,
const res = await dict(v) showAdvancedButton: false,
// 转字段名称,下拉框 用的 name 跟 id字段 },
FormData.value[3].data = res actionColumn: {
} width: 120,
getClass('org_category') fixed: 'right',
},
const FormData = ref<any>(
[
{
name: 'cityName',
label: '行政区',
type: 'select',
fieldNames: {
label: 'name',
value: 'id'
},
value: null,
select: (v) => {
FormData.value[0].value = v
tomnData(v)
},
data: []
},
{
name: 'countryName',
label: '区县',
type: 'select',
fieldNames: {
label: 'name',
value: 'id'
},
value: null,
data: [],
select: (v) => {
FormData.value[1].value = v
},
},
{
name: 'wrdkbm',
label: '地块类型',
type: 'select',
value: null,
data: [],
},
{
name: 'hyfl',
label: '行业分类',
type: 'select',
value: '',
data: []
},
{
label: '是否超标',
name: 'pollueted',
type: 'select',
value: null,
data: [
{
name: '是',
id: '是'
},
{
name: '否',
id: '否'
}
]
},
{
label: '同步国家库',
name: 'pollueted',
type: 'checkbox',
value: null,
data: [
{
label: '已同步',
value: '1'
},
{
label: '未同步',
value: '2'
}
]
},
{
label: '上报开始时间',
name: 'startTime',
type: 'data',
value: null,
},
{
label: '上报结束时间',
name: 'endTime',
type: 'data',
value: null,
},
]
)
const rowSelection = reactive<any>({
type: 'checkbox',
showCheckedAll: true,
onlyCurrent: false,
});
const columns = ref<any>([
// {
// title: '地块名称',
// dataIndex: 'wrdkmc',
// },
// {
// title: '地块编码',
// dataIndex: 'wrdkbm',
// },
{
title: '市',
dataIndex: 'cityName',
},
{
title: '县',
dataIndex: 'countryName',
},
{
title: '行业类别',
dataIndex: 'hylb',
},
{
title: '政策依据',
dataIndex: 'faliYiju',
ellipsis: true,
},
{
title: '政策依据条款',
dataIndex: 'faliErji',
ellipsis: true,
},
{
title: '地块类型',
dataIndex: 'dklx',
},
{
title: '创建地块时间',
dataIndex: 'createTsamp'
},
{
title: '是否超标',
dataIndex: 'pollueted'
},
{
title: '所处阶段',
dataIndex: 'scjdbm'
},
// {
// title: '阶段内状态',
// dataIndex: 'jdnzt'
// },
// {
// title: '是否依据土壤法纳入建设用地土壤污染风险管控与修复名录',
// dataIndex: 'sfyjtrfnrjsydtrwrfxgkyxfml'
// },
{
title: '实施管控或修复',
dataIndex: 'ssgkhxf'
},
{
title: '登录账号',
dataIndex: 'userId'
}, },
{ exportConfig: {
title: '操作', name: '上报创建名录',
key: 'action', url: sbcjmlExcel,
}, },
]) });
const list = ref<any>([]) const [registerTable, {}, {}] = tableContext;
const form = ref<any>({}) const useCategory = useCategoryData();
function submit(val: any) { const treeData = useCategory.data; // 行业类别-数据
form.value = val
// 其中行业类编里面。如果值的长度是1 传'hyml'字段 则代表一类 如果值的长度是2 hydl
// 长度是3 hyzl 长度是4 hyxl
console.log(form.value, 'val')
init()
}
async function init() {
let params: any = {}
params = form.value
if (params?.category) {
if (params?.category.length == 1) {
params.hyml = params.category
} else if (params?.category.length == 2) {
params.hydl = params.category
} else if (params?.category.length == 3) {
params.hyzl = params.category
} else if (params?.category.length == 4) {
params.hyxl = params.category
}
delete params.category
console.log(params, 3)
}
const res = await getList({ ...params, pageNo: pageNo.value, pageSize: pageSize.value })
list.value = res.records
pagination.value.total = res.total
pagination.value.pageSize = res.size
}
init()
function handleTableChange(val: any) {
pageNo.value = val.current
pageSize.value = val.pageSize
init()
}
</script> </script>
<style lang="less" scoped>
.dk-list {
background-color: @white;
}
</style>
\ No newline at end of file
<template>
<BasicTable @register="registerTable">
<template #form-category="{ model, field }">
<a-tree-select
v-model:value="model[field]"
show-search
placeholder="请选择"
allow-clear
tree-default-expand-all
:field-names="{ label: 'name', value: 'id', children: 'children' }"
:tree-data="treeData"
tree-node-filter-prop="label"
>
<template #suffixIcon>
<SmileOutlined />
</template>
</a-tree-select>
</template>
<template #tableTitle>
<a-button type="primary" preIcon="ant-design:export-outlined" v-auth="'tbgj-dc'" @click="onExportXls"> 导出</a-button>
</template>
</BasicTable>
</template>
<script setup lang="ts">
import { BasicTable } from '@/components/Table';
import { useListPage } from '/@/hooks/system/useListPage';
import { Columns, searchFormSchema, useCategoryData } from './data';
import { sbfxpgml, sbfxpgmlExcel } from './api';
const { tableContext, onExportXls } = useListPage({
tableProps: {
title: '',
api: sbfxpgml,
columns: Columns,
canResize: false,
rowSelection: { type: 'radio' },
rowKey: 'wrdkid',
clickToRowSelect: true,
showActionColumn: false,
beforeFetch(params: any) {
if (params.data) {
const arry = params.data.split(',');
params.startTime = arry[0];
params.endTime = arry[1];
}
},
formConfig: {
labelWidth: 120,
schemas: searchFormSchema,
autoSubmitOnEnter: true,
showAdvancedButton: false,
},
actionColumn: {
width: 120,
fixed: 'right',
},
},
exportConfig: {
name: '上报风险评名录',
url: sbfxpgmlExcel,
},
});
const [registerTable, {}, {}] = tableContext;
const useCategory = useCategoryData();
const treeData = useCategory.data; // 行业类别-数据
</script>
<template>
<BasicTable @register="registerTable">
<template #form-category="{ model, field }">
<a-tree-select
v-model:value="model[field]"
show-search
placeholder="请选择"
allow-clear
tree-default-expand-all
:field-names="{ label: 'name', value: 'id', children: 'children' }"
:tree-data="treeData"
tree-node-filter-prop="label"
>
<template #suffixIcon>
<SmileOutlined />
</template>
</a-tree-select>
</template>
<template #tableTitle>
<a-button type="primary" preIcon="ant-design:export-outlined" v-auth="'tbgj-dc'" @click="onExportXls"> 导出</a-button>
</template>
</BasicTable>
</template>
<script setup lang="ts">
import { BasicTable } from '@/components/Table';
import { useListPage } from '/@/hooks/system/useListPage';
import { Columns, searchFormSchema, useCategoryData } from './data';
import { sbbadkml, sbbadkmlExcel } from './api';
const { tableContext, onExportXls } = useListPage({
tableProps: {
title: '',
api: sbbadkml,
columns: Columns,
canResize: false,
rowSelection: { type: 'radio' },
rowKey: 'wrdkid',
clickToRowSelect: true,
showActionColumn: false,
beforeFetch(params: any) {
if (params.data) {
const arry = params.data.split(',');
params.startTime = arry[0];
params.endTime = arry[1];
}
},
formConfig: {
labelWidth: 120,
schemas: searchFormSchema,
autoSubmitOnEnter: true,
showAdvancedButton: false,
},
actionColumn: {
width: 120,
fixed: 'right',
},
},
exportConfig: {
name: '上报备案地块名录',
url: sbbadkmlExcel,
},
});
const [registerTable, {}, {}] = tableContext;
const useCategory = useCategoryData();
const treeData = useCategory.data; // 行业类别-数据
</script>
<template>
<BasicTable @register="registerTable">
<template #form-category="{ model, field }">
<a-tree-select
v-model:value="model[field]"
show-search
placeholder="请选择"
allow-clear
tree-default-expand-all
:field-names="{ label: 'name', value: 'id', children: 'children' }"
:tree-data="treeData"
tree-node-filter-prop="label"
>
<template #suffixIcon>
<SmileOutlined />
</template>
</a-tree-select>
</template>
<template #tableTitle>
<a-button type="primary" preIcon="ant-design:export-outlined" v-auth="'tbgj-dc'" @click="onExportXls"> 导出</a-button>
</template>
</BasicTable>
</template>
<script setup lang="ts">
import { BasicTable } from '@/components/Table';
import { useListPage } from '/@/hooks/system/useListPage';
import { Columns, searchFormSchema, useCategoryData } from './data';
import { sbygzdkml, sbygzdkmlExcel } from './api';
const { tableContext, onExportXls } = useListPage({
tableProps: {
title: '',
api: sbygzdkml,
columns: Columns,
canResize: false,
rowSelection: { type: 'radio' },
rowKey: 'wrdkid',
clickToRowSelect: true,
showActionColumn: false,
beforeFetch(params: any) {
if (params.data) {
const arry = params.data.split(',');
params.startTime = arry[0];
params.endTime = arry[1];
}
},
formConfig: {
labelWidth: 120,
schemas: searchFormSchema,
autoSubmitOnEnter: true,
showAdvancedButton: false,
},
actionColumn: {
width: 120,
fixed: 'right',
},
},
exportConfig: {
name: '上报预关注地块名录',
url: sbygzdkmlExcel,
},
});
const [registerTable, {}, {}] = tableContext;
const useCategory = useCategoryData();
const treeData = useCategory.data; // 行业类别-数据
</script>
<template>
<BasicTable @register="registerTable">
<template #form-category="{ model, field }">
<a-tree-select
v-model:value="model[field]"
show-search
placeholder="请选择"
allow-clear
tree-default-expand-all
:field-names="{ label: 'name', value: 'id', children: 'children' }"
:tree-data="treeData"
tree-node-filter-prop="label"
>
<template #suffixIcon>
<SmileOutlined />
</template>
</a-tree-select>
</template>
<template #tableTitle>
<a-button type="primary" preIcon="ant-design:export-outlined" v-auth="'tbgj-dc'" @click="onExportXls"> 导出</a-button>
</template>
</BasicTable>
</template>
<script setup lang="ts">
import { BasicTable } from '@/components/Table';
import { useListPage } from '/@/hooks/system/useListPage';
import { Columns, searchFormSchema, useCategoryData } from './data';
import { sbdcml, sbdcmlExcel } from './api';
const { tableContext, onExportXls } = useListPage({
tableProps: {
title: '',
api: sbdcml,
columns: Columns,
canResize: false,
rowSelection: { type: 'radio' },
rowKey: 'wrdkid',
clickToRowSelect: true,
showActionColumn: false,
beforeFetch(params: any) {
if (params.data) {
const arry = params.data.split(',');
params.startTime = arry[0];
params.endTime = arry[1];
}
},
formConfig: {
labelWidth: 120,
schemas: searchFormSchema,
autoSubmitOnEnter: true,
showAdvancedButton: false,
},
actionColumn: {
width: 120,
fixed: 'right',
},
},
exportConfig: {
name: '上报调查名录',
url: sbdcmlExcel,
},
});
const [registerTable, {}, {}] = tableContext;
const useCategory = useCategoryData();
const treeData = useCategory.data; // 行业类别-数据
</script>
<template>
<BasicTable @register="registerTable">
<template #form-category="{ model, field }">
<a-tree-select
v-model:value="model[field]"
show-search
placeholder="请选择"
allow-clear
tree-default-expand-all
:field-names="{ label: 'name', value: 'id', children: 'children' }"
:tree-data="treeData"
tree-node-filter-prop="label"
>
<template #suffixIcon>
<SmileOutlined />
</template>
</a-tree-select>
</template>
<template #tableTitle>
<a-button type="primary" preIcon="ant-design:export-outlined" v-auth="'tbgj-dc'" @click="onExportXls"> 导出</a-button>
</template>
</BasicTable>
</template>
<script setup lang="ts">
import { BasicTable } from '@/components/Table';
import { useListPage } from '/@/hooks/system/useListPage';
import { Columns, searchFormSchema, useCategoryData } from './data';
import { sbhqgl, sbhqglExcel } from './api';
const { tableContext, onExportXls } = useListPage({
tableProps: {
title: '',
api: sbhqgl,
columns: Columns,
canResize: false,
rowSelection: { type: 'radio' },
rowKey: 'wrdkid',
clickToRowSelect: true,
showActionColumn: false,
beforeFetch(params: any) {
if (params.data) {
const arry = params.data.split(',');
params.startTime = arry[0];
params.endTime = arry[1];
}
},
formConfig: {
labelWidth: 120,
schemas: searchFormSchema,
autoSubmitOnEnter: true,
showAdvancedButton: false,
},
actionColumn: {
width: 120,
fixed: 'right',
},
},
exportConfig: {
name: '上报后期管理',
url: sbhqglExcel,
},
});
const [registerTable, {}, {}] = tableContext;
const useCategory = useCategoryData();
const treeData = useCategory.data; // 行业类别-数据
</script>
<template>
<BasicTable @register="registerTable">
<template #form-category="{ model, field }">
<a-tree-select
v-model:value="model[field]"
show-search
placeholder="请选择"
allow-clear
tree-default-expand-all
:field-names="{ label: 'name', value: 'id', children: 'children' }"
:tree-data="treeData"
tree-node-filter-prop="label"
>
<template #suffixIcon>
<SmileOutlined />
</template>
</a-tree-select>
</template>
<template #tableTitle>
<a-button type="primary" preIcon="ant-design:export-outlined" v-auth="'tbgj-dc'" @click="onExportXls"> 导出</a-button>
</template>
</BasicTable>
</template>
<script setup lang="ts">
import { BasicTable } from '@/components/Table';
import { useListPage } from '/@/hooks/system/useListPage';
import { Columns, searchFormSchema, useCategoryData } from './data';
import { sbfxgkyxfycml, sbfxgkyxfycmlExcel } from './api';
const { tableContext, onExportXls } = useListPage({
tableProps: {
title: '',
api: sbfxgkyxfycml,
columns: Columns,
canResize: false,
rowSelection: { type: 'radio' },
rowKey: 'wrdkid',
clickToRowSelect: true,
showActionColumn: false,
beforeFetch(params: any) {
if (params.data) {
const arry = params.data.split(',');
params.startTime = arry[0];
params.endTime = arry[1];
}
},
formConfig: {
labelWidth: 120,
schemas: searchFormSchema,
autoSubmitOnEnter: true,
showAdvancedButton: false,
},
actionColumn: {
width: 120,
fixed: 'right',
},
},
exportConfig: {
name: '上报风险管控与修复移出名录',
url: sbfxgkyxfycmlExcel,
},
});
const [registerTable, {}, {}] = tableContext;
const useCategory = useCategoryData();
const treeData = useCategory.data; // 行业类别-数据
</script>
<template>
<BasicTable @register="registerTable">
<template #form-category="{ model, field }">
<a-tree-select
v-model:value="model[field]"
show-search
placeholder="请选择"
allow-clear
tree-default-expand-all
:field-names="{ label: 'name', value: 'id', children: 'children' }"
:tree-data="treeData"
tree-node-filter-prop="label"
>
<template #suffixIcon>
<SmileOutlined />
</template>
</a-tree-select>
</template>
<template #tableTitle>
<a-button type="primary" preIcon="ant-design:export-outlined" v-auth="'tbgj-dc'" @click="onExportXls"> 导出</a-button>
</template>
</BasicTable>
</template>
<script setup lang="ts">
import { BasicTable } from '@/components/Table';
import { useListPage } from '/@/hooks/system/useListPage';
import { Columns, searchFormSchema, useCategoryData } from './data';
import { sbfxgkyxfml, sbfxgkyxfmlExcel } from './api';
const { tableContext, onExportXls } = useListPage({
tableProps: {
title: '',
api: sbfxgkyxfml,
columns: Columns,
canResize: false,
rowSelection: { type: 'radio' },
rowKey: 'wrdkid',
clickToRowSelect: true,
showActionColumn: false,
beforeFetch(params: any) {
if (params.data) {
const arry = params.data.split(',');
params.startTime = arry[0];
params.endTime = arry[1];
}
},
formConfig: {
labelWidth: 120,
schemas: searchFormSchema,
autoSubmitOnEnter: true,
showAdvancedButton: false,
},
actionColumn: {
width: 120,
fixed: 'right',
},
},
exportConfig: {
name: '上报风险管控与修复名录',
url: sbfxgkyxfmlExcel,
},
});
const [registerTable, {}, {}] = tableContext;
const useCategory = useCategoryData();
const treeData = useCategory.data; // 行业类别-数据
</script>
<template>
<BasicTable @register="registerTable">
<template #form-category="{ model, field }">
<a-tree-select
v-model:value="model[field]"
show-search
placeholder="请选择"
allow-clear
tree-default-expand-all
:field-names="{ label: 'name', value: 'id', children: 'children' }"
:tree-data="treeData"
tree-node-filter-prop="label"
>
<template #suffixIcon>
<SmileOutlined />
</template>
</a-tree-select>
</template>
<template #tableTitle>
<a-button type="primary" preIcon="ant-design:export-outlined" v-auth="'tbgj-dc'" @click="onExportXls"> 导出</a-button>
</template>
</BasicTable>
</template>
<script setup lang="ts">
import { BasicTable } from '@/components/Table';
import { useListPage } from '/@/hooks/system/useListPage';
import { Columns, searchFormSchema, useCategoryData } from './data';
import { sbxcjd, sbxcjdExcel } from './api';
const { tableContext, onExportXls } = useListPage({
tableProps: {
title: '',
api: sbxcjd,
columns: Columns,
canResize: false,
rowSelection: { type: 'radio' },
rowKey: 'wrdkid',
clickToRowSelect: true,
showActionColumn: false,
beforeFetch(params: any) {
if (params.data) {
const arry = params.data.split(',');
params.startTime = arry[0];
params.endTime = arry[1];
}
let res = [...Columns];
res.splice(7, 0, {
title: '监督管理标题',
dataIndex: 'jdglbt',
resizable: true,
});
res.splice(8, 0, {
title: '最新监督管理时间',
dataIndex: 'jdglsj',
resizable: true,
});
res.splice(9, 0, {
title: '监督管理状态',
dataIndex: 'jdglzt',
resizable: true,
});
setColumns(res);
},
formConfig: {
labelWidth: 120,
schemas: searchFormSchema,
autoSubmitOnEnter: true,
showAdvancedButton: false,
},
actionColumn: {
width: 120,
fixed: 'right',
},
},
exportConfig: {
name: '上报现场监督',
url: sbxcjdExcel,
},
});
const [registerTable, { setColumns }, {}] = tableContext;
const useCategory = useCategoryData();
const treeData = useCategory.data; // 行业类别-数据
</script>
import { defHttp } from '/@/utils/http/axios';
//上报创建名录
export const sbcjml = (params) => {
return defHttp.get({ url: `/tbgjk/sbcjml`, params });
}
// 导出
export const sbcjmlExcel = '/tbgjk/sbcjmlExcel'
//上报调查名录
export const sbdcml = (params) => {
return defHttp.get({ url: `/tbgjk/sbdcml`, params });
}
// 导出
export const sbdcmlExcel = '/tbgjk/sbdcmlExcel'
//上报风险评名录
export const sbfxpgml = (params) => {
return defHttp.get({ url: `/tbgjk/sbfxpgml`, params });
}
// 导出
export const sbfxpgmlExcel = '/tbgjk/sbfxpgmlExcel'
//上报风险管控与修复名录
export const sbfxgkyxfml = (params) => {
return defHttp.get({ url: `/tbgjk/sbfxgkyxfml`, params });
}
// 导出
export const sbfxgkyxfmlExcel = '/tbgjk/sbfxgkyxfmlExcel'
//上报风险管控与修复移出名录
export const sbfxgkyxfycml = (params) => {
return defHttp.get({ url: `/tbgjk/sbfxgkyxfycml`, params });
}
// 导出
export const sbfxgkyxfycmlExcel = '/tbgjk/sbfxgkyxfycmlExcel'
//上报后期管理
export const sbhqgl = (params) => {
return defHttp.get({ url: `/tbgjk/sbhqgl`, params });
}
// 导出
export const sbhqglExcel = '/tbgjk/sbhqglExcel'
//上报备案地块名录
export const sbbadkml = (params) => {
return defHttp.get({ url: `/tbgjk/sbbadkml`, params });
}
// 导出
export const sbbadkmlExcel = '/tbgjk/sbbadkmlExcel'
//上报预关注地块名录
export const sbygzdkml = (params) => {
return defHttp.get({ url: `/tbgjk/sbygzdkml`, params });
}
// 导出
export const sbygzdkmlExcel = '/tbgjk/sbygzdkmlExcel'
// 上报现场监督
export const sbxcjd = (params) => {
return defHttp.get({ url: `/tbgjk/sbxcjd`, params });
}
// 导出
export const sbxcjdExcel = '/tbgjk/sbxcjdExcel'
\ No newline at end of file
import { ref } from 'vue';
import { BasicColumn, FormSchema } from '/@/components/Table';
import { dict, getTown, getHylb } from '/@/api/common/api'
import { useUserStore } from '/@/store/modules/user';
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 };
};
// 搜索条件
export const Columns: 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: 'faliyiju',
resizable: true,
},
{
title: '地块类型',
dataIndex: 'dklx',
resizable: true,
},
{
title: '是否移出',
dataIndex: 'sfyc',
resizable: true,
},
{
title: '创建地块时间',
dataIndex: 'createTsamp',
resizable: true,
},
{
title: '同步国家库',
dataIndex: 'tbgjk',
resizable: true,
},
{
title: '同步结果',
dataIndex: 'tbjg',
resizable: true,
},
{
title: '上报时间',
dataIndex: 'tsrq',
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: 'hydl',
component: 'TreeSelect',
slot: 'category',
},
{
label: '地块类型',
field: 'cdlx',
component: 'ApiSelect',
componentProps: {
api: dict,
params: { key: 'dk_dklx' },
labelField: 'text',
valueField: 'value',
}
},
{
label: '是否移出',
field: 'sfyc',
component: 'ApiSelect',
componentProps: {
api: dict,
params: { key: 'dk-sfyc' },
labelField: 'text',
valueField: 'value',
}
},
{
label: '同步国家库',
field: 'tbgjk',
component: 'Select',
componentProps: {
options: [
{ value: '1', label: '是' },
{ value: '0', label: '否' },
]
}
},
{
label: '政策依据',
field: 'faliYiju',
component: 'JSearchSelect',
componentProps: {
dict: 'dk_zcyj',
},
},
{
label: '地块名称',
field: 'wrdkbm',
component: 'Input',
componentProps: {
placeholder: '地块名称或地块编码'
}
},
{
label: '上报日期',
field: 'data',
component: 'RangeDate',
componentProps: {
format: 'YYYY-MM-DD',
//范围文本描述用集合
placeholder: ['请选择开始日期', '请选择结束日期']
},
},
]
...@@ -101,7 +101,7 @@ export const Columns: BasicColumn[] = [ ...@@ -101,7 +101,7 @@ export const Columns: BasicColumn[] = [
] ]
export const searchFormSchema: FormSchema[] = [ export const searchFormSchema: FormSchema[] = [
{ {
label: '行政区(市)', label: '',
field: 'cityCode', field: 'cityCode',
component: 'ApiSelect', component: 'ApiSelect',
ifShow: () => { ifShow: () => {
...@@ -141,7 +141,7 @@ export const searchFormSchema: FormSchema[] = [ ...@@ -141,7 +141,7 @@ export const searchFormSchema: FormSchema[] = [
}, },
}, },
{ {
label: '县', label: '县',
field: 'countryCode', field: 'countryCode',
component: 'ApiSelect', component: 'ApiSelect',
ifShow: () => { ifShow: () => {
...@@ -151,7 +151,7 @@ export const searchFormSchema: FormSchema[] = [ ...@@ -151,7 +151,7 @@ export const searchFormSchema: FormSchema[] = [
if (userStore?.userInfo?.userIdentity == '2') { if (userStore?.userInfo?.userIdentity == '2') {
const { updateSchema } = formActionType; const { updateSchema } = formActionType;
updateSchema({ updateSchema({
label: '县', label: '县',
field: 'countryCode', field: 'countryCode',
ifShow: true, ifShow: true,
componentProps: { componentProps: {
...@@ -220,7 +220,7 @@ export const DKdcsearchFormSchema: FormSchema[] = [ ...@@ -220,7 +220,7 @@ export const DKdcsearchFormSchema: FormSchema[] = [
slot: 'userLevle' slot: 'userLevle'
}, },
{ {
label: '行政区(市)', label: '',
field: 'cityCode', field: 'cityCode',
component: 'ApiSelect', component: 'ApiSelect',
show: ({ values }) => { show: ({ values }) => {
...@@ -710,7 +710,7 @@ export const MonthsearchFormSchema: FormSchema[] = [ ...@@ -710,7 +710,7 @@ export const MonthsearchFormSchema: FormSchema[] = [
slot: 'userLevle' slot: 'userLevle'
}, },
{ {
label: '行政区(市)', label: '',
field: 'cityCode', field: 'cityCode',
component: 'ApiSelect', component: 'ApiSelect',
show: ({ values }) => { show: ({ values }) => {
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论