auto open form collapse item.
This commit is contained in:
@ -34,8 +34,8 @@ import "@/plugins/package/theme/index.scss";
|
||||
// import "highlight.js/styles/atom-one-dark-reasonable.css";
|
||||
import CustomContentPadProvider from "@/plugins/package/designer/plugins/content-pad";
|
||||
import CustomPaletteProvider from "@/plugins/package/designer/plugins/palette";
|
||||
import { ref } from "vue";
|
||||
import { ElMessage, ElMessageBox } from "element-plus";
|
||||
import { ref, nextTick, reactive, toRefs } from "vue";
|
||||
import { ElMessageBox } from "element-plus";
|
||||
|
||||
const props = defineProps({
|
||||
bpmnXml: {
|
||||
@ -70,9 +70,10 @@ const { controlForm } = toRefs(data);
|
||||
const bmpnProcessPenalRef = ref();
|
||||
function elementClick(elementArgv) {
|
||||
element = elementArgv;
|
||||
// if(elementArgv)
|
||||
debugger;
|
||||
goToFormSelect();
|
||||
|
||||
if (elementArgv.type != "bpmn:StartEvent") {
|
||||
goToFormSelect();
|
||||
}
|
||||
}
|
||||
function initModeler(modelerArgv) {
|
||||
setTimeout(() => {
|
||||
@ -102,7 +103,11 @@ function goToFormSelect() {
|
||||
);
|
||||
const EventBus = window.bpmnInstances.eventBus;
|
||||
if (element.type != "bpmn:StartEvent") {
|
||||
console.log(bmpnProcessPenalRef.value);
|
||||
startEle && EventBus.fire("element.click", { element: startEle });
|
||||
nextTick(() => {
|
||||
bmpnProcessPenalRef.value.openFormColla();
|
||||
});
|
||||
}
|
||||
},
|
||||
});
|
||||
@ -135,17 +140,22 @@ body {
|
||||
margin: 0;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
body,
|
||||
body * {
|
||||
/* 滚动条 */
|
||||
&::-webkit-scrollbar-track-piece {
|
||||
background-color: #fff; /*滚动条的背景颜色*/
|
||||
-webkit-border-radius: 0; /*滚动条的圆角宽度*/
|
||||
background-color: #fff;
|
||||
/*滚动条的背景颜色*/
|
||||
-webkit-border-radius: 0;
|
||||
/*滚动条的圆角宽度*/
|
||||
}
|
||||
|
||||
&::-webkit-scrollbar {
|
||||
width: 10px; /*滚动条的宽度*/
|
||||
height: 8px; /*滚动条的高度*/
|
||||
width: 10px;
|
||||
/*滚动条的宽度*/
|
||||
height: 8px;
|
||||
/*滚动条的高度*/
|
||||
}
|
||||
|
||||
&::-webkit-scrollbar-thumb:vertical {
|
||||
|
@ -126,7 +126,7 @@ import ElementListeners from "./listeners/ElementListeners";
|
||||
import ElementProperties from "./properties/ElementProperties";
|
||||
import ElementForm from "./form/ElementForm";
|
||||
import UserTaskListeners from "./listeners/UserTaskListeners";
|
||||
import { provide, toRefs, watch } from "vue";
|
||||
import { provide, toRefs, watch, nextTick } from "vue";
|
||||
|
||||
const props = defineProps({
|
||||
bpmnModeler: Object,
|
||||
@ -156,6 +156,11 @@ const conditionFormVisible = ref(false); // 流转条件设置
|
||||
const formVisible = ref(false); // 表单配置
|
||||
let timer;
|
||||
let bpmnElement;
|
||||
function openFormColla() {
|
||||
nextTick(() => {
|
||||
activeTab.value = ["base", "condition"];
|
||||
});
|
||||
}
|
||||
function initModels() {
|
||||
// 初始化 modeler 以及其他 moddle
|
||||
if (!bpmnModeler.value) {
|
||||
@ -243,5 +248,6 @@ initModels();
|
||||
|
||||
defineExpose({
|
||||
initFormOnChanged,
|
||||
openFormColla,
|
||||
});
|
||||
</script>
|
||||
|
@ -83,11 +83,11 @@ function resetBaseInfo() {
|
||||
elementBaseInfo.value = JSON.parse(
|
||||
JSON.stringify(bpmnElement.businessObject)
|
||||
);
|
||||
if (type.value === "StartEvent") {
|
||||
elementBaseInfo.value.name = "开始";
|
||||
} else if (type.value === "EndEvent") {
|
||||
elementBaseInfo.value.name = "结束";
|
||||
}
|
||||
// if (type.value === "StartEvent") {
|
||||
// elementBaseInfo.value.name = "开始";
|
||||
// } else if (type.value === "EndEvent") {
|
||||
// elementBaseInfo.value.name = "结束";
|
||||
// }
|
||||
}
|
||||
function updateBaseInfo(key) {
|
||||
const attrObj = Object.create(null);
|
||||
|
Reference in New Issue
Block a user