提交 60775c8b authored 作者: jinrb's avatar jinrb

列表搜索和展示修改

上级 57b081c3
......@@ -25,7 +25,7 @@
import { BasicTable } from '@/components/Table';
import { useListPage } from '/@/hooks/system/useListPage';
import { ColumnsNo, searchFormSchema, useCategoryData } from './data';
import { ColumnsNo, searchFormSchemaNo, useCategoryData } from './data';
import { zbsbqd, zbsbqdExcel } from './api';
const { tableContext, onExportXls } = useListPage({
......@@ -47,7 +47,7 @@
},
formConfig: {
labelWidth: 120,
schemas: searchFormSchema,
schemas: searchFormSchemaNo,
autoSubmitOnEnter: true,
showAdvancedButton: false,
},
......
......@@ -144,10 +144,11 @@ export const ColumnsNo: BasicColumn[] = [
resizable: true,
},
{
title: '是否移出',
dataIndex: 'sfyc',
title: '所在阶段',
dataIndex: 'szjd',
resizable: true,
},
{
title: '创建地块时间',
dataIndex: 'createTsamp',
......@@ -290,3 +291,107 @@ export const searchFormSchema: FormSchema[] = [
},
},
]
export const searchFormSchemaNo: 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: 'faliYiju',
component: 'JSearchSelect',
componentProps: {
dict: 'dk_zcyj',
},
},
{
label: '地块名称',
field: 'wrdkbm',
component: 'Input',
componentProps: {
placeholder: '地块名称或地块编码'
}
}
]
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论