提交 024a61c8 authored 作者: jinrongbin's avatar jinrongbin

风险评估专题

上级 dfa45abd
......@@ -48,4 +48,10 @@ export const scdk = (params) => {
return defHttp.get({ url: `/jsyd/scdk`, params });
}
// 导出
export const scdkExcel = '/jsyd/scdkExcel'
\ No newline at end of file
export const scdkExcel = '/jsyd/scdkExcel'
//风险评估专题
export const fxpgzt = (params) => {
return defHttp.get({ url: `/jsyd/fxpgzt`, params });
}
// 风险评估专题导出
export const fxpgztExcel = '/jsyd/fxpgztExcel'
\ No newline at end of file
......@@ -999,6 +999,131 @@ export const DcColumns: BasicColumn[] = [
resizable: true,
},
]
// 风险评估专题
export const FxpgztColumns: BasicColumn[] = [
{
title: '市',
dataIndex: 'name',
resizable: true,
},
{
title: '地块名称',
dataIndex: 'wrdkmc',
resizable: true,
},
{
title: '地块编码',
dataIndex: 'wrdkbm',
resizable: true,
},
{
title: '关注度',
dataIndex: 'gzd',
resizable: true,
},
{
title: '所处阶段',
dataIndex: 'scjd',
resizable: true,
}
]
export const FxpgztseachFormSchema: 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: 'scjd',
component: 'Select',
componentProps: {
options: [
{ label: '未开展调查', value: 'S0' },
{ label: '地块调查 ', value: 'S2' },
{ label: '风险评估', value: 'S3' },
{ label: '风险管控', value: 'S4' },
{ label: '修复', value: 'S5' },
{ label: '管控及修复', value: 'S10' },
{ label: '效果评估', value: 'S6' },
],
}
},
{
label: '地块名称',
field: 'wrdkmc',
component: 'Input',
componentProps: {
placeholder: '地块名称'
}
},
]
export const DcseachFormSchema: FormSchema[] = [
......
<template>
<BasicTable @register="registerTable">
<template #tableTitle>
<a-button type="primary" preIcon="ant-design:export-outlined" v-auth="'fxpgzt-dc'" @click="onExportXls"> 导出</a-button>
</template>
</BasicTable>
</template>
<script setup lang="ts">
import { BasicTable } from '@/components/Table';
import { useListPage } from '/@/hooks/system/useListPage';
import { FxpgztColumns, FxpgztseachFormSchema } from './data';
import { fxpgzt, fxpgztExcel } from './api';
const { tableContext, onExportXls } = useListPage({
tableProps: {
title: '',
api: fxpgzt,
columns: FxpgztColumns,
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: FxpgztseachFormSchema,
autoSubmitOnEnter: true,
showAdvancedButton: false,
},
actionColumn: {
width: 120,
fixed: 'right',
},
},
exportConfig: {
name: '风险评估专题',
url: fxpgztExcel,
},
});
const [registerTable, {}, {}] = tableContext;
</script>
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论