|  | @@ -60,6 +60,7 @@
 | 
	
		
			
				|  |  |            <el-form-item label="选择用户" prop="">
 | 
	
		
			
				|  |  |              <el-select
 | 
	
		
			
				|  |  |                v-model="selectedUsers"
 | 
	
		
			
				|  |  | +               v-loadmore="loadMore"
 | 
	
		
			
				|  |  |                placeholder="请选择"
 | 
	
		
			
				|  |  |                multiple
 | 
	
		
			
				|  |  |                style="width: 100%"
 | 
	
	
		
			
				|  | @@ -91,7 +92,11 @@ export default {
 | 
	
		
			
				|  |  |        userOptions: [],
 | 
	
		
			
				|  |  |        oldSelectedUsers: [],
 | 
	
		
			
				|  |  |        selectedUsers: [],
 | 
	
		
			
				|  |  | -      list: []
 | 
	
		
			
				|  |  | +      list: [],
 | 
	
		
			
				|  |  | +      current: 1,
 | 
	
		
			
				|  |  | +      size: 50,
 | 
	
		
			
				|  |  | +      total: 0,
 | 
	
		
			
				|  |  | +      loading: false   // 防止重复请求
 | 
	
		
			
				|  |  |      }
 | 
	
		
			
				|  |  |    },
 | 
	
		
			
				|  |  |    created () {
 | 
	
	
		
			
				|  | @@ -103,12 +108,20 @@ export default {
 | 
	
		
			
				|  |  |        this.getSelectedUsers()
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |        this.chooseUserVisible = true
 | 
	
		
			
				|  |  | +      this.getUsers()
 | 
	
		
			
				|  |  | +    },
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +    async getUsers () {
 | 
	
		
			
				|  |  |        this.$http({
 | 
	
		
			
				|  |  |          url: this.$http.adornUrl(`/user-service/user/queryWithSelectedItems`),
 | 
	
		
			
				|  |  |          method: 'get',
 | 
	
		
			
				|  |  | -        data: { current: 1, size: 50 }
 | 
	
		
			
				|  |  | +        params: this.$http.adornParams({
 | 
	
		
			
				|  |  | +          'current': this.current,
 | 
	
		
			
				|  |  | +          'size': this.size
 | 
	
		
			
				|  |  | +        })
 | 
	
		
			
				|  |  |        }).then(({ data }) => {
 | 
	
		
			
				|  |  |          if (data && data.code === '200') {
 | 
	
		
			
				|  |  | +          this.total = data.data.pageUsers.total
 | 
	
		
			
				|  |  |            let users = data.data.pageUsers.records
 | 
	
		
			
				|  |  |            if (users != null && users.length > 0) {
 | 
	
		
			
				|  |  |              users.map((t) => {
 | 
	
	
		
			
				|  | @@ -118,6 +131,15 @@ export default {
 | 
	
		
			
				|  |  |          }
 | 
	
		
			
				|  |  |        })
 | 
	
		
			
				|  |  |      },
 | 
	
		
			
				|  |  | +    // 滚动到底部时触发
 | 
	
		
			
				|  |  | +    async loadMore () {
 | 
	
		
			
				|  |  | +      if (this.loading || this.userOptions.length >= this.total) return
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +      this.loading = true
 | 
	
		
			
				|  |  | +      this.current++
 | 
	
		
			
				|  |  | +      await this.getUsers()  // 请求下一页数据
 | 
	
		
			
				|  |  | +      this.loading = false
 | 
	
		
			
				|  |  | +    },
 | 
	
		
			
				|  |  |      // 提交用户
 | 
	
		
			
				|  |  |      userSubmit () {
 | 
	
		
			
				|  |  |        // let addUserIds = []
 |