Fix Bug #571: 修复检验申请撤回操作模板逻辑错误
问题:已签发状态的检验申请点击撤回时触发错误提示 根因:模板中 v-if/v-else-if 链结构错误,isReportStatus 作为 canManageRow 的 else-if 分支,导致权限校验和状态判断互相干扰,撤回按钮显示逻辑异常 修复:将嵌套的 v-if/v-else-if 改为独立的 v-if 块,每个按钮的显示条件独立判断 Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
@@ -118,17 +118,14 @@
|
||||
<el-table-column label="操作" align="center" fixed="right" width="280">
|
||||
<template #default="scope">
|
||||
<el-button link type="primary" @click="handleViewDetail(scope.row)">详情</el-button>
|
||||
<template v-if="canManageRow(scope.row)">
|
||||
<template v-if="isPendingStatus(scope.row)">
|
||||
<el-button link type="primary" @click="handleEdit(scope.row)">修改</el-button>
|
||||
<el-button link type="danger" @click="handleDelete(scope.row)">删除</el-button>
|
||||
</template>
|
||||
<template v-else-if="isWithdrawableStatus(scope.row)">
|
||||
<el-button link type="warning" @click="handleWithdraw(scope.row)">撤回</el-button>
|
||||
</template>
|
||||
<template v-if="canManageRow(scope.row) && isPendingStatus(scope.row)">
|
||||
<el-button link type="primary" @click="handleEdit(scope.row)">修改</el-button>
|
||||
<el-button link type="danger" @click="handleDelete(scope.row)">删除</el-button>
|
||||
</template>
|
||||
<!-- 报告已出:可查看报告 -->
|
||||
<template v-else-if="isReportStatus(scope.row)">
|
||||
<template v-if="canManageRow(scope.row) && isWithdrawableStatus(scope.row)">
|
||||
<el-button link type="warning" @click="handleWithdraw(scope.row)">撤回</el-button>
|
||||
</template>
|
||||
<template v-if="isReportStatus(scope.row)">
|
||||
<el-button link type="success" @click="handleViewReport(scope.row)">查看报告</el-button>
|
||||
</template>
|
||||
</template>
|
||||
|
||||
Reference in New Issue
Block a user