rev:触发按钮

This commit is contained in:
2024-05-23 18:36:58 +08:00
parent ce1bce880b
commit 9f545e73ff

View File

@@ -138,20 +138,19 @@
placement="top"
width="180"
trigger="click"
:value="popoverVisible"
@hide="onPopoverHide"
style="z-index: 9999;"
:ref="`popover-${scope.$index}`"
>
<p>{{ popoverMessage }}</p>
<div style="text-align: right; margin: 0">
<el-button size="mini" type="text" @click="cancelFlow">取消</el-button>
<el-button :loading="triggerLoading" type="primary" size="mini"
@click="confirmFlow(scope.row.proc_inst_id)">确定
<el-button size="mini" type="text" @click="cancelFlow(scope)">取消</el-button>
<el-button type="primary" size="mini"
@click="confirmFlow(scope.row.proc_inst_id,scope)">确定
</el-button>
</div>
<el-button slot="reference" type="text" icon="el-icon-video-play" size="mini" @click="showPopover">触发
</el-button>
</el-popover>
<!-- <el-button slot="right" @click="flowConfirm(scope.row.proc_inst_id)" type="text" icon="el-icon-video-play" size="mini">触发</el-button>-->
<el-button slot="right" @click="viewClick(scope.row)" type="text" icon="el-icon-thumb" size="mini">预览
</el-button>
</template>
@@ -213,8 +212,6 @@ export default {
permission: {},
modelJson: '',
popoverMessage: "确定要触发流程吗",
triggerLoading: false,
popoverVisible: false,
statusList: [
{
value: "30",
@@ -244,23 +241,19 @@ export default {
return true
},
showPopover() {
this.popoverVisible = true;
// this.popoverVisible = true;
},
cancelFlow() {
this.popoverVisible = false;
cancelFlow(scope) {
scope._self.$refs[`popover-${scope.$index}`].doClose()
},
confirmFlow(proc_inst_id) {
this.triggerLoading = true;
confirmFlow(proc_inst_id, scope) {
curdExecution.flowConfirm(proc_inst_id).then(res => {
this.crud.notify("触发成功", CRUD.NOTIFICATION_TYPE.SUCCESS)
this.triggerLoading = false;
this.popoverVisible = false;
this.crud.toQuery()
})
this.crud.toQuery()
},
onPopoverHide() {
this.triggerLoading = false;
scope._self.$refs[`popover-${scope.$index}`].doClose()
},
jsonFormat(row, index) {
if (row.form_data != null) {
return JSON.stringify(row.form_data)