人员搜索 适配下拉触底加载
This commit is contained in:
parent
232f8ca325
commit
fe909584c1
@ -202,7 +202,8 @@
|
|||||||
|
|
||||||
<query-selector :multiple="selectorInfo.isMultiple" :show="selectorInfo.showPopup"
|
<query-selector :multiple="selectorInfo.isMultiple" :show="selectorInfo.showPopup"
|
||||||
:defaultChecked="selectorInfo.defaultChecked" :title="selectorInfo.title" :lists="selectorInfo.dataLists"
|
:defaultChecked="selectorInfo.defaultChecked" :title="selectorInfo.title" :lists="selectorInfo.dataLists"
|
||||||
@search="handleSearch" @select="handleSelected" @close="selectorInfo.showPopup=false" />
|
@search="handleSearch" @select="handleSelected" @close="selectorInfo.showPopup=false"
|
||||||
|
:total="selectorInfo.totalCount" />
|
||||||
|
|
||||||
<view class="bottom-button">
|
<view class="bottom-button">
|
||||||
<button type="primary"
|
<button type="primary"
|
||||||
@ -243,7 +244,7 @@
|
|||||||
} from '../../../../services/apply/subPages/BS/safeCheck'
|
} from '../../../../services/apply/subPages/BS/safeCheck'
|
||||||
|
|
||||||
import {
|
import {
|
||||||
OrderPagedUseful2,
|
UserPagedLimit,
|
||||||
auditOptionShow,
|
auditOptionShow,
|
||||||
getEnum
|
getEnum
|
||||||
} from '../../../../services/common'
|
} from '../../../../services/common'
|
||||||
@ -345,6 +346,7 @@
|
|||||||
isSubShow: false,
|
isSubShow: false,
|
||||||
isMultiple: false,
|
isMultiple: false,
|
||||||
showPopup: false,
|
showPopup: false,
|
||||||
|
totalCount: 0,
|
||||||
title: '检查人员',
|
title: '检查人员',
|
||||||
itemData: {},
|
itemData: {},
|
||||||
index: 0,
|
index: 0,
|
||||||
@ -720,7 +722,7 @@
|
|||||||
//下拉数据加载
|
//下拉数据加载
|
||||||
async handleShowSheet(p) {
|
async handleShowSheet(p) {
|
||||||
const orgId = uni.getStorageSync('orgId')
|
const orgId = uni.getStorageSync('orgId')
|
||||||
const json = initFilter(orgId, "", "", 0)
|
const json = initFilter(orgId, "", "", 0, p.pageIndex ?? 1)
|
||||||
let dataSelect = []
|
let dataSelect = []
|
||||||
// this.selectorInfo.defaultChecked = []
|
// this.selectorInfo.defaultChecked = []
|
||||||
var defaultChecked = []
|
var defaultChecked = []
|
||||||
@ -944,17 +946,13 @@
|
|||||||
if (p.val) {
|
if (p.val) {
|
||||||
extendRule(json, 'NAME', 9, p.val);
|
extendRule(json, 'NAME', 9, p.val);
|
||||||
}
|
}
|
||||||
|
json.Limit = 20
|
||||||
json.Sort = 'NAME'
|
json.Sort = 'NAME'
|
||||||
|
if (p.pageIndex) {
|
||||||
// if (this.model.CHECKOBJECT != 0) {
|
json.Start = (p.pageIndex - 1) * json.Limit;
|
||||||
// json.FilterGroup.Rules.push({
|
}
|
||||||
// 'Field': "MineType",
|
dataSelect = await UserPagedLimit(json).then(res => {
|
||||||
// 'Operate': 1,
|
this.selectorInfo.totalCount = res.TotalCount
|
||||||
// 'Value': this.model.CHECKOBJECT
|
|
||||||
// })
|
|
||||||
// }
|
|
||||||
|
|
||||||
dataSelect = await OrderPagedUseful2(json).then(res => {
|
|
||||||
if (res.Data != undefined && res.Data.length > 0) {
|
if (res.Data != undefined && res.Data.length > 0) {
|
||||||
for (let i = 0; i < res.Data.length; i++) {
|
for (let i = 0; i < res.Data.length; i++) {
|
||||||
res.Data[i].name = res.Data[i].NAME,
|
res.Data[i].name = res.Data[i].NAME,
|
||||||
@ -963,7 +961,6 @@
|
|||||||
}
|
}
|
||||||
return res.Data
|
return res.Data
|
||||||
})
|
})
|
||||||
|
|
||||||
// this.selectorInfo.defaultChecked = []
|
// this.selectorInfo.defaultChecked = []
|
||||||
if (this.model.Nav_ListCheckUser != null && this.model.Nav_ListCheckUser.length > 0 && this.model
|
if (this.model.Nav_ListCheckUser != null && this.model.Nav_ListCheckUser.length > 0 && this.model
|
||||||
.Nav_ListCheckUser[0].Nav_User != null) {
|
.Nav_ListCheckUser[0].Nav_User != null) {
|
||||||
@ -1025,8 +1022,10 @@
|
|||||||
defaultChecked = []
|
defaultChecked = []
|
||||||
if (dataSelect.length) {
|
if (dataSelect.length) {
|
||||||
this.selectorInfo = {
|
this.selectorInfo = {
|
||||||
itemData:p.itemData!=undefined ?p.itemData: this.selectorInfo.itemData,//itemData: p.itemData, 搜索的时候 p.itemData为空 赋值修改 为 她自己本身 this.selectorInfo.itemData
|
itemData: p.itemData != undefined ? p.itemData : this.selectorInfo
|
||||||
|
.itemData, //itemData: p.itemData, 搜索的时候 p.itemData为空 赋值修改 为 她自己本身 this.selectorInfo.itemData
|
||||||
isMultiple: this.selectorInfo.isMultiple,
|
isMultiple: this.selectorInfo.isMultiple,
|
||||||
|
totalCount: this.selectorInfo.totalCount,
|
||||||
showPopup: true,
|
showPopup: true,
|
||||||
title: p.title,
|
title: p.title,
|
||||||
name: p.name,
|
name: p.name,
|
||||||
@ -1279,11 +1278,12 @@
|
|||||||
},
|
},
|
||||||
|
|
||||||
//数据加载
|
//数据加载
|
||||||
handleSearch(val) {
|
handleSearch(val, pageIndex) {
|
||||||
var p = {
|
var p = {
|
||||||
name: this.selectorInfo.name,
|
name: this.selectorInfo.name,
|
||||||
title: this.selectorInfo.title,
|
title: this.selectorInfo.title,
|
||||||
val: val
|
val: val,
|
||||||
|
pageIndex: pageIndex
|
||||||
}
|
}
|
||||||
this.handleShowSheet(p)
|
this.handleShowSheet(p)
|
||||||
|
|
||||||
|
|||||||
@ -73,6 +73,30 @@ export function OrderPagedUseful2(params) {
|
|||||||
})
|
})
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
//获取用户信息 班组做限制
|
||||||
|
export function UserPagedLimit(params) {
|
||||||
|
return new Promise((resolve, reject) => {
|
||||||
|
request.post("/FM/FMUser/OrderPagedUseful", params).then((result) => {
|
||||||
|
if (result.IsSuccessful) {
|
||||||
|
resolve(result);
|
||||||
|
}
|
||||||
|
}).catch((error) => {
|
||||||
|
reject(error);
|
||||||
|
})
|
||||||
|
})
|
||||||
|
}
|
||||||
|
//获取用户信息 不做限制
|
||||||
|
export function UserPagedAll(params) {
|
||||||
|
return new Promise((resolve, reject) => {
|
||||||
|
request.post("/FM/User/OrderPaged", params).then((result) => {
|
||||||
|
if (result.IsSuccessful) {
|
||||||
|
resolve(result);
|
||||||
|
}
|
||||||
|
}).catch((error) => {
|
||||||
|
reject(error);
|
||||||
|
})
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
//未删除 不包含 admin
|
//未删除 不包含 admin
|
||||||
export function OrderPagedUser(params) {
|
export function OrderPagedUser(params) {
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user