workflow-editor 0.0.80-up → 0.0.81-up-tmp1

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.
Files changed (175) hide show
  1. package/dist/index.full.min.js +3237 -0
  2. package/dist/style.css +1 -0
  3. package/es/_virtual/FileSaver.min.mjs +4 -0
  4. package/es/_virtual/___vite-browser-external.mjs +6 -0
  5. package/es/_virtual/__vite-browser-external.mjs +4 -0
  6. package/es/_virtual/_commonjsHelpers.mjs +30 -0
  7. package/es/_virtual/_plugin-vue_export-helper.mjs +9 -0
  8. package/es/_virtual/clipboard.mjs +4 -0
  9. package/es/_virtual/dayjs.min.mjs +4 -0
  10. package/es/_virtual/index.mjs +4 -0
  11. package/es/_virtual/nprogress.mjs +4 -0
  12. package/es/_virtual/prism.mjs +4 -0
  13. package/es/_virtual/sax.mjs +4 -0
  14. package/es/_virtual/string_decoder.mjs +4 -0
  15. package/es/_virtual/tinymce.mjs +4 -0
  16. package/es/_virtual/weekOfYear.mjs +4 -0
  17. package/es/index.mjs +20 -0
  18. package/es/plugins/formValidatorUtil.mjs +391 -0
  19. package/es/plugins/index.mjs +9 -0
  20. package/es/style.css +1 -0
  21. package/es/vite.svg +1 -0
  22. package/es/workflow-editor/index.mjs +14 -0
  23. package/lib/_virtual/FileSaver.min.cjs +1 -0
  24. package/lib/_virtual/___vite-browser-external.cjs +1 -0
  25. package/lib/_virtual/__vite-browser-external.cjs +1 -0
  26. package/lib/_virtual/_commonjsHelpers.cjs +1 -0
  27. package/lib/_virtual/_plugin-vue_export-helper.cjs +1 -0
  28. package/lib/_virtual/clipboard.cjs +1 -0
  29. package/lib/_virtual/dayjs.min.cjs +1 -0
  30. package/lib/_virtual/index.cjs +1 -0
  31. package/lib/_virtual/nprogress.cjs +1 -0
  32. package/lib/_virtual/prism.cjs +1 -0
  33. package/lib/_virtual/sax.cjs +1 -0
  34. package/lib/_virtual/string_decoder.cjs +1 -0
  35. package/lib/_virtual/tinymce.cjs +1 -0
  36. package/lib/_virtual/weekOfYear.cjs +1 -0
  37. package/lib/index.cjs +1 -0
  38. package/lib/plugins/formValidatorUtil.cjs +1 -0
  39. package/lib/plugins/index.cjs +1 -0
  40. package/lib/style.css +1 -0
  41. package/lib/workflow-editor/index.cjs +1 -0
  42. package/package.json +5 -3
  43. package/vite.config.js +44 -10
  44. package/lib/401-d594cba0.js +0 -101
  45. package/lib/404-c88c55f1.js +0 -26
  46. package/lib/authredirect-ae6e75b4.js +0 -10
  47. package/lib/iframe-page-f8737ba6.js +0 -33
  48. package/lib/index-369eae4a.js +0 -13
  49. package/lib/index-9b4d762a.js +0 -31387
  50. package/lib/tab-content-iframe-index-5455fdb0.js +0 -33
  51. package/lib/tab-content-index-5d75237c.js +0 -1241
  52. package/lib/tache-subprocess-history-26084654.js +0 -56
  53. package/lib/workflow-editor.css +0 -1
  54. package/lib/workflow-editor.js +0 -5
  55. package/lib/workflow-editor.umd.cjs +0 -85
  56. package/packages/index.js +0 -34
  57. package/packages/plugins/formValidatorUtil.js +0 -723
  58. package/packages/plugins/index.js +0 -8
  59. package/packages/workflow-editor/index.js +0 -14
  60. package/packages/workflow-editor/src/api.js +0 -7
  61. package/packages/workflow-editor/src/assets/tab-select.png +0 -0
  62. package/packages/workflow-editor/src/assets/tab-selectWhite.png +0 -0
  63. package/packages/workflow-editor/src/assets/wf-editor-icons.js +0 -2
  64. package/packages/workflow-editor/src/constant.js +0 -8
  65. package/packages/workflow-editor/src/json-object-templates/auto-task.js +0 -70
  66. package/packages/workflow-editor/src/json-object-templates/copy-task.js +0 -72
  67. package/packages/workflow-editor/src/json-object-templates/decision.js +0 -11
  68. package/packages/workflow-editor/src/json-object-templates/end.js +0 -14
  69. package/packages/workflow-editor/src/json-object-templates/fork.js +0 -10
  70. package/packages/workflow-editor/src/json-object-templates/human-decision.js +0 -9
  71. package/packages/workflow-editor/src/json-object-templates/human-task.js +0 -208
  72. package/packages/workflow-editor/src/json-object-templates/join.js +0 -10
  73. package/packages/workflow-editor/src/json-object-templates/process.js +0 -99
  74. package/packages/workflow-editor/src/json-object-templates/start.js +0 -13
  75. package/packages/workflow-editor/src/json-object-templates/subprocess.js +0 -31
  76. package/packages/workflow-editor/src/json-object-templates/transition.js +0 -26
  77. package/packages/workflow-editor/src/main/admin-save-dialog.vue +0 -67
  78. package/packages/workflow-editor/src/main/canvas.vue +0 -493
  79. package/packages/workflow-editor/src/main/context-menu.vue +0 -147
  80. package/packages/workflow-editor/src/main/icon-svg.vue +0 -32
  81. package/packages/workflow-editor/src/main/selection-region.vue +0 -66
  82. package/packages/workflow-editor/src/main/tache-history-tooltip.vue +0 -38
  83. package/packages/workflow-editor/src/main/tache-name-input.vue +0 -19
  84. package/packages/workflow-editor/src/main/tache-subprocess-history-dialog.vue +0 -40
  85. package/packages/workflow-editor/src/main/toolbox.vue +0 -60
  86. package/packages/workflow-editor/src/main/wf-history-canvas.vue +0 -309
  87. package/packages/workflow-editor/src/process-json.js +0 -624
  88. package/packages/workflow-editor/src/process-service.js +0 -69
  89. package/packages/workflow-editor/src/properties-editors/auto-task/basic-properties.vue +0 -81
  90. package/packages/workflow-editor/src/properties-editors/auto-task/permission-settings.vue +0 -155
  91. package/packages/workflow-editor/src/properties-editors/auto-task.vue +0 -74
  92. package/packages/workflow-editor/src/properties-editors/common/additional-condition-utils.js +0 -568
  93. package/packages/workflow-editor/src/properties-editors/common/additional-condition.vue +0 -320
  94. package/packages/workflow-editor/src/properties-editors/common/auto-filled-fields-utils.js +0 -34
  95. package/packages/workflow-editor/src/properties-editors/common/auto-filled-fields.vue +0 -239
  96. package/packages/workflow-editor/src/properties-editors/common/common-notice-tool.vue +0 -81
  97. package/packages/workflow-editor/src/properties-editors/common/common-user-condition.vue +0 -242
  98. package/packages/workflow-editor/src/properties-editors/common/form-fields-utils.js +0 -23
  99. package/packages/workflow-editor/src/properties-editors/common/form-fields.vue +0 -117
  100. package/packages/workflow-editor/src/properties-editors/common/i18n-input.vue +0 -88
  101. package/packages/workflow-editor/src/properties-editors/common/i18n-set-dialog.vue +0 -143
  102. package/packages/workflow-editor/src/properties-editors/common/notice-reminder.vue +0 -149
  103. package/packages/workflow-editor/src/properties-editors/common/notice.vue +0 -108
  104. package/packages/workflow-editor/src/properties-editors/common/reminder.vue +0 -272
  105. package/packages/workflow-editor/src/properties-editors/common/select-mail-template.vue +0 -92
  106. package/packages/workflow-editor/src/properties-editors/common/standard-fields.vue +0 -66
  107. package/packages/workflow-editor/src/properties-editors/common/system-role-tree-inline.vue +0 -354
  108. package/packages/workflow-editor/src/properties-editors/common/system-role-tree.vue +0 -68
  109. package/packages/workflow-editor/src/properties-editors/common/task-title.vue +0 -165
  110. package/packages/workflow-editor/src/properties-editors/common/transactor-settings.vue +0 -275
  111. package/packages/workflow-editor/src/properties-editors/common/user-selection.vue +0 -426
  112. package/packages/workflow-editor/src/properties-editors/common/value-selection-dialog.vue +0 -272
  113. package/packages/workflow-editor/src/properties-editors/common/variables.vue +0 -138
  114. package/packages/workflow-editor/src/properties-editors/copy-task/basic-properties.vue +0 -90
  115. package/packages/workflow-editor/src/properties-editors/copy-task/permission-settings.vue +0 -155
  116. package/packages/workflow-editor/src/properties-editors/copy-task.vue +0 -95
  117. package/packages/workflow-editor/src/properties-editors/decision.vue +0 -95
  118. package/packages/workflow-editor/src/properties-editors/fork.vue +0 -77
  119. package/packages/workflow-editor/src/properties-editors/human-decision.vue +0 -49
  120. package/packages/workflow-editor/src/properties-editors/human-task/additional-condition-dialog.vue +0 -62
  121. package/packages/workflow-editor/src/properties-editors/human-task/basic-properties.vue +0 -184
  122. package/packages/workflow-editor/src/properties-editors/human-task/componentsConfigUtil.js +0 -359
  123. package/packages/workflow-editor/src/properties-editors/human-task/custom-actions.vue +0 -256
  124. package/packages/workflow-editor/src/properties-editors/human-task/editable-child-field-setting.vue +0 -405
  125. package/packages/workflow-editor/src/properties-editors/human-task/editable-child-fields.vue +0 -257
  126. package/packages/workflow-editor/src/properties-editors/human-task/editable-field-selection.vue +0 -430
  127. package/packages/workflow-editor/src/properties-editors/human-task/editable-fields.vue +0 -206
  128. package/packages/workflow-editor/src/properties-editors/human-task/events.vue +0 -60
  129. package/packages/workflow-editor/src/properties-editors/human-task/permission-settings.vue +0 -224
  130. package/packages/workflow-editor/src/properties-editors/human-task/selection-conditions.vue +0 -499
  131. package/packages/workflow-editor/src/properties-editors/human-task.vue +0 -116
  132. package/packages/workflow-editor/src/properties-editors/join.vue +0 -49
  133. package/packages/workflow-editor/src/properties-editors/process/basic-properties.vue +0 -336
  134. package/packages/workflow-editor/src/properties-editors/process/events.vue +0 -79
  135. package/packages/workflow-editor/src/properties-editors/process/notice-settings.vue +0 -68
  136. package/packages/workflow-editor/src/properties-editors/process/parameter-settings.vue +0 -106
  137. package/packages/workflow-editor/src/properties-editors/process/permission-settings.vue +0 -28
  138. package/packages/workflow-editor/src/properties-editors/process/selectPage.vue +0 -88
  139. package/packages/workflow-editor/src/properties-editors/process.vue +0 -115
  140. package/packages/workflow-editor/src/properties-editors/subprocess/basic-properties.vue +0 -201
  141. package/packages/workflow-editor/src/properties-editors/subprocess/events.vue +0 -26
  142. package/packages/workflow-editor/src/properties-editors/subprocess/field-mappings.vue +0 -216
  143. package/packages/workflow-editor/src/properties-editors/subprocess/transactor-settings.vue +0 -66
  144. package/packages/workflow-editor/src/properties-editors/subprocess.vue +0 -80
  145. package/packages/workflow-editor/src/properties-editors/transition/basic-properties.vue +0 -53
  146. package/packages/workflow-editor/src/properties-editors/transition.vue +0 -75
  147. package/packages/workflow-editor/src/properties-editors/user-condition.js +0 -183
  148. package/packages/workflow-editor/src/store/getters.js +0 -33
  149. package/packages/workflow-editor/src/store/workflow-editor.js +0 -153
  150. package/packages/workflow-editor/src/taches/auto-task.vue +0 -99
  151. package/packages/workflow-editor/src/taches/common-methods.js +0 -21
  152. package/packages/workflow-editor/src/taches/copy-task.vue +0 -99
  153. package/packages/workflow-editor/src/taches/custom-task.vue +0 -88
  154. package/packages/workflow-editor/src/taches/decision.vue +0 -102
  155. package/packages/workflow-editor/src/taches/end.vue +0 -76
  156. package/packages/workflow-editor/src/taches/fork.vue +0 -102
  157. package/packages/workflow-editor/src/taches/human-decision.vue +0 -102
  158. package/packages/workflow-editor/src/taches/human-task.vue +0 -113
  159. package/packages/workflow-editor/src/taches/join.vue +0 -91
  160. package/packages/workflow-editor/src/taches/joint.vue +0 -177
  161. package/packages/workflow-editor/src/taches/start.vue +0 -76
  162. package/packages/workflow-editor/src/taches/subprocess.vue +0 -99
  163. package/packages/workflow-editor/src/taches/tache-resizer.vue +0 -80
  164. package/packages/workflow-editor/src/transitions/broken-line.vue +0 -91
  165. package/packages/workflow-editor/src/transitions/curve-line.vue +0 -91
  166. package/packages/workflow-editor/src/transitions/straight-line.vue +0 -26
  167. package/packages/workflow-editor/src/transitions/transition.vue +0 -209
  168. package/packages/workflow-editor/src/transitions/virtual-transition.vue +0 -43
  169. package/packages/workflow-editor/src/util.js +0 -499
  170. package/packages/workflow-editor/src/workflow-editor.vue +0 -852
  171. package/packages/workflow-editor/src/workflow-history.vue +0 -153
  172. package/src/i18n/i18n.js +0 -16
  173. package/src/i18n/langs/cn.js +0 -521
  174. package/src/i18n/langs/en.js +0 -529
  175. /package/{public → dist}/vite.svg +0 -0
@@ -1,88 +0,0 @@
1
- <template>
2
- <el-dialog
3
- :show-close="true"
4
- :append-to-body="true"
5
- :title="$t('workflowEditorPublicModel.selectPage')"
6
- width="60%"
7
- model-value
8
- @close="savePage"
9
- >
10
- <div style="overflow-y:auto;max-height: 500px">
11
- <div class="operation-area">
12
- <el-button size="small" @click="savePage">
13
- <span>{{ $t('workflowEditorPublicModel.close') }}</span>
14
- </el-button>
15
- </div>
16
- <div>
17
- <super-grid
18
- ref="grid"
19
- :url="baseURL + listURL"
20
- code="MMS_MODULE_PAGE"
21
- @select="select"
22
- />
23
- </div>
24
- </div>
25
- </el-dialog>
26
- </template>
27
- <script>
28
-
29
- // import modulePageService from '@/subsystems/mms/api/module-page'
30
- import * as Vue from 'vue'
31
- import { mapGetters } from 'vuex'
32
- import authApi from 'agilebuilder-ui/src/utils/auth-api'
33
- export default {
34
- props: {
35
- pageFormCode: {
36
- type: String,
37
- default: null
38
- }
39
- },
40
- data() {
41
- return {
42
- baseURL: '',
43
- listURL: '',
44
- selection: [],
45
- dialogVisible: true
46
- }
47
- },
48
- computed: {
49
- ...mapGetters('wfEditor', [
50
- 'systemVersion'
51
- ])
52
- },
53
- watch: {
54
- conditionList: {
55
- handler(newValue, oldValue) {
56
- this.judgeHeavyData = newValue
57
- }
58
- }
59
- },
60
- created() {
61
- this.baseURL = window.$vueApp.config.globalProperties.baseURL
62
- if (this.pageFormCode) {
63
- this.listURL = '/wf-editor/workflow-editors/modulePages/' + this.pageFormCode + '/' + parseInt(authApi.getSessionCache('wf_editor_systemVersion'))
64
- }
65
- },
66
- methods: {
67
- savePage() {
68
- if (this.selection && this.selection.length > 0) {
69
- if (this.selection.length !== 1) {
70
- this.$message({
71
- showClose: true,
72
- type: 'error',
73
- message: this.$t('message.pleaseSelectARecord')
74
- })
75
- } else {
76
- const code = 'page:' + this.selection[0].code
77
- this.$emit('setPage', code)
78
- }
79
- } else {
80
- this.$emit('setPage', '')
81
- }
82
- },
83
- select(selection, row) {
84
- this.selection = selection
85
- }
86
- }
87
- }
88
- </script>
@@ -1,115 +0,0 @@
1
- <template>
2
- <el-dialog
3
- model-value
4
- :title="$t('workflowEditor.process.processProperties')"
5
- :center="true"
6
- top="10vh"
7
- append-to-body
8
- class="properties-editor"
9
- @open="$emit('open')"
10
- @opend="$emit('opend')"
11
- @close="$emit('close')"
12
- @closed="$emit('closed')"
13
- >
14
- <el-tabs v-model="activeTab" type="border-card" @tab-click="handleClick">
15
- <el-tab-pane :label="$t('workflowEditor.process.basicProperties')" name="basicProperties">
16
- <basic-properties
17
- v-model:name="model.attr.name"
18
- v-model:code="model.attr.code"
19
- :model="model.properties.basicProperties"
20
- />
21
- </el-tab-pane>
22
- <el-tab-pane :label="$t('workflowEditor.process.permissionSettings')" name="permissions">
23
- <permission-settings v-model="model.properties.permissionSettings" />
24
- </el-tab-pane>
25
- <el-tab-pane :label="$t('workflowEditor.process.notificationSettings')" name="inform">
26
- <notice-settings v-model="model.properties.inform" />
27
- </el-tab-pane>
28
- <el-tab-pane :label="$t('workflowEditor.process.reminderSettings')" name="reminders">
29
- <notice-reminder v-model:reminder-value="model.properties.reminder" :task-notice-value="model.properties.taskNotice" :isProcess="true" />
30
- </el-tab-pane>
31
- <el-tab-pane :label="$t('workflowEditor.process.parameterSsetting')" name="parameterSettings">
32
- <parameter-settings :model="model.properties.parameterSettings" />
33
- </el-tab-pane>
34
- <el-tab-pane :label="$t('workflowEditor.process.event')" name="events">
35
- <events v-model="model.properties.events" />
36
- </el-tab-pane>
37
- <el-tab-pane :label="$t('workflowEditor.process.processVariables')" name="variables">
38
- <variables :model="model.properties.variables" />
39
- </el-tab-pane>
40
- </el-tabs>
41
- </el-dialog>
42
- </template>
43
- <script>
44
- import convert from 'xml-js'
45
- import BasicProperties from './process/basic-properties'
46
- import PermissionSettings from './process/permission-settings'
47
- // import Reminder from './common/reminder'
48
- import ParameterSettings from './process/parameter-settings'
49
- import Events from './process/events'
50
- import Variables from './common/variables'
51
- import NoticeSettings from './process/notice-settings.vue'
52
- import NoticeReminder from './common/notice-reminder.vue'
53
- export default {
54
- name: 'ProcessPropertiesEditor',
55
- components: {
56
- BasicProperties,
57
- PermissionSettings,
58
- // Reminder,
59
- ParameterSettings,
60
- Events,
61
- Variables,
62
- NoticeSettings,
63
- NoticeReminder
64
- },
65
- props: {
66
- model: {
67
- type: Object,
68
- default: null
69
- }
70
- },
71
- data() {
72
- // if (this.model.properties.inform === undefined) {
73
- // this.model.properties.inform = {}
74
- // }
75
- if (this.model.properties.taskNotice === undefined) {
76
- this.model.properties.taskNotice = {}
77
- }
78
- return {
79
- activeTab: 'basicProperties',
80
- dialogVisible: true
81
- }
82
- },
83
- computed: {
84
- // 定义这些计算属性只是为了减少模板中的代码量
85
- basicProperties() {
86
- return this.model.properties.basicProperties
87
- },
88
- accessRight() {
89
- return this.model.properties.accessRight
90
- },
91
- reminder() {
92
- return this.model.properties.reminder
93
- },
94
- parameterSettings() {
95
- return this.model.properties.parameterSettings
96
- },
97
- events() {
98
- return this.model.properties.events
99
- },
100
- variables() {
101
- return this.model.properties.variables
102
- }
103
- },
104
- methods: {
105
- toXml() {
106
- const options = { compact: true, ignoreComment: true, spaces: 4 }
107
- console.log(convert.js2xml({ basicProperties: this.basicProperties }, options))
108
- },
109
- handleClick(tab, event) {
110
- // console.log(tab, event)
111
- }
112
- }
113
- }
114
- </script>
115
-
@@ -1,201 +0,0 @@
1
- <template>
2
- <el-form :model="formModel">
3
- <el-row>
4
- <el-col :span="12">
5
- <el-form-item :label="$t('workflowEditor.process.name')" label-width="50px">
6
- <!-- <el-input v-model="formModel.name" /> -->
7
- <i18n-input
8
- v-model="formModel.name"
9
- :i18n-key="formModel.tache.i18nKey?formModel.tache.i18nKey:'name.'+formModel.id"
10
- @setI18n="setI18nValue"
11
- />
12
- </el-form-item>
13
- </el-col>
14
- <el-col :span="12">
15
- <el-form-item :label="$t('workflowEditor.process.code')" label-width="50px">
16
- <el-input v-model="formModel.id" @blur="validateId" />
17
- </el-form-item>
18
- </el-col>
19
- </el-row>
20
- <el-form-item :label="$t('workflowEditor.task.taskTitle')">
21
- <task-title v-model="tache.taskTitle" />
22
- </el-form-item>
23
- <el-form-item :label="$t('workflowEditor.process.subprocess')" label-width="60px">
24
- <el-cascader
25
- v-model="selectedProcess"
26
- :show-all-levels="false"
27
- :options="processes"
28
- @change="handleChange"
29
- />
30
- </el-form-item>
31
- <el-form-item :label="$t('workflowEditor.process.subprocessIsSharedForm')" label-width="140px">
32
- <el-switch v-model="formModel.tache.isSharedForm" />
33
- </el-form-item>
34
- <el-radio-group v-model="formModel.tache.moreTransactor">
35
- <el-radio :label="false">
36
- {{ $t('workflowEditor.task.anyOneCanHandleIt') }}
37
- </el-radio>
38
- <el-radio :label="true">
39
- {{ $t('workflowEditor.task.forAll') }}
40
- </el-radio>
41
- </el-radio-group>
42
- <el-form-item>
43
- <field-mappings
44
- :label-tittle="$t('workflowEditor.process.transferValueFromMainFormToSubForm')"
45
- v-model="formModel.tache.parameters"
46
- :src-label="$t('workflowEditor.process.fieldsOfTheMainForm')"
47
- :target-label="$t('workflowEditor.process.fieldsOfSubform')"
48
- :target-fields="subprocessFormFields"
49
- />
50
- </el-form-item>
51
- <el-form-item>
52
- <field-mappings
53
- :label-tittle="$t('workflowEditor.process.subformReturnsResultsToMainForm')"
54
- v-model="formModel.tache.result"
55
- :src-label="$t('workflowEditor.process.fieldsOfSubform')"
56
- :target-label="$t('workflowEditor.process.fieldsOfTheMainForm')"
57
- :src-fields="subprocessFormFields"
58
- />
59
- </el-form-item>
60
- </el-form>
61
- </template>
62
-
63
- <script>
64
- import FieldMappings from './field-mappings'
65
- import processService from '../../process-service.js'
66
- import { validateTacheCode } from '../../util'
67
- import i18nInput from '../common/i18n-input'
68
- import TaskTitle from '../common/task-title'
69
- export default {
70
- name: 'BasicProperties',
71
- components: {
72
- FieldMappings,
73
- i18nInput,
74
- TaskTitle
75
- },
76
- props: {
77
- model: {
78
- type: Object,
79
- default: null
80
- },
81
- id: {
82
- type: String,
83
- default: null
84
- },
85
- name: {
86
- type: String,
87
- default: null
88
- }
89
- },
90
- data() {
91
- return {
92
- selectedProcess: [],
93
- processes: [],
94
- subprocessFormFields: [],
95
- formModel: {
96
- name: this.name,
97
- id: this.id,
98
- tache: this.model
99
- }
100
- }
101
- },
102
- computed: {
103
- tache() {
104
- return this.model
105
- }
106
- },
107
- created() {
108
- this.listAllProcesses().then(() => {
109
- this.fetchSubprocessFormFields()
110
- })
111
-
112
- if (this.formModel.tache.parameters === '') {
113
- this.formModel.tache.parameters = {}
114
- }
115
- if (this.formModel.tache.result === '') {
116
- this.formModel.tache.result = {}
117
- }
118
- },
119
- mounted() {
120
- // 支持.snyc修饰符的写法
121
- this.$watch('formModel.name', function(newVal, oldVal) {
122
- this.$emit('update:name', newVal)
123
- })
124
- },
125
- methods: {
126
- fetchSubprocessFormFields() {
127
- if (this.model.processCode) {
128
- // 获得子流程对应表单字段集合
129
- processService.fetchSubprocessFormFields(this.model.processCode, this.model.processVersion).then(formFields => {
130
- this.subprocessFormFields = formFields
131
- })
132
- }
133
- },
134
- handleChange(values) {
135
- console.log('handleChange=', values)
136
- const processInfo = values[1]
137
- this.model.processCode = processInfo.substring(processInfo.indexOf('/') + 1, processInfo.lastIndexOf('/'))
138
- this.model.processVersion = processInfo.substring(processInfo.lastIndexOf('/') + 1)
139
- this.fetchSubprocessFormFields()
140
- },
141
- // 获得对应表单列表
142
- listAllProcesses() {
143
- return new Promise((resolve, reject) => {
144
- this.$http.get(this.baseAPI + '/wf-editor/workflow-editors/all-active-definitions').then(activeDefinitions => {
145
- if (activeDefinitions.length > 0) {
146
- // 设置表单信息
147
- const selectedProcessInfo = this.model.processCode + '/' + this.model.processVersion
148
- // 修改时,获得默认选中的表单项
149
- this.setDefaultSelectedProcessWhenUpdate(activeDefinitions, selectedProcessInfo)
150
- this.processes = activeDefinitions
151
- resolve()
152
- }
153
- }).catch(error => {
154
- reject(error)
155
- })
156
- })
157
- },
158
- // 修改时,获得默认选中的流程项
159
- setDefaultSelectedProcessWhenUpdate(activeDefinitions, selectedProcessInfo) {
160
- let selectedProcess
161
- let selectedSystemCode
162
- for (var i = 0; i < activeDefinitions.length; i++) {
163
- const systemCode = activeDefinitions[i].value
164
- const definitions = activeDefinitions[i].children
165
- const selectedProcesses = definitions.filter(this.filterProcess(selectedProcessInfo))
166
- if (selectedProcesses.length > 0) {
167
- selectedSystemCode = systemCode
168
- selectedProcess = selectedProcesses[0]
169
- break
170
- }
171
- }
172
- if (selectedProcess) {
173
- const result = []
174
- result.push(selectedSystemCode)
175
- result.push(selectedProcess.value)
176
- this.selectedProcess = result
177
- }
178
- },
179
- // 过滤流程
180
- filterProcess(selectedProcessInfo) {
181
- return (process) => {
182
- // systemAndProcessInfo/流程编号/流程版本”
183
- const systemAndProcessInfo = process.value
184
- // 获得“流程编号/流程版本”
185
- const processInfo = systemAndProcessInfo.substring(systemAndProcessInfo.indexOf('/') + 1)
186
- return (selectedProcessInfo === processInfo)
187
- }
188
- },
189
- validateId() {
190
- validateTacheCode(this)
191
- },
192
- setI18nValue(i18nKey) {
193
- this.formModel.tache.i18nKey = i18nKey
194
- }
195
- }
196
- }
197
- </script>
198
-
199
- <style lang="scss" scoped>
200
-
201
- </style>
@@ -1,26 +0,0 @@
1
- <template>
2
- <el-form>
3
- <el-form-item :label="$t('workflowEditor.process.eventsTriggeredBeforeStartingASubprocess')" label-width="150px">
4
- <el-switch v-model="modelValue.beforeStart" />
5
- </el-form-item>
6
- <el-form-item :label="$t('workflowEditor.process.triggerSubprocessEndEvent')">
7
- <el-switch v-model="modelValue.end" />
8
- </el-form-item>
9
- </el-form>
10
- </template>
11
-
12
- <script>
13
- export default {
14
- name: 'Events',
15
- props: {
16
- modelValue: {
17
- type: Object,
18
- default: null
19
- }
20
- }
21
- }
22
- </script>
23
-
24
- <style lang="scss" scoped>
25
-
26
- </style>
@@ -1,216 +0,0 @@
1
- <template>
2
- <div style="width: 100%">
3
- <el-row style="align-items: center">
4
- <span v-if="labelTittle" style="margin-right: 12px">{{ labelTittle }}</span>
5
- <el-button type="primary" size="small" plain icon="CirclePlus" @click="add">
6
- {{ $t('workflowEditorPublicModel.add') }}
7
- </el-button>
8
- <el-button type="primary" size="small" plain icon="Delete" @click="remove">
9
- {{ $t('workflowEditorPublicModel.delete') }}
10
- </el-button>
11
- </el-row>
12
- <el-table
13
- ref="table"
14
- :data="tableData"
15
- border
16
- highlight-current-row
17
- style="width: 100%"
18
- @current-change="handleCurrentChange"
19
- >
20
- <el-table-column
21
- type="index"
22
- width="50"
23
- />
24
- <el-table-column
25
- prop="source"
26
- :label="srcLabel"
27
- >
28
- <template v-slot="scope">
29
- <el-input :value="showSourceFieldLabel(scope.row.source)" :placeholder="$t('workflowEditorMessage.pleaseSelect')" @click="showSourceFields = true" />
30
- </template>
31
- </el-table-column>
32
- <el-table-column
33
- prop="target"
34
- :label="targetLabel"
35
- >
36
- <template v-slot="scope">
37
- <el-input :value="showTargetFieldLabel(scope.row.target)" :placeholder="$t('workflowEditorMessage.pleaseSelect')" @click="showTargetFields=true" />
38
- </template>
39
- </el-table-column>
40
- </el-table>
41
- <form-fields v-if="showSourceFields||showTargetFields" :fields="formFields" @close="selectField" />
42
- </div>
43
- </template>
44
- <script>
45
- import FormFields from '../common/form-fields'
46
- import { getFormFieldLabel } from '../common/form-fields-utils.js'
47
- export default {
48
- name: 'FieldMappings',
49
- components: {
50
- FormFields
51
- },
52
- props: {
53
- modelValue: {
54
- type: Object,
55
- default: null
56
- },
57
- srcLabel: {
58
- type: String,
59
- default: null
60
- },
61
- targetLabel: {
62
- type: String,
63
- default: null
64
- },
65
- srcFields: {
66
- type: Array,
67
- default: null
68
- },
69
- targetFields: {
70
- type: Array,
71
- default: null
72
- },
73
- labelTittle:{
74
- type:String,
75
- default: null
76
- }
77
- },
78
- data() {
79
- let tableData = []
80
- if (this.modelValue.field !== undefined) {
81
- // xml中有多个field时是数组,只有一个field时是Object
82
- if (Array.isArray(this.modelValue.field)) {
83
- tableData = this.modelValue.field
84
- } else {
85
- tableData.push(this.modelValue.field)
86
- }
87
- }
88
- return {
89
- tableData,
90
- currentRow: null,
91
- showSourceFields: false,
92
- showTargetFields: false
93
- }
94
- },
95
- computed: {
96
- formFields() {
97
- if (this.showSourceFields) {
98
- return this.srcFields
99
- } else if (this.showTargetFields) {
100
- return this.targetFields
101
- } else {
102
- return []
103
- }
104
- }
105
- },
106
- watch: {
107
-
108
- },
109
- mounted() {
110
- if (this.tableData.length > 0) {
111
- this.setCurrentRow(this.tableData[0])
112
- }
113
- this.$watch('tableData', function() {
114
- const filteredData = this.tableData.filter(field => {
115
- return field.source !== '' && field.target !== ''
116
- })
117
- // this.$emit('input', {
118
- // field: filteredData
119
- // })
120
- this.$emit('update:modelValue', {
121
- field: filteredData
122
- })
123
- }, {
124
- // deep为true可以监控数组中的元素的某个属性的变化
125
- deep: true
126
- })
127
- },
128
- methods: {
129
- getSubFormFieldLabel(name) {
130
- const fields = this.srcFields || this.targetFields
131
- const field = fields.filter(item => {
132
- return item.name === name
133
- })
134
- if (field.length > 0) {
135
- return field[0].label
136
- } else {
137
- return name
138
- }
139
- },
140
- showSourceFieldLabel(value) {
141
- if (this.srcFields) {
142
- return this.getSubFormFieldLabel(value)
143
- } else {
144
- return getFormFieldLabel(value)
145
- }
146
- },
147
- showTargetFieldLabel(value) {
148
- if (this.targetFields) {
149
- return this.getSubFormFieldLabel(value)
150
- } else {
151
- return getFormFieldLabel(value)
152
- }
153
- },
154
- add() {
155
- for (let i = 0; i < this.tableData.length; i++) {
156
- if (this.tableData[i].source === '' || this.tableData[i].target === '') {
157
- this.$alert(this.$t('workflowEditorMessage.dataInLineCannotBeEmpty', { row: (i + 1), data1: this.srcLabel, data2: this.targetLabel }))
158
- return
159
- }
160
- }
161
- const newRow = {
162
- source: '',
163
- target: ''
164
- }
165
- this.tableData.push(newRow)
166
- this.setCurrentRow(newRow)
167
- },
168
- remove() {
169
- if (this.currentRow === null) {
170
- this.$alert(this.$t('workflowEditorMessage.pleaseSelectARow'))
171
- return
172
- }
173
- let index
174
- for (let i = 0; i < this.tableData.length; i++) {
175
- if (this.tableData[i].source === this.currentRow.source) {
176
- index = i
177
- break
178
- }
179
- }
180
- this.tableData.splice(index, 1)
181
- // 当前选中的index如果是最后一行,那么删除后,index会等于length造成下标越界,因此需要让index等于新的最后一行
182
- index = (index <= (this.tableData.length - 1) ? index : (this.tableData.length - 1))
183
- this.setCurrentRow(this.tableData[index])
184
- },
185
- setCurrentRow(row) {
186
- this.$refs.table.setCurrentRow(row)
187
- },
188
- handleCurrentChange(val) {
189
- this.currentRow = val
190
- },
191
- checkSource(name) {
192
- if (name === '') {
193
- this.$alert(this.$t('workflowEditorMessage.dataCannotBeEmpty', { data: this.srcLabel }))
194
- }
195
- },
196
- checkTarget(value) {
197
- if (value === '') {
198
- this.$alert(this.$t('workflowEditorMessage.dataCannotBeEmpty', { data: this.targetLabel }))
199
- }
200
- },
201
- selectField(field) {
202
- if (this.showSourceFields) {
203
- this.currentRow['source'] = field
204
- // this.$set(this.currentRow, 'source', field)
205
- this.showSourceFields = false
206
- }
207
- if (this.showTargetFields) {
208
- this.currentRow['target'] = field
209
- // this.$set(this.currentRow, 'target', field)
210
- this.showTargetFields = false
211
- }
212
- console.log('this.tableData===', this.tableData, 'this.srcFields===', this.srcFields, 'this.targetFields===', this.targetFields)
213
- }
214
- }
215
- }
216
- </script>