批量审批

bak
Dragon 1 year ago
parent d7c5950b6a
commit 31412e035f

@ -1,6 +1,6 @@
<script lang="ts" setup> <script lang="ts" setup>
import type { DataTableColumns, DataTableRowKey, PaginationProps } from "naive-ui"; import type { DataTableColumns, DataTableRowKey, PaginationProps } from 'naive-ui'
import { NDataTable, useDialog, useMessage } from "naive-ui"; import { NDataTable, useDialog, useMessage } from 'naive-ui'
import { import {
computed, computed,
h, h,
@ -12,51 +12,51 @@ import {
ref, ref,
unref, unref,
watch, watch,
} from "vue"; } from 'vue'
import { rowPropKeys } from "naive-ui/es/legacy-grid/src/Row"; import { rowPropKeys } from 'naive-ui/es/legacy-grid/src/Row'
import { import {
Action, Action,
CustomTabelModal, CustomTabelModal,
ImportExcelModal, ImportExcelModal,
RepeatModal, RepeatModal,
RepeatTaskTableModal, RepeatTaskTableModal,
} from "../comp"; } from '../comp'
import { getFinalList } from "@/api/final"; import { getFinalList } from '@/api/final'
import { audit } from "@/api/task/task"; import { audit } from '@/api/task/task'
import SvgIcon from "@/components/Icon/SvgIcon.vue"; import SvgIcon from '@/components/Icon/SvgIcon.vue'
import type { RowData } from "@/config/final"; import type { RowData } from '@/config/final'
import { findKey, headRules } from "@/config/final"; import { findKey, headRules } from '@/config/final'
import { useWindowSizeFn } from "@/hooks/event/useWindowSizeFn"; import { useWindowSizeFn } from '@/hooks/event/useWindowSizeFn'
import { useUser } from "@/store/modules/user"; import { useUser } from '@/store/modules/user'
import { useFinal } from "@/store/modules/final"; import { useFinal } from '@/store/modules/final'
import { getViewportOffset } from "@/utils/domUtils"; import { getViewportOffset } from '@/utils/domUtils'
import { isBoolean } from "@/utils/is"; import { isBoolean } from '@/utils/is'
import { useDictionary } from "@/store/modules/dictonary"; import { useDictionary } from '@/store/modules/dictonary'
import ConfrimModal from "@/views/task/modal/ConfrimModal.vue"; import ConfrimModal from '@/views/task/modal/ConfrimModal.vue'
import type { ApprovalParam } from "/#/api"; import type { ApprovalParam } from '/#/api'
import emitter from "@/utils/mitt"; import emitter from '@/utils/mitt'
import { formatToDateHMS } from "@/utils/dateUtil"; import { formatToDateHMS } from '@/utils/dateUtil'
import { getAllfieldList, getfieldList, savefield } from "@/api/home/filter"; import { getAllfieldList, getfieldList, savefield } from '@/api/home/filter'
const dicStore = useDictionary(); const dicStore = useDictionary()
const izstatusList = ref([]); const izstatusList = ref([])
const reviewType = 0; const reviewType = 0
const actionsColumns = { const actionsColumns = {
title: "操作", title: '操作',
key: "actions", key: 'actions',
minWidth: 200, minWidth: 200,
fixed: "right", fixed: 'right',
render(row) { render(row) {
return h(Action, { return h(Action, {
id: row.id, id: row.id,
status: row.states, status: row.states,
trigger: (action) => { trigger: (action) => {
actionHandler(action, row); actionHandler(action, row)
}, },
}); })
}, },
}; }
const columnsRef = ref<DataTableColumns<RowData>>([]); const columnsRef = ref<DataTableColumns<RowData>>([])
// const columns: DataTableColumns<RowData> = [ // const columns: DataTableColumns<RowData> = [
// { // {
// type: "selection", // type: "selection",
@ -156,350 +156,363 @@ const columnsRef = ref<DataTableColumns<RowData>>([]);
async function getColumns() { async function getColumns() {
columnsRef.value = [ columnsRef.value = [
{ {
type: "selection", type: 'selection',
fixed: "left", fixed: 'left',
width: 50, width: 50,
}, },
]; ]
const userStore = useUser(); const userStore = useUser()
const userInfo = userStore.getUserInfo; const userInfo = userStore.getUserInfo
let res; let res
res = await getAllfieldList(reviewType); // res = await getAllfieldList(reviewType) //
const allList = res.data; const allList = res.data
res = await getfieldList(reviewType, userInfo.id); // res = await getfieldList(reviewType, userInfo.id) //
const useList = res.data; const useList = res.data
const userFieldFixed = useList.userFieldFixed?.split(","); const userFieldFixed = useList.userFieldFixed?.split(',')
const userFieldUnFixed = useList.userFieldUnFixed?.split(","); const userFieldUnFixed = useList.userFieldUnFixed?.split(',')
console.log(userFieldFixed, userFieldUnFixed, "userFieldUnFixed"); console.log(userFieldFixed, userFieldUnFixed, 'userFieldUnFixed')
console.log(allList, "allList"); console.log(allList, 'allList')
allList?.map((v) => { allList?.map((v) => {
if (!userFieldFixed?.length && !userFieldUnFixed?.length) { if (!userFieldFixed?.length && !userFieldUnFixed?.length) {
if (v.isrequired == 2) { if (v.isrequired == 2) {
columnsRef.value.push({ columnsRef.value.push({
title: v.fieldDesc, title: v.fieldDesc,
fixed: "left", fixed: 'left',
key: v.name, key: v.name,
width: 120, width: 120,
}); })
} }
} }
if (userFieldFixed?.find((v2) => v2 == v.name)) { if (userFieldFixed?.find(v2 => v2 == v.name)) {
columnsRef.value.push({ columnsRef.value.push({
title: v.fieldDesc, title: v.fieldDesc,
key: v.name, key: v.name,
fixed: "left", fixed: 'left',
width: 120, width: 120,
}); })
} }
if (userFieldUnFixed?.find((v2) => v2 == v.name)) { if (userFieldUnFixed?.find(v2 => v2 == v.name)) {
columnsRef.value.push({ columnsRef.value.push({
title: v.fieldDesc, title: v.fieldDesc,
key: v.name, key: v.name,
width: 120, width: 120,
}); })
} }
}); })
columnsRef.value.push(actionsColumns as any) columnsRef.value.push(actionsColumns as any)
formatColumns(); formatColumns()
console.log(columnsRef.value, "columnsRef"); console.log(columnsRef.value, 'columnsRef')
} }
async function formatColumns() { async function formatColumns() {
// TODO // TODO
let index; let index
index = columnsRef.value.findIndex((v) => v.title == "任务名称"); index = columnsRef.value.findIndex(v => v.title == '任务名称')
if (index > -1) { if (index > -1) {
columnsRef.value[index] = { columnsRef.value[index] = {
title: "任务名称", title: '任务名称',
key: columnsRef.value[index]["key"], //"fromtaskname" key: columnsRef.value[index].key, // "fromtaskname"
fixed: columnsRef.value[index]["fixed"] || undefined, fixed: columnsRef.value[index].fixed || undefined,
width: 200, width: 200,
ellipsis: { ellipsis: {
tooltip: true, tooltip: true,
}, },
}; }
} }
index = columnsRef.value.findIndex((v) => v.title == "审批状态"); index = columnsRef.value.findIndex(v => v.title == '审批状态')
if (index > -1) { if (index > -1) {
columnsRef.value[index] = { columnsRef.value[index] = {
title: "审批状态", title: '审批状态',
key: columnsRef.value[index]["key"], key: columnsRef.value[index].key,
fixed: columnsRef.value[index]["fixed"] || undefined, fixed: columnsRef.value[index].fixed || undefined,
width: 100, width: 100,
sorter: "default", sorter: 'default',
renderSorterIcon: ({ order }) => { renderSorterIcon: ({ order }) => {
if (order === false) return h(SvgIcon, { name: "sort-2" }); if (order === false)
if (order === "ascend") return h(SvgIcon, { name: "sort-1" }); return h(SvgIcon, { name: 'sort-2' })
if (order === "descend") return h(SvgIcon, { name: "sort-3" }); if (order === 'ascend')
return h(SvgIcon, { name: 'sort-1' })
if (order === 'descend')
return h(SvgIcon, { name: 'sort-3' })
}, },
render(row: any) { render(row: any) {
const item: any = izstatusList.value.find( const item: any = izstatusList.value.find(
(item: any) => item.value == row.states (item: any) => item.value == row.states,
); )
return item ? item.label : ""; return item ? item.label : ''
}, },
}; }
} }
index = columnsRef.value.findIndex((v) => v.title == "图片相似度"); index = columnsRef.value.findIndex(v => v.title == '图片相似度')
if (index > -1) { if (index > -1) {
columnsRef.value[index] = { columnsRef.value[index] = {
title: "图片相似度", title: '图片相似度',
key: columnsRef.value[index]["key"], key: columnsRef.value[index].key,
fixed: columnsRef.value[index]["fixed"] || undefined, fixed: columnsRef.value[index].fixed || undefined,
width: 150, width: 150,
sorter: "default", sorter: 'default',
renderSorterIcon: ({ order }) => { renderSorterIcon: ({ order }) => {
if (order === false) return h(SvgIcon, { name: "sort-2" }); if (order === false)
if (order === "ascend") return h(SvgIcon, { name: "sort-1" }); return h(SvgIcon, { name: 'sort-2' })
if (order === "descend") return h(SvgIcon, { name: "sort-3" }); if (order === 'ascend')
return h(SvgIcon, { name: 'sort-1' })
if (order === 'descend')
return h(SvgIcon, { name: 'sort-3' })
}, },
render(row: any) { render(row: any) {
return row.similarityscore ? `${row.similarityscore}%` : ""; return row.similarityscore ? `${row.similarityscore}%` : ''
}, },
}; }
} }
index = columnsRef.value.findIndex((v) => v.title == "提报时间"); index = columnsRef.value.findIndex(v => v.title == '提报时间')
if (index > -1) { if (index > -1) {
columnsRef.value[index] = { columnsRef.value[index] = {
title: "提报时间", title: '提报时间',
key: columnsRef.value[index]["key"], key: columnsRef.value[index].key,
fixed: columnsRef.value[index]["fixed"] || undefined, fixed: columnsRef.value[index].fixed || undefined,
width: 200, width: 200,
sorter: "default", sorter: 'default',
renderSorterIcon: ({ order }) => { renderSorterIcon: ({ order }) => {
if (order === false) return h(SvgIcon, { name: "sort-2" }); if (order === false)
if (order === "ascend") return h(SvgIcon, { name: "sort-1" }); return h(SvgIcon, { name: 'sort-2' })
if (order === "descend") return h(SvgIcon, { name: "sort-3" }); if (order === 'ascend')
return h(SvgIcon, { name: 'sort-1' })
if (order === 'descend')
return h(SvgIcon, { name: 'sort-3' })
}, },
render(row: any) { render(row: any) {
return formatToDateHMS(row.createdate || 0); return formatToDateHMS(row.createdate || 0)
}, },
}; }
} }
index = columnsRef.value.findIndex((v) => v.title == "更新时间"); index = columnsRef.value.findIndex(v => v.title == '更新时间')
if (index > -1) { if (index > -1) {
columnsRef.value[index] = { columnsRef.value[index] = {
title: "更新时间", title: '更新时间',
key: columnsRef.value[index]["key"], key: columnsRef.value[index].key,
fixed: columnsRef.value[index]["fixed"] || undefined, fixed: columnsRef.value[index].fixed || undefined,
width: 200, width: 200,
render(row: any) { render(row: any) {
return row.updatetime ? formatToDateHMS(row.updatetime) : ""; return row.updatetime ? formatToDateHMS(row.updatetime) : ''
}, },
}; }
} }
} }
const deviceHeight = ref(600); const deviceHeight = ref(600)
onMounted(() => { onMounted(() => {
emitter.on("filter-final", refreshHandler); emitter.on('filter-final', refreshHandler)
getColumns(); getColumns()
nextTick(() => { nextTick(() => {
computeListHeight(); computeListHeight()
}); })
}); })
onBeforeMount(() => { onBeforeMount(() => {
dicStore.fetchizstatusListt(); dicStore.fetchizstatusListt()
}); })
watch( watch(
() => dicStore.izstatusList, () => dicStore.izstatusList,
(newval) => { (newval) => {
izstatusList.value = newval; izstatusList.value = newval
} },
); )
onUnmounted(() => { onUnmounted(() => {
emitter.off("filter-final", refreshHandler); emitter.off('filter-final', refreshHandler)
}); })
const tableRef = ref<InstanceType<typeof NDataTable>>(); const tableRef = ref<InstanceType<typeof NDataTable>>()
const rowKey = (row: RowData) => row.id; const rowKey = (row: RowData) => row.id
const loading = ref(true); const loading = ref(true)
const pagination = reactive({ const pagination = reactive({
page: 1, page: 1,
pageCount: 1, pageCount: 1,
pageSize: 10, pageSize: 10,
}); })
const tableData = ref<Array<RowData>>([]); const tableData = ref<Array<RowData>>([])
const selectionIds = ref<DataTableRowKey[]>([]); const selectionIds = ref<DataTableRowKey[]>([])
const dialog = useDialog(); const dialog = useDialog()
const message = useMessage(); const message = useMessage()
const finalStore = useFinal(); const finalStore = useFinal()
async function query(page: number, pageSize: number, filterId?: any) { async function query(page: number, pageSize: number, filterId?: any) {
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: 'asc',
pageSize, pageSize,
currPage: page, currPage: page,
sortname: "", sortname: '',
...params, ...params,
}); })
const { data, pageCount } = result; const { data, pageCount } = result
tableData.value = data; tableData.value = data
console.log(data, "tableData"); console.log(data, 'tableData')
pagination.page = page; pagination.page = page
pagination.pageCount = pageCount; pagination.pageCount = pageCount
loading.value = false; loading.value = false
} }
async function handlePageChange(currentPage) { async function handlePageChange(currentPage) {
if (loading.value) return; if (loading.value)
return
const { pageSize } = pagination; const { pageSize } = pagination
await query(currentPage, pageSize); await query(currentPage, pageSize)
} }
function handleCheck(rowKeys: DataTableRowKey[]) { function handleCheck(rowKeys: DataTableRowKey[]) {
selectionIds.value = rowKeys; selectionIds.value = rowKeys
} }
async function computeListHeight() { async function computeListHeight() {
const table = unref(tableRef); const table = unref(tableRef)
if (!table) return; if (!table)
const tableEl: any = table?.$el; return
const headEl = tableEl.querySelector(".n-data-table-thead "); const tableEl: any = table?.$el
const { bottomIncludeBody } = getViewportOffset(headEl); const headEl = tableEl.querySelector('.n-data-table-thead ')
const headerH = 64; const { bottomIncludeBody } = getViewportOffset(headEl)
let paginationH = 2; const headerH = 64
const marginH = 60; let paginationH = 2
const marginH = 60
if (!isBoolean(unref(pagination))) { if (!isBoolean(unref(pagination))) {
const paginationEl = tableEl.querySelector( const paginationEl = tableEl.querySelector(
".n-data-table__pagination" '.n-data-table__pagination',
) as HTMLElement; ) as HTMLElement
if (paginationEl) { if (paginationEl) {
const offsetHeight = paginationEl.offsetHeight; const offsetHeight = paginationEl.offsetHeight
paginationH += offsetHeight || 0; paginationH += offsetHeight || 0
} else { }
paginationH += 28; else {
paginationH += 28
} }
} }
let height = bottomIncludeBody - (headerH + paginationH + marginH); let height = bottomIncludeBody - (headerH + paginationH + marginH)
const maxHeight = 800; const maxHeight = 800
height = maxHeight && maxHeight < height ? maxHeight : height; height = maxHeight && maxHeight < height ? maxHeight : height
deviceHeight.value = height; deviceHeight.value = height
} }
useWindowSizeFn(computeListHeight); useWindowSizeFn(computeListHeight)
const maxHeight = computed(() => { const maxHeight = computed(() => {
return tableData.value.length ? `${unref(deviceHeight)}px` : "auto"; return tableData.value.length ? `${unref(deviceHeight)}px` : 'auto'
}); })
query(pagination.page, pagination.pageSize); query(pagination.page, pagination.pageSize)
const customTabelRef = ref(null); const customTabelRef = ref(null)
const importExcelRef = ref(null); const importExcelRef = ref(null)
const rejectModalRef = ref(null); const rejectModalRef = ref(null)
const repeatModalRef = ref(null); const repeatModalRef = ref(null)
const repeatTaskTableModalRef = ref(null); const repeatTaskTableModalRef = ref(null)
function showModal(modalRef: any) { function showModal(modalRef: any) {
const modal = unref(modalRef)! as any; const modal = unref(modalRef)! as any
modal.showModal(); modal.showModal()
} }
const popover = ref<ComponentRef | null>(null); const popover = ref<ComponentRef | null>(null)
function importHandler() { function importHandler() {
(popover.value as any).setShow(false); (popover.value as any).setShow(false)
showModal(importExcelRef); showModal(importExcelRef)
} }
function exportHandler() { function exportHandler() {
loading.value = true; loading.value = true
import("@/utils/exportExcel").then((excel) => { import('@/utils/exportExcel').then((excel) => {
const tHeader = [ const tHeader = [
"任务Id", '任务Id',
"任务名称", '任务名称',
"审批节点", '审批节点',
"审批状态", '审批状态',
"图片相似度", '图片相似度',
"提报时间", '提报时间',
"更新时间", '更新时间',
]; ]
const filterVal = [ const filterVal = [
"id", 'id',
"name", 'name',
"approvalnode", 'approvalnode',
"approvalstatus", 'approvalstatus',
"similarity", 'similarity',
"uptime", 'uptime',
"updatetime", 'updatetime',
]; ]
const list = tableData.value; const list = tableData.value
const data = formatJson(filterVal, list); const data = formatJson(filterVal, list)
excel.export_json_to_excel({ excel.export_json_to_excel({
header: tHeader, header: tHeader,
data, data,
filename: "data", filename: 'data',
autoWidth: true, autoWidth: true,
bookType: "xlsx", bookType: 'xlsx',
}); })
loading.value = false; loading.value = false
}); })
} }
function formatJson(filterVal, jsonDataList) { function formatJson(filterVal, jsonDataList) {
return jsonDataList.map((v) => return jsonDataList.map(v =>
filterVal.map((j) => { filterVal.map((j) => {
return v[j]; return v[j]
}) }),
); )
} }
function sucessHandler(excelData) { function sucessHandler(excelData) {
const data = excelData.content.map((item) => { const data = excelData.content.map((item) => {
const obj = {}; const obj = {}
Object.keys(item).forEach((key) => { Object.keys(item).forEach((key) => {
const k = findKey(columns, key); const k = findKey(columns, key)
obj[k] = item[key]; obj[k] = item[key]
}); })
return obj; return obj
}); })
tableData.value = data; tableData.value = data
} }
function commitHandler(columns) { function commitHandler(columns) {
columnsRef.value = [ columnsRef.value = [
...columns, ...columns,
actionsColumns actionsColumns,
]; ]
formatColumns(); formatColumns()
} }
function actionHandler(action: any, row: any) { function actionHandler(action: any, row: any) {
const { key } = action; const { key } = action
switch (key) { switch (key) {
case "view": case 'view':
break; break
case "reset": case 'reset':
resetHandler(); resetHandler()
break; break
case "approval": case 'approval':
approvalHandler(row); approvalHandler(row)
break; break
case "reject": case 'reject':
rejectHandler(row); rejectHandler(row)
break; break
default: default:
break; break
} }
} }
// states:1234 // states:1234
function validate(items: any[]) { function validate(items: any[]) {
if (items.length === 0) return "至少选中一个任务"; if (items.length === 0)
return '至少选中一个任务'
// const useInfo = userStore.getUserInfo // const useInfo = userStore.getUserInfo
// const username = useInfo.loginname // const username = useInfo.loginname
@ -516,126 +529,148 @@ function validate(items: any[]) {
// return '' // return ''
// } // }
return null; return null
} }
function resetHandler() { function resetHandler() {
dialog.info({ dialog.info({
title: "确认提示", title: '确认提示',
content: "确认重置当前选中的任务的审批吗?", content: '确认重置当前选中的任务的审批吗?',
positiveText: "确定", positiveText: '确定',
negativeText: "取消", negativeText: '取消',
onPositiveClick: async () => { onPositiveClick: async () => {
// TODO // TODO
// const result = await resetApproval() // const result = await resetApproval()
}, },
onNegativeClick: () => {}, onNegativeClick: () => {},
}); })
} }
function getSelectItems() { function getSelectItems() {
return tableData.value.filter((item) => selectionIds.value.includes(item.id)); return tableData.value.filter(item => selectionIds.value.includes(item.id))
} }
function approvalHandler(row) { function approvalHandler(row) {
// const items = getSelectItems() // const items = getSelectItems()
const items = [row]; const items = [row]
const msg = validate(items); const msg = validate(items)
if (msg !== null) { if (msg !== null) {
message.error(msg); message.error(msg)
return; return
} }
dialog.info({ dialog.info({
title: "确认提示", title: '确认提示',
content: "确认给该任务审批为【通过】吗?", content: '确认给该任务审批为【通过】吗?',
positiveText: "确定", positiveText: '确定',
negativeText: "取消", negativeText: '取消',
onPositiveClick: () => { onPositiveClick: () => {
approval(items); approval(items)
}, },
onNegativeClick: () => {}, onNegativeClick: () => {},
}); })
}
function batchApproval() {
const items = getSelectItems()
const msg = validate(items)
if (msg !== null) {
message.error(msg)
return
}
dialog.info({
title: '确认提示',
content: '确认给该任务审批为【通过】吗?',
positiveText: '确定',
negativeText: '取消',
onPositiveClick: () => {
approval(items)
},
onNegativeClick: () => {},
})
} }
function approval(items) { function approval(items) {
const formIds: string[] = items.map((item) => item.id); const formIds: string[] = items.map(item => item.id)
const taskIds: string[] = items.map((item) => item.taskId); const taskIds: string[] = items.map(item => item.taskId)
const tasknames: string[] = items.map((item) => item.taskname); const tasknames: string[] = items.map(item => item.taskname)
const param: ApprovalParam = { const param: ApprovalParam = {
formid: formIds, formid: formIds,
taskId: taskIds, taskId: taskIds,
approvd: true, approvd: true,
taskComment: "approval", taskComment: 'approval',
taskname: tasknames, taskname: tasknames,
}; }
doAudit(param); doAudit(param)
} }
function rejectHandler(row) { function rejectHandler(row) {
// const items = getSelectItems() // const items = getSelectItems()
const items = [row]; const items = [row]
const msg = validate(items); const msg = validate(items)
if (msg !== null) { if (msg !== null) {
message.error(msg); message.error(msg)
return; return
} }
const modal = unref(rejectModalRef)! as any; const modal = unref(rejectModalRef)! as any
modal.showModal(); modal.showModal()
} }
function reject(idOrDesc: string, backId: string, isOther: boolean) { function reject(idOrDesc: string, backId: string, isOther: boolean) {
const items = getSelectItems(); const items = getSelectItems()
const formIds: string[] = items.map((item) => item.id); const formIds: string[] = items.map(item => item.id)
const taskIds: string[] = items.map((item) => item.fromtaskid); const taskIds: string[] = items.map(item => item.fromtaskid)
const tasknames: string[] = items.map((item) => item.fromtaskname); const tasknames: string[] = items.map(item => item.fromtaskname)
const param: ApprovalParam = { const param: ApprovalParam = {
formid: formIds, formid: formIds,
taskId: taskIds, taskId: taskIds,
approvd: false, approvd: false,
taskComment: idOrDesc, taskComment: idOrDesc,
taskname: isOther ? tasknames : ["其他"], taskname: isOther ? tasknames : ['其他'],
}; }
doAudit(param); doAudit(param)
} }
function doAudit(param: any) { function doAudit(param: any) {
audit(param).then((res) => { audit(param).then((res) => {
const { code } = res; const { code } = res
if (code === "OK") reload(); if (code === 'OK')
else message.error(res.message); reload()
}); else message.error(res.message)
})
} }
function reload() { function reload() {
const { page, pageSize } = unref(tableRef.value?.pagination) as PaginationProps; const { page, pageSize } = unref(tableRef.value?.pagination) as PaginationProps
query(page!, pageSize!); query(page!, pageSize!)
} }
watch( watch(
() => finalStore.asideValue, () => finalStore.asideValue,
(newVal, oldVal) => { (newVal, oldVal) => {
refreshHandler(); refreshHandler()
}, },
{ deep: true } { deep: true },
); )
function reset() { function reset() {
pagination.page = 1; pagination.page = 1
pagination.pageCount = 1; pagination.pageCount = 1
pagination.pageSize = 1; pagination.pageSize = 1
} }
async function refreshHandler(searchId?: any) { async function refreshHandler(searchId?: any) {
reset(); reset()
query(pagination.page, pagination.pageSize, searchId); query(pagination.page, pagination.pageSize, searchId)
} }
</script> </script>
@ -650,7 +685,7 @@ async function refreshHandler(searchId?: any) {
<n-button class="xjcc" text @click="showModal(repeatModalRef)"> <n-button class="xjcc" text @click="showModal(repeatModalRef)">
小结查重 小结查重
</n-button> </n-button>
<div class="btn"> <div class="btn" @click="batchApproval">
<SvgIcon style="margin-right: 6px" size="14" name="tf" /> <SvgIcon style="margin-right: 6px" size="14" name="tf" />
批量审批 批量审批
</div> </div>
@ -667,19 +702,13 @@ async function refreshHandler(searchId?: any) {
</template> </template>
<ul class="wrapper-header-action"> <ul class="wrapper-header-action">
<li @click="importHandler"> <li @click="importHandler">
<SvgIcon size="20" name="download" /><span style="margin-left: 5px" <SvgIcon size="20" name="download" /><span style="margin-left: 5px">批量导入数据</span>
>批量导入数据</span
>
</li> </li>
<li @click="exportHandler"> <li @click="exportHandler">
<SvgIcon size="20" name="download" /><span style="margin-left: 5px" <SvgIcon size="20" name="download" /><span style="margin-left: 5px">导出待审数据</span>
>导出待审数据</span
>
</li> </li>
<li> <li>
<SvgIcon size="20" name="download" /><span style="margin-left: 5px" <SvgIcon size="20" name="download" /><span style="margin-left: 5px">导出全部数据</span>
>导出全部数据</span
>
</li> </li>
</ul> </ul>
</n-popover> </n-popover>

Loading…
Cancel
Save