This commit is contained in:
吴克举 2023-08-15 14:07:50 +08:00
parent 6f33830fb9
commit 745a9f35f2
3 changed files with 33 additions and 21 deletions

View File

@ -1,27 +1,33 @@
<template>
<div
class="context-menu"
:style="{
top: contextMenuData.axis.y + 'px',
left: contextMenuData.axis.x + 'px',
}"
>
<div class="context-menu" :style="{
top: contextMenuData.axis.y + 'px',
left: contextMenuData.axis.x + 'px',
}">
<div @click="clickDel">删除</div>
</div>
<a-modal v-model:visible="visible" @ok="handleOk" @cancel="handleCancel">
<template #title> 提示 </template>
<div>确定要删除节点 线索新增 ,删除后后面的节点数据将清空 ?</div>
</a-modal>
<el-dialog v-model="visible" title="提示" width="30%" align-center>
<span>确定要删除节点 线索新增 ,删除后后面的节点数据将清空 ?</span>
<template #footer>
<span class="dialog-footer">
<el-button @click="handleCancel">取消</el-button>
<el-button type="primary" @click="handleOk">
确定
</el-button>
</span>
</template>
</el-dialog>
</template>
<script setup>
import { toRefs, ref } from "vue";
const emit = defineEmits(["deletedata",'cancel']);
const emit = defineEmits(["deletedata", 'cancel']);
const visible = ref(false);
const props = defineProps({
contextMenuData: {
type: Object,
default: () => {},
default: () => { },
},
});
//使
@ -33,7 +39,7 @@ const handleOk = () => {
emit("deletedata");
};
const handleCancel = () => {
emit("cancel");
};
</script>
@ -45,8 +51,9 @@ const handleCancel = () => {
left: 0;
top: 0;
background-color: #ffffff;
padding: 8px 16px;
padding: 4px 12px;
box-shadow: 0 0 5px 2px #efefef;
cursor: pointer;
font-size: 12px;
}
</style>

View File

@ -5,7 +5,7 @@
<div id="join_content">
<div class="left">
<h4>1.设置连接方式</h4>
<el-radio-group v-model="data.joinType">
<el-radio-group v-model="data.joinType" @change="setData">
<el-radio :label="item.value" v-for="(item,index) in options" :key="index">{{item.label}}</el-radio>
</el-radio-group>
</div>
@ -132,9 +132,9 @@ const disposeLineList = () => {
data.value.rightNodeId = conArrData.value[1].id;
passIf.value = true;
// if (nodeValue.value.data) {
// data.value = JSON.parse(nodeValue.value.data);
// }
if (nodeValue.value.data) {
data.value = JSON.parse(nodeValue.value.data);
}
} else {
passIf.value = false;
}

View File

@ -84,7 +84,7 @@
<template #footer>
<span class="dialog-footer">
<el-button @click="handleCancel">确定</el-button>
<el-button @click="handleOk">确定</el-button>
<el-button type="primary" @click="handleCancel">
取消
</el-button>
@ -120,6 +120,7 @@
</template>
<script setup>
import contextMenu from "@/components/flowEditor/context-menu.vue"
import configureSource from "./components/source.vue";
import output from "./components/output.vue";
import join from "./components/join.vue";
@ -673,7 +674,10 @@ const handleOk = () => {
getDataStream();
};
const handleCancel = () => {};
const handleCancel = () => {
data.visible =false
};
//
const dispositionIf = ref(false);
@ -853,6 +857,7 @@ const contextMenuData = ref({
//
const showNodeContextMenu = (e, nodeItem) => {
let event = window.event || e;
console.log('showNodeContextMenu------------------',event)
event.preventDefault();
let x = event.clientX;
let y = event.clientY;