!4 同步develop分支
* fix -- 修改获取流程节点信息接口(供前端渲染流程跟踪图着色使用) * fix -- 修复流程跟踪着色问题 * fix -- 采用ProcessViewer组件显示流程跟踪信息 * fix -- 整合表单设计代码 * fix -- 简易实现用户任务选择用户下拉框内容 * fix -- 修改项目介绍及sql文件 * del -- 移除未使用的文件 * fix -- 修复组件无法显示和修改的问题 * add -- 整合 Rtony/RuoYi-flowable 工作流 * add -- 添加process-designer流程设计插件 * !3 同步ruoyi-vue-plus更新 * !2 登录认证用户信息添加nickName字段(流程任务需要使用到)
This commit is contained in:
128
ruoyi-ui/src/components/ProcessDesigner/index.vue
Normal file
128
ruoyi-ui/src/components/ProcessDesigner/index.vue
Normal file
@@ -0,0 +1,128 @@
|
||||
<template>
|
||||
<div class="process-design" :style="'display: flex; height:' + height">
|
||||
<bpmn-process-designer
|
||||
:key="`designer-${reloadIndex}`"
|
||||
v-model="xmlString"
|
||||
v-bind="controlForm"
|
||||
keyboard
|
||||
ref="processDesigner"
|
||||
:processId="flowEntryInfo.processDefinitionKey"
|
||||
:processName="flowEntryInfo.processDefinitionName"
|
||||
:events="[
|
||||
'element.click',
|
||||
'connection.added',
|
||||
'connection.removed',
|
||||
'connection.changed'
|
||||
]"
|
||||
@element-click="elementClick"
|
||||
@init-finished="initModeler"
|
||||
@event="handlerEvent"
|
||||
@save="onSaveProcess"
|
||||
/>
|
||||
<bmpn-process-penal :key="`penal-${reloadIndex}`" :bpmn-modeler="modeler" :prefix="controlForm.prefix" class="process-panel" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import Vue from 'vue';
|
||||
import '@/plugins/package/theme/index.scss';
|
||||
import { BpmnProcessDesigner, BmpnProcessPenal } from '@/plugins/package/index.js';
|
||||
// 自定义元素选中时的弹出菜单(修改 默认任务 为 用户任务)
|
||||
import CustomContentPadProvider from '@/plugins/package/designer/plugins/content-pad';
|
||||
// 自定义左侧菜单(修改 默认任务 为 用户任务)
|
||||
import CustomPaletteProvider from '@/plugins/package/designer/plugins/palette';
|
||||
import { vuePlugin } from '@/plugins/package/highlight';
|
||||
import 'highlight.js/styles/atom-one-dark-reasonable.css';
|
||||
Vue.use(vuePlugin);
|
||||
|
||||
export default {
|
||||
name: 'ProcessDesigner',
|
||||
props: {
|
||||
flowEntryInfo: {
|
||||
type: Object,
|
||||
required: true
|
||||
}
|
||||
},
|
||||
components: {
|
||||
BpmnProcessDesigner,
|
||||
BmpnProcessPenal
|
||||
},
|
||||
data () {
|
||||
return {
|
||||
height: document.documentElement.clientHeight - 94.5 + "px;",
|
||||
reloadIndex: 0,
|
||||
xmlString: this.flowEntryInfo.bpmnXml,
|
||||
modeler: null,
|
||||
controlForm: {
|
||||
processId: '',
|
||||
processName: '',
|
||||
simulation: false,
|
||||
labelEditing: false,
|
||||
labelVisible: false,
|
||||
prefix: 'flowable',
|
||||
headerButtonSize: 'small',
|
||||
additionalModel: [CustomContentPadProvider, CustomPaletteProvider]
|
||||
}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
elementClick (element) {
|
||||
this.element = element;
|
||||
},
|
||||
initModeler (modeler) {
|
||||
setTimeout(() => {
|
||||
this.modeler = modeler;
|
||||
}, 10);
|
||||
},
|
||||
handlerEvent (eventName, element) {
|
||||
},
|
||||
onSaveProcess (saveData) {
|
||||
let modeler = this.modeler;
|
||||
this.$emit('save', { saveData, modeler });
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
body {
|
||||
overflow: hidden;
|
||||
margin: 0;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
body,
|
||||
body * {
|
||||
/* 滚动条 */
|
||||
&::-webkit-scrollbar-track-piece {
|
||||
background-color: #fff; /*滚动条的背景颜色*/
|
||||
-webkit-border-radius: 0; /*滚动条的圆角宽度*/
|
||||
}
|
||||
|
||||
&::-webkit-scrollbar {
|
||||
width: 10px; /*滚动条的宽度*/
|
||||
height: 8px; /*滚动条的高度*/
|
||||
}
|
||||
|
||||
&::-webkit-scrollbar-thumb:vertical {
|
||||
/*垂直滚动条的样式*/
|
||||
height: 50px;
|
||||
background-color: rgba(153, 153, 153, 0.5);
|
||||
-webkit-border-radius: 4px;
|
||||
outline: 2px solid #fff;
|
||||
outline-offset: -2px;
|
||||
border: 2px solid #fff;
|
||||
}
|
||||
|
||||
&::-webkit-scrollbar-thumb {
|
||||
/*滚动条的hover样式*/
|
||||
background-color: rgba(159, 159, 159, 0.3);
|
||||
-webkit-border-radius: 4px;
|
||||
}
|
||||
|
||||
&::-webkit-scrollbar-thumb:hover {
|
||||
/*滚动条的hover样式*/
|
||||
background-color: rgba(159, 159, 159, 0.5);
|
||||
-webkit-border-radius: 4px;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
Reference in New Issue
Block a user