فهرست منبع

Merge remote-tracking branch 'origin/release-201821-wangcz' into release-201821-wangcz

# Conflicts:
#	components/mobile/staffManagement/StaffList.vue
wangcz 7 سال پیش
والد
کامیت
bb7add6080
3فایلهای تغییر یافته به همراه39 افزوده شده و 20 حذف شده
  1. 2 2
      assets/scss/mobileCommon.scss
  2. 5 2
      components/common/loading/Loading.vue
  3. 32 16
      components/mobile/staffManagement/StaffList.vue

+ 2 - 2
assets/scss/mobileCommon.scss

@@ -327,9 +327,9 @@ html {
 //}
 
 /*loading优先级*/
-.loading {
+/*.loading {
   z-index: 100000 !important;
-}
+}*/
 
 .mobile-content {
   padding-top: .88rem !important;

+ 5 - 2
components/common/loading/Loading.vue

@@ -1,5 +1,5 @@
 <template lang="html">
-  <div class="loading" v-show="loading" id="loading">
+  <div class="loading" :class="{'mobile': isMobile}" v-show="loading" id="loading">
     <!--<img src="/images/all/loading.gif" alt="">-->
     <div class="wrap">
       <div class="outer"></div>
@@ -21,7 +21,7 @@
     }
   }
 </script>
-<style scoped>
+<style scoped lang="scss">
   @keyframes spin {
     0%   { transform: rotate(360deg); }
     100% { transform: rotate(0deg); }
@@ -39,6 +39,9 @@
     height: 100%;
     z-index: 1000;
     text-align: center;
+    &.mobile {
+      z-index: 100000 !important;
+     }
   }
 
   .loading img {

+ 32 - 16
components/mobile/staffManagement/StaffList.vue

@@ -64,7 +64,7 @@
         </div>
         <empty-status :type="'collect'" :showLink="true" :text="'抱歉,没有相关信息'" v-else></empty-status>
       </div>
-      <pull-up :fixId="'auditFixContent'" :searchMore="fetching" :allPage="allPageAudit" :page="page" @pullUpAction="onPullUpAction"></pull-up>
+      <pull-up :fixId="'auditFixContent'" :searchMore="fetch" :allPage="allPageAudit" :page="page" @pullUpAction="onPullUpAudit"></pull-up>
     </div>
     <!--删除员工-->
     <div class="deleteKuang" v-if="showDelete">
@@ -92,6 +92,7 @@
         page: 1,
         count: 10,
         staffSearch: '',
+        staffDataList: [],
         auditSearch: '',
         AuditList: [],
         isChange: false,
@@ -126,16 +127,18 @@
       })
     },
     watch: {
-      // 'buyerAccount': {
-      //   handler: function (val) {
-      //     if (val && val.content) {
-      //       if (this.isChange) {
-      //         this.accountList = []
-      //         this.isChange = false
-      //       }
-      //       this.accountList = [...this.accountList, ...val.content]
-      //     }
-      //   }
+      'staffData': {
+        handler: function (val) {
+          if (this.isChange) {
+            this.staffDataList = val.content
+            this.isChange = false
+          } else {
+            this.staffDataList = [...this.staffDataList, ...val.content]
+          }
+          console.log(this.staffDataList, '1213')
+        },
+        immediate: true
+      },
       'auditBind': {
         handler: function (val) {
           if (this.isChange) {
@@ -150,12 +153,18 @@
     },
     computed: {
       staffData () {
-        return this.$store.state.staff.infoList.info.data.content
+        return this.$store.state.staff.infoList.info.data
+      },
+      fetching () {
+        return this.staffData.fetching
+      },
+      allPage () {
+        return Math.floor(this.staffData.totalElements / this.staffData.size) + Math.floor(this.staffData.totalElements % this.staffData.size > 0 ? 1 : 0)
       },
       auditBind () {
         return this.$store.state.staff.infoList.audit.data.content ? this.$store.state.staff.infoList.audit.data.content : {}
       },
-      fetching () {
+      fetch () {
         return this.$store.state.staff.infoList.audit.fetching
       },
       allPageAudit () {
@@ -182,6 +191,13 @@
             console.log(err)
         })
       },
+      staffList () {
+        this.$store.dispatch('staff/loadStaffList', {count: this.count, page: this.page, enuu: this.userInfo.enterprise.uu})
+      },
+      onPullUpAction: function () {
+        this.page++
+        this.staffList()
+      },
       goEdit (item) {
         this.$store.commit('staff/infoList/EDIT_DATA_SUCCESS', item)
         this.$router.push('/mobile/user/staff/edit')
@@ -243,14 +259,13 @@
         this.isChange = true
         this.$store.dispatch('staff/loadBindAudit', {count: this.count, page: this.page, speaceUU: this.user.data.enterprise.uu, status: 311, keyword: this.auditSearch})
       },
-      onPullUpAction () {
+      onPullUpAudit () {
         this.page++
         this.auditRecord()
       },
       sureDelete () {
         this.$http.delete('/basic/user/' + this.currentObject.userUU)
           .then(response => {
-            console.log(response)
             this.showDelete = false
             this.onRemind('用户' + this.currentObject.userUU + '删除成功')
             this.staffData()
@@ -351,7 +366,7 @@
         .staff-list {
           width: 100%;
           .list-item {
-            margin-bottom: .24rem;
+            margin-bottom: .14rem;
             &:last-child{
               padding-bottom: 0;
             }
@@ -369,6 +384,7 @@
             }
             span.role{
               display: inline-block;
+              margin-right: .1rem;
               padding: 0 .05rem;
               height: .25rem;
               line-height: .25rem;