Merge pull request 'fix:排序功能修改完成' (#159) from fix/change_task into test

Reviewed-on: #159
pull/160/head
赵辉 1 year ago
commit 926c09d83f

@ -125,6 +125,9 @@ function handleKeydown(event) {
isFullScreen.value = false; isFullScreen.value = false;
// batchModalRef.value.closeModal() // batchModalRef.value.closeModal()
} else if (event.keyCode === 27) {
overTask.value = null;
overTasktwo.value = null;
} else if (event.key === "p" || event.key === "P") { } else if (event.key === "p" || event.key === "P") {
// //
const now = Date.now(); const now = Date.now();
@ -592,13 +595,6 @@ function checkBottom() {
} }
}, 500); }, 500);
} }
function reset() {
taskpagination.pageNo = 0;
taskpagination.pageSize = 20;
taskDetailPictureList.value.length = 0;
loading.value = false;
canloadMore = true;
}
async function loadMore() { async function loadMore() {
console.log(loading.value); console.log(loading.value);
@ -625,6 +621,22 @@ async function fetchList() {
return []; return [];
} }
} }
async function reset() {
pagination.pageNo = 0;
pagination.pageSize = 30;
taskDetailPictureList.value.length = 0;
loading.value = false;
canloadMore = true;
// layout()
}
async function refreshHandler() {
getImgList();
}
function sortHandler(orderby: "similarityScore" | "createdate") {
sortBy.orderName = orderby;
sortBy.orderType = sortBy.orderType === "asc" ? "desc" : "asc";
refreshHandler();
}
</script> </script>
<template> <template>
@ -742,7 +754,7 @@ async function fetchList() {
" "
> >
<div <div
v-show="!imgbigshow" v-show="!imgbigshow"
class="aside-collapse-btn" class="aside-collapse-btn"
@click="collapseHandler" @click="collapseHandler"
:style="{ :style="{
@ -750,7 +762,7 @@ async function fetchList() {
right: '0px', right: '0px',
top: '155px', top: '155px',
cursor: 'pointer', cursor: 'pointer',
zIndex:100 zIndex: 100,
}" }"
> >
<SvgIcon <SvgIcon
@ -885,7 +897,10 @@ async function fetchList() {
size="16" size="16"
name="camera-time" name="camera-time"
/> />
  <span>{{ taskDetailInfo?.ocrPicture?.photoDateTimestamp ?? "-" }}</span>  
<span>{{
taskDetailInfo?.ocrPicture?.photoDateTimestamp ?? "-"
}}</span>
</div> </div>
<div class="time-item time-item2"> <div class="time-item time-item2">
<SvgIcon <SvgIcon
@ -927,7 +942,7 @@ async function fetchList() {
" "
> >
<div <div
v-show="isFullScreen" v-show="isFullScreen"
class="aside-collapse-btn" class="aside-collapse-btn"
@click="collapseHandler" @click="collapseHandler"
:style="{ :style="{
@ -1163,13 +1178,36 @@ async function fetchList() {
> >
<div style="cursor: pointer" @click="sortHandler('createdate')"> <div style="cursor: pointer" @click="sortHandler('createdate')">
<span>时间排序</span> <span>时间排序</span>
<SvgIcon style="margin-left: 5px" name="sort" size="12" /> <SvgIcon
<SvgIcon style="margin-left: 5px" name="active-sort" size="12" /> v-if="true"
style="margin-left: 5px"
name="sort"
size="12"
/>
<SvgIcon
v-else
style="margin-left: 5px"
name="active-sort"
size="12"
/>
</div> </div>
<div style="margin-left: 15px; cursor: pointer"> <div
style="margin-left: 15px; cursor: pointer"
@click="sortHandler('similarityScore')"
>
<span>相似度排序</span> <span>相似度排序</span>
<SvgIcon style="margin-left: 5px" name="sort" size="12" /> <SvgIcon
<SvgIcon style="margin-left: 5px" name="active-sort" size="12" /> v-if="true"
style="margin-left: 5px"
name="sort"
size="12"
/>
<SvgIcon
v-else
style="margin-left: 5px"
name="active-sort"
size="12"
/>
</div> </div>
</div> </div>
</div> </div>
@ -1365,7 +1403,6 @@ async function fetchList() {
</template> </template>
<style lang="less" scoped> <style lang="less" scoped>
.fullscreen-container { .fullscreen-container {
overflow-y: auto; overflow-y: auto;
/* 可添加其他样式 */ /* 可添加其他样式 */

Loading…
Cancel
Save