Просмотр исходного кода

feat: 新增翻译,新增应用,产品跳转,新增upload拼接token,本地新增换成token_a用于老A端获取数据,修复已知问题

lixuan недель назад: 3
Родитель
Сommit
94df95ad2c

+ 1 - 1
apps/web-velofex/.env.production

@@ -1,7 +1,7 @@
 VITE_BASE=./
 
 # 接口地址
-VITE_GLOB_API_URL=http://a.dev.jbpm.shalu.com
+VITE_GLOB_API_URL=https://design.shalu.com/
 
 # 是否开启压缩,可以设置为 none, brotli, gzip
 VITE_COMPRESS=none

+ 5 - 1
apps/web-velofex/src/components/login/login.vue

@@ -202,6 +202,7 @@ async function handleLoginSubmit() {
       });
       if (loginRes && loginRes.isSuccess) {
         if (loginRes.token) {
+          localStorage.setItem('token_a', loginRes.token);
           accessStore.setAccessToken(loginRes.token);
         }
         open.value = false;
@@ -343,7 +344,10 @@ defineExpose({
             src="@/assets/image/login-banner.png"
           />
         </div>
-        <div class="w-full px-[86px] py-[30px] sm:w-1/2">
+        <div
+          class="w-full px-[86px] py-[30px] sm:w-1/2"
+          @keydown.enter="handleLoginSubmit"
+        >
           <div v-if="!isRegister" class="mb-6">
             <h2 class="text-[21px] font-bold">{{ $t('auth.login') }}</h2>
             <p class="text-muted-foreground mt-3 text-sm">

+ 1 - 0
apps/web-velofex/src/layouts/header/header.vue

@@ -105,6 +105,7 @@ watch(
     <div class="flex gap-2">
       <SelectLang />
       <Dropdown
+        v-if="isLogin"
         :menu="{
           items: menuList,
         }"

Разница между файлами не показана из-за своего большого размера
+ 2 - 1
apps/web-velofex/src/locales/langs/en-US/page.json


+ 2 - 1
apps/web-velofex/src/locales/langs/zh-CN/page.json

@@ -199,7 +199,8 @@
       },
       "cancel": "取消",
       "save": "保存"
-    }
+    },
+    "productList": "本模块支持对系统内所有应用资源进行集中管理,可实现应用的创建、编辑、启用与停用;支持灵活配置权限、接口及运行参数。通过对应用状态的实时监控与调用日志的完整记录,保障系统稳定运行,协助管理员快速排查故障、优化配置,并对应用实施标准化全生命周期管理,有效提升运维效率与系统安全性。"
   },
   "salesPartners": {
     "breadcrumb": "首页 / 销售合作伙伴",

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

@@ -558,9 +558,9 @@ function resetFormData() {
               }}</label>
               <Upload
                 v-model:file-list="formData.fileList"
+                :action="`/fileApi/File/UploadFiles?Authorization=${token}`"
                 :headers="{ Authorization: String(token) }"
                 :max-count="1"
-                action="/fileApi/File/UploadFiles"
                 list-type="picture-card"
                 @change="handleLogoUpload"
               >

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

@@ -219,6 +219,10 @@ async function deleteApplication(item: any) {
   }
 }
 
+function handleClick(item: UserApi.ApplicationModel) {
+  window.open(`/jumpToEnterprise?enterpriseCode=${item.code}`, '_blank');
+}
+
 watch(
   () => isLogin.value,
   (newValue) => {
@@ -413,6 +417,7 @@ watch(
         v-for="item in applicationList"
         :key="item.id"
         class="flex h-[78px] cursor-pointer items-center rounded-[11px] bg-[#fff] px-[20px] shadow-md"
+        @click="handleClick(item)"
       >
         <img
           :src="`/File/Download?fileId=${item.imgLogoFileId}`"

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

@@ -69,6 +69,10 @@ function handleMore() {
   });
 }
 
+function handleClick(item: UserApi.ApplicationModel) {
+  window.open(`/jumpToEnterprise?enterpriseCode=${item.code}`, '_blank');
+}
+
 watch(
   () => isLogin.value,
   (newValue) => {
@@ -110,6 +114,7 @@ watch(
           v-for="(item, index) in applicationList"
           :key="index"
           class="flex h-[37px] cursor-pointer items-center rounded-[11px] bg-[#fff] p-[6px_10px] shadow-md"
+          @click="handleClick(item)"
         >
           <img
             :src="`/File/Download?fileId=${item.imgLogoFileId}`"

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

@@ -64,6 +64,10 @@ function handleMore() {
   });
 }
 
+function handleClick(item: UserApi.ApplicationModel) {
+  window.open(`/jumpToEnterprise?enterpriseCode=${item.code}`, '_blank');
+}
+
 watch(
   () => isLogin.value,
   (newValue) => {
@@ -80,21 +84,30 @@ watch(
     <h2 class="ml-[21px] mt-[21px] text-[18px] font-bold">
       {{ $t('homeModule.productList') }}
     </h2>
-    <div class="flex flex-wrap gap-[18px]">
+    <div v-if="isLogin" class="flex flex-wrap gap-[18px]">
+      <div v-if="applicationList.length > 0" class="flex flex-wrap gap-[18px]">
+        <div
+          v-for="(item, index) in applicationList"
+          :key="index"
+          class="mt-[24px] flex cursor-pointer items-center rounded-[30px] border border-gray-200 bg-white px-[24px] py-[7px] shadow-md"
+          @click="handleClick(item)"
+        >
+          <img
+            :src="`/File/Download?fileId=${item.imgLogoFileId}`"
+            class="h-[30px] w-auto object-contain"
+          />
+          <span
+            class="ml-[10px] font-['Open_Sans'] text-[13px] font-medium text-[#000]"
+          >
+            {{ item.name }}
+          </span>
+        </div>
+      </div>
       <div
-        v-for="(item, index) in applicationList"
-        :key="index"
-        class="mt-[24px] flex cursor-pointer items-center rounded-[30px] border border-gray-200 bg-white px-[24px] py-[7px] shadow-md"
+        v-else
+        class="mt-[24px] flex items-center justify-center text-xs text-[#9A9BA3]"
       >
-        <img
-          :src="`/File/Download?fileId=${item.imgLogoFileId}`"
-          class="h-[30px] w-auto object-contain"
-        />
-        <span
-          class="ml-[10px] font-['Open_Sans'] text-[13px] font-medium text-[#000]"
-        >
-          {{ item.name }}
-        </span>
+        {{ $t('auth.emptyContent') }}
       </div>
       <div
         class="mt-[24px] flex cursor-pointer items-center rounded-[30px] border border-gray-200 bg-white px-[24px] py-[7px] text-[#810041] shadow-md"
@@ -103,6 +116,9 @@ watch(
         {{ $t('btn.more') }} >
       </div>
     </div>
+    <div v-else class="mt-[24px] text-xs text-[#9A9BA3]">
+      {{ $t('applicationManagement.productList') }}
+    </div>
   </div>
 </template>
 

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

@@ -235,9 +235,9 @@ function handleCancel() {
               }}</label>
               <Upload
                 v-model:file-list="formData.fileList"
+                :action="`/fileApi/File/UploadFiles?Authorization=${token}`"
                 :headers="{ Authorization: String(token) }"
                 :max-count="1"
-                action="/fileApi/File/UploadFiles"
                 list-type="picture-card"
                 @change="handleLogoUpload"
               >