Zhang Li, BBF-411-2(Neusoft) 1 рік тому
батько
коміт
14dd5d04fb

+ 14 - 3
src/views/modules/knowledge/statistics/components/orgPeople.vue

@@ -143,6 +143,7 @@
             ],
             userData: [],
             personId: [],
+            personIdArr: [],
             radioStyle: {
                 display: 'block',
                 height: '40px',
@@ -216,6 +217,10 @@
             this.getTreeData()
             this.orgData = []
             this.userData = []
+            this.queryParam.pageNo = 1
+            this.queryParam.pageSize = 10
+            this.personId = []
+            this.personIdArr = []
             this.getOrgListByGroupId()
         },
         //组织结构
@@ -255,6 +260,8 @@
                 this.queryParam.pageNo = 1
                 this.queryParam.pageSize = 10
                 this.queryParam.params.groupId = data.pkId
+                this.personId = []
+                this.personIdArr = []
                 this.getOrgListByGroupId()
             }
         },
@@ -280,7 +287,7 @@
                 }
             }
         },
-        getOrgListByGroupId() {
+        getOrgListByGroupId(arg = false) {
             OsUserApi.getAllUserByGroupId(this.queryParam).then(res=> {
                 if(res.code == 200) {
                     this.userData = res.result.data.map(item => {
@@ -289,7 +296,10 @@
                             userId: item.userNo != 'admin' ? item.userNo  : 1
                         }
                     })
-                    this.total = res.count
+                    if(arg) {
+                        this.personId = this.personIdArr[this.queryParam.pageNo-1]
+                    }
+                    this.total = res.totalCount
                 }
             })
             // OsRelInstApi.getUserListByGroupIdAndRelTypeId(this.queryParam).then(res => {
@@ -303,12 +313,13 @@
             // })
         },
         handlePageNumChange(arg) {
+            this.personIdArr[this.queryParam.pageNo-1] = this.personId
             if(arg == '-') {
                 this.queryParam.pageNo--
             } else {
                 this.queryParam.pageNo++
             }
-            this.getOrgListByGroupId()
+            this.getOrgListByGroupId(true)
         },
          // 多选节点
         check(selKeys, e) {

+ 13 - 3
src/views/modules/knowledge/statistics/sMixin/statisticsMixin.js

@@ -127,9 +127,19 @@ export default (titlePromise) => {
       },
       handleSaveOk() {
         if(this.isOrgOrUser == 1) {
-          let info = this.$refs.orgModalRef.personId
-          this.staffName = info.map(item => item.split('/')[0]).join('/')
-          this.staffForm.personId = info.map(item => item.split('/')[1])
+          let info1 = this.$refs.orgModalRef.personId
+          let info2 = this.$refs.orgModalRef.personIdArr
+          let num = this.$refs.orgModalRef.queryParam.pageNo - 1
+          info2[num] = []
+          if(info2.length) {
+            for(let i of info2) {
+              if(i && i.length) {
+                info1.push(...i)
+              }
+            }
+          }
+          this.staffName = info1.map(item => item.split('/')[0]).join('/')
+          this.staffForm.personId = info1.map(item => item.split('/')[1])
         } else {
           let info = this.$refs.orgModalRef.checkedTargets
           this.orgName = info.organizationName.join('/')