提交 3a50a818 authored 作者: gjx's avatar gjx

添加风险评估情况

上级 3d54137b
<template>
<BasicTable @register="registerTable">
<template #form-userLevle="{ model, field }">
<a-select
v-model:value="model[field]"
placeholder="请选择"
@change="change(model)"
:fieldNames="{ label: 'text', value: 'value' }"
:options="Options"
></a-select>
</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="'tbxx-dc'" @click="onExportXls"> 导出</a-button>
</template>
</BasicTable>
</template>
<script setup lang="ts">
import { BasicTable } from '@/components/Table';
import { useListPage } from '/@/hooks/system/useListPage';
import { DkfxpgtbColumns, DkfxpgtbsearchFormSchema, getUserLevel, useCategoryData } from './data';
import { dkfxpgtbqktj, dkfxpgtbqktjExcel } from './api';
const { tableContext, onExportXls } = useListPage({
tableProps: {
title: '',
api: dkfxpgtbqktj,
columns: DkfxpgtbColumns,
canResize: false,
//定义rowSelection的类型,默认是checkbox多选,可以设置成radio单选
rowKey: 'wrdkid',
clickToRowSelect: true,
showActionColumn: false,
formConfig: {
labelWidth: 120,
schemas: DkfxpgtbsearchFormSchema,
autoSubmitOnEnter: true,
showAdvancedButton: false,
},
actionColumn: {
width: 120,
fixed: 'right',
},
},
exportConfig: {
name: '地块风险评估填报情况统计',
url: dkfxpgtbqktjExcel,
},
});
const [registerTable, {}, {}] = tableContext;
const useCategory = useCategoryData();
const treeData = useCategory.data; // 行业类别-数据
const Options = getUserLevel().data;
function change(model) {
model.cityCode = '';
}
</script>
......@@ -59,4 +59,11 @@ export const dkfxpgtbqk = (params) => {
return defHttp.get({ url: `/tbxxtj/dkfxpgtbqk`, params });
}
// 导出
export const dkfxpgtbqkExcel = '/tbxxtj/dkfxpgtbqkExcel'
\ No newline at end of file
export const dkfxpgtbqkExcel = '/tbxxtj/dkfxpgtbqkExcel'
// 地块风险评估填报情况统计
export const dkfxpgtbqktj = (params) => {
return defHttp.get({ url: `/tbxxtj/dkfxpgtbqktj`, params });
}
// 导出
export const dkfxpgtbqktjExcel = '/tbxxtj/dkfxpgtbqktjExcel'
\ No newline at end of file
......@@ -1037,4 +1037,107 @@ export const DkfxpgsearchFormSchema: FormSchema[] = [
},
},
]
// 地块风险评估填报情况统计
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: 'userIdentity',
component: 'ApiSelect',
show: () => {
return userStore?.userInfo?.userIdentity == '1' ? true : false
},
slot: 'userLevle'
},
{
label: '行政区(市)',
field: 'cityCode',
component: 'ApiSelect',
show: ({ values }) => {
return values.userIdentity == '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',
},
},
]
\ No newline at end of file
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论