Преглед изворни кода

Merge branch 'master_zyh' into test_zyh

Jack Zhou пре 3 месеци
родитељ
комит
94344686c5
18 измењених фајлова са 319 додато и 46 уклоњено
  1. 4 0
      src/styles/vxeTable.scss
  2. 6 0
      src/views/AIApiLog/src/components/TableView/src/TableView.vue
  3. 7 1
      src/views/Booking/src/components/BookingDetail/src/components/AddReferenceDialog.vue
  4. 6 0
      src/views/Booking/src/components/BookingDetail/src/components/ContainersView.vue
  5. 6 0
      src/views/Booking/src/components/BookingTable/src/BookingTable.vue
  6. 7 1
      src/views/ChatLog/src/components/TableView/src/TableView.vue
  7. 8 5
      src/views/Layout/src/components/Menu/MenuView.vue
  8. 6 0
      src/views/OperationLog/src/components/BookingTable/src/BookingTable.vue
  9. 9 6
      src/views/SystemSettings/src/components/MonitoringTable/src/MonitoringTable.vue
  10. 9 6
      src/views/SystemSettings/src/components/SettingTable/src/SettingTable.vue
  11. 6 0
      src/views/Tracking/src/components/PublicTracking/src/components/MilestonesTable.vue
  12. 12 0
      src/views/Tracking/src/components/TrackingDetail/src/components/AMS&ISF.vue
  13. 7 1
      src/views/Tracking/src/components/TrackingDetail/src/components/AddReferenceDialog.vue
  14. 7 0
      src/views/Tracking/src/components/TrackingDetail/src/components/AttachmentView.vue
  15. 177 5
      src/views/Tracking/src/components/TrackingDetail/src/components/ContainersView.vue
  16. 6 0
      src/views/Tracking/src/components/TrackingDetail/src/components/MilestonesTable.vue
  17. 30 21
      src/views/Tracking/src/components/TrackingTable/src/TrackingTable.vue
  18. 6 0
      src/views/Tracking/src/components/TrackingTable/src/components/VGMView.vue

+ 4 - 0
src/styles/vxeTable.scss

@@ -38,6 +38,10 @@
   }
 }
 
+.vxe-table--body-inner-wrapper {
+  min-height: 40px !important;
+}
+
 .vxe-table--render-default .vxe-body--column.col--ellipsis,
 .vxe-table--render-default .vxe-footer--column.col--ellipsis,
 .vxe-table--render-default .vxe-header--column.col--ellipsis,

+ 6 - 0
src/views/AIApiLog/src/components/TableView/src/TableView.vue

@@ -166,6 +166,12 @@ const tableData = ref<VxeGridProps<any>>({
   headerRowStyle: {
     backgroundColor: 'var(--color-table-header-bg)'
   },
+  cellConfig: {
+    height: 40
+  },
+  headerCellConfig: {
+    height: 40
+  },
   sortConfig: {
     sortMethod: (params) => {
       const { data, sortList } = params

+ 7 - 1
src/views/Booking/src/components/BookingDetail/src/components/AddReferenceDialog.vue

@@ -39,10 +39,16 @@ const tableData = ref<VxeGridProps<any>>({
     {
       title: 'Action',
       width: 90,
-      fixed: 'right',
+      fixed: 'left',
       slots: { default: 'action' }
     }
   ],
+  cellConfig: {
+    height: 40
+  },
+  headerCellConfig: {
+    height: 40
+  },
   data: [],
   scrollY: { enabled: true, oSize: 20, gt: 30 },
   emptyText: ' ',

+ 6 - 0
src/views/Booking/src/components/BookingDetail/src/components/ContainersView.vue

@@ -14,6 +14,12 @@ const tableData = ref<VxeGridProps<any>>({
   round: true,
   columns: [],
   data: [],
+  cellConfig: {
+    height: 40
+  },
+  headerCellConfig: {
+    height: 40
+  },
   scrollY: { enabled: true, oSize: 20, gt: 30 },
   emptyText: ' ',
   showHeaderOverflow: true,

+ 6 - 0
src/views/Booking/src/components/BookingTable/src/BookingTable.vue

@@ -200,6 +200,12 @@ const bookingTable = ref<VxeGridProps<any>>({
   headerRowStyle: {
     backgroundColor: 'var(--color-table-header-bg)'
   },
+  cellConfig: {
+    height: 40
+  },
+  headerCellConfig: {
+    height: 40
+  },
   menuConfig: {
     body: {
       options: [

+ 7 - 1
src/views/ChatLog/src/components/TableView/src/TableView.vue

@@ -68,7 +68,7 @@ const getTableColumns = async () => {
       tableData.value.columns = [
         { type: 'checkbox', width: 50, fixed: 'left' },
         ...handleColumns(res.data.OperationTableColumns),
-        { title: 'Action', width: 106, fixed: 'right', slots: { default: 'action' } }
+        { title: 'Action', width: 106, fixed: 'left', slots: { default: 'action' } }
       ]
       tableOriginColumnsField.value = res.data.OperationTableColumns
     }
@@ -168,6 +168,12 @@ const tableData = ref<VxeGridProps<any>>({
   headerRowStyle: {
     backgroundColor: 'var(--color-table-header-bg)'
   },
+  cellConfig: {
+    height: 40
+  },
+  headerCellConfig: {
+    height: 40
+  },
   sortConfig: {
     sortMethod: (params) => {
       const { data, sortList } = params

+ 8 - 5
src/views/Layout/src/components/Menu/MenuView.vue

@@ -77,10 +77,17 @@ router.afterEach(() => {
 
 // 路由跳转函数
 const changeRouter = (path: any) => {
+  if (localStorage.getItem('loginAI')) {
+    localStorage.removeItem('loginAI')
+    emitter.emit('login-success')
+  }
   if (path == '/PromptConfiguration') {
     emitter.emit('checkPrompt')
   } else {
-    emitter.emit('checknoPrompt')
+    if (localStorage.getItem('loginAI')) {
+      localStorage.removeItem('loginAI')
+      emitter.emit('checknoPrompt')
+    }
   }
   if (sessionStorage.getItem('searchTableQeury')) {
     sessionStorage.removeItem('searchTableQeury')
@@ -95,10 +102,6 @@ const changeRouter = (path: any) => {
   }
   sessionStorage.removeItem('trackingTablePageInfo')
   sessionStorage.removeItem('bookingTablePageInfo')
-  if (localStorage.getItem('loginAI')) {
-    localStorage.removeItem('loginAI')
-    emitter.emit('login-success')
-  }
   let toPath = path
   if (path === '/tracking' && !userStore.userInfo?.uname) {
     toPath = '/public-tracking'

+ 6 - 0
src/views/OperationLog/src/components/BookingTable/src/BookingTable.vue

@@ -165,6 +165,12 @@ const bookingTable = ref<VxeGridProps<any>>({
   emptyText: ' ',
   showHeaderOverflow: true,
   showOverflow: true,
+  cellConfig: {
+    height: 40
+  },
+  headerCellConfig: {
+    height: 40
+  },
   headerRowStyle: {
     backgroundColor: 'var(--color-table-header-bg)'
   },

+ 9 - 6
src/views/SystemSettings/src/components/MonitoringTable/src/MonitoringTable.vue

@@ -49,6 +49,12 @@ const tableData = ref<VxeGridProps<any>>({
   maxHeight: 660,
   columns: [],
   data: [],
+  cellConfig: {
+    height: 40
+  },
+  headerCellConfig: {
+    height: 40
+  },
   scrollY: { enabled: true, oSize: 20, gt: 30 },
   stripe: true,
   emptyText: ' ',
@@ -76,7 +82,7 @@ const handleColumns = (columns: any) => {
         ...curColumn,
         formatter: ({ cellValue }: any) => formatTimezone(cellValue)
       }
-    }  else if (item.type === 'link') {
+    } else if (item.type === 'link') {
       curColumn = {
         ...curColumn,
         slots: { default: 'trackingNo' }
@@ -91,7 +97,7 @@ const getTableColumns = async () => {
   tableData.value.columns = handleColumns(columnstest.value)
   tableData.value.columns?.push({
     title: 'Operation',
-    fixed: 'right',
+    fixed: 'left',
     width: 100,
     slots: { default: 'action' }
   })
@@ -196,10 +202,7 @@ onMounted(() => {
       </template>
       <!-- Tracking No字段的插槽 -->
       <template #trackingNo="{ row, column }">
-        <span
-          style="color: var(--color-theme); cursor: pointer"
-          @click="handleedittow(row)"
-        >
+        <span style="color: var(--color-theme); cursor: pointer" @click="handleedittow(row)">
           {{ row[column.field] }}
         </span>
       </template>

+ 9 - 6
src/views/SystemSettings/src/components/SettingTable/src/SettingTable.vue

@@ -28,6 +28,12 @@ const tableData = ref<VxeGridProps<any>>({
   maxHeight: 500,
   columns: [],
   data: [],
+  cellConfig: {
+    height: 40
+  },
+  headerCellConfig: {
+    height: 40
+  },
   scrollY: { enabled: true, oSize: 20, gt: 30 },
   stripe: true,
   emptyText: ' ',
@@ -55,7 +61,7 @@ const handleColumns = (columns: any) => {
         ...curColumn,
         formatter: ({ cellValue }: any) => formatTimezone(cellValue)
       }
-    }  else if (item.type === 'link') {
+    } else if (item.type === 'link') {
       curColumn = {
         ...curColumn,
         slots: { default: 'trackingNo' }
@@ -71,7 +77,7 @@ const getTableColumns = async () => {
   if (props.propsType) {
     tableData.value.columns?.push({
       title: 'Action',
-      fixed: 'right',
+      fixed: 'left',
       width: 80,
       slots: { default: 'action' }
     })
@@ -152,10 +158,7 @@ const getpaginationTableData = () => {
       </template>
       <!-- Tracking No字段的插槽 -->
       <template #trackingNo="{ row, column }">
-        <span
-          style="color: var(--color-theme); cursor: pointer"
-          @click="handleLinkClick(row)"
-        >
+        <span style="color: var(--color-theme); cursor: pointer" @click="handleLinkClick(row)">
           {{ row[column.field] }}
         </span>
       </template>

+ 6 - 0
src/views/Tracking/src/components/PublicTracking/src/components/MilestonesTable.vue

@@ -24,6 +24,12 @@ const tableData = ref<VxeGridProps<any>>({
   headerRowStyle: {
     backgroundColor: 'var(--color-table-header-bg)'
   },
+  cellConfig: {
+    height: 40
+  },
+  headerCellConfig: {
+    height: 40
+  },
   columnConfig: { resizable: true, useKey: true },
   rowConfig: { isHover: true }
 })

+ 12 - 0
src/views/Tracking/src/components/TrackingDetail/src/components/AMS&ISF.vue

@@ -74,6 +74,12 @@ const AMSTableData = ref<VxeGridProps<any>>({
   data: [],
   scrollY: { enabled: true, oSize: 20, gt: 30 },
   emptyText: ' ',
+  cellConfig: {
+    height: 40
+  },
+  headerCellConfig: {
+    height: 40
+  },
   showHeaderOverflow: true,
   showOverflow: true,
   headerRowStyle: {
@@ -103,6 +109,12 @@ const ISFTableData = ref<VxeGridProps<any>>({
   maxHeight: 500,
   columns: [],
   data: [],
+  cellConfig: {
+    height: 40
+  },
+  headerCellConfig: {
+    height: 40
+  },
   scrollY: { enabled: true, oSize: 20, gt: 30 },
   emptyText: ' ',
   showHeaderOverflow: true,

+ 7 - 1
src/views/Tracking/src/components/TrackingDetail/src/components/AddReferenceDialog.vue

@@ -39,11 +39,17 @@ const tableData = ref<VxeGridProps<any>>({
     {
       title: 'Action',
       width: 90,
-      fixed: 'right',
+      fixed: 'left',
       slots: { default: 'action' }
     }
   ],
   data: [],
+  cellConfig: {
+    height: 40
+  },
+  headerCellConfig: {
+    height: 40
+  },
   scrollY: { enabled: true, oSize: 20, gt: 30 },
   emptyText: ' ',
   showHeaderOverflow: true,

+ 7 - 0
src/views/Tracking/src/components/TrackingDetail/src/components/AttachmentView.vue

@@ -14,6 +14,12 @@ const tableData = ref<VxeGridProps<any>>({
   round: true,
   columns: [],
   data: [],
+  cellConfig: {
+    height: 40
+  },
+  headerCellConfig: {
+    height: 40
+  },
   scrollY: { enabled: true, oSize: 20, gt: 30 },
   emptyText: ' ',
   showHeaderOverflow: true,
@@ -54,6 +60,7 @@ watch(
         {
           title: 'Action',
           width: 90,
+          fixed: 'left',
           slots: { default: 'action' }
         }
       ]

+ 177 - 5
src/views/Tracking/src/components/TrackingDetail/src/components/ContainersView.vue

@@ -14,6 +14,16 @@ const tableData = ref<VxeGridProps<any>>({
   round: true,
   columns: [],
   data: [],
+  cellConfig: {
+    height: 40
+  },
+  headerCellConfig: {
+    height: 40
+  },
+  expandConfig: {
+    expandAll: false,
+    expandRowKeys: []
+  },
   scrollY: { enabled: true, oSize: 20, gt: 30 },
   emptyText: ' ',
   showHeaderOverflow: true,
@@ -48,7 +58,10 @@ const handleColumns = (columns: any) => {
     }
     return curColumn
   })
-  return newColumns
+  return [
+    { type: 'expand', width: 40, slots: { default: 'expand', content: 'expand_content' } },
+    ...newColumns
+  ]
 }
 watch(
   () => props.data,
@@ -57,9 +70,17 @@ watch(
     if (containers && containers.container_column) {
       tableData.value.columns = handleColumns(containers.container_column)
       tableData.value.data = containers.container_data
-      // nextTick(() => {
-      //   tableRef.value && autoWidth(tableData.value, tableRef.value)
-      // })
+      tableRef.value?.reloadData(containers.container_data)
+      setTimeout(() => {
+        // tableRef.value && autoWidth(tableData.value, tableRef.value)
+        tableRef.value?.reloadData(containers.container_data)
+        if (
+          tableData.value.data?.length > 0 ||
+          tableData.value.data[0].containerStatusData.length > 0
+        ) {
+          tableRef.value?.toggleRowExpand(tableData.value.data[0])
+        }
+      }, 100)
     }
   },
   {
@@ -75,6 +96,30 @@ useRowClickStyle(tableRef)
 <template>
   <div class="containers">
     <vxe-grid ref="tableRef" v-bind="tableData">
+      <template #expand_content="{ row }">
+        <div class="container-table-status">
+          <div class="step-item" v-for="(item, index) in row.containerStatusData" :key="item.title">
+            <div class="step-data">
+              <div class="step-dot-icon"></div>
+              <div class="info">
+                <div class="left-info">
+                  <div class="title">{{ item.title }}</div>
+                  <div class="date value-color">{{ formatTimezone(item.date, item.timezone) }}</div>
+                </div>
+                <div class="center-code">
+                  <span>Location Code: </span>
+                  <span class="value-color">{{ item.code }}</span>
+                </div>
+                <div class="right-city">
+                  <span>Location City: </span>
+                  <span class="value-color">{{ item.uncity }}</span>
+                </div>
+              </div>
+            </div>
+            <div class="line" v-if="index + 1 !== row.containerStatusData.length"></div>
+          </div>
+        </div>
+      </template>
       <template #empty>
         <div class="empty">No data</div>
       </template>
@@ -87,4 +132,131 @@ useRowClickStyle(tableRef)
   padding: 8px 16px 16px;
 }
 </style>
-<style lang="scss"></style>
+<style lang="scss" scoped>
+.container-table-status {
+  position: relative;
+  display: flex;
+  flex-direction: column;
+  width: 100%;
+  overflow: auto;
+  .container {
+    flex: 1;
+    padding-bottom: 8px;
+    overflow: auto;
+  }
+  .empty-content {
+    display: flex;
+    flex-direction: column;
+    align-items: center;
+    height: 358px;
+    padding-top: 140px;
+
+    .empty-text {
+      margin-top: 8px;
+      color: #b5b9bf;
+    }
+  }
+  .footer {
+    // line-height: 38px;
+    padding: 12px 0;
+    color: #999;
+    font-size: 12px;
+    text-align: center;
+    border-top: 1px solid var(--color-border);
+    overflow: hidden;
+    .link {
+      text-decoration: none;
+      color: var(--color-theme);
+    }
+  }
+}
+</style>
+<style lang="scss">
+.vxe-body--row-expanded-cell {
+  // height: 100%;
+}
+.container-table-status {
+  max-height: 300px;
+  padding: 40px 20px;
+  overflow: auto;
+  box-sizing: border-box;
+  .el-collapse {
+    height: auto;
+    border-bottom: 0;
+  }
+  .el-collapse-item__content {
+    padding: 30px 16px 38px;
+    border-top: 1px solid var(--color-border);
+  }
+  .el-collapse-item__header {
+    height: 40px;
+    padding-left: 16px;
+    padding-right: 8px;
+    line-height: 50px;
+    & > .title {
+      font-size: 16px;
+      color: var(--color-neutral-2);
+      span {
+        margin-left: 4px;
+        font-weight: 700;
+        color: var(--color-neutral-1);
+      }
+    }
+  }
+  .step-data {
+    display: flex;
+    gap: 8px;
+    height: 8px;
+    width: 100%;
+    .step-dot-icon {
+      height: 8px;
+      width: 8px;
+      background-color: var(--color-neutral-1);
+      border-radius: 50%;
+    }
+    .info {
+      flex: 1;
+      display: flex;
+      height: 57px;
+      margin-top: -22px;
+      background-color: var(--color-container-status-node-bg);
+      border: 1px solid var(--color-border);
+      border-radius: 6px;
+      color: var(--color-neutral-1);
+      .left-info {
+        flex: 1;
+        display: flex;
+        flex-direction: column;
+        justify-content: space-between;
+        max-width: 320px;
+        padding: 10px 10px;
+        .title {
+          font-size: 14px;
+          line-height: 18px;
+          font-weight: 700;
+        }
+        .date {
+          font-size: 12px;
+        }
+      }
+      .center-code {
+        width: 320px;
+        line-height: 57px;
+      }
+      .right-city {
+        width: 320px;
+        line-height: 57px;
+      }
+      .value-color {
+        color: var(--color-neutral-2);
+      }
+    }
+  }
+  .line {
+    height: 60px;
+    width: 0;
+    margin-left: 3px;
+    border-left: 1px solid var(--color-neutral-1);
+  }
+}
+</style>

+ 6 - 0
src/views/Tracking/src/components/TrackingDetail/src/components/MilestonesTable.vue

@@ -22,6 +22,12 @@ const tableData = ref<VxeGridProps<any>>({
   headerRowStyle: {
     backgroundColor: 'var(--color-table-header-bg)'
   },
+  cellConfig: {
+    height: 40
+  },
+  headerCellConfig: {
+    height: 40
+  },
   columnConfig: { resizable: true, useKey: true },
   rowConfig: { isHover: true }
 })

+ 30 - 21
src/views/Tracking/src/components/TrackingTable/src/TrackingTable.vue

@@ -92,7 +92,7 @@ const getTableColumns = async () => {
       if (index !== -1) {
         trackingTable.value.columns.push({
           title: 'Action',
-          fixed: 'right',
+          fixed: 'left',
           width: 120,
           slots: { default: 'action' }
         })
@@ -136,7 +136,7 @@ const assignTableData = (data: any) => {
     if (index === -1) {
       trackingTable.value.columns.push({
         title: 'Action',
-        fixed: 'right',
+        fixed: 'left',
         width: 120,
         slots: { default: 'action' }
       })
@@ -266,6 +266,12 @@ const trackingTable = ref<any>({
   border: true,
   round: true,
   columns: [],
+  cellConfig: {
+    height: 40
+  },
+  headerCellConfig: {
+    height: 40
+  },
   data: [],
   scrollY: { enabled: true, oSize: 20, gt: 20, scrollToTopOnChange: true },
   scrollX: { enabled: true, gt: 2, scrollToLeftOnChange: true },
@@ -275,13 +281,13 @@ const trackingTable = ref<any>({
   headerRowStyle: {
     backgroundColor: 'var(--color-table-header-bg)'
   },
-  cellStyle: ({ column }) => {
-    if (column.title === 'Action' && themeStore.theme === 'dark') {
-      return {
-        backgroundColor: '#363940'
-      }
-    }
-  },
+  // cellStyle: ({ column }) => {
+  //   if (column.title === 'Action' && themeStore.theme === 'dark') {
+  //     return {
+  //       backgroundColor: '#363940'
+  //     }
+  //   }
+  // },
   menuConfig: {
     body: {
       options: [
@@ -638,18 +644,21 @@ 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-tooltip effect="dark" content="Subscribe" placement="top">
+          <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-tooltip>
+
         <el-button
           v-if="row?.['Mode'] !== 'Air Freight' && canEdiVgm"
           @click="handleVGM(row)"

+ 6 - 0
src/views/Tracking/src/components/TrackingTable/src/components/VGMView.vue

@@ -66,6 +66,12 @@ const tableData = ref<VxeGridProps<any>>({
   round: true,
   columns: [],
   data: [],
+  cellConfig: {
+    height: 40
+  },
+  headerCellConfig: {
+    height: 40
+  },
   scrollY: { enabled: true, oSize: 20, gt: 30 },
   emptyText: ' ',
   showHeaderOverflow: true,