fix: [对标报告] 审批中和完成不显示修改按钮

This commit is contained in:
yehuangf 2025-12-24 09:15:25 +08:00
parent b5f9ca5594
commit e44a641af7

View File

@ -84,9 +84,7 @@
</div>
<div class="toolbar">
<el-button type="primary" @click="handleCreate">
新增
</el-button>
<el-button type="primary" @click="handleCreate">新增</el-button>
<!-- <el-button @click="handleDownloadTemplate">下载模板</el-button> -->
</div>
<div class="page-data-list">
@ -113,9 +111,7 @@
v-for="(colConfig, index) in tableConfig.colConfigs"
v-slot:[colConfig.customHeadSlot]="{ column }"
>
<div v-if="colConfig.customHeadSlot" :key="index">
{{ column }} {{ colConfig }}
</div>
<div v-if="colConfig.customHeadSlot" :key="index"> {{ column }} {{ colConfig }} </div>
</template>
<template
@ -126,60 +122,52 @@
<span
v-if="row[colConfig.prop] === 'APPROVING'"
style="background: #E6A23C; padding: 4px 8px; color: white; border-radius: 20px;"
>审核中</span
>
审核中
</span>
<span
v-else-if="row[colConfig.prop] === 'COMPLETE'"
style="background: #67C23A; padding: 4px 8px; color: white; border-radius: 20px;"
>已完成</span
>
已完成
</span>
<span
v-else-if="row[colConfig.prop] === 'DRAFT'"
style="background: #909399; padding: 4px 8px; color: white; border-radius: 20px;"
>草稿</span
>
草稿
</span>
<span
v-else-if="row[colConfig.prop] === 'REJECTED'"
style="background: #F56C6C; padding: 4px 8px; color: white; border-radius: 20px;"
>已拒绝</span
>
已拒绝
</span>
<span
v-else
style="background: #909399; padding: 4px 8px; color: white; border-radius: 20px;"
>-</span
>
-
</span>
</div>
<div v-if="colConfig.customSlot === 'options'" :key="'op' + index + '' + rowIndex">
<a
href="javascript:void(0)"
class="el-link el-link--primary"
@click.stop="handleRowView(row)"
>查看</a
>
查看
</a>
<span style="width: 6px; display: inline-block"></span>
<a
v-if="false"
v-if="row.status !== 'APPROVING' && row.status !== 'COMPLETE'"
href="javascript:void(0)"
class="el-link el-link--primary"
@click.stop="handleEdit(row)"
>修改</a
>
修改
</a>
<span style="width: 6px; display: inline-block"></span>
<a
v-if="row.status === 'APPROVING'"
href="javascript:void(0)"
class="el-link el-link--primary"
@click.stop="handleApprove(row)"
>审批</a
>
审批
</a>
<span
v-if="row.status === 'APPROVING'"
style="width: 6px; display: inline-block"
@ -189,9 +177,8 @@
href="javascript:void(0)"
class="el-link el-link--primary"
@click.stop="handleLaunch(row)"
>发起</a
>
发起
</a>
<span
v-if="!row.status || row.status === '' || row.status === 'DRAFT'"
style="width: 6px; display: inline-block"
@ -201,9 +188,8 @@
href="javascript:void(0)"
class="el-link el-link--primary"
@click.stop="handleRestart(row)"
>重新发起</a
>
重新发起
</a>
<span
v-if="row.status === 'REJECTED'"
style="width: 6px; display: inline-block"
@ -213,9 +199,8 @@
href="javascript:void(0)"
class="el-link el-link--primary"
@click.stop="handleDownload(row)"
>下载</a
>
下载
</a>
</div>
</template>
@ -359,12 +344,8 @@
</el-form>
</div>
<div slot="footer" class="dialog-footer">
<el-button @click="handleDialogClose">
取消
</el-button>
<el-button type="primary" @click="handleSubmit">
确定
</el-button>
<el-button @click="handleDialogClose">取消</el-button>
<el-button type="primary" @click="handleSubmit">确定</el-button>
</div>
</el-dialog>
@ -378,18 +359,6 @@
@close="handleLaunchDialogClose"
>
<div class="dialog-body-wrapper">
<div class="approval-process-title">
<div class="description-label">
流程主题 <span class="required-mark">*</span>
</div>
<el-input
v-model="launchProcessTitle"
maxlength="100"
show-word-limit
placeholder="请输入流程主题"
/>
</div>
<div class="approval-workflow">
<div class="workflow-title">
审批环节
@ -445,12 +414,8 @@
</div>
</div>
<div slot="footer" class="dialog-footer">
<el-button @click="handleLaunchDialogClose">
取消
</el-button>
<el-button type="primary" :loading="launching" @click="handleLaunchSubmit">
确定
</el-button>
<el-button @click="handleLaunchDialogClose">取消</el-button>
<el-button type="primary" :loading="launching" @click="handleLaunchSubmit">确定</el-button>
</div>
</el-dialog>
@ -538,7 +503,6 @@ export default {
currentEditRow: null, //
launchDialogVisible: false, //
currentLaunchRow: null, //
launchProcessTitle: '',
launchWorkflowSteps: [
{
name: '校对',
@ -753,7 +717,6 @@ export default {
},
handleLaunch(row) {
this.currentLaunchRow = row
this.launchProcessTitle = row.title || ''
//
this.launchWorkflowSteps = [
{
@ -783,7 +746,6 @@ export default {
handleLaunchDialogClose() {
this.launchDialogVisible = false
this.currentLaunchRow = null
this.launchProcessTitle = ''
//
this.launchWorkflowSteps = [
{
@ -825,13 +787,6 @@ export default {
return
}
//
const processTitle = (this.launchProcessTitle || '').trim()
if (!processTitle) {
this.$message.warning('请填写流程主题')
return
}
const reportId = this.currentLaunchRow.reportId || this.currentLaunchRow.id
if (!reportId) {
this.$message.error('缺少报告ID')
@ -842,7 +797,6 @@ export default {
const submitData = {
reportId: reportId,
userId: getUserId(),
processTitle: processTitle,
proofreadUsers: this.launchWorkflowSteps[0].handlers,
reviewUsers: this.launchWorkflowSteps[1].handlers,
countersignUsers: [],