提交
This commit is contained in:
1 parent
4a00f21bfb
commit
edf88dc016
1503 files changed
+329728
-41987
No files matched your search
@@ -19,7 +19,9 @@
|
||||
<div class="view-hero-main">
|
||||
<h2>{{ instanceData?.processName || '审批操作' }}</h2>
|
||||
<div class="view-hero-tags">
|
||||
<el-tag size="small" type="info">{{ instanceData?.businessTypeLabel || instanceData?.businessType || '--' }}</el-tag>
|
||||
<el-tag size="small" type="info">{{
|
||||
instanceData?.businessTypeLabel || instanceData?.businessType || '--'
|
||||
}}</el-tag>
|
||||
</div>
|
||||
<p v-if="instanceData" class="view-hero-meta">
|
||||
发起人:{{ instanceData.starterUserName || '--' }}
|
||||
@@ -64,7 +66,9 @@
|
||||
</div>
|
||||
</div>
|
||||
<template #footer>
|
||||
<el-button class="btn-ghost" @click="visible = false"><el-icon><Close /></el-icon>取消</el-button>
|
||||
<el-button class="btn-ghost" @click="visible = false"
|
||||
><el-icon><Close /></el-icon>取消</el-button
|
||||
>
|
||||
<el-button type="primary" class="btn-main" :loading="submitting" @click="handleSubmit">
|
||||
<el-icon><Check /></el-icon>
|
||||
确认提交
|
||||
|
||||
File diff suppressed because it is too large.
Load diff
@@ -23,7 +23,12 @@
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="状态">
|
||||
<el-select v-model="searchForm.status" placeholder="全部" clearable style="width: 140px">
|
||||
<el-select
|
||||
v-model="searchForm.status"
|
||||
placeholder="全部"
|
||||
clearable
|
||||
style="width: 140px"
|
||||
>
|
||||
<el-option label="进行中" value="running" />
|
||||
<el-option label="已完成" value="completed" />
|
||||
<el-option label="已驳回" value="rejected" />
|
||||
@@ -33,8 +38,12 @@
|
||||
<div class="filter-actions-row">
|
||||
<span class="filter-hint">按流程名称、业务单号模糊查询。</span>
|
||||
<div class="filter-actions-end">
|
||||
<el-button class="btn-ghost" @click="handleReset"><el-icon><RefreshLeft /></el-icon>重置</el-button>
|
||||
<el-button class="btn-main" type="primary" @click="handleSearch"><el-icon><Search /></el-icon>搜索</el-button>
|
||||
<el-button class="btn-ghost" @click="handleReset"
|
||||
><el-icon><RefreshLeft /></el-icon>重置</el-button
|
||||
>
|
||||
<el-button class="btn-main" type="primary" @click="handleSearch"
|
||||
><el-icon><Search /></el-icon>搜索</el-button
|
||||
>
|
||||
</div>
|
||||
</div>
|
||||
</el-form>
|
||||
@@ -98,9 +107,17 @@
|
||||
align="center"
|
||||
header-align="center"
|
||||
/>
|
||||
<el-table-column label="操作" min-width="160" fixed="right" 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>
|
||||
<el-button class="btn-op-item primary" @click="handleViewDetail(row)"
|
||||
><el-icon><View /></el-icon>查看详情</el-button
|
||||
>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
@@ -137,7 +154,9 @@
|
||||
<h2>{{ detailRow?.processName || '流程详情' }}</h2>
|
||||
<div class="view-hero-tags">
|
||||
<ProcessStatusTag :status="detailRow?.status || ''" />
|
||||
<el-tag size="small" type="info">{{ detailRow?.businessTypeLabel || detailData.businessType || '--' }}</el-tag>
|
||||
<el-tag size="small" type="info">{{
|
||||
detailRow?.businessTypeLabel || detailData.businessType || '--'
|
||||
}}</el-tag>
|
||||
</div>
|
||||
<p class="view-hero-meta">
|
||||
业务单号:{{ detailData.businessId || '--' }}
|
||||
@@ -147,10 +166,17 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div v-if="detailData.businessFormFields && detailData.businessFormFields.length" class="view-section">
|
||||
<div
|
||||
v-if="detailData.businessFormFields && detailData.businessFormFields.length"
|
||||
class="view-section"
|
||||
>
|
||||
<h3>申请信息</h3>
|
||||
<dl class="view-kv-grid">
|
||||
<div v-for="field in detailData.businessFormFields" :key="field.label" class="view-kv">
|
||||
<div
|
||||
v-for="field in detailData.businessFormFields"
|
||||
:key="field.label"
|
||||
class="view-kv"
|
||||
>
|
||||
<dt>{{ field.label }}</dt>
|
||||
<dd>{{ field.value || '--' }}</dd>
|
||||
</div>
|
||||
@@ -187,7 +213,9 @@
|
||||
</template>
|
||||
</div>
|
||||
<template #footer>
|
||||
<el-button class="btn-ghost" @click="detailVisible = false"><el-icon><Close /></el-icon>关闭</el-button>
|
||||
<el-button class="btn-ghost" @click="detailVisible = false"
|
||||
><el-icon><Close /></el-icon>关闭</el-button
|
||||
>
|
||||
</template>
|
||||
</el-dialog>
|
||||
</section>
|
||||
@@ -218,7 +246,7 @@
|
||||
page: pagination.page,
|
||||
pageSize: pagination.pageSize,
|
||||
keyword: searchForm.keyword || undefined,
|
||||
status: searchForm.status || undefined,
|
||||
status: searchForm.status || undefined
|
||||
})
|
||||
tableData.value = res.list || []
|
||||
pagination.total = res.total ?? 0
|
||||
@@ -245,10 +273,7 @@
|
||||
detailData.value = null
|
||||
detailRow.value = row
|
||||
try {
|
||||
const data = await fetchBusinessAllTasks(
|
||||
row.businessType || '',
|
||||
row.businessId || ''
|
||||
)
|
||||
const data = await fetchBusinessAllTasks(row.businessType || '', row.businessId || '')
|
||||
detailData.value = data
|
||||
} catch {
|
||||
// error handled globally
|
||||
|
||||
@@ -27,8 +27,12 @@
|
||||
<div class="filter-actions-row">
|
||||
<span class="filter-hint">按流程名称、编码模糊查询。</span>
|
||||
<div class="filter-actions-end">
|
||||
<el-button class="btn-ghost" @click="handleReset"><el-icon><RefreshLeft /></el-icon>重置</el-button>
|
||||
<el-button class="btn-main" type="primary" @click="handleSearch"><el-icon><Search /></el-icon>搜索</el-button>
|
||||
<el-button class="btn-ghost" @click="handleReset"
|
||||
><el-icon><RefreshLeft /></el-icon>重置</el-button
|
||||
>
|
||||
<el-button class="btn-main" type="primary" @click="handleSearch"
|
||||
><el-icon><Search /></el-icon>搜索</el-button
|
||||
>
|
||||
</div>
|
||||
</div>
|
||||
</el-form>
|
||||
@@ -109,11 +113,23 @@
|
||||
align="center"
|
||||
header-align="center"
|
||||
/>
|
||||
<el-table-column label="操作" min-width="400" fixed="right" align="center" header-align="center">
|
||||
<el-table-column
|
||||
label="操作"
|
||||
min-width="400"
|
||||
fixed="right"
|
||||
align="center"
|
||||
header-align="center"
|
||||
>
|
||||
<template #default="{ row }">
|
||||
<el-button class="btn-op-item primary" @click="handleDesign(row)"><el-icon><SetUp /></el-icon>流程设计</el-button>
|
||||
<el-button class="btn-op-item" @click="handleEdit(row)"><el-icon><Edit /></el-icon>编辑</el-button>
|
||||
<el-button class="btn-op-item" @click="handleDelete(row)"><el-icon><Delete /></el-icon>删除</el-button>
|
||||
<el-button class="btn-op-item primary" @click="handleDesign(row)"
|
||||
><el-icon><SetUp /></el-icon>流程设计</el-button
|
||||
>
|
||||
<el-button class="btn-op-item" @click="handleEdit(row)"
|
||||
><el-icon><Edit /></el-icon>编辑</el-button
|
||||
>
|
||||
<el-button class="btn-op-item" @click="handleDelete(row)"
|
||||
><el-icon><Delete /></el-icon>删除</el-button
|
||||
>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
@@ -185,7 +201,16 @@
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import { Plus, Close, Check, Search, RefreshLeft, Delete, SetUp, Edit } from '@element-plus/icons-vue'
|
||||
import {
|
||||
Plus,
|
||||
Close,
|
||||
Check,
|
||||
Search,
|
||||
RefreshLeft,
|
||||
Delete,
|
||||
SetUp,
|
||||
Edit
|
||||
} from '@element-plus/icons-vue'
|
||||
import { withFullscreenLoading, fullscreenLoadingText } from '@/utils/fullscreen-loading'
|
||||
import {
|
||||
fetchProcessDefList,
|
||||
@@ -310,7 +335,10 @@
|
||||
}
|
||||
}
|
||||
|
||||
async function handleStatusChange(row: Api.Workflow.ProcessDefItem, val: string | number | boolean) {
|
||||
async function handleStatusChange(
|
||||
row: Api.Workflow.ProcessDefItem,
|
||||
val: string | number | boolean
|
||||
) {
|
||||
const newStatus = String(val)
|
||||
await fetchUpdateProcessDef(row.id, { status: newStatus })
|
||||
await loadData()
|
||||
@@ -325,7 +353,9 @@
|
||||
async function handleBatchDelete() {
|
||||
const ids = selectedRows.value.map((r) => r.id)
|
||||
if (!ids.length) return
|
||||
await ElMessageBox.confirm(`确定删除选中的 ${ids.length} 个流程吗?`, '提示', { type: 'warning' })
|
||||
await ElMessageBox.confirm(`确定删除选中的 ${ids.length} 个流程吗?`, '提示', {
|
||||
type: 'warning'
|
||||
})
|
||||
await withFullscreenLoading(async () => {
|
||||
for (const id of ids) {
|
||||
await fetchDeleteProcessDef(id)
|
||||
|
||||
@@ -26,8 +26,12 @@
|
||||
<div class="filter-actions-row">
|
||||
<span class="filter-hint">按流程名称模糊查询。</span>
|
||||
<div class="filter-actions-end">
|
||||
<el-button class="btn-ghost" @click="handleReset"><el-icon><RefreshLeft /></el-icon>重置</el-button>
|
||||
<el-button class="btn-main" type="primary" @click="handleSearch"><el-icon><Search /></el-icon>搜索</el-button>
|
||||
<el-button class="btn-ghost" @click="handleReset"
|
||||
><el-icon><RefreshLeft /></el-icon>重置</el-button
|
||||
>
|
||||
<el-button class="btn-main" type="primary" @click="handleSearch"
|
||||
><el-icon><Search /></el-icon>搜索</el-button
|
||||
>
|
||||
</div>
|
||||
</div>
|
||||
</el-form>
|
||||
@@ -99,9 +103,17 @@
|
||||
align="center"
|
||||
header-align="center"
|
||||
/>
|
||||
<el-table-column label="操作" min-width="260" fixed="right" 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>
|
||||
<el-button class="btn-op-item primary" @click="handleViewDetail(row)"
|
||||
><el-icon><View /></el-icon>查看详情</el-button
|
||||
>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
@@ -138,7 +150,9 @@
|
||||
<h2>{{ detailData.processName || '流程详情' }}</h2>
|
||||
<div class="view-hero-tags">
|
||||
<ProcessStatusTag :status="detailData.status || ''" />
|
||||
<el-tag size="small" type="info">{{ detailData.businessTypeLabel || detailData.businessType || '--' }}</el-tag>
|
||||
<el-tag size="small" type="info">{{
|
||||
detailData.businessTypeLabel || detailData.businessType || '--'
|
||||
}}</el-tag>
|
||||
</div>
|
||||
<p class="view-hero-meta">
|
||||
发起人:{{ detailData.starterUserName || '--' }}
|
||||
@@ -150,10 +164,17 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div v-if="detailData.businessFormFields && detailData.businessFormFields.length" class="view-section">
|
||||
<div
|
||||
v-if="detailData.businessFormFields && detailData.businessFormFields.length"
|
||||
class="view-section"
|
||||
>
|
||||
<h3>申请信息</h3>
|
||||
<dl class="view-kv-grid">
|
||||
<div v-for="field in detailData.businessFormFields" :key="field.label" class="view-kv">
|
||||
<div
|
||||
v-for="field in detailData.businessFormFields"
|
||||
:key="field.label"
|
||||
class="view-kv"
|
||||
>
|
||||
<dt>{{ field.label }}</dt>
|
||||
<dd>{{ field.value || '--' }}</dd>
|
||||
</div>
|
||||
@@ -190,7 +211,9 @@
|
||||
</template>
|
||||
</div>
|
||||
<template #footer>
|
||||
<el-button class="btn-ghost" @click="detailVisible = false"><el-icon><Close /></el-icon>关闭</el-button>
|
||||
<el-button class="btn-ghost" @click="detailVisible = false"
|
||||
><el-icon><Close /></el-icon>关闭</el-button
|
||||
>
|
||||
</template>
|
||||
</el-dialog>
|
||||
</section>
|
||||
@@ -253,7 +276,7 @@
|
||||
businessTypeLabel: row.businessTypeLabel,
|
||||
businessId: row.businessId,
|
||||
starterUserId: row.starterUserId,
|
||||
starterUserName: row.starterUserName,
|
||||
starterUserName: row.starterUserName
|
||||
} as Api.Workflow.InstanceDetail & {
|
||||
processName?: string
|
||||
businessType?: string
|
||||
|
||||
@@ -26,8 +26,12 @@
|
||||
<div class="filter-actions-row">
|
||||
<span class="filter-hint">按流程名称模糊查询。</span>
|
||||
<div class="filter-actions-end">
|
||||
<el-button class="btn-ghost" @click="handleReset"><el-icon><RefreshLeft /></el-icon>重置</el-button>
|
||||
<el-button class="btn-main" type="primary" @click="handleSearch"><el-icon><Search /></el-icon>搜索</el-button>
|
||||
<el-button class="btn-ghost" @click="handleReset"
|
||||
><el-icon><RefreshLeft /></el-icon>重置</el-button
|
||||
>
|
||||
<el-button class="btn-main" type="primary" @click="handleSearch"
|
||||
><el-icon><Search /></el-icon>搜索</el-button
|
||||
>
|
||||
</div>
|
||||
</div>
|
||||
</el-form>
|
||||
@@ -87,10 +91,20 @@
|
||||
align="center"
|
||||
header-align="center"
|
||||
/>
|
||||
<el-table-column label="操作" min-width="260" fixed="right" 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>
|
||||
<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>
|
||||
@@ -135,7 +149,9 @@
|
||||
<h2>{{ detailData.processName || '流程详情' }}</h2>
|
||||
<div class="view-hero-tags">
|
||||
<ProcessStatusTag :status="detailData.status || ''" />
|
||||
<el-tag size="small" type="info">{{ detailData.businessTypeLabel || detailData.businessType || '--' }}</el-tag>
|
||||
<el-tag size="small" type="info">{{
|
||||
detailData.businessTypeLabel || detailData.businessType || '--'
|
||||
}}</el-tag>
|
||||
</div>
|
||||
<p class="view-hero-meta">
|
||||
发起人:{{ detailData.starterUserName || '--' }}
|
||||
@@ -147,10 +163,17 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div v-if="detailData.businessFormFields && detailData.businessFormFields.length" class="view-section">
|
||||
<div
|
||||
v-if="detailData.businessFormFields && detailData.businessFormFields.length"
|
||||
class="view-section"
|
||||
>
|
||||
<h3>申请信息</h3>
|
||||
<dl class="view-kv-grid">
|
||||
<div v-for="field in detailData.businessFormFields" :key="field.label" class="view-kv">
|
||||
<div
|
||||
v-for="field in detailData.businessFormFields"
|
||||
:key="field.label"
|
||||
class="view-kv"
|
||||
>
|
||||
<dt>{{ field.label }}</dt>
|
||||
<dd>{{ field.value || '--' }}</dd>
|
||||
</div>
|
||||
@@ -187,7 +210,9 @@
|
||||
</template>
|
||||
</div>
|
||||
<template #footer>
|
||||
<el-button class="btn-ghost" @click="detailVisible = false"><el-icon><Close /></el-icon>关闭</el-button>
|
||||
<el-button class="btn-ghost" @click="detailVisible = false"
|
||||
><el-icon><Close /></el-icon>关闭</el-button
|
||||
>
|
||||
</template>
|
||||
</el-dialog>
|
||||
</section>
|
||||
@@ -266,7 +291,7 @@
|
||||
businessTypeLabel: row.businessTypeLabel,
|
||||
businessId: row.businessId,
|
||||
starterUserId: row.starterUserId,
|
||||
starterUserName: row.starterUserName,
|
||||
starterUserName: row.starterUserName
|
||||
} as Api.Workflow.InstanceDetail & {
|
||||
processName?: string
|
||||
businessType?: string
|
||||
|
||||
Reference in new issue
Block a user