From ce2973235bde923753372622ac3d3b4d385ef41f Mon Sep 17 00:00:00 2001 From: Dragon <> Date: Wed, 3 Apr 2024 16:52:16 +0800 Subject: [PATCH] =?UTF-8?q?=E7=BB=88=E5=AE=A1=E6=8E=92=E5=BA=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/assets/icons/list-mode.svg | 1 + src/views/final/content/Content.vue | 65 +++++++++++++++++++++++------ 2 files changed, 54 insertions(+), 12 deletions(-) create mode 100644 src/assets/icons/list-mode.svg diff --git a/src/assets/icons/list-mode.svg b/src/assets/icons/list-mode.svg new file mode 100644 index 0000000..bd22c1f --- /dev/null +++ b/src/assets/icons/list-mode.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/views/final/content/Content.vue b/src/views/final/content/Content.vue index e660239..adb3866 100644 --- a/src/views/final/content/Content.vue +++ b/src/views/final/content/Content.vue @@ -51,6 +51,8 @@ const izstatusList = ref([]) const router = useRouter() const route = useRoute() const reviewType = 0 +const sortorder = ref('asc') +const sortname = ref('states') const actionsColumns = { title: '操作', 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 == '更新时间') if (index > -1) { @@ -461,16 +484,16 @@ const dialog = useDialog() const message = useMessage() 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 params = filterId ? { userSearchId: filterId } : asideParmas const result = await getFinalList({ - sortorder: 'asc', + sortorder: sortorder.value, pageSize, currPage: page, - sortname: 'states', - taskName:taskName, + sortname: sortname.value, + taskName, ...params, }) const { data, pageCount, totalCount } = result @@ -481,6 +504,23 @@ async function query(page: number, pageSize: number, filterId?: any,taskName?:st 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) { if (loading.value) return @@ -800,11 +840,11 @@ async function refreshHandler(searchId?: any) { } function filterTableData(keyword) { - pagination.page = 1; - pagination.pageSize = 10; + pagination.page = 1 + pagination.pageSize = 10 if (keyword) // tableData.value = tableData.value.filter(item => item.id.includes(keyword)) - query(pagination.page, pagination.pageSize,'',keyword) + query(pagination.page, pagination.pageSize, '', keyword) else query(pagination.page, pagination.pageSize) } @@ -818,7 +858,7 @@ defineExpose({
任务管理列表 - +
@@ -1038,10 +1079,10 @@ defineExpose({ } &-font { - font-size: 18px; - font-weight: bold; - color: #333333; - line-height: 25px; + font-size: 20px; + font-family: PingFang SC, PingFang SC-Medium; + font-weight: 600; + color: #0d0b22; margin-right: 8px; }