diff --git a/src/views/final/comp/CustomTabelModal.vue b/src/views/final/comp/CustomTabelModal.vue index d647ee4..c0ed170 100644 --- a/src/views/final/comp/CustomTabelModal.vue +++ b/src/views/final/comp/CustomTabelModal.vue @@ -45,7 +45,7 @@ onMounted(async()=>{ fix: v.isrequired == 2, checked: v.isrequired == 2 || - Boolean(useList.userFieldFixed?.toLowerCase().indexOf(v.name)>-1) || Boolean(useList.userFieldUnFixed?.toLowerCase().indexOf(v.name)>-1), + Boolean(useList.userFieldFixed?.indexOf(v.name)>-1) || Boolean(useList.userFieldUnFixed?.indexOf(v.name)>-1), }; offList.value.push(item) }); diff --git a/src/views/final/content/Content.vue b/src/views/final/content/Content.vue index 77efc19..8580bd9 100644 --- a/src/views/final/content/Content.vue +++ b/src/views/final/content/Content.vue @@ -2,6 +2,7 @@ import type { DataTableColumns, DataTableRowKey, PaginationProps } from 'naive-ui' import { NDataTable, useDialog, useMessage } from 'naive-ui' import { computed, h, nextTick, onMounted, onUnmounted, reactive, ref, unref, watch } from 'vue' +import { rowPropKeys } from 'naive-ui/es/legacy-grid/src/Row' import { Action, CustomTabelModal, ImportExcelModal, RepeatModal, RepeatTaskTableModal } from '../comp' import { getFinalList } from '@/api/final' import { audit } from '@/api/task/task' @@ -16,6 +17,7 @@ import { isBoolean } from '@/utils/is' import ConfrimModal from '@/views/task/modal/ConfrimModal.vue' import type { ApprovalParam } from '/#/api' import emitter from '@/utils/mitt' +import { formatToDateHMS } from '@/utils/dateUtil' const columns: DataTableColumns = [ { @@ -27,17 +29,20 @@ const columns: DataTableColumns = [ title: '任务Id', key: 'id', fixed: 'left', - width: 100, + width: 190, }, { title: '任务名称', key: 'fromtaskname', fixed: 'left', - width: 150, + width: 200, + ellipsis: { + tooltip: true, + }, }, { title: '审批节点', - key: 'approvalnode', + key: 'taskname', width: 100, }, { @@ -53,10 +58,13 @@ const columns: DataTableColumns = [ if (order === 'descend') return h(SvgIcon, { name: 'sort-3' }) }, + render(row: any) { + return row.states + }, }, { title: '图片相似度', - key: 'similarity', + key: 'similarityscore', width: 150, sorter: 'default', renderSorterIcon: ({ order }) => { @@ -67,10 +75,13 @@ const columns: DataTableColumns = [ if (order === 'descend') return h(SvgIcon, { name: 'sort-3' }) }, + render(row: any) { + return row.similarityscore ? `${row.similarityscore}%` : '' + }, }, { title: '提报时间', - key: 'fromuptime', + key: 'createdate', width: 200, sorter: 'default', renderSorterIcon: ({ order }) => { @@ -81,11 +92,17 @@ const columns: DataTableColumns = [ if (order === 'descend') return h(SvgIcon, { name: 'sort-3' }) }, + render(row: any) { + return formatToDateHMS(row.createdate || 0) + }, }, { title: '更新时间', key: 'updatetime', width: 200, + render(row: any) { + return row.updatetime ? formatToDateHMS(row.updatetime) : '' + }, }, { title: '操作', @@ -98,7 +115,9 @@ const columns: DataTableColumns = [ { id: row.id, status: row.states, - trigger: actionHandler, + trigger: (action) => { + actionHandler(action, row) + }, }, ) }, @@ -252,7 +271,7 @@ function commitHandler(columns) { columnsRef.value = columns } -function actionHandler(action: any) { +function actionHandler(action: any, row: any) { const { key } = action switch (key) { case 'view': @@ -261,10 +280,10 @@ function actionHandler(action: any) { resetHandler() break case 'approval': - approvalHandler() + approvalHandler(row) break case 'reject': - rejectHandler() + rejectHandler(row) break default: break @@ -312,8 +331,9 @@ function getSelectItems() { return tableData.value.filter(item => selectionIds.value.includes(item.id)) } -function approvalHandler() { - const items = getSelectItems() +function approvalHandler(row) { + // const items = getSelectItems() + const items = [row] const msg = validate(items) if (msg !== null) { @@ -349,8 +369,9 @@ function approval(items) { doAudit(param) } -function rejectHandler() { - const items = getSelectItems() +function rejectHandler(row) { + // const items = getSelectItems() + const items = [row] const msg = validate(items) if (msg !== null) { diff --git a/src/views/message/content/draggable.vue b/src/views/message/content/draggable.vue new file mode 100644 index 0000000..7e76c75 --- /dev/null +++ b/src/views/message/content/draggable.vue @@ -0,0 +1,62 @@ + + + + + diff --git a/src/views/task/aside/Aside.vue b/src/views/task/aside/Aside.vue index 1a90839..3065f7b 100644 --- a/src/views/task/aside/Aside.vue +++ b/src/views/task/aside/Aside.vue @@ -2,7 +2,7 @@ import { useTaskStore } from '@/store/modules/task'; import { debounce } from 'lodash-es'; import { computed, ref, unref, watch } from 'vue'; -import CustomFieldModal from '../../worksheet/modal/CustomFieldModal.vue'; +import CustomFieldModal from '../modal/CustomFieldModal.vue'; import TaskList from './TaskList.vue'; diff --git a/src/views/task/modal/CustomFieldModal.vue b/src/views/task/modal/CustomFieldModal.vue index 02b39f3..6bc5681 100644 --- a/src/views/task/modal/CustomFieldModal.vue +++ b/src/views/task/modal/CustomFieldModal.vue @@ -1,212 +1,283 @@