This commit is contained in:
zlwu committed 2026-07-05 10:07:24 +08:00
1 parent 33c038b8d9
commit 54b27a3f0e
253 files changed
+30060 -14298

No files matched your search

@@ -34,7 +34,21 @@
<div class="list-toolbar">
<div class="list-toolbar-row">
<ListToolbarEndActions :loading="loading" @refresh="loadData" />
<ListQuickSearchInput
v-model="quickSearchKeyword"
placeholder="流程名称"
@search="handleQuickSearch"
@clear="handleQuickSearchClear"
/>
<ListToolbarEndActions
:loading="loading"
:column-defs="listColumnDefs"
v-model:visible-columns="visibleColumns"
v-model:check-all="checkAll"
:is-indeterminate="isIndeterminate"
@refresh="loadData"
@reset-columns="resetToDefault"
/>
</div>
</div>
@@ -46,7 +60,9 @@
stripe
row-key="id"
@row-dblclick="handleViewDetail"
@selection-change="handleSelectionChange"
>
<el-table-column type="selection" min-width="55" align="center" header-align="center" />
<el-table-column
type="index"
label="序号"
@@ -67,6 +83,7 @@
</template>
</el-table-column>
<el-table-column
v-if="isColumnVisible('businessTypeLabel')"
prop="businessTypeLabel"
label="业务类型"
min-width="120"
@@ -74,6 +91,7 @@
header-align="center"
/>
<el-table-column
v-if="isColumnVisible('businessId')"
prop="businessId"
label="业务单号"
min-width="200"
@@ -82,18 +100,26 @@
show-overflow-tooltip
/>
<el-table-column
v-if="isColumnVisible('starterUserName')"
prop="starterUserName"
label="发起人"
min-width="100"
align="center"
header-align="center"
/>
<el-table-column label="审批结果" min-width="100" align="center" header-align="center">
<el-table-column
v-if="isColumnVisible('status')"
label="审批结果"
min-width="100"
align="center"
header-align="center"
>
<template #default="{ row }">
<ProcessStatusTag :status="row.status || ''" />
</template>
</el-table-column>
<el-table-column
v-if="isColumnVisible('commentText')"
prop="commentText"
label="审批意见"
min-width="150"
@@ -102,6 +128,7 @@
show-overflow-tooltip
/>
<el-table-column
v-if="isColumnVisible('updateTime')"
prop="updateTime"
label="审批时间"
min-width="180"
@@ -202,27 +229,43 @@
</div>
</template>
</div>
<template #footer>
<el-button class="btn-ghost" @click="detailVisible = false"
><el-icon><Close /></el-icon>关闭</el-button
>
</template>
</el-dialog>
</section>
</div>
</template>
<script setup lang="ts">
import ListQuickSearchInput from '@/components/business/list-quick-search-input/index.vue'
import ListToolbarEndActions from '@/components/business/list-toolbar-end-actions/index.vue'
import { usePersistedListColumns } from '@/composables/usePersistedListColumns'
import { fetchCompletedTasks, fetchInstanceDetail } from '@/api/workflow'
import ProcessStatusTag from '../components/ProcessStatusTag.vue'
import { Document, Search, RefreshLeft, Close } from '@element-plus/icons-vue'
defineOptions({ name: 'WorkflowTaskCompleted' })
const listColumnDefs = [
{ prop: 'businessTypeLabel', label: '业务类型' },
{ prop: 'businessId', label: '业务单号' },
{ prop: 'starterUserName', label: '发起人' },
{ prop: 'status', label: '审批结果' },
{ prop: 'commentText', label: '审批意见', defaultVisible: false },
{ prop: 'updateTime', label: '审批时间' }
]
const {
visibleColumns,
checkAll,
isIndeterminate,
isColumnVisible,
resetToDefault
} = usePersistedListColumns('workflow-task-completed-list-columns', listColumnDefs)
const searchForm = reactive<{ keyword: string }>({ keyword: '' })
const quickSearchKeyword = ref('')
const tableData = ref<Api.Workflow.TaskItem[]>([])
const loading = ref(false)
const selectedRows = ref<Api.Workflow.TaskItem[]>([])
const pagination = reactive({ page: 1, pageSize: 20, total: 0 })
// 详情
@@ -233,10 +276,11 @@
async function loadData() {
loading.value = true
try {
const quickKeyword = quickSearchKeyword.value?.trim()
const res = await fetchCompletedTasks({
page: pagination.page,
pageSize: pagination.pageSize,
keyword: searchForm.keyword || undefined
keyword: quickKeyword || searchForm.keyword || undefined
})
tableData.value = res.list || []
pagination.total = res.total ?? 0
@@ -246,16 +290,33 @@
}
function handleSearch() {
quickSearchKeyword.value = ''
pagination.page = 1
loadData()
}
function handleReset() {
searchForm.keyword = ''
quickSearchKeyword.value = ''
pagination.page = 1
loadData()
}
function handleQuickSearch() {
pagination.page = 1
loadData()
}
function handleQuickSearchClear() {
quickSearchKeyword.value = ''
pagination.page = 1
loadData()
}
function handleSelectionChange(rows: Api.Workflow.TaskItem[]) {
selectedRows.value = rows
}
async function handleViewDetail(row: Api.Workflow.TaskItem) {
detailVisible.value = true
detailLoading.value = true
@@ -295,6 +356,7 @@
watchDebounced(
searchForm,
() => {
quickSearchKeyword.value = ''
pagination.page = 1
loadData()
},