From 8093524502afc418c6d1e0ade7000c2f48d8cd2e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=B5=B5=E9=B9=8F?= Date: Sun, 23 Feb 2025 10:43:13 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E8=B5=84=E8=B4=A8=E4=B8=8A=E4=BC=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .env.local | 2 +- src/api/qualification/index.ts | 94 +++++++++---------- src/components/UploadFile/src/UploadImgs.vue | 3 +- src/views/Home/Index.vue | 1 - src/views/enterprises/update.vue | 16 +--- .../EnterpriseQualificationForm.vue | 74 +++++++++++++-- src/views/qualification/index.vue | 59 +----------- 7 files changed, 123 insertions(+), 126 deletions(-) diff --git a/.env.local b/.env.local index bd6abc1..56f046d 100644 --- a/.env.local +++ b/.env.local @@ -4,7 +4,7 @@ NODE_ENV=development VITE_DEV=true # 请求路径 -VITE_BASE_URL='http://188.188.3.232:48080' +VITE_BASE_URL='http://localhost:48080' #VITE_BASE_URL='http://188.188.4.176:48080' #VITE_BASE_URL='http://192.168.2.63:48080' diff --git a/src/api/qualification/index.ts b/src/api/qualification/index.ts index 9de44b1..0b10e46 100644 --- a/src/api/qualification/index.ts +++ b/src/api/qualification/index.ts @@ -1,47 +1,47 @@ -import request from '@/config/axios' - -// 企业资质 VO -export interface EnterpriseQualificationVO { - id: number // 主键 - enterpriseId: number // 企业ID - qualificationName: number // 资质名称,例如:排污许可证、环保合格证 - expiryDate: Date // 资质到期日期 - qualificationDescription: string // 资质描述,详细说明资质信息 - updateBy: string // 修改人 - createBy: string // 创建人 - handleDate: Date // 办理日期 - enterpriseAuth: string // 资质编号 -} - -// 企业资质 API -export const EnterpriseQualificationApi = { - // 查询企业资质分页 - getEnterpriseQualificationPage: async (params: any) => { - return await request.get({ url: `/system/enterprise-qualification/page`, params }) - }, - - // 查询企业资质详情 - getEnterpriseQualification: async (id: number) => { - return await request.get({ url: `/system/enterprise-qualification/get?id=` + id }) - }, - - // 新增企业资质 - createEnterpriseQualification: async (data: EnterpriseQualificationVO) => { - return await request.post({ url: `/system/enterprise-qualification/create`, data }) - }, - - // 修改企业资质 - updateEnterpriseQualification: async (data: EnterpriseQualificationVO) => { - return await request.put({ url: `/system/enterprise-qualification/update`, data }) - }, - - // 删除企业资质 - deleteEnterpriseQualification: async (id: number) => { - return await request.delete({ url: `/system/enterprise-qualification/delete?id=` + id }) - }, - - // 导出企业资质 Excel - exportEnterpriseQualification: async (params) => { - return await request.download({ url: `/system/enterprise-qualification/export-excel`, params }) - }, -} \ No newline at end of file +import request from '@/config/axios' + +// 企业资质 VO +export interface EnterpriseQualificationVO { + id: number // 主键 + enterpriseId: number // 企业ID + qualificationName: number // 资质名称,例如:排污许可证、环保合格证 + expiryDate: Date // 资质到期日期 + qualificationDescription: string // 资质描述,详细说明资质信息 + updateBy: string // 修改人 + createBy: string // 创建人 + handleDate: Date // 办理日期 + enterpriseAuth: string // 资质编号 +} + +// 企业资质 API +export const EnterpriseQualificationApi = { + // 查询企业资质分页 + getEnterpriseQualificationPage: async (params: any) => { + return await request.get({ url: `/system/enterprise-qualification/page`, params }) + }, + + // 查询企业资质详情 + getEnterpriseQualification: async (id: number) => { + return await request.get({ url: `/system/enterprise-qualification/get?id=` + id }) + }, + + // 新增企业资质 + createEnterpriseQualification: async (data: EnterpriseQualificationVO) => { + return await request.post({ url: `/system/enterprise-qualification/create`, data }) + }, + + // 修改企业资质 + updateEnterpriseQualification: async (data: EnterpriseQualificationVO) => { + return await request.put({ url: `/system/enterprise-qualification/update`, data }) + }, + + // 删除企业资质 + deleteEnterpriseQualification: async (id: number) => { + return await request.delete({ url: `/system/enterprise-qualification/delete?id=` + id }) + }, + + // 导出企业资质 Excel + exportEnterpriseQualification: async (params) => { + return await request.download({ url: `/system/enterprise-qualification/export-excel`, params }) + }, +} diff --git a/src/components/UploadFile/src/UploadImgs.vue b/src/components/UploadFile/src/UploadImgs.vue index e9b3e82..61f8b08 100644 --- a/src/components/UploadFile/src/UploadImgs.vue +++ b/src/components/UploadFile/src/UploadImgs.vue @@ -120,10 +120,11 @@ interface UploadEmits { const emit = defineEmits() const uploadSuccess: UploadProps['onSuccess'] = (res: any): void => { message.success('上传成功') + debugger // 删除自身 const index = fileList.value.findIndex((item) => item.response?.data === res.data) fileList.value.splice(index, 1) - uploadList.value.push({ id: res.data.file_id, url: res.data.url }) + uploadList.value.push({ id: res.data.id, url: res.data.url }) if (uploadList.value.length == uploadNumber.value) { fileList.value.push(...uploadList.value) uploadList.value = [] diff --git a/src/views/Home/Index.vue b/src/views/Home/Index.vue index 458b62a..f6bdf4f 100644 --- a/src/views/Home/Index.vue +++ b/src/views/Home/Index.vue @@ -22,7 +22,6 @@ -