提交
This commit is contained in:
1 parent
33c038b8d9
commit
54b27a3f0e
253 files changed
+30060
-14298
No files matched your search
@@ -138,7 +138,7 @@
|
||||
删除节点
|
||||
</el-button>
|
||||
</div>
|
||||
<el-form label-position="top" class="props-form">
|
||||
<el-form label-position="right" label-width="100px" class="props-form wf-dialog-form">
|
||||
<el-form-item label="节点名称">
|
||||
<el-input
|
||||
v-model="selectedNode.nodeName"
|
||||
@@ -258,7 +258,7 @@
|
||||
<span class="edge-to">{{ selectedEdge.toNodeName }}</span>
|
||||
</div>
|
||||
|
||||
<el-form label-position="top" class="props-form" style="margin-top: 12px">
|
||||
<el-form label-position="right" label-width="100px" class="props-form wf-dialog-form" style="margin-top: 12px">
|
||||
<el-form-item>
|
||||
<el-checkbox v-model="selectedEdge.isDefault" @change="syncEdgeCondition">
|
||||
默认分支(其他分支都不满足时走此路径)
|
||||
|
||||
@@ -46,7 +46,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>
|
||||
|
||||
@@ -58,7 +72,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="序号"
|
||||
@@ -80,6 +96,7 @@
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
v-if="isColumnVisible('businessTypeLabel')"
|
||||
prop="businessTypeLabel"
|
||||
label="业务类型"
|
||||
min-width="120"
|
||||
@@ -87,6 +104,7 @@
|
||||
header-align="center"
|
||||
/>
|
||||
<el-table-column
|
||||
v-if="isColumnVisible('businessId')"
|
||||
prop="businessId"
|
||||
label="业务单号"
|
||||
min-width="200"
|
||||
@@ -95,6 +113,7 @@
|
||||
show-overflow-tooltip
|
||||
/>
|
||||
<el-table-column
|
||||
v-if="isColumnVisible('status')"
|
||||
prop="status"
|
||||
label="状态"
|
||||
min-width="100"
|
||||
@@ -106,6 +125,7 @@
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
v-if="isColumnVisible('createTime')"
|
||||
prop="createTime"
|
||||
label="发起时间"
|
||||
min-width="180"
|
||||
@@ -204,27 +224,41 @@
|
||||
</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 { fetchMyInstances, fetchBusinessAllTasks } from '@/api/workflow'
|
||||
import ProcessStatusTag from '../components/ProcessStatusTag.vue'
|
||||
import { Document, Search, RefreshLeft, Close } from '@element-plus/icons-vue'
|
||||
|
||||
defineOptions({ name: 'WorkflowMyApplications' })
|
||||
|
||||
const listColumnDefs = [
|
||||
{ prop: 'businessTypeLabel', label: '业务类型' },
|
||||
{ prop: 'businessId', label: '业务单号' },
|
||||
{ prop: 'status', label: '状态' },
|
||||
{ prop: 'createTime', label: '发起时间' }
|
||||
]
|
||||
|
||||
const {
|
||||
visibleColumns,
|
||||
checkAll,
|
||||
isIndeterminate,
|
||||
isColumnVisible,
|
||||
resetToDefault
|
||||
} = usePersistedListColumns('workflow-my-applications-list-columns', listColumnDefs)
|
||||
|
||||
const searchForm = reactive<{ keyword: string; status: string }>({ keyword: '', status: '' })
|
||||
const quickSearchKeyword = ref('')
|
||||
const tableData = ref<Api.Workflow.MyInstanceItem[]>([])
|
||||
const loading = ref(false)
|
||||
const selectedRows = ref<Api.Workflow.MyInstanceItem[]>([])
|
||||
const pagination = reactive({ page: 1, pageSize: 20, total: 0 })
|
||||
|
||||
const detailVisible = ref(false)
|
||||
@@ -235,10 +269,11 @@
|
||||
async function loadData() {
|
||||
loading.value = true
|
||||
try {
|
||||
const quickKeyword = quickSearchKeyword.value?.trim()
|
||||
const res = await fetchMyInstances({
|
||||
page: pagination.page,
|
||||
pageSize: pagination.pageSize,
|
||||
keyword: searchForm.keyword || undefined,
|
||||
keyword: quickKeyword || searchForm.keyword || undefined,
|
||||
status: searchForm.status || undefined
|
||||
})
|
||||
tableData.value = res.list || []
|
||||
@@ -249,6 +284,7 @@
|
||||
}
|
||||
|
||||
function handleSearch() {
|
||||
quickSearchKeyword.value = ''
|
||||
pagination.page = 1
|
||||
loadData()
|
||||
}
|
||||
@@ -256,10 +292,26 @@
|
||||
function handleReset() {
|
||||
searchForm.keyword = ''
|
||||
searchForm.status = ''
|
||||
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.MyInstanceItem[]) {
|
||||
selectedRows.value = rows
|
||||
}
|
||||
|
||||
async function handleViewDetail(row: Api.Workflow.MyInstanceItem) {
|
||||
detailVisible.value = true
|
||||
detailLoading.value = true
|
||||
@@ -285,6 +337,7 @@
|
||||
watchDebounced(
|
||||
searchForm,
|
||||
() => {
|
||||
quickSearchKeyword.value = ''
|
||||
pagination.page = 1
|
||||
loadData()
|
||||
},
|
||||
|
||||
@@ -38,6 +38,12 @@
|
||||
<div class="list-toolbar-selected">
|
||||
已选 <span class="sel-num">{{ selectedRows.length }}</span> 项
|
||||
</div>
|
||||
<ListQuickSearchInput
|
||||
v-model="quickSearchKeyword"
|
||||
placeholder="流程名称/编码"
|
||||
@search="handleQuickSearch"
|
||||
@clear="handleQuickSearchClear"
|
||||
/>
|
||||
<el-button class="btn-main" type="primary" @click="handleAdd">
|
||||
<el-icon><Plus /></el-icon>
|
||||
新增流程
|
||||
@@ -79,7 +85,15 @@
|
||||
批量删除
|
||||
</el-button>
|
||||
|
||||
<ListToolbarEndActions :loading="loading" @refresh="loadData" />
|
||||
<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>
|
||||
|
||||
@@ -103,6 +117,7 @@
|
||||
:index="(index) => (pagination.page - 1) * pagination.pageSize + index + 1"
|
||||
/>
|
||||
<el-table-column
|
||||
v-if="isColumnVisible('processCode')"
|
||||
prop="processCode"
|
||||
label="流程编码"
|
||||
min-width="150"
|
||||
@@ -121,7 +136,13 @@
|
||||
<el-link type="primary" @click="handleView(row)">{{ row.processName }}</el-link>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<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 }">
|
||||
<el-switch
|
||||
:model-value="row.status"
|
||||
@@ -131,12 +152,19 @@
|
||||
/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="最新版本" min-width="100" align="center" header-align="center">
|
||||
<el-table-column
|
||||
v-if="isColumnVisible('latestVersion')"
|
||||
label="最新版本"
|
||||
min-width="100"
|
||||
align="center"
|
||||
header-align="center"
|
||||
>
|
||||
<template #default="{ row }">
|
||||
{{ row.latestVersion != null ? `V${row.latestVersion}` : '--' }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
v-if="isColumnVisible('createTime')"
|
||||
prop="createTime"
|
||||
label="创建时间"
|
||||
min-width="160"
|
||||
@@ -172,7 +200,9 @@
|
||||
ref="formRef"
|
||||
:model="formData"
|
||||
:rules="formRules"
|
||||
label-position="top"
|
||||
label-position="right"
|
||||
label-width="100px"
|
||||
class="wf-dialog-form"
|
||||
scroll-to-error
|
||||
:scroll-into-view-options="{ behavior: 'smooth', block: 'center' }"
|
||||
>
|
||||
@@ -242,13 +272,16 @@
|
||||
</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 {
|
||||
canDeleteByCreator,
|
||||
filterDeletableByCreator,
|
||||
allRowsDeletableByCreator,
|
||||
CREATOR_DELETE_TIP
|
||||
} from '@/utils/creator-delete'
|
||||
import { syncViewRowFromFlatList } from '@/utils/view-dialog-refresh'
|
||||
import {
|
||||
Plus,
|
||||
Close,
|
||||
@@ -274,7 +307,23 @@ import ListToolbarEndActions from '@/components/business/list-toolbar-end-action
|
||||
|
||||
defineOptions({ name: 'WorkflowProcess' })
|
||||
|
||||
const listColumnDefs = [
|
||||
{ prop: 'processCode', label: '流程编码' },
|
||||
{ prop: 'status', label: '状态' },
|
||||
{ prop: 'latestVersion', label: '最新版本' },
|
||||
{ prop: 'createTime', label: '创建时间' }
|
||||
]
|
||||
|
||||
const {
|
||||
visibleColumns,
|
||||
checkAll,
|
||||
isIndeterminate,
|
||||
isColumnVisible,
|
||||
resetToDefault
|
||||
} = usePersistedListColumns('workflow-process-list-columns', listColumnDefs)
|
||||
|
||||
const searchForm = reactive<{ keyword: string }>({ keyword: '' })
|
||||
const quickSearchKeyword = ref('')
|
||||
const tableData = ref<Api.Workflow.ProcessDefItem[]>([])
|
||||
const selectedRows = ref<Api.Workflow.ProcessDefItem[]>([])
|
||||
const loading = ref(false)
|
||||
@@ -309,6 +358,11 @@ import ListToolbarEndActions from '@/components/business/list-toolbar-end-action
|
||||
const viewVisible = ref(false)
|
||||
const viewingRecord = ref<Api.Workflow.ProcessDefItem | null>(null)
|
||||
|
||||
function refreshViewIfOpen() {
|
||||
if (!viewVisible.value) return
|
||||
syncViewRowFromFlatList(viewingRecord, tableData.value)
|
||||
}
|
||||
|
||||
const processViewSections = computed<ViewSection[]>(() => {
|
||||
const row = viewingRecord.value
|
||||
if (!row) return []
|
||||
@@ -337,10 +391,11 @@ import ListToolbarEndActions from '@/components/business/list-toolbar-end-action
|
||||
async function loadData() {
|
||||
loading.value = true
|
||||
try {
|
||||
const quickKeyword = quickSearchKeyword.value?.trim()
|
||||
const res = await fetchProcessDefList({
|
||||
page: pagination.page,
|
||||
pageSize: pagination.pageSize,
|
||||
keyword: searchForm.keyword || undefined
|
||||
keyword: quickKeyword || searchForm.keyword || undefined
|
||||
})
|
||||
tableData.value = res.list || []
|
||||
pagination.total = res.total ?? 0
|
||||
@@ -350,12 +405,25 @@ import ListToolbarEndActions from '@/components/business/list-toolbar-end-action
|
||||
}
|
||||
|
||||
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()
|
||||
}
|
||||
@@ -405,6 +473,7 @@ import ListToolbarEndActions from '@/components/business/list-toolbar-end-action
|
||||
}
|
||||
dialogVisible.value = false
|
||||
await loadData()
|
||||
if (isEdit.value) refreshViewIfOpen()
|
||||
} catch {
|
||||
// 校验或接口错误已由全局处理
|
||||
} finally {
|
||||
@@ -502,6 +571,7 @@ import ListToolbarEndActions from '@/components/business/list-toolbar-end-action
|
||||
watchDebounced(
|
||||
searchForm,
|
||||
() => {
|
||||
quickSearchKeyword.value = ''
|
||||
pagination.page = 1
|
||||
loadData()
|
||||
},
|
||||
|
||||
@@ -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()
|
||||
},
|
||||
|
||||
@@ -37,6 +37,12 @@
|
||||
<div class="list-toolbar-selected">
|
||||
已选 <span class="sel-num">{{ selectedRows.length }}</span> 项
|
||||
</div>
|
||||
<ListQuickSearchInput
|
||||
v-model="quickSearchKeyword"
|
||||
placeholder="流程名称"
|
||||
@search="handleQuickSearch"
|
||||
@clear="handleQuickSearchClear"
|
||||
/>
|
||||
<el-button
|
||||
class="btn-main"
|
||||
type="primary"
|
||||
@@ -47,7 +53,15 @@
|
||||
审批
|
||||
</el-button>
|
||||
|
||||
<ListToolbarEndActions :loading="loading" @refresh="loadData" />
|
||||
<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>
|
||||
|
||||
@@ -83,6 +97,7 @@
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
v-if="isColumnVisible('businessTypeLabel')"
|
||||
prop="businessTypeLabel"
|
||||
label="业务类型"
|
||||
min-width="120"
|
||||
@@ -90,6 +105,7 @@
|
||||
header-align="center"
|
||||
/>
|
||||
<el-table-column
|
||||
v-if="isColumnVisible('businessId')"
|
||||
prop="businessId"
|
||||
label="业务单号"
|
||||
min-width="200"
|
||||
@@ -98,6 +114,7 @@
|
||||
show-overflow-tooltip
|
||||
/>
|
||||
<el-table-column
|
||||
v-if="isColumnVisible('starterUserName')"
|
||||
prop="starterUserName"
|
||||
label="发起人"
|
||||
min-width="100"
|
||||
@@ -105,6 +122,7 @@
|
||||
header-align="center"
|
||||
/>
|
||||
<el-table-column
|
||||
v-if="isColumnVisible('createTime')"
|
||||
prop="createTime"
|
||||
label="到达时间"
|
||||
min-width="180"
|
||||
@@ -219,18 +237,15 @@
|
||||
</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 { fetchPendingTasks, fetchInstanceDetail } from '@/api/workflow'
|
||||
import ApprovalDialog from '../components/ApprovalDialog.vue'
|
||||
import ProcessStatusTag from '../components/ProcessStatusTag.vue'
|
||||
@@ -238,7 +253,23 @@ import ListToolbarEndActions from '@/components/business/list-toolbar-end-action
|
||||
|
||||
defineOptions({ name: 'WorkflowTaskPending' })
|
||||
|
||||
const listColumnDefs = [
|
||||
{ prop: 'businessTypeLabel', label: '业务类型' },
|
||||
{ prop: 'businessId', label: '业务单号' },
|
||||
{ prop: 'starterUserName', label: '发起人' },
|
||||
{ prop: 'createTime', label: '到达时间' }
|
||||
]
|
||||
|
||||
const {
|
||||
visibleColumns,
|
||||
checkAll,
|
||||
isIndeterminate,
|
||||
isColumnVisible,
|
||||
resetToDefault
|
||||
} = usePersistedListColumns('workflow-task-pending-list-columns', listColumnDefs)
|
||||
|
||||
const searchForm = reactive<{ keyword: string }>({ keyword: '' })
|
||||
const quickSearchKeyword = ref('')
|
||||
const tableData = ref<Api.Workflow.TaskItem[]>([])
|
||||
const selectedRows = ref<Api.Workflow.TaskItem[]>([])
|
||||
const loading = ref(false)
|
||||
@@ -262,10 +293,11 @@ import ListToolbarEndActions from '@/components/business/list-toolbar-end-action
|
||||
async function loadData() {
|
||||
loading.value = true
|
||||
try {
|
||||
const quickKeyword = quickSearchKeyword.value?.trim()
|
||||
const res = await fetchPendingTasks({
|
||||
page: pagination.page,
|
||||
pageSize: pagination.pageSize,
|
||||
keyword: searchForm.keyword || undefined
|
||||
keyword: quickKeyword || searchForm.keyword || undefined
|
||||
})
|
||||
tableData.value = res.list || []
|
||||
pagination.total = res.total ?? 0
|
||||
@@ -275,12 +307,25 @@ import ListToolbarEndActions from '@/components/business/list-toolbar-end-action
|
||||
}
|
||||
|
||||
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()
|
||||
}
|
||||
@@ -299,8 +344,11 @@ import ListToolbarEndActions from '@/components/business/list-toolbar-end-action
|
||||
approvalVisible.value = true
|
||||
}
|
||||
|
||||
function handleApprovalDone() {
|
||||
loadData()
|
||||
async function handleApprovalDone() {
|
||||
await loadData()
|
||||
if (detailVisible.value && viewingRow.value) {
|
||||
await handleViewDetail(viewingRow.value)
|
||||
}
|
||||
}
|
||||
|
||||
async function handleViewDetail(row: Api.Workflow.TaskItem) {
|
||||
@@ -343,6 +391,7 @@ import ListToolbarEndActions from '@/components/business/list-toolbar-end-action
|
||||
watchDebounced(
|
||||
searchForm,
|
||||
() => {
|
||||
quickSearchKeyword.value = ''
|
||||
pagination.page = 1
|
||||
loadData()
|
||||
},
|
||||
|
||||
Reference in new issue
Block a user