From ebc5ce2b6e4cba0708d4f5efd20fd049fcd774e6 Mon Sep 17 00:00:00 2001
From: CD配唱片 <CD配唱片>
Date: 星期四, 08 五月 2025 13:22:25 +0800
Subject: [PATCH] 优化,用节流控制表格下拉加载更多分页数据避免请求过多数据
---
src/views/basicData/processRouteDataPreparate/index.vue | 43 ++++++++++++++++++++++++++-----------------
1 files changed, 26 insertions(+), 17 deletions(-)
diff --git a/src/views/basicData/processRouteDataPreparate/index.vue b/src/views/basicData/processRouteDataPreparate/index.vue
index cce501e..dd00a50 100644
--- a/src/views/basicData/processRouteDataPreparate/index.vue
+++ b/src/views/basicData/processRouteDataPreparate/index.vue
@@ -95,23 +95,31 @@
link
@click="handleCheckView(row)"
v-hasPermi="['aps:calendar:update']"
- >鏌ョ湅</el-button
+ >{{ $t("common.common.view") }}</el-button
>
</template>
</HxlhTable>
- <el-dialog :title="title" v-model="openDialog" width="900px" append-to-body>
+ <el-dialog
+ :title="$t('common.common.viewDetails')"
+ v-model="openDialog"
+ width="900px"
+ append-to-body
+ >
<HxlhTable
style="width: 100%"
:columns="subGridOptions"
:data="subList"
:loading="loading"
:height="heightSub"
- @on-checkbox="handleCheckboxChange"
- :page="page"
- @changePageNo="changePageNo"
- @changePageSize="changePageSize"
>
</HxlhTable>
+ <template #footer>
+ <span class="dialog-footer">
+ <el-button @click="openDialog = false">{{
+ $t("common.common.cancel")
+ }}</el-button>
+ </span>
+ </template>
</el-dialog>
</div>
</template>
@@ -126,7 +134,7 @@
import HxlhTable from "@/components/HxlhTable/index.vue";
import { ref } from "vue";
import { getToken } from "@/utils/auth.js";
-import { ElMessage } from "element-plus";
+// import { ElMessage } from "element-plus";
import { useI18n } from "vue-i18n"; //瑕佸湪js涓娇鐢ㄥ浗闄呭寲
const { t, locale } = useI18n();
const { proxy } = getCurrentInstance();
@@ -146,7 +154,7 @@
const single = ref(true);
const total = ref(0);
-const height = ref(document.documentElement.clientHeight - 270 + "px;");
+const height = ref(document.documentElement.clientHeight - 210 + "px;");
const heightSub = ref(document.documentElement.clientHeight - 320 + "px;");
// 琛ㄦ牸閰嶇疆
const columns = ref([]);
@@ -159,8 +167,7 @@
itemCode: null,
},
rules: {
- itemCode: [
- ],
+ itemCode: [],
},
});
@@ -168,7 +175,7 @@
watch(
locale,
(newLocale) => {
- rules.value = {
+ rules.value = {
itemCode: [
{
required: true,
@@ -333,12 +340,14 @@
function getList() {
loading.value = true;
queryParams.value.params = {};
- apsStandardProcessRouteHeaderList(queryParams.value).then((response) => {
- processRouteList.value = response.rows;
- loading.value = false;
- }).catch(()=>{
- loading.value = false;
- });
+ apsStandardProcessRouteHeaderList(queryParams.value)
+ .then((response) => {
+ processRouteList.value = response.rows;
+ loading.value = false;
+ })
+ .catch(() => {
+ loading.value = false;
+ });
}
/** 鎼滅储鎸夐挳鎿嶄綔 */
--
Gitblit v1.9.3