提交
This commit is contained in:
1 parent
d84f4b944c
commit
7c838cfb2d
249 files changed
+50600
-18556
No files matched your search
@@ -3,7 +3,7 @@
|
||||
<div class="page-container">
|
||||
<section class="panel">
|
||||
<div class="panel-top">
|
||||
<h2>申请列表</h2>
|
||||
<h2 class="title-bar-heading">申请列表</h2>
|
||||
</div>
|
||||
|
||||
<div class="filter-block">
|
||||
@@ -33,10 +33,10 @@
|
||||
<div class="filter-actions-row">
|
||||
<span class="filter-hint">按流程名称、业务单号模糊查询。</span>
|
||||
<div class="filter-actions-end">
|
||||
<el-button class="btn-ghost" @click="handleReset"
|
||||
<el-button class="btn-ghost" :loading="loading" @click="handleReset"
|
||||
><el-icon><RefreshLeft /></el-icon>重置</el-button
|
||||
>
|
||||
<el-button class="btn-main" type="primary" @click="handleSearch"
|
||||
<el-button class="btn-main" type="primary" :loading="loading" @click="handleSearch"
|
||||
><el-icon><Search /></el-icon>搜索</el-button
|
||||
>
|
||||
</div>
|
||||
@@ -44,6 +44,12 @@
|
||||
</el-form>
|
||||
</div>
|
||||
|
||||
<div class="list-toolbar">
|
||||
<div class="list-toolbar-row">
|
||||
<ListToolbarEndActions :loading="loading" @refresh="loadData" />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="list-body list-wrap">
|
||||
<el-table
|
||||
class="list-table"
|
||||
@@ -68,7 +74,11 @@
|
||||
align="center"
|
||||
header-align="center"
|
||||
show-overflow-tooltip
|
||||
/>
|
||||
>
|
||||
<template #default="{ row }">
|
||||
<el-link type="primary" @click="handleViewDetail(row)">{{ row.processName }}</el-link>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="businessTypeLabel"
|
||||
label="业务类型"
|
||||
@@ -102,19 +112,6 @@
|
||||
align="center"
|
||||
header-align="center"
|
||||
/>
|
||||
<el-table-column
|
||||
label="操作"
|
||||
min-width="160"
|
||||
fixed="right"
|
||||
align="center"
|
||||
header-align="center"
|
||||
>
|
||||
<template #default="{ row }">
|
||||
<el-button class="btn-op-item primary" @click="handleViewDetail(row)"
|
||||
><el-icon><View /></el-icon>查看详情</el-button
|
||||
>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<div class="pagination list-pager-bar">
|
||||
<el-pagination
|
||||
@@ -218,16 +215,17 @@
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import ListToolbarEndActions from '@/components/business/list-toolbar-end-actions/index.vue'
|
||||
import { fetchMyInstances, fetchBusinessAllTasks } from '@/api/workflow'
|
||||
import ProcessStatusTag from '../components/ProcessStatusTag.vue'
|
||||
import { Document, View, Search, RefreshLeft, Close } from '@element-plus/icons-vue'
|
||||
import { Document, Search, RefreshLeft, Close } from '@element-plus/icons-vue'
|
||||
|
||||
defineOptions({ name: 'WorkflowMyApplications' })
|
||||
|
||||
const searchForm = reactive<{ keyword: string; status: string }>({ keyword: '', status: '' })
|
||||
const tableData = ref<Api.Workflow.MyInstanceItem[]>([])
|
||||
const loading = ref(false)
|
||||
const pagination = reactive({ page: 1, pageSize: 10, total: 0 })
|
||||
const pagination = reactive({ page: 1, pageSize: 20, total: 0 })
|
||||
|
||||
const detailVisible = ref(false)
|
||||
const detailLoading = ref(false)
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<div class="page-container">
|
||||
<section class="panel">
|
||||
<div class="panel-top">
|
||||
<h2>流程列表</h2>
|
||||
<h2 class="title-bar-heading">流程列表</h2>
|
||||
</div>
|
||||
|
||||
<div class="filter-block">
|
||||
@@ -22,10 +22,10 @@
|
||||
<div class="filter-actions-row">
|
||||
<span class="filter-hint">按流程名称、编码模糊查询。</span>
|
||||
<div class="filter-actions-end">
|
||||
<el-button class="btn-ghost" @click="handleReset"
|
||||
<el-button class="btn-ghost" :loading="loading" @click="handleReset"
|
||||
><el-icon><RefreshLeft /></el-icon>重置</el-button
|
||||
>
|
||||
<el-button class="btn-main" type="primary" @click="handleSearch"
|
||||
<el-button class="btn-main" type="primary" :loading="loading" @click="handleSearch"
|
||||
><el-icon><Search /></el-icon>搜索</el-button
|
||||
>
|
||||
</div>
|
||||
@@ -42,6 +42,32 @@
|
||||
<el-icon><Plus /></el-icon>
|
||||
新增流程
|
||||
</el-button>
|
||||
<el-button
|
||||
class="btn-ghost"
|
||||
:disabled="selectedRows.length !== 1"
|
||||
@click="handleToolbarEdit"
|
||||
>
|
||||
<el-icon><Edit /></el-icon>
|
||||
编辑
|
||||
</el-button>
|
||||
<el-button
|
||||
class="btn-ghost"
|
||||
:disabled="selectedRows.length !== 1"
|
||||
@click="handleToolbarDesign"
|
||||
>
|
||||
<el-icon><SetUp /></el-icon>
|
||||
流程设计
|
||||
</el-button>
|
||||
<el-button
|
||||
class="btn-ghost"
|
||||
type="danger"
|
||||
:disabled="selectedRows.length !== 1 || !canDeleteByCreator(selectedRows[0])"
|
||||
:title="selectedRows.length === 1 && !canDeleteByCreator(selectedRows[0]) ? CREATOR_DELETE_TIP : ''"
|
||||
@click="handleToolbarDelete"
|
||||
>
|
||||
<el-icon><Delete /></el-icon>
|
||||
删除
|
||||
</el-button>
|
||||
<el-button
|
||||
class="btn-ghost"
|
||||
type="danger"
|
||||
@@ -52,6 +78,8 @@
|
||||
<el-icon><Delete /></el-icon>
|
||||
批量删除
|
||||
</el-button>
|
||||
|
||||
<ListToolbarEndActions :loading="loading" @refresh="loadData" />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -63,6 +91,7 @@
|
||||
stripe
|
||||
row-key="id"
|
||||
@selection-change="handleSelectionChange"
|
||||
@row-dblclick="handleView"
|
||||
>
|
||||
<el-table-column type="selection" min-width="55" align="center" header-align="center" />
|
||||
<el-table-column
|
||||
@@ -86,7 +115,12 @@
|
||||
min-width="180"
|
||||
align="center"
|
||||
header-align="center"
|
||||
/>
|
||||
show-overflow-tooltip
|
||||
>
|
||||
<template #default="{ row }">
|
||||
<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">
|
||||
<template #default="{ row }">
|
||||
<el-switch
|
||||
@@ -109,36 +143,6 @@
|
||||
align="center"
|
||||
header-align="center"
|
||||
/>
|
||||
<el-table-column
|
||||
label="操作"
|
||||
min-width="160"
|
||||
fixed="right"
|
||||
align="center"
|
||||
header-align="center"
|
||||
>
|
||||
<template #default="{ row }">
|
||||
<div style="display: flex; justify-content: center; gap: 8px">
|
||||
<el-button class="btn-op-item primary" @click="handleDesign(row)">
|
||||
<el-icon><SetUp /></el-icon>流程设计
|
||||
</el-button>
|
||||
<el-dropdown trigger="hover" @command="(cmd: string) => handleDropdownCommand(cmd, row)">
|
||||
<el-button class="btn-op-item">
|
||||
<el-icon><More /></el-icon>
|
||||
</el-button>
|
||||
<template #dropdown>
|
||||
<el-dropdown-menu>
|
||||
<el-dropdown-item command="edit">
|
||||
<el-icon><Edit /></el-icon>编辑
|
||||
</el-dropdown-item>
|
||||
<el-dropdown-item command="delete" divided :disabled="!canDeleteByCreator(row)">
|
||||
<el-icon><Delete /></el-icon>删除
|
||||
</el-dropdown-item>
|
||||
</el-dropdown-menu>
|
||||
</template>
|
||||
</el-dropdown>
|
||||
</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<div class="pagination list-pager-bar">
|
||||
<el-pagination
|
||||
@@ -204,12 +208,48 @@
|
||||
:process-name="designerDefName"
|
||||
@saved="handleDesignerSaved"
|
||||
/>
|
||||
|
||||
<SystemViewDialog
|
||||
v-model:visible="viewVisible"
|
||||
:title="viewingRecord?.processName || '流程详情'"
|
||||
:icon="SetUp"
|
||||
:code="viewingRecord?.processCode"
|
||||
code-label="流程编码"
|
||||
:sections="processViewSections"
|
||||
>
|
||||
<template v-if="viewingRecord" #hero-actions>
|
||||
<el-button class="btn-main" type="primary" @click="handleDesign(viewingRecord)">
|
||||
<el-icon><SetUp /></el-icon>
|
||||
流程设计
|
||||
</el-button>
|
||||
<el-button class="btn-ghost" @click="handleEdit(viewingRecord)">
|
||||
<el-icon><Edit /></el-icon>
|
||||
编辑
|
||||
</el-button>
|
||||
<el-button
|
||||
class="btn-ghost"
|
||||
type="danger"
|
||||
:disabled="!canDeleteByCreator(viewingRecord)"
|
||||
:title="canDeleteByCreator(viewingRecord) ? '' : CREATOR_DELETE_TIP"
|
||||
@click="handleDelete(viewingRecord)"
|
||||
>
|
||||
<el-icon><Delete /></el-icon>
|
||||
删除
|
||||
</el-button>
|
||||
</template>
|
||||
</SystemViewDialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import ListToolbarEndActions from '@/components/business/list-toolbar-end-actions/index.vue'
|
||||
import {
|
||||
canDeleteByCreator,
|
||||
filterDeletableByCreator,
|
||||
allRowsDeletableByCreator,
|
||||
CREATOR_DELETE_TIP
|
||||
} from '@/utils/creator-delete'
|
||||
import {
|
||||
import { canDeleteByCreator, filterDeletableByCreator, allRowsDeletableByCreator, CREATOR_DELETE_TIP } from '@/utils/creator-delete'
|
||||
Plus,
|
||||
Close,
|
||||
Check,
|
||||
@@ -217,8 +257,7 @@
|
||||
RefreshLeft,
|
||||
Delete,
|
||||
SetUp,
|
||||
Edit,
|
||||
More
|
||||
Edit
|
||||
} from '@element-plus/icons-vue'
|
||||
import { withFullscreenLoading, fullscreenLoadingText } from '@/utils/fullscreen-loading'
|
||||
import {
|
||||
@@ -228,6 +267,10 @@
|
||||
fetchDeleteProcessDef
|
||||
} from '@/api/workflow'
|
||||
import FlowDesigner from '../designer/FlowDesigner.vue'
|
||||
import SystemViewDialog, {
|
||||
type ViewField,
|
||||
type ViewSection
|
||||
} from '@/components/business/system-view-dialog/index.vue'
|
||||
|
||||
defineOptions({ name: 'WorkflowProcess' })
|
||||
|
||||
@@ -235,7 +278,7 @@
|
||||
const tableData = ref<Api.Workflow.ProcessDefItem[]>([])
|
||||
const selectedRows = ref<Api.Workflow.ProcessDefItem[]>([])
|
||||
const loading = ref(false)
|
||||
const pagination = reactive({ page: 1, pageSize: 10, total: 0 })
|
||||
const pagination = reactive({ page: 1, pageSize: 20, total: 0 })
|
||||
|
||||
// 新增/编辑
|
||||
const dialogVisible = ref(false)
|
||||
@@ -262,6 +305,31 @@
|
||||
const designerDefId = ref('')
|
||||
const designerDefName = ref('')
|
||||
|
||||
// 查看
|
||||
const viewVisible = ref(false)
|
||||
const viewingRecord = ref<Api.Workflow.ProcessDefItem | null>(null)
|
||||
|
||||
const processViewSections = computed<ViewSection[]>(() => {
|
||||
const row = viewingRecord.value
|
||||
if (!row) return []
|
||||
const fields: ViewField[] = [
|
||||
{ label: '流程编码', value: row.processCode || '--' },
|
||||
{ label: '流程名称', value: row.processName || '--' },
|
||||
{
|
||||
label: '状态',
|
||||
value: row.status === '1' ? '启用' : '停用',
|
||||
tagType: row.status === '1' ? 'success' : 'info'
|
||||
},
|
||||
{
|
||||
label: '最新版本',
|
||||
value: row.latestVersion != null ? `V${row.latestVersion}` : '--'
|
||||
},
|
||||
{ label: '创建时间', value: row.createTime || '--' },
|
||||
{ label: '备注', value: row.remark || '--', colSpan: 2 }
|
||||
]
|
||||
return [{ title: '基本信息', fields }]
|
||||
})
|
||||
|
||||
const handleSelectionChange = (rows: Api.Workflow.ProcessDefItem[]) => {
|
||||
selectedRows.value = rows
|
||||
}
|
||||
@@ -353,21 +421,46 @@
|
||||
await loadData()
|
||||
}
|
||||
|
||||
function handleDropdownCommand(command: string, row: Api.Workflow.ProcessDefItem) {
|
||||
switch (command) {
|
||||
case 'edit': handleEdit(row); break
|
||||
case 'delete': handleDelete(row); break
|
||||
}
|
||||
function handleView(row: Api.Workflow.ProcessDefItem) {
|
||||
viewingRecord.value = row
|
||||
viewVisible.value = true
|
||||
}
|
||||
|
||||
async function handleDelete(row: Api.Workflow.ProcessDefItem)
|
||||
function handleToolbarEdit() {
|
||||
if (selectedRows.value.length !== 1) {
|
||||
ElMessage.warning('请选择一条流程')
|
||||
return
|
||||
}
|
||||
handleEdit(selectedRows.value[0])
|
||||
}
|
||||
|
||||
function handleToolbarDesign() {
|
||||
if (selectedRows.value.length !== 1) {
|
||||
ElMessage.warning('请选择一条流程')
|
||||
return
|
||||
}
|
||||
handleDesign(selectedRows.value[0])
|
||||
}
|
||||
|
||||
function handleToolbarDelete() {
|
||||
if (selectedRows.value.length !== 1) {
|
||||
ElMessage.warning('请选择一条流程')
|
||||
return
|
||||
}
|
||||
handleDelete(selectedRows.value[0])
|
||||
}
|
||||
|
||||
async function handleDelete(row: Api.Workflow.ProcessDefItem) {
|
||||
if (!canDeleteByCreator(row)) {
|
||||
ElMessage.warning(CREATOR_DELETE_TIP)
|
||||
return
|
||||
}
|
||||
{
|
||||
await ElMessageBox.confirm('确定要删除该流程吗?', '提示', { type: 'warning' })
|
||||
await fetchDeleteProcessDef(row.id)
|
||||
if (viewingRecord.value?.id === row.id) {
|
||||
viewVisible.value = false
|
||||
viewingRecord.value = null
|
||||
}
|
||||
await loadData()
|
||||
}
|
||||
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
<div class="page-container">
|
||||
<section class="panel">
|
||||
<div class="panel-top">
|
||||
<h2>已办列表</h2>
|
||||
<h2 class="title-bar-heading">已办列表</h2>
|
||||
</div>
|
||||
|
||||
<div class="filter-block">
|
||||
@@ -21,10 +21,10 @@
|
||||
<div class="filter-actions-row">
|
||||
<span class="filter-hint">按流程名称模糊查询。</span>
|
||||
<div class="filter-actions-end">
|
||||
<el-button class="btn-ghost" @click="handleReset"
|
||||
<el-button class="btn-ghost" :loading="loading" @click="handleReset"
|
||||
><el-icon><RefreshLeft /></el-icon>重置</el-button
|
||||
>
|
||||
<el-button class="btn-main" type="primary" @click="handleSearch"
|
||||
<el-button class="btn-main" type="primary" :loading="loading" @click="handleSearch"
|
||||
><el-icon><Search /></el-icon>搜索</el-button
|
||||
>
|
||||
</div>
|
||||
@@ -32,6 +32,12 @@
|
||||
</el-form>
|
||||
</div>
|
||||
|
||||
<div class="list-toolbar">
|
||||
<div class="list-toolbar-row">
|
||||
<ListToolbarEndActions :loading="loading" @refresh="loadData" />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="list-body list-wrap">
|
||||
<el-table
|
||||
class="list-table"
|
||||
@@ -55,7 +61,11 @@
|
||||
min-width="160"
|
||||
align="center"
|
||||
header-align="center"
|
||||
/>
|
||||
>
|
||||
<template #default="{ row }">
|
||||
<el-link type="primary" @click="handleViewDetail(row)">{{ row.processName }}</el-link>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="businessTypeLabel"
|
||||
label="业务类型"
|
||||
@@ -98,19 +108,6 @@
|
||||
align="center"
|
||||
header-align="center"
|
||||
/>
|
||||
<el-table-column
|
||||
label="操作"
|
||||
min-width="260"
|
||||
fixed="right"
|
||||
align="center"
|
||||
header-align="center"
|
||||
>
|
||||
<template #default="{ row }">
|
||||
<el-button class="btn-op-item primary" @click="handleViewDetail(row)"
|
||||
><el-icon><View /></el-icon>查看详情</el-button
|
||||
>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<div class="pagination list-pager-bar">
|
||||
<el-pagination
|
||||
@@ -216,16 +213,17 @@
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import ListToolbarEndActions from '@/components/business/list-toolbar-end-actions/index.vue'
|
||||
import { fetchCompletedTasks, fetchInstanceDetail } from '@/api/workflow'
|
||||
import ProcessStatusTag from '../components/ProcessStatusTag.vue'
|
||||
import { Document, View, Search, RefreshLeft, Close } from '@element-plus/icons-vue'
|
||||
import { Document, Search, RefreshLeft, Close } from '@element-plus/icons-vue'
|
||||
|
||||
defineOptions({ name: 'WorkflowTaskCompleted' })
|
||||
|
||||
const searchForm = reactive<{ keyword: string }>({ keyword: '' })
|
||||
const tableData = ref<Api.Workflow.TaskItem[]>([])
|
||||
const loading = ref(false)
|
||||
const pagination = reactive({ page: 1, pageSize: 10, total: 0 })
|
||||
const pagination = reactive({ page: 1, pageSize: 20, total: 0 })
|
||||
|
||||
// 详情
|
||||
const detailVisible = ref(false)
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
<div class="page-container">
|
||||
<section class="panel">
|
||||
<div class="panel-top">
|
||||
<h2>待办列表</h2>
|
||||
<h2 class="title-bar-heading">待办列表</h2>
|
||||
</div>
|
||||
|
||||
<div class="filter-block">
|
||||
@@ -21,10 +21,10 @@
|
||||
<div class="filter-actions-row">
|
||||
<span class="filter-hint">按流程名称模糊查询。</span>
|
||||
<div class="filter-actions-end">
|
||||
<el-button class="btn-ghost" @click="handleReset"
|
||||
<el-button class="btn-ghost" :loading="loading" @click="handleReset"
|
||||
><el-icon><RefreshLeft /></el-icon>重置</el-button
|
||||
>
|
||||
<el-button class="btn-main" type="primary" @click="handleSearch"
|
||||
<el-button class="btn-main" type="primary" :loading="loading" @click="handleSearch"
|
||||
><el-icon><Search /></el-icon>搜索</el-button
|
||||
>
|
||||
</div>
|
||||
@@ -32,6 +32,25 @@
|
||||
</el-form>
|
||||
</div>
|
||||
|
||||
<div class="list-toolbar">
|
||||
<div class="list-toolbar-row">
|
||||
<div class="list-toolbar-selected">
|
||||
已选 <span class="sel-num">{{ selectedRows.length }}</span> 项
|
||||
</div>
|
||||
<el-button
|
||||
class="btn-main"
|
||||
type="primary"
|
||||
:disabled="selectedRows.length !== 1"
|
||||
@click="handleToolbarApprove"
|
||||
>
|
||||
<el-icon><EditPen /></el-icon>
|
||||
审批
|
||||
</el-button>
|
||||
|
||||
<ListToolbarEndActions :loading="loading" @refresh="loadData" />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="list-body list-wrap">
|
||||
<el-table
|
||||
class="list-table"
|
||||
@@ -39,8 +58,10 @@
|
||||
v-loading="loading"
|
||||
stripe
|
||||
row-key="id"
|
||||
@selection-change="handleSelectionChange"
|
||||
@row-dblclick="handleViewDetail"
|
||||
>
|
||||
<el-table-column type="selection" min-width="55" align="center" header-align="center" />
|
||||
<el-table-column
|
||||
type="index"
|
||||
label="序号"
|
||||
@@ -56,7 +77,11 @@
|
||||
align="center"
|
||||
header-align="center"
|
||||
show-overflow-tooltip
|
||||
/>
|
||||
>
|
||||
<template #default="{ row }">
|
||||
<el-link type="primary" @click="handleViewDetail(row)">{{ row.processName }}</el-link>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="businessTypeLabel"
|
||||
label="业务类型"
|
||||
@@ -86,22 +111,6 @@
|
||||
align="center"
|
||||
header-align="center"
|
||||
/>
|
||||
<el-table-column
|
||||
label="操作"
|
||||
min-width="260"
|
||||
fixed="right"
|
||||
align="center"
|
||||
header-align="center"
|
||||
>
|
||||
<template #default="{ row }">
|
||||
<el-button class="btn-op-item primary" @click="handleApprove(row)"
|
||||
><el-icon><EditPen /></el-icon>审批</el-button
|
||||
>
|
||||
<el-button class="btn-op-item" @click="handleViewDetail(row)"
|
||||
><el-icon><View /></el-icon>查看详情</el-button
|
||||
>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<div class="pagination list-pager-bar">
|
||||
<el-pagination
|
||||
@@ -156,6 +165,12 @@
|
||||
{{ detailData.createTime || '--' }}
|
||||
</p>
|
||||
</div>
|
||||
<div v-if="viewingRow" class="view-hero-actions">
|
||||
<el-button class="btn-main" type="primary" @click="handleApprove(viewingRow)">
|
||||
<el-icon><EditPen /></el-icon>
|
||||
审批
|
||||
</el-button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div
|
||||
@@ -215,17 +230,19 @@
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import ListToolbarEndActions from '@/components/business/list-toolbar-end-actions/index.vue'
|
||||
import { fetchPendingTasks, fetchInstanceDetail } from '@/api/workflow'
|
||||
import ApprovalDialog from '../components/ApprovalDialog.vue'
|
||||
import ProcessStatusTag from '../components/ProcessStatusTag.vue'
|
||||
import { Document, EditPen, View, Search, RefreshLeft, Close } from '@element-plus/icons-vue'
|
||||
import { Document, EditPen, Search, RefreshLeft, Close } from '@element-plus/icons-vue'
|
||||
|
||||
defineOptions({ name: 'WorkflowTaskPending' })
|
||||
|
||||
const searchForm = reactive<{ keyword: string }>({ keyword: '' })
|
||||
const tableData = ref<Api.Workflow.TaskItem[]>([])
|
||||
const selectedRows = ref<Api.Workflow.TaskItem[]>([])
|
||||
const loading = ref(false)
|
||||
const pagination = reactive({ page: 1, pageSize: 10, total: 0 })
|
||||
const pagination = reactive({ page: 1, pageSize: 20, total: 0 })
|
||||
|
||||
// 审批
|
||||
const approvalVisible = ref(false)
|
||||
@@ -236,6 +253,11 @@
|
||||
const detailVisible = ref(false)
|
||||
const detailLoading = ref(false)
|
||||
const detailData = ref<Api.Workflow.InstanceDetail | null>(null)
|
||||
const viewingRow = ref<Api.Workflow.TaskItem | null>(null)
|
||||
|
||||
function handleSelectionChange(rows: Api.Workflow.TaskItem[]) {
|
||||
selectedRows.value = rows
|
||||
}
|
||||
|
||||
async function loadData() {
|
||||
loading.value = true
|
||||
@@ -263,6 +285,14 @@
|
||||
loadData()
|
||||
}
|
||||
|
||||
function handleToolbarApprove() {
|
||||
if (selectedRows.value.length !== 1) {
|
||||
ElMessage.warning('请选择一条待办任务')
|
||||
return
|
||||
}
|
||||
handleApprove(selectedRows.value[0])
|
||||
}
|
||||
|
||||
function handleApprove(row: Api.Workflow.TaskItem) {
|
||||
approvalTaskId.value = row.id
|
||||
approvalInstanceId.value = row.instanceId || ''
|
||||
@@ -274,6 +304,7 @@
|
||||
}
|
||||
|
||||
async function handleViewDetail(row: Api.Workflow.TaskItem) {
|
||||
viewingRow.value = row
|
||||
detailVisible.value = true
|
||||
detailLoading.value = true
|
||||
detailData.value = null
|
||||
@@ -336,6 +367,16 @@
|
||||
background: linear-gradient(135deg, #ecfdf5 0%, #ffffff 55%);
|
||||
border-bottom: 1px solid #d9e8e2;
|
||||
align-items: center;
|
||||
flex-wrap: wrap;
|
||||
}
|
||||
|
||||
.view-hero-actions {
|
||||
margin-left: auto;
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
justify-content: flex-end;
|
||||
gap: 8px;
|
||||
flex-shrink: 0;
|
||||
}
|
||||
|
||||
.view-hero-icon {
|
||||
|
||||
Reference in new issue
Block a user