Browse Source

工作台页面优化

lizhenhao 2 years ago
parent
commit
3cede5e1b5
1 changed files with 24 additions and 6 deletions
  1. 24 6
      src/views/modules/sys/dashboard/workBench/Pending.vue

+ 24 - 6
src/views/modules/sys/dashboard/workBench/Pending.vue

@@ -7,7 +7,7 @@
           <div class="page" style="height: calc(100% - 0px);">
           <div class="page" style="height: calc(100% - 0px);">
             <div class="top bg-white" style="height: calc(100% - 10px);border: 1px solid #c8ced4;padding-top: 15px">
             <div class="top bg-white" style="height: calc(100% - 10px);border: 1px solid #c8ced4;padding-top: 15px">
               <div style="height: 18px" >
               <div style="height: 18px" >
-                <span>我的待办</span><el-badge class="mark" v-if="tablePage.total !== 0" :value="tablePage.total" :max="99" style="padding: 0px 0 -7px 0"/>
+                <span>我的待办</span><el-badge class="mark" v-if="tablePage.total !== 0" :value="tablePage.total" :max="99"/>
                 <div style="float:right;align-items:center;display:flex;height: 18px">
                 <div style="float:right;align-items:center;display:flex;height: 18px">
                   <el-button type="text" style="float:right" @click="resetSearch()">刷新</el-button>
                   <el-button type="text" style="float:right" @click="resetSearch()">刷新</el-button>
                   <el-button type="text" style="float:right" @click="toPendingList()">更多>></el-button>
                   <el-button type="text" style="float:right" @click="toPendingList()">更多>></el-button>
@@ -89,7 +89,7 @@
           <div class="page" style="height: calc(100% - 0px);">
           <div class="page" style="height: calc(100% - 0px);">
             <div class="top bg-white" style="height: calc(100% - 10px);border: 1px solid #c8ced4;padding-top: 15px">
             <div class="top bg-white" style="height: calc(100% - 10px);border: 1px solid #c8ced4;padding-top: 15px">
               <div style="height: 18px" >
               <div style="height: 18px" >
-                <span>我的通知</span><el-badge  v-if="noticePageList.total !== 0" :value="noticePageList.total" :max="99" />
+                <span>我的通知</span><el-badge class="mark" v-if="noticePageList.total !== 0" :value="noticePageList.total" :max="99" />
                 <div style="float:right;align-items:center;display:flex;height: 18px">
                 <div style="float:right;align-items:center;display:flex;height: 18px">
                   <el-button type="text" style="float:right" @click="toNoticeList()">更多>></el-button>
                   <el-button type="text" style="float:right" @click="toNoticeList()">更多>></el-button>
                 </div>
                 </div>
@@ -100,7 +100,7 @@
                   auto-resize
                   auto-resize
                   resizable
                   resizable
                   height="auto"
                   height="auto"
-                  :loading="loading"
+                  :loading="loading3"
                   size="small"
                   size="small"
                   ref="noticetable"
                   ref="noticetable"
                   show-header-overflow
                   show-header-overflow
@@ -137,7 +137,7 @@
                   :total="noticePageList.total"
                   :total="noticePageList.total"
                   :page-sizes="[10, 20, 100, 1000, {label: '全量数据', value: 1000000}]"
                   :page-sizes="[10, 20, 100, 1000, {label: '全量数据', value: 1000000}]"
                   :layouts="['PrevPage', 'JumpNumber', 'NextPage', 'FullJump', 'Sizes', 'Total']"
                   :layouts="['PrevPage', 'JumpNumber', 'NextPage', 'FullJump', 'Sizes', 'Total']"
-                  @page-change="currentChangeHandle">
+                  @page-change="noticePageListChangeHandle">
                 </vxe-pager>
                 </vxe-pager>
               </div>
               </div>
               <!-- 弹窗, 新增 / 修改 -->
               <!-- 弹窗, 新增 / 修改 -->
@@ -281,6 +281,7 @@
         },
         },
         loading: false,
         loading: false,
         loading2: false,
         loading2: false,
+        loading3: false,
         visible: false,
         visible: false,
         currentTask: null,
         currentTask: null,
         processInstanceId: '',
         processInstanceId: '',
@@ -358,7 +359,6 @@
     // watch: {
     // watch: {
     // },
     // },
     mounted () {
     mounted () {
-      console.log('123')
       // 页面加载后
       // 页面加载后
       // 1.在执行定时器前先执行一次获取接口数据的操作函数, 否则接口会1秒钟后才调用
       // 1.在执行定时器前先执行一次获取接口数据的操作函数, 否则接口会1秒钟后才调用
       // 2.为了避免退出当前页面后,在其他页面也继续调用接口,退出前需要清除定时器.
       // 2.为了避免退出当前页面后,在其他页面也继续调用接口,退出前需要清除定时器.
@@ -398,6 +398,7 @@
       refreshList () {
       refreshList () {
         this.loading = true
         this.loading = true
         this.loading2 = true
         this.loading2 = true
+        this.loading3 = true
         this.taskService.todoList({
         this.taskService.todoList({
           'current': this.tablePage.currentPage,
           'current': this.tablePage.currentPage,
           'size': this.tablePage.pageSize,
           'size': this.tablePage.pageSize,
@@ -428,7 +429,7 @@
         }).then(({data}) => {
         }).then(({data}) => {
           this.dataNoticeList = data.records
           this.dataNoticeList = data.records
           this.noticePageList.total = data.total
           this.noticePageList.total = data.total
-          this.loading = false
+          this.loading3 = false
         })
         })
       },
       },
       // 排序
       // 排序
@@ -457,6 +458,23 @@
         })
         })
         // this.refreshList()
         // this.refreshList()
       },
       },
+      noticePageListChangeHandle ({ currentPage, pageSize }) {
+        this.loading3 = true
+        this.noticePageList.currentPage = currentPage
+        this.noticePageList.pageSize = pageSize
+        this.noticeService.list({
+          'current': this.noticePageList.currentPage,
+          'size': this.noticePageList.pageSize,
+          'orders': this.noticePageList.orders,
+          type: '0',
+          ...this.searchForm
+        }).then(({data}) => {
+          this.dataNoticeList = data.records
+          this.noticePageList.total = data.total
+          this.loading3 = false
+        })
+        // this.refreshList()
+      },
       noticeChangeHandle ({ currentPage, pageSize }) {
       noticeChangeHandle ({ currentPage, pageSize }) {
         this.loading2 = true
         this.loading2 = true
         this.noticePage.currentPage = currentPage
         this.noticePage.currentPage = currentPage