refactor(hrm): 优化流程相关页面显示和功能
移除不必要的流程状态显示和撤回按钮 调整任务列表和抄送页面的列显示和操作逻辑 简化用户信息显示方式,统一使用createBy字段
This commit is contained in:
@@ -75,17 +75,17 @@
|
||||
<el-tag :type="getTypeTagType(scope.row.bizType)">{{ getTypeText(scope.row.bizType) }}</el-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="申请人" min-width="120">
|
||||
<!-- <el-table-column label="申请人" min-width="120">
|
||||
<template slot-scope="scope">
|
||||
{{ formatEmpDisplay(scope.row.startUserId) }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table-column> -->
|
||||
<el-table-column label="类型/目的" min-width="140">
|
||||
<template slot-scope="scope">
|
||||
{{ getTypeDetail(scope.row) }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="开始时间" prop="startTime" min-width="160">
|
||||
<!-- <el-table-column label="开始时间" prop="startTime" min-width="160">
|
||||
<template slot-scope="scope">{{ formatDate(scope.row.startTime) }}</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="结束时间" prop="endTime" min-width="160">
|
||||
@@ -93,7 +93,7 @@
|
||||
</el-table-column>
|
||||
<el-table-column label="时长" min-width="100">
|
||||
<template slot-scope="scope">{{ formatDuration(scope.row) }}</template>
|
||||
</el-table-column>
|
||||
</el-table-column> -->
|
||||
<el-table-column label="状态" prop="status" min-width="110">
|
||||
<template slot-scope="scope">
|
||||
<el-tag :type="statusType(scope.row.status)">{{ statusText(scope.row.status) }}</el-tag>
|
||||
|
||||
@@ -26,14 +26,14 @@
|
||||
>
|
||||
驳回
|
||||
</el-button>
|
||||
<el-button
|
||||
<!-- <el-button
|
||||
v-if="canWithdraw"
|
||||
size="mini"
|
||||
:loading="actionLoading"
|
||||
@click="handleWithdraw"
|
||||
>
|
||||
撤回
|
||||
</el-button>
|
||||
</el-button> -->
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -51,7 +51,7 @@
|
||||
<div class="summary-right">
|
||||
<div class="summary-item">
|
||||
<div class="k">申请人</div>
|
||||
<div class="v">{{ detail.empName || '-' }}<span v-if="detail.empNo" class="text-muted">({{ detail.empNo }})</span></div>
|
||||
<div class="v">{{ detail.createBy || '-' }}<span v-if="detail.empNo" class="text-muted">({{ detail.empNo }})</span></div>
|
||||
</div>
|
||||
<div class="summary-item">
|
||||
<div class="k">请假时长</div>
|
||||
@@ -78,7 +78,7 @@
|
||||
</el-card>
|
||||
|
||||
<!-- 流程状态 -->
|
||||
<div class="block-title">流程状态</div>
|
||||
<!-- <div class="block-title">流程状态</div>
|
||||
<el-card class="inner-card" shadow="never">
|
||||
<div v-if="flowInstance" class="flow-status">
|
||||
<div class="status-item">
|
||||
@@ -99,7 +99,7 @@
|
||||
</div>
|
||||
</div>
|
||||
<div v-else class="empty">暂无流程信息</div>
|
||||
</el-card>
|
||||
</el-card> -->
|
||||
|
||||
<!-- 请假理由说明 -->
|
||||
<div class="block-title">请假理由说明</div>
|
||||
@@ -166,7 +166,7 @@
|
||||
>
|
||||
<el-card>
|
||||
<h4>{{ getActionText(item.action) }}</h4>
|
||||
<p>处理人: {{ item.operatorName || '系统' }}</p>
|
||||
<p>处理人: {{ item.createBy || '系统' }}</p>
|
||||
<p v-if="item.comment">意见: {{ item.comment }}</p>
|
||||
</el-card>
|
||||
</el-timeline-item>
|
||||
@@ -207,6 +207,9 @@ export default {
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
currentBizId() {
|
||||
return this.bizId || this.$route?.params?.bizId || this.$route?.query?.bizId || this.$route?.params?.id
|
||||
},
|
||||
statusText() {
|
||||
const statusMap = {
|
||||
'draft': '草稿',
|
||||
@@ -229,17 +232,12 @@ export default {
|
||||
},
|
||||
canWithdraw() {
|
||||
// 只有待审批状态且是当前用户提交的才能撤回
|
||||
return this.detail.status === 'pending' && this.detail.createBy === this.$store.getters.userId
|
||||
return this.detail.status === 'pending' && this.detail.createBy === this.$store.getters.name
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.loadDetail()
|
||||
},
|
||||
computed: {
|
||||
currentBizId() {
|
||||
return this.bizId || this.$route?.params?.bizId || this.$route?.query?.bizId || this.$route?.params?.id
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
async loadDetail() {
|
||||
const bizId = this.currentBizId
|
||||
|
||||
@@ -26,14 +26,14 @@
|
||||
>
|
||||
驳回
|
||||
</el-button>
|
||||
<el-button
|
||||
<!-- <el-button
|
||||
v-if="canWithdraw"
|
||||
size="mini"
|
||||
:loading="actionLoading"
|
||||
@click="handleWithdraw"
|
||||
>
|
||||
撤回
|
||||
</el-button>
|
||||
</el-button> -->
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
@@ -27,7 +27,7 @@
|
||||
</div>
|
||||
|
||||
<!-- 流程状态 -->
|
||||
<div class="block-title">流程状态</div>
|
||||
<!-- <div class="block-title">流程状态</div>
|
||||
<el-card class="inner-card" shadow="never" v-loading="actionLoading">
|
||||
<div v-if="flowInstance" class="flow-status">
|
||||
<div class="status-item">
|
||||
@@ -50,7 +50,7 @@
|
||||
</div>
|
||||
</div>
|
||||
<div v-else class="empty">暂无流程信息</div>
|
||||
</el-card>
|
||||
</el-card> -->
|
||||
|
||||
<div class="block-title">用印信息</div>
|
||||
<el-descriptions :column="2" border size="small" v-loading="loading">
|
||||
|
||||
@@ -108,7 +108,7 @@
|
||||
</el-card>
|
||||
|
||||
<!-- 流程状态 -->
|
||||
<div class="block-title">流程状态</div>
|
||||
<!-- <div class="block-title">流程状态</div>
|
||||
<el-card class="inner-card" shadow="never" v-loading="actionLoading">
|
||||
<div v-if="flowInstance" class="flow-status">
|
||||
<div class="status-item">
|
||||
@@ -131,7 +131,7 @@
|
||||
</div>
|
||||
</div>
|
||||
<div v-else class="empty">暂无流程信息</div>
|
||||
</el-card>
|
||||
</el-card> -->
|
||||
|
||||
<div class="block-title">流转历史</div>
|
||||
<el-card class="inner-card" shadow="never" v-loading="actionLoading">
|
||||
|
||||
Reference in New Issue
Block a user