Ver Fonte

style: 调整shipment 表格最高限度

zhouyuhao há 6 meses atrás
pai
commit
70990c2354

+ 1 - 1
src/styles/theme.scss

@@ -524,7 +524,7 @@
 
   --color-card-icon-box-bg: #4f535c;
   --color-card-number-cancelled: #babcc0;
-  --color-steps-unfinished-line: #b5b9bf;
+  --color-steps-unfinished-line: #6a6d73;
   --color-steps-current-icon-color: #e0a100;
   --color-steps-current-icon-bg: #534b30;
   --color-booking-info-linear-bg: linear-gradient(90deg, #636db7 0%, #515195 49.52%, #7b9bc9 100%);

+ 62 - 1
src/views/DestinationDelivery/src/components/TableView/src/components/ShipmentInforTable.vue

@@ -67,6 +67,67 @@ watch(
   }
 )
 
+const tableOriginColumnsField = ref()
+// 获取表格列
+const getTableColumns = async () => {
+  await $api.getOperationTableColumns().then((res: any) => {
+    if (res.code === 200) {
+      tableData.value.columns = [
+        { type: 'checkbox', width: 50, fixed: 'left' },
+        ...handleColumns(res.data.OperationTableColumns),
+        {}
+      ]
+      const index = tableData.value.columns.findIndex((item: any) => item.title === 'Action')
+      if (index !== -1) {
+        tableData.value.columns.push({
+          title: 'Action',
+          fixed: 'right',
+          width: 120,
+          slots: { default: 'action' }
+        })
+      }
+      tableOriginColumnsField.value = res.data.OperationTableColumns
+    }
+  })
+}
+let searchdata: any = {}
+// 获得表格数据后赋值
+const assignTableData = (data: any) => {
+  tableData.value.data = data.searchData || []
+
+  if (tableData.value.columns.length > 0) {
+    const index = tableData.value.columns.findIndex((item: any) => item.title === 'Action')
+    if (index === -1) {
+      tableData.value.columns.push({
+        title: 'Action',
+        fixed: 'right',
+        width: 120,
+        slots: { default: 'action' }
+      })
+    }
+  }
+}
+
+// 获取表格数据
+const getTableData = async () => {
+  const rc = -1
+  await $api
+    .SearchOperationLog({
+      cp: 1,
+      ps: 6,
+      rc,
+      ...searchdata
+    })
+    .then((res: any) => {
+      if (res.code === 200) {
+        assignTableData(res.data)
+      }
+    })
+}
+
+onMounted(() => {
+  Promise.all([getTableColumns(), getTableData()]).finally(() => {})
+})
 // 实现行点击样式
 useRowClickStyle(tableRef)
 </script>
@@ -74,7 +135,7 @@ useRowClickStyle(tableRef)
 <template>
   <div class="shipment-infor-table">
     <div class="label">Shipment Information</div>
-    <vxe-grid ref="tableRef" v-bind="tableData">
+    <vxe-grid ref="tableRef" v-bind="tableData" height="240">
       <template #empty>
         <div class="empty">No data</div>
       </template>