ソースを参照

对表格的分页器增加"共多少条"总数的文案显示

刘洋 2 年 前
コミット
d37e7d3d19

+ 1 - 0
src/pages/exam-manage/index.vue

@@ -61,6 +61,7 @@
         :pagination="{
           total: examTableData.totalCount,
           pageSize: query.pageSize,
+          showTotal:total => `共 ${total} 条`
         }"
         @change="currentPageChange"
         :row-class-name="

+ 6 - 1
src/pages/school-manage/index.vue

@@ -3,7 +3,11 @@
     <Block class="header-block tw-flex tw-items-center tw-justify-between">
       <a-form layout="inline">
         <a-form-item label="学校名称">
-          <a-input v-model:value="query.name" placeholder="学校名称" :maxlength="50"></a-input>
+          <a-input
+            v-model:value="query.name"
+            placeholder="学校名称"
+            :maxlength="50"
+          ></a-input>
         </a-form-item>
         <a-form-item>
           <a-button
@@ -35,6 +39,7 @@
         :pagination="{
           total: schoolTableData.totalCount,
           pageSize: query.pageSize,
+          showTotal: (total) => `共 ${total} 条`,
         }"
         :row-class-name="
           (_:any, index:number) => (index % 2 === 1 ? 'table-striped' : null)

+ 37 - 38
src/pages/subjects-manage/index.vue

@@ -70,39 +70,37 @@
           >
         </a-form-item>
       </a-form>
-        <div class="import-btns">
-          <a-button
-            type="primary"
-            class="tw-flex tw-items-center operation-button"
-            @click="showImportModalType('subject')"
-          >
-            导入科目
-          </a-button>
-          <br />
-          <a-button
-            type="primary"
-            class="tw-flex tw-items-center operation-button"
-            @click="showImportModalType('struct')"
-          >
-            导入主观题结构
-          </a-button>
-
-
-
-<!--        <a-dropdown-button type="primary">-->
-<!--          <template #overlay>-->
-<!--            <a-menu>-->
-<!--              <a-menu-item key="1" @click="showImportModalType('subject')"-->
-<!--              >导入科目</a-menu-item-->
-<!--              >-->
-<!--              <a-menu-item key="2" @click="showImportModalType('struct')"-->
-<!--              >导入主观题</a-menu-item-->
-<!--              >-->
-<!--            </a-menu>-->
-<!--          </template>-->
-<!--          <template #icon><DownOutlined /></template>-->
-<!--          导入-->
-<!--        </a-dropdown-button>-->
+      <div class="import-btns">
+        <a-button
+          type="primary"
+          class="tw-flex tw-items-center operation-button"
+          @click="showImportModalType('subject')"
+        >
+          导入科目
+        </a-button>
+        <br />
+        <a-button
+          type="primary"
+          class="tw-flex tw-items-center operation-button"
+          @click="showImportModalType('struct')"
+        >
+          导入主观题结构
+        </a-button>
+
+        <!--        <a-dropdown-button type="primary">-->
+        <!--          <template #overlay>-->
+        <!--            <a-menu>-->
+        <!--              <a-menu-item key="1" @click="showImportModalType('subject')"-->
+        <!--              >导入科目</a-menu-item-->
+        <!--              >-->
+        <!--              <a-menu-item key="2" @click="showImportModalType('struct')"-->
+        <!--              >导入主观题</a-menu-item-->
+        <!--              >-->
+        <!--            </a-menu>-->
+        <!--          </template>-->
+        <!--          <template #icon><DownOutlined /></template>-->
+        <!--          导入-->
+        <!--        </a-dropdown-button>-->
       </div>
       <div class="export-btns">
         <a-button
@@ -124,6 +122,7 @@
         :pagination="{
           total: subjectsTableData.totalCount,
           pageSize: query.pageSize,
+          showTotal: (total) => `共 ${total} 条`,
         }"
         @change="currentPageChange"
         :row-class-name="
@@ -500,7 +499,7 @@ const downloadTemplate = async () => {
 const showImportModalType = async (type: ImportType) => {
   uploadQuery.type = type;
   // uploadQuery.schoolId = query.schoolId || mainStore.systemUserInfo?.schoolId;
-  uploadQuery.schoolId = '';
+  uploadQuery.schoolId = "";
   showImportModal.value = true;
   querySchoolList("", "form");
 };
@@ -544,8 +543,8 @@ onBeforeMount(async () => {
 <style scoped lang="less">
 .subjects-manage {
   .header-block {
-    .export-btns{
-      padding-left:6px;
+    .export-btns {
+      padding-left: 6px;
     }
     .ant-input {
       width: 160px;
@@ -575,9 +574,9 @@ onBeforeMount(async () => {
 
     .operation-button {
       //width: 72px;
-      padding:0 9px;
+      padding: 0 9px;
       //padding: 0;
-      margin-bottom:10px;
+      margin-bottom: 10px;
     }
   }
   .subjects-table {

+ 1 - 0
src/pages/user-manage/index.vue

@@ -70,6 +70,7 @@
         :pagination="{
           total: userTableData.totalCount,
           pageSize: query.pageSize,
+          showTotal: (total) => `共 ${total} 条`,
         }"
         @change="currentPageChange"
         :row-class-name="