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; +} 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) { - + + +