fix(mobile): 修复待办列表办理/审批按钮点击无响应
u-button 的 click 不带事件对象,去掉 @click.stop,避免 stopPropagation 报错导致按钮失效。 Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
1 parent
7cea0566ac
commit
de223a1f5a
2 files changed
+10
-5
No files matched your search
@@ -6,6 +6,7 @@
|
||||
width="100%"
|
||||
height="90%"
|
||||
border-radius="12"
|
||||
:z-index="20090"
|
||||
@close="cancel"
|
||||
:custom-style="{ width: '90vw', maxHeight: '90vh', overflow: 'auto' }"
|
||||
>
|
||||
@@ -517,9 +518,9 @@ export default {
|
||||
});
|
||||
|
||||
if (response.code === 200) {
|
||||
this.task = response.data;
|
||||
this.task = response.data || {};
|
||||
this.buttonObj = {};
|
||||
this.task.buttonList.forEach((e) => {
|
||||
(this.task.buttonList || []).forEach((e) => {
|
||||
this.buttonObj[e.code] = e.show;
|
||||
});
|
||||
this.buttonDisabled = false;
|
||||
|
||||
@@ -126,10 +126,11 @@
|
||||
</view>
|
||||
|
||||
<!-- 操作按钮 -->
|
||||
<!-- 注意:u-button 的 $emit('click') 不带事件对象,不能写 @click.stop,否则 stopPropagation 报错表现为“点了没反应” -->
|
||||
<view class="card-actions">
|
||||
<view class="action-btn">
|
||||
<u-button
|
||||
@click.stop="handleApproval(item)"
|
||||
@click="handleApproval(item)"
|
||||
type="primary"
|
||||
size="small"
|
||||
shape="circle"
|
||||
@@ -147,7 +148,7 @@
|
||||
<!-- 列表直接审批:仅本页弹窗,不跳转业务页 -->
|
||||
<view class="action-btn">
|
||||
<u-button
|
||||
@click.stop="handleDirectApprove(item)"
|
||||
@click="handleDirectApprove(item)"
|
||||
type="warning"
|
||||
size="small"
|
||||
shape="circle"
|
||||
@@ -531,12 +532,15 @@ export default {
|
||||
uni.showToast({ title: '缺少任务信息,无法审批', icon: 'none' });
|
||||
return;
|
||||
}
|
||||
const taskId = String(row.id);
|
||||
this.$nextTick(() => {
|
||||
const verifyRef = this.$refs.submitVerifyRef;
|
||||
if (!verifyRef || typeof verifyRef.openDialog !== 'function') {
|
||||
uni.showToast({ title: '审批组件未就绪', icon: 'none' });
|
||||
return;
|
||||
}
|
||||
verifyRef.openDialog(row.id);
|
||||
verifyRef.openDialog(taskId);
|
||||
});
|
||||
},
|
||||
|
||||
// 审批成功:刷新待办列表,停留在本页(不跳转请假列表等业务页)
|
||||
|
||||
Reference in new issue
Block a user