workflow-editor 0.0.7-up → 0.0.9-up
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +13 -2
- package/index.html +0 -13
- package/packages/index.js +0 -34
- package/packages/plugins/formValidatorUtil.js +0 -533
- package/packages/plugins/index.js +0 -8
- package/packages/workflow-editor/index.js +0 -14
- package/packages/workflow-editor/src/api.js +0 -7
- package/packages/workflow-editor/src/assets/wf-editor-icons.js +0 -2
- package/packages/workflow-editor/src/constant.js +0 -8
- package/packages/workflow-editor/src/json-object-templates/auto-task.js +0 -70
- package/packages/workflow-editor/src/json-object-templates/copy-task.js +0 -72
- package/packages/workflow-editor/src/json-object-templates/decision.js +0 -11
- package/packages/workflow-editor/src/json-object-templates/end.js +0 -14
- package/packages/workflow-editor/src/json-object-templates/fork.js +0 -10
- package/packages/workflow-editor/src/json-object-templates/human-decision.js +0 -9
- package/packages/workflow-editor/src/json-object-templates/human-task.js +0 -199
- package/packages/workflow-editor/src/json-object-templates/join.js +0 -10
- package/packages/workflow-editor/src/json-object-templates/process.js +0 -98
- package/packages/workflow-editor/src/json-object-templates/start.js +0 -13
- package/packages/workflow-editor/src/json-object-templates/subprocess.js +0 -31
- package/packages/workflow-editor/src/json-object-templates/transition.js +0 -26
- package/packages/workflow-editor/src/main/admin-save-dialog.vue +0 -66
- package/packages/workflow-editor/src/main/canvas.vue +0 -483
- package/packages/workflow-editor/src/main/context-menu.vue +0 -132
- package/packages/workflow-editor/src/main/icon-svg.vue +0 -32
- package/packages/workflow-editor/src/main/selection-region.vue +0 -66
- package/packages/workflow-editor/src/main/tache-history-tooltip.vue +0 -38
- package/packages/workflow-editor/src/main/tache-name-input.vue +0 -19
- package/packages/workflow-editor/src/main/tache-subprocess-history-dialog.vue +0 -35
- package/packages/workflow-editor/src/main/toolbox.vue +0 -60
- package/packages/workflow-editor/src/main/wf-history-canvas.vue +0 -304
- package/packages/workflow-editor/src/process-json.js +0 -623
- package/packages/workflow-editor/src/process-service.js +0 -31
- package/packages/workflow-editor/src/properties-editors/auto-task/basic-properties.vue +0 -81
- package/packages/workflow-editor/src/properties-editors/auto-task/permission-settings.vue +0 -155
- package/packages/workflow-editor/src/properties-editors/auto-task.vue +0 -73
- package/packages/workflow-editor/src/properties-editors/common/additional-condition-utils.js +0 -531
- package/packages/workflow-editor/src/properties-editors/common/additional-condition.vue +0 -276
- package/packages/workflow-editor/src/properties-editors/common/auto-filled-fields-utils.js +0 -34
- package/packages/workflow-editor/src/properties-editors/common/auto-filled-fields.vue +0 -239
- package/packages/workflow-editor/src/properties-editors/common/common-notice-tool.vue +0 -67
- package/packages/workflow-editor/src/properties-editors/common/common-user-condition.vue +0 -241
- package/packages/workflow-editor/src/properties-editors/common/form-fields-utils.js +0 -23
- package/packages/workflow-editor/src/properties-editors/common/form-fields.vue +0 -116
- package/packages/workflow-editor/src/properties-editors/common/i18n-input.vue +0 -75
- package/packages/workflow-editor/src/properties-editors/common/i18n-set-dialog.vue +0 -125
- package/packages/workflow-editor/src/properties-editors/common/notice-reminder.vue +0 -72
- package/packages/workflow-editor/src/properties-editors/common/notice.vue +0 -101
- package/packages/workflow-editor/src/properties-editors/common/reminder.vue +0 -185
- package/packages/workflow-editor/src/properties-editors/common/select-mail-template.vue +0 -83
- package/packages/workflow-editor/src/properties-editors/common/standard-fields.vue +0 -65
- package/packages/workflow-editor/src/properties-editors/common/system-role-tree-inline.vue +0 -347
- package/packages/workflow-editor/src/properties-editors/common/system-role-tree.vue +0 -63
- package/packages/workflow-editor/src/properties-editors/common/task-title.vue +0 -148
- package/packages/workflow-editor/src/properties-editors/common/transactor-settings.vue +0 -233
- package/packages/workflow-editor/src/properties-editors/common/user-selection.vue +0 -386
- package/packages/workflow-editor/src/properties-editors/common/value-selection-dialog.vue +0 -209
- package/packages/workflow-editor/src/properties-editors/common/variables.vue +0 -135
- package/packages/workflow-editor/src/properties-editors/copy-task/basic-properties.vue +0 -90
- package/packages/workflow-editor/src/properties-editors/copy-task/permission-settings.vue +0 -155
- package/packages/workflow-editor/src/properties-editors/copy-task.vue +0 -94
- package/packages/workflow-editor/src/properties-editors/decision.vue +0 -90
- package/packages/workflow-editor/src/properties-editors/fork.vue +0 -72
- package/packages/workflow-editor/src/properties-editors/human-decision.vue +0 -44
- package/packages/workflow-editor/src/properties-editors/human-task/additional-condition-dialog.vue +0 -60
- package/packages/workflow-editor/src/properties-editors/human-task/basic-properties.vue +0 -160
- package/packages/workflow-editor/src/properties-editors/human-task/componentsConfigUtil.js +0 -291
- package/packages/workflow-editor/src/properties-editors/human-task/custom-actions.vue +0 -249
- package/packages/workflow-editor/src/properties-editors/human-task/editable-child-field-setting.vue +0 -392
- package/packages/workflow-editor/src/properties-editors/human-task/editable-child-fields.vue +0 -241
- package/packages/workflow-editor/src/properties-editors/human-task/editable-field-selection.vue +0 -220
- package/packages/workflow-editor/src/properties-editors/human-task/editable-fields.vue +0 -204
- package/packages/workflow-editor/src/properties-editors/human-task/events.vue +0 -59
- package/packages/workflow-editor/src/properties-editors/human-task/permission-settings.vue +0 -207
- package/packages/workflow-editor/src/properties-editors/human-task/selection-conditions.vue +0 -390
- package/packages/workflow-editor/src/properties-editors/human-task.vue +0 -109
- package/packages/workflow-editor/src/properties-editors/join.vue +0 -44
- package/packages/workflow-editor/src/properties-editors/process/basic-properties.vue +0 -273
- package/packages/workflow-editor/src/properties-editors/process/events.vue +0 -76
- package/packages/workflow-editor/src/properties-editors/process/notice-settings.vue +0 -60
- package/packages/workflow-editor/src/properties-editors/process/parameter-settings.vue +0 -95
- package/packages/workflow-editor/src/properties-editors/process/permission-settings.vue +0 -28
- package/packages/workflow-editor/src/properties-editors/process/selectPage.vue +0 -81
- package/packages/workflow-editor/src/properties-editors/process.vue +0 -115
- package/packages/workflow-editor/src/properties-editors/subprocess/basic-properties.vue +0 -199
- package/packages/workflow-editor/src/properties-editors/subprocess/events.vue +0 -26
- package/packages/workflow-editor/src/properties-editors/subprocess/field-mappings.vue +0 -206
- package/packages/workflow-editor/src/properties-editors/subprocess/transactor-settings.vue +0 -64
- package/packages/workflow-editor/src/properties-editors/subprocess.vue +0 -79
- package/packages/workflow-editor/src/properties-editors/transition/basic-properties.vue +0 -53
- package/packages/workflow-editor/src/properties-editors/transition.vue +0 -74
- package/packages/workflow-editor/src/properties-editors/user-condition.js +0 -177
- package/packages/workflow-editor/src/store/getters.js +0 -27
- package/packages/workflow-editor/src/store/workflow-editor.js +0 -125
- package/packages/workflow-editor/src/taches/auto-task.vue +0 -99
- package/packages/workflow-editor/src/taches/common-methods.js +0 -21
- package/packages/workflow-editor/src/taches/copy-task.vue +0 -99
- package/packages/workflow-editor/src/taches/custom-task.vue +0 -88
- package/packages/workflow-editor/src/taches/decision.vue +0 -102
- package/packages/workflow-editor/src/taches/end.vue +0 -76
- package/packages/workflow-editor/src/taches/fork.vue +0 -102
- package/packages/workflow-editor/src/taches/human-decision.vue +0 -102
- package/packages/workflow-editor/src/taches/human-task.vue +0 -113
- package/packages/workflow-editor/src/taches/join.vue +0 -91
- package/packages/workflow-editor/src/taches/joint.vue +0 -177
- package/packages/workflow-editor/src/taches/start.vue +0 -76
- package/packages/workflow-editor/src/taches/subprocess.vue +0 -99
- package/packages/workflow-editor/src/taches/tache-resizer.vue +0 -80
- package/packages/workflow-editor/src/transitions/broken-line.vue +0 -91
- package/packages/workflow-editor/src/transitions/curve-line.vue +0 -91
- package/packages/workflow-editor/src/transitions/straight-line.vue +0 -26
- package/packages/workflow-editor/src/transitions/transition.vue +0 -212
- package/packages/workflow-editor/src/transitions/virtual-transition.vue +0 -43
- package/packages/workflow-editor/src/util.js +0 -489
- package/packages/workflow-editor/src/workflow-editor.vue +0 -606
- package/packages/workflow-editor/src/workflow-history.vue +0 -153
- package/public/vite.svg +0 -1
- package/vite.config.js +0 -36
|
@@ -1,153 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<div
|
|
3
|
-
ref="wfEditor"
|
|
4
|
-
style="position:relative;height:100%;"
|
|
5
|
-
>
|
|
6
|
-
<div
|
|
7
|
-
class="main"
|
|
8
|
-
>
|
|
9
|
-
<section>
|
|
10
|
-
<wf-history-canvas
|
|
11
|
-
onselectstart="return false"
|
|
12
|
-
:process="process"
|
|
13
|
-
:histories="histories"
|
|
14
|
-
:current-tasks="currentTasks"
|
|
15
|
-
:all-process-i18n="allProcessI18n"
|
|
16
|
-
:show-history="true"
|
|
17
|
-
class="canvas"
|
|
18
|
-
@contextmenu.native.prevent="showContextMenu"
|
|
19
|
-
/>
|
|
20
|
-
</section>
|
|
21
|
-
</div>
|
|
22
|
-
</div>
|
|
23
|
-
</template>
|
|
24
|
-
<script>
|
|
25
|
-
import './assets/wf-editor-icons.js'
|
|
26
|
-
import { mapGetters, mapMutations } from 'vuex'
|
|
27
|
-
import { removeTextProperty, initializeProcessData, processTemplate } from './util'
|
|
28
|
-
import WfHistoryCanvas from './main/wf-history-canvas'
|
|
29
|
-
import convert from 'xml-js'
|
|
30
|
-
import ApiJs from './api'
|
|
31
|
-
export default {
|
|
32
|
-
name: 'WorkflowHistory',
|
|
33
|
-
components: {
|
|
34
|
-
WfHistoryCanvas
|
|
35
|
-
},
|
|
36
|
-
props: {
|
|
37
|
-
// 实例id
|
|
38
|
-
id: {
|
|
39
|
-
type: Number,
|
|
40
|
-
default: null
|
|
41
|
-
}
|
|
42
|
-
},
|
|
43
|
-
data: function() {
|
|
44
|
-
return {
|
|
45
|
-
process: null,
|
|
46
|
-
histories: [],
|
|
47
|
-
currentTasks: [],
|
|
48
|
-
allProcessI18n: null
|
|
49
|
-
}
|
|
50
|
-
},
|
|
51
|
-
computed: {
|
|
52
|
-
...mapGetters(
|
|
53
|
-
'wfEditor', ['componentToDraw', 'taches', 'transitions', 'contextMenuVisible']
|
|
54
|
-
),
|
|
55
|
-
...mapGetters([
|
|
56
|
-
'sidebar'
|
|
57
|
-
])
|
|
58
|
-
|
|
59
|
-
},
|
|
60
|
-
watch: {
|
|
61
|
-
|
|
62
|
-
},
|
|
63
|
-
created: function() {
|
|
64
|
-
this.showHistory()
|
|
65
|
-
},
|
|
66
|
-
mounted: function() {
|
|
67
|
-
|
|
68
|
-
},
|
|
69
|
-
methods: {
|
|
70
|
-
...ApiJs,
|
|
71
|
-
...mapMutations('wfEditor', [
|
|
72
|
-
'setComponentToDraw',
|
|
73
|
-
'clearCanvas',
|
|
74
|
-
'setContextMenuVisible',
|
|
75
|
-
'setProcessI18n'
|
|
76
|
-
]),
|
|
77
|
-
showHistory() {
|
|
78
|
-
// 打开或新建流程图时先清空画布,开发过程中代码热更新的时候可以避免节点重复
|
|
79
|
-
this.clearCanvas()
|
|
80
|
-
if (this.id) {
|
|
81
|
-
this.$http.get(this.baseAPI + '/wf-editor/i18n-settings/get-bundle-info?workflowId=' + this.id).then(processI18n => {
|
|
82
|
-
this.allProcessI18n = processI18n
|
|
83
|
-
const url = this.baseAPI + '/wf-editor/instance-histories/' + this.id
|
|
84
|
-
this.$http.get(url).then(data => {
|
|
85
|
-
this.initProcessByXml(data.xml)
|
|
86
|
-
let mainBundleCode
|
|
87
|
-
if (data.histories && data.histories.length > 0) {
|
|
88
|
-
mainBundleCode = data.histories[0].bundleCode
|
|
89
|
-
}
|
|
90
|
-
if (!mainBundleCode && data.currentTasks && data.currentTasks.length > 0) {
|
|
91
|
-
mainBundleCode = data.currentTasks[0].bundleCode
|
|
92
|
-
}
|
|
93
|
-
if (mainBundleCode) {
|
|
94
|
-
this.setProcessI18n(processI18n[mainBundleCode])
|
|
95
|
-
}
|
|
96
|
-
this.histories = data.histories
|
|
97
|
-
this.currentTasks = data.currentTasks
|
|
98
|
-
})
|
|
99
|
-
})
|
|
100
|
-
} else {
|
|
101
|
-
this.process = processTemplate.newProcess()
|
|
102
|
-
initializeProcessData(this.process)
|
|
103
|
-
}
|
|
104
|
-
},
|
|
105
|
-
showContextMenu(event) {
|
|
106
|
-
|
|
107
|
-
},
|
|
108
|
-
initProcessByXml(xml) {
|
|
109
|
-
const options = { nativeType: true, attributesKey: 'attr', compact: true, ignoreComment: true, spaces: 4 }
|
|
110
|
-
const processObj = convert.xml2js(xml, options)
|
|
111
|
-
removeTextProperty(processObj.process)
|
|
112
|
-
this.process = processObj.process
|
|
113
|
-
|
|
114
|
-
initializeProcessData(this.process)
|
|
115
|
-
}
|
|
116
|
-
}
|
|
117
|
-
}
|
|
118
|
-
</script>
|
|
119
|
-
<style lang="scss" scoped>
|
|
120
|
-
.main{
|
|
121
|
-
position: relative;
|
|
122
|
-
display:flex;
|
|
123
|
-
height: 100%;
|
|
124
|
-
width:100%;
|
|
125
|
-
}
|
|
126
|
-
.canvas-container{
|
|
127
|
-
position: relative;
|
|
128
|
-
// display:flex;
|
|
129
|
-
height: 100%;
|
|
130
|
-
width:100%;
|
|
131
|
-
}
|
|
132
|
-
|
|
133
|
-
section{
|
|
134
|
-
overflow: hidden;
|
|
135
|
-
width:100%;
|
|
136
|
-
height:100%;
|
|
137
|
-
padding: 0;
|
|
138
|
-
// min-height: 500px;
|
|
139
|
-
}
|
|
140
|
-
.canvas{
|
|
141
|
-
overflow: auto;
|
|
142
|
-
height:100%;
|
|
143
|
-
// border:1px solid red;
|
|
144
|
-
// background: #ffffff;
|
|
145
|
-
padding: 0;
|
|
146
|
-
min-height: 500px;
|
|
147
|
-
|
|
148
|
-
}
|
|
149
|
-
.canvas :deep(.draggable){
|
|
150
|
-
cursor: default;
|
|
151
|
-
}
|
|
152
|
-
</style>
|
|
153
|
-
|
package/public/vite.svg
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" aria-hidden="true" role="img" class="iconify iconify--logos" width="31.88" height="32" preserveAspectRatio="xMidYMid meet" viewBox="0 0 256 257"><defs><linearGradient id="IconifyId1813088fe1fbc01fb466" x1="-.828%" x2="57.636%" y1="7.652%" y2="78.411%"><stop offset="0%" stop-color="#41D1FF"></stop><stop offset="100%" stop-color="#BD34FE"></stop></linearGradient><linearGradient id="IconifyId1813088fe1fbc01fb467" x1="43.376%" x2="50.316%" y1="2.242%" y2="89.03%"><stop offset="0%" stop-color="#FFEA83"></stop><stop offset="8.333%" stop-color="#FFDD35"></stop><stop offset="100%" stop-color="#FFA800"></stop></linearGradient></defs><path fill="url(#IconifyId1813088fe1fbc01fb466)" d="M255.153 37.938L134.897 252.976c-2.483 4.44-8.862 4.466-11.382.048L.875 37.958c-2.746-4.814 1.371-10.646 6.827-9.67l120.385 21.517a6.537 6.537 0 0 0 2.322-.004l117.867-21.483c5.438-.991 9.574 4.796 6.877 9.62Z"></path><path fill="url(#IconifyId1813088fe1fbc01fb467)" d="M185.432.063L96.44 17.501a3.268 3.268 0 0 0-2.634 3.014l-5.474 92.456a3.268 3.268 0 0 0 3.997 3.378l24.777-5.718c2.318-.535 4.413 1.507 3.936 3.838l-7.361 36.047c-.495 2.426 1.782 4.5 4.151 3.78l15.304-4.649c2.372-.72 4.652 1.36 4.15 3.788l-11.698 56.621c-.732 3.542 3.979 5.473 5.943 2.437l1.313-2.028l72.516-144.72c1.215-2.423-.88-5.186-3.54-4.672l-25.505 4.922c-2.396.462-4.435-1.77-3.759-4.114l16.646-57.705c.677-2.35-1.37-4.583-3.769-4.113Z"></path></svg>
|
package/vite.config.js
DELETED
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
import { defineConfig } from "vite";
|
|
2
|
-
import vue from "@vitejs/plugin-vue";
|
|
3
|
-
import path from "path";
|
|
4
|
-
//https://vitejs.dev/config/
|
|
5
|
-
export default defineConfig({
|
|
6
|
-
plugins: [vue()],
|
|
7
|
-
build: {
|
|
8
|
-
outDir: "lib",//输出文件名称
|
|
9
|
-
lib: {
|
|
10
|
-
entry: path.resolve(__dirname, "./packages/index.js"),//指定组件编译入口文件
|
|
11
|
-
name: "workflow-editor",//打包js名称
|
|
12
|
-
fileName: "workflow-editor",
|
|
13
|
-
},//库编译模式配置
|
|
14
|
-
rollupOptions: {
|
|
15
|
-
//确保外部化处理那些你不想打包进库的依赖
|
|
16
|
-
external: ["vue"],
|
|
17
|
-
output: {
|
|
18
|
-
//在UMD构建模式下为这些外部化的依赖提供一个全局变量
|
|
19
|
-
globals: {
|
|
20
|
-
vue: "Vue",
|
|
21
|
-
},
|
|
22
|
-
//定义生成css的名称
|
|
23
|
-
assetFileNames: (assetInfo) => {
|
|
24
|
-
if (assetInfo.name == 'style.css')
|
|
25
|
-
return 'workflow-editor.css';//打包的css名称
|
|
26
|
-
return assetInfo.name;
|
|
27
|
-
},
|
|
28
|
-
},
|
|
29
|
-
},//rollup打包配置
|
|
30
|
-
},
|
|
31
|
-
//...其他配置项
|
|
32
|
-
resolve: {
|
|
33
|
-
//忽略后缀名的配置选项,添加.vue选项时要记得原本默认忽略的选项也要手动写入
|
|
34
|
-
extensions: ['.mjs', '.js', '.ts', '.jsx', '.tsx', '.json', '.vue']
|
|
35
|
-
}
|
|
36
|
-
});
|