From 358e8f30447f8ba05af42b66d45ddf1a93878b6d Mon Sep 17 00:00:00 2001
From: schangxiang@126.com <schangxiang@126.com>
Date: 周二, 06 5月 2025 17:38:09 +0800
Subject: [PATCH] Merge branch 'master' of http://222.71.245.114:9086/r/HIA24016N_PipeLineDemo

---
 HIAWms/web/src/components/Table/components/pagination.vue |   88 ++++++++++++++++++++++++++++++++++++++++++++
 1 files changed, 88 insertions(+), 0 deletions(-)

diff --git a/HIAWms/web/src/components/Table/components/pagination.vue b/HIAWms/web/src/components/Table/components/pagination.vue
new file mode 100644
index 0000000..68f6dca
--- /dev/null
+++ b/HIAWms/web/src/components/Table/components/pagination.vue
@@ -0,0 +1,88 @@
+<template>
+  <div v-if="!isHidePagination" class="pagination-content">
+    <span class="info">
+      {{ _t('鍏�') + totalCount + _t('鏉¤褰�') }}
+      {{ _t('褰撳墠绗�') + pageNum + _t('椤�') }}
+      {{
+        _t('鍏�') +
+        (totalCount ? Math.ceil(totalCount / (pageSize || 1)) : 1) +
+        _t('椤�')
+      }}
+      {{ _t('姣忛〉') + (params.MaxResultCount || pageSize) + _t('鏉¤褰�') }}
+    </span>
+    <div class="pagination">
+      <div class="information-pagination">
+        <el-pagination
+          layout="prev, pager, next"
+          :total="Number(totalCount)"
+          size="small"
+          v-model:current-page="pageNum"
+          :page-size="params.MaxResultCount || pageSize"
+          @current-change="onCurrentChange"
+        />
+      </div>
+      <div class="numb">
+        {{ _t('绗�') }}
+        <el-input-number
+          @change="onChange"
+          :min="1"
+          :controls="false"
+          :max="max"
+          v-model="pageNum"
+          controls-position="right"
+          style="width: 58px; height: 30px"
+        />
+        {{ _t('椤�') }}
+      </div>
+    </div>
+  </div>
+</template>
+
+<script setup lang="ts">
+import { computed, nextTick, ref, reactive } from 'vue'
+import type { ParamsItem, TablePropsItemType } from '../index.d'
+import { useVModel } from '@vueuse/core'
+import { _t } from '@/libs/Language/Language'
+
+interface paginationPropsType extends TablePropsItemType {
+  tableRef: Record<string, any>
+  pageNum: number
+  totalCount: number
+}
+
+const props = defineProps<paginationPropsType>()
+
+const emit = defineEmits(['currentChange', 'change'])
+
+const params = computed<ParamsItem>(() => {
+  return props.params || {}
+})
+
+const pageNum = useVModel(props, 'pageNum', emit)
+const totalCount = computed(() => {
+  return props.totalCount
+})
+
+const onChange = () => {
+  emit('change', Number(pageNum.value))
+}
+
+const max = computed(() => {
+  const total = props.url ? totalCount.value : props.total
+  const pageSize = props.pageSize || params.value.MaxResultCount
+  if (total && pageSize) {
+    return Math.ceil(total / pageSize)
+  }
+  return 1
+})
+
+const onCurrentChange = (current: number) => {
+  emit('currentChange', current)
+}
+</script>
+<style lang="scss">
+@import url('../index.scss');
+</style>
+<style lang="scss" scoped>
+@import url('../index.module.scss');
+</style>

--
Gitblit v1.9.3