Переглянути джерело

refactor: 更新upload绑定参数

lixuan 3 тижнів тому
батько
коміт
a9661daa3e

+ 7 - 7
apps/web-velofex/src/api/core/user.ts

@@ -27,7 +27,7 @@ export namespace UserApi {
     from_code: string;
     from_name: string;
     id: string;
-    imgPhotoFileId: string;
+    imgLogoFileId: string;
     isEnable: boolean;
     isOwner: boolean;
     isReleased: boolean;
@@ -125,7 +125,7 @@ export namespace UserApi {
     isEnable: boolean;
     langNameList: LangName[];
     fileId?: string;
-    imgPhotoFileId?: string;
+    imgLogoFileId?: string;
     version?: string;
     partnerInfoId?: string;
     code?: string;
@@ -257,7 +257,7 @@ export namespace UserApi {
   export interface PartnerModel {
     account: string;
     id: string;
-    imgPhotoFileId: string;
+    imgLogoFileId: string;
     langName: string;
     name: string;
     expiredTime?: string;
@@ -306,7 +306,7 @@ export namespace UserApi {
       value: string;
     }>;
     fileId?: string;
-    imgPhotoFileId?: string;
+    imgLogoFileId?: string;
     version?: string;
     account?: string;
     langName?: string;
@@ -336,7 +336,7 @@ export namespace UserApi {
       value: string;
     }>;
     fileId?: string;
-    imgPhotoFileId?: string;
+    imgLogoFileId?: string;
     version?: string;
     account?: string;
     langName?: string;
@@ -441,7 +441,7 @@ export namespace UserApi {
   export interface EnterpriseCustomerModel {
     code: string;
     id: string;
-    imgPhotoFileId: string;
+    imgLogoFileId: string;
     name: string;
     partnerUserName: string;
     contact?: string;
@@ -470,7 +470,7 @@ export namespace UserApi {
   export interface EnterpriseCustomerParams {
     id?: string;
     fileId?: string;
-    imgPhotoFileId?: string;
+    imgLogoFileId?: string;
     version?: string;
     code: string;
     name: string;

+ 9 - 9
apps/web-velofex/src/views/dashboard/application-management/application-modal.vue

@@ -63,7 +63,7 @@ const formData = ref({
   id: '',
   logo: null,
   fileId: '',
-  imgPhotoFileId: '',
+  imgLogoFileId: '',
   fileList: [] as any[],
   partner: '',
   projectCode: '',
@@ -209,8 +209,8 @@ async function fetchApplicationDetail() {
       formData.value.designerCount = data.number0fDesigners;
       formData.value.scenarioCount = data.number0fBusinessScenarios;
       formData.value.userCount = data.number0fCSiteMaxUser;
-      formData.value.fileId = data.imgPhotoFileId;
-      formData.value.imgPhotoFileId = data.imgPhotoFileId;
+      formData.value.fileId = data.imgLogoFileId;
+      formData.value.imgLogoFileId = data.imgLogoFileId;
       formData.value.partner = data.partner_id;
       formData.value.id = data.id;
       formData.value.customerRelation = data.client_code;
@@ -220,17 +220,17 @@ async function fetchApplicationDetail() {
         formData.value.nameCn = data.name;
       }
 
-      if (data.imgPhotoFileId) {
+      if (data.imgLogoFileId) {
         formData.value.fileList = [
           {
             uid: '-1',
             name: 'logo.png',
             status: 'done',
-            url: `/File/Download?fileId=${data.imgPhotoFileId}`,
+            url: `/File/Download?fileId=${data.imgLogoFileId}`,
             response: {
               result: [
                 {
-                  id: data.imgPhotoFileId,
+                  id: data.imgLogoFileId,
                 },
               ],
             },
@@ -333,7 +333,7 @@ function handleLogoUpload(info: any) {
     formData.value.logo = info.file;
     if (info.file.response?.result?.[0]?.id) {
       formData.value.fileId = info.file.response.result[0].id;
-      formData.value.imgPhotoFileId = info.file.response.result[0].id;
+      formData.value.imgLogoFileId = info.file.response.result[0].id;
     }
   }
 }
@@ -354,7 +354,7 @@ async function handleSave() {
     client_code: formData.value.customerRelation,
     code: formData.value.projectCode,
     fileId: formData.value.fileId,
-    imgPhotoFileId: formData.value.imgPhotoFileId,
+    imgLogoFileId: formData.value.imgLogoFileId,
     partnerInfoId: formData.value.partner,
     from_code: formData.value.cloneProject,
     contact: formData.value.contact,
@@ -491,7 +491,7 @@ function resetFormData() {
     id: '',
     logo: null,
     fileId: '',
-    imgPhotoFileId: '',
+    imgLogoFileId: '',
     fileList: [] as any[],
     partner: '',
     projectCode: '',

+ 1 - 1
apps/web-velofex/src/views/dashboard/application-management/index.vue

@@ -390,7 +390,7 @@ watch(
         class="flex h-[78px] cursor-pointer items-center rounded-[11px] bg-[#fff] px-[20px] shadow-md"
       >
         <img
-          :src="`/File/Download?fileId=${item.imgPhotoFileId}`"
+          :src="`/File/Download?fileId=${item.imgLogoFileId}`"
           alt=""
           class="h-[48px] w-auto object-contain"
         />

+ 8 - 8
apps/web-velofex/src/views/dashboard/enterprise-customers/enterprise-customers-modal.vue

@@ -29,7 +29,7 @@ const formData = ref({
   code: '',
   id: '',
   fileId: '',
-  imgPhotoFileId: '',
+  imgLogoFileId: '',
   fileList: [] as any[],
   name: '',
   contact: '',
@@ -45,17 +45,17 @@ watch(
   (val) => {
     if (val && props.mode === 'edit' && props.customerData) {
       Object.assign(formData.value, props.customerData);
-      if (props.customerData.imgPhotoFileId) {
+      if (props.customerData.imgLogoFileId) {
         formData.value.fileList = [
           {
             uid: '-1',
             name: 'logo.png',
             status: 'done',
-            url: `/File/Download?fileId=${props.customerData.imgPhotoFileId}`,
+            url: `/File/Download?fileId=${props.customerData.imgLogoFileId}`,
             response: {
               result: [
                 {
-                  id: props.customerData.imgPhotoFileId,
+                  id: props.customerData.imgLogoFileId,
                 },
               ],
             },
@@ -77,7 +77,7 @@ const isOpen = computed({
 function handleLogoUpload(info: any) {
   if (info.file.status === 'done' && info.file.response?.result?.[0]?.id) {
     formData.value.fileId = info.file.response.result[0].id;
-    formData.value.imgPhotoFileId = info.file.response.result[0].id;
+    formData.value.imgLogoFileId = info.file.response.result[0].id;
   }
 }
 
@@ -85,8 +85,8 @@ async function handleSave() {
   const data = {
     id: formData.value.id,
     fileId: formData.value.fileId,
-    imgPhotoFileId: formData.value.imgPhotoFileId,
-    version: `v${formData.value.imgPhotoFileId || '0'}`,
+    imgLogoFileId: formData.value.imgLogoFileId,
+    version: `v${formData.value.imgLogoFileId || '0'}`,
     code: formData.value.code,
     name: formData.value.name,
     contact: formData.value.contact,
@@ -117,7 +117,7 @@ function resetFormData() {
     code: '',
     id: '',
     fileId: '',
-    imgPhotoFileId: '',
+    imgLogoFileId: '',
     fileList: [] as any[],
     name: '',
     contact: '',

+ 2 - 2
apps/web-velofex/src/views/dashboard/enterprise-customers/index.vue

@@ -302,8 +302,8 @@ watch(
         class="flex h-[78px] cursor-pointer items-center rounded-[11px] bg-[#fff] px-[20px] shadow-md"
       >
         <img
-          v-if="item.imgPhotoFileId"
-          :src="`/File/Download?fileId=${item.imgPhotoFileId}`"
+          v-if="item.imgLogoFileId"
+          :src="`/File/Download?fileId=${item.imgLogoFileId}`"
           alt=""
           class="h-[48px] w-auto object-contain"
         />

+ 1 - 1
apps/web-velofex/src/views/dashboard/home/application-management.vue

@@ -111,7 +111,7 @@ watch(
           class="flex h-[37px] cursor-pointer items-center rounded-[11px] bg-[#fff] p-[6px_10px] shadow-md"
         >
           <img
-            :src="`/File/Download?fileId=${item.imgPhotoFileId}`"
+            :src="`/File/Download?fileId=${item.imgLogoFileId}`"
             alt=""
             class="h-[24px] w-auto object-contain"
           />

+ 1 - 1
apps/web-velofex/src/views/dashboard/home/enterprise-customers.vue

@@ -89,7 +89,7 @@ watch(
           class="flex h-[37px] cursor-pointer items-center rounded-[11px] bg-[#fff] p-[6px_10px] shadow-md"
         >
           <img
-            :src="`/File/Download?fileId=${item.imgPhotoFileId}`"
+            :src="`/File/Download?fileId=${item.imgLogoFileId}`"
             alt=""
             class="h-[24px] w-auto object-contain"
           />

+ 1 - 1
apps/web-velofex/src/views/dashboard/home/product-list.vue

@@ -87,7 +87,7 @@ watch(
         class="mt-[24px] flex cursor-pointer items-center rounded-[30px] border border-gray-200 bg-white px-[24px] py-[7px] shadow-md"
       >
         <img
-          :src="`/File/Download?fileId=${item.imgPhotoFileId}`"
+          :src="`/File/Download?fileId=${item.imgLogoFileId}`"
           class="h-[30px] w-auto object-contain"
         />
         <span

+ 1 - 1
apps/web-velofex/src/views/dashboard/home/sales-partners.vue

@@ -92,7 +92,7 @@ watch(
           class="flex h-[37px] cursor-pointer items-center rounded-[11px] bg-[#fff] p-[6px_10px] shadow-md"
         >
           <img
-            :src="`/File/Download?fileId=${partner.imgPhotoFileId}`"
+            :src="`/File/Download?fileId=${partner.imgLogoFileId}`"
             alt=""
             class="h-[24px] w-auto object-contain"
           />

+ 1 - 1
apps/web-velofex/src/views/dashboard/sales-partners/index.vue

@@ -321,7 +321,7 @@ watch(
         class="flex h-[78px] cursor-pointer items-center rounded-[11px] bg-[#fff] px-[20px] shadow-md"
       >
         <img
-          :src="`/File/Download?fileId=${item.imgPhotoFileId}`"
+          :src="`/File/Download?fileId=${item.imgLogoFileId}`"
           alt=""
           class="h-[48px] w-auto object-contain"
         />

+ 7 - 7
apps/web-velofex/src/views/dashboard/sales-partners/sales-partners-modal.vue

@@ -39,7 +39,7 @@ const formData = ref({
   id: '',
   logo: null,
   fileId: '',
-  imgPhotoFileId: '',
+  imgLogoFileId: '',
   fileList: [] as any[],
   account: '',
   password: '',
@@ -95,14 +95,14 @@ async function fetchPartnerDetail() {
   formData.value.number0fCSiteMaxUser =
     props.partnerData.number0fCSiteMaxUser || 0;
 
-  if (props.partnerData.imgPhotoFileId) {
-    formData.value.imgPhotoFileId = props.partnerData.imgPhotoFileId;
+  if (props.partnerData.imgLogoFileId) {
+    formData.value.imgLogoFileId = props.partnerData.imgLogoFileId;
     formData.value.fileList = [
       {
         uid: '-1',
         name: 'logo.png',
         status: 'done',
-        url: `/File/Download?fileId=${props.partnerData.imgPhotoFileId}`,
+        url: `/File/Download?fileId=${props.partnerData.imgLogoFileId}`,
       },
     ];
   }
@@ -130,7 +130,7 @@ function resetForm() {
     id: '',
     logo: null,
     fileId: '',
-    imgPhotoFileId: '',
+    imgLogoFileId: '',
     fileList: [] as any[],
     account: '',
     password: '',
@@ -154,7 +154,7 @@ function handleLogoUpload(info: any) {
     formData.value.logo = info.file;
     if (info.file.response?.result?.[0]?.id) {
       formData.value.fileId = info.file.response.result[0].id;
-      formData.value.imgPhotoFileId = info.file.response.result[0].id;
+      formData.value.imgLogoFileId = info.file.response.result[0].id;
     }
   }
 }
@@ -173,7 +173,7 @@ async function handleSave() {
       },
     ],
     fileId: formData.value.fileId,
-    imgPhotoFileId: formData.value.imgPhotoFileId,
+    imgLogoFileId: formData.value.imgLogoFileId,
     version: 'v1',
     account: formData.value.account,
     langName: