提交 cca085f6 authored 作者: gjx's avatar gjx

建设用地跟后台链接接口

上级 5d6b587f
......@@ -8,7 +8,7 @@ VITE_PUBLIC_PATH = /
# VITE_PROXY = [["/Soil","http://36.40.79.205:8069/Soil/"],["/upload","http://localhost:3300/upload"]]
VITE_PROXY = [["/Soil","http://192.168.0.104:8069/Soil/"],["/upload","http://192.168.0.104:8069/upload"]]
VITE_PROXY = [["/Soil","http://192.168.0.105:8069/Soil/"],["/upload","http://192.168.0.105:8069/upload"]]
......@@ -16,7 +16,7 @@ VITE_PROXY = [["/Soil","http://192.168.0.104:8069/Soil/"],["/upload","http://192
VITE_GLOB_API_URL=/Soil
#后台接口全路径地址(必填)
VITE_GLOB_DOMAIN_URL=http://192.168.0.104:8069/Soil/
VITE_GLOB_DOMAIN_URL=http://192.168.0.105:8069/Soil/
# 接口前缀
......
......@@ -7,29 +7,28 @@
</template>
<script setup lang="ts">
import { BasicTable } from '@/components/Table';
import { useMessage } from '/@/hooks/web/useMessage';
import { useListPage } from '/@/hooks/system/useListPage';
import { YhhyColumns, YhhyseachFormSchema } from './data';
import { yhhydfx, yhhydfxExcel } from './api';
const { createMessage } = useMessage();
const { tableContext, onExportXls } = useListPage({
tableProps: {
title: '',
api: yhhydfx,
columns: YhhyColumns,
beforeFetch(params) {
if (new Date(params.startTime) > new Date(params.endTime)) {
createMessage.error('开始日期不能大于结束日期');
return false;
}
},
canResize: false,
//定义rowSelection的类型,默认是checkbox多选,可以设置成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: YhhyseachFormSchema,
......
......@@ -7,21 +7,19 @@
</template>
<script setup lang="ts">
import { BasicTable } from '@/components/Table';
import { useMessage } from '/@/hooks/web/useMessage';
import { useListPage } from '/@/hooks/system/useListPage';
import { DcColumns, DcseachFormSchema } from './data';
import { scdk, scdkExcel } from './api';
const { createMessage } = useMessage();
const { tableContext, onExportXls } = useListPage({
tableProps: {
title: '',
api: scdk,
columns: DcColumns,
beforeFetch(params) {
if (new Date(params.startTime) > new Date(params.endTime)) {
createMessage.error('开始日期不能大于结束日期');
return false;
beforeFetch(params: any) {
if (params.data) {
const arry = params.data.split(',');
params.startTime = arry[0];
params.endTime = arry[1];
}
},
canResize: false,
......
<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="'hycb-dc'" @click="onExportXls"> 导出</a-button>
</template>
......@@ -8,7 +24,7 @@
<script setup lang="ts">
import { BasicTable } from '@/components/Table';
import { useListPage } from '/@/hooks/system/useListPage';
import { HyColumns, HyseachFormSchema } from './data';
import { HyColumns, HyseachFormSchema, useCategoryData } from './data';
import { hycbfx, hycbfxExcel } from './api';
const { tableContext, onExportXls } = useListPage({
......@@ -21,7 +37,19 @@
rowKey: 'wrdkid',
clickToRowSelect: true,
showActionColumn: false,
beforeFetch(params: any) {
if (params.hylb) {
if (params.hylb.length == 1) {
params.hyml = params.hylb;
} else if (params.hylb.length == 2) {
params.hydl = params.hylb;
} else if (params.hylb.length == 3) {
params.hyzl = params.hylb;
} else if (params.hylb.length == 4) {
params.hyxl = params.hylb;
}
}
},
formConfig: {
labelWidth: 120,
schemas: HyseachFormSchema,
......@@ -39,4 +67,6 @@
},
});
const [registerTable, {}, {}] = tableContext;
const useCategory = useCategoryData();
const treeData = useCategory.data; // 行业类别-数据
</script>
......@@ -7,6 +7,22 @@
<div v-if="text.includes('逾期')" class="text-[#FFA584]">{{ text }}</div>
</template>
</template>
<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="'yqqkjc-dc'" @click="onExportXls"> 导出</a-button>
</template>
......@@ -15,7 +31,7 @@
<script setup lang="ts">
import { BasicTable } from '@/components/Table';
import { useListPage } from '/@/hooks/system/useListPage';
import { YqColumns, YqseachFormSchema } from './data';
import { YqColumns, YqseachFormSchema, useCategoryData } from './data';
import { yqqkjc, yqqkjcExcel } from './api';
const { tableContext, onExportXls } = useListPage({
......@@ -28,7 +44,19 @@
rowKey: 'wrdkid',
clickToRowSelect: true,
showActionColumn: false,
beforeFetch(params: any) {
if (params.hylb) {
if (params.hylb.length == 1) {
params.hyml = params.hylb;
} else if (params.hylb.length == 2) {
params.hydl = params.hylb;
} else if (params.hylb.length == 3) {
params.hyzl = params.hylb;
} else if (params.hylb.length == 4) {
params.hyxl = params.hylb;
}
}
},
formConfig: {
labelWidth: 120,
schemas: YqseachFormSchema,
......@@ -46,4 +74,6 @@
},
});
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="'qbdk-dc'" @click="onExportXls"> 导出</a-button>
</template>
......@@ -8,7 +24,7 @@
<script setup lang="ts">
import { BasicTable } from '@/components/Table';
import { useListPage } from '/@/hooks/system/useListPage';
import { QbdkColumns, QbdkseachFormSchema } from './data';
import { QbdkColumns, QbdkseachFormSchema, useCategoryData } from './data';
import { qbdkbb, qbdkbbExcel } from './api';
const { tableContext, onExportXls } = useListPage({
......@@ -21,7 +37,19 @@
rowKey: 'wrdkid',
clickToRowSelect: true,
showActionColumn: false,
beforeFetch(params: any) {
if (params.hylb) {
if (params.hylb.length == 1) {
params.hyml = params.hylb;
} else if (params.hylb.length == 2) {
params.hydl = params.hylb;
} else if (params.hylb.length == 3) {
params.hyzl = params.hylb;
} else if (params.hylb.length == 4) {
params.hyxl = params.hylb;
}
}
},
formConfig: {
labelWidth: 120,
schemas: QbdkseachFormSchema,
......@@ -39,4 +67,6 @@
},
});
const [registerTable, {}, {}] = tableContext;
const useCategory = useCategoryData();
const treeData = useCategory.data; // 行业类别-数据
</script>
......@@ -21,7 +21,13 @@
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: JzsjseachFormSchema,
......
import { BasicColumn, FormSchema } from '/@/components/Table';
import { dict, getTown } from '/@/api/common/api'
import { dict, getTown, getHylb } from '/@/api/common/api'
import { useUserStore } from '/@/store/modules/user';
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 = () => {
......@@ -36,25 +69,25 @@ export const excedColumns: BasicColumn[] = [
{
title: '地块总数',
dataIndex: 'total',
sorter: true,
// sorter: true,
resizable: true,
},
{
title: '未评审地块数量',
dataIndex: 'wpsTotal',
sorter: true,
// sorter: true,
resizable: true,
},
{
title: '未超标地块数量',
dataIndex: 'wcbTotal',
sorter: true,
// sorter: true,
resizable: true,
},
{
title: '超标地块数量',
dataIndex: 'cbTotal',
sorter: true,
// sorter: true,
resizable: true,
},
]
......@@ -85,14 +118,14 @@ export const searchExcedFormSchema: FormSchema[] = [
};
},
},
{
label: '政策依据',
field: 'faliyiju',
component: 'JSearchSelect',
componentProps: {
dict: 'dk_zcyj',
},
},
// {
// label: '政策依据',
// field: 'faliyiju',
// component: 'JSearchSelect',
// componentProps: {
// dict: 'dk_zcyj',
// },
// },
// {
// label: '政策依据二级',
// field: 'faliErji',
......@@ -119,25 +152,25 @@ export const HyColumns: BasicColumn[] = [
{
title: '地块总数',
dataIndex: 'total',
sorter: true,
// sorter: true,
resizable: true,
},
{
title: '未评审地块数量',
dataIndex: 'wpsTotal',
sorter: true,
// sorter: true,
resizable: true,
},
{
title: '未超标地块数量',
dataIndex: 'wcbTotal',
sorter: true,
// sorter: true,
resizable: true,
},
{
title: '超标地块数量',
dataIndex: 'cbTotal',
sorter: true,
// sorter: true,
resizable: true,
},
]
......@@ -212,13 +245,19 @@ export const HyseachFormSchema: FormSchema[] = [
},
},
{
label: '政策依据',
field: 'faliyiju',
component: 'JSearchSelect',
componentProps: {
dict: 'dk_zcyj',
},
label: '行业类别',
field: 'hylb',
component: 'TreeSelect',
slot: 'category',
},
// {
// label: '政策依据',
// field: 'faliyiju',
// component: 'JSearchSelect',
// componentProps: {
// dict: 'dk_zcyj',
// },
// },
]
// 逾期情况监测
......@@ -338,6 +377,12 @@ export const YqseachFormSchema: FormSchema[] = [
}
},
},
{
label: '行业类别',
field: 'hylb',
component: 'TreeSelect',
slot: 'category',
},
{
label: '逾期状态',
field: 'yqzt',
......@@ -359,14 +404,14 @@ export const YqseachFormSchema: FormSchema[] = [
placeholder: '地块名称或者账户名称'
}
},
{
label: '政策依据',
field: 'faliyiju',
component: 'JSearchSelect',
componentProps: {
dict: 'dk_zcyj',
},
},
// {
// label: '政策依据',
// field: 'faliyiju',
// component: 'JSearchSelect',
// componentProps: {
// dict: 'dk_zcyj',
// },
// },
]
// 全部地块报表
......@@ -477,6 +522,12 @@ export const QbdkseachFormSchema: FormSchema[] = [
}
},
},
{
label: '行业类别',
field: 'hylb',
component: 'TreeSelect',
slot: 'category',
},
{
label: '是否超标',
field: 'sfcb',
......@@ -621,16 +672,13 @@ export const JzsjseachFormSchema: FormSchema[] = [
},
{
label: '日期',
field: 'startMonth',
component: 'MonthPicker',
field: 'data',
component: 'RangeDate',
componentProps: {
//日期格式化,页面上显示的值
format: 'YYYY-MM',
//返回值格式化(绑定值的格式)
valueFormat: 'YYYY-MM',
//是否显示今天按钮
showToday: true,
}
format: 'YYYY-MM-DD',
//范围文本描述用集合
placeholder: ['请选择开始日期', '请选择结束日期']
},
},
]
......@@ -650,7 +698,7 @@ export const FglColumns: BasicColumn[] = [
{
title: '登录次数',
dataIndex: 'num',
dataIndex: 'loginNum',
resizable: true,
},
......@@ -886,31 +934,18 @@ export const YhhyseachFormSchema: FormSchema[] = [
}
},
{
label: '开始日期',
field: 'startTime',
component: 'DatePicker',
componentProps: {
//日期格式化,页面上显示的值
format: 'YYYY-MM-DD',
//返回值格式化(绑定值的格式)
valueFormat: 'YYYY-MM-DD',
//是否显示今天按钮
showToday: true,
}
},
{
label: '结束日期',
field: 'endTime',
component: 'DatePicker',
label: '日期',
field: 'data',
component: 'RangeDate',
componentProps: {
//日期格式化,页面上显示的值
format: 'YYYY-MM-DD',
//返回值格式化(绑定值的格式)
valueFormat: 'YYYY-MM-DD',
//是否显示今天按钮
showToday: true,
placeholder: ['请选择开始日期', '请选择结束日期']
}
},
]
// 导出地块
export const DcColumns: BasicColumn[] = [
......@@ -1036,29 +1071,15 @@ export const DcseachFormSchema: FormSchema[] = [
},
{
label: '开始日期',
field: 'startTime',
component: 'DatePicker',
componentProps: {
//日期格式化,页面上显示的值
format: 'YYYY-MM-DD',
//返回值格式化(绑定值的格式)
valueFormat: 'YYYY-MM-DD',
//是否显示今天按钮
showToday: true,
}
},
{
label: '结束日期',
field: 'endTime',
component: 'DatePicker',
label: '日期',
field: 'data',
component: 'RangeDate',
componentProps: {
//日期格式化,页面上显示的值
format: 'YYYY-MM-DD',
//返回值格式化(绑定值的格式)
valueFormat: 'YYYY-MM-DD',
//是否显示今天按钮
showToday: true,
placeholder: ['请选择开始日期', '请选择结束日期']
}
},
{
......
......@@ -303,24 +303,24 @@ export const FlsearchFormSchema: FormSchema[] = [
},
},
{
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: '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[] = [
......@@ -338,7 +338,7 @@ export const DkgzColumns: BasicColumn[] = [
},
{
title: '长江经济带整治化工行业整治',
dataIndex: 'cjjjdzzhghyzj',
dataIndex: 'cjjjd',
resizable: true,
},
{
......@@ -381,21 +381,21 @@ export const DkgzsearchFormSchema: FormSchema[] = [
},
},
{
label: '行业类别',
field: 'hylb',
component: 'TreeSelect',
slot: 'category',
},
// {
// label: '行业类别',
// field: 'hylb',
// component: 'TreeSelect',
// slot: 'category',
// },
{
label: '政策依据',
field: 'faliyiju',
component: 'JSearchSelect',
componentProps: {
dict: 'dk_zcyj',
},
},
// {
// label: '政策依据',
// field: 'faliyiju',
// component: 'JSearchSelect',
// componentProps: {
// dict: 'dk_zcyj',
// },
// },
]
// 地块工作范围情况统计
export const DkfwColumns: BasicColumn[] = [
......@@ -423,7 +423,7 @@ export const DkfwColumns: BasicColumn[] = [
},
{
title: '粤港澳大湾区',
dataIndex: 'ygadwq',
dataIndex: 'egadwq',
resizable: true,
},
{
......@@ -466,12 +466,12 @@ export const DkfwsearchFormSchema: FormSchema[] = [
},
},
{
label: '行业类别',
field: 'hylb',
component: 'TreeSelect',
slot: 'category',
},
// {
// label: '行业类别',
// field: 'hylb',
// component: 'TreeSelect',
// slot: 'category',
// },
]
......@@ -599,19 +599,30 @@ export const DkcbsearchFormSchema: FormSchema[] = [
}
},
},
// {
// label: '政策依据',
// field: 'faliyiju',
// component: 'JSearchSelect',
// componentProps: {
// dict: 'dk_zcyj',
// },
// },
// {
// label: '行业类别',
// field: 'hylb',
// component: 'TreeSelect',
// slot: 'category',
// },
{
label: '政策依据',
field: 'faliyiju',
component: 'JSearchSelect',
label: '是否超标',
field: 'sfcb',
component: 'ApiSelect',
componentProps: {
dict: 'dk_zcyj',
},
},
{
label: '行业类别',
field: 'hylb',
component: 'TreeSelect',
slot: 'category',
api: dict,
params: { key: 'qd_sfcb' },
labelField: 'text',
valueField: 'value',
}
},
{
label: '地块名称',
......@@ -2175,22 +2186,22 @@ export const DkjdtjColumns: BasicColumn[] = [
{
title: '监督地块数',
dataIndex: 'wrdkmc',
dataIndex: 'jddks',
resizable: true,
},
{
title: '监督记录数',
dataIndex: 'wrdkbm',
dataIndex: 'jdjls',
resizable: true,
},
{
title: '监督管理单位',
dataIndex: 'total',
dataIndex: 'jdgldw',
resizable: true,
},
{
title: '监督管理单位监督记录数',
dataIndex: 'fasl',
dataIndex: 'jddws',
resizable: true,
},
]
......@@ -2222,12 +2233,12 @@ export const DkjdtjsearchFormSchema: FormSchema[] = [
},
},
{
label: '行业类别',
field: 'hylb',
component: 'TreeSelect',
slot: 'category',
},
// {
// label: '行业类别',
// field: 'hylb',
// component: 'TreeSelect',
// slot: 'category',
// },
{
label: '监测时间',
field: 'data',
......@@ -2240,14 +2251,14 @@ export const DkjdtjsearchFormSchema: FormSchema[] = [
},
{
label: '政策依据',
field: 'faliyiju',
component: 'JSearchSelect',
componentProps: {
dict: 'dk_zcyj',
},
},
// {
// label: '政策依据',
// field: 'faliyiju',
// component: 'JSearchSelect',
// componentProps: {
// dict: 'dk_zcyj',
// },
// },
]
//政策信息完成情况
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论