From 270da473526ff47a15a3aedef01ebfac90ded51b Mon Sep 17 00:00:00 2001
From: wujianwei <wjw@11.com>
Date: 星期二, 21 十月 2025 17:37:08 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/yagwly_fa_master' into yagwly_fa_master

---
 ui/admin-ui3/src/views/cwgl/data/index.vue |  446 +++++++++++++++++++++++++++++--------------------------
 1 files changed, 235 insertions(+), 211 deletions(-)

diff --git a/ui/admin-ui3/src/views/cwgl/data/index.vue b/ui/admin-ui3/src/views/cwgl/data/index.vue
index 50de207..bf40171 100644
--- a/ui/admin-ui3/src/views/cwgl/data/index.vue
+++ b/ui/admin-ui3/src/views/cwgl/data/index.vue
@@ -1,48 +1,18 @@
 <template>
-  <basicContainer >
-    <avue-crud
-        :option="option"
-        :table-loading="pageF.loading"
-        :data="tableData"
-        :page="page"
-        :permission="permissionList"
-        :before-open="beforeOpen"
-        v-model="form"
-        ref="crudRef"
-        @row-update="rowUpdate"
-        @row-save="rowSave"
-        @refresh-change="refreshChange"
-        @row-del="rowDel"
-        @search-change="searchChange"
-        @search-reset="searchReset"
-        @selection-change="selectionChange"
-        @current-change="currentChange"
-        @size-change="sizeChange"
-        @on-load="onLoad"
-    >
+  <basicContainer>
+    <avue-crud :option="option" :table-loading="pageF.loading" :data="tableData" :page="page"
+      :permission="permissionList" :before-open="beforeOpen" v-model="form" ref="crudRef" @row-update="rowUpdate"
+      @row-save="rowSave" @refresh-change="refreshChange" @row-del="rowDel" @search-change="searchChange"
+      @search-reset="searchReset" @selection-change="selectionChange" @current-change="currentChange"
+      @size-change="sizeChange" @on-load="onLoad">
       <template #menu-left>
-        <el-button
-            type="success"
-            icon="Edit"
-            :disabled="pageF.single"
-            v-hasPermi="['cwgl:data:edit']"
-            @click="handleUpdate">淇敼
+        <!-- <el-button type="success" icon="Edit" :disabled="pageF.single" v-hasPermi="['cwgl:data:edit']"
+          @click="handleUpdate">淇敼
         </el-button>
-        <el-button
-            type="danger"
-            icon="Delete"
-            :disabled="pageF.multiple"
-            @click="handleDelete"
-            v-hasPermi="['cwgl:data:remove']"
-        >鍒犻櫎
-        </el-button>
-        <el-button
-            type="warning"
-            plain
-            icon="Download"
-            @click="handleExport"
-            v-hasPermi="['cwgl:data:export']"
-        >瀵煎嚭
+        <el-button type="danger" icon="Delete" :disabled="pageF.multiple" @click="handleDelete"
+          v-hasPermi="['cwgl:data:remove']">鍒犻櫎
+        </el-button> -->
+        <el-button type="warning" plain icon="Download" @click="handleExport" v-hasPermi="['cwgl:data:export']">瀵煎嚭
         </el-button>
       </template>
     </avue-crud>
@@ -50,182 +20,236 @@
 </template>
 
 <script setup name="data" lang="ts">
-  import {DataI,addData, delData, exportData, getData, listData, updateData} from "@/api/cwgl/data";
-  import useCurrentInstance from "@/utils/useCurrentInstance";
-  import {computed,reactive, ref, toRefs} from "vue";
-  import {PagesInterface, PageQueryInterface} from "@/utils/globalInterface";
-  import {usePagePlus} from "@/hooks/usePagePlus";
-  import {hasPermission} from "@/utils/permissionUtils";
+import { DataI, addData, delData, exportData, getData, listData, updateData } from "@/api/cwgl/data";
+import useCurrentInstance from "@/utils/useCurrentInstance";
+import { computed, reactive, ref, toRefs } from "vue";
+import { PagesInterface, PageQueryInterface } from "@/utils/globalInterface";
+import { usePagePlus } from "@/hooks/usePagePlus";
+import { hasPermission } from "@/utils/permissionUtils";
 
-  const { proxy } = useCurrentInstance();
-  const crudRef = ref();
+const { proxy } = useCurrentInstance();
+const crudRef = ref();
 
-  const permissionList = computed(()=>{
-    return {
-      addBtn: hasPermission(["cwgl:data:add"]),
-      delBtn: hasPermission(["cwgl:data:remove"]),
-      editBtn: hasPermission(["cwgl:data:edit"]),
-      viewBtn: hasPermission(["cwgl:data:query"]),
-    }
-  })
+const permissionList = computed(() => {
+  return {
+    addBtn: hasPermission(["cwgl:data:add"]),
+    delBtn: hasPermission(["cwgl:data:remove"]),
+    editBtn: hasPermission(["cwgl:data:edit"]),
+    viewBtn: hasPermission(["cwgl:data:query"]),
+  }
+})
 
-  const data = reactive({
-    form:<DataI>{},
-    queryParams:<DataI&PageQueryInterface>{},
-    page: <PagesInterface>{
-      pageSize: 10,
-      total: 0,
-      currentPage: 1,
+const data = reactive({
+  form: <DataI>{},
+  queryParams: <DataI & PageQueryInterface>{},
+  page: <PagesInterface>{
+    pageSize: 10,
+    total: 0,
+    currentPage: 1,
+  },
+  selectionList: [],
+})
+const { queryParams, form, page, selectionList } = toRefs(data);
+const option = ref({
+  pageKey: 'Data',
+  rowKey: 'id',
+   editDisplay: false,
+  addBtn: false,
+  editBtn: false,
+  menu: false,
+  delBtn: false,
+  viewBtn: false,
+  searchLabelWidth: 100,
+  labelWidth: 120,
+  column: {
+    // id: {
+    //   label: '涓婚敭ID',
+    // },
+    vin: {
+      label: '杞︽灦鍙�',
+      minWidth: 200,
+      search: true,
+      rules: [
+        {
+          required: true,
+          message: "杞︽灦鍙蜂笉鑳戒负绌�", trigger: "blur"
+        }
+      ],
     },
-    selectionList:[],
-  })
-  const {queryParams,form,page,selectionList} = toRefs(data);
-  const option = ref({
-    pageKey: 'Data',
-    rowKey: 'id',
-    column: {
-                                id: {
-          label: '涓婚敭ID',
-                            },
-                                vin: {
-          label: '杞︽灦鍙�',
-                                rules: [
-              {
-                required: true,
-                message: "杞︽灦鍙蜂笉鑳戒负绌�", trigger: "blur" }
-            ],                  },
-                                chassisType: {
-          label: '搴曠洏绫诲瀷',
-                            },
-                                eventDate: {
-          label: '鏁版嵁鏃ユ湡',
-                                rules: [
-              {
-                required: true,
-                message: "鏁版嵁鏃ユ湡涓嶈兘涓虹┖", trigger: "blur" }
-            ],                  },
-                                distance: {
-          label: '琛岄┒閲岀▼',
-                            },
-                                duration: {
-          label: '鐢ㄨ溅鏃堕暱',
-                            },
-                                shutdownDuration: {
-          label: '鐔勭伀鍋滆溅鏃堕暱',
-                            },
-                                drivingDuration: {
-          label: '琛岄┒鏃堕暱',
-                            },
-                                drivingDurationRatio: {
-          label: '琛岄┒鏃堕暱鍗犳瘮',
-                            },
-                                idleDurationRatio: {
-          label: '鎬犻�熸椂闀垮崰姣�',
-                            },
-                                idleDuration: {
-          label: '鎬犻�熸椂闀�',
-                            },
-                                coastingDistanceRatio: {
-          label: '婊戣璺濈鍗犳瘮',
-                            },
-                                coastingDistance: {
-          label: '婊戣璺濈',
-                            },
-                                cruisingDistanceRatio: {
-          label: '宸¤埅璺濈鍗犳瘮',
-                            },
-                                cruisingDistance: {
-          label: '宸¤埅璺濈',
-                            },
-                                avgSpeed: {
-          label: '骞冲潎閫熷害',
-                            },
-                                avgDrivingSpeed: {
-          label: '骞冲潎琛岃溅閫熷害',
-                            },
-                                avgEngineSpeed: {
-          label: '鍙戝姩鏈哄钩鍧囪浆閫�',
-                            },
-                                economicEngineSpeedDurationRatio: {
-          label: '缁忔祹杞�熸椂闀垮崰姣�',
-                            },
-                                economicEngineSpeedDuration: {
-          label: '缁忔祹杞�熸椂闀�',
-                            },
-                                avgEnergyConsumption: {
-          label: '鐧惧叕閲岃兘鑰�',
-                            },
-                                energyConsumption: {
-          label: '鑰楁补閲�',
-                            },
-                                drivingEnergyConsumption: {
-          label: '琛岄┒鑰楁补閲�',
-                            },
-                                drivingEnergyConsumptionRatio: {
-          label: '琛岄┒鑰楁补閲忓崰姣�',
-                            },
-                                idleEnergyConsumptionRatio: {
-          label: '鎬犻�熻�楁补閲忓崰姣�',
-                            },
-                                idleEnergyConsumption: {
-          label: '鎬犻�熻�楁补閲�',
-                            },
-                                avgAdblueConsumption: {
-          label: '鐧惧叕閲屽翱绱犳秷鑰�',
-                            },
-                                adblueConsumption: {
-          label: '灏跨礌娑堣��',
-                            },
-                                avgGrossWeight: {
-          label: '骞冲潎鏁磋溅璐ㄩ噺',
-                            },
-                                brakeTimes: {
-          label: '鍒硅溅娆℃暟',
-                            },
-                                harshBrakeTimes: {
-          label: '鎬ュ埞杞︽鏁�',
-                            },
-                                accelerationTimes: {
-          label: '鎬ュ姞閫熸鏁�',
-                            },
-                                avgBrakeTimes: {
-          label: '鐧惧叕閲屽埞杞︽鏁�',
-                            },
-                                avgHarshBrakeTimes: {
-          label: '鐧惧叕閲屾�ュ埞杞︽鏁�',
-                            },
-                                avgAccelerationTimes: {
-          label: '鐧惧叕閲屾�ュ姞閫熸鏁�',
-                            },
-                                odometer: {
-          label: '閲岀▼琛ㄩ噷绋�',
-                            },
-                                createTime: {
-          label: '鍒涘缓鏃堕棿',
-                            },
-                                updateTime: {
-          label: '鏇存柊鏃堕棿',
-                            },
-          }
-  })
+    chassisType: {
+      label: '搴曠洏绫诲瀷',
+      minWidth: 200,
+    },
+    eventDate: {
+      label: '鏁版嵁鏃ユ湡',
+      minWidth: 200,
+      rules: [
+        {
+          required: true,
+          message: "鏁版嵁鏃ユ湡涓嶈兘涓虹┖", trigger: "blur"
+        }
+      ],
+    },
+    distance: {
+      label: '琛岄┒閲岀▼',
+      minWidth: 150,
+    },
+    duration: {
+      label: '鐢ㄨ溅鏃堕暱',
+      minWidth: 100,
+    },
+    shutdownDuration: {
+      label: '鐔勭伀鍋滆溅鏃堕暱',
+        minWidth: 120,
+    },
+    drivingDuration: {
+      label: '琛岄┒鏃堕暱',
+       minWidth: 100,
+    },
+    drivingDurationRatio: {
+      label: '琛岄┒鏃堕暱鍗犳瘮',
+        minWidth: 120,
+    },
+    idleDurationRatio: {
+      label: '鎬犻�熸椂闀垮崰姣�',
+        minWidth: 120,
+    },
+    idleDuration: {
+      label: '鎬犻�熸椂闀�',
+      minWidth: 100,
+    },
+    coastingDistanceRatio: {
+      label: '婊戣璺濈鍗犳瘮',
+      minWidth: 120,
+    },
+    coastingDistance: {
+      label: '婊戣璺濈',
+      minWidth: 100,
+    },
+    cruisingDistanceRatio: {
+      label: '宸¤埅璺濈鍗犳瘮',
+      minWidth: 120,
+    },
+    cruisingDistance: {
+      label: '宸¤埅璺濈',
+      minWidth: 100,
+    },
+    avgSpeed: {
+      label: '骞冲潎閫熷害',
+      minWidth: 100,
+    },
+    avgDrivingSpeed: {
+      label: '骞冲潎琛岃溅閫熷害',
+      minWidth: 120,
+    },
+    avgEngineSpeed: {
+      label: '鍙戝姩鏈哄钩鍧囪浆閫�',
+      minWidth: 120,
+    },
+    economicEngineSpeedDurationRatio: {
+      label: '缁忔祹杞�熸椂闀垮崰姣�',
+      minWidth: 150,
+    },
+    economicEngineSpeedDuration: {
+      label: '缁忔祹杞�熸椂闀�',
+      minWidth: 120,
+    },
+    avgEnergyConsumption: {
+      label: '鐧惧叕閲岃兘鑰�',
+      minWidth: 100,
+    },
+    energyConsumption: {
+      label: '鑰楁补閲�',
+    },
+    drivingEnergyConsumption: {
+      label: '琛岄┒鑰楁补閲�',
+      minWidth: 100,
+    },
+    drivingEnergyConsumptionRatio: {
+      label: '琛岄┒鑰楁补閲忓崰姣�',
+      minWidth: 150,
+    },
+    idleEnergyConsumptionRatio: {
+      label: '鎬犻�熻�楁补閲忓崰姣�',
+      minWidth: 150,
+    },
+    idleEnergyConsumption: {
+      label: '鎬犻�熻�楁补閲�',
+      minWidth: 100,
+    },
+    avgAdblueConsumption: {
+      label: '鐧惧叕閲屽翱绱犳秷鑰�',
+      minWidth: 150,
+    },
+    adblueConsumption: {
+      label: '灏跨礌娑堣��',
+      minWidth: 100,
+    },
+    avgGrossWeight: {
+      label: '骞冲潎鏁磋溅璐ㄩ噺',
+      minWidth: 120,
+    },
+    brakeTimes: {
+      label: '鍒硅溅娆℃暟',
+      minWidth: 100,
+    },
+    harshBrakeTimes: {
+      label: '鎬ュ埞杞︽鏁�',
+      minWidth: 100,
+    },
+    accelerationTimes: {
+      label: '鎬ュ姞閫熸鏁�',
+      minWidth: 100,
+    },
+    avgBrakeTimes: {
+      label: '鐧惧叕閲屽埞杞︽鏁�',
+      minWidth: 120,
+    },
+    avgHarshBrakeTimes: {
+      label: '鐧惧叕閲屾�ュ埞杞︽鏁�',
+      minWidth: 140,
 
-  const { tableData,pageF,rowSave,rowUpdate,rowDel,beforeOpen,searchChange,
-    searchReset,selectionChange,onLoad,currentChange,sizeChange,handleDelete,handleExport,handleUpdate,refreshChange} = usePagePlus({
-    form:form,
-    option:option,
-    queryParams:queryParams,
-    idKey:'id',
-    page:page.value,
-    getListApi:listData,
-    getDetailApi:getData,
-    exportApi:exportData,
-    deleteApi:delData,
-    addApi:addData,
-    updateApi:updateData,
-    handleUpdateFunc:()=>{
+    },
+    avgAccelerationTimes: {
+      label: '鐧惧叕閲屾�ュ姞閫熸鏁�',
+      minWidth: 140,
+
+    },
+    odometer: {
+      label: '閲岀▼琛ㄩ噷绋�',
+      minWidth: 120,
+
+    },
+    createTime: {
+      label: '鍒涘缓鏃堕棿',
+      minWidth: 180,
+
+    },
+    updateTime: {
+      label: '鏇存柊鏃堕棿',
+      minWidth: 180,
+
+    },
+  }
+})
+
+const { tableData, pageF, rowSave, rowUpdate, rowDel, beforeOpen, searchChange,
+  searchReset, selectionChange, onLoad, currentChange, sizeChange, handleDelete, handleExport, handleUpdate, refreshChange } = usePagePlus({
+    form: form,
+    option: option,
+    queryParams: queryParams,
+    idKey: 'id',
+    page: page.value,
+    getListApi: listData,
+    getDetailApi: getData,
+    exportApi: exportData,
+    deleteApi: delData,
+    addApi: addData,
+    updateApi: updateData,
+    handleUpdateFunc: () => {
       crudRef.value.rowEdit(selectionList.value[0]);
     },
-    handleSelectionChangeFunc:(selection:any)=>{
+    handleSelectionChangeFunc: (selection: any) => {
       selectionList.value = selection;
     }
   })

--
Gitblit v1.8.0