update 去除处理事件
This commit is contained in:
parent
84fbd74d56
commit
154d2250e3
@ -133,7 +133,6 @@ onMounted(() => {
|
||||
nextTick(() => {
|
||||
initCanvas();
|
||||
initDiagram();
|
||||
handleModeler();
|
||||
initModel();
|
||||
});
|
||||
});
|
||||
@ -177,12 +176,6 @@ const initModel = () => {
|
||||
modelerStore.setModeler(bpmnModeler.value);
|
||||
};
|
||||
|
||||
/**
|
||||
* 关闭用户弹窗
|
||||
*/
|
||||
const closeDialog = () => {
|
||||
dialog.visible = false;
|
||||
};
|
||||
/**
|
||||
* 新建
|
||||
*/
|
||||
@ -282,46 +275,6 @@ const curNodeInfo = reactive({
|
||||
expValue: '' //多用户和部门角色实现
|
||||
});
|
||||
|
||||
watch(curNodeInfo, (newValue, oldValue) => {
|
||||
// 在 curNodeInfo 对象发生变化后执行相应逻辑
|
||||
// 这里调用 addEventPlant 函数来添加事件监听器
|
||||
if (curNodeInfo.curNode != '') {
|
||||
addEventPlant();
|
||||
}
|
||||
});
|
||||
|
||||
const handleModeler = () => {
|
||||
bpmnModeler.value.on('element.click', (e: { element: any }) => {
|
||||
// 用户任务触发
|
||||
if ('bpmn:UserTask' === e.element.type) {
|
||||
curNodeInfo['curNode'] = e.element.id;
|
||||
curNodeInfo['curType'] = e.element.type;
|
||||
} else {
|
||||
// 事件改变的时候清空
|
||||
curNodeInfo['curType'] = '';
|
||||
curNodeInfo['expValue'] = '';
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
function addEventPlant() {
|
||||
// let assigneeDiv = bpmnPanel.value.querySelector('[data-group-id="group-CamundaPlatform__UserAssignment"]') as HTMLDivElement;
|
||||
//
|
||||
let assigneeDiv = document.querySelector('[data-group-id="group-CamundaPlatform__UserAssignment"]') as HTMLDivElement;
|
||||
if (assigneeDiv) {
|
||||
assigneeDiv.addEventListener('click', function (e) {
|
||||
let assigneeUser = assigneeDiv.getElementsByClassName('bio-properties-panel-input')[0] as HTMLButtonElement;
|
||||
assigneeUser.setAttribute('placeholder', '双击选择用户');
|
||||
// dblclick 双击事件
|
||||
assigneeUser.addEventListener('dblclick', onFormThreeClick);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
const onFormThreeClick = () => {
|
||||
proxy?.$modal.alert('选择了用户');
|
||||
};
|
||||
|
||||
const downloadFile = (fileName: string, data: any, type: string) => {
|
||||
const a = document.createElement('a');
|
||||
const url = window.URL.createObjectURL(new Blob([data], { type: type }));
|
||||
|
Loading…
x
Reference in New Issue
Block a user