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