feat:详情页跳转回

pull/238/head
lihui_ocr 1 year ago
parent c6631bdd21
commit 024d7892dc

@ -415,9 +415,19 @@ async function formatColumns() {
key: columnsRef.value[index].key,
fixed: columnsRef.value[index].fixed || undefined,
width: 200,
sorter: 'default',
renderSorterIcon: ({ order }) => {
if (order === false)
return h(SvgIcon, { name: 'sort-2' })
if (order === 'ascend')
return h(SvgIcon, { name: 'sort-1' })
if (order === 'descend')
return h(SvgIcon, { name: 'sort-3' })
},
render(row: any) {
return row.fromusername
},
}
}
@ -545,7 +555,7 @@ async function handleSorterChange(value) {
else if (name === 'similarityscore')
name = 'similarity_score'
else if (name === 'fromusername')
name = 'fromuserid'
name = 'field1'
sortname.value = name
sortorder.value = value.order === 'ascend' ? 'asc' : 'desc'
@ -729,7 +739,7 @@ function validate(items: any[]) {
function goDetail(row) {
router.push({
name: 'final-detail',
query: { id: row.id, packageid: row.packageid, taskindex: row.taskIndex },
query: { id: row.id, packageid: row.packageid, taskindex: row.taskIndex,type:'table' },
})
}

@ -189,7 +189,7 @@ async function query(
...params,
})
const { data, pageCount, totalCount } = result
// console.log(data, pageCount, totalCount);
console.log(data, pageCount, totalCount);
const newlist = []
const oldlist = tableData.value
if (oldlist.length > 0) {
@ -239,7 +239,7 @@ function isValidTimestamp(value) {
function goDetail(row) {
router.push({
name: 'final-detail',
query: { id: row.id, packageid: row.packageid, taskindex: row.taskIndex },
query: { id: row.id, packageid: row.packageid, taskindex: row.taskIndexm,type:'card' },
})
}
//
@ -423,6 +423,7 @@ function checkBottom() {
if (!container)
return
// const { scrollTop, clientHeight, scrollHeight } = container;
const scrollTop = window.pageYOffset || document.documentElement.scrollTop
@ -434,11 +435,13 @@ function checkBottom() {
const scrollHeight = document.documentElement.scrollHeight
clearTimeout(debounceTimer)
// console.log(pagination)
debounceTimer = setTimeout(() => {
if (scrollTop + clientHeight >= scrollHeight - 10) {
if (scrollTop + clientHeight >= scrollHeight -500&&!(pagination.pageCount<num)) {
num = num + 1
console.log(num)
query(num, 20,{},props.taskvalue)
console.log( pagination.pageCount)
query(num, 20,{},props.taskvalue)
// fetchData(); //
}
}, 500)

@ -1,5 +1,5 @@
<script lang="ts" setup>
import { ref } from 'vue'
import { ref , onMounted} from 'vue'
import Aside from './aside/Aside.vue'
import Content from './content/Content.vue'
import ListContent from './content/ListContent.vue'
@ -26,6 +26,15 @@ if(asideref.value?.showSearch){
}
}
onMounted(()=>{
const searchParams = new URLSearchParams(window.location.search);
const type = searchParams.get('type');
if(type=='table'){
showList.value=false
}else{
showList.value=true
}
})
</script>
<template>

@ -552,7 +552,13 @@ function reloadList(param, text) {
}
function goBack() {
const searchParams = new URLSearchParams(window.location.search);
const type = searchParams.get('type');
if(type){
router.push({ name: 'final', query: { type: type} })
}else{
router.back()
}
}
function switchBatch() {

Loading…
Cancel
Save