报表模版管理

main
yangyuanshuai 10 months ago
parent fbe705e4a2
commit 15995c4352

@ -19,8 +19,14 @@ import Write from './components/Write.vue'
import { Dialog } from '@/components/Dialog' import { Dialog } from '@/components/Dialog'
import { getWidth } from '@/utils'; import { getWidth } from '@/utils';
import Detail from './components/Detail.vue' import Detail from './components/Detail.vue'
import { useValidator } from '@/hooks/web/useValidator'
import { getOrganTree } from '@/api/common'
import { getLoginOrganCodeByUserInfo } from '@/utils/auth'
const { t } = useI18n() const { t } = useI18n();
const { required } = useValidator();
//
const loginOrganCode = getLoginOrganCodeByUserInfo();
const ids = ref<string[]>([]) const ids = ref<string[]>([])
@ -92,16 +98,46 @@ const tableColumns = reactive<TableColumn[]>([
const searchSchema = reactive<FormSchema[]>([ const searchSchema = reactive<FormSchema[]>([
{ {
field: 'createTime', field: 'organCode',
label: '生成时间', label: '机构',
componentProps: {type: 'daterange'}, colProps: { span: 100 },
component: 'DatePicker' componentProps: {
checkStrictly: true,
nodeKey: 'key',
props: { children: 'childrens', label: 'value' },
filterable: true,
multiple: true,
collapseTags: true,
showCheckbox: true,
style: { minWidth: '200px' },
//style: 'width: 100%',
checkOnClickNode: true,
},
component: 'TreeSelect',
optionApi: async () => {
const res = await getOrganTree({
treeid: '1',
systemCode: 'portal',
loginOrganCode,
});
return res.body.result;
},
value: loginOrganCode,
formItemProps: {
rules: [required()],
},
}, },
{ {
field: 'tName', field: 'dataDate',
label: '报告名称', label: '日期',
componentProps: {}, componentProps: {
component: 'Input' type: 'date',
valueFormat: 'YYYYMMDD',
},
component: 'DatePicker',
formItemProps: {
rules: [required()],
},
}, },
{ {
field: 'tCategory', field: 'tCategory',
@ -110,11 +146,12 @@ const searchSchema = reactive<FormSchema[]>([
component: 'Select' component: 'Select'
}, },
{ {
field: 'organCode', field: 'tName',
label: '所属机构', label: '报告名称',
componentProps: {}, componentProps: {},
component: 'Select' component: 'Input'
} }
]) ])
const searchParams = ref({}) const searchParams = ref({})

@ -124,12 +124,6 @@ const tableColumns = reactive<TableColumn[]>([
].map(item => ({ minWidth: item.label ? getWidth(item.label) : 120, ...item }) as TableColumn)) ].map(item => ({ minWidth: item.label ? getWidth(item.label) : 120, ...item }) as TableColumn))
const searchSchema = reactive<FormSchema[]>([ const searchSchema = reactive<FormSchema[]>([
{
field: 'tName',
label: '名称',
componentProps: {},
component: 'Input'
},
{ {
field: 'tCategory', field: 'tCategory',
label: '报告分类', label: '报告分类',
@ -142,6 +136,12 @@ const searchSchema = reactive<FormSchema[]>([
componentProps: {}, componentProps: {},
component: 'Input' component: 'Input'
}, },
{
field: 'tName',
label: '名称',
componentProps: {},
component: 'Input'
},
{ {
field: 'createTime', field: 'createTime',
label: '上传时间', label: '上传时间',

Loading…
Cancel
Save