Sfoglia il codice sorgente

Merge branch 'dev_zyh' of United_Software/k_online_ui into dev

Jack Zhou 2 mesi fa
parent
commit
f486d0382a

+ 1 - 1
.env.development

@@ -1,2 +1,2 @@
-VITE_API_HOST = 'http://192.168.0.161/Customer_Service_Online'
+VITE_API_HOST = 'http://192.168.14.224/Customer_Service_Online'
 VITE_BASE_URL = '/k_new_online/'

+ 16 - 0
src/api/module/login.ts

@@ -91,6 +91,22 @@ export const changePassword = (params: any, config: any) => {
   )
 }
 
+/**
+ * 重置和激活密码
+ */
+export const resetAndActivatePassword = (params: any, config: any) => {
+  return HttpAxios.post(
+    `${baseUrl}`,
+    {
+      action: 'login',
+      operate: 'resetAndActivateUpdate',
+      ...params
+    },
+    config
+  )
+}
+
+
 /**
  * 获取public tracking detail详情数据
  */

+ 4 - 0
src/styles/theme.scss

@@ -352,6 +352,8 @@
   --color--process-data-tips-bg: #e8ebef;
 
   --color-ant-picker-th: #b5b9bf;
+
+  --color-json-item-hover: #e6f7ff;
 }
 
 :root.dark {
@@ -577,5 +579,7 @@
   --color--process-data-tips-bg: #4f5760;
   
   --color-ant-picker-th: rgba(240, 241, 243,0.3);
+
+  --color-json-item-hover: #3e5966;
 }
   

+ 3 - 0
src/views/AIApiLog/src/components/LogDialog.vue

@@ -87,5 +87,8 @@ defineExpose({
   .el-dialog__body {
     padding: 0;
   }
+  .vjs-tree-node:hover {
+    background-color: var(--color-json-item-hover);
+  }
 }
 </style>

+ 4 - 0
src/views/Booking/src/components/BookingDetail/src/components/EmailView.vue

@@ -137,6 +137,10 @@ const handleFocusEditor = () => {
 const sendEmail = () => {
   const html = editorRef.value.getHtml()
   const text = editorRef.value.getText()
+  if (!text) {
+    ElMessage.warning('Please enter the email content')
+    return
+  }
   $api
     .sendEmailApi({
       action: 'ocean_booking',

File diff suppressed because it is too large
+ 390 - 255
src/views/DestinationDelivery/src/components/CreateNewBooking/src/CreateNewbooking.vue


+ 4 - 0
src/views/DestinationDelivery/src/components/TableView/src/components/EmailDialog.vue

@@ -151,6 +151,10 @@ const handleFocusEditor = () => {
 const sendEmail = () => {
   const html = editorRef.value.getHtml()
   const text = editorRef.value.getText()
+  if (!text) {
+    ElMessage.warning('Please enter the email content')
+    return
+  }
   $api
     .saveDliveryBookingEmail({
       email: emailData.value.email,

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

@@ -18,82 +18,82 @@ watch(
   }
 )
 const getMenuList = () => {
-  // $api.getMenuList().then((res) => {
-  //   if (res.code === 200) {
-  //     menuList.value = res.data
-  //   }
-  // })
-  menuList.value = [
-    {
-      index: '1',
-      label: 'Dashboard',
-      icon: 'icon_data_fill_b',
-      path: '/dashboard'
-    },
-    {
-      index: '2',
-      label: 'Booking',
-      icon: 'icon_booking__fill_b',
-      // path: '/booking',
-      type: 'list',
-      children: [
-        {
-          index: '2-1',
-          label: 'Booking Management',
-          path: '/booking'
-        },
-        {
-          index: '2-2',
-          label: 'Destination Delivery',
-          path: '/destination-delivery'
-        }
-      ]
-    },
-    {
-      index: '3',
-      label: 'Tracking',
-      icon: 'icon_tracking__fill_b',
-      path: '/tracking'
-    },
-    {
-      index: '4',
-      label: 'System Management',
-      icon: 'icon_system__management_fill_b',
-      type: 'list',
-      children: [
-        {
-          index: '4-1',
-          label: 'System Message',
-          path: '/system-message'
-        },
-        {
-          index: '4-2',
-          label: 'System Settings',
-          path: '/SystemSettings'
-        },
-        {
-          index: '4-3',
-          label: 'Chat Log',
-          path: '/chat-log'
-        },
-        {
-          index: '4-4',
-          label: 'AI API Log',
-          path: '/ai-api-log'
-        },
-        {
-          index: '4-5',
-          label: 'Operation Log',
-          path: '/Operationlog'
-        },
-        {
-          index: '4-6',
-          label: 'Prompt Configuration',
-          path: '/PromptConfiguration'
-        }
-      ]
+  $api.getMenuList().then((res) => {
+    if (res.code === 200) {
+      menuList.value = res.data
     }
-  ]
+  })
+  // menuList.value = [
+  //   {
+  //     index: '1',
+  //     label: 'Dashboard',
+  //     icon: 'icon_data_fill_b',
+  //     path: '/dashboard'
+  //   },
+  //   {
+  //     index: '2',
+  //     label: 'Booking',
+  //     icon: 'icon_booking__fill_b',
+  //     // path: '/booking',
+  //     type: 'list',
+  //     children: [
+  //       {
+  //         index: '2-1',
+  //         label: 'Booking Management',
+  //         path: '/booking'
+  //       },
+  //       {
+  //         index: '2-2',
+  //         label: 'Destination Delivery',
+  //         path: '/destination-delivery'
+  //       }
+  //     ]
+  //   },
+  //   {
+  //     index: '3',
+  //     label: 'Tracking',
+  //     icon: 'icon_tracking__fill_b',
+  //     path: '/tracking'
+  //   },
+  //   {
+  //     index: '4',
+  //     label: 'System Management',
+  //     icon: 'icon_system__management_fill_b',
+  //     type: 'list',
+  //     children: [
+  //       {
+  //         index: '4-1',
+  //         label: 'System Message',
+  //         path: '/system-message'
+  //       },
+  //       {
+  //         index: '4-2',
+  //         label: 'System Settings',
+  //         path: '/SystemSettings'
+  //       },
+  //       {
+  //         index: '4-3',
+  //         label: 'Chat Log',
+  //         path: '/chat-log'
+  //       },
+  //       {
+  //         index: '4-4',
+  //         label: 'AI API Log',
+  //         path: '/ai-api-log'
+  //       },
+  //       {
+  //         index: '4-5',
+  //         label: 'Operation Log',
+  //         path: '/Operationlog'
+  //       },
+  //       {
+  //         index: '4-6',
+  //         label: 'Prompt Configuration',
+  //         path: '/PromptConfiguration'
+  //       }
+  //     ]
+  //   }
+  // ]
 }
 getMenuList()
 //监听窗口大小

+ 12 - 23
src/views/Login/src/components/SetPasswordDialog.vue

@@ -1,4 +1,7 @@
 <script setup lang="ts">
+import { useRoute } from 'vue-router'
+
+const route = useRoute()
 const dialogModel = ref(false)
 const state = ref<'reset' | 'activate'>('activate')
 
@@ -9,14 +12,12 @@ const openDialog = (stateValue: 'reset' | 'activate') => {
 
 const loginForm = ref({
   username: '',
-  oldPassword: '',
   newPassword: '',
   confirmPassword: ''
 })
 
 const newPwdErrTips = ref('')
 const loginError: any = ref({
-  oldPassword: false,
   newPassword: false,
   confirmPassword: false
 })
@@ -49,29 +50,17 @@ const handleChangePwd = () => {
     return
   }
   $api
-    .resetPwd({
-      uname: loginForm.value.username,
-      old_password: loginForm.value.oldPassword,
+    .resetAndActivatePassword({
+      verifcation_code: route.query.verifcation_code,
       password: loginForm.value.newPassword
     })
     .then((res: any) => {
-      emit('submit')
-      dialogModel.value = false
-      // if (res.code === 200) {
-      //   router.push({
-      //     name: 'Login',
-      //     query: {
-      //       isChange: 'true'
-      //     }
-      //   })
-      // } else if (res.code === 400) {
-      //   if (res.msg === 'Old password is incorrect') {
-      //     loginError.value.oldPassword = true
-      //   } else {
-      //     loginError.value.newPassword = true
-      //     newPwdErrTips.value = res.msg
-      //   }
-      // }
+      if (res.code === 200) {
+        emit('submit')
+        dialogModel.value = false
+      } else if (res.code !== 500 && res.code !== 200 && res.code) {
+        ElMessage.error('Error! Please try again later.')
+      }
     })
 }
 
@@ -113,7 +102,7 @@ defineExpose({
       <div class="top-section">
         <div class="title">Set Your Password</div>
         <div class="description">
-          Hello Caroline, please create a new password for your account.
+          Hello {{ route.query.name }}, please create a new password for your account.
         </div>
       </div>
       <div class="login-form">

+ 4 - 0
src/views/Tracking/src/components/TrackingDetail/src/components/EmailDrawer.vue

@@ -138,6 +138,10 @@ const emit = defineEmits<{
 const sendEmail = () => {
   const html = editorRef.value.getHtml()
   const text = editorRef.value.getText()
+  if (!text) {
+    ElMessage.warning('Please enter the email content')
+    return
+  }
   $api
     .sendEmailApi({
       action: 'ocean_order',

+ 1 - 1
vite.config.ts

@@ -56,7 +56,7 @@ export default defineConfig(({ mode }) => {
       // 设置 https 代理
       proxy: {
         '/api': {
-          target: 'http://192.168.0.161',
+          target: 'http://192.168.14.224',
           changeOrigin: true,
           rewrite: (path: string) => path.replace(/^\/api/, '')
         }

Some files were not shown because too many files changed in this diff