Kaynağa Gözat

分页优化

wsp 1 yıl önce
ebeveyn
işleme
8eec74bae2

+ 3 - 0
components.d.ts

@@ -11,10 +11,12 @@ declare module 'vue' {
     ElBreadcrumb: typeof import('element-plus/es')['ElBreadcrumb']
     ElBreadcrumb: typeof import('element-plus/es')['ElBreadcrumb']
     ElBreadcrumbItem: typeof import('element-plus/es')['ElBreadcrumbItem']
     ElBreadcrumbItem: typeof import('element-plus/es')['ElBreadcrumbItem']
     ElButton: typeof import('element-plus/es')['ElButton']
     ElButton: typeof import('element-plus/es')['ElButton']
+    ElCalendar: typeof import('element-plus/es')['ElCalendar']
     ElCard: typeof import('element-plus/es')['ElCard']
     ElCard: typeof import('element-plus/es')['ElCard']
     ElCheckbox: typeof import('element-plus/es')['ElCheckbox']
     ElCheckbox: typeof import('element-plus/es')['ElCheckbox']
     ElCol: typeof import('element-plus/es')['ElCol']
     ElCol: typeof import('element-plus/es')['ElCol']
     ElContainer: typeof import('element-plus/es')['ElContainer']
     ElContainer: typeof import('element-plus/es')['ElContainer']
+    ElDatePicker: typeof import('element-plus/es')['ElDatePicker']
     ElDialog: typeof import('element-plus/es')['ElDialog']
     ElDialog: typeof import('element-plus/es')['ElDialog']
     ElDropdown: typeof import('element-plus/es')['ElDropdown']
     ElDropdown: typeof import('element-plus/es')['ElDropdown']
     ElDropdownItem: typeof import('element-plus/es')['ElDropdownItem']
     ElDropdownItem: typeof import('element-plus/es')['ElDropdownItem']
@@ -35,6 +37,7 @@ declare module 'vue' {
     ElSwitch: typeof import('element-plus/es')['ElSwitch']
     ElSwitch: typeof import('element-plus/es')['ElSwitch']
     ElTable: typeof import('element-plus/es')['ElTable']
     ElTable: typeof import('element-plus/es')['ElTable']
     ElTableColumn: typeof import('element-plus/es')['ElTableColumn']
     ElTableColumn: typeof import('element-plus/es')['ElTableColumn']
+    ElTimePicker: typeof import('element-plus/es')['ElTimePicker']
     ElUpload: typeof import('element-plus/es')['ElUpload']
     ElUpload: typeof import('element-plus/es')['ElUpload']
     HelloWorld: typeof import('./src/components/HelloWorld.vue')['default']
     HelloWorld: typeof import('./src/components/HelloWorld.vue')['default']
     IconCommunity: typeof import('./src/components/icons/IconCommunity.vue')['default']
     IconCommunity: typeof import('./src/components/icons/IconCommunity.vue')['default']

+ 3 - 2
src/views/areaman/index.vue

@@ -136,7 +136,8 @@ const downExcell=()=>{
 }
 }
 const getTableData=()=>{
 const getTableData=()=>{
   apisystemdzbcArealist({
   apisystemdzbcArealist({
-    
+    pageSize:10,
+    pageNum:pageNum.value
   }).then(res=>{
   }).then(res=>{
     if(res.code==200){
     if(res.code==200){
       total.value=res.total
       total.value=res.total
@@ -261,7 +262,7 @@ onMounted(()=>{
                         <span>共{{total}}条记录 </span>
                         <span>共{{total}}条记录 </span>
                       </div>
                       </div>
                       <div class="right-part">
                       <div class="right-part">
-                        <el-pagination background layout="prev, pager, next" :total="total" />
+                        <el-pagination v-model:current-page="pageNum" @current-change="getTableData" background layout="prev, pager, next" :total="total" />
                       </div>
                       </div>
                     </div>
                     </div>
                   </div> 
                   </div> 

+ 17 - 7
src/views/bannerman/index.vue

@@ -159,7 +159,8 @@ const downExcell=()=>{
 }
 }
 const getTableData=()=>{
 const getTableData=()=>{
   apisystemdzbcBannerlist({
   apisystemdzbcBannerlist({
-    
+    pageSize:5,
+    pageNum:pageNum.value
   }).then(res=>{
   }).then(res=>{
     if(res.code==200){
     if(res.code==200){
       total.value=res.total
       total.value=res.total
@@ -239,11 +240,20 @@ onMounted(()=>{
                           </template>
                           </template>
                         </el-table-column>
                         </el-table-column>
                        
                        
-                        <el-table-column prop="contactName" label="上传时间">
-                        
-                    </el-table-column>
-                        <el-table-column prop="mid" label="状态">
-                          
+                       
+                        <el-table-column prop="status" label="状态">
+                          <template #default="scope">
+                            
+                           <el-switch
+                           :active-value="1"
+                           :inactive-value="2"
+                            disabled
+                            v-model="scope.row.status"
+                            inline-prompt
+                            active-text="正常"
+                            inactive-text="停用"
+                          />
+                          </template>
                         </el-table-column>
                         </el-table-column>
                         
                         
                        
                        
@@ -274,7 +284,7 @@ onMounted(()=>{
                         <span>共{{total}}条记录 </span>
                         <span>共{{total}}条记录 </span>
                       </div>
                       </div>
                       <div class="right-part">
                       <div class="right-part">
-                        <el-pagination background layout="prev, pager, next" :total="total" />
+                        <el-pagination v-model:current-page="pageNum" @current-change="getTableData" background layout="prev, pager, next" :total="total" />
                       </div>
                       </div>
                     </div>
                     </div>
                   </div> 
                   </div> 

+ 3 - 2
src/views/carman/index.vue

@@ -138,7 +138,8 @@ const downExcell=()=>{
 }
 }
 const getTableData=()=>{
 const getTableData=()=>{
   apisystemdzbcCarlist({
   apisystemdzbcCarlist({
-    
+    pageSize:10,
+    pageNum:pageNum.value
   }).then(res=>{
   }).then(res=>{
     if(res.code==200){
     if(res.code==200){
       total.value=res.total
       total.value=res.total
@@ -265,7 +266,7 @@ onMounted(()=>{
                         <span>共{{total}}条记录 </span>
                         <span>共{{total}}条记录 </span>
                       </div>
                       </div>
                       <div class="right-part">
                       <div class="right-part">
-                        <el-pagination background layout="prev, pager, next" :total="total" />
+                        <el-pagination v-model:current-page="pageNum" @current-change="getTableData" background layout="prev, pager, next" :total="total" />
                       </div>
                       </div>
                     </div>
                     </div>
                   </div> 
                   </div> 

+ 2 - 1
src/views/carplanman/index.vue

@@ -160,7 +160,8 @@ const downExcell=()=>{
 }
 }
 const getTableData=()=>{
 const getTableData=()=>{
   apisystemdzbcPathSchedulinglist({
   apisystemdzbcPathSchedulinglist({
-    
+    pageSize:10,
+    pageNum:pageNum.value
   }).then(res=>{
   }).then(res=>{
     if(res.code==200){
     if(res.code==200){
       total.value=res.total
       total.value=res.total

+ 3 - 2
src/views/orderman/index.vue

@@ -141,7 +141,8 @@ const downExcell=()=>{
 }
 }
 const getTableData=()=>{
 const getTableData=()=>{
   apisystemdzbcOrderlist({
   apisystemdzbcOrderlist({
-    
+    pageSize:10,
+    pageNum:pageNum.value
   }).then(res=>{
   }).then(res=>{
     if(res.code==200){
     if(res.code==200){
       total.value=res.total
       total.value=res.total
@@ -263,7 +264,7 @@ onMounted(()=>{
                         <span>共{{ total }}条记录 </span>
                         <span>共{{ total }}条记录 </span>
                       </div>
                       </div>
                       <div class="right-part">
                       <div class="right-part">
-                        <el-pagination background layout="prev, pager, next" :total="total" />
+                        <el-pagination v-model:current-page="pageNum" @current-change="getTableData" background layout="prev, pager, next" :total="total" />
                       </div>
                       </div>
                     </div>
                     </div>
                   </div> 
                   </div> 

+ 3 - 2
src/views/passengerstation/index.vue

@@ -145,7 +145,8 @@ const downExcell=()=>{
 }
 }
 const getTableData=()=>{
 const getTableData=()=>{
   apisystemdzbcKyzlist({
   apisystemdzbcKyzlist({
-    
+    pageSize:10,
+    pageNum:pageNum.value
   }).then(res=>{
   }).then(res=>{
     if(res.code==200){
     if(res.code==200){
       total.value=res.total
       total.value=res.total
@@ -256,7 +257,7 @@ onMounted(()=>{
                         <span>共{{total}}条记录 </span>
                         <span>共{{total}}条记录 </span>
                       </div>
                       </div>
                       <div class="right-part">
                       <div class="right-part">
-                        <el-pagination background layout="prev, pager, next" :total="total" />
+                        <el-pagination v-model:current-page="pageNum" @current-change="getTableData" background layout="prev, pager, next" :total="total" />
                       </div>
                       </div>
                     </div>
                     </div>
                   </div> 
                   </div> 

+ 3 - 2
src/views/roleman/index.vue

@@ -141,7 +141,8 @@ const downExcell=()=>{
 }
 }
 const getTableData=()=>{
 const getTableData=()=>{
   apisystemrolelist({
   apisystemrolelist({
-    
+    pageSize:10,
+    pageNum:pageNum.value
   }).then(res=>{
   }).then(res=>{
     if(res.code==200){
     if(res.code==200){
       total.value=res.total
       total.value=res.total
@@ -260,7 +261,7 @@ onMounted(()=>{
                         <span>共{{ total }}条记录 </span>
                         <span>共{{ total }}条记录 </span>
                       </div>
                       </div>
                       <div class="right-part">
                       <div class="right-part">
-                        <el-pagination background layout="prev, pager, next" :total="total" />
+                        <el-pagination v-model:current-page="pageNum" @current-change="getTableData" background layout="prev, pager, next" :total="total" />
                       </div>
                       </div>
                     </div>
                     </div>
                   </div> 
                   </div> 

+ 3 - 2
src/views/routeman/index.vue

@@ -141,7 +141,8 @@ const downExcell=()=>{
 }
 }
 const getTableData=()=>{
 const getTableData=()=>{
   apisystemdzbcPathlist({
   apisystemdzbcPathlist({
-    
+    pageSize:10,
+    pageNum:pageNum.value
   }).then(res=>{
   }).then(res=>{
     if(res.code==200){
     if(res.code==200){
       total.value=res.total
       total.value=res.total
@@ -291,7 +292,7 @@ onMounted(()=>{
                         <span>共{{ total }}条记录 </span>
                         <span>共{{ total }}条记录 </span>
                       </div>
                       </div>
                       <div class="right-part">
                       <div class="right-part">
-                        <el-pagination background layout="prev, pager, next" :total="total" />
+                        <el-pagination v-model:current-page="pageNum" @current-change="getTableData" background layout="prev, pager, next" :total="total" />
                       </div>
                       </div>
                     </div>
                     </div>
                   </div> 
                   </div> 

+ 3 - 2
src/views/stationman/index.vue

@@ -137,7 +137,8 @@ const downExcell=()=>{
 }
 }
 const getTableData=()=>{
 const getTableData=()=>{
   apisystemdzbcSitelist({
   apisystemdzbcSitelist({
-    
+    pageSize:10,
+    pageNum:pageNum.value
   }).then(res=>{
   }).then(res=>{
     if(res.code==200){
     if(res.code==200){
       total.value=res.total
       total.value=res.total
@@ -264,7 +265,7 @@ onMounted(()=>{
                         <span>共{{ total }}条记录 </span>
                         <span>共{{ total }}条记录 </span>
                       </div>
                       </div>
                       <div class="right-part">
                       <div class="right-part">
-                        <el-pagination background layout="prev, pager, next" :total="total" />
+                        <el-pagination v-model:current-page="pageNum" @current-change="getTableData" background layout="prev, pager, next" :total="total" />
                       </div>
                       </div>
                     </div>
                     </div>
                   </div> 
                   </div>