Procházet zdrojové kódy

feat: 调整菜单请求和时间的格式化

Jack Zhou před 1 měsícem
rodič
revize
fbbe7c1bf3

+ 4 - 4
src/components/AIRobot/src/AIRobot.vue

@@ -34,10 +34,10 @@ const AvatarMouseLeave = () => {
     AIRobotHoverVisible.value = false
   }
 }
-const emit = defineEmits(['AvatarClick', 'handelClickAIDefault','handelclickaiinit'])
+const emit = defineEmits(['AvatarClick', 'handelClickAIDefault', 'handelclickaiinit'])
 // 点击AIRobot图标
 const AvatarClick = () => {
-  if(clicked.value == false) {
+  if (clicked.value == false) {
     emit('handelclickaiinit')
   }
   clicked.value = true
@@ -126,7 +126,7 @@ const handelClick = (item: any) => {
 }
 
 onMounted(() => {
-  if(localStorage.getItem('userInfo') != null) {
+  if (localStorage.getItem('userInfo') != null) {
     AIIconVisible.value = true
   }
   emitter.on('login-success', isShowLogin)
@@ -158,7 +158,7 @@ defineExpose({
       <div class="dialogue_title">Hi! I'm your Freight Assistant, always on call</div>
     </div>
     <div class="flex_end">
-      <div class="dialogue_content"  style="box-shadow: -10px 10px 24px rgba(58, 0, 78, 0.15);">
+      <div class="dialogue_content" style="box-shadow: -10px 10px 24px rgba(58, 0, 78, 0.15)">
         <div class="dialogue_content_title">
           <div class="dialogue_title_left">
             <img src="../image/icon_faq_b@2x.png" width="24px" />

+ 8 - 2
src/router/index.ts

@@ -190,7 +190,10 @@ const router = createRouter({
         {
           path: '/destination-delivery/ConfiguRations',
           name: 'Configurations',
-          component: () => import('../views/DestinationDelivery/src/components/ConfiguRations')
+          component: () => import('../views/DestinationDelivery/src/components/ConfiguRations'),
+          meta: {
+            activeMenu: '/destination-delivery'
+          }
         },
         {
           path: '/destination-delivery/ConfiguRations/CreateNewRule',
@@ -198,7 +201,10 @@ const router = createRouter({
           component: () =>
             import(
               '../views/DestinationDelivery/src/components/ConfiguRations/src/components/CreateNewRule.vue'
-            )
+            ),
+          meta: {
+            activeMenu: '/destination-delivery'
+          }
         },
         {
           path: '/destination-delivery/modify-booking',

+ 1 - 2
src/views/AIRobotChat/src/AIRobotChat.vue

@@ -335,7 +335,7 @@ const handleLiabilityExeDialog = () => {
 }
 
 const handelclckaiinit = () => {
-  AIQuestion.value.AIRobotInit() 
+  AIQuestion.value.AIRobotInit()
 }
 
 defineExpose({
@@ -344,7 +344,6 @@ defineExpose({
   clearData,
   handelclckaiinit
 })
-
 </script>
 
 <template>

+ 5 - 1
src/views/Layout/src/LayoutView.vue

@@ -91,7 +91,11 @@ onMounted(() => {
         <router-view />
       </el-main>
     </el-container>
-    <AIRobot @AvatarClick="AvatarClick" @handelClickAIDefault="handelClickAIDefault" @handelclickaiinit=handelclickaiinit></AIRobot>
+    <AIRobot
+      @AvatarClick="AvatarClick"
+      @handelClickAIDefault="handelClickAIDefault"
+      @handelclickaiinit="handelclickaiinit"
+    ></AIRobot>
     <AIRobotChat
       ref="AIRobotChatref"
       v-show="isShowAIRobotChat"

+ 7 - 7
src/views/Layout/src/components/Menu/MenuView.vue

@@ -11,12 +11,12 @@ const userStore = useUserStore()
 const isCollapse = defineModel<boolean>()
 
 const menuList = ref()
-// watch(
-//   () => userStore.userInfo?.uname,
-//   () => {
-//     getMenuList()
-//   }
-// )
+watch(
+  () => userStore.userInfo?.uname,
+  () => {
+    getMenuList()
+  }
+)
 const getMenuList = () => {
   $api.getMenuList().then((res) => {
     if (res.code === 200) {
@@ -164,7 +164,7 @@ const changeRouter = (path: any) => {
     emitter.emit('login-success')
   }
   if (path == '/PromptConfiguration' || path == '/report') {
-    emitter.emit('checkPrompt')
+    // emitter.emit('checkPrompt')
   } else {
     if (localStorage.getItem('loginAI')) {
       localStorage.removeItem('loginAI')

+ 1 - 1
src/views/TemplateManagement/src/components/TableView/src/TableView.vue

@@ -88,7 +88,7 @@ const handleColumns = (columns: any) => {
       curColumn = {
         ...curColumn,
         formatter: ({ cellValue }: any) =>
-          dayjs.tz(cellValue, 'US/Pacific').format(formatString.value + ' HH:mm:ss ')
+          (dayjs as any).tz(cellValue, 'US/Pacific').format(formatString.value + ' HH:mm')
       }
     }
     return curColumn