修复桌台筛选条件为并的关系
修复桌台刷新时未根据筛选条件筛选台桌
This commit is contained in:
@@ -4,19 +4,16 @@
|
||||
<view class="u-flex u-flex-1 u-row-between">
|
||||
<view class="u-flex u-p-t-30 u-p-b-30 u-flex-1 u-row-center" @tap="showsTimesToggle">
|
||||
<text class="u-m-r-12">{{times.list[times.active]}}秒</text>
|
||||
<image src="/pageTable/static/images/icon-arrow-down-fill.svg" class="icon-arrow-down-fill"
|
||||
mode="">
|
||||
<image src="/pageTable/static/images/icon-arrow-down-fill.svg" class="icon-arrow-down-fill" mode="">
|
||||
</image>
|
||||
</view>
|
||||
<view class="u-flex u-p-t-30 u-p-b-30 u-flex-1 u-row-center" @tap="showstatusToggle">
|
||||
<text class="u-m-r-12"
|
||||
:class="{'color-main':status.active!=0}">{{status.list[status.active].label }}</text>
|
||||
<image src="/pageTable/static/images/icon-arrow-down-fill.svg" class="icon-arrow-down-fill"
|
||||
mode="">
|
||||
<image src="/pageTable/static/images/icon-arrow-down-fill.svg" class="icon-arrow-down-fill" mode="">
|
||||
</image>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view style="width: 164rpx;"></view>
|
||||
<view class="search-box">
|
||||
<view class="search-btn u-flex" @tap="showSearch" :style="{width:search.show?'694rpx':'164rpx'}">
|
||||
@@ -184,9 +181,10 @@
|
||||
|
||||
function searchConfirm() {
|
||||
hideSearch()
|
||||
tables.list = tables.originList.filter((v) =>
|
||||
v.name.includes(search.keyword.trim())
|
||||
);
|
||||
filterTableList()
|
||||
// tables.list = tables.originList.filter((v) =>
|
||||
// v.name.includes(search.keyword.trim())
|
||||
// );
|
||||
}
|
||||
|
||||
function hideSearch() {
|
||||
@@ -340,8 +338,8 @@
|
||||
content
|
||||
} = await $table.get(query)
|
||||
tables.hasAjax = true
|
||||
tables.list = content
|
||||
tables.originList = content
|
||||
filterTableList()
|
||||
}
|
||||
const areaMap = ref({})
|
||||
async function getArea() {
|
||||
@@ -364,13 +362,23 @@
|
||||
})
|
||||
watch(() => status.active, (newval) => {
|
||||
query.page = 0
|
||||
if (newval === 0) {
|
||||
return tables.list = tables.originList
|
||||
}
|
||||
tables.list = tables.originList.filter((v) => {
|
||||
return v.status == status.list[status.active].key
|
||||
});
|
||||
// if (newval === 0) {
|
||||
// return tables.list = tables.originList
|
||||
// }
|
||||
// tables.list = tables.originList.filter((v) => {
|
||||
// return v.status == status.list[status.active].key
|
||||
// });
|
||||
filterTableList()
|
||||
})
|
||||
|
||||
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()
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user