Răsfoiți Sursa

插件名修改

tangbin 1 an în urmă
părinte
comite
d2c883e142
79 a modificat fișierele cu 33 adăugiri și 10143 ștergeri
  1. 0 5
      src/components/ren-dept-tree/index.ts
  2. 0 116
      src/components/ren-dept-tree/src/ren-dept-tree.vue
  3. 0 81
      src/components/ren-flowable/modules/auto-place/CustomAutoPlace.js
  4. 0 6
      src/components/ren-flowable/modules/auto-place/index.js
  5. 0 17
      src/components/ren-flowable/modules/custom-renderer/CustomRenderer.js
  6. 0 6
      src/components/ren-flowable/modules/custom-renderer/index.js
  7. 0 16
      src/components/ren-flowable/modules/rules/CustomRules.js
  8. 0 6
      src/components/ren-flowable/modules/rules/index.js
  9. 0 99
      src/components/ren-flowable/package/Log.js
  10. 0 478
      src/components/ren-flowable/package/designer/ProcessDesigner.vue
  11. 0 7
      src/components/ren-flowable/package/designer/index.js
  12. 0 390
      src/components/ren-flowable/package/designer/plugins/content-pad/contentPadProvider.js
  13. 0 6
      src/components/ren-flowable/package/designer/plugins/content-pad/index.js
  14. 0 24
      src/components/ren-flowable/package/designer/plugins/defaultEmpty.js
  15. 0 1071
      src/components/ren-flowable/package/designer/plugins/descriptor/activitiDescriptor.json
  16. 0 1087
      src/components/ren-flowable/package/designer/plugins/descriptor/camundaDescriptor.json
  17. 0 1215
      src/components/ren-flowable/package/designer/plugins/descriptor/flowableDescriptor.json
  18. 0 77
      src/components/ren-flowable/package/designer/plugins/extension-moddle/activiti/activitiExtension.js
  19. 0 10
      src/components/ren-flowable/package/designer/plugins/extension-moddle/activiti/index.js
  20. 0 144
      src/components/ren-flowable/package/designer/plugins/extension-moddle/camunda/extension.js
  21. 0 7
      src/components/ren-flowable/package/designer/plugins/extension-moddle/camunda/index.js
  22. 0 77
      src/components/ren-flowable/package/designer/plugins/extension-moddle/flowable/flowableExtension.js
  23. 0 10
      src/components/ren-flowable/package/designer/plugins/extension-moddle/flowable/index.js
  24. 0 210
      src/components/ren-flowable/package/designer/plugins/palette/CustomPalette.js
  25. 0 6
      src/components/ren-flowable/package/designer/plugins/palette/index.js
  26. 0 213
      src/components/ren-flowable/package/designer/plugins/palette/paletteProvider.js
  27. 0 41
      src/components/ren-flowable/package/designer/plugins/translate/customTranslate.js
  28. 0 238
      src/components/ren-flowable/package/designer/plugins/translate/zh.js
  29. 0 19
      src/components/ren-flowable/package/index.js
  30. 0 222
      src/components/ren-flowable/package/penal/PropertiesPanel.vue
  31. 0 80
      src/components/ren-flowable/package/penal/base/ElementBaseInfo.vue
  32. 0 142
      src/components/ren-flowable/package/penal/flow-condition/FlowCondition.vue
  33. 0 377
      src/components/ren-flowable/package/penal/form/ElementForm.vue
  34. 0 7
      src/components/ren-flowable/package/penal/index.js
  35. 0 248
      src/components/ren-flowable/package/penal/listeners/ElementListeners.vue
  36. 0 288
      src/components/ren-flowable/package/penal/listeners/UserTaskListeners.vue
  37. 0 178
      src/components/ren-flowable/package/penal/listeners/template.js
  38. 0 61
      src/components/ren-flowable/package/penal/listeners/utilSelf.js
  39. 0 196
      src/components/ren-flowable/package/penal/multi-instance/ElementMultiInstance.vue
  40. 0 59
      src/components/ren-flowable/package/penal/other/ElementOtherConfig.vue
  41. 0 135
      src/components/ren-flowable/package/penal/properties/ElementProperties.vue
  42. 0 108
      src/components/ren-flowable/package/penal/signal-message/SignalAndMessage.vue
  43. 0 72
      src/components/ren-flowable/package/penal/task/ElementTask.vue
  44. 0 97
      src/components/ren-flowable/package/penal/task/task-components/ReceiveTask.vue
  45. 0 85
      src/components/ren-flowable/package/penal/task/task-components/ScriptTask.vue
  46. 0 226
      src/components/ren-flowable/package/penal/task/task-components/UserTask.vue
  47. 0 70
      src/components/ren-flowable/package/theme/element-variables.scss
  48. 0 11
      src/components/ren-flowable/package/theme/index.scss
  49. 0 156
      src/components/ren-flowable/package/theme/process-designer.scss
  50. 0 107
      src/components/ren-flowable/package/theme/process-panel.scss
  51. 0 71
      src/components/ren-flowable/package/utils.js
  52. 0 25
      src/components/ren-flowable/translations.js
  53. 0 694
      src/components/ren-flowable/utils/min-dash.js
  54. 0 4
      src/components/ren-process-detail/index.ts
  55. 0 71
      src/components/ren-process-detail/src/ren-process-detail.vue
  56. 0 5
      src/components/ren-process-running/index.ts
  57. 0 49
      src/components/ren-process-running/src/ren-process-running.vue
  58. 0 104
      src/components/ren-process-running/src/ren-task-delegate.vue
  59. 0 136
      src/components/ren-process-running/src/ren-task-handle.vue
  60. 0 67
      src/components/ren-process-running/src/select-role.vue
  61. 0 81
      src/components/ren-process-running/src/select-user.vue
  62. 0 4
      src/components/ren-radio-group/index.ts
  63. 0 24
      src/components/ren-radio-group/src/ren-radio-group.vue
  64. 0 5
      src/components/ren-region-tree/index.ts
  65. 0 134
      src/components/ren-region-tree/src/ren-region-tree.vue
  66. 0 4
      src/components/ren-select/index.ts
  67. 0 25
      src/components/ren-select/src/ren-select.vue
  68. 15 15
      src/main.ts
  69. 5 5
      src/views/flow/process-designer.vue
  70. 2 2
      src/views/flow/task-form.vue
  71. 1 1
      src/views/notice/notice-add-or-update.vue
  72. 1 1
      src/views/notice/notice-user.vue
  73. 1 1
      src/views/notice/notice.vue
  74. 1 1
      src/views/pay/order.vue
  75. 1 1
      src/views/sys/post-add-or-update.vue
  76. 1 1
      src/views/sys/post.vue
  77. 1 1
      src/views/sys/region-add-or-update.vue
  78. 2 2
      src/views/sys/user-add-or-update.vue
  79. 2 2
      src/views/sys/user.vue

+ 0 - 5
src/components/ren-dept-tree/index.ts

@@ -1,5 +0,0 @@
-import { withInstall } from "@/utils/utils";
-import RenDeptTree from "./src/ren-dept-tree.vue";
-
-RenDeptTree.name = "RenDeptTree";
-export default withInstall(RenDeptTree);

+ 0 - 116
src/components/ren-dept-tree/src/ren-dept-tree.vue

@@ -1,116 +0,0 @@
-<template>
-  <div>
-    <el-input v-model="showDeptName" :placeholder="placeholder" @click="deptDialog">
-      <template v-slot:append>
-        <el-button icon="search" @click="deptDialog"></el-button>
-      </template>
-    </el-input>
-    <el-dialog v-model="visibleDept" width="30%" :modal="false" :title="placeholder" :close-on-click-modal="false" :close-on-press-escape="false">
-      <el-form size="small" :inline="true">
-        <el-form-item :label="$t('keyword')">
-          <el-input v-model="filterText" :input-style="{ width: '150px' }"></el-input>
-        </el-form-item>
-        <el-form-item>
-          <el-button type="default">{{ $t("query") }}</el-button>
-        </el-form-item>
-      </el-form>
-      <el-tree class="filter-tree" :data="deptList" :default-expanded-keys="expandedKeys" :props="{ label: 'name', children: 'children' }" :expand-on-click-node="false" :filter-node-method="filterNode" :highlight-current="true" node-key="id" ref="treeRef"> </el-tree>
-      <template v-slot:footer>
-        <el-button type="default" @click="cancelHandle()">{{ $t("cancel") }}</el-button>
-        <el-button v-if="query" type="info" @click="clearHandle()">{{ $t("clear") }}</el-button>
-        <el-button type="primary" @click="commitHandle()">{{ $t("confirm") }}</el-button>
-      </template>
-    </el-dialog>
-  </div>
-</template>
-<script lang="ts" setup>
-import { nextTick, ref, watch } from "vue";
-import { IObject } from "@/types/interface";
-import baseService from "@/service/baseService";
-import { ElMessage } from "element-plus";
-import { useI18n } from "vue-i18n";
-
-const { t } = useI18n();
-
-const filterText = ref("");
-const visibleDept = ref(false);
-const deptList = ref<any[]>([]);
-const showDeptName = ref("");
-const expandedKeys = ref<any[]>([]);
-const treeRef = ref();
-
-const props = defineProps({
-  modelValue: String,
-  deptName: String,
-  query: Boolean,
-  placeholder: String
-});
-
-watch(
-  () => filterText.value,
-  (val) => {
-    treeRef.value.filter(val);
-  }
-);
-
-watch(
-  () => props.deptName,
-  (val) => {
-    showDeptName.value = val as string;
-  }
-);
-
-const deptDialog = () => {
-  expandedKeys.value = [];
-  visibleDept.value = true;
-  getDeptList(props.modelValue);
-};
-
-const filterNode = (value: string, data: IObject) => {
-  if (!value) return true;
-  return data.name.indexOf(value) !== -1;
-};
-
-const getDeptList = (id?: string) => {
-  return baseService.get("/sys/dept/list").then((res) => {
-    deptList.value = res.data;
-    nextTick(() => {
-      if (id) {
-        treeRef.value.setCurrentKey(id);
-        expandedKeys.value = [id];
-      }
-    });
-  });
-};
-
-const cancelHandle = () => {
-  visibleDept.value = false;
-  deptList.value = [];
-  filterText.value = "";
-};
-
-const emit = defineEmits(["update:modelValue", "update:deptName"]);
-
-const clearHandle = () => {
-  emit("update:modelValue", "");
-  emit("update:deptName", "");
-  showDeptName.value = "";
-  visibleDept.value = false;
-  deptList.value = [];
-  filterText.value = "";
-};
-
-const commitHandle = () => {
-  const node = treeRef.value.getCurrentNode();
-  if (!node) {
-    ElMessage.error(t("dept.chooseerror"));
-    return;
-  }
-  emit("update:modelValue", node.id);
-  emit("update:deptName", node.name);
-  showDeptName.value = node.name;
-  visibleDept.value = false;
-  deptList.value = [];
-  filterText.value = "";
-};
-</script>

+ 0 - 81
src/components/ren-flowable/modules/auto-place/CustomAutoPlace.js

@@ -1,81 +0,0 @@
-import AutoPlace from 'diagram-js/lib/features/auto-place/AutoPlace';
-
-export default function CustomAutoPlace(eventBus, modeling) {
-  AutoPlace.call(this, eventBus, modeling, 3000);
-
-  eventBus.on('autoPlace', 3000, function(context) {
-    const shape = context.shape;
-    const source = context.source;
-
-    return getNewCustomShapePosition(source, shape);
-  });
-
-  this.append = function(source, shape, hints) {
-    eventBus.fire('autoPlace.start', {
-      source: source,
-      shape: shape
-    });
-
-    // allow others to provide the position
-    var position = eventBus.fire('autoPlace', {
-      source: source,
-      shape: shape
-    });
-
-    console.log('hints', hints, 'position', position);
-
-    var newShape = modeling.appendShape(source, shape, position, source.parent, hints);
-
-    eventBus.fire('autoPlace.end', {
-      source: source,
-      shape: newShape
-    });
-
-    return newShape;
-  };
-}
-
-export function asTRBL(bounds) {
-  return {
-    top: bounds.y,
-    right: bounds.x + (bounds.width || 0),
-    bottom: bounds.y + (bounds.height || 0),
-    left: bounds.x
-  };
-}
-
-export function roundPoint(point) {
-  return {
-    x: Math.round(point.x),
-    y: Math.round(point.y)
-  };
-}
-
-export function getMid(bounds) {
-  return roundPoint({
-    x: bounds.x + (bounds.width || 0) / 2,
-    y: bounds.y + (bounds.height || 0) / 2
-  });
-}
-
-export function getNewCustomShapePosition(source, element, hints) {
-  if (!hints) {
-    hints = {};
-  }
-
-  var distance = hints.defaultDistance || 50;
-
-  var sourceMid = getMid(source);
-  var sourceTrbl = asTRBL(source);
-
-  // simply put element right next to source
-  return {
-    x: sourceMid.x,
-    y: sourceTrbl.bottom + distance + element.height / 2
-  };
-}
-
-const F = function() {}; // 核心,利用空对象作为中介;
-F.prototype = AutoPlace.prototype; // 核心,将父类的原型赋值给空对象F;
-CustomAutoPlace.prototype = new F(); // 核心,将 F的实例赋值给子类;
-CustomAutoPlace.prototype.constructor = AutoPlace; // 修复子类CustomRenderer的构造器指向,防止原型链的混乱;

+ 0 - 6
src/components/ren-flowable/modules/auto-place/index.js

@@ -1,6 +0,0 @@
-import CustomAutoPlace from './CustomAutoPlace';
-
-export default {
-  __init__: ['autoPlace'],
-  autoPlace: ['type', CustomAutoPlace]
-};

+ 0 - 17
src/components/ren-flowable/modules/custom-renderer/CustomRenderer.js

@@ -1,17 +0,0 @@
-import BpmnRenderer from 'bpmn-js/lib/draw/BpmnRenderer';
-
-export default function CustomRenderer(eventBus, styles, pathMap, canvas, textRenderer) {
-  const config = {
-    defaultFillColor: '',
-    defaultStrokeColor: '#8b238f',
-    defaultLabelColor: '#2dd257'
-  };
-  BpmnRenderer.call(this, config, eventBus, styles, pathMap, canvas, textRenderer, 2000);
-}
-
-CustomRenderer.$inject = ['eventBus', 'styles', 'pathMap', 'canvas', 'textRenderer'];
-
-const F = function() {}; // 核心,利用空对象作为中介;
-F.prototype = BpmnRenderer.prototype; // 核心,将父类的原型赋值给空对象F;
-CustomRenderer.prototype = new F(); // 核心,将 F的实例赋值给子类;
-CustomRenderer.prototype.constructor = CustomRenderer; // 修复子类CustomRenderer的构造器指向,防止原型链的混乱;

+ 0 - 6
src/components/ren-flowable/modules/custom-renderer/index.js

@@ -1,6 +0,0 @@
-import CustomRenderer from './CustomRenderer';
-
-export default {
-  __init__: ['customRenderer'],
-  customRenderer: ['type', CustomRenderer]
-};

+ 0 - 16
src/components/ren-flowable/modules/rules/CustomRules.js

@@ -1,16 +0,0 @@
-import BpmnRules from 'bpmn-js/lib/features/rules/BpmnRules';
-import inherits from 'inherits';
-
-export default function CustomRules(eventBus) {
-  BpmnRules.call(this, eventBus);
-}
-
-inherits(CustomRules, BpmnRules);
-
-CustomRules.prototype.canDrop = function() {
-  return false;
-};
-
-CustomRules.prototype.canMove = function() {
-  return false;
-};

+ 0 - 6
src/components/ren-flowable/modules/rules/index.js

@@ -1,6 +0,0 @@
-import CustomRules from './CustomRules';
-
-export default {
-  __init__: ['customRules'],
-  customRules: ['type', CustomRules]
-};

+ 0 - 99
src/components/ren-flowable/package/Log.js

@@ -1,99 +0,0 @@
-function Log() {}
-
-Log.prototype.type = ['primary', 'success', 'warn', 'error', 'info'];
-
-Log.prototype.typeColor = function(type) {
-  let color = '';
-  switch (type) {
-    case 'primary':
-      color = '#2d8cf0';
-      break;
-    case 'success':
-      color = '#19be6b';
-      break;
-    case 'info':
-      color = '#909399';
-      break;
-    case 'warn':
-      color = '#ff9900';
-      break;
-    case 'error':
-      color = '#f03f14';
-      break;
-    default:
-      color = '#35495E';
-      break;
-  }
-  return color;
-};
-
-Log.prototype.isArray = function(obj) {
-  return Object.prototype.toString.call(obj) === '[object Array]';
-};
-
-Log.prototype.print = function(text, type = 'default', back = false) {
-  if (typeof text === 'object') {
-    // 如果是對象則調用打印對象方式
-    this.isArray(text) ? console.table(text) : console.dir(text);
-    return;
-  }
-  if (back) {
-    // 如果是打印帶背景圖的
-    console.log(`%c ${text} `, `background:${this.typeColor(type)}; padding: 2px; border-radius: 4px; color: #fff;`);
-  } else {
-    console.log(
-      `%c ${text} `,
-      `border: 1px solid ${this.typeColor(type)};
-        padding: 2px; border-radius: 4px;
-        color: ${this.typeColor(type)};`
-    );
-  }
-};
-
-Log.prototype.printBack = function(type = 'primary', title) {
-  this.print(type, title, true);
-};
-
-Log.prototype.pretty = function(type = 'primary', title, text) {
-  if (typeof text === 'object') {
-    console.group('Console Group', title);
-    console.log(
-      `%c ${title}`,
-      `background:${this.typeColor(type)};border:1px solid ${this.typeColor(type)};
-        padding: 1px; border-radius: 4px; color: #fff;`
-    );
-    this.isArray(text) ? console.table(text) : console.dir(text);
-    console.groupEnd();
-    return;
-  }
-  console.log(
-    `%c ${title} %c ${text} %c`,
-    `background:${this.typeColor(type)};border:1px solid ${this.typeColor(type)};
-      padding: 1px; border-radius: 4px 0 0 4px; color: #fff;`,
-    `border:1px solid ${this.typeColor(type)};
-      padding: 1px; border-radius: 0 4px 4px 0; color: ${this.typeColor(type)};`,
-    'background:transparent'
-  );
-};
-
-Log.prototype.prettyPrimary = function(title, ...text) {
-  text.forEach(t => this.pretty('primary', title, t));
-};
-
-Log.prototype.prettySuccess = function(title, ...text) {
-  text.forEach(t => this.pretty('success', title, t));
-};
-
-Log.prototype.prettyWarn = function(title, ...text) {
-  text.forEach(t => this.pretty('warn', title, t));
-};
-
-Log.prototype.prettyError = function(title, ...text) {
-  text.forEach(t => this.pretty('error', title, t));
-};
-
-Log.prototype.prettyInfo = function(title, ...text) {
-  text.forEach(t => this.pretty('info', title, t));
-};
-
-export default new Log();

+ 0 - 478
src/components/ren-flowable/package/designer/ProcessDesigner.vue

@@ -1,478 +0,0 @@
-<template>
-  <div class="my-process-designer">
-    <div class="my-process-designer__header">
-      <slot name="control-header"></slot>
-      <template v-if="!$slots['control-header']">
-        <el-button-group key="file-control">
-          <el-button :size="headerButtonSize" :type="headerButtonType" :icon="FolderOpened" @click="$refs.refFile.click()">打开文件</el-button>
-          <el-tooltip effect="light">
-            <template #content>
-              <el-button :size="headerButtonSize" type="primary" link @click="downloadProcessAsBpmn()">下载BPMN</el-button>
-              <br />
-              <el-button :size="headerButtonSize" type="primary" link @click="downloadProcessAsSvg()">下载图片</el-button>
-            </template>
-            <el-button :size="headerButtonSize" :type="headerButtonType" :icon="Download">下载文件</el-button>
-          </el-tooltip>
-          <el-button :size="headerButtonSize" :type="headerButtonType" :icon="View" @click="previewProcessXML">预览</el-button>
-          <el-tooltip v-if="simulation" effect="light" :content="this.simulationStatus ? '退出模拟' : '开启模拟'">
-            <el-button :size="headerButtonSize" :type="headerButtonType" :icon="Cpu" @click="processSimulation"> 模拟 </el-button>
-          </el-tooltip>
-        </el-button-group>
-        <el-button-group key="align-control">
-          <el-tooltip effect="light" content="向左对齐">
-            <el-button :size="headerButtonSize" class="align align-left" :icon="Histogram" @click="elementsAlign('left')" />
-          </el-tooltip>
-          <el-tooltip effect="light" content="向右对齐">
-            <el-button :size="headerButtonSize" class="align align-right" :icon="Histogram" @click="elementsAlign('right')" />
-          </el-tooltip>
-          <el-tooltip effect="light" content="向上对齐">
-            <el-button :size="headerButtonSize" class="align align-top" :icon="Histogram" @click="elementsAlign('top')" />
-          </el-tooltip>
-          <el-tooltip effect="light" content="向下对齐">
-            <el-button :size="headerButtonSize" class="align align-bottom" :icon="Histogram" @click="elementsAlign('bottom')" />
-          </el-tooltip>
-          <el-tooltip effect="light" content="水平居中">
-            <el-button :size="headerButtonSize" class="align align-center" :icon="Histogram" @click="elementsAlign('center')" />
-          </el-tooltip>
-          <el-tooltip effect="light" content="垂直居中">
-            <el-button :size="headerButtonSize" class="align align-middle" :icon="Histogram" @click="elementsAlign('middle')" />
-          </el-tooltip>
-        </el-button-group>
-        <el-button-group key="stack-control">
-          <el-tooltip effect="light" content="撤销">
-            <el-button :size="headerButtonSize" :disabled="!revocable" :icon="RefreshLeft" @click="processUndo()" />
-          </el-tooltip>
-          <el-tooltip effect="light" content="恢复">
-            <el-button :size="headerButtonSize" :disabled="!recoverable" :icon="RefreshRight" @click="processRedo()" />
-          </el-tooltip>
-          <el-tooltip effect="light" content="重新绘制">
-            <el-button :size="headerButtonSize" :icon="Refresh" @click="processRestart" />
-          </el-tooltip>
-        </el-button-group>
-        <el-button-group key="file-control">
-          <el-button :size="headerButtonSize" :type="headerButtonType" :icon="RefreshRight" @click="processSave">保存</el-button>
-        </el-button-group>
-      </template>
-      <!-- 用于打开本地文件-->
-      <input type="file" id="files" ref="refFile" style="display: none" accept=".xml, .bpmn" @change="importLocalFile" />
-    </div>
-    <div class="my-process-designer__container">
-      <div class="my-process-designer__canvas" ref="bpmn-canvas"></div>
-    </div>
-    <el-dialog :title="`预览${previewType}`" width="60%" v-model="previewModelVisible" append-to-body destroy-on-close>
-      <Codemirror v-model:value="previewResult" :options="cmOptions" border :height="600" />
-    </el-dialog>
-  </div>
-</template>
-
-<script>
-import { Histogram, Cpu, Refresh, RefreshLeft, RefreshRight, ZoomOut, ZoomIn, View, Download, FolderOpened, ScaleToOriginal } from "@element-plus/icons-vue";
-import BpmnModeler from "bpmn-js/lib/Modeler";
-import DefaultEmptyXML from "./plugins/defaultEmpty";
-// 翻译方法
-import customTranslate from "./plugins/translate/customTranslate";
-import translationsCN from "./plugins/translate/zh";
-// 模拟流转流程
-import tokenSimulation from "bpmn-js-token-simulation";
-// 标签解析构建器
-// import bpmnPropertiesProvider from "bpmn-js-properties-panel/lib/provider/bpmn";
-// 标签解析 Moddle
-import camundaModdleDescriptor from "./plugins/descriptor/camundaDescriptor.json";
-import activitiModdleDescriptor from "./plugins/descriptor/activitiDescriptor.json";
-import flowableModdleDescriptor from "./plugins/descriptor/flowableDescriptor.json";
-// 标签解析 Extension
-import camundaModdleExtension from "./plugins/extension-moddle/camunda";
-import activitiModdleExtension from "./plugins/extension-moddle/activiti";
-import flowableModdleExtension from "./plugins/extension-moddle/flowable";
-// 引入json转换与高亮
-// import X2JS from "x2js";
-
-import Codemirror from "codemirror-editor-vue3";
-import "codemirror/theme/monokai.css";
-import "codemirror/mode/javascript/javascript.js";
-import "codemirror/mode/xml/xml.js";
-
-export default {
-  name: "MyProcessDesigner",
-  componentName: "MyProcessDesigner",
-  components: {
-    Codemirror
-  },
-  setup() {
-    return {
-      Histogram,
-      Cpu,
-      Refresh,
-      RefreshLeft,
-      RefreshRight,
-      ZoomOut,
-      ZoomIn,
-      View,
-      Download,
-      FolderOpened,
-      ScaleToOriginal
-    };
-  },
-  emits: ["destroy", "init-finished", "save-flowable", "commandStack-changed", "update:modelValue", "change", "canvas-viewbox-changed", "element-click"],
-  props: {
-    modelValue: String, // xml 字符串
-    processId: String,
-    processName: String,
-    translations: Object, // 自定义的翻译文件
-    options: {
-      type: Object,
-      default: () => ({})
-    }, // 自定义的翻译文件
-    additionalModel: [Object, Array], // 自定义model
-    moddleExtension: Object, // 自定义moddle
-    onlyCustomizeAddi: {
-      type: Boolean,
-      default: false
-    },
-    onlyCustomizeModdle: {
-      type: Boolean,
-      default: false
-    },
-    simulation: {
-      type: Boolean,
-      default: true
-    },
-    keyboard: {
-      type: Boolean,
-      default: true
-    },
-    prefix: {
-      type: String,
-      default: "camunda"
-    },
-    events: {
-      type: Array,
-      default: () => ["element.click"]
-    },
-    headerButtonSize: {
-      type: String,
-      default: "default",
-      validator: (value) => ["default", "medium", "small", "mini"].indexOf(value) !== -1
-    },
-    headerButtonType: {
-      type: String,
-      default: "primary",
-      validator: (value) => ["default", "primary", "success", "warning", "danger", "info"].indexOf(value) !== -1
-    }
-  },
-  data() {
-    return {
-      defaultZoom: 1,
-      previewModelVisible: false,
-      simulationStatus: false,
-      previewResult: "",
-      previewType: "xml",
-      recoverable: false,
-      revocable: false,
-      cmOptions: {
-        mode: "xml", // 语言模式
-        theme: "monokai", // 主题
-        lineNumbers: true, // 显示行号
-        smartIndent: true, // 智能缩进
-        readOnly: true,
-        indentUnit: 2, // 智能缩进单位为4个空格长度
-        foldGutter: true, // 启用行槽中的代码折叠
-        styleActiveLine: true // 显示选中行的样式
-      }
-    };
-  },
-  computed: {
-    additionalModules() {
-      const Modules = [];
-      // 仅保留用户自定义扩展模块
-      if (this.onlyCustomizeAddi) {
-        if (Object.prototype.toString.call(this.additionalModel) === "[object Array]") {
-          return this.additionalModel || [];
-        }
-        return [this.additionalModel];
-      }
-
-      // 插入用户自定义扩展模块
-      if (Object.prototype.toString.call(this.additionalModel) === "[object Array]") {
-        Modules.push(...this.additionalModel);
-      } else {
-        this.additionalModel && Modules.push(this.additionalModel);
-      }
-
-      // 翻译模块
-      const TranslateModule = {
-        translate: ["value", customTranslate(this.translations || translationsCN)]
-      };
-      Modules.push(TranslateModule);
-
-      // 模拟流转模块
-      if (this.simulation) {
-        Modules.push(tokenSimulation);
-      }
-
-      // 根据需要的流程类型设置扩展元素构建模块
-      // if (this.prefix === "bpmn") {
-      //   Modules.push(bpmnModdleExtension);
-      // }
-      if (this.prefix === "camunda") {
-        Modules.push(camundaModdleExtension);
-      }
-      if (this.prefix === "flowable") {
-        Modules.push(flowableModdleExtension);
-      }
-      if (this.prefix === "activiti") {
-        Modules.push(activitiModdleExtension);
-      }
-
-      return Modules;
-    },
-    moddleExtensions() {
-      const Extensions = {};
-      // 仅使用用户自定义模块
-      if (this.onlyCustomizeModdle) {
-        return this.moddleExtension || null;
-      }
-
-      // 插入用户自定义模块
-      if (this.moddleExtension) {
-        for (let key in this.moddleExtension) {
-          Extensions[key] = this.moddleExtension[key];
-        }
-      }
-
-      // 根据需要的 "流程类型" 设置 对应的解析文件
-      if (this.prefix === "activiti") {
-        Extensions.activiti = activitiModdleDescriptor;
-      }
-      if (this.prefix === "flowable") {
-        Extensions.flowable = flowableModdleDescriptor;
-      }
-      if (this.prefix === "camunda") {
-        Extensions.camunda = camundaModdleDescriptor;
-      }
-
-      return Extensions;
-    }
-  },
-  mounted() {
-    this.initBpmnModeler();
-    this.createNewDiagram(this.modelValue);
-    // this.$once("hook:beforeUnmount", () => {
-    //   if (this.bpmnModeler) this.bpmnModeler.destroy();
-    //   this.$emit("destroy", this.bpmnModeler);
-    //   this.bpmnModeler = null;
-    // });
-  },
-  beforeUnmount() {
-    if (this.bpmnModeler) this.bpmnModeler.destroy();
-    this.$emit("destroy", this.bpmnModeler);
-    this.bpmnModeler = null;
-  },
-  methods: {
-    initBpmnModeler() {
-      if (this.bpmnModeler) return;
-      this.bpmnModeler = new BpmnModeler({
-        container: this.$refs["bpmn-canvas"],
-        keyboard: this.keyboard ? { bindTo: document } : null,
-        additionalModules: this.additionalModules,
-        moddleExtensions: this.moddleExtensions,
-        ...this.options
-      });
-      this.$emit("init-finished", this.bpmnModeler);
-      this.initModelListeners();
-    },
-    initModelListeners() {
-      const EventBus = this.bpmnModeler.get("eventBus");
-      const that = this;
-      // 注册需要的监听事件, 将. 替换为 - , 避免解析异常
-      this.events.forEach((event) => {
-        EventBus.on(event, function (eventObj) {
-          let eventName = event.replace(/\./g, "-");
-          let element = eventObj ? eventObj.element : null;
-          that.$emit(eventName, element, eventObj);
-        });
-      });
-      // 监听图形改变返回xml
-      EventBus.on("commandStack.changed", async (event) => {
-        try {
-          this.recoverable = this.bpmnModeler.get("commandStack").canRedo();
-          this.revocable = this.bpmnModeler.get("commandStack").canUndo();
-          let { xml } = await this.bpmnModeler.saveXML({ format: true });
-          this.$emit("commandStack-changed", event);
-          this.$emit("update:modelValue", xml);
-          this.$emit("change", xml);
-        } catch (e) {
-          console.error(`[Process Designer Warn]: ${e.message || e}`);
-        }
-      });
-      // 监听视图缩放变化
-      this.bpmnModeler.on("canvas.viewbox.changed", ({ viewbox }) => {
-        this.$emit("canvas-viewbox-changed", { viewbox });
-        const { scale } = viewbox;
-        this.defaultZoom = Math.floor(scale * 100) / 100;
-      });
-    },
-    /* 创建新的流程图 */
-    async createNewDiagram(xml) {
-      // 将字符串转换成图显示出来
-      let newId = this.processId || `process_${new Date().getTime()}`;
-      let newName = this.processName || `流程_${new Date().getTime()}`;
-      let xmlString = xml || DefaultEmptyXML(newId, newName, this.prefix);
-      try {
-        let { warnings } = await this.bpmnModeler.importXML(xmlString);
-        if (warnings && warnings.length) {
-          warnings.forEach((warn) => console.warn(warn));
-        }
-      } catch (e) {
-        console.error(`[Process Designer Warn]: ${e?.message || e}`);
-      }
-    },
-
-    // 下载流程图到本地
-    /**
-     * @param {string} type
-     * @param {*} name
-     */
-    async downloadProcess(type, name) {
-      try {
-        const _this = this;
-        // 按需要类型创建文件并下载
-        if (type === "xml" || type === "bpmn") {
-          const { err, xml } = await this.bpmnModeler.saveXML();
-          // 读取异常时抛出异常
-          if (err) {
-            console.error(`[Process Designer Warn ]: ${err.message || err}`);
-          }
-          let { href, filename } = _this.setEncoded(type, name, xml);
-          downloadFunc(href, filename);
-        } else {
-          const { err, svg } = await this.bpmnModeler.saveSVG();
-          // 读取异常时抛出异常
-          if (err) {
-            return console.error(err);
-          }
-          let { href, filename } = _this.setEncoded(type, name, svg);
-          downloadFunc(href, filename);
-        }
-      } catch (e) {
-        console.error(`[Process Designer Warn ]: ${e.message || e}`);
-      }
-      // 文件下载方法
-      function downloadFunc(href, filename) {
-        if (href && filename) {
-          let a = document.createElement("a");
-          a.download = filename; //指定下载的文件名
-          a.href = href; //  URL对象
-          a.click(); // 模拟点击
-          URL.revokeObjectURL(a.href); // 释放URL 对象
-        }
-      }
-    },
-
-    // 根据所需类型进行转码并返回下载地址
-    setEncoded(type, filename = "diagram", data) {
-      const encodedData = encodeURIComponent(data);
-      return {
-        filename: `${filename}.${type}`,
-        href: `data:application/${type === "svg" ? "text/xml" : "bpmn20-xml"};charset=UTF-8,${encodedData}`,
-        data: data
-      };
-    },
-
-    // 加载本地文件
-    importLocalFile() {
-      const that = this;
-      const file = this.$refs.refFile.files[0];
-      const reader = new FileReader();
-      reader.readAsText(file);
-      reader.onload = function () {
-        let xmlStr = this.result;
-        that.createNewDiagram(xmlStr);
-      };
-    },
-    /* ------------------------------------------------ refs methods ------------------------------------------------------ */
-    downloadProcessAsXml() {
-      this.downloadProcess("xml");
-    },
-    downloadProcessAsBpmn() {
-      this.downloadProcess("bpmn");
-    },
-    downloadProcessAsSvg() {
-      this.downloadProcess("svg");
-    },
-    processSimulation() {
-      this.simulationStatus = !this.simulationStatus;
-      this.simulation && this.bpmnModeler.get("toggleMode").toggleMode();
-    },
-    processRedo() {
-      this.bpmnModeler.get("commandStack").redo();
-    },
-    processUndo() {
-      this.bpmnModeler.get("commandStack").undo();
-    },
-    processSave() {
-      this.bpmnModeler.saveXML({ format: true }).then(({ xml }) => {
-        this.$emit("save-flowable", xml);
-      });
-    },
-    processZoomIn(zoomStep = 0.1) {
-      let newZoom = Math.floor(this.defaultZoom * 100 + zoomStep * 100) / 100;
-      if (newZoom > 4) {
-        throw new Error("[Process Designer Warn ]: The zoom ratio cannot be greater than 4");
-      }
-      this.defaultZoom = newZoom;
-      this.bpmnModeler.get("canvas").zoom(this.defaultZoom);
-    },
-    processZoomOut(zoomStep = 0.1) {
-      let newZoom = Math.floor(this.defaultZoom * 100 - zoomStep * 100) / 100;
-      if (newZoom < 0.2) {
-        throw new Error("[Process Designer Warn ]: The zoom ratio cannot be less than 0.2");
-      }
-      this.defaultZoom = newZoom;
-      this.bpmnModeler.get("canvas").zoom(this.defaultZoom);
-    },
-    processZoomTo(newZoom = 1) {
-      if (newZoom < 0.2) {
-        throw new Error("[Process Designer Warn ]: The zoom ratio cannot be less than 0.2");
-      }
-      if (newZoom > 4) {
-        throw new Error("[Process Designer Warn ]: The zoom ratio cannot be greater than 4");
-      }
-      this.defaultZoom = newZoom;
-      this.bpmnModeler.get("canvas").zoom(newZoom);
-    },
-    processReZoom() {
-      this.defaultZoom = 1;
-      this.bpmnModeler.get("canvas").zoom("fit-viewport", "auto");
-    },
-    processRestart() {
-      this.recoverable = false;
-      this.revocable = false;
-      this.createNewDiagram(null);
-    },
-    elementsAlign(align) {
-      const Align = this.bpmnModeler.get("alignElements");
-      const Selection = this.bpmnModeler.get("selection");
-      const SelectedElements = Selection.get();
-      if (!SelectedElements || SelectedElements.length <= 1) {
-        this.$message.warning("请按住 Ctrl 键选择多个元素对齐");
-        return;
-      }
-      this.$confirm("自动对齐可能造成图形变形,是否继续?", "警告", {
-        confirmButtonText: "确定",
-        cancelButtonText: "取消",
-        type: "warning"
-      }).then(() => Align.trigger(SelectedElements, align));
-    },
-    /*-----------------------------    方法结束     ---------------------------------*/
-    previewProcessXML() {
-      this.bpmnModeler.saveXML({ format: true }).then(({ xml }) => {
-        this.previewResult = xml;
-        this.previewType = "xml";
-        this.cmOptions.mode = "xml";
-        this.previewModelVisible = true;
-      });
-    }
-  }
-};
-</script>

+ 0 - 7
src/components/ren-flowable/package/designer/index.js

@@ -1,7 +0,0 @@
-import MyProcessDesigner from './ProcessDesigner.vue';
-
-MyProcessDesigner.install = function(Vue) {
-  Vue.component(MyProcessDesigner.name, MyProcessDesigner);
-};
-
-export default MyProcessDesigner;

+ 0 - 390
src/components/ren-flowable/package/designer/plugins/content-pad/contentPadProvider.js

@@ -1,390 +0,0 @@
-import { assign, forEach, isArray } from 'min-dash';
-
-import { is } from 'bpmn-js/lib/util/ModelUtil';
-
-import { isExpanded, isEventSubProcess } from 'bpmn-js/lib/util/DiUtil';
-
-import { isAny } from 'bpmn-js/lib/features/modeling/util/ModelingUtil';
-
-import { getChildLanes } from 'bpmn-js/lib/features/modeling/util/LaneUtil';
-
-import { hasPrimaryModifier } from 'diagram-js/lib/util/Mouse';
-
-/**
- * A provider for BPMN 2.0 elements context pad
- */
-export default function ContextPadProvider(
-  config,
-  injector,
-  eventBus,
-  contextPad,
-  modeling,
-  elementFactory,
-  connect,
-  create,
-  popupMenu,
-  canvas,
-  rules,
-  translate,
-  elementRegistry
-) {
-  config = config || {};
-
-  contextPad.registerProvider(this);
-
-  this._contextPad = contextPad;
-
-  this._modeling = modeling;
-
-  this._elementFactory = elementFactory;
-  this._connect = connect;
-  this._create = create;
-  this._popupMenu = popupMenu;
-  this._canvas = canvas;
-  this._rules = rules;
-  this._translate = translate;
-
-  if (config.autoPlace !== false) {
-    this._autoPlace = injector.get('autoPlace', false);
-  }
-
-  eventBus.on('create.end', 250, function(event) {
-    var context = event.context;
-    var shape = context.shape;
-
-    if (!hasPrimaryModifier(event) || !contextPad.isOpen(shape)) {
-      return;
-    }
-
-    var entries = contextPad.getEntries(shape);
-
-    if (entries.replace) {
-      entries.replace.action.click(event, shape);
-    }
-  });
-}
-
-ContextPadProvider.$inject = [
-  'config.contextPad',
-  'injector',
-  'eventBus',
-  'contextPad',
-  'modeling',
-  'elementFactory',
-  'connect',
-  'create',
-  'popupMenu',
-  'canvas',
-  'rules',
-  'translate',
-  'elementRegistry'
-];
-
-ContextPadProvider.prototype.getContextPadEntries = function(element) {
-  var contextPad = this._contextPad;
-  var modeling = this._modeling;
-  var elementFactory = this._elementFactory;
-  var connect = this._connect;
-  var create = this._create;
-  var popupMenu = this._popupMenu;
-  var canvas = this._canvas;
-  var rules = this._rules;
-  var autoPlace = this._autoPlace;
-  var translate = this._translate;
-
-  var actions = {};
-
-  if (element.type === 'label') {
-    return actions;
-  }
-
-  var businessObject = element.businessObject;
-
-  function startConnect(event, element) {
-    connect.start(event, element);
-  }
-
-  function removeElement() {
-    modeling.removeElements([element]);
-  }
-
-  function getReplaceMenuPosition(element) {
-    var Y_OFFSET = 5;
-
-    var diagramContainer = canvas.getContainer();
-    var pad = contextPad.getPad(element).html;
-
-    var diagramRect = diagramContainer.getBoundingClientRect();
-    var padRect = pad.getBoundingClientRect();
-
-    var top = padRect.top - diagramRect.top;
-    var left = padRect.left - diagramRect.left;
-
-    var pos = {
-      x: left,
-      y: top + padRect.height + Y_OFFSET
-    };
-
-    return pos;
-  }
-
-  /**
-   * Create an append action
-   *
-   * @param {string} type
-   * @param {string} className
-   * @param {string} [title]
-   * @param {Object} [options]
-   *
-   * @return {Object} descriptor
-   */
-  function appendAction(type, className, title, options) {
-    if (typeof title !== 'string') {
-      options = title;
-      title = translate('Append {type}', { type: type.replace(/^bpmn:/, '') });
-    }
-
-    function appendStart(event, element) {
-      var shape = elementFactory.createShape(assign({ type: type }, options));
-      create.start(event, shape, {
-        source: element
-      });
-    }
-
-    var append = autoPlace
-      ? function(event, element) {
-        var shape = elementFactory.createShape(assign({ type: type }, options));
-
-        autoPlace.append(element, shape);
-      }
-      : appendStart;
-
-    return {
-      group: 'model',
-      className: className,
-      title: title,
-      action: {
-        dragstart: appendStart,
-        click: append
-      }
-    };
-  }
-
-  function splitLaneHandler(count) {
-    return function(event, element) {
-      // actual split
-      modeling.splitLane(element, count);
-
-      // refresh context pad after split to
-      // get rid of split icons
-      contextPad.open(element, true);
-    };
-  }
-
-  if (isAny(businessObject, ['bpmn:Lane', 'bpmn:Participant']) && isExpanded(businessObject)) {
-    var childLanes = getChildLanes(element);
-
-    assign(actions, {
-      'lane-insert-above': {
-        group: 'lane-insert-above',
-        className: 'bpmn-icon-lane-insert-above',
-        title: translate('Add Lane above'),
-        action: {
-          click: function(event, element) {
-            modeling.addLane(element, 'top');
-          }
-        }
-      }
-    });
-
-    if (childLanes.length < 2) {
-      if (element.height >= 120) {
-        assign(actions, {
-          'lane-divide-two': {
-            group: 'lane-divide',
-            className: 'bpmn-icon-lane-divide-two',
-            title: translate('Divide into two Lanes'),
-            action: {
-              click: splitLaneHandler(2)
-            }
-          }
-        });
-      }
-
-      if (element.height >= 180) {
-        assign(actions, {
-          'lane-divide-three': {
-            group: 'lane-divide',
-            className: 'bpmn-icon-lane-divide-three',
-            title: translate('Divide into three Lanes'),
-            action: {
-              click: splitLaneHandler(3)
-            }
-          }
-        });
-      }
-    }
-
-    assign(actions, {
-      'lane-insert-below': {
-        group: 'lane-insert-below',
-        className: 'bpmn-icon-lane-insert-below',
-        title: translate('Add Lane below'),
-        action: {
-          click: function(event, element) {
-            modeling.addLane(element, 'bottom');
-          }
-        }
-      }
-    });
-  }
-
-  if (is(businessObject, 'bpmn:FlowNode')) {
-    if (is(businessObject, 'bpmn:EventBasedGateway')) {
-      assign(actions, {
-        'append.receive-task': appendAction('bpmn:ReceiveTask', 'bpmn-icon-receive-task', translate('Append ReceiveTask')),
-        'append.message-intermediate-event': appendAction(
-          'bpmn:IntermediateCatchEvent',
-          'bpmn-icon-intermediate-event-catch-message',
-          translate('Append MessageIntermediateCatchEvent'),
-          { eventDefinitionType: 'bpmn:MessageEventDefinition' }
-        ),
-        'append.timer-intermediate-event': appendAction(
-          'bpmn:IntermediateCatchEvent',
-          'bpmn-icon-intermediate-event-catch-timer',
-          translate('Append TimerIntermediateCatchEvent'),
-          { eventDefinitionType: 'bpmn:TimerEventDefinition' }
-        ),
-        'append.condition-intermediate-event': appendAction(
-          'bpmn:IntermediateCatchEvent',
-          'bpmn-icon-intermediate-event-catch-condition',
-          translate('Append ConditionIntermediateCatchEvent'),
-          { eventDefinitionType: 'bpmn:ConditionalEventDefinition' }
-        ),
-        'append.signal-intermediate-event': appendAction(
-          'bpmn:IntermediateCatchEvent',
-          'bpmn-icon-intermediate-event-catch-signal',
-          translate('Append SignalIntermediateCatchEvent'),
-          { eventDefinitionType: 'bpmn:SignalEventDefinition' }
-        )
-      });
-    } else if (isEventType(businessObject, 'bpmn:BoundaryEvent', 'bpmn:CompensateEventDefinition')) {
-      assign(actions, {
-        'append.compensation-activity': appendAction('bpmn:Task', 'bpmn-icon-task', translate('Append compensation activity'), {
-          isForCompensation: true
-        })
-      });
-    } else if (
-      !is(businessObject, 'bpmn:EndEvent') &&
-      !businessObject.isForCompensation &&
-      !isEventType(businessObject, 'bpmn:IntermediateThrowEvent', 'bpmn:LinkEventDefinition') &&
-      !isEventSubProcess(businessObject)
-    ) {
-      assign(actions, {
-        'append.end-event': appendAction('bpmn:EndEvent', 'bpmn-icon-end-event-none', translate('Append EndEvent')),
-        'append.gateway': appendAction('bpmn:ExclusiveGateway', 'bpmn-icon-gateway-none', translate('Append Gateway')),
-        'append.append-task': appendAction('bpmn:UserTask', 'bpmn-icon-user-task', translate('Append Task')),
-        'append.intermediate-event': appendAction(
-          'bpmn:IntermediateThrowEvent',
-          'bpmn-icon-intermediate-event-none',
-          translate('Append Intermediate/Boundary Event')
-        )
-      });
-    }
-  }
-
-  if (!popupMenu.isEmpty(element, 'bpmn-replace')) {
-    // Replace menu entry
-    assign(actions, {
-      replace: {
-        group: 'edit',
-        className: 'bpmn-icon-screw-wrench',
-        title: translate('Change type'),
-        action: {
-          click: function(event, element) {
-            var position = assign(getReplaceMenuPosition(element), {
-              cursor: { x: event.x, y: event.y }
-            });
-
-            popupMenu.open(element, 'bpmn-replace', position);
-          }
-        }
-      }
-    });
-  }
-
-  if (isAny(businessObject, ['bpmn:FlowNode', 'bpmn:InteractionNode', 'bpmn:DataObjectReference', 'bpmn:DataStoreReference'])) {
-    assign(actions, {
-      'append.text-annotation': appendAction('bpmn:TextAnnotation', 'bpmn-icon-text-annotation'),
-
-      connect: {
-        group: 'connect',
-        className: 'bpmn-icon-connection-multi',
-        title: translate('Connect using ' + (businessObject.isForCompensation ? '' : 'Sequence/MessageFlow or ') + 'Association'),
-        action: {
-          click: startConnect,
-          dragstart: startConnect
-        }
-      }
-    });
-  }
-
-  if (isAny(businessObject, ['bpmn:DataObjectReference', 'bpmn:DataStoreReference'])) {
-    assign(actions, {
-      connect: {
-        group: 'connect',
-        className: 'bpmn-icon-connection-multi',
-        title: translate('Connect using DataInputAssociation'),
-        action: {
-          click: startConnect,
-          dragstart: startConnect
-        }
-      }
-    });
-  }
-
-  if (is(businessObject, 'bpmn:Group')) {
-    assign(actions, {
-      'append.text-annotation': appendAction('bpmn:TextAnnotation', 'bpmn-icon-text-annotation')
-    });
-  }
-
-  // delete element entry, only show if allowed by rules
-  var deleteAllowed = rules.allowed('elements.delete', { elements: [element] });
-
-  if (isArray(deleteAllowed)) {
-    // was the element returned as a deletion candidate?
-    deleteAllowed = deleteAllowed[0] === element;
-  }
-
-  if (deleteAllowed) {
-    assign(actions, {
-      delete: {
-        group: 'edit',
-        className: 'bpmn-icon-trash',
-        title: translate('Remove'),
-        action: {
-          click: removeElement
-        }
-      }
-    });
-  }
-
-  return actions;
-};
-
-// helpers /////////
-
-function isEventType(eventBo, type, definition) {
-  var isType = eventBo.$instanceOf(type);
-  var isDefinition = false;
-
-  var definitions = eventBo.eventDefinitions || [];
-  forEach(definitions, function(def) {
-    if (def.$type === definition) {
-      isDefinition = true;
-    }
-  });
-
-  return isType && isDefinition;
-}

+ 0 - 6
src/components/ren-flowable/package/designer/plugins/content-pad/index.js

@@ -1,6 +0,0 @@
-import CustomContextPadProvider from './contentPadProvider';
-
-export default {
-  __init__: ['contextPadProvider'],
-  contextPadProvider: ['type', CustomContextPadProvider]
-};

+ 0 - 24
src/components/ren-flowable/package/designer/plugins/defaultEmpty.js

@@ -1,24 +0,0 @@
-export default (key, name, type) => {
-  if (!type) type = 'camunda';
-  const TYPE_TARGET = {
-    activiti: 'http://activiti.org/bpmn',
-    camunda: 'http://bpmn.io/schema/bpmn',
-    flowable: 'http://flowable.org/bpmn'
-  };
-  return `<?xml version="1.0" encoding="UTF-8"?>
-<bpmn2:definitions 
-  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-  xmlns:bpmn2="http://www.omg.org/spec/BPMN/20100524/MODEL"
-  xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI"
-  xmlns:dc="http://www.omg.org/spec/DD/20100524/DC"
-  xmlns:di="http://www.omg.org/spec/DD/20100524/DI"
-  id="diagram_${key}"
-  targetNamespace="${TYPE_TARGET[type]}">
-  <bpmn2:process id="${key}" name="${name}" isExecutable="true">
-  </bpmn2:process>
-  <bpmndi:BPMNDiagram id="BPMNDiagram_1">
-    <bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="${key}">
-    </bpmndi:BPMNPlane>
-  </bpmndi:BPMNDiagram>
-</bpmn2:definitions>`;
-};

+ 0 - 1071
src/components/ren-flowable/package/designer/plugins/descriptor/activitiDescriptor.json

@@ -1,1071 +0,0 @@
-{
-  "name": "Activiti",
-  "uri": "http://activiti.org/bpmn",
-  "prefix": "activiti",
-  "xml": {
-    "tagAlias": "lowerCase"
-  },
-  "associations": [],
-  "types": [
-    {
-      "name": "Definitions",
-      "isAbstract": true,
-      "extends": [
-        "bpmn:Definitions"
-      ],
-      "properties": [
-        {
-          "name": "diagramRelationId",
-          "isAttr": true,
-          "type": "String"
-        }
-      ]
-    },
-    {
-      "name": "InOutBinding",
-      "superClass": [
-        "Element"
-      ],
-      "isAbstract": true,
-      "properties": [
-        {
-          "name": "source",
-          "isAttr": true,
-          "type": "String"
-        },
-        {
-          "name": "sourceExpression",
-          "isAttr": true,
-          "type": "String"
-        },
-        {
-          "name": "target",
-          "isAttr": true,
-          "type": "String"
-        },
-        {
-          "name": "businessKey",
-          "isAttr": true,
-          "type": "String"
-        },
-        {
-          "name": "local",
-          "isAttr": true,
-          "type": "Boolean",
-          "default": false
-        },
-        {
-          "name": "variables",
-          "isAttr": true,
-          "type": "String"
-        }
-      ]
-    },
-    {
-      "name": "In",
-      "superClass": [
-        "InOutBinding"
-      ],
-      "meta": {
-        "allowedIn": [
-          "bpmn:CallActivity"
-        ]
-      }
-    },
-    {
-      "name": "Out",
-      "superClass": [
-        "InOutBinding"
-      ],
-      "meta": {
-        "allowedIn": [
-          "bpmn:CallActivity"
-        ]
-      }
-    },
-    {
-      "name": "AsyncCapable",
-      "isAbstract": true,
-      "extends": [
-        "bpmn:Activity",
-        "bpmn:Gateway",
-        "bpmn:Event"
-      ],
-      "properties": [
-        {
-          "name": "async",
-          "isAttr": true,
-          "type": "Boolean",
-          "default": false
-        },
-        {
-          "name": "asyncBefore",
-          "isAttr": true,
-          "type": "Boolean",
-          "default": false
-        },
-        {
-          "name": "asyncAfter",
-          "isAttr": true,
-          "type": "Boolean",
-          "default": false
-        },
-        {
-          "name": "exclusive",
-          "isAttr": true,
-          "type": "Boolean",
-          "default": true
-        }
-      ]
-    },
-    {
-      "name": "JobPriorized",
-      "isAbstract": true,
-      "extends": [
-        "bpmn:Process",
-        "activiti:AsyncCapable"
-      ],
-      "properties": [
-        {
-          "name": "jobPriority",
-          "isAttr": true,
-          "type": "String"
-        }
-      ]
-    },
-    {
-      "name": "SignalEventDefinition",
-      "isAbstract": true,
-      "extends": [
-        "bpmn:SignalEventDefinition"
-      ],
-      "properties": [
-        {
-          "name": "async",
-          "isAttr": true,
-          "type": "Boolean",
-          "default": false
-        }
-      ]
-    },
-    {
-      "name": "ErrorEventDefinition",
-      "isAbstract": true,
-      "extends": [
-        "bpmn:ErrorEventDefinition"
-      ],
-      "properties": [
-        {
-          "name": "errorCodeVariable",
-          "isAttr": true,
-          "type": "String"
-        },
-        {
-          "name": "errorMessageVariable",
-          "isAttr": true,
-          "type": "String"
-        }
-      ]
-    },
-    {
-      "name": "Error",
-      "isAbstract": true,
-      "extends": [
-        "bpmn:Error"
-      ],
-      "properties": [
-        {
-          "name": "activiti:errorMessage",
-          "isAttr": true,
-          "type": "String"
-        }
-      ]
-    },
-    {
-      "name": "PotentialStarter",
-      "superClass": [
-        "Element"
-      ],
-      "properties": [
-        {
-          "name": "resourceAssignmentExpression",
-          "type": "bpmn:ResourceAssignmentExpression"
-        }
-      ]
-    },
-    {
-      "name": "FormSupported",
-      "isAbstract": true,
-      "extends": [
-        "bpmn:StartEvent",
-        "bpmn:UserTask"
-      ],
-      "properties": [
-        {
-          "name": "formHandlerClass",
-          "isAttr": true,
-          "type": "String"
-        },
-        {
-          "name": "formKey",
-          "isAttr": true,
-          "type": "String"
-        }
-      ]
-    },
-    {
-      "name": "TemplateSupported",
-      "isAbstract": true,
-      "extends": [
-        "bpmn:Process",
-        "bpmn:FlowElement"
-      ],
-      "properties": [
-        {
-          "name": "modelerTemplate",
-          "isAttr": true,
-          "type": "String"
-        }
-      ]
-    },
-    {
-      "name": "Initiator",
-      "isAbstract": true,
-      "extends": [ "bpmn:StartEvent" ],
-      "properties": [
-        {
-          "name": "initiator",
-          "isAttr": true,
-          "type": "String"
-        }
-      ]
-    },
-    {
-      "name": "ScriptTask",
-      "isAbstract": true,
-      "extends": [
-        "bpmn:ScriptTask"
-      ],
-      "properties": [
-        {
-          "name": "resultVariable",
-          "isAttr": true,
-          "type": "String"
-        },
-        {
-          "name": "resource",
-          "isAttr": true,
-          "type": "String"
-        }
-      ]
-    },
-    {
-      "name": "Process",
-      "isAbstract": true,
-      "extends": [
-        "bpmn:Process"
-      ],
-      "properties": [
-        {
-          "name": "candidateStarterGroups",
-          "isAttr": true,
-          "type": "String"
-        },
-        {
-          "name": "candidateStarterUsers",
-          "isAttr": true,
-          "type": "String"
-        },
-        {
-          "name": "versionTag",
-          "isAttr": true,
-          "type": "String"
-        },
-        {
-          "name": "historyTimeToLive",
-          "isAttr": true,
-          "type": "String"
-        },
-        {
-          "name": "isStartableInTasklist",
-          "isAttr": true,
-          "type": "Boolean",
-          "default": true
-        },
-        {
-          "name":"executionListener",
-          "isAbstract": true,
-          "type":"Expression"
-        }
-      ]
-    },
-    {
-      "name": "EscalationEventDefinition",
-      "isAbstract": true,
-      "extends": [
-        "bpmn:EscalationEventDefinition"
-      ],
-      "properties": [
-        {
-          "name": "escalationCodeVariable",
-          "isAttr": true,
-          "type": "String"
-        }
-      ]
-    },
-    {
-      "name": "FormalExpression",
-      "isAbstract": true,
-      "extends": [
-        "bpmn:FormalExpression"
-      ],
-      "properties": [
-        {
-          "name": "resource",
-          "isAttr": true,
-          "type": "String"
-        }
-      ]
-    },
-    {
-      "name": "multiinstance_type",
-      "superClass":[
-        "Element"
-      ]
-    },
-    {
-      "name": "multiinstance_condition",
-      "superClass":[
-        "Element"
-      ]
-    },
-    {
-      "name": "Assignable",
-      "extends": [ "bpmn:UserTask" ],
-      "properties": [
-        {
-          "name": "assignee",
-          "isAttr": true,
-          "type": "String"
-        },
-        {
-          "name": "candidateUsers",
-          "isAttr": true,
-          "type": "String"
-        },
-        {
-          "name": "candidateGroups",
-          "isAttr": true,
-          "type": "String"
-        },
-        {
-          "name": "dueDate",
-          "isAttr": true,
-          "type": "String"
-        },
-        {
-          "name": "followUpDate",
-          "isAttr": true,
-          "type": "String"
-        },
-        {
-          "name": "priority",
-          "isAttr": true,
-          "type": "String"
-        },
-        {
-          "name": "multiinstance_condition",
-          "isAttr": true,
-          "type": "String"
-        }
-      ]
-    },
-    {
-      "name": "CallActivity",
-      "extends": [ "bpmn:CallActivity" ],
-      "properties": [
-        {
-          "name": "calledElementBinding",
-          "isAttr": true,
-          "type": "String",
-          "default": "latest"
-        },
-        {
-          "name": "calledElementVersion",
-          "isAttr": true,
-          "type": "String"
-        },
-        {
-          "name": "calledElementVersionTag",
-          "isAttr": true,
-          "type": "String"
-        },
-        {
-          "name": "calledElementTenantId",
-          "isAttr": true,
-          "type": "String"
-        },
-        {
-          "name": "caseRef",
-          "isAttr": true,
-          "type": "String"
-        },
-        {
-          "name": "caseBinding",
-          "isAttr": true,
-          "type": "String",
-          "default": "latest"
-        },
-        {
-          "name": "caseVersion",
-          "isAttr": true,
-          "type": "String"
-        },
-        {
-          "name": "caseTenantId",
-          "isAttr": true,
-          "type": "String"
-        },
-        {
-          "name": "variableMappingClass",
-          "isAttr": true,
-          "type": "String"
-        },
-        {
-          "name": "variableMappingDelegateExpression",
-          "isAttr": true,
-          "type": "String"
-        }
-      ]
-    },
-    {
-      "name": "ServiceTaskLike",
-      "extends": [
-        "bpmn:ServiceTask",
-        "bpmn:BusinessRuleTask",
-        "bpmn:SendTask",
-        "bpmn:MessageEventDefinition"
-      ],
-      "properties": [
-        {
-          "name": "expression",
-          "isAttr": true,
-          "type": "String"
-        },
-        {
-          "name": "class",
-          "isAttr": true,
-          "type": "String"
-        },
-        {
-          "name": "delegateExpression",
-          "isAttr": true,
-          "type": "String"
-        },
-        {
-          "name": "resultVariable",
-          "isAttr": true,
-          "type": "String"
-        }
-      ]
-    },
-    {
-      "name": "DmnCapable",
-      "extends": [
-        "bpmn:BusinessRuleTask"
-      ],
-      "properties": [
-        {
-          "name": "decisionRef",
-          "isAttr": true,
-          "type": "String"
-        },
-        {
-          "name": "decisionRefBinding",
-          "isAttr": true,
-          "type": "String",
-          "default": "latest"
-        },
-        {
-          "name": "decisionRefVersion",
-          "isAttr": true,
-          "type": "String"
-        },
-        {
-          "name": "mapDecisionResult",
-          "isAttr": true,
-          "type": "String",
-          "default": "resultList"
-        },
-        {
-          "name": "decisionRefTenantId",
-          "isAttr": true,
-          "type": "String"
-        }
-      ]
-    },
-    {
-      "name": "ExternalCapable",
-      "extends": [
-        "activiti:ServiceTaskLike"
-      ],
-      "properties": [
-        {
-          "name": "type",
-          "isAttr": true,
-          "type": "String"
-        },
-        {
-          "name": "topic",
-          "isAttr": true,
-          "type": "String"
-        }
-      ]
-    },
-    {
-      "name": "TaskPriorized",
-      "extends": [
-        "bpmn:Process",
-        "activiti:ExternalCapable"
-      ],
-      "properties": [
-        {
-          "name": "taskPriority",
-          "isAttr": true,
-          "type": "String"
-        }
-      ]
-    },
-    {
-      "name": "Properties",
-      "superClass": [
-        "Element"
-      ],
-      "meta": {
-        "allowedIn": [ "*" ]
-      },
-      "properties": [
-        {
-          "name": "values",
-          "type": "Property",
-          "isMany": true
-        }
-      ]
-    },
-    {
-      "name": "Property",
-      "superClass": [
-        "Element"
-      ],
-      "properties": [
-        {
-          "name": "id",
-          "type": "String",
-          "isAttr": true
-        },
-        {
-          "name": "name",
-          "type": "String",
-          "isAttr": true
-        },
-        {
-          "name": "value",
-          "type": "String",
-          "isAttr": true
-        }
-      ]
-    },
-    {
-      "name": "Connector",
-      "superClass": [
-        "Element"
-      ],
-      "meta": {
-        "allowedIn": [
-          "activiti:ServiceTaskLike"
-        ]
-      },
-      "properties": [
-        {
-          "name": "inputOutput",
-          "type": "InputOutput"
-        },
-        {
-          "name": "connectorId",
-          "type": "String"
-        }
-      ]
-    },
-    {
-      "name": "InputOutput",
-      "superClass": [
-        "Element"
-      ],
-      "meta": {
-        "allowedIn": [
-          "bpmn:FlowNode",
-          "activiti:Connector"
-        ]
-      },
-      "properties": [
-        {
-          "name": "inputOutput",
-          "type": "InputOutput"
-        },
-        {
-          "name": "connectorId",
-          "type": "String"
-        },
-        {
-          "name": "inputParameters",
-          "isMany": true,
-          "type": "InputParameter"
-        },
-        {
-          "name": "outputParameters",
-          "isMany": true,
-          "type": "OutputParameter"
-        }
-      ]
-    },
-    {
-      "name": "InputOutputParameter",
-      "properties": [
-        {
-          "name": "name",
-          "isAttr": true,
-          "type": "String"
-        },
-        {
-          "name": "value",
-          "isBody": true,
-          "type": "String"
-        },
-        {
-          "name": "definition",
-          "type": "InputOutputParameterDefinition"
-        }
-      ]
-    },
-    {
-      "name": "InputOutputParameterDefinition",
-      "isAbstract": true
-    },
-    {
-      "name": "List",
-      "superClass": [ "InputOutputParameterDefinition" ],
-      "properties": [
-        {
-          "name": "items",
-          "isMany": true,
-          "type": "InputOutputParameterDefinition"
-        }
-      ]
-    },
-    {
-      "name": "Map",
-      "superClass": [ "InputOutputParameterDefinition" ],
-      "properties": [
-        {
-          "name": "entries",
-          "isMany": true,
-          "type": "Entry"
-        }
-      ]
-    },
-    {
-      "name": "Entry",
-      "properties": [
-        {
-          "name": "key",
-          "isAttr": true,
-          "type": "String"
-        },
-        {
-          "name": "value",
-          "isBody": true,
-          "type": "String"
-        },
-        {
-          "name": "definition",
-          "type": "InputOutputParameterDefinition"
-        }
-      ]
-    },
-    {
-      "name": "Value",
-      "superClass": [
-        "InputOutputParameterDefinition"
-      ],
-      "properties": [
-        {
-          "name": "id",
-          "isAttr": true,
-          "type": "String"
-        },
-        {
-          "name": "name",
-          "isAttr": true,
-          "type": "String"
-        },
-        {
-          "name": "value",
-          "isBody": true,
-          "type": "String"
-        }
-      ]
-    },
-    {
-      "name": "Script",
-      "superClass": [ "InputOutputParameterDefinition" ],
-      "properties": [
-        {
-          "name": "scriptFormat",
-          "isAttr": true,
-          "type": "String"
-        },
-        {
-          "name": "resource",
-          "isAttr": true,
-          "type": "String"
-        },
-        {
-          "name": "value",
-          "isBody": true,
-          "type": "String"
-        }
-      ]
-    },
-    {
-      "name": "Field",
-      "superClass": [ "Element" ],
-      "meta": {
-        "allowedIn": [
-          "activiti:ServiceTaskLike",
-          "activiti:ExecutionListener",
-          "activiti:TaskListener"
-        ]
-      },
-      "properties": [
-        {
-          "name": "name",
-          "isAttr": true,
-          "type": "String"
-        },
-        {
-          "name": "expression",
-          "type": "String"
-        },
-        {
-          "name": "stringValue",
-          "isAttr": true,
-          "type": "String"
-        },
-        {
-          "name": "string",
-          "type": "String"
-        }
-      ]
-    },
-    {
-      "name": "InputParameter",
-      "superClass": [ "InputOutputParameter" ]
-    },
-    {
-      "name": "OutputParameter",
-      "superClass": [ "InputOutputParameter" ]
-    },
-    {
-      "name": "Collectable",
-      "isAbstract": true,
-      "extends": [ "bpmn:MultiInstanceLoopCharacteristics" ],
-      "superClass": [ "activiti:AsyncCapable" ],
-      "properties": [
-        {
-          "name": "collection",
-          "isAttr": true,
-          "type": "String"
-        },
-        {
-          "name": "elementVariable",
-          "isAttr": true,
-          "type": "String"
-        }
-      ]
-    },
-    {
-      "name": "FailedJobRetryTimeCycle",
-      "superClass": [ "Element" ],
-      "meta": {
-        "allowedIn": [
-          "activiti:AsyncCapable",
-          "bpmn:MultiInstanceLoopCharacteristics"
-        ]
-      },
-      "properties": [
-        {
-          "name": "body",
-          "isBody": true,
-          "type": "String"
-        }
-      ]
-    },
-    {
-      "name": "ExecutionListener",
-      "superClass": [ "Element" ],
-      "meta": {
-        "allowedIn": [
-          "bpmn:Task",
-          "bpmn:ServiceTask",
-          "bpmn:UserTask",
-          "bpmn:BusinessRuleTask",
-          "bpmn:ScriptTask",
-          "bpmn:ReceiveTask",
-          "bpmn:ManualTask",
-          "bpmn:ExclusiveGateway",
-          "bpmn:SequenceFlow",
-          "bpmn:ParallelGateway",
-          "bpmn:InclusiveGateway",
-          "bpmn:EventBasedGateway",
-          "bpmn:StartEvent",
-          "bpmn:IntermediateCatchEvent",
-          "bpmn:IntermediateThrowEvent",
-          "bpmn:EndEvent",
-          "bpmn:BoundaryEvent",
-          "bpmn:CallActivity",
-          "bpmn:SubProcess",
-          "bpmn:Process"
-        ]
-      },
-      "properties": [
-        {
-          "name": "expression",
-          "isAttr": true,
-          "type": "String"
-        },
-        {
-          "name": "class",
-          "isAttr": true,
-          "type": "String"
-        },
-        {
-          "name": "delegateExpression",
-          "isAttr": true,
-          "type": "String"
-        },
-        {
-          "name": "event",
-          "isAttr": true,
-          "type": "String"
-        },
-        {
-          "name": "script",
-          "type": "Script"
-        },
-        {
-          "name": "fields",
-          "type": "Field",
-          "isMany": true
-        }
-      ]
-    },
-    {
-      "name": "TaskListener",
-      "superClass": [ "Element" ],
-      "meta": {
-        "allowedIn": [
-          "bpmn:UserTask"
-        ]
-      },
-      "properties": [
-        {
-          "name": "expression",
-          "isAttr": true,
-          "type": "String"
-        },
-        {
-          "name": "class",
-          "isAttr": true,
-          "type": "String"
-        },
-        {
-          "name": "delegateExpression",
-          "isAttr": true,
-          "type": "String"
-        },
-        {
-          "name": "event",
-          "isAttr": true,
-          "type": "String"
-        },
-        {
-          "name": "script",
-          "type": "Script"
-        },
-        {
-          "name": "fields",
-          "type": "Field",
-          "isMany": true
-        }
-      ]
-    },
-    {
-      "name": "FormProperty",
-      "superClass": [ "Element" ],
-      "meta": {
-        "allowedIn": [
-          "bpmn:StartEvent",
-          "bpmn:UserTask"
-        ]
-      },
-      "properties": [
-        {
-          "name": "id",
-          "type": "String",
-          "isAttr": true
-        },
-        {
-          "name": "name",
-          "type": "String",
-          "isAttr": true
-        },
-        {
-          "name": "type",
-          "type": "String",
-          "isAttr": true
-        },
-        {
-          "name": "required",
-          "type": "String",
-          "isAttr": true
-        },
-        {
-          "name": "readable",
-          "type": "String",
-          "isAttr": true
-        },
-        {
-          "name": "writable",
-          "type": "String",
-          "isAttr": true
-        },
-        {
-          "name": "variable",
-          "type": "String",
-          "isAttr": true
-        },
-        {
-          "name": "expression",
-          "type": "String",
-          "isAttr": true
-        },
-        {
-          "name": "datePattern",
-          "type": "String",
-          "isAttr": true
-        },
-        {
-          "name": "default",
-          "type": "String",
-          "isAttr": true
-        },
-        {
-          "name": "values",
-          "type": "Value",
-          "isMany": true
-        }
-      ]
-    },
-    {
-      "name": "FormProperty",
-      "superClass": [ "Element" ],
-      "properties": [
-        {
-          "name": "id",
-          "type": "String",
-          "isAttr": true
-        },
-        {
-          "name": "label",
-          "type": "String",
-          "isAttr": true
-        },
-        {
-          "name": "type",
-          "type": "String",
-          "isAttr": true
-        },
-        {
-          "name": "datePattern",
-          "type": "String",
-          "isAttr": true
-        },
-        {
-          "name": "defaultValue",
-          "type": "String",
-          "isAttr": true
-        },
-        {
-          "name": "properties",
-          "type": "Properties"
-        },
-        {
-          "name": "validation",
-          "type": "Validation"
-        },
-        {
-          "name": "values",
-          "type": "Value",
-          "isMany": true
-        }
-      ]
-    },
-    {
-      "name": "Validation",
-      "superClass": [ "Element" ],
-      "properties": [
-        {
-          "name": "constraints",
-          "type": "Constraint",
-          "isMany": true
-        }
-      ]
-    },
-    {
-      "name": "Constraint",
-      "superClass": [ "Element" ],
-      "properties": [
-        {
-          "name": "name",
-          "type": "String",
-          "isAttr": true
-        },
-        {
-          "name": "config",
-          "type": "String",
-          "isAttr": true
-        }
-      ]
-    },
-    {
-      "name": "ConditionalEventDefinition",
-      "isAbstract": true,
-      "extends": [
-        "bpmn:ConditionalEventDefinition"
-      ],
-      "properties": [
-        {
-          "name": "variableName",
-          "isAttr": true,
-          "type": "String"
-        },
-        {
-          "name": "variableEvent",
-          "isAttr": true,
-          "type": "String"
-        }
-      ]
-    }
-  ],
-  "emumerations": [ ]
-}

+ 0 - 1087
src/components/ren-flowable/package/designer/plugins/descriptor/camundaDescriptor.json

@@ -1,1087 +0,0 @@
-{
-  "name": "Camunda",
-  "uri": "http://camunda.org/schema/1.0/bpmn",
-  "prefix": "camunda",
-  "xml": {
-    "tagAlias": "lowerCase"
-  },
-  "associations": [],
-  "types": [
-    {
-      "name": "Definitions",
-      "isAbstract": true,
-      "extends": [
-        "bpmn:Definitions"
-      ],
-      "properties": [
-        {
-          "name": "diagramRelationId",
-          "isAttr": true,
-          "type": "String"
-        }
-      ]
-    },
-    {
-      "name": "InOutBinding",
-      "superClass": [
-        "Element"
-      ],
-      "isAbstract": true,
-      "properties": [
-        {
-          "name": "source",
-          "isAttr": true,
-          "type": "String"
-        },
-        {
-          "name": "sourceExpression",
-          "isAttr": true,
-          "type": "String"
-        },
-        {
-          "name": "target",
-          "isAttr": true,
-          "type": "String"
-        },
-        {
-          "name": "businessKey",
-          "isAttr": true,
-          "type": "String"
-        },
-        {
-          "name": "local",
-          "isAttr": true,
-          "type": "Boolean",
-          "default": false
-        },
-        {
-          "name": "variables",
-          "isAttr": true,
-          "type": "String"
-        }
-      ]
-    },
-    {
-      "name": "In",
-      "superClass": [
-        "InOutBinding"
-      ],
-      "meta": {
-        "allowedIn": [
-          "bpmn:CallActivity",
-          "bpmn:SignalEventDefinition"
-        ]
-      }
-    },
-    {
-      "name": "Out",
-      "superClass": [
-        "InOutBinding"
-      ],
-      "meta": {
-        "allowedIn": [
-          "bpmn:CallActivity"
-        ]
-      }
-    },
-    {
-      "name": "AsyncCapable",
-      "isAbstract": true,
-      "extends": [
-        "bpmn:Activity",
-        "bpmn:Gateway",
-        "bpmn:Event"
-      ],
-      "properties": [
-        {
-          "name": "async",
-          "isAttr": true,
-          "type": "Boolean",
-          "default": false
-        },
-        {
-          "name": "asyncBefore",
-          "isAttr": true,
-          "type": "Boolean",
-          "default": false
-        },
-        {
-          "name": "asyncAfter",
-          "isAttr": true,
-          "type": "Boolean",
-          "default": false
-        },
-        {
-          "name": "exclusive",
-          "isAttr": true,
-          "type": "Boolean",
-          "default": true
-        }
-      ]
-    },
-    {
-      "name": "JobPriorized",
-      "isAbstract": true,
-      "extends": [
-        "bpmn:Process",
-        "camunda:AsyncCapable"
-      ],
-      "properties": [
-        {
-          "name": "jobPriority",
-          "isAttr": true,
-          "type": "String"
-        }
-      ]
-    },
-    {
-      "name": "SignalEventDefinition",
-      "isAbstract": true,
-      "extends": [
-        "bpmn:SignalEventDefinition"
-      ],
-      "properties": [
-        {
-          "name": "async",
-          "isAttr": true,
-          "type": "Boolean",
-          "default": false
-        }
-      ]
-    },
-    {
-      "name": "ErrorEventDefinition",
-      "isAbstract": true,
-      "extends": [
-        "bpmn:ErrorEventDefinition"
-      ],
-      "properties": [
-        {
-          "name": "errorCodeVariable",
-          "isAttr": true,
-          "type": "String"
-        },
-        {
-          "name": "errorMessageVariable",
-          "isAttr": true,
-          "type": "String"
-        }
-      ]
-    },
-    {
-      "name": "Error",
-      "isAbstract": true,
-      "extends": [
-        "bpmn:Error"
-      ],
-      "properties": [
-        {
-          "name": "camunda:errorMessage",
-          "isAttr": true,
-          "type": "String"
-        }
-      ]
-    },
-    {
-      "name": "PotentialStarter",
-      "superClass": [
-        "Element"
-      ],
-      "properties": [
-        {
-          "name": "resourceAssignmentExpression",
-          "type": "bpmn:ResourceAssignmentExpression"
-        }
-      ]
-    },
-    {
-      "name": "FormSupported",
-      "isAbstract": true,
-      "extends": [
-        "bpmn:StartEvent",
-        "bpmn:UserTask"
-      ],
-      "properties": [
-        {
-          "name": "formHandlerClass",
-          "isAttr": true,
-          "type": "String"
-        },
-        {
-          "name": "formKey",
-          "isAttr": true,
-          "type": "String"
-        }
-      ]
-    },
-    {
-      "name": "TemplateSupported",
-      "isAbstract": true,
-      "extends": [
-        "bpmn:Process",
-        "bpmn:FlowElement"
-      ],
-      "properties": [
-        {
-          "name": "modelerTemplate",
-          "isAttr": true,
-          "type": "String"
-        },
-        {
-          "name": "modelerTemplateVersion",
-          "isAttr": true,
-          "type": "Integer"
-        }
-      ]
-    },
-    {
-      "name": "Initiator",
-      "isAbstract": true,
-      "extends": [ "bpmn:StartEvent" ],
-      "properties": [
-        {
-          "name": "initiator",
-          "isAttr": true,
-          "type": "String"
-        }
-      ]
-    },
-    {
-      "name": "ScriptTask",
-      "isAbstract": true,
-      "extends": [
-        "bpmn:ScriptTask"
-      ],
-      "properties": [
-        {
-          "name": "resultVariable",
-          "isAttr": true,
-          "type": "String"
-        },
-        {
-          "name": "resource",
-          "isAttr": true,
-          "type": "String"
-        }
-      ]
-    },
-    {
-      "name": "Process",
-      "isAbstract": true,
-      "extends": [
-        "bpmn:Process"
-      ],
-      "properties": [
-        {
-          "name": "candidateStarterGroups",
-          "isAttr": true,
-          "type": "String"
-        },
-        {
-          "name": "candidateStarterUsers",
-          "isAttr": true,
-          "type": "String"
-        },
-        {
-          "name": "versionTag",
-          "isAttr": true,
-          "type": "String"
-        },
-        {
-          "name": "historyTimeToLive",
-          "isAttr": true,
-          "type": "String"
-        },
-        {
-          "name": "isStartableInTasklist",
-          "isAttr": true,
-          "type": "Boolean",
-          "default": true
-        }
-      ]
-    },
-    {
-      "name": "EscalationEventDefinition",
-      "isAbstract": true,
-      "extends": [
-        "bpmn:EscalationEventDefinition"
-      ],
-      "properties": [
-        {
-          "name": "escalationCodeVariable",
-          "isAttr": true,
-          "type": "String"
-        }
-      ]
-    },
-    {
-      "name": "FormalExpression",
-      "isAbstract": true,
-      "extends": [
-        "bpmn:FormalExpression"
-      ],
-      "properties": [
-        {
-          "name": "resource",
-          "isAttr": true,
-          "type": "String"
-        }
-      ]
-    },
-    {
-      "name": "Assignable",
-      "extends": [ "bpmn:UserTask" ],
-      "properties": [
-        {
-          "name": "assignee",
-          "isAttr": true,
-          "type": "String"
-        },
-        {
-          "name": "candidateUsers",
-          "isAttr": true,
-          "type": "String"
-        },
-        {
-          "name": "candidateGroups",
-          "isAttr": true,
-          "type": "String"
-        },
-        {
-          "name": "dueDate",
-          "isAttr": true,
-          "type": "String"
-        },
-        {
-          "name": "followUpDate",
-          "isAttr": true,
-          "type": "String"
-        },
-        {
-          "name": "priority",
-          "isAttr": true,
-          "type": "String"
-        }
-      ]
-    },
-    {
-      "name": "CallActivity",
-      "extends": [ "bpmn:CallActivity" ],
-      "properties": [
-        {
-          "name": "calledElementBinding",
-          "isAttr": true,
-          "type": "String",
-          "default": "latest"
-        },
-        {
-          "name": "calledElementVersion",
-          "isAttr": true,
-          "type": "String"
-        },
-        {
-          "name": "calledElementVersionTag",
-          "isAttr": true,
-          "type": "String"
-        },
-        {
-          "name": "calledElementTenantId",
-          "isAttr": true,
-          "type": "String"
-        },
-        {
-          "name": "caseRef",
-          "isAttr": true,
-          "type": "String"
-        },
-        {
-          "name": "caseBinding",
-          "isAttr": true,
-          "type": "String",
-          "default": "latest"
-        },
-        {
-          "name": "caseVersion",
-          "isAttr": true,
-          "type": "String"
-        },
-        {
-          "name": "caseTenantId",
-          "isAttr": true,
-          "type": "String"
-        },
-        {
-          "name": "variableMappingClass",
-          "isAttr": true,
-          "type": "String"
-        },
-        {
-          "name": "variableMappingDelegateExpression",
-          "isAttr": true,
-          "type": "String"
-        }
-      ]
-    },
-    {
-      "name": "ServiceTaskLike",
-      "extends": [
-        "bpmn:ServiceTask",
-        "bpmn:BusinessRuleTask",
-        "bpmn:SendTask",
-        "bpmn:MessageEventDefinition"
-      ],
-      "properties": [
-        {
-          "name": "expression",
-          "isAttr": true,
-          "type": "String"
-        },
-        {
-          "name": "class",
-          "isAttr": true,
-          "type": "String"
-        },
-        {
-          "name": "delegateExpression",
-          "isAttr": true,
-          "type": "String"
-        },
-        {
-          "name": "resultVariable",
-          "isAttr": true,
-          "type": "String"
-        }
-      ]
-    },
-    {
-      "name": "DmnCapable",
-      "extends": [
-        "bpmn:BusinessRuleTask"
-      ],
-      "properties": [
-        {
-          "name": "decisionRef",
-          "isAttr": true,
-          "type": "String"
-        },
-        {
-          "name": "decisionRefBinding",
-          "isAttr": true,
-          "type": "String",
-          "default": "latest"
-        },
-        {
-          "name": "decisionRefVersion",
-          "isAttr": true,
-          "type": "String"
-        },
-        {
-          "name": "mapDecisionResult",
-          "isAttr": true,
-          "type": "String",
-          "default": "resultList"
-        },
-        {
-          "name": "decisionRefTenantId",
-          "isAttr": true,
-          "type": "String"
-        }
-      ]
-    },
-    {
-      "name": "ExternalCapable",
-      "extends": [
-        "camunda:ServiceTaskLike"
-      ],
-      "properties": [
-        {
-          "name": "type",
-          "isAttr": true,
-          "type": "String"
-        },
-        {
-          "name": "topic",
-          "isAttr": true,
-          "type": "String"
-        }
-      ]
-    },
-    {
-      "name": "TaskPriorized",
-      "extends": [
-        "bpmn:Process",
-        "camunda:ExternalCapable"
-      ],
-      "properties": [
-        {
-          "name": "taskPriority",
-          "isAttr": true,
-          "type": "String"
-        }
-      ]
-    },
-    {
-      "name": "Properties",
-      "superClass": [
-        "Element"
-      ],
-      "meta": {
-        "allowedIn": [ "*" ]
-      },
-      "properties": [
-        {
-          "name": "values",
-          "type": "Property",
-          "isMany": true
-        }
-      ]
-    },
-    {
-      "name": "Property",
-      "superClass": [
-        "Element"
-      ],
-      "properties": [
-        {
-          "name": "id",
-          "type": "String",
-          "isAttr": true
-        },
-        {
-          "name": "name",
-          "type": "String",
-          "isAttr": true
-        },
-        {
-          "name": "value",
-          "type": "String",
-          "isAttr": true
-        }
-      ]
-    },
-    {
-      "name": "Connector",
-      "superClass": [
-        "Element"
-      ],
-      "meta": {
-        "allowedIn": [
-          "camunda:ServiceTaskLike"
-        ]
-      },
-      "properties": [
-        {
-          "name": "inputOutput",
-          "type": "InputOutput"
-        },
-        {
-          "name": "connectorId",
-          "type": "String"
-        }
-      ]
-    },
-    {
-      "name": "InputOutput",
-      "superClass": [
-        "Element"
-      ],
-      "meta": {
-        "allowedIn": [
-          "bpmn:FlowNode",
-          "camunda:Connector"
-        ]
-      },
-      "properties": [
-        {
-          "name": "inputOutput",
-          "type": "InputOutput"
-        },
-        {
-          "name": "connectorId",
-          "type": "String"
-        },
-        {
-          "name": "inputParameters",
-          "isMany": true,
-          "type": "InputParameter"
-        },
-        {
-          "name": "outputParameters",
-          "isMany": true,
-          "type": "OutputParameter"
-        }
-      ]
-    },
-    {
-      "name": "InputOutputParameter",
-      "properties": [
-        {
-          "name": "name",
-          "isAttr": true,
-          "type": "String"
-        },
-        {
-          "name": "value",
-          "isBody": true,
-          "type": "String"
-        },
-        {
-          "name": "definition",
-          "type": "InputOutputParameterDefinition"
-        }
-      ]
-    },
-    {
-      "name": "InputOutputParameterDefinition",
-      "isAbstract": true
-    },
-    {
-      "name": "List",
-      "superClass": [ "InputOutputParameterDefinition" ],
-      "properties": [
-        {
-          "name": "items",
-          "isMany": true,
-          "type": "InputOutputParameterDefinition"
-        }
-      ]
-    },
-    {
-      "name": "Map",
-      "superClass": [ "InputOutputParameterDefinition" ],
-      "properties": [
-        {
-          "name": "entries",
-          "isMany": true,
-          "type": "Entry"
-        }
-      ]
-    },
-    {
-      "name": "Entry",
-      "properties": [
-        {
-          "name": "key",
-          "isAttr": true,
-          "type": "String"
-        },
-        {
-          "name": "value",
-          "isBody": true,
-          "type": "String"
-        },
-        {
-          "name": "definition",
-          "type": "InputOutputParameterDefinition"
-        }
-      ]
-    },
-    {
-      "name": "Value",
-      "superClass": [
-        "InputOutputParameterDefinition"
-      ],
-      "properties": [
-        {
-          "name": "id",
-          "isAttr": true,
-          "type": "String"
-        },
-        {
-          "name": "name",
-          "isAttr": true,
-          "type": "String"
-        },
-        {
-          "name": "value",
-          "isBody": true,
-          "type": "String"
-        }
-      ]
-    },
-    {
-      "name": "Script",
-      "superClass": [ "InputOutputParameterDefinition" ],
-      "properties": [
-        {
-          "name": "scriptFormat",
-          "isAttr": true,
-          "type": "String"
-        },
-        {
-          "name": "resource",
-          "isAttr": true,
-          "type": "String"
-        },
-        {
-          "name": "value",
-          "isBody": true,
-          "type": "String"
-        }
-      ]
-    },
-    {
-      "name": "Field",
-      "superClass": [ "Element" ],
-      "meta": {
-        "allowedIn": [
-          "camunda:ServiceTaskLike",
-          "camunda:ExecutionListener",
-          "camunda:TaskListener"
-        ]
-      },
-      "properties": [
-        {
-          "name": "name",
-          "isAttr": true,
-          "type": "String"
-        },
-        {
-          "name": "expression",
-          "type": "String"
-        },
-        {
-          "name": "stringValue",
-          "isAttr": true,
-          "type": "String"
-        },
-        {
-          "name": "string",
-          "type": "String"
-        }
-      ]
-    },
-    {
-      "name": "InputParameter",
-      "superClass": [ "InputOutputParameter" ]
-    },
-    {
-      "name": "OutputParameter",
-      "superClass": [ "InputOutputParameter" ]
-    },
-    {
-      "name": "Collectable",
-      "isAbstract": true,
-      "extends": [ "bpmn:MultiInstanceLoopCharacteristics" ],
-      "superClass": [ "camunda:AsyncCapable" ],
-      "properties": [
-        {
-          "name": "collection",
-          "isAttr": true,
-          "type": "String"
-        },
-        {
-          "name": "elementVariable",
-          "isAttr": true,
-          "type": "String"
-        }
-      ]
-    },
-    {
-      "name": "FailedJobRetryTimeCycle",
-      "superClass": [ "Element" ],
-      "meta": {
-        "allowedIn": [
-          "camunda:AsyncCapable",
-          "bpmn:MultiInstanceLoopCharacteristics"
-        ]
-      },
-      "properties": [
-        {
-          "name": "body",
-          "isBody": true,
-          "type": "String"
-        }
-      ]
-    },
-    {
-      "name": "ExecutionListener",
-      "superClass": [ "Element" ],
-      "meta": {
-        "allowedIn": [
-          "bpmn:Task",
-          "bpmn:ServiceTask",
-          "bpmn:UserTask",
-          "bpmn:BusinessRuleTask",
-          "bpmn:ScriptTask",
-          "bpmn:ReceiveTask",
-          "bpmn:ManualTask",
-          "bpmn:ExclusiveGateway",
-          "bpmn:SequenceFlow",
-          "bpmn:ParallelGateway",
-          "bpmn:InclusiveGateway",
-          "bpmn:EventBasedGateway",
-          "bpmn:StartEvent",
-          "bpmn:IntermediateCatchEvent",
-          "bpmn:IntermediateThrowEvent",
-          "bpmn:EndEvent",
-          "bpmn:BoundaryEvent",
-          "bpmn:CallActivity",
-          "bpmn:SubProcess",
-          "bpmn:Process"
-        ]
-      },
-      "properties": [
-        {
-          "name": "expression",
-          "isAttr": true,
-          "type": "String"
-        },
-        {
-          "name": "class",
-          "isAttr": true,
-          "type": "String"
-        },
-        {
-          "name": "delegateExpression",
-          "isAttr": true,
-          "type": "String"
-        },
-        {
-          "name": "event",
-          "isAttr": true,
-          "type": "String"
-        },
-        {
-          "name": "script",
-          "type": "Script"
-        },
-        {
-          "name": "fields",
-          "type": "Field",
-          "isMany": true
-        }
-      ]
-    },
-    {
-      "name": "TaskListener",
-      "superClass": [ "Element" ],
-      "meta": {
-        "allowedIn": [
-          "bpmn:UserTask"
-        ]
-      },
-      "properties": [
-        {
-          "name": "expression",
-          "isAttr": true,
-          "type": "String"
-        },
-        {
-          "name": "class",
-          "isAttr": true,
-          "type": "String"
-        },
-        {
-          "name": "delegateExpression",
-          "isAttr": true,
-          "type": "String"
-        },
-        {
-          "name": "event",
-          "isAttr": true,
-          "type": "String"
-        },
-        {
-          "name": "script",
-          "type": "Script"
-        },
-        {
-          "name": "fields",
-          "type": "Field",
-          "isMany": true
-        },
-        {
-          "name": "id",
-          "type": "String",
-          "isAttr": true
-        },
-        {
-          "name": "eventDefinitions",
-          "type": "bpmn:TimerEventDefinition",
-          "isMany": true
-        }
-      ]
-    },
-    {
-      "name": "FormProperty",
-      "superClass": [ "Element" ],
-      "meta": {
-        "allowedIn": [
-          "bpmn:StartEvent",
-          "bpmn:UserTask"
-        ]
-      },
-      "properties": [
-        {
-          "name": "id",
-          "type": "String",
-          "isAttr": true
-        },
-        {
-          "name": "name",
-          "type": "String",
-          "isAttr": true
-        },
-        {
-          "name": "type",
-          "type": "String",
-          "isAttr": true
-        },
-        {
-          "name": "required",
-          "type": "String",
-          "isAttr": true
-        },
-        {
-          "name": "readable",
-          "type": "String",
-          "isAttr": true
-        },
-        {
-          "name": "writable",
-          "type": "String",
-          "isAttr": true
-        },
-        {
-          "name": "variable",
-          "type": "String",
-          "isAttr": true
-        },
-        {
-          "name": "expression",
-          "type": "String",
-          "isAttr": true
-        },
-        {
-          "name": "datePattern",
-          "type": "String",
-          "isAttr": true
-        },
-        {
-          "name": "default",
-          "type": "String",
-          "isAttr": true
-        },
-        {
-          "name": "values",
-          "type": "Value",
-          "isMany": true
-        }
-      ]
-    },
-    {
-      "name": "FormData",
-      "superClass": [ "Element" ],
-      "meta": {
-        "allowedIn": [
-          "bpmn:StartEvent",
-          "bpmn:UserTask"
-        ]
-      },
-      "properties": [
-        {
-          "name": "fields",
-          "type": "FormField",
-          "isMany": true
-        },
-        {
-          "name": "businessKey",
-          "type": "String",
-          "isAttr": true
-        }
-      ]
-    },
-    {
-      "name": "FormField",
-      "superClass": [ "Element" ],
-      "properties": [
-        {
-          "name": "id",
-          "type": "String",
-          "isAttr": true
-        },
-        {
-          "name": "label",
-          "type": "String",
-          "isAttr": true
-        },
-        {
-          "name": "type",
-          "type": "String",
-          "isAttr": true
-        },
-        {
-          "name": "datePattern",
-          "type": "String",
-          "isAttr": true
-        },
-        {
-          "name": "defaultValue",
-          "type": "String",
-          "isAttr": true
-        },
-        {
-          "name": "properties",
-          "type": "Properties"
-        },
-        {
-          "name": "validation",
-          "type": "Validation"
-        },
-        {
-          "name": "values",
-          "type": "Value",
-          "isMany": true
-        }
-      ]
-    },
-    {
-      "name": "Validation",
-      "superClass": [ "Element" ],
-      "properties": [
-        {
-          "name": "constraints",
-          "type": "Constraint",
-          "isMany": true
-        }
-      ]
-    },
-    {
-      "name": "Constraint",
-      "superClass": [ "Element" ],
-      "properties": [
-        {
-          "name": "name",
-          "type": "String",
-          "isAttr": true
-        },
-        {
-          "name": "config",
-          "type": "String",
-          "isAttr": true
-        }
-      ]
-    },
-    {
-      "name": "ConditionalEventDefinition",
-      "isAbstract": true,
-      "extends": [
-        "bpmn:ConditionalEventDefinition"
-      ],
-      "properties": [
-        {
-          "name": "variableName",
-          "isAttr": true,
-          "type": "String"
-        },
-        {
-          "name": "variableEvents",
-          "isAttr": true,
-          "type": "String"
-        }
-      ]
-    }
-  ],
-  "emumerations": [ ]
-}

+ 0 - 1215
src/components/ren-flowable/package/designer/plugins/descriptor/flowableDescriptor.json

@@ -1,1215 +0,0 @@
-{
-  "name": "Flowable",
-  "uri": "http://flowable.org/bpmn",
-  "prefix": "flowable",
-  "xml": {
-    "tagAlias": "lowerCase"
-  },
-  "associations": [],
-  "types": [
-    {
-      "name": "InOutBinding",
-      "superClass": ["Element"],
-      "isAbstract": true,
-      "properties": [
-        {
-          "name": "source",
-          "isAttr": true,
-          "type": "String"
-        },
-        {
-          "name": "sourceExpression",
-          "isAttr": true,
-          "type": "String"
-        },
-        {
-          "name": "target",
-          "isAttr": true,
-          "type": "String"
-        },
-        {
-          "name": "businessKey",
-          "isAttr": true,
-          "type": "String"
-        },
-        {
-          "name": "local",
-          "isAttr": true,
-          "type": "Boolean",
-          "default": false
-        },
-        {
-          "name": "variables",
-          "isAttr": true,
-          "type": "String"
-        }
-      ]
-    },
-    {
-      "name": "In",
-      "superClass": ["InOutBinding"],
-      "meta": {
-        "allowedIn": ["bpmn:CallActivity"]
-      }
-    },
-    {
-      "name": "Out",
-      "superClass": ["InOutBinding"],
-      "meta": {
-        "allowedIn": ["bpmn:CallActivity"]
-      }
-    },
-    {
-      "name": "AsyncCapable",
-      "isAbstract": true,
-      "extends": ["bpmn:Activity", "bpmn:Gateway", "bpmn:Event"],
-      "properties": [
-        {
-          "name": "async",
-          "isAttr": true,
-          "type": "Boolean",
-          "default": false
-        },
-        {
-          "name": "asyncBefore",
-          "isAttr": true,
-          "type": "Boolean",
-          "default": false
-        },
-        {
-          "name": "asyncAfter",
-          "isAttr": true,
-          "type": "Boolean",
-          "default": false
-        },
-        {
-          "name": "exclusive",
-          "isAttr": true,
-          "type": "Boolean",
-          "default": true
-        }
-      ]
-    },
-    {
-      "name": "JobPriorized",
-      "isAbstract": true,
-      "extends": ["bpmn:Process", "flowable:AsyncCapable"],
-      "properties": [
-        {
-          "name": "jobPriority",
-          "isAttr": true,
-          "type": "String"
-        }
-      ]
-    },
-    {
-      "name": "SignalEventDefinition",
-      "isAbstract": true,
-      "extends": ["bpmn:SignalEventDefinition"],
-      "properties": [
-        {
-          "name": "async",
-          "isAttr": true,
-          "type": "Boolean",
-          "default": false
-        }
-      ]
-    },
-    {
-      "name": "ErrorEventDefinition",
-      "isAbstract": true,
-      "extends": ["bpmn:ErrorEventDefinition"],
-      "properties": [
-        {
-          "name": "errorCodeVariable",
-          "isAttr": true,
-          "type": "String"
-        },
-        {
-          "name": "errorMessageVariable",
-          "isAttr": true,
-          "type": "String"
-        }
-      ]
-    },
-    {
-      "name": "Error",
-      "isAbstract": true,
-      "extends": ["bpmn:Error"],
-      "properties": [
-        {
-          "name": "flowable:errorMessage",
-          "isAttr": true,
-          "type": "String"
-        }
-      ]
-    },
-    {
-      "name": "PotentialStarter",
-      "superClass": ["Element"],
-      "properties": [
-        {
-          "name": "resourceAssignmentExpression",
-          "type": "bpmn:ResourceAssignmentExpression"
-        }
-      ]
-    },
-    {
-      "name": "FormSupported",
-      "isAbstract": true,
-      "extends": ["bpmn:StartEvent", "bpmn:UserTask"],
-      "properties": [
-        {
-          "name": "formHandlerClass",
-          "isAttr": true,
-          "type": "String"
-        },
-        {
-          "name": "formKey",
-          "isAttr": true,
-          "type": "String"
-        },
-        {
-          "name": "formType",
-          "isAttr": true,
-          "type": "String"
-        },
-        {
-          "name": "formReadOnly",
-          "isAttr": true,
-          "type": "Boolean",
-          "default": false
-        },
-        {
-          "name": "formInit",
-          "isAttr": true,
-          "type": "Boolean",
-          "default": true
-        }
-      ]
-    },
-    {
-      "name": "TemplateSupported",
-      "isAbstract": true,
-      "extends": ["bpmn:Process", "bpmn:FlowElement"],
-      "properties": [
-        {
-          "name": "modelerTemplate",
-          "isAttr": true,
-          "type": "String"
-        }
-      ]
-    },
-    {
-      "name": "Initiator",
-      "isAbstract": true,
-      "extends": ["bpmn:StartEvent"],
-      "properties": [
-        {
-          "name": "initiator",
-          "isAttr": true,
-          "type": "String"
-        }
-      ]
-    },
-    {
-      "name": "ScriptTask",
-      "isAbstract": true,
-      "extends": ["bpmn:ScriptTask"],
-      "properties": [
-        {
-          "name": "resultVariable",
-          "isAttr": true,
-          "type": "String"
-        },
-        {
-          "name": "resource",
-          "isAttr": true,
-          "type": "String"
-        }
-      ]
-    },
-    {
-      "name": "Process",
-      "isAbstract": true,
-      "extends": ["bpmn:Process"],
-      "properties": [
-        {
-          "name": "candidateStarterGroups",
-          "isAttr": true,
-          "type": "String"
-        },
-        {
-          "name": "candidateStarterUsers",
-          "isAttr": true,
-          "type": "String"
-        },
-        {
-          "name": "versionTag",
-          "isAttr": true,
-          "type": "String"
-        },
-        {
-          "name": "historyTimeToLive",
-          "isAttr": true,
-          "type": "String"
-        },
-        {
-          "name": "isStartableInTasklist",
-          "isAttr": true,
-          "type": "Boolean",
-          "default": true
-        }
-      ]
-    },
-    {
-      "name": "EscalationEventDefinition",
-      "isAbstract": true,
-      "extends": ["bpmn:EscalationEventDefinition"],
-      "properties": [
-        {
-          "name": "escalationCodeVariable",
-          "isAttr": true,
-          "type": "String"
-        }
-      ]
-    },
-    {
-      "name": "FormalExpression",
-      "isAbstract": true,
-      "extends": ["bpmn:FormalExpression"],
-      "properties": [
-        {
-          "name": "resource",
-          "isAttr": true,
-          "type": "String"
-        }
-      ]
-    },
-    {
-      "name": "Assignable",
-      "extends": ["bpmn:UserTask"],
-      "properties": [
-        {
-          "name": "assignee",
-          "isAttr": true,
-          "type": "String"
-        },
-        {
-          "name": "candidateUsers",
-          "isAttr": true,
-          "type": "String"
-        },
-        {
-          "name": "candidateGroups",
-          "isAttr": true,
-          "type": "String"
-        },
-        {
-          "name": "dueDate",
-          "isAttr": true,
-          "type": "String"
-        },
-        {
-          "name": "followUpDate",
-          "isAttr": true,
-          "type": "String"
-        },
-        {
-          "name": "priority",
-          "isAttr": true,
-          "type": "String"
-        }
-      ]
-    },
-    {
-      "name": "Assignee",
-      "supperClass": "Element",
-      "meta": {
-        "allowedIn": ["*"]
-      },
-      "properties": [
-        {
-          "name": "label",
-          "type": "String",
-          "isAttr": true
-        },
-        {
-          "name": "viewId",
-          "type": "Number",
-          "isAttr": true
-        }
-      ]
-    },
-    {
-      "name": "CallActivity",
-      "extends": ["bpmn:CallActivity"],
-      "properties": [
-        {
-          "name": "calledElementBinding",
-          "isAttr": true,
-          "type": "String",
-          "default": "latest"
-        },
-        {
-          "name": "calledElementVersion",
-          "isAttr": true,
-          "type": "String"
-        },
-        {
-          "name": "calledElementVersionTag",
-          "isAttr": true,
-          "type": "String"
-        },
-        {
-          "name": "calledElementTenantId",
-          "isAttr": true,
-          "type": "String"
-        },
-        {
-          "name": "caseRef",
-          "isAttr": true,
-          "type": "String"
-        },
-        {
-          "name": "caseBinding",
-          "isAttr": true,
-          "type": "String",
-          "default": "latest"
-        },
-        {
-          "name": "caseVersion",
-          "isAttr": true,
-          "type": "String"
-        },
-        {
-          "name": "caseTenantId",
-          "isAttr": true,
-          "type": "String"
-        },
-        {
-          "name": "variableMappingClass",
-          "isAttr": true,
-          "type": "String"
-        },
-        {
-          "name": "variableMappingDelegateExpression",
-          "isAttr": true,
-          "type": "String"
-        }
-      ]
-    },
-    {
-      "name": "ServiceTaskLike",
-      "extends": [
-        "bpmn:ServiceTask",
-        "bpmn:BusinessRuleTask",
-        "bpmn:SendTask",
-        "bpmn:MessageEventDefinition"
-      ],
-      "properties": [
-        {
-          "name": "expression",
-          "isAttr": true,
-          "type": "String"
-        },
-        {
-          "name": "class",
-          "isAttr": true,
-          "type": "String"
-        },
-        {
-          "name": "delegateExpression",
-          "isAttr": true,
-          "type": "String"
-        },
-        {
-          "name": "resultVariable",
-          "isAttr": true,
-          "type": "String"
-        }
-      ]
-    },
-    {
-      "name": "DmnCapable",
-      "extends": ["bpmn:BusinessRuleTask"],
-      "properties": [
-        {
-          "name": "decisionRef",
-          "isAttr": true,
-          "type": "String"
-        },
-        {
-          "name": "decisionRefBinding",
-          "isAttr": true,
-          "type": "String",
-          "default": "latest"
-        },
-        {
-          "name": "decisionRefVersion",
-          "isAttr": true,
-          "type": "String"
-        },
-        {
-          "name": "mapDecisionResult",
-          "isAttr": true,
-          "type": "String",
-          "default": "resultList"
-        },
-        {
-          "name": "decisionRefTenantId",
-          "isAttr": true,
-          "type": "String"
-        }
-      ]
-    },
-    {
-      "name": "ExternalCapable",
-      "extends": ["flowable:ServiceTaskLike"],
-      "properties": [
-        {
-          "name": "type",
-          "isAttr": true,
-          "type": "String"
-        },
-        {
-          "name": "topic",
-          "isAttr": true,
-          "type": "String"
-        }
-      ]
-    },
-    {
-      "name": "TaskPriorized",
-      "extends": ["bpmn:Process", "flowable:ExternalCapable"],
-      "properties": [
-        {
-          "name": "taskPriority",
-          "isAttr": true,
-          "type": "String"
-        }
-      ]
-    },
-    {
-      "name": "Properties",
-      "superClass": ["Element"],
-      "meta": {
-        "allowedIn": ["*"]
-      },
-      "properties": [
-        {
-          "name": "values",
-          "type": "Property",
-          "isMany": true
-        }
-      ]
-    },
-    {
-      "name": "Property",
-      "superClass": ["Element"],
-      "properties": [
-        {
-          "name": "id",
-          "type": "String",
-          "isAttr": true
-        },
-        {
-          "name": "name",
-          "type": "String",
-          "isAttr": true
-        },
-        {
-          "name": "value",
-          "type": "String",
-          "isAttr": true
-        }
-      ]
-    },
-    {
-      "name": "Button",
-      "superClass": ["Element"],
-      "meta": {
-        "allowedIn": ["bpmn:UserTask"]
-      },
-      "properties": [
-        {
-          "name": "id",
-          "type": "String",
-          "isAttr": true
-        },
-        {
-          "name": "name",
-          "type": "String",
-          "isAttr": true
-        },
-        {
-          "name": "code",
-          "type": "String",
-          "isAttr": true
-        },
-        {
-          "name": "isHide",
-          "type": "String",
-          "isAttr": true
-        },
-        {
-          "name": "next",
-          "type": "String",
-          "isAttr": true
-        },
-        {
-          "name": "sort",
-          "type": "Integer",
-          "isAttr": true
-        }
-      ]
-    },
-    {
-      "name": "Assignee",
-      "superClass": ["Element"],
-      "meta": {
-        "allowedIn": ["bpmn:UserTask"]
-      },
-      "properties": [
-        {
-          "name": "id",
-          "type": "String",
-          "isAttr": true
-        },
-        {
-          "name": "type",
-          "type": "String",
-          "isAttr": true
-        },
-        {
-          "name": "value",
-          "type": "String",
-          "isAttr": true
-        },
-        {
-          "name": "condition",
-          "type": "String",
-          "isAttr": true
-        },
-        {
-          "name": "operationType",
-          "type": "String",
-          "isAttr": true
-        },
-        {
-          "name": "sort",
-          "type": "Integer",
-          "isAttr": true
-        }
-      ]
-    },
-    {
-      "name": "Connector",
-      "superClass": ["Element"],
-      "meta": {
-        "allowedIn": ["flowable:ServiceTaskLike"]
-      },
-      "properties": [
-        {
-          "name": "inputOutput",
-          "type": "InputOutput"
-        },
-        {
-          "name": "connectorId",
-          "type": "String"
-        }
-      ]
-    },
-    {
-      "name": "InputOutput",
-      "superClass": ["Element"],
-      "meta": {
-        "allowedIn": ["bpmn:FlowNode", "flowable:Connector"]
-      },
-      "properties": [
-        {
-          "name": "inputOutput",
-          "type": "InputOutput"
-        },
-        {
-          "name": "connectorId",
-          "type": "String"
-        },
-        {
-          "name": "inputParameters",
-          "isMany": true,
-          "type": "InputParameter"
-        },
-        {
-          "name": "outputParameters",
-          "isMany": true,
-          "type": "OutputParameter"
-        }
-      ]
-    },
-    {
-      "name": "InputOutputParameter",
-      "properties": [
-        {
-          "name": "name",
-          "isAttr": true,
-          "type": "String"
-        },
-        {
-          "name": "value",
-          "isBody": true,
-          "type": "String"
-        },
-        {
-          "name": "definition",
-          "type": "InputOutputParameterDefinition"
-        }
-      ]
-    },
-    {
-      "name": "InputOutputParameterDefinition",
-      "isAbstract": true
-    },
-    {
-      "name": "List",
-      "superClass": ["InputOutputParameterDefinition"],
-      "properties": [
-        {
-          "name": "items",
-          "isMany": true,
-          "type": "InputOutputParameterDefinition"
-        }
-      ]
-    },
-    {
-      "name": "Map",
-      "superClass": ["InputOutputParameterDefinition"],
-      "properties": [
-        {
-          "name": "entries",
-          "isMany": true,
-          "type": "Entry"
-        }
-      ]
-    },
-    {
-      "name": "Entry",
-      "properties": [
-        {
-          "name": "key",
-          "isAttr": true,
-          "type": "String"
-        },
-        {
-          "name": "value",
-          "isBody": true,
-          "type": "String"
-        },
-        {
-          "name": "definition",
-          "type": "InputOutputParameterDefinition"
-        }
-      ]
-    },
-    {
-      "name": "Value",
-      "superClass": ["InputOutputParameterDefinition"],
-      "properties": [
-        {
-          "name": "id",
-          "isAttr": true,
-          "type": "String"
-        },
-        {
-          "name": "name",
-          "isAttr": true,
-          "type": "String"
-        },
-        {
-          "name": "value",
-          "isBody": true,
-          "type": "String"
-        }
-      ]
-    },
-    {
-      "name": "Script",
-      "superClass": ["InputOutputParameterDefinition"],
-      "properties": [
-        {
-          "name": "scriptFormat",
-          "isAttr": true,
-          "type": "String"
-        },
-        {
-          "name": "resource",
-          "isAttr": true,
-          "type": "String"
-        },
-        {
-          "name": "value",
-          "isBody": true,
-          "type": "String"
-        }
-      ]
-    },
-    {
-      "name": "Field",
-      "superClass": ["Element"],
-      "meta": {
-        "allowedIn": [
-          "flowable:ServiceTaskLike",
-          "flowable:ExecutionListener",
-          "flowable:TaskListener",
-          "bpmn:ServiceTask"
-        ]
-      },
-      "properties": [
-        {
-          "name": "name",
-          "isAttr": true,
-          "type": "String"
-        },
-        {
-          "name": "expression",
-          "type": "String"
-        },
-        {
-          "name": "stringValue",
-          "isAttr": true,
-          "type": "String"
-        },
-        {
-          "name": "string",
-          "type": "String"
-        },
-        {
-          "name": "htmlVar",
-          "type": "Expression"
-        }
-      ]
-    },
-    {
-      "name": "ChildField",
-      "superClass": ["Element"],
-      "properties": [
-        {
-          "name": "id",
-          "type": "String",
-          "isAttr": true
-        },
-        {
-          "name": "name",
-          "type": "String",
-          "isAttr": true
-        },
-        {
-          "name": "type",
-          "type": "String",
-          "isAttr": true
-        },
-        {
-          "name": "required",
-          "type": "String",
-          "isAttr": true
-        },
-        {
-          "name": "readable",
-          "type": "String",
-          "isAttr": true
-        },
-        {
-          "name": "writable",
-          "type": "String",
-          "isAttr": true
-        },
-        {
-          "name": "variable",
-          "type": "String",
-          "isAttr": true
-        },
-        {
-          "name": "expression",
-          "type": "String",
-          "isAttr": true
-        },
-        {
-          "name": "datePattern",
-          "type": "String",
-          "isAttr": true
-        },
-        {
-          "name": "default",
-          "type": "String",
-          "isAttr": true
-        },
-        {
-          "name": "values",
-          "type": "Value",
-          "isMany": true
-        }
-      ]
-    },
-    {
-      "name": "InputParameter",
-      "superClass": ["InputOutputParameter"]
-    },
-    {
-      "name": "OutputParameter",
-      "superClass": ["InputOutputParameter"]
-    },
-    {
-      "name": "Collectable",
-      "isAbstract": true,
-      "extends": ["bpmn:MultiInstanceLoopCharacteristics"],
-      "superClass": ["flowable:AsyncCapable"],
-      "properties": [
-        {
-          "name": "collection",
-          "isAttr": true,
-          "type": "String"
-        },
-        {
-          "name": "elementVariable",
-          "isAttr": true,
-          "type": "String"
-        }
-      ]
-    },
-    {
-      "name": "FailedJobRetryTimeCycle",
-      "superClass": ["Element"],
-      "meta": {
-        "allowedIn": [
-          "flowable:AsyncCapable",
-          "bpmn:MultiInstanceLoopCharacteristics"
-        ]
-      },
-      "properties": [
-        {
-          "name": "body",
-          "isBody": true,
-          "type": "String"
-        }
-      ]
-    },
-    {
-      "name": "ExecutionListener",
-      "superClass": ["Element"],
-      "meta": {
-        "allowedIn": [
-          "bpmn:Task",
-          "bpmn:ServiceTask",
-          "bpmn:UserTask",
-          "bpmn:BusinessRuleTask",
-          "bpmn:ScriptTask",
-          "bpmn:ReceiveTask",
-          "bpmn:ManualTask",
-          "bpmn:ExclusiveGateway",
-          "bpmn:SequenceFlow",
-          "bpmn:ParallelGateway",
-          "bpmn:InclusiveGateway",
-          "bpmn:EventBasedGateway",
-          "bpmn:StartEvent",
-          "bpmn:IntermediateCatchEvent",
-          "bpmn:IntermediateThrowEvent",
-          "bpmn:EndEvent",
-          "bpmn:BoundaryEvent",
-          "bpmn:CallActivity",
-          "bpmn:SubProcess",
-          "bpmn:Process"
-        ]
-      },
-      "properties": [
-        {
-          "name": "expression",
-          "isAttr": true,
-          "type": "String"
-        },
-        {
-          "name": "class",
-          "isAttr": true,
-          "type": "String"
-        },
-        {
-          "name": "delegateExpression",
-          "isAttr": true,
-          "type": "String"
-        },
-        {
-          "name": "event",
-          "isAttr": true,
-          "type": "String"
-        },
-        {
-          "name": "script",
-          "type": "Script"
-        },
-        {
-          "name": "fields",
-          "type": "Field",
-          "isMany": true
-        }
-      ]
-    },
-    {
-      "name": "TaskListener",
-      "superClass": ["Element"],
-      "meta": {
-        "allowedIn": ["bpmn:UserTask"]
-      },
-      "properties": [
-        {
-          "name": "expression",
-          "isAttr": true,
-          "type": "String"
-        },
-        {
-          "name": "class",
-          "isAttr": true,
-          "type": "String"
-        },
-        {
-          "name": "delegateExpression",
-          "isAttr": true,
-          "type": "String"
-        },
-        {
-          "name": "event",
-          "isAttr": true,
-          "type": "String"
-        },
-        {
-          "name": "script",
-          "type": "Script"
-        },
-        {
-          "name": "fields",
-          "type": "Field",
-          "isMany": true
-        }
-      ]
-    },
-    {
-      "name": "FormProperty",
-      "superClass": ["Element"],
-      "meta": {
-        "allowedIn": ["bpmn:StartEvent", "bpmn:UserTask"]
-      },
-      "properties": [
-        {
-          "name": "id",
-          "type": "String",
-          "isAttr": true
-        },
-        {
-          "name": "name",
-          "type": "String",
-          "isAttr": true
-        },
-        {
-          "name": "type",
-          "type": "String",
-          "isAttr": true
-        },
-        {
-          "name": "required",
-          "type": "String",
-          "isAttr": true
-        },
-        {
-          "name": "readable",
-          "type": "String",
-          "isAttr": true
-        },
-        {
-          "name": "writable",
-          "type": "String",
-          "isAttr": true
-        },
-        {
-          "name": "variable",
-          "type": "String",
-          "isAttr": true
-        },
-        {
-          "name": "expression",
-          "type": "String",
-          "isAttr": true
-        },
-        {
-          "name": "datePattern",
-          "type": "String",
-          "isAttr": true
-        },
-        {
-          "name": "default",
-          "type": "String",
-          "isAttr": true
-        },
-        {
-          "name": "values",
-          "type": "Value",
-          "isMany": true
-        },
-        {
-          "name": "children",
-          "type": "ChildField",
-          "isMany": true
-        },
-        {
-          "name": "extensionElements",
-          "type": "bpmn:ExtensionElements",
-          "isMany": true
-        }
-      ]
-    },
-    {
-      "name": "FormData",
-      "superClass": ["Element"],
-      "meta": {
-        "allowedIn": ["bpmn:StartEvent", "bpmn:UserTask"]
-      },
-      "properties": [
-        {
-          "name": "fields",
-          "type": "FormField",
-          "isMany": true
-        },
-        {
-          "name": "businessKey",
-          "type": "String",
-          "isAttr": true
-        }
-      ]
-    },
-    {
-      "name": "FormField",
-      "superClass": ["Element"],
-      "properties": [
-        {
-          "name": "id",
-          "type": "String",
-          "isAttr": true
-        },
-        {
-          "name": "label",
-          "type": "String",
-          "isAttr": true
-        },
-        {
-          "name": "type",
-          "type": "String",
-          "isAttr": true
-        },
-        {
-          "name": "datePattern",
-          "type": "String",
-          "isAttr": true
-        },
-        {
-          "name": "defaultValue",
-          "type": "String",
-          "isAttr": true
-        },
-        {
-          "name": "properties",
-          "type": "Properties"
-        },
-        {
-          "name": "validation",
-          "type": "Validation"
-        },
-        {
-          "name": "values",
-          "type": "Value",
-          "isMany": true
-        }
-      ]
-    },
-    {
-      "name": "Validation",
-      "superClass": ["Element"],
-      "properties": [
-        {
-          "name": "constraints",
-          "type": "Constraint",
-          "isMany": true
-        }
-      ]
-    },
-    {
-      "name": "Constraint",
-      "superClass": ["Element"],
-      "properties": [
-        {
-          "name": "name",
-          "type": "String",
-          "isAttr": true
-        },
-        {
-          "name": "config",
-          "type": "String",
-          "isAttr": true
-        }
-      ]
-    },
-    {
-      "name": "ConditionalEventDefinition",
-      "isAbstract": true,
-      "extends": ["bpmn:ConditionalEventDefinition"],
-      "properties": [
-        {
-          "name": "variableName",
-          "isAttr": true,
-          "type": "String"
-        },
-        {
-          "name": "variableEvent",
-          "isAttr": true,
-          "type": "String"
-        }
-      ]
-    },
-    {
-      "name": "Condition",
-      "superClass": ["Element"],
-      "meta": {
-        "allowedIn": ["bpmn:SequenceFlow"]
-      },
-      "properties": [
-        {
-          "name": "id",
-          "type": "String",
-          "isAttr": true
-        },
-        {
-          "name": "field",
-          "type": "String",
-          "isAttr": true
-        },
-        {
-          "name": "compare",
-          "type": "String",
-          "isAttr": true
-        },
-        {
-          "name": "value",
-          "type": "String",
-          "isAttr": true
-        },
-        {
-          "name": "logic",
-          "type": "String",
-          "isAttr": true
-        },
-        {
-          "name": "sort",
-          "type": "Integer",
-          "isAttr": true
-        }
-      ]
-    }
-  ],
-  "emumerations": []
-}

+ 0 - 77
src/components/ren-flowable/package/designer/plugins/extension-moddle/activiti/activitiExtension.js

@@ -1,77 +0,0 @@
-"use strict";
-
-import { some } from "@/components/ren-flowable/utils/min-dash.js";
-
-var ALLOWED_TYPES = {
-  FailedJobRetryTimeCycle: [
-    "bpmn:StartEvent",
-    "bpmn:BoundaryEvent",
-    "bpmn:IntermediateCatchEvent",
-    "bpmn:Activity"
-  ],
-  Connector: ["bpmn:EndEvent", "bpmn:IntermediateThrowEvent"],
-  Field: ["bpmn:EndEvent", "bpmn:IntermediateThrowEvent"]
-};
-
-function is(element, type) {
-  return element && typeof element.$instanceOf === "function" && element.$instanceOf(type);
-}
-
-function exists(element) {
-  return element && element.length;
-}
-
-function includesType(collection, type) {
-  return (
-    exists(collection) &&
-    some(collection, function (element) {
-      return is(element, type);
-    })
-  );
-}
-
-function anyType(element, types) {
-  return some(types, function (type) {
-    return is(element, type);
-  });
-}
-
-function isAllowed(propName, propDescriptor, newElement) {
-  var name = propDescriptor.name;
-  var types = ALLOWED_TYPES[name.replace(/activiti:/, "")];
-
-  return name === propName && anyType(newElement, types);
-}
-
-export default function ActivitiModdleExtension(eventBus) {
-  eventBus.on(
-    "property.clone",
-    function (context) {
-      var newElement = context.newElement;
-      var propDescriptor = context.propertyDescriptor;
-
-      this.canCloneProperty(newElement, propDescriptor);
-    },
-    this
-  );
-}
-
-ActivitiModdleExtension.$inject = ["eventBus"];
-
-ActivitiModdleExtension.prototype.canCloneProperty = function (newElement, propDescriptor) {
-  if (isAllowed("activiti:FailedJobRetryTimeCycle", propDescriptor, newElement)) {
-    return (
-      includesType(newElement.eventDefinitions, "bpmn:TimerEventDefinition") ||
-      includesType(newElement.eventDefinitions, "bpmn:SignalEventDefinition") ||
-      is(newElement.loopCharacteristics, "bpmn:MultiInstanceLoopCharacteristics")
-    );
-  }
-
-  if (isAllowed("activiti:Connector", propDescriptor, newElement)) {
-    return includesType(newElement.eventDefinitions, "bpmn:MessageEventDefinition");
-  }
-
-  if (isAllowed("activiti:Field", propDescriptor, newElement)) {
-    return includesType(newElement.eventDefinitions, "bpmn:MessageEventDefinition");
-  }
-};

+ 0 - 10
src/components/ren-flowable/package/designer/plugins/extension-moddle/activiti/index.js

@@ -1,10 +0,0 @@
-/*
- * @author igdianov
- * address https://github.com/igdianov/activiti-bpmn-moddle
- * */
-
-import ActivitiModdleExtension from './activitiExtension.js'
-export default {
-  __init__: ['ActivitiModdleExtension'],
-  ActivitiModdleExtension: ['type', ActivitiModdleExtension]
-};

+ 0 - 144
src/components/ren-flowable/package/designer/plugins/extension-moddle/camunda/extension.js

@@ -1,144 +0,0 @@
-"use strict";
-
-import { some, isObject, isFunction } from "@/components/ren-flowable/utils/min-dash.js";
-
-var WILDCARD = "*";
-
-export default function CamundaModdleExtension(eventBus) {
-  var self = this;
-
-  eventBus.on("moddleCopy.canCopyProperty", function (context) {
-    var property = context.property;
-    var parent = context.parent;
-
-    return self.canCopyProperty(property, parent);
-  });
-}
-
-CamundaModdleExtension.$inject = ["eventBus"];
-
-/**
- * Check wether to disallow copying property.
- */
-CamundaModdleExtension.prototype.canCopyProperty = function (property, parent) {
-  // (1) check wether property is allowed in parent
-  if (isObject(property) && !isAllowedInParent(property, parent)) {
-    return false;
-  }
-
-  // (2) check more complex scenarios
-
-  if (is(property, "camunda:InputOutput") && !this.canHostInputOutput(parent)) {
-    return false;
-  }
-
-  if (isAny(property, ["camunda:Connector", "camunda:Field"]) && !this.canHostConnector(parent)) {
-    return false;
-  }
-
-  if (is(property, "camunda:In") && !this.canHostIn(parent)) {
-    return false;
-  }
-};
-
-CamundaModdleExtension.prototype.canHostInputOutput = function (parent) {
-  // allowed in camunda:Connector
-  var connector = getParent(parent, "camunda:Connector");
-
-  if (connector) {
-    return true;
-  }
-
-  // special rules inside bpmn:FlowNode
-  var flowNode = getParent(parent, "bpmn:FlowNode");
-
-  if (!flowNode) {
-    return false;
-  }
-
-  if (isAny(flowNode, ["bpmn:StartEvent", "bpmn:Gateway", "bpmn:BoundaryEvent"])) {
-    return false;
-  }
-
-  if (is(flowNode, "bpmn:SubProcess") && flowNode.get("triggeredByEvent")) {
-    return false;
-  }
-
-  return true;
-};
-
-CamundaModdleExtension.prototype.canHostConnector = function (parent) {
-  var serviceTaskLike = getParent(parent, "camunda:ServiceTaskLike");
-
-  if (is(serviceTaskLike, "bpmn:MessageEventDefinition")) {
-    // only allow on throw and end events
-    return getParent(parent, "bpmn:IntermediateThrowEvent") || getParent(parent, "bpmn:EndEvent");
-  }
-
-  return true;
-};
-
-CamundaModdleExtension.prototype.canHostIn = function (parent) {
-  var callActivity = getParent(parent, "bpmn:CallActivity");
-
-  if (callActivity) {
-    return true;
-  }
-
-  var signalEventDefinition = getParent(parent, "bpmn:SignalEventDefinition");
-
-  if (signalEventDefinition) {
-    // only allow on throw and end events
-    return getParent(parent, "bpmn:IntermediateThrowEvent") || getParent(parent, "bpmn:EndEvent");
-  }
-
-  return true;
-};
-
-// helpers //////////
-
-function is(element, type) {
-  return element && isFunction(element.$instanceOf) && element.$instanceOf(type);
-}
-
-function isAny(element, types) {
-  return some(types, function (t) {
-    return is(element, t);
-  });
-}
-
-function getParent(element, type) {
-  if (!type) {
-    return element.$parent;
-  }
-
-  if (is(element, type)) {
-    return element;
-  }
-
-  if (!element.$parent) {
-    return;
-  }
-
-  return getParent(element.$parent, type);
-}
-
-function isAllowedInParent(property, parent) {
-  // (1) find property descriptor
-  var descriptor = property.$type && property.$model.getTypeDescriptor(property.$type);
-
-  var allowedIn = descriptor && descriptor.meta && descriptor.meta.allowedIn;
-
-  if (!allowedIn || isWildcard(allowedIn)) {
-    return true;
-  }
-
-  // (2) check wether property has parent of allowed type
-  return some(allowedIn, function (type) {
-    return getParent(parent, type);
-  });
-}
-
-function isWildcard(allowedIn) {
-  return allowedIn.indexOf(WILDCARD) !== -1;
-}

+ 0 - 7
src/components/ren-flowable/package/designer/plugins/extension-moddle/camunda/index.js

@@ -1,7 +0,0 @@
-'use strict';
-
-import CamundaModdleExtension from './extension.js';
-export default {
-  __init__: ['CamundaModdleExtension'],
-  CamundaModdleExtension: ['type', CamundaModdleExtension]
-};

+ 0 - 77
src/components/ren-flowable/package/designer/plugins/extension-moddle/flowable/flowableExtension.js

@@ -1,77 +0,0 @@
-"use strict";
-
-import { some } from "@/components/ren-flowable/utils/min-dash.js";
-
-var ALLOWED_TYPES = {
-  FailedJobRetryTimeCycle: [
-    "bpmn:StartEvent",
-    "bpmn:BoundaryEvent",
-    "bpmn:IntermediateCatchEvent",
-    "bpmn:Activity"
-  ],
-  Connector: ["bpmn:EndEvent", "bpmn:IntermediateThrowEvent"],
-  Field: ["bpmn:EndEvent", "bpmn:IntermediateThrowEvent"]
-};
-
-function is(element, type) {
-  return element && typeof element.$instanceOf === "function" && element.$instanceOf(type);
-}
-
-function exists(element) {
-  return element && element.length;
-}
-
-function includesType(collection, type) {
-  return (
-    exists(collection) &&
-    some(collection, function (element) {
-      return is(element, type);
-    })
-  );
-}
-
-function anyType(element, types) {
-  return some(types, function (type) {
-    return is(element, type);
-  });
-}
-
-function isAllowed(propName, propDescriptor, newElement) {
-  var name = propDescriptor.name;
-  var types = ALLOWED_TYPES[name.replace(/flowable:/, "")];
-
-  return name === propName && anyType(newElement, types);
-}
-
-export default function FlowableModdleExtension(eventBus) {
-  eventBus.on(
-    "property.clone",
-    function (context) {
-      var newElement = context.newElement;
-      var propDescriptor = context.propertyDescriptor;
-
-      this.canCloneProperty(newElement, propDescriptor);
-    },
-    this
-  );
-}
-
-FlowableModdleExtension.$inject = ["eventBus"];
-
-FlowableModdleExtension.prototype.canCloneProperty = function (newElement, propDescriptor) {
-  if (isAllowed("flowable:FailedJobRetryTimeCycle", propDescriptor, newElement)) {
-    return (
-      includesType(newElement.eventDefinitions, "bpmn:TimerEventDefinition") ||
-      includesType(newElement.eventDefinitions, "bpmn:SignalEventDefinition") ||
-      is(newElement.loopCharacteristics, "bpmn:MultiInstanceLoopCharacteristics")
-    );
-  }
-
-  if (isAllowed("flowable:Connector", propDescriptor, newElement)) {
-    return includesType(newElement.eventDefinitions, "bpmn:MessageEventDefinition");
-  }
-
-  if (isAllowed("flowable:Field", propDescriptor, newElement)) {
-    return includesType(newElement.eventDefinitions, "bpmn:MessageEventDefinition");
-  }
-};

+ 0 - 10
src/components/ren-flowable/package/designer/plugins/extension-moddle/flowable/index.js

@@ -1,10 +0,0 @@
-/*
- * @author igdianov
- * address https://github.com/igdianov/activiti-bpmn-moddle
- * */
-
-import FlowableModdleExtension from './flowableExtension.js'
-export default {
-  __init__: ['FlowableModdleExtension'],
-  FlowableModdleExtension: ['type', FlowableModdleExtension]
-};

+ 0 - 210
src/components/ren-flowable/package/designer/plugins/palette/CustomPalette.js

@@ -1,210 +0,0 @@
-import PaletteProvider from "bpmn-js/lib/features/palette/PaletteProvider";
-import { assign } from "@/components/ren-flowable/utils/min-dash.js";
-
-export default function CustomPalette(
-  palette,
-  create,
-  elementFactory,
-  spaceTool,
-  lassoTool,
-  handTool,
-  globalConnect,
-  translate
-) {
-  PaletteProvider.call(
-    this,
-    palette,
-    create,
-    elementFactory,
-    spaceTool,
-    lassoTool,
-    handTool,
-    globalConnect,
-    translate,
-    2000
-  );
-}
-
-const F = function () {}; // 核心,利用空对象作为中介;
-F.prototype = PaletteProvider.prototype; // 核心,将父类的原型赋值给空对象F;
-
-// 利用中介函数重写原型链方法
-F.prototype.getPaletteEntries = function () {
-  var actions = {};
-  var create = this._create;
-  var elementFactory = this._elementFactory;
-  var spaceTool = this._spaceTool;
-  var lassoTool = this._lassoTool;
-  var handTool = this._handTool;
-  var globalConnect = this._globalConnect;
-  var translate = this._translate;
-
-  function createAction(type, group, className, title, options) {
-    function createListener(event) {
-      var shape = elementFactory.createShape(assign({ type: type }, options));
-
-      if (options) {
-        shape.businessObject.di.isExpanded = options.isExpanded;
-      }
-
-      create.start(event, shape);
-    }
-
-    var shortType = type.replace(/^bpmn:/, "");
-
-    return {
-      group: group,
-      className: className,
-      title: title || translate("Create {type}", { type: shortType }),
-      action: {
-        dragstart: createListener,
-        click: createListener
-      }
-    };
-  }
-
-  function createSubprocess(event) {
-    var subProcess = elementFactory.createShape({
-      type: "bpmn:SubProcess",
-      x: 0,
-      y: 0,
-      isExpanded: true
-    });
-
-    var startEvent = elementFactory.createShape({
-      type: "bpmn:StartEvent",
-      x: 40,
-      y: 82,
-      parent: subProcess
-    });
-
-    create.start(event, [subProcess, startEvent], {
-      hints: {
-        autoSelect: [startEvent]
-      }
-    });
-  }
-
-  function createParticipant(event) {
-    create.start(event, elementFactory.createParticipantShape());
-  }
-
-  assign(actions, {
-    "hand-tool": {
-      group: "tools",
-      className: "bpmn-icon-hand-tool",
-      title: translate("Activate the hand tool"),
-      action: {
-        click: function (event) {
-          handTool.activateHand(event);
-        }
-      }
-    },
-    "lasso-tool": {
-      group: "tools",
-      className: "bpmn-icon-lasso-tool",
-      title: translate("Activate the lasso tool"),
-      action: {
-        click: function (event) {
-          lassoTool.activateSelection(event);
-        }
-      }
-    },
-    "space-tool": {
-      group: "tools",
-      className: "bpmn-icon-space-tool",
-      title: translate("Activate the create/remove space tool"),
-      action: {
-        click: function (event) {
-          spaceTool.activateSelection(event);
-        }
-      }
-    },
-    "global-connect-tool": {
-      group: "tools",
-      className: "bpmn-icon-connection-multi",
-      title: translate("Activate the global connect tool"),
-      action: {
-        click: function (event) {
-          globalConnect.toggle(event);
-        }
-      }
-    },
-    "tool-separator": {
-      group: "tools",
-      separator: true
-    },
-    "create.start-event": createAction(
-      "bpmn:StartEvent",
-      "event",
-      "bpmn-icon-start-event-none",
-      translate("Create StartEvent")
-    ),
-    "create.intermediate-event": createAction(
-      "bpmn:IntermediateThrowEvent",
-      "event",
-      "bpmn-icon-intermediate-event-none",
-      translate("Create Intermediate/Boundary Event")
-    ),
-    "create.end-event": createAction(
-      "bpmn:EndEvent",
-      "event",
-      "bpmn-icon-end-event-none",
-      translate("Create EndEvent")
-    ),
-    "create.exclusive-gateway": createAction(
-      "bpmn:ExclusiveGateway",
-      "gateway",
-      "bpmn-icon-gateway-none",
-      translate("Create Gateway")
-    ),
-    "create.user-task": createAction(
-      "bpmn:UserTask",
-      "activity",
-      "bpmn-icon-user-task",
-      translate("Create User Task")
-    ),
-    // 'create.data-object': createAction('bpmn:DataObjectReference', 'data-object', 'bpmn-icon-data-object', translate('Create DataObjectReference')),
-    // 'create.data-store': createAction('bpmn:DataStoreReference', 'data-store', 'bpmn-icon-data-store', translate('Create DataStoreReference')),
-    "create.subprocess-expanded": {
-      group: "activity",
-      className: "bpmn-icon-subprocess-expanded",
-      title: translate("Create expanded SubProcess"),
-      action: {
-        dragstart: createSubprocess,
-        click: createSubprocess
-      }
-    },
-    "create.participant-expanded": {
-      group: "collaboration",
-      className: "bpmn-icon-participant",
-      title: translate("Create Pool/Participant"),
-      action: {
-        dragstart: createParticipant,
-        click: createParticipant
-      }
-    },
-    "create.group": createAction(
-      "bpmn:Group",
-      "artifact",
-      "bpmn-icon-group",
-      translate("Create Group")
-    )
-  });
-
-  return actions;
-};
-
-CustomPalette.$inject = [
-  "palette",
-  "create",
-  "elementFactory",
-  "spaceTool",
-  "lassoTool",
-  "handTool",
-  "globalConnect",
-  "translate"
-];
-
-CustomPalette.prototype = new F(); // 核心,将 F的实例赋值给子类;
-CustomPalette.prototype.constructor = CustomPalette; // 修复子类CustomPalette的构造器指向,防止原型链的混乱;

+ 0 - 6
src/components/ren-flowable/package/designer/plugins/palette/index.js

@@ -1,6 +0,0 @@
-import CustomPalette from './CustomPalette';
-
-export default {
-  __init__: ['customPalette'],
-  customPalette: ['type', CustomPalette]
-};

+ 0 - 213
src/components/ren-flowable/package/designer/plugins/palette/paletteProvider.js

@@ -1,213 +0,0 @@
-import { assign } from "@/components/ren-flowable/utils/min-dash.js";
-
-/**
- * A palette provider for BPMN 2.0 elements.
- */
-export default function PaletteProvider(
-  palette,
-  create,
-  elementFactory,
-  spaceTool,
-  lassoTool,
-  handTool,
-  globalConnect,
-  translate
-) {
-  this._palette = palette;
-  this._create = create;
-  this._elementFactory = elementFactory;
-  this._spaceTool = spaceTool;
-  this._lassoTool = lassoTool;
-  this._handTool = handTool;
-  this._globalConnect = globalConnect;
-  this._translate = translate;
-
-  palette.registerProvider(this);
-}
-
-PaletteProvider.$inject = [
-  "palette",
-  "create",
-  "elementFactory",
-  "spaceTool",
-  "lassoTool",
-  "handTool",
-  "globalConnect",
-  "translate"
-];
-
-PaletteProvider.prototype.getPaletteEntries = function () {
-  var actions = {};
-  var create = this._create;
-  var elementFactory = this._elementFactory;
-  var spaceTool = this._spaceTool;
-  var lassoTool = this._lassoTool;
-  var handTool = this._handTool;
-  var globalConnect = this._globalConnect;
-  var translate = this._translate;
-
-  function createAction(type, group, className, title, options) {
-    function createListener(event) {
-      var shape = elementFactory.createShape(assign({ type: type }, options));
-
-      if (options) {
-        shape.businessObject.di.isExpanded = options.isExpanded;
-      }
-
-      create.start(event, shape);
-    }
-
-    var shortType = type.replace(/^bpmn:/, "");
-
-    return {
-      group: group,
-      className: className,
-      title: title || translate("Create {type}", { type: shortType }),
-      action: {
-        dragstart: createListener,
-        click: createListener
-      }
-    };
-  }
-
-  function createSubprocess(event) {
-    var subProcess = elementFactory.createShape({
-      type: "bpmn:SubProcess",
-      x: 0,
-      y: 0,
-      isExpanded: true
-    });
-
-    var startEvent = elementFactory.createShape({
-      type: "bpmn:StartEvent",
-      x: 40,
-      y: 82,
-      parent: subProcess
-    });
-
-    create.start(event, [subProcess, startEvent], {
-      hints: {
-        autoSelect: [startEvent]
-      }
-    });
-  }
-
-  function createParticipant(event) {
-    create.start(event, elementFactory.createParticipantShape());
-  }
-
-  assign(actions, {
-    "hand-tool": {
-      group: "tools",
-      className: "bpmn-icon-hand-tool",
-      title: translate("Activate the hand tool"),
-      action: {
-        click: function (event) {
-          handTool.activateHand(event);
-        }
-      }
-    },
-    "lasso-tool": {
-      group: "tools",
-      className: "bpmn-icon-lasso-tool",
-      title: translate("Activate the lasso tool"),
-      action: {
-        click: function (event) {
-          lassoTool.activateSelection(event);
-        }
-      }
-    },
-    "space-tool": {
-      group: "tools",
-      className: "bpmn-icon-space-tool",
-      title: translate("Activate the create/remove space tool"),
-      action: {
-        click: function (event) {
-          spaceTool.activateSelection(event);
-        }
-      }
-    },
-    "global-connect-tool": {
-      group: "tools",
-      className: "bpmn-icon-connection-multi",
-      title: translate("Activate the global connect tool"),
-      action: {
-        click: function (event) {
-          globalConnect.toggle(event);
-        }
-      }
-    },
-    "tool-separator": {
-      group: "tools",
-      separator: true
-    },
-    "create.start-event": createAction(
-      "bpmn:StartEvent",
-      "event",
-      "bpmn-icon-start-event-none",
-      translate("Create StartEvent")
-    ),
-    "create.intermediate-event": createAction(
-      "bpmn:IntermediateThrowEvent",
-      "event",
-      "bpmn-icon-intermediate-event-none",
-      translate("Create Intermediate/Boundary Event")
-    ),
-    "create.end-event": createAction(
-      "bpmn:EndEvent",
-      "event",
-      "bpmn-icon-end-event-none",
-      translate("Create EndEvent")
-    ),
-    "create.exclusive-gateway": createAction(
-      "bpmn:ExclusiveGateway",
-      "gateway",
-      "bpmn-icon-gateway-none",
-      translate("Create Gateway")
-    ),
-    "create.user-task": createAction(
-      "bpmn:UserTask",
-      "activity",
-      "bpmn-icon-user-task",
-      translate("Create User Task")
-    ),
-    "create.data-object": createAction(
-      "bpmn:DataObjectReference",
-      "data-object",
-      "bpmn-icon-data-object",
-      translate("Create DataObjectReference")
-    ),
-    "create.data-store": createAction(
-      "bpmn:DataStoreReference",
-      "data-store",
-      "bpmn-icon-data-store",
-      translate("Create DataStoreReference")
-    ),
-    "create.subprocess-expanded": {
-      group: "activity",
-      className: "bpmn-icon-subprocess-expanded",
-      title: translate("Create expanded SubProcess"),
-      action: {
-        dragstart: createSubprocess,
-        click: createSubprocess
-      }
-    },
-    "create.participant-expanded": {
-      group: "collaboration",
-      className: "bpmn-icon-participant",
-      title: translate("Create Pool/Participant"),
-      action: {
-        dragstart: createParticipant,
-        click: createParticipant
-      }
-    },
-    "create.group": createAction(
-      "bpmn:Group",
-      "artifact",
-      "bpmn-icon-group",
-      translate("Create Group")
-    )
-  });
-
-  return actions;
-};

+ 0 - 41
src/components/ren-flowable/package/designer/plugins/translate/customTranslate.js

@@ -1,41 +0,0 @@
-// import translations from "./zh";
-//
-// export default function customTranslate(template, replacements) {
-//   replacements = replacements || {};
-//
-//   // Translate
-//   template = translations[template] || template;
-//
-//   // Replace
-//   return template.replace(/{([^}]+)}/g, function(_, key) {
-//     let str = replacements[key];
-//     if (
-//       translations[replacements[key]] !== null &&
-//       translations[replacements[key]] !== "undefined"
-//     ) {
-//       // eslint-disable-next-line no-mixed-spaces-and-tabs
-//       str = translations[replacements[key]];
-//       // eslint-disable-next-line no-mixed-spaces-and-tabs
-//     }
-//     return str || "{" + key + "}";
-//   });
-// }
-
-export default function customTranslate(translations) {
-  return function(template, replacements) {
-    replacements = replacements || {};
-    // Translate
-    template = translations[template] || template;
-
-    // Replace
-    return template.replace(/{([^}]+)}/g, function(_, key) {
-      let str = replacements[key];
-      if (translations[replacements[key]] !== null && translations[replacements[key]] !== undefined) {
-        // eslint-disable-next-line no-mixed-spaces-and-tabs
-        str = translations[replacements[key]];
-        // eslint-disable-next-line no-mixed-spaces-and-tabs
-      }
-      return str || '{' + key + '}';
-    });
-  };
-}

+ 0 - 238
src/components/ren-flowable/package/designer/plugins/translate/zh.js

@@ -1,238 +0,0 @@
-/**
- * This is a sample file that should be replaced with the actual translation.
- *
- * Checkout https://github.com/bpmn-io/bpmn-js-i18n for a list of available
- * translations and labels to translate.
- */
-export default {
-  // 添加部分
-  'Append EndEvent': '追加结束事件',
-  'Append Gateway': '追加网关',
-  'Append Task': '追加任务',
-  'Append Intermediate/Boundary Event': '追加中间抛出事件/边界事件',
-
-  'Activate the global connect tool': '激活全局连接工具',
-  'Append {type}': '添加 {type}',
-  'Add Lane above': '在上面添加道',
-  'Divide into two Lanes': '分割成两个道',
-  'Divide into three Lanes': '分割成三个道',
-  'Add Lane below': '在下面添加道',
-  'Append compensation activity': '追加补偿活动',
-  'Change type': '修改类型',
-  'Connect using Association': '使用关联连接',
-  'Connect using Sequence/MessageFlow or Association': '使用顺序/消息流或者关联连接',
-  'Connect using DataInputAssociation': '使用数据输入关联连接',
-  Remove: '移除',
-  'Activate the hand tool': '激活抓手工具',
-  'Activate the lasso tool': '激活套索工具',
-  'Activate the create/remove space tool': '激活创建/删除空间工具',
-  'Create expanded SubProcess': '创建扩展子过程',
-  'Create IntermediateThrowEvent/BoundaryEvent': '创建中间抛出事件/边界事件',
-  'Create Pool/Participant': '创建池/参与者',
-  'Parallel Multi Instance': '并行多重事件',
-  'Sequential Multi Instance': '时序多重事件',
-  DataObjectReference: '数据对象参考',
-  DataStoreReference: '数据存储参考',
-  Loop: '循环',
-  'Ad-hoc': '即席',
-  'Create {type}': '创建 {type}',
-  Task: '任务',
-  'Send Task': '发送任务',
-  'Receive Task': '接收任务',
-  'User Task': '用户任务',
-  'Manual Task': '手工任务',
-  'Business Rule Task': '业务规则任务',
-  'Service Task': '服务任务',
-  'Script Task': '脚本任务',
-  'Call Activity': '调用活动',
-  'Sub Process (collapsed)': '子流程(折叠的)',
-  'Sub Process (expanded)': '子流程(展开的)',
-  'Start Event': '开始事件',
-  StartEvent: '开始事件',
-  'Intermediate Throw Event': '中间事件',
-  'End Event': '结束事件',
-  EndEvent: '结束事件',
-  'Create StartEvent': '创建开始事件',
-  'Create EndEvent': '创建结束事件',
-  'Create Task': '创建任务',
-  'Create User Task': '创建用户任务',
-  'Create Gateway': '创建网关',
-  'Create DataObjectReference': '创建数据对象',
-  'Create DataStoreReference': '创建数据存储',
-  'Create Group': '创建分组',
-  'Create Intermediate/Boundary Event': '创建中间/边界事件',
-  'Message Start Event': '消息开始事件',
-  'Timer Start Event': '定时开始事件',
-  'Conditional Start Event': '条件开始事件',
-  'Signal Start Event': '信号开始事件',
-  'Error Start Event': '错误开始事件',
-  'Escalation Start Event': '升级开始事件',
-  'Compensation Start Event': '补偿开始事件',
-  'Message Start Event (non-interrupting)': '消息开始事件(非中断)',
-  'Timer Start Event (non-interrupting)': '定时开始事件(非中断)',
-  'Conditional Start Event (non-interrupting)': '条件开始事件(非中断)',
-  'Signal Start Event (non-interrupting)': '信号开始事件(非中断)',
-  'Escalation Start Event (non-interrupting)': '升级开始事件(非中断)',
-  'Message Intermediate Catch Event': '消息中间捕获事件',
-  'Message Intermediate Throw Event': '消息中间抛出事件',
-  'Timer Intermediate Catch Event': '定时中间捕获事件',
-  'Escalation Intermediate Throw Event': '升级中间抛出事件',
-  'Conditional Intermediate Catch Event': '条件中间捕获事件',
-  'Link Intermediate Catch Event': '链接中间捕获事件',
-  'Link Intermediate Throw Event': '链接中间抛出事件',
-  'Compensation Intermediate Throw Event': '补偿中间抛出事件',
-  'Signal Intermediate Catch Event': '信号中间捕获事件',
-  'Signal Intermediate Throw Event': '信号中间抛出事件',
-  'Message End Event': '消息结束事件',
-  'Escalation End Event': '定时结束事件',
-  'Error End Event': '错误结束事件',
-  'Cancel End Event': '取消结束事件',
-  'Compensation End Event': '补偿结束事件',
-  'Signal End Event': '信号结束事件',
-  'Terminate End Event': '终止结束事件',
-  'Message Boundary Event': '消息边界事件',
-  'Message Boundary Event (non-interrupting)': '消息边界事件(非中断)',
-  'Timer Boundary Event': '定时边界事件',
-  'Timer Boundary Event (non-interrupting)': '定时边界事件(非中断)',
-  'Escalation Boundary Event': '升级边界事件',
-  'Escalation Boundary Event (non-interrupting)': '升级边界事件(非中断)',
-  'Conditional Boundary Event': '条件边界事件',
-  'Conditional Boundary Event (non-interrupting)': '条件边界事件(非中断)',
-  'Error Boundary Event': '错误边界事件',
-  'Cancel Boundary Event': '取消边界事件',
-  'Signal Boundary Event': '信号边界事件',
-  'Signal Boundary Event (non-interrupting)': '信号边界事件(非中断)',
-  'Compensation Boundary Event': '补偿边界事件',
-  'Exclusive Gateway': '互斥网关',
-  'Parallel Gateway': '并行网关',
-  'Inclusive Gateway': '相容网关',
-  'Complex Gateway': '复杂网关',
-  'Event based Gateway': '事件网关',
-  Transaction: '转运',
-  'Sub Process': '子流程',
-  'Event Sub Process': '事件子流程',
-  'Collapsed Pool': '折叠池',
-  'Expanded Pool': '展开池',
-
-  // Errors
-  'no parent for {element} in {parent}': '在{parent}里,{element}没有父类',
-  'no shape type specified': '没有指定的形状类型',
-  'flow elements must be children of pools/participants': '流元素必须是池/参与者的子类',
-  'out of bounds release': 'out of bounds release',
-  'more than {count} child lanes': '子道大于{count} ',
-  'element required': '元素不能为空',
-  'diagram not part of bpmn:Definitions': '流程图不符合bpmn规范',
-  'no diagram to display': '没有可展示的流程图',
-  'no process or collaboration to display': '没有可展示的流程/协作',
-  'element {element} referenced by {referenced}#{property} not yet drawn': '由{referenced}#{property}引用的{element}元素仍未绘制',
-  'already rendered {element}': '{element} 已被渲染',
-  'failed to import {element}': '导入{element}失败',
-  // 属性面板的参数
-  Id: '编号',
-  Name: '名称',
-  General: '常规',
-  Details: '详情',
-  'Message Name': '消息名称',
-  Message: '消息',
-  Initiator: '创建者',
-  'Asynchronous Continuations': '持续异步',
-  'Asynchronous Before': '异步前',
-  'Asynchronous After': '异步后',
-  'Job Configuration': '工作配置',
-  Exclusive: '排除',
-  'Job Priority': '工作优先级',
-  'Retry Time Cycle': '重试时间周期',
-  Documentation: '文档',
-  'Element Documentation': '元素文档',
-  'History Configuration': '历史配置',
-  'History Time To Live': '历史的生存时间',
-  Forms: '表单',
-  'Form Key': '表单key',
-  'Form Fields': '表单字段',
-  'Business Key': '业务key',
-  'Form Field': '表单字段',
-  ID: '编号',
-  Type: '类型',
-  Label: '名称',
-  'Default Value': '默认值',
-  'Default Flow': '默认流转路径',
-  'Conditional Flow': '条件流转路径',
-  'Sequence Flow': '普通流转路径',
-  Validation: '校验',
-  'Add Constraint': '添加约束',
-  Config: '配置',
-  Properties: '属性',
-  'Add Property': '添加属性',
-  Value: '值',
-  Listeners: '监听器',
-  'Execution Listener': '执行监听',
-  'Event Type': '事件类型',
-  'Listener Type': '监听器类型',
-  'Java Class': 'Java类',
-  Expression: '表达式',
-  'Must provide a value': '必须提供一个值',
-  'Delegate Expression': '代理表达式',
-  Script: '脚本',
-  'Script Format': '脚本格式',
-  'Script Type': '脚本类型',
-  'Inline Script': '内联脚本',
-  'External Script': '外部脚本',
-  Resource: '资源',
-  'Field Injection': '字段注入',
-  Extensions: '扩展',
-  'Input/Output': '输入/输出',
-  'Input Parameters': '输入参数',
-  'Output Parameters': '输出参数',
-  Parameters: '参数',
-  'Output Parameter': '输出参数',
-  'Timer Definition Type': '定时器定义类型',
-  'Timer Definition': '定时器定义',
-  Date: '日期',
-  Duration: '持续',
-  Cycle: '循环',
-  Signal: '信号',
-  'Signal Name': '信号名称',
-  Escalation: '升级',
-  Error: '错误',
-  'Link Name': '链接名称',
-  Condition: '条件名称',
-  'Variable Name': '变量名称',
-  'Variable Event': '变量事件',
-  'Specify more than one variable change event as a comma separated list.': '多个变量事件以逗号隔开',
-  'Wait for Completion': '等待完成',
-  'Activity Ref': '活动参考',
-  'Version Tag': '版本标签',
-  Executable: '可执行文件',
-  'External Task Configuration': '扩展任务配置',
-  'Task Priority': '任务优先级',
-  External: '外部',
-  Connector: '连接器',
-  'Must configure Connector': '必须配置连接器',
-  'Connector Id': '连接器编号',
-  Implementation: '实现方式',
-  'Field Injections': '字段注入',
-  Fields: '字段',
-  'Result Variable': '结果变量',
-  Topic: '主题',
-  'Configure Connector': '配置连接器',
-  'Input Parameter': '输入参数',
-  Assignee: '代理人',
-  'Candidate Users': '候选用户',
-  'Candidate Groups': '候选组',
-  'Due Date': '到期时间',
-  'Follow Up Date': '跟踪日期',
-  Priority: '优先级',
-  'The follow up date as an EL expression (e.g. ${someDate} or an ISO date (e.g. 2015-06-26T09:54:00)':
-    '跟踪日期必须符合EL表达式,如: ${someDate} ,或者一个ISO标准日期,如:2015-06-26T09:54:00',
-  'The due date as an EL expression (e.g. ${someDate} or an ISO date (e.g. 2015-06-26T09:54:00)':
-    '跟踪日期必须符合EL表达式,如: ${someDate} ,或者一个ISO标准日期,如:2015-06-26T09:54:00',
-  Variables: '变量',
-  'Candidate Starter Configuration': '候选人起动器配置',
-  'Candidate Starter Groups': '候选人起动器组',
-  'This maps to the process definition key.': '这映射到流程定义键。',
-  'Candidate Starter Users': '候选人起动器的用户',
-  'Specify more than one user as a comma separated list.': '指定多个用户作为逗号分隔的列表。',
-  'Tasklist Configuration': 'Tasklist配置',
-  Startable: '启动',
-  'Specify more than one group as a comma separated list.': '指定多个组作为逗号分隔的列表。'
-};

+ 0 - 19
src/components/ren-flowable/package/index.js

@@ -1,19 +0,0 @@
-import MyProcessDesigner from './designer';
-import MyProcessPenal from './penal';
-
-const components = [MyProcessDesigner, MyProcessPenal];
-
-const install = function(Vue) {
-  components.forEach(component => {
-    Vue.component(component.name, component);
-  });
-};
-
-if (typeof window !== 'undefined' && window.Vue) {
-  install(window.Vue);
-}
-
-export default {
-  install,
-  ...components
-};

+ 0 - 222
src/components/ren-flowable/package/penal/PropertiesPanel.vue

@@ -1,222 +0,0 @@
-<template>
-  <div class="process-panel__container" :style="{ width: `${this.width}px` }">
-    <el-collapse v-model="activeTab">
-      <el-collapse-item name="base">
-        <template #title>
-          <div class="panel-tab__title">
-            <el-icon><info-filled /></el-icon>常规
-          </div>
-        </template>
-        <element-base-info :id-edit-disabled="idEditDisabled" :business-object="elementBusinessObject" :type="elementType" />
-      </el-collapse-item>
-      <el-collapse-item name="condition" v-if="elementType === 'Process'" key="message">
-        <template #title>
-          <div class="panel-tab__title">
-            <el-icon><comment /></el-icon>消息与信号
-          </div>
-        </template>
-        <signal-and-massage />
-      </el-collapse-item>
-      <el-collapse-item name="condition" v-if="conditionFormVisible" key="condition">
-        <template #title>
-          <div class="panel-tab__title">
-            <el-icon><promotion /></el-icon>流转条件
-          </div>
-        </template>
-        <flow-condition :business-object="elementBusinessObject" :type="elementType" />
-      </el-collapse-item>
-      <!--      <el-collapse-item name="condition" v-if="formVisible" key="form">-->
-      <!--        <template #title>-->
-      <!--          <div class="panel-tab__title">-->
-      <!--            <el-icon><list /></el-icon>表单-->
-      <!--          </div>-->
-      <!--        </template>-->
-      <!--        <element-form :id="elementId" :type="elementType" />-->
-      <!--      </el-collapse-item>-->
-      <el-collapse-item name="task" v-if="elementType.indexOf('Task') !== -1" key="task">
-        <template #title>
-          <div class="panel-tab__title">
-            <el-icon><checked /></el-icon>审核者
-          </div>
-        </template>
-        <element-task :id="elementId" :key="elementId" :type="elementType" />
-      </el-collapse-item>
-      <el-collapse-item name="multiInstance" v-if="elementType.indexOf('Task') !== -1" key="multiInstance">
-        <template #title>
-          <div class="panel-tab__title">
-            <el-icon><help-filled /></el-icon>会签配置
-          </div>
-        </template>
-        <element-multi-instance :business-object="elementBusinessObject" :type="elementType" />
-      </el-collapse-item>
-      <el-collapse-item name="listeners" key="listeners">
-        <template #title>
-          <div class="panel-tab__title">
-            <el-icon><bell-filled /></el-icon>执行监听器
-          </div>
-        </template>
-        <element-listeners :id="elementId" :type="elementType" />
-      </el-collapse-item>
-      <el-collapse-item name="taskListeners" v-if="elementType === 'UserTask'" key="taskListeners">
-        <template #title>
-          <div class="panel-tab__title">
-            <el-icon><bell-filled /></el-icon>任务监听器
-          </div>
-        </template>
-        <user-task-listeners :id="elementId" :type="elementType" />
-      </el-collapse-item>
-      <el-collapse-item name="extensions" key="extensions">
-        <template #title>
-          <div class="panel-tab__title">
-            <el-icon><circle-plus /></el-icon>扩展属性
-          </div>
-        </template>
-        <element-properties :id="elementId" :type="elementType" />
-      </el-collapse-item>
-      <el-collapse-item name="other" key="other">
-        <template #title>
-          <div class="panel-tab__title">
-            <el-icon><promotion /></el-icon>其他
-          </div>
-        </template>
-        <element-other-config :id="elementId" />
-      </el-collapse-item>
-    </el-collapse>
-  </div>
-</template>
-<script>
-import ElementBaseInfo from "./base/ElementBaseInfo.vue";
-import ElementOtherConfig from "./other/ElementOtherConfig.vue";
-import ElementTask from "./task/ElementTask.vue";
-import ElementMultiInstance from "./multi-instance/ElementMultiInstance.vue";
-import FlowCondition from "./flow-condition/FlowCondition.vue";
-import SignalAndMassage from "./signal-message/SignalAndMessage.vue";
-import ElementListeners from "./listeners/ElementListeners.vue";
-import ElementProperties from "./properties/ElementProperties.vue";
-// import ElementForm from "./form/ElementForm.vue";
-import UserTaskListeners from "./listeners/UserTaskListeners.vue";
-import Log from "../Log";
-/**
- * 侧边栏
- * @Author MiyueFE
- * @Home https://github.com/miyuesc
- * @Date 2021年3月31日18:57:51
- */
-export default {
-  name: "MyPropertiesPanel",
-  components: {
-    UserTaskListeners,
-    // ElementForm,
-    ElementProperties,
-    ElementListeners,
-    SignalAndMassage,
-    FlowCondition,
-    ElementMultiInstance,
-    ElementTask,
-    ElementOtherConfig,
-    ElementBaseInfo
-  },
-  componentName: "MyPropertiesPanel",
-  props: {
-    bpmnModeler: Object,
-    prefix: {
-      type: String,
-      default: "camunda"
-    },
-    width: {
-      type: Number,
-      default: 480
-    },
-    idEditDisabled: {
-      type: Boolean,
-      default: false
-    }
-  },
-  provide() {
-    return {
-      prefix: this.prefix,
-      width: this.width
-    };
-  },
-  data() {
-    return {
-      activeTab: "base",
-      elementId: "",
-      elementType: "",
-      elementBusinessObject: {}, // 元素 businessObject 镜像,提供给需要做判断的组件使用
-      conditionFormVisible: false, // 流转条件设置
-      formVisible: false // 表单配置
-    };
-  },
-  watch: {
-    elementId: {
-      handler() {
-        this.activeTab = "base";
-      }
-    }
-  },
-  created() {
-    this.initModels();
-  },
-  methods: {
-    initModels() {
-      // 初始化 modeler 以及其他 moddle
-      if (!this.bpmnModeler) {
-        // 避免加载时 流程图 并未加载完成
-        this.timer = setTimeout(() => this.initModels(), 10);
-        return;
-      }
-      if (this.timer) clearTimeout(this.timer);
-      window.bpmnInstances = {
-        modeler: this.bpmnModeler,
-        modeling: this.bpmnModeler.get("modeling"),
-        moddle: this.bpmnModeler.get("moddle"),
-        eventBus: this.bpmnModeler.get("eventBus"),
-        bpmnFactory: this.bpmnModeler.get("bpmnFactory"),
-        elementFactory: this.bpmnModeler.get("elementFactory"),
-        elementRegistry: this.bpmnModeler.get("elementRegistry"),
-        replace: this.bpmnModeler.get("replace"),
-        selection: this.bpmnModeler.get("selection")
-      };
-      this.getActiveElement();
-    },
-    getActiveElement() {
-      // 初始第一个选中元素 bpmn:Process
-      this.initFormOnChanged(null);
-      this.bpmnModeler.on("import.done", (e) => {
-        this.initFormOnChanged(null);
-      });
-      // 监听选择事件,修改当前激活的元素以及表单
-      this.bpmnModeler.on("selection.changed", ({ newSelection }) => {
-        this.initFormOnChanged(newSelection[0] || null);
-      });
-      this.bpmnModeler.on("element.changed", ({ element }) => {
-        // 保证 修改 "默认流转路径" 类似需要修改多个元素的事件发生的时候,更新表单的元素与原选中元素不一致。
-        if (element && element.id === this.elementId) {
-          this.initFormOnChanged(element);
-        }
-      });
-    },
-    // 初始化数据
-    initFormOnChanged(element) {
-      let activatedElement = element;
-      if (!activatedElement) {
-        activatedElement = window.bpmnInstances.elementRegistry.find((el) => el.type === "bpmn:Process") ?? window.bpmnInstances.elementRegistry.find((el) => el.type === "bpmn:Collaboration");
-      }
-      if (!activatedElement) return;
-      Log.printBack(`select element changed: id: ${activatedElement.id} , type: ${activatedElement.businessObject.$type}`);
-      Log.prettyInfo("businessObject", activatedElement.businessObject);
-      window.bpmnInstances.bpmnElement = activatedElement;
-      this.bpmnElement = activatedElement;
-      this.elementId = activatedElement.id;
-      this.elementType = activatedElement.type.split(":")[1] || "";
-      this.elementBusinessObject = JSON.parse(JSON.stringify(activatedElement.businessObject));
-      this.conditionFormVisible = !!(this.elementType === "SequenceFlow" && activatedElement.source && activatedElement.source.type.indexOf("StartEvent") === -1);
-      this.formVisible = this.elementType === "UserTask" || this.elementType === "StartEvent";
-    },
-    beforeUnmount() {
-      window.bpmnInstances = null;
-    }
-  }
-};
-</script>

+ 0 - 80
src/components/ren-flowable/package/penal/base/ElementBaseInfo.vue

@@ -1,80 +0,0 @@
-<template>
-  <div class="panel-tab__content">
-    <el-form label-width="90px" @submit.prevent>
-      <el-form-item label="id">
-        <el-input v-model="elementBaseInfo.id" :disabled="idEditDisabled" clearable @change="updateBaseInfo('id')" />
-      </el-form-item>
-      <el-form-item label="名称">
-        <el-input v-model="elementBaseInfo.name" clearable @change="updateBaseInfo('name')" />
-      </el-form-item>
-      <!--流程的基础属性-->
-      <!--      <template v-if="elementBaseInfo.$type === 'bpmn:Process'">-->
-      <!--        <el-form-item label="版本标签">-->
-      <!--          <el-input v-model="elementBaseInfo.versionTag" clearable @change="updateBaseInfo('versionTag')" />-->
-      <!--        </el-form-item>-->
-      <!--        <el-form-item label="可执行">-->
-      <!--          <el-switch v-model="elementBaseInfo.isExecutable" active-text="是" inactive-text="否" @change="updateBaseInfo('isExecutable')" />-->
-      <!--        </el-form-item>-->
-      <!--      </template>-->
-      <!--      <el-form-item v-if="elementBaseInfo.$type === 'bpmn:SubProcess'" label="状态">-->
-      <!--        <el-switch v-model="elementBaseInfo.isExpanded" active-text="展开" inactive-text="折叠" @change="updateBaseInfo('isExpanded')" />-->
-      <!--      </el-form-item>-->
-    </el-form>
-  </div>
-</template>
-<script>
-export default {
-  name: "ElementBaseInfo",
-  props: {
-    businessObject: Object,
-    type: String,
-    idEditDisabled: {
-      type: Boolean,
-      default: true
-    }
-  },
-  data() {
-    return {
-      elementBaseInfo: {}
-    };
-  },
-  watch: {
-    businessObject: {
-      immediate: false,
-      handler: function (val) {
-        if (val) {
-          this.$nextTick(() => this.resetBaseInfo());
-        }
-      }
-    }
-  },
-  methods: {
-    resetBaseInfo() {
-      this.bpmnElement = window?.bpmnInstances?.bpmnElement || {};
-      this.elementBaseInfo = JSON.parse(JSON.stringify(this.bpmnElement.businessObject));
-      if (this.elementBaseInfo && this.elementBaseInfo.$type === "bpmn:SubProcess") {
-        this.elementBaseInfo["isExpanded"] = this.elementBaseInfo.di?.isExpanded;
-      }
-    },
-    updateBaseInfo(key) {
-      if (key === "id") {
-        window.bpmnInstances.modeling.updateProperties(this.bpmnElement, {
-          id: this.elementBaseInfo[key],
-          di: { id: `${this.elementBaseInfo[key]}_di` }
-        });
-        return;
-      }
-      if (key === "isExpanded") {
-        window?.bpmnInstances?.modeling.toggleCollapse(this.bpmnElement);
-        return;
-      }
-      const attrObj = Object.create(null);
-      attrObj[key] = this.elementBaseInfo[key];
-      window.bpmnInstances.modeling.updateProperties(this.bpmnElement, attrObj);
-    }
-  },
-  beforeUnmount() {
-    this.bpmnElement = null;
-  }
-};
-</script>

+ 0 - 142
src/components/ren-flowable/package/penal/flow-condition/FlowCondition.vue

@@ -1,142 +0,0 @@
-<template>
-  <div class="panel-tab__content">
-    <el-form :model="flowConditionForm" label-width="90px" @submit.prevent>
-      <el-form-item label="流转类型">
-        <el-select v-model="flowConditionForm.type" @change="updateFlowType">
-          <el-option label="普通流转路径" value="normal" />
-          <el-option label="默认流转路径" value="default" />
-          <el-option label="条件流转路径" value="condition" />
-        </el-select>
-      </el-form-item>
-      <!--      <el-form-item label="条件格式" v-if="flowConditionForm.type === 'condition'" key="condition">-->
-      <!--        <el-select v-model="flowConditionForm.conditionType">-->
-      <!--          <el-option label="表达式" value="expression" />-->
-      <!--          <el-option label="脚本" value="script" />-->
-      <!--        </el-select>-->
-      <!--      </el-form-item>-->
-      <el-form-item label="表达式" v-if="flowConditionForm.conditionType && flowConditionForm.conditionType === 'expression'" key="express">
-        <el-input v-model="flowConditionForm.body" clearable @change="updateFlowCondition" />
-      </el-form-item>
-      <!--      <template v-if="flowConditionForm.conditionType && flowConditionForm.conditionType === 'script'">-->
-      <!--        <el-form-item label="脚本语言" key="language">-->
-      <!--          <el-input v-model="flowConditionForm.language" clearable @change="updateFlowCondition" />-->
-      <!--        </el-form-item>-->
-      <!--        <el-form-item label="脚本类型" key="scriptType">-->
-      <!--          <el-select v-model="flowConditionForm.scriptType">-->
-      <!--            <el-option label="内联脚本" value="inlineScript" />-->
-      <!--            <el-option label="外部脚本" value="externalScript" />-->
-      <!--          </el-select>-->
-      <!--        </el-form-item>-->
-      <!--        <el-form-item label="脚本" v-if="flowConditionForm.scriptType === 'inlineScript'" key="body">-->
-      <!--          <el-input v-model="flowConditionForm.body" type="textarea" clearable @change="updateFlowCondition" />-->
-      <!--        </el-form-item>-->
-      <!--        <el-form-item label="资源地址" v-if="flowConditionForm.scriptType === 'externalScript'" key="resource">-->
-      <!--          <el-input v-model="flowConditionForm.resource" clearable @change="updateFlowCondition" />-->
-      <!--        </el-form-item>-->
-      <!--      </template>-->
-    </el-form>
-  </div>
-</template>
-
-<script>
-export default {
-  name: "FlowCondition",
-  props: {
-    businessObject: Object,
-    type: String
-  },
-  data() {
-    return {
-      flowConditionForm: {}
-    };
-  },
-  watch: {
-    businessObject: {
-      immediate: true,
-      handler() {
-        this.$nextTick(() => this.resetFlowCondition());
-      }
-    }
-  },
-  methods: {
-    resetFlowCondition() {
-      this.bpmnElement = window.bpmnInstances.bpmnElement;
-      this.bpmnElementSource = this.bpmnElement.source;
-      this.bpmnElementSourceRef = this.bpmnElement.businessObject.sourceRef;
-      if (this.bpmnElementSourceRef && this.bpmnElementSourceRef.default && this.bpmnElementSourceRef.default.id === this.bpmnElement.id) {
-        // 默认
-        this.flowConditionForm = { type: "default" };
-      } else if (!this.bpmnElement.businessObject.conditionExpression) {
-        // 普通
-        this.flowConditionForm = { type: "normal" };
-      } else {
-        // 带条件
-        const conditionExpression = this.bpmnElement.businessObject.conditionExpression;
-        this.flowConditionForm = { ...conditionExpression, type: "condition" };
-        // resource 可直接标识 是否是外部资源脚本
-        if (this.flowConditionForm.resource) {
-          this.flowConditionForm["conditionType"] = "script";
-          this.flowConditionForm["scriptType"] = "externalScript";
-          return;
-        }
-        if (conditionExpression.language) {
-          this.flowConditionForm["conditionType"] = "script";
-          this.flowConditionForm["scriptType"] = "inlineScript";
-          return;
-        }
-        this.flowConditionForm["conditionType"] = "expression";
-      }
-    },
-    updateFlowType(flowType) {
-      // 正常条件类
-      if (flowType === "condition") {
-        this.flowConditionRef = window.bpmnInstances.moddle.create("bpmn:FormalExpression");
-        window.bpmnInstances.modeling.updateProperties(this.bpmnElement, {
-          conditionExpression: this.flowConditionRef
-        });
-        return;
-      }
-      // 默认路径
-      if (flowType === "default") {
-        window.bpmnInstances.modeling.updateProperties(this.bpmnElement, {
-          conditionExpression: null
-        });
-        window.bpmnInstances.modeling.updateProperties(this.bpmnElementSource, {
-          default: this.bpmnElement
-        });
-        return;
-      }
-      // 正常路径,如果来源节点的默认路径是当前连线时,清除父元素的默认路径配置
-      if (this.bpmnElementSourceRef.default && this.bpmnElementSourceRef.default.id === this.bpmnElement.id) {
-        window.bpmnInstances.modeling.updateProperties(this.bpmnElementSource, {
-          default: null
-        });
-      }
-      window.bpmnInstances.modeling.updateProperties(this.bpmnElement, {
-        conditionExpression: null
-      });
-    },
-    updateFlowCondition() {
-      const { conditionType, scriptType, body, resource, language } = this.flowConditionForm;
-      let condition;
-      if (conditionType === "expression") {
-        condition = window.bpmnInstances.moddle.create("bpmn:FormalExpression", { body });
-      } else {
-        if (scriptType === "inlineScript") {
-          condition = window.bpmnInstances.moddle.create("bpmn:FormalExpression", { body, language });
-          this.flowConditionForm["resource"] = "";
-        } else {
-          this.flowConditionForm["body"] = "";
-          condition = window.bpmnInstances.moddle.create("bpmn:FormalExpression", { resource, language });
-        }
-      }
-      window.bpmnInstances.modeling.updateProperties(this.bpmnElement, { conditionExpression: condition });
-    }
-  },
-  beforeUnmount() {
-    this.bpmnElement = null;
-    this.bpmnElementSource = null;
-    this.bpmnElementSourceRef = null;
-  }
-};
-</script>

+ 0 - 377
src/components/ren-flowable/package/penal/form/ElementForm.vue

@@ -1,377 +0,0 @@
-<template>
-  <div class="panel-tab__content">
-    <el-form label-width="80px" @submit.prevent>
-      <el-form-item label="表单标识">
-        <el-input v-model="formKey" clearable @change="updateElementFormKey" />
-      </el-form-item>
-      <el-form-item label="业务标识">
-        <el-select v-model="businessKey" @change="updateElementBusinessKey">
-          <el-option v-for="i in fieldList" :key="i.id" :value="i.id" :label="i.label" />
-          <el-option label="无" value="" />
-        </el-select>
-      </el-form-item>
-    </el-form>
-
-    <!--字段列表-->
-    <div class="element-property list-property">
-      <el-divider
-        ><el-icon><coin /></el-icon> 表单字段</el-divider
-      >
-      <el-table :data="fieldList" max-height="240" border fit>
-        <el-table-column label="序号" type="index" width="50px" />
-        <el-table-column label="字段名称" prop="label" min-width="80px" show-overflow-tooltip />
-        <el-table-column label="字段类型" prop="type" min-width="80px" :formatter="(row) => fieldType[row.type] || row.type" show-overflow-tooltip />
-        <el-table-column label="默认值" prop="defaultValue" min-width="80px" show-overflow-tooltip />
-        <el-table-column label="操作" width="90px">
-          <template v-slot="{ row, $index }">
-            <el-button link type="" @click="openFieldForm(row, $index)">编辑</el-button>
-            <el-divider direction="vertical" />
-            <el-button link type="" style="color: #ff4d4f" @click="removeField(row, $index)">移除</el-button>
-          </template>
-        </el-table-column>
-      </el-table>
-    </div>
-    <div class="element-drawer__button">
-      <el-button type="primary" @click="openFieldForm(null, -1)">添加字段</el-button>
-    </div>
-
-    <!--字段配置侧边栏-->
-    <el-drawer v-model="fieldModelVisible" title="字段配置" :size="`${width}px`" append-to-body destroy-on-close>
-      <el-form :model="formFieldForm" label-width="90px" @submit.prevent>
-        <el-form-item label="字段ID">
-          <el-input v-model="formFieldForm.id" clearable />
-        </el-form-item>
-        <el-form-item label="类型">
-          <el-select v-model="formFieldForm.typeType" placeholder="请选择字段类型" clearable @change="changeFieldTypeType">
-            <el-option v-for="(value, key) of fieldType" :key="key" :label="value" :value="key" />
-          </el-select>
-        </el-form-item>
-        <el-form-item v-if="formFieldForm.typeType === 'custom'" label="类型名称">
-          <el-input v-model="formFieldForm.type" clearable />
-        </el-form-item>
-        <el-form-item label="名称">
-          <el-input v-model="formFieldForm.label" clearable />
-        </el-form-item>
-        <el-form-item v-if="formFieldForm.typeType === 'date'" label="时间格式">
-          <el-input v-model="formFieldForm.datePattern" clearable />
-        </el-form-item>
-        <el-form-item label="默认值">
-          <el-input v-model="formFieldForm.defaultValue" clearable />
-        </el-form-item>
-      </el-form>
-
-      <!-- 枚举值设置 -->
-      <template v-if="formFieldForm.type === 'enum'">
-        <el-divider key="enum-divider" />
-        <p key="enum-title" class="listener-filed__title">
-          <span
-            ><el-icon><menu /></el-icon>枚举值列表:</span
-          >
-          <el-button type="primary" @click="openFieldOptionForm(null, -1, 'enum')">添加枚举值</el-button>
-        </p>
-        <el-table key="enum-table" :data="fieldEnumList" max-height="240" border fit>
-          <el-table-column label="序号" width="50px" type="index" />
-          <el-table-column label="枚举值编号" prop="id" min-width="100px" show-overflow-tooltip />
-          <el-table-column label="枚举值名称" prop="name" min-width="100px" show-overflow-tooltip />
-          <el-table-column label="操作" width="90px">
-            <template v-slot="{ row, $index }">
-              <el-button link type="" @click="openFieldOptionForm(row, $index, 'enum')">编辑</el-button>
-              <el-divider direction="vertical" />
-              <el-button link type="" style="color: #ff4d4f" @click="removeFieldOptionItem(row, $index, 'enum')">移除</el-button>
-            </template>
-          </el-table-column>
-        </el-table>
-      </template>
-
-      <!-- 校验规则 -->
-      <el-divider key="validation-divider" />
-      <p key="validation-title" class="listener-filed__title">
-        <span
-          ><el-icon><menu /></el-icon>约束条件列表:</span
-        >
-        <el-button type="primary" @click="openFieldOptionForm(null, -1, 'constraint')">添加约束</el-button>
-      </p>
-      <el-table key="validation-table" :data="fieldConstraintsList" max-height="240" border fit>
-        <el-table-column label="序号" width="50px" type="index" />
-        <el-table-column label="约束名称" prop="name" min-width="100px" show-overflow-tooltip />
-        <el-table-column label="约束配置" prop="config" min-width="100px" show-overflow-tooltip />
-        <el-table-column label="操作" width="90px">
-          <template v-slot="{ row, $index }">
-            <el-button link type="" @click="openFieldOptionForm(row, $index, 'constraint')">编辑</el-button>
-            <el-divider direction="vertical" />
-            <el-button link type="" style="color: #ff4d4f" @click="removeFieldOptionItem(row, $index, 'constraint')">移除</el-button>
-          </template>
-        </el-table-column>
-      </el-table>
-
-      <!-- 表单属性 -->
-      <el-divider key="property-divider" />
-      <p key="property-title" class="listener-filed__title">
-        <span
-          ><el-icon><menu /></el-icon>字段属性列表:</span
-        >
-        <el-button type="primary" @click="openFieldOptionForm(null, -1, 'property')">添加属性</el-button>
-      </p>
-      <el-table key="property-table" :data="fieldPropertiesList" max-height="240" border fit>
-        <el-table-column label="序号" width="50px" type="index" />
-        <el-table-column label="属性编号" prop="id" min-width="100px" show-overflow-tooltip />
-        <el-table-column label="属性值" prop="value" min-width="100px" show-overflow-tooltip />
-        <el-table-column label="操作" width="90px">
-          <template v-slot="{ row, $index }">
-            <el-button link type="" @click="openFieldOptionForm(row, $index, 'property')">编辑</el-button>
-            <el-divider direction="vertical" />
-            <el-button link type="" style="color: #ff4d4f" @click="removeFieldOptionItem(row, $index, 'property')">移除</el-button>
-          </template>
-        </el-table-column>
-      </el-table>
-
-      <!-- 底部按钮 -->
-      <div class="element-drawer__button">
-        <el-button size="small">取 消</el-button>
-        <el-button type="primary" @click="saveField">保 存</el-button>
-      </div>
-    </el-drawer>
-
-    <el-dialog v-model="fieldOptionModelVisible" :title="optionModelTitle" width="600px" append-to-body destroy-on-close>
-      <el-form :model="fieldOptionForm" label-width="96px" @submit.prevent>
-        <el-form-item v-if="fieldOptionType !== 'constraint'" key="option-id" label="编号/ID">
-          <el-input v-model="fieldOptionForm.id" clearable />
-        </el-form-item>
-        <el-form-item v-if="fieldOptionType !== 'property'" key="option-name" label="名称">
-          <el-input v-model="fieldOptionForm.name" clearable />
-        </el-form-item>
-        <el-form-item v-if="fieldOptionType === 'constraint'" key="option-config" label="配置">
-          <el-input v-model="fieldOptionForm.config" clearable />
-        </el-form-item>
-        <el-form-item v-if="fieldOptionType === 'property'" key="option-value" label="值">
-          <el-input v-model="fieldOptionForm.value" clearable />
-        </el-form-item>
-      </el-form>
-      <template v-slot:footer>
-        <el-button @click="fieldOptionModelVisible = false">取 消</el-button>
-        <el-button type="primary" @click="saveFieldOption">确 定</el-button>
-      </template>
-    </el-dialog>
-  </div>
-</template>
-
-<script>
-import { Plus } from "@element-plus/icons-vue";
-export default {
-  name: "ElementForm",
-  setup() {
-    return {
-      Plus
-    };
-  },
-  props: {
-    id: String,
-    type: String
-  },
-  inject: {
-    prefix: "prefix",
-    width: "width"
-  },
-  data() {
-    return {
-      formKey: "",
-      businessKey: "",
-      optionModelTitle: "",
-      fieldList: [],
-      formFieldForm: {},
-      fieldType: {
-        long: "长整型",
-        string: "字符串",
-        boolean: "布尔类",
-        date: "日期类",
-        enum: "枚举类",
-        custom: "自定义类型"
-      },
-      formFieldIndex: -1, // 编辑中的字段, -1 为新增
-      formFieldOptionIndex: -1, // 编辑中的字段配置项, -1 为新增
-      fieldModelVisible: false,
-      fieldOptionModelVisible: false,
-      fieldOptionForm: {}, // 当前激活的字段配置项数据
-      fieldOptionType: "", // 当前激活的字段配置项弹窗 类型
-      fieldEnumList: [], // 枚举值列表
-      fieldConstraintsList: [], // 约束条件列表
-      fieldPropertiesList: [] // 绑定属性列表
-    };
-  },
-  watch: {
-    id: {
-      immediate: true,
-      handler(val) {
-        val && val.length && this.$nextTick(() => this.resetFormList());
-      }
-    }
-  },
-  methods: {
-    resetFormList() {
-      this.bpmnELement = window.bpmnInstances.bpmnElement;
-      this.formKey = this.bpmnELement.businessObject.formKey;
-      // 获取元素扩展属性 或者 创建扩展属性
-      this.elExtensionElements = this.bpmnELement.businessObject.get("extensionElements") || window.bpmnInstances.moddle.create("bpmn:ExtensionElements", { values: [] });
-      // 获取元素表单配置 或者 创建新的表单配置
-      try {
-        this.formData = this.elExtensionElements.values.filter((ex) => ex.$type === `${this.prefix}:FormData`)[0] || window.bpmnInstances.moddle.create(`${this.prefix}:FormData`, { fields: [] });
-      } catch (error) {
-        this.formData = {};
-        console.log(error);
-      }
-
-      // 业务标识 businessKey, 绑定在 formData 中
-      this.businessKey = this.formData.businessKey;
-
-      // 保留剩余扩展元素,便于后面更新该元素对应属性
-      this.otherExtensions = this.elExtensionElements.values.filter((ex) => ex.$type !== `${this.prefix}:FormData`);
-
-      // 复制原始值,填充表格
-      this.fieldList = JSON.parse(JSON.stringify(this.formData.fields || []));
-
-      // 更新元素扩展属性,避免后续报错
-      this.updateElementExtensions();
-    },
-    updateElementFormKey() {
-      window.bpmnInstances.modeling.updateProperties(this.bpmnELement, { formKey: this.formKey });
-    },
-    updateElementBusinessKey() {
-      window.bpmnInstances.modeling.updateModdleProperties(this.bpmnELement, this.formData, { businessKey: this.businessKey });
-    },
-    // 根据类型调整字段type
-    changeFieldTypeType(type) {
-      this.formFieldForm["type"] = type === "custom" ? "" : type;
-    },
-
-    // 打开字段详情侧边栏
-    openFieldForm(field, index) {
-      this.formFieldIndex = index;
-      if (index !== -1) {
-        const FieldObject = this.formData.fields[index];
-        this.formFieldForm = JSON.parse(JSON.stringify(field));
-        // 设置自定义类型
-        this.formFieldForm["typeType"] = !this.fieldType[field.type] ? "custom" : field.type;
-        // 初始化枚举值列表
-        field.type === "enum" && (this.fieldEnumList = JSON.parse(JSON.stringify(FieldObject?.values || [])));
-        // 初始化约束条件列表
-        this.fieldConstraintsList = JSON.parse(JSON.stringify(FieldObject?.validation?.constraints || []));
-        // 初始化自定义属性列表
-        this.fieldPropertiesList = JSON.parse(JSON.stringify(FieldObject?.properties?.values || []));
-      } else {
-        this.formFieldForm = {};
-        // 初始化枚举值列表
-        this.fieldEnumList = [];
-        // 初始化约束条件列表
-        this.fieldConstraintsList = [];
-        // 初始化自定义属性列表
-        this.fieldPropertiesList = [];
-      }
-      this.fieldModelVisible = true;
-    },
-    // 打开字段 某个 配置项 弹窗
-    openFieldOptionForm(option, index, type) {
-      this.fieldOptionModelVisible = true;
-      this.fieldOptionType = type;
-      this.formFieldOptionIndex = index;
-      if (type === "property") {
-        this.fieldOptionForm = option ? JSON.parse(JSON.stringify(option)) : {};
-        return (this.optionModelTitle = "属性配置");
-      }
-      if (type === "enum") {
-        this.fieldOptionForm = option ? JSON.parse(JSON.stringify(option)) : {};
-        return (this.optionModelTitle = "枚举值配置");
-      }
-      this.fieldOptionForm = option ? JSON.parse(JSON.stringify(option)) : {};
-      return (this.optionModelTitle = "约束条件配置");
-    },
-
-    // 保存字段 某个 配置项
-    saveFieldOption() {
-      if (this.formFieldOptionIndex === -1) {
-        if (this.fieldOptionType === "property") {
-          this.fieldPropertiesList.push(this.fieldOptionForm);
-        }
-        if (this.fieldOptionType === "constraint") {
-          this.fieldConstraintsList.push(this.fieldOptionForm);
-        }
-        if (this.fieldOptionType === "enum") {
-          this.fieldEnumList.push(this.fieldOptionForm);
-        }
-      } else {
-        this.fieldOptionType === "property" && this.fieldPropertiesList.splice(this.formFieldOptionIndex, 1, this.fieldOptionForm);
-        this.fieldOptionType === "constraint" && this.fieldConstraintsList.splice(this.formFieldOptionIndex, 1, this.fieldOptionForm);
-        this.fieldOptionType === "enum" && this.fieldEnumList.splice(this.formFieldOptionIndex, 1, this.fieldOptionForm);
-      }
-      this.fieldOptionModelVisible = false;
-      this.fieldOptionForm = {};
-    },
-    // 保存字段配置
-    saveField() {
-      const { id, type, label, defaultValue, datePattern } = this.formFieldForm;
-      const Field = window.bpmnInstances.moddle.create(`${this.prefix}:FormField`, { id, type, label });
-      defaultValue && (Field.defaultValue = defaultValue);
-      datePattern && (Field.datePattern = datePattern);
-      // 构建属性
-      if (this.fieldPropertiesList && this.fieldPropertiesList.length) {
-        const fieldPropertyList = this.fieldPropertiesList.map((fp) => {
-          return window.bpmnInstances.moddle.create(`${this.prefix}:Property`, { id: fp.id, value: fp.value });
-        });
-        Field.properties = window.bpmnInstances.moddle.create(`${this.prefix}:Properties`, { values: fieldPropertyList });
-      }
-      // 构建校验规则
-      if (this.fieldConstraintsList && this.fieldConstraintsList.length) {
-        const fieldConstraintList = this.fieldConstraintsList.map((fc) => {
-          return window.bpmnInstances.moddle.create(`${this.prefix}:Constraint`, { name: fc.name, config: fc.config });
-        });
-        Field.validation = window.bpmnInstances.moddle.create(`${this.prefix}:Validation`, { constraints: fieldConstraintList });
-      }
-      // 构建枚举值
-      if (this.fieldEnumList && this.fieldEnumList.length) {
-        Field.values = this.fieldEnumList.map((fe) => {
-          return window.bpmnInstances.moddle.create(`${this.prefix}:Value`, { name: fe.name, id: fe.id });
-        });
-      }
-      // 更新数组 与 表单配置实例
-      if (this.formFieldIndex === -1) {
-        this.fieldList.push(this.formFieldForm);
-        this.formData.fields && this.formData.fields.push(Field);
-      } else {
-        this.fieldList.splice(this.formFieldIndex, 1, this.formFieldForm);
-        this.formData.fields.splice(this.formFieldIndex, 1, Field);
-      }
-      this.updateElementExtensions();
-      this.fieldModelVisible = false;
-    },
-
-    // 移除某个 字段的 配置项
-    removeFieldOptionItem(option, index, type) {
-      if (type === "property") {
-        this.fieldPropertiesList.splice(index, 1);
-        return;
-      }
-      if (type === "enum") {
-        this.fieldEnumList.splice(index, 1);
-        return;
-      }
-      this.fieldConstraintsList.splice(index, 1);
-    },
-    // 移除 字段
-    removeField(field, index) {
-      this.fieldList.splice(index, 1);
-      this.formData.fields.splice(index, 1);
-      this.updateElementExtensions();
-    },
-
-    updateElementExtensions() {
-      // 更新回扩展元素
-      const newElExtensionElements = window.bpmnInstances.moddle.create(`bpmn:ExtensionElements`, {
-        values: this.otherExtensions.concat(this.formData)
-      });
-      // 更新到元素上
-      window.bpmnInstances.modeling.updateProperties(this.bpmnELement, {
-        extensionElements: newElExtensionElements
-      });
-    }
-  }
-};
-</script>

+ 0 - 7
src/components/ren-flowable/package/penal/index.js

@@ -1,7 +0,0 @@
-import MyPropertiesPanel from './PropertiesPanel.vue';
-
-MyPropertiesPanel.install = function(Vue) {
-  Vue.component(MyPropertiesPanel.name, MyPropertiesPanel);
-};
-
-export default MyPropertiesPanel;

+ 0 - 248
src/components/ren-flowable/package/penal/listeners/ElementListeners.vue

@@ -1,248 +0,0 @@
-<template>
-  <div class="panel-tab__content">
-    <el-table :data="elementListenersList" border>
-      <el-table-column label="序号" width="50px" type="index" />
-      <el-table-column label="事件类型" min-width="100px" prop="event" />
-      <el-table-column label="监听器类型" min-width="100px" show-overflow-tooltip :formatter="(row) => listenerTypeObject[row.listenerType]" />
-      <el-table-column label="操作" width="90px">
-        <template v-slot="{ row, $index }">
-          <el-button link type="" @click="openListenerForm(row, $index)">编辑</el-button>
-          <el-divider direction="vertical" />
-          <el-button link type="" style="color: #ff4d4f" @click="removeListener(row, $index)">移除</el-button>
-        </template>
-      </el-table-column>
-    </el-table>
-    <div class="element-drawer__button">
-      <el-button type="primary" @click="openListenerForm(null)">添加监听器</el-button>
-    </div>
-
-    <!-- 监听器 编辑/创建 部分 -->
-    <el-drawer v-model="listenerFormModelVisible" title="执行监听器" :size="`${width}px`" append-to-body destroy-on-close>
-      <el-form :model="listenerForm" label-width="96px" ref="listenerFormRef" @submit.prevent>
-        <el-form-item label="事件类型" prop="event" :rules="{ required: true, trigger: ['blur', 'change'] }">
-          <el-select v-model="listenerForm.event">
-            <el-option label="start" value="start" />
-            <el-option label="end" value="end" />
-          </el-select>
-        </el-form-item>
-        <el-form-item label="监听器类型" prop="listenerType" :rules="{ required: true, trigger: ['blur', 'change'] }">
-          <el-select v-model="listenerForm.listenerType">
-            <el-option v-for="i in Object.keys(listenerTypeObject)" :key="i" :label="listenerTypeObject[i]" :value="i" />
-          </el-select>
-        </el-form-item>
-        <el-form-item v-if="listenerForm.listenerType === 'classListener'" label="Java类" prop="class" key="listener-class" :rules="{ required: true, trigger: ['blur', 'change'] }">
-          <el-input v-model="listenerForm.class" clearable />
-        </el-form-item>
-        <el-form-item v-if="listenerForm.listenerType === 'expressionListener'" label="表达式" prop="expression" key="listener-expression" :rules="{ required: true, trigger: ['blur', 'change'] }">
-          <el-input v-model="listenerForm.expression" clearable />
-        </el-form-item>
-        <el-form-item v-if="listenerForm.listenerType === 'delegateExpressionListener'" label="代理表达式" prop="delegateExpression" key="listener-delegate" :rules="{ required: true, trigger: ['blur', 'change'] }">
-          <el-input v-model="listenerForm.delegateExpression" clearable />
-        </el-form-item>
-        <template v-if="listenerForm.listenerType === 'scriptListener'">
-          <el-form-item label="脚本格式" prop="scriptFormat" key="listener-script-format" :rules="{ required: true, trigger: ['blur', 'change'], message: '请填写脚本格式' }">
-            <el-input v-model="listenerForm.scriptFormat" clearable />
-          </el-form-item>
-          <el-form-item label="脚本类型" prop="scriptType" key="listener-script-type" :rules="{ required: true, trigger: ['blur', 'change'], message: '请选择脚本类型' }">
-            <el-select v-model="listenerForm.scriptType">
-              <el-option label="内联脚本" value="inlineScript" />
-              <el-option label="外部脚本" value="externalScript" />
-            </el-select>
-          </el-form-item>
-          <el-form-item v-if="listenerForm.scriptType === 'inlineScript'" label="脚本内容" prop="value" key="listener-script" :rules="{ required: true, trigger: ['blur', 'change'], message: '请填写脚本内容' }">
-            <el-input v-model="listenerForm.value" clearable />
-          </el-form-item>
-          <el-form-item v-if="listenerForm.scriptType === 'externalScript'" label="资源地址" prop="resource" key="listener-resource" :rules="{ required: true, trigger: ['blur', 'change'], message: '请填写资源地址' }">
-            <el-input v-model="listenerForm.resource" clearable />
-          </el-form-item>
-        </template>
-      </el-form>
-      <el-divider />
-      <p class="listener-filed__title">
-        <span
-          ><el-icon><Menu /></el-icon>注入字段:</span
-        >
-        <el-button type="primary" @click="openListenerFieldForm(null)">添加字段</el-button>
-      </p>
-      <el-table :data="fieldsListOfListener" max-height="240" border fit style="flex: none">
-        <el-table-column label="序号" width="50px" type="index" />
-        <el-table-column label="字段名称" min-width="100px" prop="name" />
-        <el-table-column label="字段类型" min-width="80px" show-overflow-tooltip :formatter="(row) => fieldTypeObject[row.fieldType]" />
-        <el-table-column label="字段值/表达式" min-width="100px" show-overflow-tooltip :formatter="(row) => row.string || row.expression" />
-        <el-table-column label="操作" width="100px">
-          <template v-slot="{ row, $index }">
-            <el-button link type="" @click="openListenerFieldForm(row, $index)">编辑</el-button>
-            <el-divider direction="vertical" />
-            <el-button link type="" style="color: #ff4d4f" @click="removeListenerField(row, $index)">移除</el-button>
-          </template>
-        </el-table-column>
-      </el-table>
-
-      <div class="element-drawer__button">
-        <el-button @click="listenerFormModelVisible = false">取 消</el-button>
-        <el-button type="primary" @click="saveListenerConfig">保 存</el-button>
-      </div>
-    </el-drawer>
-
-    <!-- 注入西段 编辑/创建 部分 -->
-    <el-dialog title="字段配置" v-model="listenerFieldFormModelVisible" width="600px" append-to-body destroy-on-close>
-      <el-form :model="listenerFieldForm" label-width="96px" ref="listenerFieldFormRef" style="height: 136px" @submit.prevent>
-        <el-form-item label="字段名称:" prop="name" :rules="{ required: true, trigger: ['blur', 'change'] }">
-          <el-input v-model="listenerFieldForm.name" clearable />
-        </el-form-item>
-        <el-form-item label="字段类型:" prop="fieldType" :rules="{ required: true, trigger: ['blur', 'change'] }">
-          <el-select v-model="listenerFieldForm.fieldType">
-            <el-option v-for="i in Object.keys(fieldTypeObject)" :key="i" :label="fieldTypeObject[i]" :value="i" />
-          </el-select>
-        </el-form-item>
-        <el-form-item v-if="listenerFieldForm.fieldType === 'string'" label="字段值:" prop="string" key="field-string" :rules="{ required: true, trigger: ['blur', 'change'] }">
-          <el-input v-model="listenerFieldForm.string" clearable />
-        </el-form-item>
-        <el-form-item v-if="listenerFieldForm.fieldType === 'expression'" label="表达式:" prop="expression" key="field-expression" :rules="{ required: true, trigger: ['blur', 'change'] }">
-          <el-input v-model="listenerFieldForm.expression" clearable />
-        </el-form-item>
-      </el-form>
-      <template v-slot:footer>
-        <el-button @click="listenerFieldFormModelVisible = false">取 消</el-button>
-        <el-button type="primary" @click="saveListenerFiled">确 定</el-button>
-      </template>
-    </el-dialog>
-  </div>
-</template>
-<script>
-import { createListenerObject, updateElementExtensions } from "../../utils";
-import { initListenerType, initListenerForm, listenerType, fieldType } from "./utilSelf";
-
-export default {
-  name: "ElementListeners",
-  props: {
-    id: String,
-    type: String
-  },
-  inject: {
-    prefix: "prefix",
-    width: "width"
-  },
-  data() {
-    return {
-      elementListenersList: [], // 监听器列表
-      listenerForm: {}, // 监听器详情表单
-      listenerFormModelVisible: false, // 监听器 编辑 侧边栏显示状态
-      fieldsListOfListener: [],
-      listenerFieldForm: {}, // 监听器 注入字段 详情表单
-      listenerFieldFormModelVisible: false, // 监听器 注入字段表单弹窗 显示状态
-      editingListenerIndex: -1, // 监听器所在下标,-1 为新增
-      editingListenerFieldIndex: -1, // 字段所在下标,-1 为新增
-      listenerTypeObject: listenerType,
-      fieldTypeObject: fieldType
-    };
-  },
-  watch: {
-    id: {
-      immediate: true,
-      handler(val) {
-        val && val.length && this.$nextTick(() => this.resetListenersList());
-      }
-    }
-  },
-  methods: {
-    resetListenersList() {
-      this.bpmnElement = window.bpmnInstances.bpmnElement;
-      this.otherExtensionList = [];
-      this.bpmnElementListeners = this.bpmnElement.businessObject?.extensionElements?.values?.filter((ex) => ex.$type === `${this.prefix}:ExecutionListener`) ?? [];
-      this.elementListenersList = this.bpmnElementListeners.map((listener) => initListenerType(listener));
-    },
-    // 打开 监听器详情 侧边栏
-    openListenerForm(listener, index) {
-      if (listener) {
-        this.listenerForm = initListenerForm(listener);
-        this.editingListenerIndex = index;
-      } else {
-        this.listenerForm = {};
-        this.editingListenerIndex = -1; // 标记为新增
-      }
-      if (listener && listener.fields) {
-        this.fieldsListOfListener = listener.fields.map((field) => ({
-          ...field,
-          fieldType: field.string ? "string" : "expression"
-        }));
-      } else {
-        this.fieldsListOfListener = [];
-        this.listenerForm["fields"] = [];
-      }
-      // 打开侧边栏并清楚验证状态
-      this.listenerFormModelVisible = true;
-      this.$nextTick(() => {
-        if (this.$refs["listenerFormRef"]) this.$refs["listenerFormRef"].clearValidate();
-      });
-    },
-    // 打开监听器字段编辑弹窗
-    openListenerFieldForm(field, index) {
-      this.listenerFieldForm = field ? JSON.parse(JSON.stringify(field)) : {};
-      this.editingListenerFieldIndex = field ? index : -1;
-      this.listenerFieldFormModelVisible = true;
-      this.$nextTick(() => {
-        if (this.$refs["listenerFieldFormRef"]) this.$refs["listenerFieldFormRef"].clearValidate();
-      });
-    },
-    // 保存监听器注入字段
-    async saveListenerFiled() {
-      let validateStatus = await this.$refs["listenerFieldFormRef"].validate();
-      if (!validateStatus) return; // 验证不通过直接返回
-      if (this.editingListenerFieldIndex === -1) {
-        this.fieldsListOfListener.push(this.listenerFieldForm);
-        this.listenerForm.fields.push(this.listenerFieldForm);
-      } else {
-        this.fieldsListOfListener.splice(this.editingListenerFieldIndex, 1, this.listenerFieldForm);
-        this.listenerForm.fields.splice(this.editingListenerFieldIndex, 1, this.listenerFieldForm);
-      }
-      this.listenerFieldFormModelVisible = false;
-      this.$nextTick(() => (this.listenerFieldForm = {}));
-    },
-    // 移除监听器字段
-    removeListenerField(field, index) {
-      this.$confirm("确认移除该字段吗?", "提示", {
-        confirmButtonText: "确 认",
-        cancelButtonText: "取 消"
-      })
-        .then(() => {
-          this.fieldsListOfListener.splice(index, 1);
-          this.listenerForm.fields.splice(index, 1);
-        })
-        .catch(() => console.info("操作取消"));
-    },
-    // 移除监听器
-    removeListener(listener, index) {
-      this.$confirm("确认移除该监听器吗?", "提示", {
-        confirmButtonText: "确 认",
-        cancelButtonText: "取 消"
-      })
-        .then(() => {
-          this.bpmnElementListeners.splice(index, 1);
-          this.elementListenersList.splice(index, 1);
-          updateElementExtensions(this.bpmnElement, this.otherExtensionList.concat(this.bpmnElementListeners));
-        })
-        .catch(() => console.info("操作取消"));
-    },
-    // 保存监听器配置
-    async saveListenerConfig() {
-      let validateStatus = await this.$refs["listenerFormRef"].validate();
-      if (!validateStatus) return; // 验证不通过直接返回
-      const listenerObject = createListenerObject(this.listenerForm, false, this.prefix);
-      if (this.editingListenerIndex === -1) {
-        this.bpmnElementListeners.push(listenerObject);
-        this.elementListenersList.push(this.listenerForm);
-      } else {
-        this.bpmnElementListeners.splice(this.editingListenerIndex, 1, listenerObject);
-        this.elementListenersList.splice(this.editingListenerIndex, 1, this.listenerForm);
-      }
-      // 保存其他配置
-      this.otherExtensionList = this.bpmnElement.businessObject?.extensionElements?.values?.filter((ex) => ex.$type !== `${this.prefix}:ExecutionListener`) ?? [];
-      updateElementExtensions(this.bpmnElement, this.otherExtensionList.concat(this.bpmnElementListeners));
-      // 4. 隐藏侧边栏
-      this.listenerFormModelVisible = false;
-      this.listenerForm = {};
-    }
-  }
-};
-</script>

+ 0 - 288
src/components/ren-flowable/package/penal/listeners/UserTaskListeners.vue

@@ -1,288 +0,0 @@
-<template>
-  <div class="panel-tab__content">
-    <el-table :data="elementListenersList" border>
-      <el-table-column label="序号" width="50px" type="index" />
-      <el-table-column label="事件类型" min-width="80px" show-overflow-tooltip :formatter="(row) => listenerEventTypeObject[row.event]" />
-      <el-table-column label="事件id" min-width="80px" prop="id" show-overflow-tooltip />
-      <el-table-column label="监听器类型" min-width="80px" show-overflow-tooltip :formatter="(row) => listenerTypeObject[row.listenerType]" />
-      <el-table-column label="操作" width="90px">
-        <template v-slot="{ row, $index }">
-          <el-button link type="" @click="openListenerForm(row, $index)">编辑</el-button>
-          <el-divider direction="vertical" />
-          <el-button link type="" style="color: #ff4d4f" @click="removeListener(row, $index)">移除</el-button>
-        </template>
-      </el-table-column>
-    </el-table>
-    <div class="element-drawer__button">
-      <el-button type="primary" @click="openListenerForm(null)">添加监听器</el-button>
-    </div>
-
-    <!-- 监听器 编辑/创建 部分 -->
-    <el-drawer v-model="listenerFormModelVisible" title="任务监听器" :size="`${width}px`" append-to-body destroy-on-close>
-      <el-form :model="listenerForm" label-width="96px" ref="listenerFormRef" @submit.prevent>
-        <el-form-item label="事件类型" prop="event" :rules="{ required: true, trigger: ['blur', 'change'] }">
-          <el-select v-model="listenerForm.event">
-            <el-option v-for="i in Object.keys(listenerEventTypeObject)" :key="i" :label="listenerEventTypeObject[i]" :value="i" />
-          </el-select>
-        </el-form-item>
-        <el-form-item label="监听器ID" prop="id" :rules="{ required: true, trigger: ['blur', 'change'] }">
-          <el-input v-model="listenerForm.id" clearable />
-        </el-form-item>
-        <el-form-item label="监听器类型" prop="listenerType" :rules="{ required: true, trigger: ['blur', 'change'] }">
-          <el-select v-model="listenerForm.listenerType">
-            <el-option v-for="i in Object.keys(listenerTypeObject)" :key="i" :label="listenerTypeObject[i]" :value="i" />
-          </el-select>
-        </el-form-item>
-        <el-form-item v-if="listenerForm.listenerType === 'classListener'" label="Java类" prop="class" key="listener-class" :rules="{ required: true, trigger: ['blur', 'change'] }">
-          <el-input v-model="listenerForm.class" clearable />
-        </el-form-item>
-        <el-form-item v-if="listenerForm.listenerType === 'expressionListener'" label="表达式" prop="expression" key="listener-expression" :rules="{ required: true, trigger: ['blur', 'change'] }">
-          <el-input v-model="listenerForm.expression" clearable />
-        </el-form-item>
-        <el-form-item v-if="listenerForm.listenerType === 'delegateExpressionListener'" label="代理表达式" prop="delegateExpression" key="listener-delegate" :rules="{ required: true, trigger: ['blur', 'change'] }">
-          <el-input v-model="listenerForm.delegateExpression" clearable />
-        </el-form-item>
-        <!--        <template v-if="listenerForm.listenerType === 'scriptListener'">-->
-        <!--          <el-form-item-->
-        <!--            label="脚本格式"-->
-        <!--            prop="scriptFormat"-->
-        <!--            key="listener-script-format"-->
-        <!--            :rules="{ required: true, trigger: ['blur', 'change'], message: '请填写脚本格式' }"-->
-        <!--          >-->
-        <!--            <el-input v-model="listenerForm.scriptFormat" clearable />-->
-        <!--          </el-form-item>-->
-        <!--          <el-form-item-->
-        <!--            label="脚本类型"-->
-        <!--            prop="scriptType"-->
-        <!--            key="listener-script-type"-->
-        <!--            :rules="{ required: true, trigger: ['blur', 'change'], message: '请选择脚本类型' }"-->
-        <!--          >-->
-        <!--            <el-select v-model="listenerForm.scriptType">-->
-        <!--              <el-option label="内联脚本" value="inlineScript" />-->
-        <!--              <el-option label="外部脚本" value="externalScript" />-->
-        <!--            </el-select>-->
-        <!--          </el-form-item>-->
-        <!--          <el-form-item-->
-        <!--            v-if="listenerForm.scriptType === 'inlineScript'"-->
-        <!--            label="脚本内容"-->
-        <!--            prop="value"-->
-        <!--            key="listener-script"-->
-        <!--            :rules="{ required: true, trigger: ['blur', 'change'], message: '请填写脚本内容' }"-->
-        <!--          >-->
-        <!--            <el-input v-model="listenerForm.value" clearable />-->
-        <!--          </el-form-item>-->
-        <!--          <el-form-item-->
-        <!--            v-if="listenerForm.scriptType === 'externalScript'"-->
-        <!--            label="资源地址"-->
-        <!--            prop="resource"-->
-        <!--            key="listener-resource"-->
-        <!--            :rules="{ required: true, trigger: ['blur', 'change'], message: '请填写资源地址' }"-->
-        <!--          >-->
-        <!--            <el-input v-model="listenerForm.resource" clearable />-->
-        <!--          </el-form-item>-->
-        <!--        </template>-->
-
-        <template v-if="listenerForm.event === 'timeout'">
-          <el-form-item label="定时器类型" prop="eventDefinitionType" key="eventDefinitionType">
-            <el-select v-model="listenerForm.eventDefinitionType">
-              <el-option label="日期" value="date" />
-              <el-option label="持续时长" value="duration" />
-              <el-option label="循环" value="cycle" />
-              <el-option label="无" value="null" />
-            </el-select>
-          </el-form-item>
-          <el-form-item v-if="!!listenerForm.eventDefinitionType && listenerForm.eventDefinitionType !== 'null'" label="定时器" prop="eventTimeDefinitions" key="eventTimeDefinitions" :rules="{ required: true, trigger: ['blur', 'change'], message: '请填写定时器配置' }">
-            <el-input v-model="listenerForm.eventTimeDefinitions" clearable />
-          </el-form-item>
-        </template>
-      </el-form>
-
-      <el-divider />
-      <p class="listener-filed__title">
-        <span
-          ><el-icon><Menu /></el-icon>注入字段:</span
-        >
-        <el-button type="primary" @click="openListenerFieldForm(null)">添加字段</el-button>
-      </p>
-      <el-table :data="fieldsListOfListener" max-height="240" border fit style="flex: none">
-        <el-table-column label="序号" width="50px" type="index" />
-        <el-table-column label="字段名称" min-width="100px" prop="name" />
-        <el-table-column label="字段类型" min-width="80px" show-overflow-tooltip :formatter="(row) => fieldTypeObject[row.fieldType]" />
-        <el-table-column label="字段值/表达式" min-width="100px" show-overflow-tooltip :formatter="(row) => row.string || row.expression" />
-        <el-table-column label="操作" width="100px">
-          <template v-slot="{ row, $index }">
-            <el-button link type="" @click="openListenerFieldForm(row, $index)">编辑</el-button>
-            <el-divider direction="vertical" />
-            <el-button link type="" style="color: #ff4d4f" @click="removeListenerField(row, $index)">移除</el-button>
-          </template>
-        </el-table-column>
-      </el-table>
-
-      <div class="element-drawer__button">
-        <el-button @click="listenerFormModelVisible = false">取 消</el-button>
-        <el-button type="primary" @click="saveListenerConfig">保 存</el-button>
-      </div>
-    </el-drawer>
-
-    <!-- 注入西段 编辑/创建 部分 -->
-    <el-dialog title="字段配置" v-model="listenerFieldFormModelVisible" width="600px" append-to-body destroy-on-close>
-      <el-form :model="listenerFieldForm" label-width="96px" ref="listenerFieldFormRef" style="height: 136px" @submit.prevent>
-        <el-form-item label="字段名称:" prop="name" :rules="{ required: true, trigger: ['blur', 'change'] }">
-          <el-input v-model="listenerFieldForm.name" clearable />
-        </el-form-item>
-        <el-form-item label="字段类型:" prop="fieldType" :rules="{ required: true, trigger: ['blur', 'change'] }">
-          <el-select v-model="listenerFieldForm.fieldType">
-            <el-option v-for="i in Object.keys(fieldTypeObject)" :key="i" :label="fieldTypeObject[i]" :value="i" />
-          </el-select>
-        </el-form-item>
-        <el-form-item v-if="listenerFieldForm.fieldType === 'string'" label="字段值:" prop="string" key="field-string" :rules="{ required: true, trigger: ['blur', 'change'] }">
-          <el-input v-model="listenerFieldForm.string" clearable />
-        </el-form-item>
-        <el-form-item v-if="listenerFieldForm.fieldType === 'expression'" label="表达式:" prop="expression" key="field-expression" :rules="{ required: true, trigger: ['blur', 'change'] }">
-          <el-input v-model="listenerFieldForm.expression" clearable />
-        </el-form-item>
-      </el-form>
-      <template v-slot:footer>
-        <el-button @click="listenerFieldFormModelVisible = false">取 消</el-button>
-        <el-button type="primary" @click="saveListenerFiled">确 定</el-button>
-      </template>
-    </el-dialog>
-  </div>
-</template>
-<script>
-import { createListenerObject, updateElementExtensions } from "../../utils";
-import { initListenerForm, initListenerType, eventType, listenerType, fieldType } from "./utilSelf";
-
-export default {
-  name: "UserTaskListeners",
-  props: {
-    id: String,
-    type: String
-  },
-  inject: {
-    prefix: "prefix",
-    width: "width"
-  },
-  data() {
-    return {
-      elementListenersList: [],
-      listenerEventTypeObject: eventType,
-      listenerTypeObject: listenerType,
-      listenerFormModelVisible: false,
-      listenerForm: {},
-      fieldTypeObject: fieldType,
-      fieldsListOfListener: [],
-      listenerFieldFormModelVisible: false, // 监听器 注入字段表单弹窗 显示状态
-      editingListenerIndex: -1, // 监听器所在下标,-1 为新增
-      editingListenerFieldIndex: -1, // 字段所在下标,-1 为新增
-      listenerFieldForm: {} // 监听器 注入字段 详情表单
-    };
-  },
-  watch: {
-    id: {
-      immediate: true,
-      handler(val) {
-        val && val.length && this.$nextTick(() => this.resetListenersList());
-      }
-    }
-  },
-  methods: {
-    resetListenersList() {
-      this.bpmnElement = window.bpmnInstances.bpmnElement;
-      this.otherExtensionList = [];
-      this.bpmnElementListeners = this.bpmnElement.businessObject?.extensionElements?.values?.filter((ex) => ex.$type === `${this.prefix}:TaskListener`) ?? [];
-      this.elementListenersList = this.bpmnElementListeners.map((listener) => initListenerType(listener));
-    },
-    openListenerForm(listener, index) {
-      if (listener) {
-        this.listenerForm = initListenerForm(listener);
-        this.editingListenerIndex = index;
-      } else {
-        this.listenerForm = {};
-        this.editingListenerIndex = -1; // 标记为新增
-      }
-      if (listener && listener.fields) {
-        this.fieldsListOfListener = listener.fields.map((field) => ({
-          ...field,
-          fieldType: field.string ? "string" : "expression"
-        }));
-      } else {
-        this.fieldsListOfListener = [];
-        this.listenerForm["fields"] = [];
-      }
-      // 打开侧边栏并清楚验证状态
-      this.listenerFormModelVisible = true;
-      this.$nextTick(() => {
-        if (this.$refs["listenerFormRef"]) this.$refs["listenerFormRef"].clearValidate();
-      });
-    },
-    // 移除监听器
-    removeListener(listener, index) {
-      this.$confirm("确认移除该监听器吗?", "提示", {
-        confirmButtonText: "确 认",
-        cancelButtonText: "取 消"
-      })
-        .then(() => {
-          this.bpmnElementListeners.splice(index, 1);
-          this.elementListenersList.splice(index, 1);
-          updateElementExtensions(this.bpmnElement, this.otherExtensionList.concat(this.bpmnElementListeners));
-        })
-        .catch(() => console.info("操作取消"));
-    },
-    // 保存监听器
-    async saveListenerConfig() {
-      let validateStatus = await this.$refs["listenerFormRef"].validate();
-      if (!validateStatus) return; // 验证不通过直接返回
-      const listenerObject = createListenerObject(this.listenerForm, true, this.prefix);
-      if (this.editingListenerIndex === -1) {
-        this.bpmnElementListeners.push(listenerObject);
-        this.elementListenersList.push(this.listenerForm);
-      } else {
-        this.bpmnElementListeners.splice(this.editingListenerIndex, 1, listenerObject);
-        this.elementListenersList.splice(this.editingListenerIndex, 1, this.listenerForm);
-      }
-      // 保存其他配置
-      this.otherExtensionList = this.bpmnElement.businessObject?.extensionElements?.values?.filter((ex) => ex.$type !== `${this.prefix}:TaskListener`) ?? [];
-      updateElementExtensions(this.bpmnElement, this.otherExtensionList.concat(this.bpmnElementListeners));
-      // 4. 隐藏侧边栏
-      this.listenerFormModelVisible = false;
-      this.listenerForm = {};
-    },
-    // 打开监听器字段编辑弹窗
-    openListenerFieldForm(field, index) {
-      this.listenerFieldForm = field ? JSON.parse(JSON.stringify(field)) : {};
-      this.editingListenerFieldIndex = field ? index : -1;
-      this.listenerFieldFormModelVisible = true;
-      this.$nextTick(() => {
-        if (this.$refs["listenerFieldFormRef"]) this.$refs["listenerFieldFormRef"].clearValidate();
-      });
-    },
-    // 保存监听器注入字段
-    async saveListenerFiled() {
-      let validateStatus = await this.$refs["listenerFieldFormRef"].validate();
-      if (!validateStatus) return; // 验证不通过直接返回
-      if (this.editingListenerFieldIndex === -1) {
-        this.fieldsListOfListener.push(this.listenerFieldForm);
-        this.listenerForm.fields.push(this.listenerFieldForm);
-      } else {
-        this.fieldsListOfListener.splice(this.editingListenerFieldIndex, 1, this.listenerFieldForm);
-        this.listenerForm.fields.splice(this.editingListenerFieldIndex, 1, this.listenerFieldForm);
-      }
-      this.listenerFieldFormModelVisible = false;
-      this.$nextTick(() => (this.listenerFieldForm = {}));
-    },
-    // 移除监听器字段
-    removeListenerField(field, index) {
-      this.$confirm("确认移除该字段吗?", "提示", {
-        confirmButtonText: "确 认",
-        cancelButtonText: "取 消"
-      })
-        .then(() => {
-          this.fieldsListOfListener.splice(index, 1);
-          this.listenerForm.fields.splice(index, 1);
-        })
-        .catch(() => console.info("操作取消"));
-    }
-  }
-};
-</script>

+ 0 - 178
src/components/ren-flowable/package/penal/listeners/template.js

@@ -1,178 +0,0 @@
-export const template = (isTaskListener) => {
-  return `
-  <div class="panel-tab__content">
-    <el-table :data="elementListenersList" border>
-      <el-table-column label="序号" width="50px" type="index" />
-      <el-table-column label="事件类型" min-width="100px" prop="event" />
-      <el-table-column label="监听器类型" min-width="100px" show-overflow-tooltip :formatter="row => listenerTypeObject[row.listenerType]" />
-      <el-table-column label="操作" width="90px">
-        <template v-slot="{ row, $index }">
-          <el-button link type="" @click="openListenerForm(row, $index)">编辑</el-button>
-          <el-divider direction="vertical" />
-          <el-button link type="" style="color: #ff4d4f" @click="removeListener(row, $index)">移除</el-button>
-        </template>
-      </el-table-column>
-    </el-table>
-    <div class="element-drawer__button">
-      <el-button type="primary" @click="openListenerForm(null)">添加监听器</el-button>
-    </div>
-
-    <!-- 监听器 编辑/创建 部分 -->
-    <el-drawer v-model="listenerFormModelVisible" title="执行监听器" :size="width + 'px'" append-to-body destroy-on-close>
-      <el-form :model="listenerForm" label-width="96px" ref="listenerFormRef" @submit.prevent>
-        <el-form-item label="事件类型" prop="event" :rules="{ required: true, trigger: ['blur', 'change'] }">
-          <el-select v-model="listenerForm.event">
-            <el-option label="start" value="start" />
-            <el-option label="end" value="end" />
-          </el-select>
-        </el-form-item>
-        <el-form-item label="监听器类型" prop="listenerType" :rules="{ required: true, trigger: ['blur', 'change'] }">
-          <el-select v-model="listenerForm.listenerType">
-            <el-option v-for="i in Object.keys(listenerTypeObject)" :key="i" :label="listenerTypeObject[i]" :value="i" />
-          </el-select>
-        </el-form-item>
-        <el-form-item
-          v-if="listenerForm.listenerType === 'classListener'"
-          label="Java类"
-          prop="class"
-          key="listener-class"
-          :rules="{ required: true, trigger: ['blur', 'change'] }"
-        >
-          <el-input v-model="listenerForm.class" clearable />
-        </el-form-item>
-        <el-form-item
-          v-if="listenerForm.listenerType === 'expressionListener'"
-          label="表达式"
-          prop="expression"
-          key="listener-expression"
-          :rules="{ required: true, trigger: ['blur', 'change'] }"
-        >
-          <el-input v-model="listenerForm.expression" clearable />
-        </el-form-item>
-        <el-form-item
-          v-if="listenerForm.listenerType === 'delegateExpressionListener'"
-          label="代理表达式"
-          prop="delegateExpression"
-          key="listener-delegate"
-          :rules="{ required: true, trigger: ['blur', 'change'] }"
-        >
-          <el-input v-model="listenerForm.delegateExpression" clearable />
-        </el-form-item>
-        <template v-if="listenerForm.listenerType === 'scriptListener'">
-          <el-form-item
-            label="脚本格式"
-            prop="scriptFormat"
-            key="listener-script-format"
-            :rules="{ required: true, trigger: ['blur', 'change'], message: '请填写脚本格式' }"
-          >
-            <el-input v-model="listenerForm.scriptFormat" clearable />
-          </el-form-item>
-          <el-form-item
-            label="脚本类型"
-            prop="scriptType"
-            key="listener-script-type"
-            :rules="{ required: true, trigger: ['blur', 'change'], message: '请选择脚本类型' }"
-          >
-            <el-select v-model="listenerForm.scriptType">
-              <el-option label="内联脚本" value="inlineScript" />
-              <el-option label="外部脚本" value="externalScript" />
-            </el-select>
-          </el-form-item>
-          <el-form-item
-            v-if="listenerForm.scriptType === 'inlineScript'"
-            label="脚本内容"
-            prop="value"
-            key="listener-script"
-            :rules="{ required: true, trigger: ['blur', 'change'], message: '请填写脚本内容' }"
-          >
-            <el-input v-model="listenerForm.value" clearable />
-          </el-form-item>
-          <el-form-item
-            v-if="listenerForm.scriptType === 'externalScript'"
-            label="资源地址"
-            prop="resource"
-            key="listener-resource"
-            :rules="{ required: true, trigger: ['blur', 'change'], message: '请填写资源地址' }"
-          >
-            <el-input v-model="listenerForm.resource" clearable />
-          </el-form-item>
-        </template>
-        ${
-          isTaskListener
-            ? "<el-form-item label='定时器类型' prop='eventDefinitionType' key='eventDefinitionType'>" +
-              "<el-select v-model='listenerForm.eventDefinitionType'>" +
-              "<el-option label='日期' value='date' />" +
-              "<el-option label='持续时长' value='duration' />" +
-              "<el-option label='循环' value='cycle' />" +
-              "<el-option label='无' value='' />" +
-              "</el-select>" +
-              "</el-form-item>" +
-              "<el-form-item v-if='!!listenerForm.eventDefinitionType' label='定时器' prop='eventDefinitions' key='eventDefinitions'>" +
-              "<el-input v-model='listenerForm.eventDefinitions' clearable />" +
-              "</el-form-item>"
-            : ""
-        }
-      </el-form>
-      <el-divider />
-      <p class="listener-filed__title">
-        <span><el-icon><Menu /></el-icon>注入字段:</span>
-        <el-button type="primary" @click="openListenerFieldForm(null)">添加字段</el-button>
-      </p>
-      <el-table :data="fieldsListOfListener" max-height="240" border fit style="flex: none">
-        <el-table-column label="序号" width="50px" type="index" />
-        <el-table-column label="字段名称" min-width="100px" prop="name" />
-        <el-table-column label="字段类型" min-width="80px" show-overflow-tooltip :formatter="row => fieldTypeObject[row.fieldType]" />
-        <el-table-column label="字段值/表达式" min-width="100px" show-overflow-tooltip :formatter="row => row.string || row.expression" />
-        <el-table-column label="操作" width="100px">
-          <template v-slot="{ row, $index }">
-            <el-button link type="" @click="openListenerFieldForm(row, $index)">编辑</el-button>
-            <el-divider direction="vertical" />
-            <el-button link type="" style="color: #ff4d4f" @click="removeListenerField(row, $index)">移除</el-button>
-          </template>
-        </el-table-column>
-      </el-table>
-
-      <div class="element-drawer__button">
-        <el-button @click="listenerFormModelVisible = false">取 消</el-button>
-        <el-button type="primary" @click="saveListenerConfig">保 存</el-button>
-      </div>
-    </el-drawer>
-
-    <!-- 注入西段 编辑/创建 部分 -->
-    <el-dialog title="字段配置" v-model="listenerFieldFormModelVisible" width="600px" append-to-body destroy-on-close>
-      <el-form :model="listenerFieldForm" label-width="96px" ref="listenerFieldFormRef" style="height: 136px" @submit.prevent>
-        <el-form-item label="字段名称:" prop="name" :rules="{ required: true, trigger: ['blur', 'change'] }">
-          <el-input v-model="listenerFieldForm.name" clearable />
-        </el-form-item>
-        <el-form-item label="字段类型:" prop="fieldType" :rules="{ required: true, trigger: ['blur', 'change'] }">
-          <el-select v-model="listenerFieldForm.fieldType">
-            <el-option v-for="i in Object.keys(fieldTypeObject)" :key="i" :label="fieldTypeObject[i]" :value="i" />
-          </el-select>
-        </el-form-item>
-        <el-form-item
-          v-if="listenerFieldForm.fieldType === 'string'"
-          label="字段值:"
-          prop="string"
-          key="field-string"
-          :rules="{ required: true, trigger: ['blur', 'change'] }"
-        >
-          <el-input v-model="listenerFieldForm.string" clearable />
-        </el-form-item>
-        <el-form-item
-          v-if="listenerFieldForm.fieldType === 'expression'"
-          label="表达式:"
-          prop="expression"
-          key="field-expression"
-          :rules="{ required: true, trigger: ['blur', 'change'] }"
-        >
-          <el-input v-model="listenerFieldForm.expression" clearable />
-        </el-form-item>
-      </el-form>
-      <template v-slot:footer>
-        <el-button @click="listenerFieldFormModelVisible = false">取 消</el-button>
-        <el-button type="primary" @click="saveListenerFiled">确 定</el-button>
-      </template>
-    </el-dialog>
-  </div>
-  `;
-};

+ 0 - 61
src/components/ren-flowable/package/penal/listeners/utilSelf.js

@@ -1,61 +0,0 @@
-// 初始化表单数据
-export function initListenerForm(listener) {
-  let self = {
-    ...listener
-  };
-  if (listener.script) {
-    self = {
-      ...listener,
-      ...listener.script,
-      scriptType: listener.script.resource ? "externalScript" : "inlineScript"
-    };
-  }
-  if (listener.event === "timeout" && listener.eventDefinitions) {
-    if (listener.eventDefinitions.length) {
-      let k = "";
-      for (let key in listener.eventDefinitions[0]) {
-        console.log(listener.eventDefinitions, key);
-        if (key.indexOf("time") !== -1) {
-          k = key;
-          self.eventDefinitionType = key.replace("time", "").toLowerCase();
-        }
-      }
-      console.log(k);
-      self.eventTimeDefinitions = listener.eventDefinitions[0][k].body;
-    }
-  }
-  return self;
-}
-
-export function initListenerType(listener) {
-  let listenerType;
-  if (listener.class) listenerType = "classListener";
-  if (listener.expression) listenerType = "expressionListener";
-  if (listener.delegateExpression) listenerType = "delegateExpressionListener";
-  if (listener.script) listenerType = "scriptListener";
-  return {
-    ...JSON.parse(JSON.stringify(listener)),
-    ...(listener.script ?? {}),
-    listenerType: listenerType
-  };
-}
-
-export const listenerType = {
-  classListener: "Java 类",
-  expressionListener: "表达式",
-  delegateExpressionListener: "代理表达式"
-};
-
-export const eventType = {
-  create: "创建",
-  assignment: "指派",
-  complete: "完成",
-  delete: "删除",
-  update: "更新",
-  timeout: "超时"
-};
-
-export const fieldType = {
-  string: "字符串",
-  expression: "表达式"
-};

+ 0 - 196
src/components/ren-flowable/package/penal/multi-instance/ElementMultiInstance.vue

@@ -1,196 +0,0 @@
-<template>
-  <div class="panel-tab__content">
-    <el-form label-width="90px" @submit.prevent>
-      <el-form-item label="会签类型">
-        <el-select v-model="loopCharacteristics" @change="changeLoopCharacteristicsType">
-          <!--bpmn:MultiInstanceLoopCharacteristics-->
-          <el-option label="无" value="Null" />
-          <el-option label="并行多重事件" value="ParallelMultiInstance" />
-          <el-option label="时序多重事件" value="SequentialMultiInstance" />
-          <!--bpmn:StandardLoopCharacteristics-->
-          <!--          <el-option label="循环事件" value="StandardLoop" />-->
-        </el-select>
-      </el-form-item>
-      <template v-if="loopCharacteristics === 'ParallelMultiInstance' || loopCharacteristics === 'SequentialMultiInstance'">
-        <el-form-item label="循环数量" key="loopCardinality">
-          <el-input v-model="loopInstanceForm.loopCardinality" clearable @change="updateLoopCardinality" />
-        </el-form-item>
-        <el-form-item label="循环集合" key="collection">
-          <el-input v-model="loopInstanceForm.collection" clearable @change="updateLoopBase" />
-        </el-form-item>
-        <el-form-item label="元素变量" key="elementVariable">
-          <el-input v-model="loopInstanceForm.elementVariable" clearable @change="updateLoopBase" />
-        </el-form-item>
-        <el-form-item label="完成条件" key="completionCondition">
-          <el-input v-model="loopInstanceForm.completionCondition" clearable @change="updateLoopCondition" />
-        </el-form-item>
-        <!--        <el-form-item label="异步状态" key="async">-->
-        <!--          <el-checkbox v-model="loopInstanceForm.asyncBefore" label="异步前" @change="updateLoopAsync('asyncBefore')" />-->
-        <!--          <el-checkbox v-model="loopInstanceForm.asyncAfter" label="异步后" @change="updateLoopAsync('asyncAfter')" />-->
-        <!--          <el-checkbox-->
-        <!--            v-model="loopInstanceForm.exclusive"-->
-        <!--            v-if="loopInstanceForm.asyncAfter || loopInstanceForm.asyncBefore"-->
-        <!--            label="排除"-->
-        <!--            @change="updateLoopAsync('exclusive')"-->
-        <!--          />-->
-        <!--        </el-form-item>-->
-        <!--        <el-form-item label="重试周期" prop="timeCycle" v-if="loopInstanceForm.asyncAfter || loopInstanceForm.asyncBefore" key="timeCycle">-->
-        <!--          <el-input v-model="loopInstanceForm.timeCycle" clearable @change="updateLoopTimeCycle" />-->
-        <!--        </el-form-item>-->
-      </template>
-    </el-form>
-  </div>
-</template>
-
-<script>
-export default {
-  name: "ElementMultiInstance",
-  props: {
-    businessObject: Object,
-    type: String
-  },
-  inject: {
-    prefix: "prefix"
-  },
-  data() {
-    return {
-      loopCharacteristics: "",
-      //默认配置,用来覆盖原始不存在的选项,避免报错
-      defaultLoopInstanceForm: {
-        completionCondition: "",
-        loopCardinality: "",
-        extensionElements: [],
-        asyncAfter: false,
-        asyncBefore: false,
-        exclusive: false
-      },
-      loopInstanceForm: {}
-    };
-  },
-  watch: {
-    businessObject: {
-      immediate: true,
-      handler(val) {
-        this.bpmnElement = window.bpmnInstances.bpmnElement;
-        this.getElementLoop(val);
-      }
-    }
-  },
-  methods: {
-    getElementLoop(businessObject) {
-      if (!businessObject.loopCharacteristics) {
-        this.loopCharacteristics = "Null";
-        this.loopInstanceForm = {};
-        return;
-      }
-      if (businessObject.loopCharacteristics.$type === "bpmn:StandardLoopCharacteristics") {
-        this.loopCharacteristics = "StandardLoop";
-        this.loopInstanceForm = {};
-        return;
-      }
-      if (businessObject.loopCharacteristics.isSequential) {
-        this.loopCharacteristics = "SequentialMultiInstance";
-      } else {
-        this.loopCharacteristics = "ParallelMultiInstance";
-      }
-      // 合并配置
-      this.loopInstanceForm = {
-        ...this.defaultLoopInstanceForm,
-        ...businessObject.loopCharacteristics,
-        completionCondition: businessObject.loopCharacteristics?.completionCondition?.body ?? "",
-        loopCardinality: businessObject.loopCharacteristics?.loopCardinality?.body ?? ""
-      };
-      // 保留当前元素 businessObject 上的 loopCharacteristics 实例
-      this.multiLoopInstance = window.bpmnInstances.bpmnElement.businessObject.loopCharacteristics;
-      // 更新表单
-      if (businessObject.loopCharacteristics.extensionElements && businessObject.loopCharacteristics.extensionElements.values && businessObject.loopCharacteristics.extensionElements.values.length) {
-        this.loopInstanceForm["timeCycle"] = businessObject.loopCharacteristics.extensionElements.values[0].body;
-      }
-    },
-    changeLoopCharacteristicsType(type) {
-      // this.loopInstanceForm = { ...this.defaultLoopInstanceForm }; // 切换类型取消原表单配置
-      // 取消多实例配置
-      if (type === "Null") {
-        window.bpmnInstances.modeling.updateProperties(this.bpmnElement, { loopCharacteristics: null });
-        return;
-      }
-      // 配置循环
-      if (type === "StandardLoop") {
-        const loopCharacteristicsObject = window.bpmnInstances.moddle.create("bpmn:StandardLoopCharacteristics");
-        window.bpmnInstances.modeling.updateProperties(this.bpmnElement, {
-          loopCharacteristics: loopCharacteristicsObject
-        });
-        this.multiLoopInstance = null;
-        return;
-      }
-      // 时序
-      if (type === "SequentialMultiInstance") {
-        this.multiLoopInstance = window.bpmnInstances.moddle.create("bpmn:MultiInstanceLoopCharacteristics", {
-          isSequential: true
-        });
-      } else {
-        this.multiLoopInstance = window.bpmnInstances.moddle.create("bpmn:MultiInstanceLoopCharacteristics");
-      }
-      window.bpmnInstances.modeling.updateProperties(this.bpmnElement, {
-        loopCharacteristics: this.multiLoopInstance
-      });
-    },
-    // 循环基数
-    updateLoopCardinality(cardinality) {
-      let loopCardinality = null;
-      if (cardinality && cardinality.length) {
-        loopCardinality = window.bpmnInstances.moddle.create("bpmn:FormalExpression", { body: cardinality });
-      }
-      window.bpmnInstances.modeling.updateModdleProperties(this.bpmnElement, this.multiLoopInstance, {
-        loopCardinality
-      });
-    },
-    // 完成条件
-    updateLoopCondition(condition) {
-      let completionCondition = null;
-      if (condition && condition.length) {
-        completionCondition = window.bpmnInstances.moddle.create("bpmn:FormalExpression", { body: condition });
-      }
-      window.bpmnInstances.modeling.updateModdleProperties(this.bpmnElement, this.multiLoopInstance, {
-        completionCondition
-      });
-    },
-    // 重试周期
-    updateLoopTimeCycle(timeCycle) {
-      const extensionElements = window.bpmnInstances.moddle.create("bpmn:ExtensionElements", {
-        values: [
-          window.bpmnInstances.moddle.create(`${this.prefix}:FailedJobRetryTimeCycle`, {
-            body: timeCycle
-          })
-        ]
-      });
-      window.bpmnInstances.modeling.updateModdleProperties(this.bpmnElement, this.multiLoopInstance, {
-        extensionElements
-      });
-    },
-    // 直接更新的基础信息
-    updateLoopBase() {
-      window.bpmnInstances.modeling.updateModdleProperties(this.bpmnElement, this.multiLoopInstance, {
-        collection: this.loopInstanceForm.collection || null,
-        elementVariable: this.loopInstanceForm.elementVariable || null
-      });
-    },
-    // 各异步状态
-    updateLoopAsync(key) {
-      const { asyncBefore, asyncAfter } = this.loopInstanceForm;
-      let asyncAttr = Object.create(null);
-      if (!asyncBefore && !asyncAfter) {
-        this.loopInstanceForm["exclusive"] = false;
-        asyncAttr = { asyncBefore: false, asyncAfter: false, exclusive: false, extensionElements: null };
-      } else {
-        asyncAttr[key] = this.loopInstanceForm[key];
-      }
-      window.bpmnInstances.modeling.updateModdleProperties(this.bpmnElement, this.multiLoopInstance, asyncAttr);
-    }
-  },
-  beforeUnmount() {
-    this.multiLoopInstance = null;
-    this.bpmnElement = null;
-  }
-};
-</script>

+ 0 - 59
src/components/ren-flowable/package/penal/other/ElementOtherConfig.vue

@@ -1,59 +0,0 @@
-<template>
-  <div class="panel-tab__content">
-    <div class="element-property input-property">
-      <div class="element-property__label">元素文档:</div>
-      <div class="element-property__value">
-        <el-input
-          type="textarea"
-          v-model="documentation"
-          size="small"
-          resize="vertical"
-          :autosize="{ minRows: 2, maxRows: 4 }"
-          @input="updateDocumentation"
-          @blur="updateDocumentation"
-        />
-      </div>
-    </div>
-  </div>
-</template>
-
-<script>
-export default {
-  name: "ElementOtherConfig",
-  props: {
-    id: String
-  },
-  data() {
-    return {
-      documentation: ""
-    };
-  },
-  watch: {
-    id: {
-      immediate: true,
-      handler: function(id) {
-        if (id && id.length) {
-          this.$nextTick(() => {
-            const documentations = window.bpmnInstances.bpmnElement.businessObject?.documentation;
-            this.documentation = documentations && documentations.length ? documentations[0].text : "";
-          });
-        } else {
-          this.documentation = "";
-        }
-      }
-    }
-  },
-  methods: {
-    updateDocumentation() {
-      (this.bpmnElement && this.bpmnElement.id === this.id) || (this.bpmnElement = window.bpmnInstances.elementRegistry.get(this.id));
-      const documentation = window.bpmnInstances.bpmnFactory.create("bpmn:Documentation", { text: this.documentation });
-      window.bpmnInstances.modeling.updateProperties(this.bpmnElement, {
-        documentation: [documentation]
-      });
-    }
-  },
-  beforeUnmount() {
-    this.bpmnElement = null;
-  }
-};
-</script>

+ 0 - 135
src/components/ren-flowable/package/penal/properties/ElementProperties.vue

@@ -1,135 +0,0 @@
-<template>
-  <div class="panel-tab__content">
-    <el-table :data="elementPropertyList" max-height="240" border fit>
-      <el-table-column label="序号" width="50px" type="index" />
-      <el-table-column label="属性名" prop="name" min-width="100px" show-overflow-tooltip />
-      <el-table-column label="属性值" prop="value" min-width="100px" show-overflow-tooltip />
-      <el-table-column label="操作" width="90px">
-        <template v-slot="{ row, $index }">
-          <el-button link type="" @click="openAttributesForm(row, $index)">编辑</el-button>
-          <el-divider direction="vertical" />
-          <el-button link type="" style="color: #ff4d4f" @click="removeAttributes(row, $index)">移除</el-button>
-        </template>
-      </el-table-column>
-    </el-table>
-    <div class="element-drawer__button">
-      <el-button type="primary" @click="openAttributesForm(null, -1)">添加属性</el-button>
-    </div>
-
-    <el-dialog v-model="propertyFormModelVisible" title="属性配置" width="600px" append-to-body destroy-on-close>
-      <el-form :model="propertyForm" label-width="80px" ref="attributeFormRef" @submit.prevent>
-        <el-form-item label="属性名:" prop="name">
-          <el-input v-model="propertyForm.name" clearable />
-        </el-form-item>
-        <el-form-item label="属性值:" prop="value">
-          <el-input v-model="propertyForm.value" clearable />
-        </el-form-item>
-      </el-form>
-      <template v-slot:footer>
-        <el-button @click="propertyFormModelVisible = false">取 消</el-button>
-        <el-button type="primary" @click="saveAttribute">确 定</el-button>
-      </template>
-    </el-dialog>
-  </div>
-</template>
-
-<script>
-export default {
-  name: "ElementProperties",
-  props: {
-    id: String,
-    type: String
-  },
-  inject: {
-    prefix: "prefix",
-    width: "width"
-  },
-  data() {
-    return {
-      elementPropertyList: [],
-      propertyForm: {},
-      editingPropertyIndex: -1,
-      propertyFormModelVisible: false
-    };
-  },
-  watch: {
-    id: {
-      immediate: true,
-      handler(val) {
-        val && val.length && this.resetAttributesList();
-      }
-    }
-  },
-  methods: {
-    resetAttributesList() {
-      this.bpmnElement = window.bpmnInstances.bpmnElement;
-      this.otherExtensionList = []; // 其他扩展配置
-      this.bpmnElementProperties =
-        this.bpmnElement.businessObject?.extensionElements?.values?.filter((ex) => {
-          if (ex.$type !== `${this.prefix}:Properties`) {
-            this.otherExtensionList.push(ex);
-          }
-          return ex.$type === `${this.prefix}:Properties`;
-        }) ?? [];
-
-      // 保存所有的 扩展属性字段
-      this.bpmnElementPropertyList = this.bpmnElementProperties.reduce((pre, current) => pre.concat(current.values), []);
-      // 复制 显示
-      this.elementPropertyList = JSON.parse(JSON.stringify(this.bpmnElementPropertyList ?? []));
-    },
-    openAttributesForm(attr, index) {
-      this.editingPropertyIndex = index;
-      this.propertyForm = index === -1 ? {} : JSON.parse(JSON.stringify(attr));
-      this.propertyFormModelVisible = true;
-      this.$nextTick(() => {
-        if (this.$refs["attributeFormRef"]) this.$refs["attributeFormRef"].clearValidate();
-      });
-    },
-    removeAttributes(attr, index) {
-      this.$confirm("确认移除该属性吗?", "提示", {
-        confirmButtonText: "确 认",
-        cancelButtonText: "取 消"
-      })
-        .then(() => {
-          this.elementPropertyList.splice(index, 1);
-          this.bpmnElementPropertyList.splice(index, 1);
-          // 新建一个属性字段的保存列表
-          const propertiesObject = window.bpmnInstances.moddle.create(`${this.prefix}:Properties`, {
-            values: this.bpmnElementPropertyList
-          });
-          this.updateElementExtensions(propertiesObject);
-          this.resetAttributesList();
-        })
-        .catch(() => console.info("操作取消"));
-    },
-    saveAttribute() {
-      const { name, value } = this.propertyForm;
-      console.log(this.bpmnElementPropertyList);
-      if (this.editingPropertyIndex !== -1) {
-        window.bpmnInstances.modeling.updateModdleProperties(this.bpmnElement, this.bpmnElementPropertyList[this.editingPropertyIndex], {
-          name,
-          value
-        });
-      } else {
-        // 新建属性字段
-        const newPropertyObject = window.bpmnInstances.moddle.create(`${this.prefix}:Property`, { name, value });
-        // 新建一个属性字段的保存列表
-        const propertiesObject = window.bpmnInstances.moddle.create(`${this.prefix}:Properties`, {
-          values: this.bpmnElementPropertyList.concat([newPropertyObject])
-        });
-        this.updateElementExtensions(propertiesObject);
-      }
-      this.propertyFormModelVisible = false;
-      this.resetAttributesList();
-    },
-    updateElementExtensions(properties) {
-      const extensions = window.bpmnInstances.moddle.create("bpmn:ExtensionElements", {
-        values: this.otherExtensionList.concat([properties])
-      });
-      window.bpmnInstances.modeling.updateProperties(this.bpmnElement, {
-        extensionElements: extensions
-      });
-    }
-  }
-};
-</script>

+ 0 - 108
src/components/ren-flowable/package/penal/signal-message/SignalAndMessage.vue

@@ -1,108 +0,0 @@
-<template>
-  <div class="panel-tab__content">
-    <div class="panel-tab__content--title">
-      <span
-        ><el-icon style="margin-right: 8px; color: #555555"><Menu /></el-icon>消息列表</span
-      >
-      <el-button type="primary" @click="openModel('message')">创建新消息</el-button>
-    </div>
-    <el-table :data="messageList" border>
-      <el-table-column type="index" label="序号" width="60px" />
-      <el-table-column label="消息ID" prop="id" max-width="300px" show-overflow-tooltip />
-      <el-table-column label="消息名称" prop="name" max-width="300px" show-overflow-tooltip />
-    </el-table>
-    <div class="panel-tab__content--title" style="padding-top: 8px; margin-top: 8px; border-top: 1px solid #eeeeee">
-      <span
-        ><el-icon style="margin-right: 8px; color: #555555"><Menu /></el-icon>信号列表</span
-      >
-      <el-button type="primary" @click="openModel('signal')">创建新信号</el-button>
-    </div>
-    <el-table :data="signalList" border>
-      <el-table-column type="index" label="序号" width="60px" />
-      <el-table-column label="信号ID" prop="id" max-width="300px" show-overflow-tooltip />
-      <el-table-column label="信号名称" prop="name" max-width="300px" show-overflow-tooltip />
-    </el-table>
-
-    <el-dialog v-model="modelVisible" :title="modelConfig.title" :close-on-click-modal="false" width="400px" append-to-body destroy-on-close>
-      <el-form :model="modelObjectForm" label-width="90px" @submit.prevent>
-        <el-form-item :label="modelConfig.idLabel">
-          <el-input v-model="modelObjectForm.id" clearable />
-        </el-form-item>
-        <el-form-item :label="modelConfig.nameLabel">
-          <el-input v-model="modelObjectForm.name" clearable />
-        </el-form-item>
-      </el-form>
-      <template v-slot:footer>
-        <el-button @click="modelVisible = false">取 消</el-button>
-        <el-button type="primary" @click="addNewObject">保 存</el-button>
-      </template>
-    </el-dialog>
-  </div>
-</template>
-<script>
-export default {
-  name: "SignalAndMassage",
-  data() {
-    return {
-      signalList: [],
-      messageList: [],
-      modelVisible: false,
-      modelType: "",
-      modelObjectForm: {}
-    };
-  },
-  computed: {
-    modelConfig() {
-      if (this.modelType === "message") {
-        return { title: "创建消息", idLabel: "消息ID", nameLabel: "消息名称" };
-      } else {
-        return { title: "创建信号", idLabel: "信号ID", nameLabel: "信号名称" };
-      }
-    }
-  },
-  mounted() {
-    this.initDataList();
-  },
-  methods: {
-    initDataList() {
-      this.rootElements = window.bpmnInstances.modeler.getDefinitions().rootElements;
-      this.messageIdMap = {};
-      this.signalIdMap = {};
-      this.messageList = [];
-      this.signalList = [];
-      this.rootElements.forEach((el) => {
-        if (el.$type === "bpmn:Message") {
-          this.messageIdMap[el.id] = true;
-          this.messageList.push({ ...el });
-        }
-        if (el.$type === "bpmn:Signal") {
-          this.signalIdMap[el.id] = true;
-          this.signalList.push({ ...el });
-        }
-      });
-    },
-    openModel(type) {
-      this.modelType = type;
-      this.modelObjectForm = {};
-      this.modelVisible = true;
-    },
-    addNewObject() {
-      if (this.modelType === "message") {
-        if (this.messageIdMap[this.modelObjectForm.id]) {
-          return this.$message.error("该消息已存在,请修改id后重新保存");
-        }
-        const messageRef = window.bpmnInstances.moddle.create("bpmn:Message", this.modelObjectForm);
-        this.rootElements.push(messageRef);
-      } else {
-        if (this.signalIdMap[this.modelObjectForm.id]) {
-          return this.$message.error("该信号已存在,请修改id后重新保存");
-        }
-        const signalRef = window.bpmnInstances.moddle.create("bpmn:Signal", this.modelObjectForm);
-        this.rootElements.push(signalRef);
-      }
-      this.modelVisible = false;
-      this.initDataList();
-    }
-  }
-};
-</script>

+ 0 - 72
src/components/ren-flowable/package/penal/task/ElementTask.vue

@@ -1,72 +0,0 @@
-<template>
-  <div class="panel-tab__content">
-    <el-form label-width="90px" @submit.prevent>
-      <!--      <el-form-item label="异步延续">-->
-      <!--        <el-checkbox v-model="taskConfigForm.asyncBefore" label="异步前" @change="changeTaskAsync" />-->
-      <!--        <el-checkbox v-model="taskConfigForm.asyncAfter" label="异步后" @change="changeTaskAsync" />-->
-      <!--        <el-checkbox v-model="taskConfigForm.exclusive" v-if="taskConfigForm.asyncAfter || taskConfigForm.asyncBefore" label="排除" @change="changeTaskAsync" />-->
-      <!--      </el-form-item>-->
-      <component :is="witchTaskComponent" v-bind="$props" />
-    </el-form>
-  </div>
-</template>
-
-<script>
-import UserTask from "./task-components/UserTask.vue";
-import ScriptTask from "./task-components/ScriptTask.vue";
-import ReceiveTask from "./task-components/ReceiveTask.vue";
-
-export default {
-  name: "ElementTaskConfig",
-  components: { UserTask, ScriptTask, ReceiveTask },
-  props: {
-    id: String,
-    type: String
-  },
-  data() {
-    return {
-      taskConfigForm: {
-        asyncAfter: false,
-        asyncBefore: false,
-        exclusive: false
-      },
-      witchTaskComponent: "",
-      installedComponent: {
-        // 手工任务与普通任务一致,不需要其他配置
-        // 接收消息任务,需要在全局下插入新的消息实例,并在该节点下的 messageRef 属性绑定该实例
-        // 发送任务、服务任务、业务规则任务共用一个相同配置
-        UserTask: "UserTask", // 用户任务配置
-        ScriptTask: "ScriptTask", // 脚本任务配置
-        ReceiveTask: "ReceiveTask" // 消息接收任务
-      }
-    };
-  },
-  watch: {
-    id: {
-      immediate: true,
-      handler() {
-        this.bpmnElement = window.bpmnInstances.bpmnElement;
-        this.taskConfigForm.asyncBefore = this.bpmnElement?.businessObject?.asyncBefore;
-        this.taskConfigForm.asyncAfter = this.bpmnElement?.businessObject?.asyncAfter;
-        this.taskConfigForm.exclusive = this.bpmnElement?.businessObject?.exclusive;
-      }
-    },
-    type: {
-      immediate: true,
-      handler() {
-        this.witchTaskComponent = this.installedComponent[this.type];
-      }
-    }
-  },
-  methods: {
-    changeTaskAsync() {
-      if (!this.taskConfigForm.asyncBefore && !this.taskConfigForm.asyncAfter) {
-        this.taskConfigForm.exclusive = false;
-      }
-      window.bpmnInstances.modeling.updateProperties(window.bpmnInstances.bpmnElement, {
-        ...this.taskConfigForm
-      });
-    }
-  }
-};
-</script>

+ 0 - 97
src/components/ren-flowable/package/penal/task/task-components/ReceiveTask.vue

@@ -1,97 +0,0 @@
-<template>
-  <div style="margin-top: 16px">
-    <el-form-item label="消息实例">
-      <div style="display: flex; align-items: center; justify-content: space-between; flex-wrap: nowrap">
-        <el-select v-model="bindMessageId" @change="updateTaskMessage">
-          <el-option v-for="id in Object.keys(messageMap)" :value="id" :label="messageMap[id]" :key="id" />
-        </el-select>
-        <el-button type="primary" style="margin-left: 8px" @click="openMessageModel" />
-      </div>
-    </el-form-item>
-    <el-dialog v-model="messageModelVisible" :close-on-click-modal="false" title="创建新消息" width="400px" append-to-body destroy-on-close>
-      <el-form :model="newMessageForm" label-width="90px" @submit.prevent>
-        <el-form-item label="消息ID">
-          <el-input v-model="newMessageForm.id" clearable />
-        </el-form-item>
-        <el-form-item label="消息名称">
-          <el-input v-model="newMessageForm.name" clearable />
-        </el-form-item>
-      </el-form>
-      <template v-slot:footer>
-        <el-button type="primary" @click="createNewMessage">确 认</el-button>
-      </template>
-    </el-dialog>
-  </div>
-</template>
-
-<script>
-export default {
-  name: "ReceiveTask",
-  props: {
-    id: String,
-    type: String
-  },
-  data() {
-    return {
-      bindMessageId: "",
-      newMessageForm: {},
-      messageMap: {},
-      messageModelVisible: false
-    };
-  },
-  watch: {
-    id: {
-      immediate: true,
-      handler() {
-        this.$nextTick(() => this.getBindMessage());
-      }
-    }
-  },
-  created() {
-    this.bpmnMessageRefsMap = Object.create(null);
-    this.bpmnRootElements = window.bpmnInstances.modeler.getDefinitions().rootElements;
-    this.bpmnRootElements
-      .filter((el) => el.$type === "bpmn:Message")
-      .forEach((m) => {
-        this.bpmnMessageRefsMap[m.id] = m;
-        this.messageMap[m.id] = m.name;
-      });
-    this.messageMap["-1"] = "无"; // 添加一个空对象,保证可以取消原消息绑定
-  },
-  methods: {
-    getBindMessage() {
-      this.bpmnElement = window.bpmnInstances.bpmnElement;
-      this.bindMessageId = this.bpmnElement.businessObject?.messageRef?.id || "-1";
-    },
-    openMessageModel() {
-      this.messageModelVisible = true;
-      this.newMessageForm = {};
-    },
-    createNewMessage() {
-      if (this.messageMap[this.newMessageForm.id]) {
-        this.$message.error("该消息已存在,请修改id后重新保存");
-        return;
-      }
-      const newMessage = window.bpmnInstances.moddle.create("bpmn:Message", this.newMessageForm);
-      this.bpmnRootElements.push(newMessage);
-      this.messageMap[this.newMessageForm.id] = this.newMessageForm.name;
-      this.bpmnMessageRefsMap[this.newMessageForm.id] = newMessage;
-      this.messageModelVisible = false;
-    },
-    updateTaskMessage(messageId) {
-      if (messageId === "-1") {
-        window.bpmnInstances.modeling.updateProperties(this.bpmnElement, {
-          messageRef: null
-        });
-      } else {
-        window.bpmnInstances.modeling.updateProperties(this.bpmnElement, {
-          messageRef: this.bpmnMessageRefsMap[messageId]
-        });
-      }
-    }
-  },
-  beforeUnmount() {
-    this.bpmnElement = null;
-  }
-};
-</script>

+ 0 - 85
src/components/ren-flowable/package/penal/task/task-components/ScriptTask.vue

@@ -1,85 +0,0 @@
-<template>
-  <div style="margin-top: 16px">
-    <el-form-item label="脚本格式">
-      <el-input v-model="scriptTaskForm.scriptFormat" clearable @input="updateElementTask()" @change="updateElementTask()" />
-    </el-form-item>
-    <el-form-item label="脚本类型">
-      <el-select v-model="scriptTaskForm.scriptType">
-        <el-option label="内联脚本" value="inline" />
-        <el-option label="外部资源" value="external" />
-      </el-select>
-    </el-form-item>
-    <el-form-item label="脚本" v-show="scriptTaskForm.scriptType === 'inline'">
-      <el-input
-        v-model="scriptTaskForm.script"
-        type="textarea"
-        resize="vertical"
-        :autosize="{ minRows: 2, maxRows: 4 }"
-        clearable
-        @input="updateElementTask()"
-        @change="updateElementTask()"
-      />
-    </el-form-item>
-    <el-form-item label="资源地址" v-show="scriptTaskForm.scriptType === 'external'">
-      <el-input v-model="scriptTaskForm.resource" clearable @input="updateElementTask()" @change="updateElementTask()" />
-    </el-form-item>
-    <el-form-item label="结果变量">
-      <el-input v-model="scriptTaskForm.resultVariable" clearable @input="updateElementTask()" @change="updateElementTask()" />
-    </el-form-item>
-  </div>
-</template>
-
-<script>
-export default {
-  name: "ScriptTask",
-  props: {
-    id: String,
-    type: String
-  },
-  data() {
-    return {
-      defaultTaskForm: {
-        scriptFormat: "",
-        script: "",
-        resource: "",
-        resultVariable: ""
-      },
-      scriptTaskForm: {}
-    };
-  },
-  watch: {
-    id: {
-      immediate: true,
-      handler() {
-        this.bpmnElement = window.bpmnInstances.bpmnElement;
-        this.$nextTick(() => this.resetTaskForm());
-      }
-    }
-  },
-  methods: {
-    resetTaskForm() {
-      for (let key in this.defaultTaskForm) {
-        let value = this.bpmnElement?.businessObject[key] || this.defaultTaskForm[key];
-        this.scriptTaskForm[key] = value
-      }
-      this.scriptTaskForm["scriptType"] = this.scriptTaskForm.script ? "inline" : "external"
-    },
-    updateElementTask() {
-      let taskAttr = Object.create(null);
-      taskAttr.scriptFormat = this.scriptTaskForm.scriptFormat || null;
-      taskAttr.resultVariable = this.scriptTaskForm.resultVariable || null;
-      if (this.scriptTaskForm.scriptType === "inline") {
-        taskAttr.script = this.scriptTaskForm.script || null;
-        taskAttr.resource = null;
-      } else {
-        taskAttr.resource = this.scriptTaskForm.resource || null;
-        taskAttr.script = null;
-      }
-      window.bpmnInstances.modeling.updateProperties(this.bpmnElement, taskAttr);
-    }
-  },
-  beforeUnmount() {
-    this.bpmnElement = null;
-  }
-};
-</script>

+ 0 - 226
src/components/ren-flowable/package/penal/task/task-components/UserTask.vue

@@ -1,226 +0,0 @@
-<template>
-  <div>
-    <el-form-item label="用户类型">
-      <el-select v-model="userTaskForm.type">
-        <el-option label="指定人" :value="0" />
-        <el-option label="候选用户" :value="1" />
-        <el-option label="候选角色" :value="2" />
-      </el-select>
-    </el-form-item>
-    <el-form-item label="处理用户" v-if="userTaskForm.type === 0">
-      <el-input v-model="userTaskForm.assigneeName">
-        <template #append>
-          <el-button :icon="Search()" @click="userSelect" type="danger" />
-        </template>
-      </el-input>
-    </el-form-item>
-    <el-form-item label="候选用户" v-if="userTaskForm.type === 1">
-      <el-input v-model="userTaskForm.candidateUsersName">
-        <template #append>
-          <el-button :icon="Search()" @click="userGroupSelect" type="danger" />
-        </template>
-      </el-input>
-    </el-form-item>
-    <el-form-item label="候选角色" v-if="userTaskForm.type === 2">
-      <el-input v-model="userTaskForm.candidateGroupsName">
-        <template #append>
-          <el-button :icon="Search()" @click="roleGroupSelect" type="danger" />
-        </template>
-      </el-input>
-    </el-form-item>
-    <!--    <el-form-item label="候选分组" v-if="userTaskForm.type === 2">-->
-    <!--      <el-select v-model="userTaskForm.candidateGroups" multiple collapse-tags @change="updateElementTask('candidateGroups')">-->
-    <!--        <el-option v-for="gk in mockData" :key="'ass-' + gk" :label="`分组${gk}`" :value="`group${gk}`" />-->
-    <!--      </el-select>-->
-    <!--    </el-form-item>-->
-
-    <select-user v-if="visibleSelect" ref="selectUserRef"></select-user>
-    <select-role v-if="visibleRole" ref="selectRoleRef"></select-role>
-  </div>
-</template>
-
-<script>
-import { Search } from "@element-plus/icons-vue";
-import SelectUser from "@/components/ren-process-running/src/select-user.vue";
-import SelectRole from "@/components/ren-process-running/src/select-role.vue";
-import baseService from "@/service/baseService";
-import { nextTick } from "vue";
-export default {
-  name: "UserTask",
-  props: {
-    id: String,
-    type: String
-  },
-  components: {
-    SelectUser,
-    SelectRole
-  },
-  data() {
-    return {
-      visibleSelect: false,
-      visibleRole: false,
-      userQuery: {},
-      defaultTaskForm: {
-        assignee: "",
-        candidateUsers: [],
-        candidateGroups: [],
-        dueDate: "",
-        followUpDate: "",
-        priority: ""
-      },
-      userTaskForm: {
-        type: 0
-      }
-    };
-  },
-  watch: {
-    id: {
-      immediate: true,
-      handler() {
-        this.bpmnElement = window.bpmnInstances.bpmnElement;
-        this.$nextTick(() => this.resetTaskForm());
-      }
-    }
-  },
-  methods: {
-    Search() {
-      return Search;
-    },
-    userSelect() {
-      this.visibleSelect = true;
-      nextTick(() => {
-        this.$refs.selectUserRef.init(this.setUserInfo, false);
-      });
-    },
-    setUserInfo(userInfo) {
-      this.userTaskForm.assigneeName = userInfo.realName;
-      this.userTaskForm.assignee = userInfo.id;
-      this.updateAssignee("assignee");
-    },
-    userGroupSelect() {
-      this.visibleSelect = true;
-      nextTick(() => {
-        this.$refs.selectUserRef.init(this.setUserGroupInfo, true);
-      });
-    },
-    setUserGroupInfo(users) {
-      const candidateUsersName = [];
-      this.userTaskForm.candidateUsers = [];
-      for (const user of users) {
-        candidateUsersName.push(user.realName);
-        this.userTaskForm.candidateUsers.push(user.id);
-      }
-      this.userTaskForm.candidateUsersName = candidateUsersName.join(",");
-      this.updateCandidateUsers("candidateUsers");
-    },
-    roleGroupSelect() {
-      this.visibleRole = true;
-      nextTick(() => {
-        this.$refs.selectRoleRef.init(this.setRoleGroupInfo);
-      });
-    },
-    setRoleGroupInfo(roles) {
-      const candidateGroupsName = [];
-      this.userTaskForm.candidateGroups = [];
-      for (const role of roles) {
-        candidateGroupsName.push(role.name);
-        this.userTaskForm.candidateGroups.push(role.id);
-      }
-      this.userTaskForm.candidateGroupsName = candidateGroupsName.join(",");
-      this.updateCandidateRole("candidateGroups");
-    },
-    cancelHandle() {
-      console.log(22);
-    },
-    submitHandle() {
-      console.log(22);
-    },
-    async getUserName(ids) {
-      const { data } = await baseService.post("/flow/sys/user/list", ids);
-      return data.join(",");
-    },
-    async getRoleName(ids) {
-      const { data } = await baseService.post("/flow/sys/role/list", ids);
-      return data.join(",");
-    },
-    async resetTaskForm() {
-      const assignee = this.bpmnElement?.businessObject["assignee"];
-      const candidateUsers = this.bpmnElement?.businessObject["candidateUsers"];
-      const candidateGroups = this.bpmnElement?.businessObject["candidateGroups"];
-
-      this.userTaskForm["assignee"] = "";
-      this.userTaskForm["candidateUsers"] = [];
-      this.userTaskForm["candidateGroups"] = [];
-
-      if (assignee) {
-        this.userTaskForm["assignee"] = assignee;
-        this.userTaskForm.assigneeName = await this.getUserName([assignee]);
-
-        return;
-      }
-
-      if (candidateUsers) {
-        this.userTaskForm["candidateUsers"] = candidateUsers.split(",");
-        this.userTaskForm.candidateUsersName = await this.getUserName(candidateUsers.split(","));
-
-        this.userTaskForm.type = 1;
-
-        return;
-      }
-
-      if (candidateGroups) {
-        this.userTaskForm["candidateGroups"] = candidateGroups.split(",");
-        this.userTaskForm.candidateGroupsName = await this.getRoleName(candidateGroups.split(","));
-
-        this.userTaskForm.type = 2;
-      }
-
-      // for (let key in this.defaultTaskForm) {
-      //   let value;
-      //   if (key === "candidateUsers" || key === "candidateGroups") {
-      //     value = this.bpmnElement?.businessObject[key] ? this.bpmnElement.businessObject[key].split(",") : [];
-      //   } else {
-      //     value = this.bpmnElement?.businessObject[key] || this.defaultTaskForm[key];
-      //   }
-      //   this.userTaskForm[key] = value;
-      // }
-    },
-    updateAssignee(key) {
-      const taskAttr = Object.create(null);
-      taskAttr["candidateUsers"] = null;
-      taskAttr["candidateGroups"] = null;
-      taskAttr[key] = this.userTaskForm[key] || null;
-
-      window.bpmnInstances.modeling.updateProperties(this.bpmnElement, taskAttr);
-    },
-    updateCandidateUsers(key) {
-      const taskAttr = Object.create(null);
-      taskAttr["assignee"] = null;
-      taskAttr["candidateGroups"] = null;
-      taskAttr[key] = this.userTaskForm[key] && this.userTaskForm[key].length ? this.userTaskForm[key].join(",") : null;
-
-      window.bpmnInstances.modeling.updateProperties(this.bpmnElement, taskAttr);
-    },
-    updateCandidateRole(key) {
-      const taskAttr = Object.create(null);
-      taskAttr["assignee"] = null;
-      taskAttr["candidateUsers"] = null;
-      taskAttr[key] = this.userTaskForm[key] && this.userTaskForm[key].length ? this.userTaskForm[key].join(",") : null;
-
-      window.bpmnInstances.modeling.updateProperties(this.bpmnElement, taskAttr);
-    },
-    updateElementTask(key) {
-      const taskAttr = Object.create(null);
-      if (key === "candidateUsers" || key === "candidateGroups") {
-        taskAttr[key] = this.userTaskForm[key] && this.userTaskForm[key].length ? this.userTaskForm[key].join(",") : null;
-      } else {
-        taskAttr[key] = this.userTaskForm[key] || null;
-      }
-      window.bpmnInstances.modeling.updateProperties(this.bpmnElement, taskAttr);
-    }
-  },
-  beforeUnmount() {
-    this.bpmnElement = null;
-  }
-};
-</script>

+ 0 - 70
src/components/ren-flowable/package/theme/element-variables.scss

@@ -1,70 +0,0 @@
-/* 改变主题色变量 */
-$--color-primary: #1890ff;
-$--color-danger: #ff4d4f;
-
-/* 改变 icon 字体路径变量,必需 */
-// $--font-path: '~element-ui/lib/theme-chalk/fonts';
-
-// @import "~element-ui/packages/theme-chalk/src/index";
-
-.el-table td,
-.el-table th {
-  color: #333;
-}
-.el-drawer__header {
-  padding: 16px 16px 8px 16px;
-  margin: 0;
-  line-height: 24px;
-  font-size: 18px;
-  color: #303133;
-  box-sizing: border-box;
-  border-bottom: 1px solid #e8e8e8;
-}
-div[class^="el-drawer"]:focus,
-span:focus {
-  outline: none;
-}
-.el-drawer__body {
-  box-sizing: border-box;
-  padding: 16px;
-  width: 100%;
-  overflow-y: auto;
-}
-
-.el-dialog {
-  margin-top: 50vh !important;
-  transform: translateY(-50%);
-  overflow: hidden;
-}
-.el-dialog__wrapper {
-  overflow: hidden;
-  max-height: 100vh;
-}
-.el-dialog__header {
-  padding: 16px 16px 8px 16px;
-  box-sizing: border-box;
-  border-bottom: 1px solid #e8e8e8;
-}
-.el-dialog__body {
-  padding: 16px;
-  max-height: 80vh;
-  box-sizing: border-box;
-  overflow-y: auto;
-}
-.el-dialog__footer {
-  padding: 16px;
-  box-sizing: border-box;
-  border-top: 1px solid #e8e8e8;
-}
-.el-dialog__close {
-  font-weight: 600;
-}
-.el-select {
-  width: 100%;
-}
-.el-divider:not(.el-divider--horizontal) {
-  margin: 0 8px ;
-}
-.el-divider.el-divider--horizontal {
-  margin: 16px 0;
-}

+ 0 - 11
src/components/ren-flowable/package/theme/index.scss

@@ -1,11 +0,0 @@
-@import "./process-designer.scss";
-@import "./process-panel.scss";
-
-.el-form {
-	.el-select,.el-date-editor.el-input, .el-range-editor.el-input__inner {
-			width: 100%;
-	}
-}
-//a.bjs-powered-by {
-//	display: none
-//}

+ 0 - 156
src/components/ren-flowable/package/theme/process-designer.scss

@@ -1,156 +0,0 @@
-@import "bpmn-js-token-simulation/assets/css/bpmn-js-token-simulation.css";
-@import "bpmn-js-token-simulation/assets/css/font-awesome.min.css";
-@import "bpmn-js-token-simulation/assets/css/normalize.css";
-
-// 边框被 token-simulation 样式覆盖了
-.djs-palette {
-  background: var(--palette-background-color);
-  border: solid 1px var(--palette-border-color) !important;
-  border-radius: 2px;
-}
-
-.my-process-designer {
-  display: flex;
-  flex-direction: column;
-  width: 100%;
-  height: 100%;
-  box-sizing: border-box;
-  .my-process-designer__header {
-    width: 100%;
-    min-height: 36px;
-    .el-button {
-      text-align: center;
-    }
-    .el-button-group {
-      margin: 4px;
-    }
-    .el-tooltip__popper {
-      .el-button {
-        width: 100%;
-        text-align: left;
-        padding-left: 8px;
-        padding-right: 8px;
-      }
-      .el-button:hover {
-        background: rgba(64, 158, 255, 0.8);
-        color: #ffffff;
-      }
-    }
-    .align {
-      position: relative;
-      i {
-        &:after {
-          content: "|";
-          position: absolute;
-          transform: rotate(90deg) translate(200%, -10%);
-        }
-      }
-    }
-    .align.align-left i {
-      transform: rotate(90deg);
-    }
-    .align.align-right i {
-      transform: rotate(-90deg);
-    }
-    .align.align-top i {
-      transform: rotate(180deg);
-    }
-    .align.align-bottom i {
-      transform: rotate(0deg);
-    }
-    .align.align-center i {
-      transform: rotate(90deg);
-      &:after {
-        transform: rotate(90deg) translate(0, -10%);
-      }
-    }
-    .align.align-middle i {
-      transform: rotate(0deg);
-      &:after {
-        transform: rotate(90deg) translate(0, -10%);
-      }
-    }
-  }
-  .my-process-designer__container {
-    display: inline-flex;
-    width: 100%;
-    flex: 1;
-    .my-process-designer__canvas {
-      flex: 1;
-      height: 100%;
-      position: relative;
-      background: url("data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNDAiIGhlaWdodD0iNDAiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGRlZnM+PHBhdHRlcm4gaWQ9ImEiIHdpZHRoPSI0MCIgaGVpZ2h0PSI0MCIgcGF0dGVyblVuaXRzPSJ1c2VyU3BhY2VPblVzZSI+PHBhdGggZD0iTTAgMTBoNDBNMTAgMHY0ME0wIDIwaDQwTTIwIDB2NDBNMCAzMGg0ME0zMCAwdjQwIiBmaWxsPSJub25lIiBzdHJva2U9IiNlMGUwZTAiIG9wYWNpdHk9Ii4yIi8+PHBhdGggZD0iTTQwIDBIMHY0MCIgZmlsbD0ibm9uZSIgc3Ryb2tlPSIjZTBlMGUwIi8+PC9wYXR0ZXJuPjwvZGVmcz48cmVjdCB3aWR0aD0iMTAwJSIgaGVpZ2h0PSIxMDAlIiBmaWxsPSJ1cmwoI2EpIi8+PC9zdmc+")
-      repeat !important;
-      div.toggle-mode {
-        display: none;
-      }
-    }
-    .my-process-designer__property-panel {
-      height: 100%;
-      overflow: scroll;
-      overflow-y: auto;
-      z-index: 10;
-      * {
-        box-sizing: border-box;
-      }
-    }
-    svg {
-      width: 100%;
-      height: 100%;
-      min-height: 100%;
-      overflow: hidden;
-    }
-  }
-}
-
-//侧边栏配置
-.djs-palette.open {
-  .djs-palette-entries {
-    div[class^="bpmn-icon-"]:before,
-    div[class*="bpmn-icon-"]:before {
-      line-height: unset;
-    }
-    div.entry {
-      position: relative;
-    }
-    div.entry:hover {
-      &::after {
-        width: max-content;
-        content: attr(title);
-        vertical-align: text-bottom;
-        position: absolute;
-        right: -10px;
-        top: 0;
-        bottom: 0;
-        overflow: hidden;
-        transform: translateX(100%);
-        font-size: 0.5em;
-        display: inline-block;
-        text-decoration: inherit;
-        font-variant: normal;
-        text-transform: none;
-        background: #fafafa;
-        box-shadow: 0 0 6px #eeeeee;
-        border: 1px solid #cccccc;
-        box-sizing: border-box;
-        padding: 0 16px;
-        border-radius: 4px;
-        z-index: 100;
-      }
-    }
-  }
-}
-pre {
-  margin: 0;
-  height: 100%;
-  overflow: hidden;
-  max-height: calc(80vh - 32px);
-  overflow-y: auto;
-}
-.hljs {
-  word-break: break-word;
-  white-space: pre-wrap;
-}
-.hljs * {
-  font-family: Consolas, Monaco, monospace;
-}

+ 0 - 107
src/components/ren-flowable/package/theme/process-panel.scss

@@ -1,107 +0,0 @@
-.process-panel__container {
-  box-sizing: border-box;
-  padding: 0 8px;
-  border-left: 1px solid #eeeeee;
-  box-shadow: 0 0 8px #cccccc;
-  max-height: 100%;
-  overflow-y: scroll;
-}
-.panel-tab__title {
-  font-weight: 600;
-  padding: 0 8px;
-  font-size: 1.1em;
-  line-height: 1.2em;
-  i {
-    margin-right: 8px;
-    font-size: 1.2em;
-  }
-}
-.panel-tab__content {
-  width: 100%;
-  box-sizing: border-box;
-  border-top: 1px solid #eeeeee;
-  padding: 8px 16px;
-  .panel-tab__content--title {
-    display: flex;
-    justify-content: space-between;
-    padding-bottom: 8px;
-    span {
-      flex: 1;
-      text-align: left;
-    }
-  }
-}
-.element-property {
-  width: 100%;
-  display: flex;
-  align-items: flex-start;
-  margin: 8px 0;
-  .element-property__label {
-    display: block;
-    width: 90px;
-    text-align: right;
-    overflow: hidden;
-    padding-right: 12px;
-    line-height: 32px;
-    font-size: 14px;
-    box-sizing: border-box;
-  }
-  .element-property__value {
-    flex: 1;
-    line-height: 32px;
-  }
-  .el-form-item {
-    width: 100%;
-    margin-bottom: 0;
-    padding-bottom: 18px;
-  }
-}
-.list-property {
-  flex-direction: column;
-  .element-listener-item {
-    width: 100%;
-    display: inline-grid;
-    grid-template-columns: 16px auto 32px 32px;
-    grid-column-gap: 8px;
-  }
-  .element-listener-item + .element-listener-item {
-    margin-top: 8px;
-  }
-}
-.listener-filed__title {
-  display: inline-flex;
-  width: 100%;
-  justify-content: space-between;
-  align-items: center;
-  margin-top: 0;
-  span {
-    // width: 200px;
-    text-align: left;
-    font-size: 14px;
-  }
-  i {
-    margin-right: 8px;
-  }
-}
-.element-drawer__button {
-  margin-top: 8px;
-  width: 100%;
-  display: inline-flex;
-  justify-content: space-around;
-}
-.element-drawer__button > .el-button {
-  width: 100%;
-}
-
-.el-collapse-item__content {
-  padding-bottom: 0;
-}
-.el-input.is-disabled .el-input__inner {
-  color: #999999;
-}
-.el-form-item.el-form-item--mini {
-  margin-bottom: 0;
-  & + .el-form-item {
-    margin-top: 16px;
-  }
-}

+ 0 - 71
src/components/ren-flowable/package/utils.js

@@ -1,71 +0,0 @@
-// 创建监听器实例
-export function createListenerObject(options, isTask, prefix) {
-  const listenerObj = Object.create(null);
-  listenerObj.event = options.event;
-  isTask && (listenerObj.id = options.id); // 任务监听器特有的 id 字段
-  switch (options.listenerType) {
-    case 'scriptListener':
-      listenerObj.script = createScriptObject(options, prefix);
-      break;
-    case 'expressionListener':
-      listenerObj.expression = options.expression;
-      break;
-    case 'delegateExpressionListener':
-      listenerObj.delegateExpression = options.delegateExpression;
-      break;
-    default:
-      listenerObj.class = options.class;
-  }
-  // 注入字段
-  if (options.fields) {
-    listenerObj.fields = options.fields.map(field => {
-      return createFieldObject(field, prefix);
-    });
-  }
-  // 任务监听器的 定时器 设置
-  if (isTask && options.event === 'timeout' && !!options.eventDefinitionType) {
-    const timeDefinition = window.bpmnInstances.moddle.create('bpmn:FormalExpression', {
-      body: options.eventTimeDefinitions
-    });
-    const TimerEventDefinition = window.bpmnInstances.moddle.create('bpmn:TimerEventDefinition', {
-      id: `TimerEventDefinition_${uuid(8)}`,
-      [`time${options.eventDefinitionType.replace(/^\S/, s => s.toUpperCase())}`]: timeDefinition
-    });
-    listenerObj.eventDefinitions = [TimerEventDefinition];
-  }
-  return window.bpmnInstances.moddle.create(`${prefix}:${isTask ? 'TaskListener' : 'ExecutionListener'}`, listenerObj);
-}
-
-// 创建 监听器的注入字段 实例
-export function createFieldObject(option, prefix) {
-  const { name, fieldType, string, expression } = option;
-  const fieldConfig = fieldType === 'string' ? { name, string } : { name, expression };
-  return window.bpmnInstances.moddle.create(`${prefix}:Field`, fieldConfig);
-}
-
-// 创建脚本实例
-export function createScriptObject(options, prefix) {
-  const { scriptType, scriptFormat, value, resource } = options;
-  const scriptConfig = scriptType === 'inlineScript' ? { scriptFormat, value } : { scriptFormat, resource };
-  return window.bpmnInstances.moddle.create(`${prefix}:Script`, scriptConfig);
-}
-
-// 更新元素扩展属性
-export function updateElementExtensions(element, extensionList) {
-  const extensions = window.bpmnInstances.moddle.create('bpmn:ExtensionElements', {
-    values: extensionList
-  });
-  window.bpmnInstances.modeling.updateProperties(element, {
-    extensionElements: extensions
-  });
-}
-
-// 创建一个id
-export function uuid(length = 8, chars) {
-  let result = '';
-  const charsString = chars || '0123456789abcdefghijklmnopqrstuvwxyz';
-  for (let i = length; i > 0; --i) {
-    result += charsString[Math.floor(Math.random() * charsString.length)];
-  }
-  return result;
-}

+ 0 - 25
src/components/ren-flowable/translations.js

@@ -1,25 +0,0 @@
-/**
- * This is a sample file that should be replaced with the actual translation.
- *
- * Checkout https://github.com/bpmn-io/bpmn-js-i18n for a list of available
- * translations and labels to translate.
- */
-export default {
-  'Exclusive Gateway': 'Exklusives Gateway',
-  'Parallel Gateway': 'Paralleles Gateway',
-  'Inclusive Gateway': 'Inklusives Gateway',
-  'Complex Gateway': 'Komplexes Gateway',
-  'Event based Gateway': 'Ereignis-basiertes Gateway',
-  'Message Start Event': '消息启动事件',
-  'Timer Start Event': '定时启动事件',
-  'Conditional Start Event': '条件启动事件',
-  'Signal Start Event': '信号启动事件',
-  'Error Start Event': '错误启动事件',
-  'Escalation Start Event': '升级启动事件',
-  'Compensation Start Event': '补偿启动事件',
-  'Message Start Event (non-interrupting)': '消息启动事件 (非中断)',
-  'Timer Start Event (non-interrupting)': '定时启动事件 (非中断)',
-  'Conditional Start Event (non-interrupting)': '条件启动事件 (非中断)',
-  'Signal Start Event (non-interrupting)': '信号启动事件 (非中断)',
-  'Escalation Start Event (non-interrupting)': '升级启动事件 (非中断)'
-};

+ 0 - 694
src/components/ren-flowable/utils/min-dash.js

@@ -1,694 +0,0 @@
-/* eslint-disable no-func-assign */
-/**
- * Flatten array, one level deep.
- *
- * @param {Array<?>} arr
- *
- * @return {Array<?>}
- */
-function flatten(arr) {
-  return Array.prototype.concat.apply([], arr);
-}
-
-var nativeToString = Object.prototype.toString;
-var nativeHasOwnProperty = Object.prototype.hasOwnProperty;
-function isUndefined(obj) {
-  return obj === undefined;
-}
-function isDefined(obj) {
-  return obj !== undefined;
-}
-function isNil(obj) {
-  return obj == null;
-}
-function isArray(obj) {
-  return nativeToString.call(obj) === '[object Array]';
-}
-function isObject(obj) {
-  return nativeToString.call(obj) === '[object Object]';
-}
-function isNumber(obj) {
-  return nativeToString.call(obj) === '[object Number]';
-}
-function isFunction(obj) {
-  var tag = nativeToString.call(obj);
-  return tag === '[object Function]' || tag === '[object AsyncFunction]' || tag === '[object GeneratorFunction]' || tag === '[object AsyncGeneratorFunction]' || tag === '[object Proxy]';
-}
-function isString(obj) {
-  return nativeToString.call(obj) === '[object String]';
-}
-/**
- * Ensure collection is an array.
- *
- * @param {Object} obj
- */
-
-function ensureArray(obj) {
-  if (isArray(obj)) {
-    return;
-  }
-
-  throw new Error('must supply array');
-}
-/**
- * Return true, if target owns a property with the given key.
- *
- * @param {Object} target
- * @param {String} key
- *
- * @return {Boolean}
- */
-
-function has(target, key) {
-  return nativeHasOwnProperty.call(target, key);
-}
-
-/**
- * Find element in collection.
- *
- * @param  {Array|Object} collection
- * @param  {Function|Object} matcher
- *
- * @return {Object}
- */
-
-function find(collection, matcher) {
-  matcher = toMatcher(matcher);
-  var match;
-  forEach(collection, function(val, key) {
-    if (matcher(val, key)) {
-      match = val;
-      return false;
-    }
-  });
-  return match;
-}
-/**
- * Find element index in collection.
- *
- * @param  {Array|Object} collection
- * @param  {Function} matcher
- *
- * @return {Object}
- */
-
-function findIndex(collection, matcher) {
-  matcher = toMatcher(matcher);
-  var idx = isArray(collection) ? -1 : undefined;
-  forEach(collection, function(val, key) {
-    if (matcher(val, key)) {
-      idx = key;
-      return false;
-    }
-  });
-  return idx;
-}
-/**
- * Find element in collection.
- *
- * @param  {Array|Object} collection
- * @param  {Function} matcher
- *
- * @return {Array} result
- */
-
-function filter(collection, matcher) {
-  var result = [];
-  forEach(collection, function(val, key) {
-    if (matcher(val, key)) {
-      result.push(val);
-    }
-  });
-  return result;
-}
-/**
- * Iterate over collection; returning something
- * (non-undefined) will stop iteration.
- *
- * @param  {Array|Object} collection
- * @param  {Function} iterator
- *
- * @return {Object} return result that stopped the iteration
- */
-
-function forEach(collection, iterator) {
-  var val, result;
-
-  if (isUndefined(collection)) {
-    return;
-  }
-
-  var convertKey = isArray(collection) ? toNum : identity;
-
-  for (var key in collection) {
-    if (has(collection, key)) {
-      val = collection[key];
-      result = iterator(val, convertKey(key));
-
-      if (result === false) {
-        return val;
-      }
-    }
-  }
-}
-/**
- * Return collection without element.
- *
- * @param  {Array} arr
- * @param  {Function} matcher
- *
- * @return {Array}
- */
-
-function without(arr, matcher) {
-  if (isUndefined(arr)) {
-    return [];
-  }
-
-  ensureArray(arr);
-  matcher = toMatcher(matcher);
-  return arr.filter(function(el, idx) {
-    return !matcher(el, idx);
-  });
-}
-/**
- * Reduce collection, returning a single result.
- *
- * @param  {Object|Array} collection
- * @param  {Function} iterator
- * @param  {Any} result
- *
- * @return {Any} result returned from last iterator
- */
-
-function reduce(collection, iterator, result) {
-  forEach(collection, function(value, idx) {
-    result = iterator(result, value, idx);
-  });
-  return result;
-}
-/**
- * Return true if every element in the collection
- * matches the criteria.
- *
- * @param  {Object|Array} collection
- * @param  {Function} matcher
- *
- * @return {Boolean}
- */
-
-function every(collection, matcher) {
-  return !!reduce(collection, function(matches, val, key) {
-    return matches && matcher(val, key);
-  }, true);
-}
-/**
- * Return true if some elements in the collection
- * match the criteria.
- *
- * @param  {Object|Array} collection
- * @param  {Function} matcher
- *
- * @return {Boolean}
- */
-
-function some(collection, matcher) {
-  return !!find(collection, matcher);
-}
-/**
- * Transform a collection into another collection
- * by piping each member through the given fn.
- *
- * @param  {Object|Array}   collection
- * @param  {Function} fn
- *
- * @return {Array} transformed collection
- */
-
-function map(collection, fn) {
-  var result = [];
-  forEach(collection, function(val, key) {
-    result.push(fn(val, key));
-  });
-  return result;
-}
-/**
- * Get the collections keys.
- *
- * @param  {Object|Array} collection
- *
- * @return {Array}
- */
-
-function keys(collection) {
-  return collection && Object.keys(collection) || [];
-}
-/**
- * Shorthand for `keys(o).length`.
- *
- * @param  {Object|Array} collection
- *
- * @return {Number}
- */
-
-function size(collection) {
-  return keys(collection).length;
-}
-/**
- * Get the values in the collection.
- *
- * @param  {Object|Array} collection
- *
- * @return {Array}
- */
-
-function values(collection) {
-  return map(collection, function(val) {
-    return val;
-  });
-}
-/**
- * Group collection members by attribute.
- *
- * @param  {Object|Array} collection
- * @param  {Function} extractor
- *
- * @return {Object} map with { attrValue => [ a, b, c ] }
- */
-
-function groupBy(collection, extractor) {
-  var grouped = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
-  extractor = toExtractor(extractor);
-  forEach(collection, function(val) {
-    var discriminator = extractor(val) || '_';
-    var group = grouped[discriminator];
-
-    if (!group) {
-      group = grouped[discriminator] = [];
-    }
-
-    group.push(val);
-  });
-  return grouped;
-}
-function uniqueBy(extractor) {
-  extractor = toExtractor(extractor);
-  var grouped = {};
-
-  for (var _len = arguments.length, collections = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
-    collections[_key - 1] = arguments[_key];
-  }
-
-  forEach(collections, function(c) {
-    return groupBy(c, extractor, grouped);
-  });
-  var result = map(grouped, function(val, key) {
-    return val[0];
-  });
-  return result;
-}
-var unionBy = uniqueBy;
-/**
- * Sort collection by criteria.
- *
- * @param  {Object|Array} collection
- * @param  {String|Function} extractor
- *
- * @return {Array}
- */
-
-function sortBy(collection, extractor) {
-  extractor = toExtractor(extractor);
-  var sorted = [];
-  forEach(collection, function(value, key) {
-    var disc = extractor(value, key);
-    var entry = {
-      d: disc,
-      v: value
-    };
-
-    for (var idx = 0; idx < sorted.length; idx++) {
-      var d = sorted[idx].d;
-
-      if (disc < d) {
-        sorted.splice(idx, 0, entry);
-        return;
-      }
-    } // not inserted, append (!)
-
-    sorted.push(entry);
-  });
-  return map(sorted, function(e) {
-    return e.v;
-  });
-}
-/**
- * Create an object pattern matcher.
- *
- * @example
- *
- * const matcher = matchPattern({ id: 1 });
- *
- * let element = find(elements, matcher);
- *
- * @param  {Object} pattern
- *
- * @return {Function} matcherFn
- */
-
-function matchPattern(pattern) {
-  return function(el) {
-    return every(pattern, function(val, key) {
-      return el[key] === val;
-    });
-  };
-}
-
-function toExtractor(extractor) {
-  return isFunction(extractor) ? extractor : function(e) {
-    return e[extractor];
-  };
-}
-
-function toMatcher(matcher) {
-  return isFunction(matcher) ? matcher : function(e) {
-    return e === matcher;
-  };
-}
-
-function identity(arg) {
-  return arg;
-}
-
-function toNum(arg) {
-  return Number(arg);
-}
-
-/**
- * Debounce fn, calling it only once if the given time
- * elapsed between calls.
- *
- * Lodash-style the function exposes methods to `#clear`
- * and `#flush` to control internal behavior.
- *
- * @param  {Function} fn
- * @param  {Number} timeout
- *
- * @return {Function} debounced function
- */
-function debounce(fn, timeout) {
-  var timer;
-  var lastArgs;
-  var lastThis;
-  var lastNow;
-
-  function fire(force) {
-    var now = Date.now();
-    var scheduledDiff = force ? 0 : lastNow + timeout - now;
-
-    if (scheduledDiff > 0) {
-      return schedule(scheduledDiff);
-    }
-
-    fn.apply(lastThis, lastArgs);
-    clear();
-  }
-
-  function schedule(timeout) {
-    timer = setTimeout(fire, timeout);
-  }
-
-  function clear() {
-    if (timer) {
-      clearTimeout(timer);
-    }
-
-    timer = lastNow = lastArgs = lastThis = undefined;
-  }
-
-  function flush() {
-    if (timer) {
-      fire(true);
-    }
-
-    clear();
-  }
-
-  function callback() {
-    lastNow = Date.now();
-
-    for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
-      args[_key] = arguments[_key];
-    }
-
-    lastArgs = args;
-    lastThis = this; // ensure an execution is scheduled
-
-    if (!timer) {
-      schedule(timeout);
-    }
-  }
-
-  callback.flush = flush;
-  callback.cancel = clear;
-  return callback;
-}
-/**
- * Throttle fn, calling at most once
- * in the given interval.
- *
- * @param  {Function} fn
- * @param  {Number} interval
- *
- * @return {Function} throttled function
- */
-
-function throttle(fn, interval) {
-  var throttling = false;
-  return function() {
-    if (throttling) {
-      return;
-    }
-
-    fn.apply(void 0, arguments);
-    throttling = true;
-    setTimeout(function() {
-      throttling = false;
-    }, interval);
-  };
-}
-/**
- * Bind function against target <this>.
- *
- * @param  {Function} fn
- * @param  {Object}   target
- *
- * @return {Function} bound function
- */
-
-function bind(fn, target) {
-  return fn.bind(target);
-}
-
-function _typeof(obj) {
-  '@babel/helpers - typeof';
-
-  if (typeof Symbol === 'function' && typeof Symbol.iterator === 'symbol') {
-    _typeof = function(obj) {
-      return typeof obj;
-    };
-  } else {
-    _typeof = function(obj) {
-      return obj && typeof Symbol === 'function' && obj.constructor === Symbol && obj !== Symbol.prototype ? 'symbol' : typeof obj;
-    };
-  }
-
-  return _typeof(obj);
-}
-
-function _extends() {
-  _extends = Object.assign || function(target) {
-    for (var i = 1; i < arguments.length; i++) {
-      var source = arguments[i];
-
-      for (var key in source) {
-        if (Object.prototype.hasOwnProperty.call(source, key)) {
-          target[key] = source[key];
-        }
-      }
-    }
-
-    return target;
-  };
-
-  return _extends.apply(this, arguments);
-}
-
-/**
- * Convenience wrapper for `Object.assign`.
- *
- * @param {Object} target
- * @param {...Object} others
- *
- * @return {Object} the target
- */
-
-function assign(target) {
-  for (var _len = arguments.length, others = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
-    others[_key - 1] = arguments[_key];
-  }
-
-  return _extends.apply(void 0, [target].concat(others));
-}
-/**
- * Sets a nested property of a given object to the specified value.
- *
- * This mutates the object and returns it.
- *
- * @param {Object} target The target of the set operation.
- * @param {(string|number)[]} path The path to the nested value.
- * @param {any} value The value to set.
- */
-
-function set(target, path, value) {
-  var currentTarget = target;
-  forEach(path, function(key, idx) {
-    if (typeof key !== 'number' && typeof key !== 'string') {
-      throw new Error('illegal key type: ' + _typeof(key) + '. Key should be of type number or string.');
-    }
-
-    if (key === 'constructor') {
-      throw new Error('illegal key: constructor');
-    }
-
-    if (key === '__proto__') {
-      throw new Error('illegal key: __proto__');
-    }
-
-    var nextKey = path[idx + 1];
-    var nextTarget = currentTarget[key];
-
-    if (isDefined(nextKey) && isNil(nextTarget)) {
-      nextTarget = currentTarget[key] = isNaN(+nextKey) ? {} : [];
-    }
-
-    if (isUndefined(nextKey)) {
-      if (isUndefined(value)) {
-        delete currentTarget[key];
-      } else {
-        currentTarget[key] = value;
-      }
-    } else {
-      currentTarget = nextTarget;
-    }
-  });
-  return target;
-}
-/**
- * Gets a nested property of a given object.
- *
- * @param {Object} target The target of the get operation.
- * @param {(string|number)[]} path The path to the nested value.
- * @param {any} [defaultValue] The value to return if no value exists.
- */
-
-function get(target, path, defaultValue) {
-  var currentTarget = target;
-  forEach(path, function(key) {
-    // accessing nil property yields <undefined>
-    if (isNil(currentTarget)) {
-      currentTarget = undefined;
-      return false;
-    }
-
-    currentTarget = currentTarget[key];
-  });
-  return isUndefined(currentTarget) ? defaultValue : currentTarget;
-}
-/**
- * Pick given properties from the target object.
- *
- * @param {Object} target
- * @param {Array} properties
- *
- * @return {Object} target
- */
-
-function pick(target, properties) {
-  var result = {};
-  var obj = Object(target);
-  forEach(properties, function(prop) {
-    if (prop in obj) {
-      result[prop] = target[prop];
-    }
-  });
-  return result;
-}
-/**
- * Pick all target properties, excluding the given ones.
- *
- * @param {Object} target
- * @param {Array} properties
- *
- * @return {Object} target
- */
-
-function omit(target, properties) {
-  var result = {};
-  var obj = Object(target);
-  forEach(obj, function(prop, key) {
-    if (properties.indexOf(key) === -1) {
-      result[key] = prop;
-    }
-  });
-  return result;
-}
-/**
- * Recursively merge `...sources` into given target.
- *
- * Does support merging objects; does not support merging arrays.
- *
- * @param {Object} target
- * @param {...Object} sources
- *
- * @return {Object} the target
- */
-
-function merge(target) {
-  for (var _len2 = arguments.length, sources = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {
-    sources[_key2 - 1] = arguments[_key2];
-  }
-
-  if (!sources.length) {
-    return target;
-  }
-
-  forEach(sources, function(source) {
-    // skip non-obj sources, i.e. null
-    if (!source || !isObject(source)) {
-      return;
-    }
-
-    forEach(source, function(sourceVal, key) {
-      if (key === '__proto__') {
-        return;
-      }
-
-      var targetVal = target[key];
-
-      if (isObject(sourceVal)) {
-        if (!isObject(targetVal)) {
-          // override target[key] with object
-          targetVal = {};
-        }
-
-        target[key] = merge(targetVal, sourceVal);
-      } else {
-        target[key] = sourceVal;
-      }
-    });
-  });
-  return target;
-}
-
-export { assign, bind, debounce, ensureArray, every, filter, find, findIndex, flatten, forEach, get, groupBy, has, isArray, isDefined, isFunction, isNil, isNumber, isObject, isString, isUndefined, keys, map, matchPattern, merge, omit, pick, reduce, set, size, some, sortBy, throttle, unionBy, uniqueBy, values, without };

+ 0 - 4
src/components/ren-process-detail/index.ts

@@ -1,4 +0,0 @@
-import { withInstall } from "@/utils/utils";
-import RenProcessDetail from "./src/ren-process-detail.vue";
-RenProcessDetail.name = "RenProcessDetail";
-export default withInstall(RenProcessDetail);

+ 0 - 71
src/components/ren-process-detail/src/ren-process-detail.vue

@@ -1,71 +0,0 @@
-<template>
-  <div class="mod-sys__process">
-    <el-table v-loading="state.dataListLoading" :data="state.dataList" border @selection-change="state.dataListSelectionChangeHandle" @sort-change="state.dataListSortChangeHandle" style="width: 100%">
-      <el-table-column prop="activityName" :label="$t('process.taskName')" header-align="center" align="center"></el-table-column>
-      <el-table-column prop="assigneeName" :label="$t('process.assignee')" header-align="center" align="center"></el-table-column>
-      <el-table-column prop="startTime" :label="$t('task.startTime')" header-align="center" align="center"></el-table-column>
-      <el-table-column prop="endTime" :label="$t('task.endTime')" header-align="center" align="center"></el-table-column>
-      <el-table-column prop="comment" :label="$t('process.comment')" header-align="center" align="center"></el-table-column>
-      <el-table-column prop="durationInSeconds" :label="$t('task.durationInSeconds')" header-align="center" align="center" width="180"></el-table-column>
-    </el-table>
-    <el-pagination
-      v-if="state.dataForm.pid === '0'"
-      :current-page="state.page"
-      :page-sizes="[10, 20, 50, 100]"
-      :page-size="state.limit"
-      :total="state.total"
-      small="true"
-      layout="total, sizes, prev, pager, next, jumper"
-      @size-change="state.pageSizeChangeHandle"
-      @current-change="state.pageCurrentChangeHandle"
-    >
-    </el-pagination>
-  </div>
-</template>
-<style scoped>
-.image {
-  width: 60%;
-  display: block;
-  margin: 0 auto 30px auto;
-}
-</style>
-
-<script lang="ts" setup>
-import qs from "qs";
-import useView from "@/hooks/useView";
-import { onMounted, reactive, toRefs } from "vue";
-import { useRoute } from "vue-router";
-import { getToken } from "@/utils/cache";
-import app from "@/constants/app";
-
-const route = useRoute();
-const view = reactive({
-  getDataListURL: "/flow/common/historic/list",
-  getDataListIsPage: false,
-  createdIsNeed: false,
-  dataForm: {
-    processInstanceId: "",
-    pid: ""
-  }
-});
-
-const state = reactive({ ...useView(view), ...toRefs(view) });
-
-onMounted(() => {
-  init();
-});
-
-const init = () => {
-  state.dataForm.processInstanceId = route.query.processInstanceId as string;
-  getDiagramImage();
-  state.getDataList();
-};
-
-const getDiagramImage = () => {
-  const params = qs.stringify({
-    token: getToken(),
-    processInstanceId: state.dataForm.processInstanceId
-  });
-  return `${app.api}/flow/common/diagram/image?${params}`;
-};
-</script>

+ 0 - 5
src/components/ren-process-running/index.ts

@@ -1,5 +0,0 @@
-import { withInstall } from "@/utils/utils";
-import RenProcessRunning from "./src/ren-process-running.vue";
-
-RenProcessRunning.name = "RenProcessRunning";
-export default withInstall(RenProcessRunning);

+ 0 - 49
src/components/ren-process-running/src/ren-process-running.vue

@@ -1,49 +0,0 @@
-<template>
-  <div>
-    <el-button type="primary" @click="completeTask()">{{ $t("process.completeTask") }}</el-button>
-    <el-button type="warning" @click="rejectTask()">{{ $t("process.rejectTask") }}</el-button>
-    <el-button type="info" @click="delegateTask()">{{ $t("process.entrustTask") }}</el-button>
-    <ren-task-delegate v-if="renTaskDelegateVisible" ref="renTaskDelegateRef"></ren-task-delegate>
-    <ren-task-handle v-if="renTaskHandleVisible" ref="renTaskHandleRef"></ren-task-handle>
-  </div>
-</template>
-
-<script lang="ts" setup>
-import { nextTick, reactive, ref } from "vue";
-import RenTaskDelegate from "./ren-task-delegate.vue";
-import RenTaskHandle from "./ren-task-handle.vue";
-import { useRoute } from "vue-router";
-const route = useRoute();
-
-const renTaskDelegateVisible = ref(false);
-const renTaskHandleVisible = ref(false);
-const renTaskDelegateRef = ref();
-const renTaskHandleRef = ref();
-const dataForm = reactive({
-  taskId: route.query.taskId
-});
-
-const completeTask = () => {
-  renTaskHandleVisible.value = true;
-  nextTick(() => {
-    renTaskHandleRef.value.dataForm.taskId = dataForm.taskId;
-    renTaskHandleRef.value.init("complete");
-  });
-};
-
-const rejectTask = () => {
-  renTaskHandleVisible.value = true;
-  nextTick(() => {
-    renTaskHandleRef.value.dataForm.taskId = dataForm.taskId;
-    renTaskHandleRef.value.init("reject");
-  });
-};
-
-const delegateTask = () => {
-  renTaskDelegateVisible.value = true;
-  nextTick(() => {
-    renTaskDelegateRef.value.dataForm.taskId = dataForm.taskId;
-    renTaskDelegateRef.value.init();
-  });
-};
-</script>

+ 0 - 104
src/components/ren-process-running/src/ren-task-delegate.vue

@@ -1,104 +0,0 @@
-<template>
-  <el-dialog v-model="state.visible" :title="$t('process.entrustTask')" :close-on-click-modal="false" :close-on-press-escape="false">
-    <el-form :model="dataForm" :rules="rules" ref="dataFormRef" @keyup.enter="dataFormSubmitHandle()" :label-width="$i18n.locale === 'en-US' ? '120px' : '80px'">
-      <el-form-item :label="$t('process.assignee')">
-        <el-input v-model="dataForm.userName" class="input-with-select">
-          <template v-slot:append>
-            <el-button icon="search" @click="selectUserInfo()"></el-button>
-          </template>
-        </el-input>
-      </el-form-item>
-    </el-form>
-    <template v-slot:footer>
-      <el-button @click="state.visible = false">{{ $t("cancel") }}</el-button>
-      <el-button type="primary" @click="delegateTask()">{{ $t("confirm") }}</el-button>
-    </template>
-    <select-user v-if="state.selectUserVisible" ref="selectUserRef"></select-user>
-  </el-dialog>
-</template>
-
-<script lang="ts" setup>
-import SelectUser from "./select-user.vue";
-import useView from "@/hooks/useView";
-import { nextTick, reactive, ref, toRefs } from "vue";
-import baseService from "@/service/baseService";
-import { IObject } from "@/types/interface";
-import { useI18n } from "vue-i18n";
-import { ElMessage } from "element-plus";
-const { t } = useI18n();
-const dataFormRef = ref();
-const selectUserRef = ref();
-
-const view = reactive({
-  createdIsNeed: false,
-  visible: false,
-  selectUserVisible: false
-});
-
-const dataForm = reactive({
-  id: "",
-  userId: "",
-  userName: "",
-  taskId: ""
-});
-
-const state = reactive({ ...useView(view), ...toRefs(view) });
-
-const rules = ref({
-  userName: [{ required: true, message: t("validate.required"), trigger: "blur" }]
-});
-
-const init = () => {
-  state.visible = true;
-  nextTick(() => {
-    dataFormRef.value.resetFields();
-  });
-};
-
-const dataFormSubmitHandle = () => {
-  //
-};
-
-// 委托
-const delegateTask = () => {
-  if (!dataForm.userId) {
-    ElMessage.error(t("process.entrustError"));
-    return;
-  }
-  const task = {
-    taskId: dataForm.taskId,
-    userId: dataForm.userId
-  };
-  baseService
-    .post("/flow/common/delegate", task, {
-      "content-type": "application/x-www-form-urlencoded"
-    })
-    .then((res) => {
-      ElMessage.success({
-        message: t("prompt.success"),
-        duration: 500,
-        onClose: () => {
-          state.visible = false;
-          state.closeCurrentTab();
-        }
-      });
-    });
-};
-
-const selectUserInfo = () => {
-  state.selectUserVisible = true;
-  nextTick(() => {
-    selectUserRef.value.init(setUserInfo);
-  });
-};
-
-const setUserInfo = (userInfo: IObject) => {
-  dataForm.userId = userInfo.id;
-  dataForm.userName = userInfo.realName;
-};
-
-defineExpose({
-  init,
-  dataForm
-});
-</script>

+ 0 - 136
src/components/ren-process-running/src/ren-task-handle.vue

@@ -1,136 +0,0 @@
-<template>
-  <el-dialog v-model="visible" :title="state.handleTitle" :close-on-click-modal="false" :close-on-press-escape="false">
-    <el-form :model="dataForm" :rules="rules" ref="dataFormRef" @keyup.enter="dataFormSubmitHandle()" :label-width="$i18n.locale === 'en-US' ? '120px' : '80px'">
-      <el-form-item :label="$t('process.comment')" prop="comment">
-        <el-input type="textarea" v-model="dataForm.comment" :placeholder="$t('process.comment')"></el-input>
-      </el-form-item>
-    </el-form>
-    <template v-slot:footer>
-      <el-button @click="visible = false">{{ $t("cancel") }}</el-button>
-      <el-button type="primary" @click="dataFormSubmitHandle()">{{ $t("confirm") }}</el-button>
-    </template>
-  </el-dialog>
-</template>
-
-<script lang="ts" setup>
-import useView from "@/hooks/useView";
-import { nextTick, reactive, ref, toRefs } from "vue";
-import baseService from "@/service/baseService";
-import { useI18n } from "vue-i18n";
-import { ElMessage } from "element-plus";
-const { t } = useI18n();
-const visible = ref(false);
-const dataFormRef = ref();
-
-const view = reactive({
-  createdIsNeed: false,
-  handleType: "",
-  handleTitle: ""
-});
-
-const dataForm = reactive({
-  comment: "",
-  taskId: ""
-});
-
-const state = reactive({ ...useView(view), ...toRefs(view) });
-
-const rules = ref({
-  comment: [{ required: true, message: t("validate.required"), trigger: "blur" }]
-});
-
-const init = (type: string) => {
-  visible.value = true;
-  state.handleType = type;
-
-  if (state.handleType === "complete") {
-    state.handleTitle = t("process.completeTask");
-  } else if (state.handleType === "reject") {
-    state.handleTitle = t("process.rejectTask");
-  }
-  nextTick(() => {
-    dataFormRef.value.resetFields();
-  });
-};
-
-// 表单提交
-const dataFormSubmitHandle = () => {
-  if (state.handleType === "complete") {
-    completeTask();
-  } else if (state.handleType === "reject") {
-    rejectTask();
-  }
-};
-
-// 驳回
-const rejectTask = () => {
-  dataFormRef.value.validate((valid: boolean) => {
-    if (!valid) {
-      return false;
-    }
-    if (!dataForm.taskId) {
-      return false;
-    }
-    const params = {
-      taskId: dataForm.taskId,
-      comment: dataForm.comment
-    };
-    baseService
-      .post("/flow/common/reject", params, {
-        "content-type": "application/x-www-form-urlencoded"
-      })
-      .then((res) => {
-        if (res.code !== 0) {
-          ElMessage.error(res.msg);
-          return;
-        }
-        ElMessage.success({
-          message: t("prompt.success"),
-          duration: 500,
-          onClose: () => {
-            visible.value = false;
-            state.closeCurrentTab();
-          }
-        });
-      });
-  });
-};
-
-// 通过
-const completeTask = () => {
-  dataFormRef.value.validate((valid: boolean) => {
-    if (!valid) {
-      return false;
-    }
-    if (!dataForm.taskId) {
-      return false;
-    }
-    const params = {
-      taskId: dataForm.taskId,
-      comment: dataForm.comment
-    };
-    baseService
-      .post("/flow/common/complete?", params, {
-        "content-type": "application/x-www-form-urlencoded"
-      })
-      .then((res) => {
-        if (res.code !== 0) {
-          ElMessage.error(res.msg);
-          return;
-        }
-        ElMessage.success({
-          message: t("prompt.success"),
-          duration: 500,
-          onClose: () => {
-            visible.value = false;
-            state.closeCurrentTab();
-          }
-        });
-      });
-  });
-};
-defineExpose({
-  init,
-  dataForm
-});
-</script>

+ 0 - 67
src/components/ren-process-running/src/select-role.vue

@@ -1,67 +0,0 @@
-<template>
-  <el-dialog v-model="state.visibleSelect" width="60%" :modal="false" title="选择角色" :close-on-click-modal="false" :close-on-press-escape="false">
-    <div class="mod-sys__role">
-      <el-form :inline="true" :model="state.dataForm" @keyup.enter="state.getDataList()">
-        <el-form-item>
-          <el-input v-model="state.dataForm.name" :placeholder="$t('role.name')"></el-input>
-        </el-form-item>
-        <el-form-item>
-          <el-button @click="state.getDataList()">{{ $t("query") }}</el-button>
-        </el-form-item>
-      </el-form>
-      <el-table v-loading="state.dataListLoading" :data="state.dataList" border @selection-change="state.dataListSelectionChangeHandle" @sort-change="state.dataListSortChangeHandle" style="width: 100%">
-        <el-table-column type="selection" header-align="center" align="center" width="50"></el-table-column>
-        <el-table-column prop="name" :label="$t('role.name')" sortable="custom" header-align="center" align="center"></el-table-column>
-        <el-table-column prop="remark" :label="$t('role.remark')" sortable="custom" header-align="center" align="center"></el-table-column>
-        <el-table-column prop="createDate" :label="$t('createDate')" sortable="custom" header-align="center" align="center"></el-table-column>
-      </el-table>
-      <el-pagination :current-page="state.page" :page-sizes="[10, 20, 50, 100]" :page-size="state.limit" :total="state.total" layout="total, sizes, prev, pager, next, jumper" @size-change="state.pageSizeChangeHandle" @current-change="state.pageCurrentChangeHandle"> </el-pagination>
-    </div>
-    <template v-slot:footer>
-      <el-button @click="cancelHandle()">{{ $t("cancel") }}</el-button>
-      <el-button type="primary" @click="commitHandle()">{{ $t("confirm") }}</el-button>
-    </template>
-  </el-dialog>
-</template>
-
-<script lang="ts" setup>
-import useView from "@/hooks/useView";
-import { reactive, toRefs, nextTick, ref } from "vue";
-import { useI18n } from "vue-i18n";
-const { t } = useI18n();
-const view = reactive({
-  visibleSelect: false,
-  getDataListURL: "/sys/role/page",
-  getDataListIsPage: true,
-  dataForm: {
-    name: ""
-  }
-});
-
-const callback = ref();
-
-const state = reactive({ ...useView(view), ...toRefs(view) });
-
-const init = (callback2: (e: any) => any) => {
-  state.visibleSelect = true;
-  callback.value = callback2;
-  nextTick(() => {
-    state.getDataList();
-  });
-};
-
-const cancelHandle = () => {
-  state.visibleSelect = false;
-};
-
-const commitHandle = () => {
-  if (callback.value) {
-    callback.value(state.dataListSelections);
-  }
-  state.visibleSelect = false;
-};
-
-defineExpose({
-  init
-});
-</script>

+ 0 - 81
src/components/ren-process-running/src/select-user.vue

@@ -1,81 +0,0 @@
-<template>
-  <el-dialog v-model="state.visibleSelect" width="60%" :modal="false" :title="$t('user.select')" :close-on-click-modal="false" :close-on-press-escape="false">
-    <div class="mod-sys__user">
-      <el-form :inline="true" :model="state.dataForm" @keyup.enter="state.getDataList()">
-        <el-form-item>
-          <el-input v-model="state.dataForm.username" :placeholder="$t('user.username')"></el-input>
-        </el-form-item>
-        <el-form-item>
-          <el-button @click="state.getDataList()">{{ $t("query") }}</el-button>
-        </el-form-item>
-      </el-form>
-      <el-table v-loading="state.dataListLoading" :data="state.dataList" border @selection-change="state.dataListSelectionChangeHandle" @sort-change="state.dataListSortChangeHandle" style="width: 100%">
-        <el-table-column type="selection" header-align="center" align="center" width="50"></el-table-column>
-        <el-table-column prop="username" :label="$t('user.username')" sortable="custom" header-align="center" align="center"></el-table-column>
-        <el-table-column prop="realName" :label="$t('user.realName')" sortable="custom" header-align="center" align="center"></el-table-column>
-        <el-table-column prop="deptName" :label="$t('user.deptName')" header-align="center" align="center"></el-table-column>
-        <el-table-column prop="email" :label="$t('user.email')" header-align="center" align="center"></el-table-column>
-        <el-table-column prop="mobile" :label="$t('user.mobile')" sortable="custom" header-align="center" align="center"></el-table-column>
-      </el-table>
-      <el-pagination :current-page="state.page" :page-sizes="[10, 20, 50, 100]" :page-size="state.limit" :total="state.total" layout="total, sizes, prev, pager, next, jumper" @size-change="state.pageSizeChangeHandle" @current-change="state.pageCurrentChangeHandle"> </el-pagination>
-    </div>
-    <template v-slot:footer>
-      <el-button @click="cancelHandle()">{{ $t("cancel") }}</el-button>
-      <el-button type="primary" @click="commitHandle()">{{ $t("confirm") }}</el-button>
-    </template>
-  </el-dialog>
-</template>
-
-<script lang="ts" setup>
-import useView from "@/hooks/useView";
-import { reactive, toRefs, nextTick, ref } from "vue";
-import { ElMessage } from "element-plus";
-import { useI18n } from "vue-i18n";
-const { t } = useI18n();
-const view = reactive({
-  visibleSelect: false,
-  multiple: false,
-  getDataListURL: "/sys/user/page",
-  getDataListIsPage: true,
-  dataForm: {
-    username: ""
-  }
-});
-
-const callback = ref();
-
-const state = reactive({ ...useView(view), ...toRefs(view) });
-
-const init = (callback2: (e: any) => any, multiple: boolean) => {
-  state.visibleSelect = true;
-  state.multiple = multiple;
-  callback.value = callback2;
-  nextTick(() => {
-    state.getDataList();
-  });
-};
-
-const cancelHandle = () => {
-  state.visibleSelect = false;
-};
-
-const commitHandle = () => {
-  if (callback.value) {
-    if (state.multiple) {
-      callback.value(state.dataListSelections);
-    } else {
-      if (state.dataListSelections?.length !== 1) {
-        ElMessage.error(t("user.selecterror"));
-        return;
-      } else {
-        callback.value(state.dataListSelections[0]);
-      }
-    }
-  }
-  state.visibleSelect = false;
-};
-
-defineExpose({
-  init
-});
-</script>

+ 0 - 4
src/components/ren-radio-group/index.ts

@@ -1,4 +0,0 @@
-import { withInstall } from "@/utils/utils";
-import RenRadioGroup from "./src/ren-radio-group.vue";
-
-export default withInstall(RenRadioGroup);

+ 0 - 24
src/components/ren-radio-group/src/ren-radio-group.vue

@@ -1,24 +0,0 @@
-<template>
-  <el-radio-group v-model="value" @change="$emit('update:modelValue', $event)">
-    <el-radio :label="data.dictValue" v-for="data in dataList" :key="data.dictValue">{{ data.dictLabel }}</el-radio>
-  </el-radio-group>
-</template>
-<script lang="ts">
-import { getDictDataList } from "@/utils/utils";
-import { computed, defineComponent } from "vue";
-import { useAppStore } from "@/store";
-export default defineComponent({
-  name: "RenRadioGroup",
-  props: {
-    modelValue: [Number, String],
-    dictType: String
-  },
-  setup(props) {
-    const store = useAppStore();
-    return {
-      value: computed(() => `${props.modelValue}`),
-      dataList: getDictDataList(store.state.dicts, props.dictType)
-    };
-  }
-});
-</script>

+ 0 - 5
src/components/ren-region-tree/index.ts

@@ -1,5 +0,0 @@
-import { withInstall } from "@/utils/utils";
-import RenRegionTree from "./src/ren-region-tree.vue";
-
-RenRegionTree.name = "RenRegionTree";
-export default withInstall(RenRegionTree);

+ 0 - 134
src/components/ren-region-tree/src/ren-region-tree.vue

@@ -1,134 +0,0 @@
-<template>
-  <div class="ren-region">
-    <el-input v-model="showName" :placeholder="placeholder" @click="treeDialog">
-      <template v-slot:append>
-        <el-button icon="search" @click="treeDialog"></el-button>
-      </template>
-    </el-input>
-    <el-dialog v-model="visibleTree" width="360px" :modal="false" :title="placeholder" :close-on-click-modal="false" :close-on-press-escape="false">
-      <el-form size="small" :inline="true">
-        <el-form-item :label="$t('keyword')">
-          <el-input v-model="filterText" :input-style="{ width: '150px' }"></el-input>
-        </el-form-item>
-        <el-form-item>
-          <el-button type="default">{{ $t("query") }}</el-button>
-        </el-form-item>
-      </el-form>
-      <el-tree class="filter-tree" :data="dataList" :default-expanded-keys="expandedKeys" :props="{ label: 'name', children: 'children' }" :expand-on-click-node="false" :filter-node-method="filterNode" :highlight-current="true" node-key="id" ref="treeRef"> </el-tree>
-      <template v-slot:footer>
-        <el-button type="default" @click="cancelHandle()">{{ $t("cancel") }}</el-button>
-        <el-button type="info" @click="clearHandle()">{{ $t("clear") }}</el-button>
-        <el-button type="primary" @click="commitHandle()">{{ $t("confirm") }}</el-button>
-      </template>
-    </el-dialog>
-  </div>
-</template>
-
-<script lang="ts" setup>
-import { nextTick, ref, watch } from "vue";
-import { treeDataTranslate } from "@/utils/utils";
-import { IObject } from "@/types/interface";
-import baseService from "@/service/baseService";
-import { ElMessage } from "element-plus";
-import { useI18n } from "vue-i18n";
-
-const { t } = useI18n();
-
-const filterText = ref("");
-const visibleTree = ref(false);
-const dataList = ref<any[]>([]);
-const showName = ref("");
-const expandedKeys = ref<any[]>([]);
-const treeRef = ref();
-
-const props = defineProps({
-  modelValue: [Number, String],
-  parentName: String,
-  placeholder: String
-});
-
-watch(
-  () => filterText.value,
-  (val) => {
-    treeRef.value.filter(val);
-  }
-);
-
-watch(
-  () => props.parentName,
-  (val) => {
-    showName.value = val as string;
-  }
-);
-
-const treeDialog = () => {
-  expandedKeys.value = [];
-  if (treeRef.value) {
-    treeRef.value.setCurrentKey(null);
-  }
-  visibleTree.value = true;
-  getDataList(props.modelValue);
-};
-
-const filterNode = (value: string, data: IObject) => {
-  if (!value) return true;
-  return data.name.indexOf(value) !== -1;
-};
-
-const getDataList = (id: any) => {
-  return baseService.get("/sys/region/tree").then((res) => {
-    dataList.value = treeDataTranslate(res.data);
-    nextTick(() => {
-      treeRef.value.setCurrentKey(id);
-      expandedKeys.value = [id];
-    });
-  });
-};
-
-const cancelHandle = () => {
-  visibleTree.value = false;
-  dataList.value = [];
-  filterText.value = "";
-};
-
-const emit = defineEmits(["update:modelValue", "update:parentName"]);
-
-const clearHandle = () => {
-  emit("update:modelValue", "0");
-  emit("update:parentName", "");
-  showName.value = "";
-  visibleTree.value = false;
-  dataList.value = [];
-  filterText.value = "";
-};
-
-const commitHandle = () => {
-  const node = treeRef.value.getCurrentNode();
-  if (!node) {
-    ElMessage.error(t("choose"));
-    return;
-  }
-  emit("update:modelValue", node.id);
-  emit("update:parentName", node.name);
-
-  showName.value = node.name;
-  visibleTree.value = false;
-  dataList.value = [];
-  filterText.value = "";
-};
-</script>
-
-<style lang="less" scoped>
-.ren-region {
-  .filter-tree {
-    max-height: 230px;
-    overflow: auto;
-  }
-  .el-dialog__body {
-    padding: 0 0 0 20px;
-  }
-  .el-dialog__footer {
-    padding: 10px 20px 8px 20px;
-  }
-}
-</style>

+ 0 - 4
src/components/ren-select/index.ts

@@ -1,4 +0,0 @@
-import { withInstall } from "@/utils/utils";
-import RenSelect from "./src/ren-select.vue";
-
-export default withInstall(RenSelect);

+ 0 - 25
src/components/ren-select/src/ren-select.vue

@@ -1,25 +0,0 @@
-<template>
-  <el-select v-model="value" @change="$emit('update:modelValue', $event)" :placeholder="placeholder" clearable>
-    <el-option :label="data.dictLabel" v-for="data in dataList" :key="data.dictValue" :value="data.dictValue">{{ data.dictLabel }}</el-option>
-  </el-select>
-</template>
-<script lang="ts">
-import { computed, defineComponent } from "vue";
-import { getDictDataList } from "@/utils/utils";
-import { useAppStore } from "@/store";
-export default defineComponent({
-  name: "RenSelect",
-  props: {
-    modelValue: [Number, String],
-    dictType: String,
-    placeholder: String
-  },
-  setup(props) {
-    const store = useAppStore();
-    return {
-      value: computed(() => `${props.modelValue}`),
-      dataList: getDictDataList(store.state.dicts, props.dictType)
-    };
-  }
-});
-</script>

+ 15 - 15
src/main.ts

@@ -1,10 +1,10 @@
 import "@/assets/icons/iconfont/iconfont.js";
-import RenDeptTree from "@/components/ren-dept-tree";
-import RenProcessDetail from "@/components/ren-process-detail";
-import RenProcessRunning from "@/components/ren-process-running";
-import RenRadioGroup from "@/components/ren-radio-group";
-import RenRegionTree from "@/components/ren-region-tree";
-import RenSelect from "@/components/ren-select";
+import MyDeptTree from "@/components/my-dept-tree";
+import MyProcessDetail from "@/components/my-process-detail";
+import MyProcessRunning from "@/components/my-process-running";
+import MyRadioGroup from "@/components/my-radio-group";
+import MyRegionTree from "@/components/my-region-tree";
+import MySelect from "@/components/my-select";
 import ElementPlus from "element-plus";
 import "element-plus/theme-chalk/display.css";
 import "element-plus/theme-chalk/index.css";
@@ -37,19 +37,19 @@ Object.keys(ElementPlusIcons).forEach((iconName) => {
 });
 
 // flowable 流程设计器
-import "@/components/ren-flowable/package/theme/index.scss";
-import RenFlowable from "@/components/ren-flowable/package/index.js";
-app.use(RenFlowable);
+import "@/components/my-flowable/package/theme/index.scss";
+import MyFlowable from "@/components/my-flowable/package/index.js";
+app.use(MyFlowable);
 
 app
   .use(createPinia())
   .use(router)
-  .use(RenRadioGroup)
-  .use(RenSelect)
-  .use(RenDeptTree)
-  .use(RenRegionTree)
-  .use(RenProcessRunning)
-  .use(RenProcessDetail)
+  .use(MyRadioGroup)
+  .use(MySelect)
+  .use(MyDeptTree)
+  .use(MyRegionTree)
+  .use(MyProcessRunning)
+  .use(MyProcessDetail)
   .use(ElementPlus, { size: "default" })
   .use(VForm3)
   .use(VXETable)

+ 5 - 5
src/views/flow/process-designer.vue

@@ -21,14 +21,14 @@
 </template>
 
 <script>
-import translations from "@/components/ren-flowable/translations";
+import translations from "@/components/my-flowable/translations";
 // 自定义渲染(隐藏了 label 标签)
-import CustomRenderer from "@/components/ren-flowable/modules/custom-renderer";
+import CustomRenderer from "@/components/my-flowable/modules/custom-renderer";
 // 自定义元素选中时的弹出菜单(修改 默认任务 为 用户任务)
-import CustomContentPadProvider from "@/components/ren-flowable/package/designer/plugins/content-pad";
+import CustomContentPadProvider from "@/components/my-flowable/package/designer/plugins/content-pad";
 // 自定义左侧菜单(修改 默认任务 为 用户任务)
-import CustomPaletteProvider from "@/components/ren-flowable/package/designer/plugins/palette";
-import Log from "@/components/ren-flowable/package/Log";
+import CustomPaletteProvider from "@/components/my-flowable/package/designer/plugins/palette";
+import Log from "@/components/my-flowable/package/Log";
 import "bpmn-js/dist/assets/diagram-js.css";
 import "bpmn-js/dist/assets/bpmn-font/css/bpmn.css";
 import "bpmn-js/dist/assets/bpmn-font/css/bpmn-codes.css";

+ 2 - 2
src/views/flow/task-form.vue

@@ -10,12 +10,12 @@
         </el-row>
         <el-row style="margin: 20px 0 0 80px" v-if="state.runningHandleVisible">
           <el-col>
-            <ren-process-running v-if="state.runningHandleVisible" ref="renProcessRunning"></ren-process-running>
+            <my-process-running v-if="state.runningHandleVisible" ref="myProcessRunning"></my-process-running>
           </el-col>
         </el-row>
       </el-tab-pane>
       <el-tab-pane v-if="state.processDetailVisible" label="流转记录" name="detail">
-        <ren-process-detail ref="renProcessDetail"></ren-process-detail>
+        <my-process-detail ref="myProcessDetail"></my-process-detail>
       </el-tab-pane>
       <el-tab-pane v-if="state.processDetailVisible" label="流程图" name="image">
         <img :src="getDiagramImage()" class="image" />

+ 1 - 1
src/views/notice/notice-add-or-update.vue

@@ -2,7 +2,7 @@
   <el-dialog v-model="visible" :title="!dataForm.id ? $t('add') : $t('update')" :close-on-click-modal="false" :close-on-press-escape="false">
     <el-form :model="dataForm" :rules="rules" ref="dataFormRef" :label-width="$i18n.locale === 'en-US' ? '120px' : '80px'">
       <el-form-item :label="$t('notice.type')" prop="noticeType">
-        <ren-radio-group v-model="dataForm.noticeType" dict-type="notice_type"></ren-radio-group>
+        <my-radio-group v-model="dataForm.noticeType" dict-type="notice_type"></my-radio-group>
       </el-form-item>
       <el-form-item :label="$t('notice.title')" prop="title">
         <el-input v-model="dataForm.title" :placeholder="$t('notice.title')"></el-input>

+ 1 - 1
src/views/notice/notice-user.vue

@@ -2,7 +2,7 @@
   <div class="mod-demo__sysnoticeuser">
     <el-form :inline="true" :model="state.dataForm" @keyup.enter="state.getDataList()">
       <el-form-item>
-        <ren-select v-model="state.dataForm.noticeType" dict-type="notice_type" :placeholder="$t('notice.type')"></ren-select>
+        <my-select v-model="state.dataForm.noticeType" dict-type="notice_type" :placeholder="$t('notice.type')"></my-select>
       </el-form-item>
       <el-form-item>
         <el-button @click="state.getDataList()">{{ $t("query") }}</el-button>

+ 1 - 1
src/views/notice/notice.vue

@@ -2,7 +2,7 @@
   <div class="mod-demo__sysnotice">
     <el-form :inline="true" :model="state.dataForm" @keyup.enter="state.getDataList()">
       <el-form-item>
-        <ren-select v-model="state.dataForm.noticeType" dict-type="notice_type" :placeholder="$t('notice.type')"></ren-select>
+        <my-select v-model="state.dataForm.noticeType" dict-type="notice_type" :placeholder="$t('notice.type')"></my-select>
       </el-form-item>
       <el-form-item>
         <el-button @click="state.getDataList()">{{ $t("query") }}</el-button>

+ 1 - 1
src/views/pay/order.vue

@@ -8,7 +8,7 @@
         <el-input v-model="state.dataForm.userId" :placeholder="$t('order.userId')" clearable></el-input>
       </el-form-item>
       <el-form-item>
-        <ren-select v-model="state.dataForm.status" dict-type="order_status" :placeholder="$t('order.status')"></ren-select>
+        <my-select v-model="state.dataForm.status" dict-type="order_status" :placeholder="$t('order.status')"></my-select>
       </el-form-item>
       <el-form-item>
         <el-button @click="state.getDataList()">{{ $t("query") }}</el-button>

+ 1 - 1
src/views/sys/post-add-or-update.vue

@@ -11,7 +11,7 @@
         <el-input-number v-model="dataForm.sort" :min="0"></el-input-number>
       </el-form-item>
       <el-form-item :label="$t('post.status')" prop="status">
-        <ren-radio-group v-model="dataForm.status" dict-type="post_status"></ren-radio-group>
+        <my-radio-group v-model="dataForm.status" dict-type="post_status"></my-radio-group>
       </el-form-item>
     </el-form>
     <template v-slot:footer>

+ 1 - 1
src/views/sys/post.vue

@@ -8,7 +8,7 @@
         <el-input v-model="state.dataForm.postName" :placeholder="$t('post.postName')" clearable></el-input>
       </el-form-item>
       <el-form-item>
-        <ren-select v-model="state.dataForm.status" dict-type="post_status" :placeholder="$t('post.status')"></ren-select>
+        <my-select v-model="state.dataForm.status" dict-type="post_status" :placeholder="$t('post.status')"></my-select>
       </el-form-item>
       <el-form-item>
         <el-button @click="state.getDataList()">{{ $t("query") }}</el-button>

+ 1 - 1
src/views/sys/region-add-or-update.vue

@@ -2,7 +2,7 @@
   <el-dialog v-model="visible" :title="insert ? $t('add') : $t('update')" :close-on-click-modal="false" :close-on-press-escape="false">
     <el-form :model="dataForm" :rules="rules" ref="dataFormRef" @keyup.enter="dataFormSubmitHandle()" label-width="120px">
       <el-form-item prop="parentName" label="上级区域">
-        <ren-region-tree ref="regionListTree" v-model="dataForm.pid" placeholder="选择区域" v-model:parent-name="dataForm.parentName"></ren-region-tree>
+        <my-region-tree ref="regionListTree" v-model="dataForm.pid" placeholder="选择区域" v-model:parent-name="dataForm.parentName"></my-region-tree>
       </el-form-item>
       <el-form-item prop="name" :label="$t('region.name')">
         <el-input v-model="dataForm.name" :placeholder="$t('region.name')"></el-input>

+ 2 - 2
src/views/sys/user-add-or-update.vue

@@ -5,7 +5,7 @@
         <el-input v-model="dataForm.username" :placeholder="$t('user.username')"></el-input>
       </el-form-item>
       <el-form-item prop="deptName" :label="$t('user.deptName')">
-        <ren-dept-tree v-model="dataForm.deptId" :placeholder="$t('dept.title')" v-model:deptName="dataForm.deptName"></ren-dept-tree>
+        <my-dept-tree v-model="dataForm.deptId" :placeholder="$t('dept.title')" v-model:deptName="dataForm.deptName"></my-dept-tree>
       </el-form-item>
       <el-form-item prop="password" :label="$t('user.password')" :class="{ 'is-required': !dataForm.id }">
         <el-input v-model="dataForm.password" type="password" :placeholder="$t('user.password')"></el-input>
@@ -17,7 +17,7 @@
         <el-input v-model="dataForm.realName" :placeholder="$t('user.realName')"></el-input>
       </el-form-item>
       <el-form-item prop="gender" :label="$t('user.gender')">
-        <ren-radio-group v-model="dataForm.gender" dict-type="gender"></ren-radio-group>
+        <my-radio-group v-model="dataForm.gender" dict-type="gender"></my-radio-group>
       </el-form-item>
       <el-form-item prop="email" :label="$t('user.email')">
         <el-input v-model="dataForm.email" :placeholder="$t('user.email')"></el-input>

+ 2 - 2
src/views/sys/user.vue

@@ -5,10 +5,10 @@
         <el-input v-model="state.dataForm.username" :placeholder="$t('user.username')" clearable></el-input>
       </el-form-item>
       <el-form-item>
-        <ren-select v-model="state.dataForm.gender" dict-type="gender" :placeholder="$t('user.gender')"></ren-select>
+        <my-select v-model="state.dataForm.gender" dict-type="gender" :placeholder="$t('user.gender')"></my-select>
       </el-form-item>
       <el-form-item>
-        <ren-dept-tree v-model="state.dataForm.deptId" :placeholder="$t('dept.title')" :query="true"></ren-dept-tree>
+        <my-dept-tree v-model="state.dataForm.deptId" :placeholder="$t('dept.title')" :query="true"></my-dept-tree>
       </el-form-item>
       <el-form-item>
         <el-button @click="state.getDataList()">{{ $t("query") }}</el-button>