终审排序

pull/97/head
Dragon 1 year ago
parent 2e477c9bcf
commit ce2973235b

@ -0,0 +1 @@
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1712133750226" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="5038" xmlns:xlink="http://www.w3.org/1999/xlink" width="48" height="48"><path d="M725.328 682.672V640h85.344v42.672h42.656V768h-42.656v42.672h-85.344V768h-42.656v-85.328h42.656zM170.672 256h682.656v85.328H170.672V256z m0 426.672h426.656V768H170.672v-85.328z m0-213.344h682.656v85.344H170.672v-85.344z" p-id="5039" fill="#444444"></path></svg>

After

Width:  |  Height:  |  Size: 592 B

@ -51,6 +51,8 @@ const izstatusList = ref([])
const router = useRouter() const router = useRouter()
const route = useRoute() const route = useRoute()
const reviewType = 0 const reviewType = 0
const sortorder = ref('asc')
const sortname = ref('states')
const actionsColumns = { const actionsColumns = {
title: '操作', title: '操作',
key: 'actions', key: 'actions',
@ -384,6 +386,27 @@ async function formatColumns() {
}, },
} }
} }
index = columnsRef.value.findIndex(v => v.title == '提报人')
if (index > -1) {
columnsRef.value[index] = {
title: '提报人',
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
},
}
}
index = columnsRef.value.findIndex(v => v.title == '更新时间') index = columnsRef.value.findIndex(v => v.title == '更新时间')
if (index > -1) { if (index > -1) {
@ -461,16 +484,16 @@ const dialog = useDialog()
const message = useMessage() const message = useMessage()
const finalStore = useFinal() const finalStore = useFinal()
async function query(page: number, pageSize: number, filterId?: any,taskName?:string) { async function query(page: number, pageSize: number, filterId?: any, taskName?: string) {
const asideParmas = unref(finalStore.getAsideValue) const asideParmas = unref(finalStore.getAsideValue)
// 使使 // 使使
const params = filterId ? { userSearchId: filterId } : asideParmas const params = filterId ? { userSearchId: filterId } : asideParmas
const result = await getFinalList({ const result = await getFinalList({
sortorder: 'asc', sortorder: sortorder.value,
pageSize, pageSize,
currPage: page, currPage: page,
sortname: 'states', sortname: sortname.value,
taskName:taskName, taskName,
...params, ...params,
}) })
const { data, pageCount, totalCount } = result const { data, pageCount, totalCount } = result
@ -481,6 +504,23 @@ async function query(page: number, pageSize: number, filterId?: any,taskName?:st
loading.value = false loading.value = false
} }
async function handleSorterChange(value) {
console.log(value)
let name = value.columnKey
if (name === 'fromuptime')
name = 'field11'
else if (name === 'similarityscore')
name = 'similarity_score'
else if (name === 'fromusername')
name = 'fromuserid'
sortname.value = name
sortorder.value = value.order === 'ascend' ? 'asc' : 'desc'
refreshHandler()
}
async function handlePageChange(currentPage) { async function handlePageChange(currentPage) {
if (loading.value) if (loading.value)
return return
@ -800,11 +840,11 @@ async function refreshHandler(searchId?: any) {
} }
function filterTableData(keyword) { function filterTableData(keyword) {
pagination.page = 1; pagination.page = 1
pagination.pageSize = 10; pagination.pageSize = 10
if (keyword) if (keyword)
// tableData.value = tableData.value.filter(item => item.id.includes(keyword)) // tableData.value = tableData.value.filter(item => item.id.includes(keyword))
query(pagination.page, pagination.pageSize,'',keyword) query(pagination.page, pagination.pageSize, '', keyword)
else else
query(pagination.page, pagination.pageSize) query(pagination.page, pagination.pageSize)
} }
@ -818,7 +858,7 @@ defineExpose({
<div class="wrapper-header"> <div class="wrapper-header">
<div class="wrapper-header-left"> <div class="wrapper-header-left">
<span class="wrapper-header-font">任务管理列表</span> <span class="wrapper-header-font">任务管理列表</span>
<SvgIcon size="32" name="magnifying" @click="changeContent" /> <SvgIcon size="16" name="list-mode" @click="changeContent" />
</div> </div>
<div> <div>
<SvgIcon <SvgIcon
@ -926,6 +966,7 @@ defineExpose({
@update:page="handlePageChange" @update:page="handlePageChange"
@update-page-size="handlePageSizeChange" @update-page-size="handlePageSizeChange"
@update:checked-row-keys="handleCheck" @update:checked-row-keys="handleCheck"
@update:sorter="handleSorterChange"
/> />
</div> </div>
@ -1038,10 +1079,10 @@ defineExpose({
} }
&-font { &-font {
font-size: 18px; font-size: 20px;
font-weight: bold; font-family: PingFang SC, PingFang SC-Medium;
color: #333333; font-weight: 600;
line-height: 25px; color: #0d0b22;
margin-right: 8px; margin-right: 8px;
} }

Loading…
Cancel
Save