Browse Source

feat:修改log表宽

AmandaG 1 năm trước cách đây
mục cha
commit
7b992acfbe

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

@@ -19,7 +19,8 @@ const handleColumns = (columns: any, status?: string) => {
     let curColumn: any = {
       title: item.title,
       field: item.field,
-      sortable: true
+      sortable: true,
+      minWidth: 120
     }
     // 设置插槽
     if (item.type === 'status' && status !== 'all') {
@@ -73,7 +74,7 @@ const getTableColumns = async () => {
     }
   })
   nextTick(() => {
-    tableRef.value && autoWidth(bookingTable.value, tableRef.value)
+    // tableRef.value && autoWidth(bookingTable.value, tableRef.value)
     tableLoadingColumn.value = false
     selectedNumber.value = 0
     selectedTableData.value = []
@@ -93,7 +94,7 @@ const assignTableData = (data: any) => {
     allTable.value.data = data.searchData || []
     // 为了让导出的表格列宽度自适应
     nextTick(() => {
-      allTableRef.value && autoWidth(allTable.value, allTableRef.value)
+      // allTableRef.value && autoWidth(allTable.value, allTableRef.value)
     })
   }, 1000)
 }
@@ -119,7 +120,7 @@ const getTableData = async (isPageChange?: boolean) => {
       selectedNumber.value = 0
       selectedTableData.value = []
       nextTick(() => {
-        tableRef.value && autoWidth(bookingTable.value, tableRef.value)
+        // tableRef.value && autoWidth(bookingTable.value, tableRef.value)
         tableLoadingTableData.value = false
       })
     })
@@ -143,7 +144,7 @@ const SearchOperationLog = (val: any) => {
       selectedNumber.value = 0
       selectedTableData.value = []
       nextTick(() => {
-        tableRef.value && autoWidth(bookingTable.value, tableRef.value)
+        // tableRef.value && autoWidth(bookingTable.value, tableRef.value)
         tableLoadingTableData.value = false
       })
     })
@@ -151,7 +152,7 @@ const SearchOperationLog = (val: any) => {
 onMounted(() => {
   Promise.all([getTableColumns(), getTableData()]).finally(() => {
     nextTick(() => {
-      tableRef.value && autoWidth(bookingTable.value, tableRef.value)
+      // tableRef.value && autoWidth(bookingTable.value, tableRef.value)
     })
   })
 })