From 1b9cba9de8b4f8b683a47d64573cedda9abb34f7 Mon Sep 17 00:00:00 2001 From: yangyuanshuai Date: Fri, 1 Nov 2024 17:45:19 +0800 Subject: [PATCH] =?UTF-8?q?=E8=B0=83=E6=95=B4=E6=96=87=E4=BB=B6=E8=B7=AF?= =?UTF-8?q?=E5=BE=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../RepVariableManagement/index.ts | 16 ++++++++-------- .../RepVariableManagement/types.ts | 0 src/router/index.ts | 2 +- src/views/reporting/RepTemplate/RepTemplate.vue | 4 ++-- .../reporting/RepTemplate/components/Write.vue | 14 ++++++++++---- .../RepVariableManagement.vue | 4 ++-- .../RepVariableManagement/components/Detail.vue | 2 +- .../RepVariableManagement/components/Write.vue | 8 ++++++-- .../RepVariableManagement/constants.ts | 0 9 files changed, 30 insertions(+), 20 deletions(-) rename src/api/{dataset => reporting}/RepVariableManagement/index.ts (54%) rename src/api/{dataset => reporting}/RepVariableManagement/types.ts (100%) rename src/views/{dataset => reporting}/RepVariableManagement/RepVariableManagement.vue (97%) rename src/views/{dataset => reporting}/RepVariableManagement/components/Detail.vue (90%) rename src/views/{dataset => reporting}/RepVariableManagement/components/Write.vue (96%) rename src/views/{dataset => reporting}/RepVariableManagement/constants.ts (100%) diff --git a/src/api/dataset/RepVariableManagement/index.ts b/src/api/reporting/RepVariableManagement/index.ts similarity index 54% rename from src/api/dataset/RepVariableManagement/index.ts rename to src/api/reporting/RepVariableManagement/index.ts index a7fd1b8..226538d 100644 --- a/src/api/dataset/RepVariableManagement/index.ts +++ b/src/api/reporting/RepVariableManagement/index.ts @@ -3,7 +3,7 @@ import type { TableData } from './types'; /** 获取表格数据 */ export const getRepVariableManagementListApi = (data: any) => { - return request.postJson({ url: '/dataset/spi/dataset/RepVariableManagement/RepVariableManagementQueryPage', data }); + return request.postJson({ url: '/reporting/spi/reporting/RepVariableManagement/RepVariableManagementQueryPage', data }); }; /** 批量删除 */ @@ -14,7 +14,7 @@ export const delRepVariableManagementListApi = (list: string[] | number[]): Prom }; }); return request.postJson({ - url: '/dataset/spi/dataset/RepVariableManagement/RepVariableManagementBatchDelete', + url: '/reporting/spi/reporting/RepVariableManagement/RepVariableManagementBatchDelete', data: { list: _list, }, @@ -23,28 +23,28 @@ export const delRepVariableManagementListApi = (list: string[] | number[]): Prom /** 删除 */ export const delRepVariableManagementApi = (id?: string): Promise => { - return request.postJson({ url: '/dataset/spi/dataset/RepVariableManagement/RepVariableManagementDelete', data: { id } }); + return request.postJson({ url: '/reporting/spi/reporting/RepVariableManagement/RepVariableManagementDelete', data: { id } }); }; /** 保存 */ export const saveRepVariableManagementApi = (data: Partial): Promise => { - return request.postJson({ url: '/dataset/spi/dataset/RepVariableManagement/RepVariableManagementSave', data }); + return request.postJson({ url: '/reporting/spi/reporting/RepVariableManagement/RepVariableManagementSave', data }); }; /** 查询单条数据 */ export const queryRepVariableManagementApi = (id?: string): Promise => { - return request.postJson({ url: '/dataset/spi/dataset/RepVariableManagement/RepVariableManagementQueryOne', data: { id } }); + return request.postJson({ url: '/reporting/spi/reporting/RepVariableManagement/RepVariableManagementQueryOne', data: { id } }); }; /** 同步导入 */ -export const importExcelApiUrl = '/dataset/sui/dataset/RepVariableManagement/RepVariableManagementImportExcel'; +export const importExcelApiUrl = '/reporting/sui/reporting/RepVariableManagement/RepVariableManagementImportExcel'; /** 异步导入 */ -export const importExcelAsyncApiUrl = '/dataset/sui/dataset/RepVariableManagement/RepVariableManagementImportAsyncExcel'; +export const importExcelAsyncApiUrl = '/reporting/sui/reporting/RepVariableManagement/RepVariableManagementImportAsyncExcel'; /** 导出 */ export const exportExcelApi = (params: any) => { - return request.doExport({ url: '/dataset/sdi/dataset/RepVariableManagement/RepVariableManagementExportXls', params }); + return request.doExport({ url: '/reporting/sdi/reporting/RepVariableManagement/RepVariableManagementExportXls', params }); }; /** 获取某个字典 */ diff --git a/src/api/dataset/RepVariableManagement/types.ts b/src/api/reporting/RepVariableManagement/types.ts similarity index 100% rename from src/api/dataset/RepVariableManagement/types.ts rename to src/api/reporting/RepVariableManagement/types.ts diff --git a/src/router/index.ts b/src/router/index.ts index 41be34e..d57743d 100644 --- a/src/router/index.ts +++ b/src/router/index.ts @@ -1835,7 +1835,7 @@ export const asyncRouterMap: AppRouteRecordRaw[] = [ }, { path: 'repVariableManagement', - component: () => import('@/views/dataset/RepVariableManagement/RepVariableManagement.vue'), + component: () => import('@/views/reporting/RepVariableManagement/RepVariableManagement.vue'), name: 'repVariableManagement', menuId: 'repVariableManagement', meta: { diff --git a/src/views/reporting/RepTemplate/RepTemplate.vue b/src/views/reporting/RepTemplate/RepTemplate.vue index e34d917..bbe1932 100644 --- a/src/views/reporting/RepTemplate/RepTemplate.vue +++ b/src/views/reporting/RepTemplate/RepTemplate.vue @@ -21,7 +21,7 @@ import Write from './components/Write.vue' import { Dialog } from '@/components/Dialog' import { getWidth, transfDictList } from '@/utils'; import Detail from './components/Detail.vue' -import { REPORTING_TATUS_LIST } from './constants' +import { REPORTING_STATUS_LIST } from './constants' const { t } = useI18n() @@ -97,7 +97,7 @@ const tableColumns = reactive([ field: 'tStatus', label: '状态', formatter:(row:Recordable,_:TableColumn) =>{ - const state=REPORTING_TATUS_LIST.find((item)=>item.value===row.tStatus) + const state=REPORTING_STATUS_LIST.find((item)=>item.value===row.tStatus) if(state&&state.value =='1'){ return {state.label} } diff --git a/src/views/reporting/RepTemplate/components/Write.vue b/src/views/reporting/RepTemplate/components/Write.vue index af76c7c..5fd4ba6 100644 --- a/src/views/reporting/RepTemplate/components/Write.vue +++ b/src/views/reporting/RepTemplate/components/Write.vue @@ -4,6 +4,9 @@ import { useForm } from '@/hooks/web/useForm' import { PropType, reactive, watch } from 'vue' import { useValidator } from '@/hooks/web/useValidator' import { ElButton, ElMessage, ElMessageBox } from 'element-plus'; +import { getCategory } from '@/api/reporting/RepTemplate/RepTemplate'; +import { transfDictList } from '@/utils'; +import { REPORTING_STATUS_LIST } from '../constants'; const { required } = useValidator() @@ -33,9 +36,11 @@ const formSchema = reactive([ field: 'tCategory', label: '报告分类', component: 'Select', - componentProps: { - - }, + optionApi: async () => { + const res = await getCategory({ paramName: 'reportingType_param', systemCode: 'ordb' }); + return transfDictList(res.body.result); + }, + value: '1' }, { field: 'createUser', @@ -58,8 +63,9 @@ const formSchema = reactive([ label: '报告状态', component: 'Select', componentProps: { - + options:REPORTING_STATUS_LIST }, + value:'1' }, { field: 'tDescription', diff --git a/src/views/dataset/RepVariableManagement/RepVariableManagement.vue b/src/views/reporting/RepVariableManagement/RepVariableManagement.vue similarity index 97% rename from src/views/dataset/RepVariableManagement/RepVariableManagement.vue rename to src/views/reporting/RepVariableManagement/RepVariableManagement.vue index 8ba7524..1263085 100644 --- a/src/views/dataset/RepVariableManagement/RepVariableManagement.vue +++ b/src/views/reporting/RepVariableManagement/RepVariableManagement.vue @@ -6,8 +6,8 @@ import { delRepVariableManagementListApi, delRepVariableManagementApi, queryRepVariableManagementApi, -} from '@/api/dataset/RepVariableManagement' -import { TableData } from '@/api/dataset/RepVariableManagement/RepVariableManagement/types' +} from '@/api/reporting/RepVariableManagement' +import { TableData } from '@/api/reporting/RepVariableManagement/types' import { useTable } from '@/hooks/web/useTable' import { useI18n } from '@/hooks/web/useI18n' import { Table, TableColumn } from '@/components/Table' diff --git a/src/views/dataset/RepVariableManagement/components/Detail.vue b/src/views/reporting/RepVariableManagement/components/Detail.vue similarity index 90% rename from src/views/dataset/RepVariableManagement/components/Detail.vue rename to src/views/reporting/RepVariableManagement/components/Detail.vue index a9f2ea4..e5f947f 100644 --- a/src/views/dataset/RepVariableManagement/components/Detail.vue +++ b/src/views/reporting/RepVariableManagement/components/Detail.vue @@ -1,6 +1,6 @@