Selaa lähdekoodia

Merge branch 'dev' into dev_g

AmandaG 6 kuukautta sitten
vanhempi
commit
9fc0af9a6d

+ 2 - 1
src/auto-imports.d.ts

@@ -3,6 +3,7 @@
 // @ts-nocheck
 // noinspection JSUnusedGlobalSymbols
 // Generated by unplugin-auto-import
+// biome-ignore lint: disable
 export {}
 declare global {
   const $api: typeof import('@/api/index')['default']
@@ -68,6 +69,6 @@ declare global {
 // for type re-export
 declare global {
   // @ts-ignore
-  export type { Component, ComponentPublicInstance, ComputedRef, ExtractDefaultPropTypes, ExtractPropTypes, ExtractPublicPropTypes, InjectionKey, PropType, Ref, VNode, WritableComputedRef } from 'vue'
+  export type { Component, ComponentPublicInstance, ComputedRef, DirectiveBinding, ExtractDefaultPropTypes, ExtractPropTypes, ExtractPublicPropTypes, InjectionKey, PropType, Ref, MaybeRef, MaybeRefOrGetter, VNode, WritableComputedRef } from 'vue'
   import('vue')
 }

+ 13 - 7
src/components/AIRobot/src/AIRobot.vue

@@ -230,7 +230,9 @@ defineExpose({
         </span>
       </div>
     </div>
-    <div class="dialogue_title">Hi! I'm your Freight Assistant, always on call</div>
+    <div class="dialogue_title" style="margin-bottom: 0">
+      Hi! I'm your Freight Assistant, always on call
+    </div>
   </div>
   <!-- 悬浮icon -->
   <div class="AIRobot flex_center" v-if="AIIconVisible">
@@ -273,8 +275,8 @@ defineExpose({
 .AIRobot-top {
   position: absolute;
   z-index: 2013;
-  right: 50px;
-  bottom: 230px;
+  right: 35px;
+  bottom: 188px;
 }
 .dialogue_content_title {
   display: flex;
@@ -308,15 +310,19 @@ defineExpose({
   cursor: pointer;
 }
 .AIRobot {
-  width: 64px;
-  height: 64px;
+  width: 50px;
+  height: 50px;
   border-radius: 12px;
   background: var(--color-dialogue-icon-bg);
   position: absolute;
   box-shadow: -2px 2px 12px rgba(0, 0, 0, 15%);
   z-index: 2013;
-  right: 20px;
-  bottom: 164px;
+  right: 10px;
+  bottom: 130px;
+  img {
+    width: 36px;
+    height: 36px;
+  }
 }
 .AIRobot_dialog {
   background: var(--color-dialogue-text-bg);

+ 10 - 5
src/components/ScoringGrade/src/ScoringGrade.vue

@@ -405,19 +405,24 @@ onMounted(() => {
 </template>
 
 <style lang="scss">
-.scoring {
-  width: 64px;
-  height: 64px;
+div.scoring {
+  width: 50px;
+  height: 50px;
   border-radius: 12px;
   background-color: var(--management-bg-color);
   position: absolute;
   box-shadow: -2px 2px 12px rgba(0, 0, 0, 15%);
   z-index: 2013;
-  right: 20px;
-  bottom: 80px;
+  right: 10px;
+  bottom: 64px;
   display: flex;
   align-items: center;
   justify-content: center;
+  img {
+    width: 36px;
+    height: 36px;
+    margin: 3px 0 0 4px;
+  }
 }
 .el-avatar {
   background-color: var(--management-bg-color);

+ 9 - 6
src/views/AIRobotChat/src/AIRobotChat.vue

@@ -18,7 +18,11 @@ const md = new MarkdownIt({
 })
 
 const renderedMessage = (content) => {
-  return md.render(content)
+  const normalized = content
+    .replace(/\\n/g, '\n') // 粘贴带来的 \\n 处理
+    .replace(/\r\n/g, '\n') // Windows 换行标准化
+    .trim()
+  return md.render(normalized)
 }
 
 const themeStore = useThemeStore()
@@ -179,9 +183,7 @@ function scrollToBottom() {
 
 const simulateStreamingMarkdown = () => {
   loadingAnswer.value = true
-  const chunks: any = [
-    '以下是查询结果:\n\n1. **总HBOL数量**: 176\n\n2. **前10票HBOL信息**:\n\n| HBOL | MBOL | 运输方式 | 服务类型 | 发货人 | 收货人 | 数量 | 总重量 | 状态 | ETD | ETA |\n|------|------|---------|---------|-------|-------|-----|-------|------|-----|-----|\n| A1404390326 | UASUCNSHA344562 | sea | CY/CY | CHANGZHOU DAYA IMPORT & EXPORT CORP.LTD. | BEATRICE HOME FASHIONS INC | 1250 | 5625.000 | Created | 2014-05-02 | 2016-12-12 |\n| A1404390326 | UASUCNSHA344562 | sea | CY/CY | CHANGZHOU DAYA IMPORT & EXPORT CORP.LTD. | BEATRICE HOME FASHIONS INC | 1250 | 5625.000 | Created | 2014-05-02 | 2016-12-12 |\n| A1404390326 | UASUCNSHA344562 | sea | CY/CY | CHANGZHOU DAYA IMPORT & EXPORT CORP.LTD. | BEATRICE HOME FASHIONS INC | 1250 | 5625.000 | Created | 2014-05-02 | 2016-12-12 |\n| A1404390326 | UASUCNSHA344562 | sea | CY/CY | CHANGZHOU DAYA IMPORT & EXPORT CORP.LTD. | BEATRICE HOME FASHIONS INC | 1250 | 5625.000 | Created | 2014-05-02 | 2016-12-12 |\n| A1404390659 | UASUCNSHA344365 | sea | CY/CY | BC INDUSTRIES LIMITED | MORRIS ROTHENBERG AND SON INC | 563 | 7236.000 | Created | 2014-05-02 | 2016-12-12 |\n| A1404390659 | UASUCNSHA344365 | sea | CY/CY | BC INDUSTRIES LIMITED | MORRIS ROTHENBERG AND SON INC | 563 | 7236.000 | Created | 2014-05-02 | 2016-12-12 |\n| A1404390659 | UASUCNSHA344365 | sea | CY/CY | BC INDUSTRIES LIMITED | MORRIS ROTHENBERG AND SON INC | 563 | 7236.000 | Created | 2014-05-02 | 2016-12-12 |\n| A1404390659 | UASUCNSHA344365 | sea | CY/CY | BC INDUSTRIES LIMITED | MORRIS ROTHENBERG AND SON INC | 563 | 7236.000 | Created | 2014-05-02 | 2016-12-12 |\n| A1404390660 | UASUCNSHA344363 | sea | CY/CY | NANTONG YUANYANG LEISURE PRODUCTS CO.,LTD. | FACTORY DIRECT WHOLESALE,LLC | 730 | 13812.000 | Created | 2014-05-02 | 2016-12-12 |\n| A1404390660 | UASUCNSHA344363 | sea | CY/CY | NANTONG YUANYANG LEISURE PRODUCTS CO.,LTD. | FACTORY DIRECT WHOLESALE,LLC | 730 | 13812.000 | Created | 2014-05-02 | 2016-12-12 |\n'
-  ]
+  const chunks: any = [userQuestion.value]
 
   messages.value.push({
     type: 'robot',
@@ -207,6 +209,7 @@ const simulateStreamingMarkdown = () => {
       }
     } else {
       clearInterval(interval)
+      userQuestion.value = ''
     }
   }, 200) // 每500ms追加一段
 }
@@ -286,8 +289,8 @@ defineExpose({
           src="./image/icon_loading.png"
           alt=""
         />
-        <span v-if="!msg.isAnswer">{{ msg.content }}</span>
-        <div v-else>
+        <!-- <span v-if="!msg.isAnswer">{{ msg.content }}</span> -->
+        <div>
           <div v-html="renderedMessage(msg.content)" class="markdown-body"></div>
           <LoadingDots
             v-if="index === messages.length - 1 && msg.isAnswer && loadingAnswer"

+ 7 - 6
src/views/Tracking/src/components/PublicTracking/src/components/PublicTrackingDetail.vue

@@ -312,22 +312,23 @@ const openShareDialog = () => {
   }
   .share-link {
     position: fixed;
-    bottom: 152px;
-    right: 0px;
+    bottom: 130px;
+    right: 10px;
     display: flex;
     align-items: center;
     justify-content: center;
-    width: 64px;
-    height: 64px;
+    width: 50px;
+    height: 50px;
     z-index: 1500;
     background-color: var(--management-bg-color);
     box-shadow: -2px 2px 12px rgba(0, 0, 0, 0.15);
-    border-radius: 12px 0 0 12px;
+    border-radius: 12px;
     &:hover {
       background-color: var(--border-hover-color);
     }
     .share-icon {
-      font-size: 24px;
+      margin-top: 3px;
+      font-size: 28px;
     }
   }
 }

+ 6 - 5
src/views/Tracking/src/components/TrackingDetail/src/TrackingDetail.vue

@@ -497,13 +497,13 @@ const SubscribeShipments = () => {
   }
   .share-link {
     position: fixed;
-    bottom: 248px;
-    right: 20px;
+    bottom: 196px;
+    right: 10px;
     display: flex;
     align-items: center;
     justify-content: center;
-    width: 64px;
-    height: 64px;
+    width: 50px;
+    height: 50px;
     z-index: 1500;
     background-color: var(--management-bg-color);
     box-shadow: -2px 2px 12px rgba(0, 0, 0, 0.15);
@@ -512,7 +512,8 @@ const SubscribeShipments = () => {
       background-color: var(--border-hover-color);
     }
     .share-icon {
-      font-size: 24px;
+      margin-top: 3px;
+      font-size: 28px;
     }
   }
 }

+ 19 - 16
src/views/Tracking/src/components/TrackingTable/src/TrackingTable.vue

@@ -268,6 +268,13 @@ const trackingTable = ref<any>({
   headerRowStyle: {
     backgroundColor: 'var(--color-table-header-bg)'
   },
+  cellStyle: ({ column }) => {
+    if (column.title === 'Action' && themeStore.theme === 'dark') {
+      return {
+        backgroundColor: '#363940'
+      }
+    }
+  },
   menuConfig: {
     body: {
       options: [
@@ -617,6 +624,18 @@ defineExpose({
       </template>
       <!-- action操作的插槽 -->
       <template #action="{ row }">
+        <el-button class="recent_button el-button--blue" @click="SubscribeShipments(row)">
+          <span v-if="row.is_subscribe" style="color: 'red'" class="iconfont_icon">
+            <svg class="iconfont" aria-hidden="true" style="fill: var(--color-theme)">
+              <use xlink:href="#icon-icon_marked_b"></use>
+            </svg>
+          </span>
+          <span v-else class="iconfont_icon" style="color: 'red'">
+            <svg class="iconfont" aria-hidden="true" style="color: 'red'">
+              <use xlink:href="#icon-icon_unmark_b"></use>
+            </svg>
+          </span>
+        </el-button>
         <el-button
           v-if="row?.['Mode'] !== 'Air Freight' && canEdiVgm"
           @click="handleVGM(row)"
@@ -626,22 +645,6 @@ defineExpose({
           <span class="font_family icon-icon_vgm_b"></span>
           <span style="font-size: 12px">VGM</span>
         </el-button>
-        <el-button
-          class="recent_button el-button--blue"
-          @click="SubscribeShipments(row)"
-          :class="row.is_subscribe ? 'IsSubscribe' : ''"
-        >
-          <span v-if="row.is_subscribe" class="iconfont_icon">
-            <svg class="iconfont" aria-hidden="true">
-              <use xlink:href="#icon-icon_marked_b"></use>
-            </svg>
-          </span>
-          <span v-else class="iconfont_icon">
-            <svg class="iconfont" aria-hidden="true">
-              <use xlink:href="#icon-icon_unmark_b"></use>
-            </svg>
-          </span>
-        </el-button>
       </template>
       <!-- Transportation Mode字段的插槽 -->
       <template #mode="{ row, column }">