Skip to content

Commit

Permalink
Fixed: Review
Browse files Browse the repository at this point in the history
  • Loading branch information
ZhaoJiSen committed Mar 11, 2025
1 parent d7e2ac6 commit 41f5c6c
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
</div>
</div>
<div class="drawer-footer">
<div v-if="selectedRows.length > 0 && selectedRows[0].status.value === '0'">
<div v-if="isBatch">
<el-input v-model="comment" :placeholder="$tc('PleaseEnterReason')" type="textarea" />
<span class="buttons">
<el-button size="small" type="primary" @click="handleClose">
Expand Down Expand Up @@ -104,6 +104,18 @@ export default {
} else {
return this.selectedRows
}
},
isBatch() {
// 如果是批量,则判断批量中所选的第一个的 Status,如果是在表格中,那么会存在 row.id 那么也应该出现 button
if (this.selectedRows.length > 0 && this.selectedRows[0] && this.selectedRows[0].status) {
return this.selectedRows[0].status.value === '0'
}
if (this.row.status) {
return this.row.status.value === '0'
}
return false
}
},
methods: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ export default {
this.reviewDrawer = true
},
showReview() {
if (this.selectedRows.length === 0) {
if (this.selectedRows.length === 0 && !this.row.id) {
return this.$message.warning(`请选择需要勾选的数据`)
}
this.reviewDrawer = true
Expand Down

0 comments on commit 41f5c6c

Please sign in to comment.