桌台增加分页
This commit is contained in:
parent
fed49cb781
commit
1de0a53abe
|
|
@ -22,7 +22,7 @@
|
|||
<input v-model="search.keyword" @confirm="searchConfirm" type="text"
|
||||
placeholder-style="font-size:28rpx;" placeholder="搜索" />
|
||||
</view>
|
||||
<view @tap.stop="hideSearch" v-if="search.show">取消</view>
|
||||
<view @tap.stop="clearSearch" v-if="search.show">取消</view>
|
||||
</view>
|
||||
</view>
|
||||
<view :style="{height:times.show?timesHeight:0}" class="tranistion status overflow-hide">
|
||||
|
|
@ -34,7 +34,7 @@
|
|||
<view :style="{height: status.bottomHeight+'px'}"></view>
|
||||
</view>
|
||||
<view :style="{height:status.show?statusHeight:0}" class="tranistion status overflow-hide">
|
||||
<view @tap="changestatusActive(index)" class="u-flex u-p-l-30 lh30 u-p-r-30 u-row-between"
|
||||
<view @tap="changestatusActive(index,item)" class="u-flex u-p-l-30 lh30 u-p-r-30 u-row-between"
|
||||
v-for="(item,index) in status.list" :key="index">
|
||||
<view>{{item.label}}</view>
|
||||
<uni-icons v-if="status.active===index" type="checkmarkempty" :color="color.ColorMain"></uni-icons>
|
||||
|
|
@ -246,12 +246,16 @@
|
|||
|
||||
function searchConfirm() {
|
||||
hideSearch()
|
||||
filterTableList()
|
||||
query.page=1;
|
||||
getTable()
|
||||
// tables.list = tables.originList.filter((v) =>
|
||||
// v.name.includes(search.keyword.trim())
|
||||
// );
|
||||
}
|
||||
|
||||
function clearSearch(){
|
||||
search.keyword=''
|
||||
hideSearch()
|
||||
}
|
||||
function hideSearch() {
|
||||
search.show = false
|
||||
maskHide()
|
||||
|
|
@ -406,13 +410,14 @@
|
|||
query.areaId = item.id
|
||||
}
|
||||
async function getTable() {
|
||||
let state=status.list[status.active].key
|
||||
state=state?(state=='all'?'':state):''
|
||||
const {
|
||||
content,total
|
||||
} = await $table.get(query)
|
||||
} = await $table.get({...query,name:search.keyword,state})
|
||||
tables.hasAjax = true
|
||||
query.totalElements=total||0
|
||||
tables.originList = content
|
||||
filterTableList()
|
||||
tables.list = content
|
||||
}
|
||||
const areaMap = ref({})
|
||||
async function getArea() {
|
||||
|
|
@ -441,17 +446,8 @@
|
|||
// tables.list = tables.originList.filter((v) => {
|
||||
// return v.status == status.list[status.active].key
|
||||
// });
|
||||
filterTableList()
|
||||
getTable()
|
||||
})
|
||||
|
||||
function filterTableList() {
|
||||
tables.list = tables.originList.filter((v) => {
|
||||
console.log(status.list[status.active].key);
|
||||
return (status.active == 0 ? true : v.status == status.list[status.active].key) && (
|
||||
v.name.includes(search.keyword.trim())
|
||||
)
|
||||
});
|
||||
}
|
||||
watch(() => times.active, (newval) => {
|
||||
setTimer()
|
||||
})
|
||||
|
|
|
|||
Loading…
Reference in New Issue