feat(flow): 添加流程实例更新功能并禁用撤回操作
添加updateFlowInstance API用于更新流程实例 在所有详情页面禁用撤回功能 修改审批状态从pending到running 在抄送页面添加详情跳转功能
This commit is contained in:
@@ -21,43 +21,31 @@
|
||||
<el-tab-pane label="已读" name="read" />
|
||||
</el-tabs>
|
||||
|
||||
<el-table
|
||||
v-loading="loading"
|
||||
:data="ccList"
|
||||
border
|
||||
style="width: 100%"
|
||||
:row-class-name="tableRowClassName"
|
||||
>
|
||||
<el-table v-loading="loading" :data="ccList" border style="width: 100%" :row-class-name="tableRowClassName">
|
||||
<el-table-column label="业务" prop="bizTypeName" width="150" />
|
||||
<el-table-column label="内容" prop="bizTitle" min-width="300" show-overflow-tooltip />
|
||||
<el-table-column label="节点" prop="nodeName" width="180" />
|
||||
<el-table-column label="抄送人" prop="createBy" >
|
||||
<el-table-column label="抄送人" prop="createBy">
|
||||
</el-table-column>
|
||||
<el-table-column label="抄送时间" prop="createTime" width="180">
|
||||
<template #default="scope">
|
||||
{{ parseTime(scope.row.createTime) }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" width="100" fixed="right" v-if="activeTab === 'unread'">
|
||||
<el-table-column label="操作" width="100" fixed="right">
|
||||
<template #default="scope">
|
||||
<el-link
|
||||
v-if="scope.row.readFlag === 0"
|
||||
type="primary"
|
||||
@click.stop="handleRead(scope.row)"
|
||||
>
|
||||
<el-link v-if="activeTab === 'unread'" type="primary" @click.stop="handleRead(scope.row)">
|
||||
标记已读
|
||||
</el-link>
|
||||
<el-link type="primary" @click.stop="handleDetail(scope.row)">
|
||||
详情
|
||||
</el-link>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
<pagination
|
||||
v-show="total > 0"
|
||||
:total="total"
|
||||
:page.sync="queryParams.pageNum"
|
||||
:limit.sync="queryParams.pageSize"
|
||||
@pagination="getList"
|
||||
/>
|
||||
<pagination v-show="total > 0" :total="total" :page.sync="queryParams.pageNum" :limit.sync="queryParams.pageSize"
|
||||
@pagination="getList" />
|
||||
</el-card>
|
||||
</div>
|
||||
</template>
|
||||
@@ -100,6 +88,34 @@ export default {
|
||||
this.queryParams.readFlag = this.activeTab === 'read' ? 1 : 0
|
||||
this.getList()
|
||||
},
|
||||
handleDetail(row) {
|
||||
if (!row || !row.bizId || !row.bizType) {
|
||||
this.$message.warning('缺少businessKey,无法打开详情')
|
||||
return
|
||||
}
|
||||
const { bizId, bizType: type } = row
|
||||
if (!bizId) {
|
||||
this.$message.warning('businessKey格式不正确,无法解析业务ID')
|
||||
return
|
||||
}
|
||||
|
||||
const pathMap = {
|
||||
leave: '/hrm/HrmLeaveDetail',
|
||||
travel: '/hrm/HrmTravelDetail',
|
||||
seal: '/hrm/HrmSealDetail',
|
||||
reimburse: '/hrm/HrmReimburseDetail'
|
||||
}
|
||||
const routePath = pathMap[type]
|
||||
|
||||
if (routePath) {
|
||||
this.$router.push({
|
||||
path: routePath,
|
||||
query: { bizId: bizId }
|
||||
})
|
||||
} else {
|
||||
this.$message.warning('无法确定申请类型对应的详情页面')
|
||||
}
|
||||
},
|
||||
getList() {
|
||||
this.loading = true
|
||||
listCc({ ...this.queryParams, ccUserId: this.currentUserId })
|
||||
@@ -131,21 +147,26 @@ export default {
|
||||
.flow-cc-container {
|
||||
padding: 20px 20px 0 20px;
|
||||
}
|
||||
|
||||
.card-header {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
height: 32px;
|
||||
}
|
||||
|
||||
.card-title {
|
||||
font-size: 16px;
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
.badge {
|
||||
margin-left: 6px;
|
||||
}
|
||||
|
||||
/* 未读行高亮(柔和背景,不用渐变) */
|
||||
.row-unread td {
|
||||
background-color: #fdf6ec !important; /* Element UI warning-light */
|
||||
background-color: #fdf6ec !important;
|
||||
/* Element UI warning-light */
|
||||
font-weight: 600;
|
||||
}
|
||||
</style>
|
||||
|
||||
Reference in New Issue
Block a user