|
@@ -158,13 +158,10 @@ const remarkCount = computed(() => {
|
|
|
return store.setting?.remarkCount;
|
|
|
});
|
|
|
const limitPageSize = computed(() => {
|
|
|
- return typeof remarkCount.value == "number"
|
|
|
- ? remarkCount.value <= 20
|
|
|
- ? remarkCount.value
|
|
|
- : currentPage * 20 > remarkCount.value
|
|
|
- ? remarkCount.value % 20
|
|
|
- : 20
|
|
|
- : 20;
|
|
|
+ // return typeof remarkCount.value == "number"
|
|
|
+ // ? remarkCount.value
|
|
|
+ // : 20
|
|
|
+ return 20;
|
|
|
});
|
|
|
const hasLimit = computed(() => {
|
|
|
console.log("remarkCount.value:", remarkCount.value);
|
|
@@ -280,6 +277,13 @@ EventBus.on("should-reload-history", () => {
|
|
|
if (res?.data) {
|
|
|
// let data = cloneDeep(res.data);
|
|
|
let data = remarkCount.value === 0 ? [] : cloneDeep(res.data);
|
|
|
+ if (
|
|
|
+ typeof remarkCount.value == "number" &&
|
|
|
+ remarkCount.value > 0 &&
|
|
|
+ (currentPage - 1) * 20 + data.length > remarkCount.value
|
|
|
+ ) {
|
|
|
+ data = data.slice(0, remarkCount.value % 20);
|
|
|
+ }
|
|
|
data = data.map(addFileServerPrefixToTask);
|
|
|
if (store.currentTask) {
|
|
|
// 这种方式(对象被重新构造了)能查找到index,我也很惊讶
|
|
@@ -325,22 +329,18 @@ async function updateHistoryTask({
|
|
|
};
|
|
|
let key = searchType == "1" ? "secretNumber" : "markerScore";
|
|
|
params[key] = secretNumber;
|
|
|
- // const res = await getHistory({
|
|
|
- // pageNumber,
|
|
|
- // pageSize,
|
|
|
- // order,
|
|
|
- // sort,
|
|
|
- // secretNumber,
|
|
|
- // subjectCode,
|
|
|
- // groupNumber,
|
|
|
- // markerId,
|
|
|
- // markerScore,
|
|
|
- // });
|
|
|
const res = await getHistory(params);
|
|
|
loading = false;
|
|
|
if (res?.data) {
|
|
|
// let data = cloneDeep(res.data);
|
|
|
let data = remarkCount.value === 0 ? [] : cloneDeep(res.data);
|
|
|
+ if (
|
|
|
+ typeof remarkCount.value == "number" &&
|
|
|
+ remarkCount.value > 0 &&
|
|
|
+ (currentPage - 1) * 20 + data.length > remarkCount.value
|
|
|
+ ) {
|
|
|
+ data = data.slice(0, remarkCount.value % 20);
|
|
|
+ }
|
|
|
data = data.map(addFileServerPrefixToTask);
|
|
|
store.historyTasks = data;
|
|
|
replaceCurrentTask(store.historyTasks[0]).catch((err) => {
|