From 15995c4352cd3175b4a872fe38be4629c9ea530f Mon Sep 17 00:00:00 2001 From: yangyuanshuai Date: Thu, 31 Oct 2024 16:14:18 +0800 Subject: [PATCH] =?UTF-8?q?=E6=8A=A5=E8=A1=A8=E6=A8=A1=E7=89=88=E7=AE=A1?= =?UTF-8?q?=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../RepDataProblem/RepDataProblem.vue | 61 +++++++++++++++---- .../reporting/RepTemplate/RepTemplate.vue | 12 ++-- 2 files changed, 55 insertions(+), 18 deletions(-) diff --git a/src/views/reporting/RepDataProblem/RepDataProblem.vue b/src/views/reporting/RepDataProblem/RepDataProblem.vue index 7779aa5..e6802ec 100644 --- a/src/views/reporting/RepDataProblem/RepDataProblem.vue +++ b/src/views/reporting/RepDataProblem/RepDataProblem.vue @@ -19,8 +19,14 @@ import Write from './components/Write.vue' import { Dialog } from '@/components/Dialog' import { getWidth } from '@/utils'; 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([]) @@ -92,16 +98,46 @@ const tableColumns = reactive([ const searchSchema = reactive([ { - field: 'createTime', - label: '生成时间', - componentProps: {type: 'daterange'}, - component: 'DatePicker' + field: 'organCode', + label: '机构', + colProps: { span: 100 }, + 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', - label: '报告名称', - componentProps: {}, - component: 'Input' + field: 'dataDate', + label: '日期', + componentProps: { + type: 'date', + valueFormat: 'YYYYMMDD', + }, + component: 'DatePicker', + formItemProps: { + rules: [required()], + }, }, { field: 'tCategory', @@ -110,11 +146,12 @@ const searchSchema = reactive([ component: 'Select' }, { - field: 'organCode', - label: '所属机构', + field: 'tName', + label: '报告名称', componentProps: {}, - component: 'Select' + component: 'Input' } + ]) const searchParams = ref({}) diff --git a/src/views/reporting/RepTemplate/RepTemplate.vue b/src/views/reporting/RepTemplate/RepTemplate.vue index d847068..90c34e8 100644 --- a/src/views/reporting/RepTemplate/RepTemplate.vue +++ b/src/views/reporting/RepTemplate/RepTemplate.vue @@ -124,12 +124,6 @@ const tableColumns = reactive([ ].map(item => ({ minWidth: item.label ? getWidth(item.label) : 120, ...item }) as TableColumn)) const searchSchema = reactive([ - { - field: 'tName', - label: '名称', - componentProps: {}, - component: 'Input' - }, { field: 'tCategory', label: '报告分类', @@ -142,6 +136,12 @@ const searchSchema = reactive([ componentProps: {}, component: 'Input' }, + { + field: 'tName', + label: '名称', + componentProps: {}, + component: 'Input' + }, { field: 'createTime', label: '上传时间',