|
|
@ -6,12 +6,13 @@ 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 { getViewportOffset } from '@/utils/domUtils'
|
|
|
|
import { getViewportOffset } from '@/utils/domUtils'
|
|
|
|
import { isBoolean } from '@/utils/is'
|
|
|
|
import { isBoolean } from '@/utils/is'
|
|
|
|
import ConfrimModal from '@/views/task/modal/ConfrimModal.vue'
|
|
|
|
import ConfrimModal from '@/views/task/modal/ConfrimModal.vue'
|
|
|
|
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 { computed, h, nextTick, onMounted, reactive, ref, unref } from 'vue'
|
|
|
|
import { computed, h, nextTick, onMounted, reactive, ref, unref, watch } from 'vue'
|
|
|
|
import { Action, CustomTabelModal, ImportExcelModal, RepeatModal, RepeatTaskTableModal } from '../comp'
|
|
|
|
import { Action, CustomTabelModal, ImportExcelModal, RepeatModal, RepeatTaskTableModal } from '../comp'
|
|
|
|
import type { ApprovalParam } from '/#/api'
|
|
|
|
import type { ApprovalParam } from '/#/api'
|
|
|
|
|
|
|
|
|
|
|
@ -125,9 +126,11 @@ const selectionIds = ref<DataTableRowKey[]>([])
|
|
|
|
const userStore = useUser()
|
|
|
|
const userStore = useUser()
|
|
|
|
const dialog = useDialog()
|
|
|
|
const dialog = useDialog()
|
|
|
|
const message = useMessage()
|
|
|
|
const message = useMessage()
|
|
|
|
|
|
|
|
const finalStore = useFinal()
|
|
|
|
|
|
|
|
|
|
|
|
async function query(page: number, pageSize: number) {
|
|
|
|
async function query(page: number, pageSize: number) {
|
|
|
|
const result = await getFinalList({ sortorder: 'asc', pageSize, currPage: page, sortname: '' })
|
|
|
|
const filterParams = unref(finalStore.getAsideValue)
|
|
|
|
|
|
|
|
const result = await getFinalList({ sortorder: 'asc', pageSize, currPage: page, sortname: '', ...filterParams })
|
|
|
|
const { data, pageCount } = result
|
|
|
|
const { data, pageCount } = result
|
|
|
|
tableData.value = data
|
|
|
|
tableData.value = data
|
|
|
|
pagination.page = page
|
|
|
|
pagination.page = page
|
|
|
@ -381,6 +384,20 @@ 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(() => finalStore.asideValue, (newVal, oldVal) => {
|
|
|
|
|
|
|
|
refreshHandler()
|
|
|
|
|
|
|
|
}, { deep: true })
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
function reset() {
|
|
|
|
|
|
|
|
pagination.page = 1
|
|
|
|
|
|
|
|
pagination.pageCount = 1
|
|
|
|
|
|
|
|
pagination.pageSize = 1
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
async function refreshHandler() {
|
|
|
|
|
|
|
|
query(pagination.page, pagination.pageSize)
|
|
|
|
|
|
|
|
}
|
|
|
|
</script>
|
|
|
|
</script>
|
|
|
|
|
|
|
|
|
|
|
|
<template>
|
|
|
|
<template>
|
|
|
|