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

Merge branch 'dev' into dev_zyh

zhouyuhao пре 9 месеци
родитељ
комит
2e0828d08d

+ 5 - 2
src/utils/table.ts

@@ -32,8 +32,7 @@ export const autoWidth = (tableData: VxeGridProps, grid: VxeGridInstance) => {
       })
       // column.title.length > curStr.length && (curStr = column.title)
       // 表头的宽度如果小于表格内容的宽度
-      if (width < curStr.length * 11 + 20) {
-        // width = curStr.length * 10 + 20
+      if (width < curStr.length * 11) {
         if (curStr.length > 20) {
           width = curStr.length * 9 + 40
         } else {
@@ -44,6 +43,10 @@ export const autoWidth = (tableData: VxeGridProps, grid: VxeGridInstance) => {
       // width < 100 && (width = 100)
       // 最终宽度不能超过400
       width > 400 && (width = 400)
+      // 如果字段是Mode,则固定宽度为80
+      if (field === 'Mode') {
+        width = 80
+      }
 
       columnsWidth.push({
         width,

+ 1 - 1
src/views/Tracking/src/components/TrackingDetail/src/components/MapView.vue

@@ -283,7 +283,7 @@ const setCenterAndZoom = () => {
   if (viewData.value.length > 0) {
     // 根据标记的位置设置中心点以及缩放级别
     const bounds = L.latLngBounds(viewData.value)
-    map!.fitBounds(bounds, { paddingTopLeft: [20, 70], paddingBottomRight: [0, 0] })
+    map!.fitBounds(bounds, { paddingTopLeft: [20, 90], paddingBottomRight: [0, 30] })
 
     setTimeout(() => {
       if (isFirstRender) {

+ 1 - 1
src/views/Tracking/src/components/TrackingTable/src/TrackingTable.vue

@@ -607,7 +607,7 @@ defineExpose({
       <!-- action操作的插槽 -->
       <template #action="{ row }">
         <el-button
-          v-if="row?.['Transportation Mode'] !== 'Air Freight'"
+          v-if="row?.['Mode'] !== 'Air Freight'"
           @click="handleVGM(row)"
           class="el-button--blue"
           style="height: 24px"