From e4cf08b2f5bcc59bc82c5d175c1d4948bafcae73 Mon Sep 17 00:00:00 2001 From: liushilong <2224574157@qq.com> Date: Wed, 20 Mar 2024 11:09:57 +0800 Subject: [PATCH 1/2] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=E5=88=97=E8=A1=A8?= =?UTF-8?q?=E6=93=8D=E4=BD=9C=E5=88=97=E5=B1=95=E7=A4=BA=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/final/content/Content.vue | 59 +++++++++++++---------------- 1 file changed, 27 insertions(+), 32 deletions(-) diff --git a/src/views/final/content/Content.vue b/src/views/final/content/Content.vue index a8fa697..536f0bb 100644 --- a/src/views/final/content/Content.vue +++ b/src/views/final/content/Content.vue @@ -41,6 +41,21 @@ import { getAllfieldList, getfieldList, savefield } from "@/api/home/filter"; const dicStore = useDictionary(); const izstatusList = ref([]); const reviewType = 0; +const actionsColumns = { + title: "操作", + key: "actions", + minWidth: 200, + fixed: "right", + render(row) { + return h(Action, { + id: row.id, + status: row.states, + trigger: (action) => { + actionHandler(action, row); + }, + }); + }, +}; const columnsRef = ref>([]); // const columns: DataTableColumns = [ // { @@ -174,6 +189,7 @@ async function getColumns() { columnsRef.value.push({ title: v.fieldDesc, key: v.name, + fixed: "left", width: 120, }); } @@ -181,27 +197,13 @@ async function getColumns() { columnsRef.value.push({ title: v.fieldDesc, key: v.name, - fixed: "left", width: 120, }); } }); - columnsRef.value.push({ - title: "操作", - key: "actions", - width: 200, - fixed: "right", - render(row) { - return h(Action, { - id: row.id, - status: row.states, - trigger: (action) => { - actionHandler(action, row); - }, - }); - }, - }); + columnsRef.value.push(actionsColumns as any) formatColumns(); + console.log(columnsRef.value, "columnsRef"); } async function formatColumns() { @@ -212,7 +214,7 @@ async function formatColumns() { columnsRef.value[index] = { title: "任务名称", key: columnsRef.value[index]["key"], //"fromtaskname" - fixed: "left", + fixed: columnsRef.value[index]["fixed"] || undefined, width: 200, ellipsis: { tooltip: true, @@ -224,6 +226,7 @@ async function formatColumns() { columnsRef.value[index] = { title: "审批状态", key: columnsRef.value[index]["key"], + fixed: columnsRef.value[index]["fixed"] || undefined, width: 100, sorter: "default", renderSorterIcon: ({ order }) => { @@ -244,6 +247,7 @@ async function formatColumns() { columnsRef.value[index] = { title: "图片相似度", key: columnsRef.value[index]["key"], + fixed: columnsRef.value[index]["fixed"] || undefined, width: 150, sorter: "default", renderSorterIcon: ({ order }) => { @@ -261,6 +265,7 @@ async function formatColumns() { columnsRef.value[index] = { title: "提报时间", key: columnsRef.value[index]["key"], + fixed: columnsRef.value[index]["fixed"] || undefined, width: 200, sorter: "default", renderSorterIcon: ({ order }) => { @@ -279,6 +284,7 @@ async function formatColumns() { columnsRef.value[index] = { title: "更新时间", key: columnsRef.value[index]["key"], + fixed: columnsRef.value[index]["fixed"] || undefined, width: 200, render(row: any) { return row.updatetime ? formatToDateHMS(row.updatetime) : ""; @@ -467,21 +473,7 @@ function sucessHandler(excelData) { function commitHandler(columns) { columnsRef.value = [ ...columns, - { - title: "操作", - key: "actions", - width: 200, - fixed: "right", - render(row) { - return h(Action, { - id: row.id, - status: row.states, - trigger: (action) => { - actionHandler(action, row); - }, - }); - }, - }, + actionsColumns ]; formatColumns(); } @@ -892,4 +884,7 @@ async function refreshHandler(searchId?: any) { background: #fff; } } +:deep(.n-data-table .n-data-table-td.n-data-table-td--fixed-right){ + z-index: 100 !important; +} From aac5e41e13f34a97da930e68674fa588dfc7c5cf Mon Sep 17 00:00:00 2001 From: Dragon <> Date: Wed, 20 Mar 2024 11:19:37 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=E5=8E=86=E5=8F=B2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/task/content/Content.vue | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/views/task/content/Content.vue b/src/views/task/content/Content.vue index d8300e8..d4f690b 100644 --- a/src/views/task/content/Content.vue +++ b/src/views/task/content/Content.vue @@ -16,6 +16,7 @@ import ConfrimModal from '../modal/ConfrimModal.vue' import CustomSettingModal from '../modal/CustomSettingModal.vue' import PictureTable from './PictureTable.vue' import TaskTable from './TaskTable.vue' +import History from './History.vue' import type { ApprovalParam, PictureSortParam } from '/#/api' const batch = ref(false) @@ -527,7 +528,9 @@ function getPercent(pictureid: string) { - + + +