sohelp-eleplus 1.1.13

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 (191) hide show
  1. package/README.md +7 -0
  2. package/cache/DictCache.js +58 -0
  3. package/cache/ModuleCache.js +352 -0
  4. package/components.js +45 -0
  5. package/core-export.js +4 -0
  6. package/http/CrudHttp.js +115 -0
  7. package/http/DictHttp.js +12 -0
  8. package/http/ModuleHttp.js +68 -0
  9. package/http/SohelpHttp.js +125 -0
  10. package/index.js +6 -0
  11. package/installer.js +8 -0
  12. package/lang/en_US.js +4 -0
  13. package/lang/zh_CN.js +4 -0
  14. package/lang/zh_TW.js +4 -0
  15. package/package.json +9 -0
  16. package/sohelp-ace-editor/index.vue +198 -0
  17. package/sohelp-application-select/index.vue +15 -0
  18. package/sohelp-autocode/index.vue +53 -0
  19. package/sohelp-calendar-view/index.vue +11 -0
  20. package/sohelp-card-view/index.vue +11 -0
  21. package/sohelp-condition/index.vue +210 -0
  22. package/sohelp-cry-input/index.vue +64 -0
  23. package/sohelp-date/index.vue +27 -0
  24. package/sohelp-datetime/index.vue +44 -0
  25. package/sohelp-datetime-picker/index.vue +86 -0
  26. package/sohelp-datetime-range/index.vue +59 -0
  27. package/sohelp-dict/index.vue +207 -0
  28. package/sohelp-dict/props.js +68 -0
  29. package/sohelp-drawer/index.vue +31 -0
  30. package/sohelp-drop-card/index.vue +94 -0
  31. package/sohelp-drop-card/props.js +68 -0
  32. package/sohelp-dyn-select/index.vue +99 -0
  33. package/sohelp-dyn-select/props.js +67 -0
  34. package/sohelp-dyn-tree/index.vue +82 -0
  35. package/sohelp-dyn-tree-select/index.vue +114 -0
  36. package/sohelp-entity-form/index.vue +524 -0
  37. package/sohelp-entity-grid/index.vue +30 -0
  38. package/sohelp-file-upload/index.vue +218 -0
  39. package/sohelp-filter-scheme/components/condition.vue +102 -0
  40. package/sohelp-filter-scheme/components/filter.vue +45 -0
  41. package/sohelp-filter-scheme/components/keywords.vue +15 -0
  42. package/sohelp-filter-scheme/components/scheme.vue +49 -0
  43. package/sohelp-filter-scheme/index.vue +113 -0
  44. package/sohelp-grid/SohelpGridConfig.js~ +408 -0
  45. package/sohelp-grid/components/filter-condition-item.vue +298 -0
  46. package/sohelp-grid/index.vue +1886 -0
  47. package/sohelp-grid/js/ConditionType.js +101 -0
  48. package/sohelp-grid/js/DefaultGridOptions.js +141 -0
  49. package/sohelp-grid/js/DefaultProps.js +27 -0
  50. package/sohelp-grid/js/SohelpConfigFunction.js +0 -0
  51. package/sohelp-grid/js/SohelpGridConfig.js +101 -0
  52. package/sohelp-grid/js/useSohelpGridConfig.js +519 -0
  53. package/sohelp-grid-select/index.vue +245 -0
  54. package/sohelp-grid-view/filter/config/grid-filter-condition.vue +221 -0
  55. package/sohelp-grid-view/filter/config/grid-filter-config.vue +27 -0
  56. package/sohelp-grid-view/filter/config/grid-filter-field.vue +378 -0
  57. package/sohelp-grid-view/filter/config/grid-filter-keywords.vue +310 -0
  58. package/sohelp-grid-view/filter/config/grid-filter-list.vue +313 -0
  59. package/sohelp-grid-view/filter/config/grid-filter-scheme.vue +264 -0
  60. package/sohelp-grid-view/filter/config/grid-filter-sort.vue +310 -0
  61. package/sohelp-grid-view/filter/config/index.vue +206 -0
  62. package/sohelp-grid-view/filter/filter-form.vue +427 -0
  63. package/sohelp-grid-view/filter/filter-toolbar.vue +110 -0
  64. package/sohelp-grid-view/filter/index.vue +160 -0
  65. package/sohelp-grid-view/index.vue +379 -0
  66. package/sohelp-grid-view-select/index.vue +141 -0
  67. package/sohelp-group-view/index.vue +11 -0
  68. package/sohelp-icon-select/index.vue +96 -0
  69. package/sohelp-icon-select/vxeui-icon.js +90 -0
  70. package/sohelp-image-upload/index.vue +286 -0
  71. package/sohelp-input/index.vue +39 -0
  72. package/sohelp-modal/index.vue +49 -0
  73. package/sohelp-module/index.vue +54 -0
  74. package/sohelp-module/useModalManager.js +89 -0
  75. package/sohelp-module/useSohelpModule.js +66 -0
  76. package/sohelp-number-input/index.vue +32 -0
  77. package/sohelp-number-range/index.vue +135 -0
  78. package/sohelp-org-select/index.vue +30 -0
  79. package/sohelp-org-tree/index.vue +18 -0
  80. package/sohelp-org-tree-select/index.vue +93 -0
  81. package/sohelp-org-user-tree/index.vue +26 -0
  82. package/sohelp-org-user-tree-select/index.vue +11 -0
  83. package/sohelp-pagination/index.vue +11 -0
  84. package/sohelp-power/index.vue +105 -0
  85. package/sohelp-pro-form/components/pro-form-footer.vue +44 -0
  86. package/sohelp-pro-form/components/pro-form-item.vue +1133 -0
  87. package/sohelp-pro-form/index.vue +257 -0
  88. package/sohelp-pro-form/util.js +140 -0
  89. package/sohelp-pro-layout/index.vue +11 -0
  90. package/sohelp-pro-table/index.vue +14 -0
  91. package/sohelp-process/index.vue +216 -0
  92. package/sohelp-rate/index.vue +56 -0
  93. package/sohelp-rate/props.js +71 -0
  94. package/sohelp-relation/index.vue +11 -0
  95. package/sohelp-rich-text/index.vue +242 -0
  96. package/sohelp-rich-text/util.js +231 -0
  97. package/sohelp-richtext/index.vue +10 -0
  98. package/sohelp-role-select/index.vue +33 -0
  99. package/sohelp-search/components/search-config.vue +0 -0
  100. package/sohelp-search/index.vue +49 -0
  101. package/sohelp-search-pro-form/index.vue +11 -0
  102. package/sohelp-select/index.vue +120 -0
  103. package/sohelp-split-panel/index.vue +15 -0
  104. package/sohelp-switch/index.vue +56 -0
  105. package/sohelp-table/index.vue +151 -0
  106. package/sohelp-tenant-select/index.vue +128 -0
  107. package/sohelp-text/index.vue +14 -0
  108. package/sohelp-textarea-input/index.vue +36 -0
  109. package/sohelp-time/index.vue +10 -0
  110. package/sohelp-tree/index.vue +37 -0
  111. package/sohelp-tree-select/index.vue +18 -0
  112. package/sohelp-user-select/index.vue +44 -0
  113. package/sohelp-user-select/index.vue~ +53 -0
  114. package/sohelp-user-select/props.js +71 -0
  115. package/sohelp-user-tag/index.vue +12 -0
  116. package/sohelp-user-tree/index.vue +11 -0
  117. package/sohelp-vform-drawer/index.vue +40 -0
  118. package/sohelp-vform-eleplus/favicon.ico +0 -0
  119. package/sohelp-vform-eleplus/index.vue +297 -0
  120. package/sohelp-vform-eleplus/preview.html +91 -0
  121. package/sohelp-vform-eleplus/render.es.js +72433 -0
  122. package/sohelp-vform-eleplus/render.style.css +16 -0
  123. package/sohelp-vform-eleplus/render.umd.js +57 -0
  124. package/sohelp-vform-eleplus/tinymce/langs/zh_CN.js +462 -0
  125. package/sohelp-vform-eleplus/tinymce/langs/zh_TW.js +419 -0
  126. package/sohelp-vform-eleplus/tinymce/skins/content/dark/content.css +72 -0
  127. package/sohelp-vform-eleplus/tinymce/skins/content/dark/content.min.css +7 -0
  128. package/sohelp-vform-eleplus/tinymce/skins/content/default/content.css +67 -0
  129. package/sohelp-vform-eleplus/tinymce/skins/content/default/content.min.css +7 -0
  130. package/sohelp-vform-eleplus/tinymce/skins/content/document/content.css +72 -0
  131. package/sohelp-vform-eleplus/tinymce/skins/content/document/content.min.css +7 -0
  132. package/sohelp-vform-eleplus/tinymce/skins/content/writer/content.css +68 -0
  133. package/sohelp-vform-eleplus/tinymce/skins/content/writer/content.min.css +7 -0
  134. package/sohelp-vform-eleplus/tinymce/skins/ui/oxide/content.css +732 -0
  135. package/sohelp-vform-eleplus/tinymce/skins/ui/oxide/content.inline.css +726 -0
  136. package/sohelp-vform-eleplus/tinymce/skins/ui/oxide/content.inline.min.css +7 -0
  137. package/sohelp-vform-eleplus/tinymce/skins/ui/oxide/content.min.css +7 -0
  138. package/sohelp-vform-eleplus/tinymce/skins/ui/oxide/content.mobile.css +29 -0
  139. package/sohelp-vform-eleplus/tinymce/skins/ui/oxide/content.mobile.min.css +7 -0
  140. package/sohelp-vform-eleplus/tinymce/skins/ui/oxide/fonts/tinymce-mobile.woff +0 -0
  141. package/sohelp-vform-eleplus/tinymce/skins/ui/oxide/skin.css +3047 -0
  142. package/sohelp-vform-eleplus/tinymce/skins/ui/oxide/skin.min.css +7 -0
  143. package/sohelp-vform-eleplus/tinymce/skins/ui/oxide/skin.mobile.css +673 -0
  144. package/sohelp-vform-eleplus/tinymce/skins/ui/oxide/skin.mobile.min.css +7 -0
  145. package/sohelp-vform-eleplus/tinymce/skins/ui/oxide/skin.shadowdom.css +37 -0
  146. package/sohelp-vform-eleplus/tinymce/skins/ui/oxide/skin.shadowdom.min.css +7 -0
  147. package/sohelp-vform-eleplus/tinymce/skins/ui/oxide-dark/content.css +714 -0
  148. package/sohelp-vform-eleplus/tinymce/skins/ui/oxide-dark/content.inline.css +726 -0
  149. package/sohelp-vform-eleplus/tinymce/skins/ui/oxide-dark/content.inline.min.css +7 -0
  150. package/sohelp-vform-eleplus/tinymce/skins/ui/oxide-dark/content.min.css +7 -0
  151. package/sohelp-vform-eleplus/tinymce/skins/ui/oxide-dark/content.mobile.css +29 -0
  152. package/sohelp-vform-eleplus/tinymce/skins/ui/oxide-dark/content.mobile.min.css +7 -0
  153. package/sohelp-vform-eleplus/tinymce/skins/ui/oxide-dark/fonts/tinymce-mobile.woff +0 -0
  154. package/sohelp-vform-eleplus/tinymce/skins/ui/oxide-dark/skin.css +3047 -0
  155. package/sohelp-vform-eleplus/tinymce/skins/ui/oxide-dark/skin.min.css +7 -0
  156. package/sohelp-vform-eleplus/tinymce/skins/ui/oxide-dark/skin.mobile.css +673 -0
  157. package/sohelp-vform-eleplus/tinymce/skins/ui/oxide-dark/skin.mobile.min.css +7 -0
  158. package/sohelp-vform-eleplus/tinymce/skins/ui/oxide-dark/skin.shadowdom.css +37 -0
  159. package/sohelp-vform-eleplus/tinymce/skins/ui/oxide-dark/skin.shadowdom.min.css +7 -0
  160. package/sohelp-vform-modal/index.vue +41 -0
  161. package/sohelp-vform-select/index.vue +11 -0
  162. package/sohelp-vform-vant/favicon.ico +0 -0
  163. package/sohelp-vform-vant/render.es.js +14608 -0
  164. package/sohelp-vform-vant/render.style.css +1 -0
  165. package/sohelp-vform-vant/render.umd.js +22 -0
  166. package/sohelp-vxe-grid/DefaultGridOptions.js +102 -0
  167. package/sohelp-vxe-grid/DefaultProps.js +37 -0
  168. package/sohelp-vxe-grid/SohelpGridConfig.js +142 -0
  169. package/sohelp-vxe-grid/index.vue +518 -0
  170. package/sohelp-vxe-grid-select/index.vue +148 -0
  171. package/sohelp-vxe-table/index.vue +184 -0
  172. package/sohelp-workflow/index.vue +495 -0
  173. package/sohelp-workflow/nodeWrap.vue +53 -0
  174. package/sohelp-workflow/nodes/addNode.vue +27 -0
  175. package/sohelp-workflow/nodes/approver.vue +125 -0
  176. package/sohelp-workflow/nodes/branch.vue +434 -0
  177. package/sohelp-workflow/nodes/promoter.vue +80 -0
  178. package/sohelp-workflow/nodes/send.vue +95 -0
  179. package/sohelp-workflow-drawer/components/approval-modal.vue +182 -0
  180. package/sohelp-workflow-drawer/components/draw-box.vue +141 -0
  181. package/sohelp-workflow-drawer/components/form.vue +79 -0
  182. package/sohelp-workflow-drawer/components/table.vue +153 -0
  183. package/sohelp-workflow-drawer/components/timeline.vue +189 -0
  184. package/sohelp-workflow-drawer/components/workflow.vue +68 -0
  185. package/sohelp-workflow-drawer/index.vue +311 -0
  186. package/sohelp-workflow-drawer/js/index.js +119 -0
  187. package/style/index.scss +0 -0
  188. package/utils/ProFormConvertUtil.js +76 -0
  189. package/utils/core.js +310 -0
  190. package/utils/use-form-data.js +48 -0
  191. package/utils/use-mobile.js +43 -0
@@ -0,0 +1,27 @@
1
+ <template>
2
+ <div class="add-node-btn-box">
3
+ <div class="add-node-btn">
4
+ <el-popover placement="right-start" :width="270" trigger="click" :hide-after="0" :show-after="0"></el-popover>
5
+ </div>
6
+ </div>
7
+ </template>
8
+
9
+ <script>
10
+ export default {
11
+ props: {
12
+ modelValue: { type: Object, default: () => {} }
13
+ },
14
+ data() {
15
+ return {
16
+
17
+ }
18
+ },
19
+ mounted() {
20
+
21
+ },
22
+ methods: {}
23
+ }
24
+ </script>
25
+
26
+ <style>
27
+ </style>
@@ -0,0 +1,125 @@
1
+ <template>
2
+ <div class="node-wrap">
3
+ <div class="node-wrap-box" @click="show" :class="[getStatus]">
4
+ <div class="title">
5
+ <el-icon class="icon"><UserFilled /></el-icon>
6
+ <span>{{ nodeConfig.nodeName }}</span>
7
+ </div>
8
+ <div class="content">
9
+ <span v-if="toText(nodeConfig)">{{ toText(nodeConfig) }}</span>
10
+ </div>
11
+ </div>
12
+ <add-node v-model="nodeConfig.childNode"></add-node>
13
+ </div>
14
+ </template>
15
+
16
+ <script>
17
+ import addNode from './addNode.vue';
18
+
19
+ export default {
20
+ inject: ['select'],
21
+ props: {
22
+ modelValue: {
23
+ type: Object,
24
+ default: () => {}
25
+ }
26
+ },
27
+ components: {
28
+ addNode
29
+ },
30
+ data() {
31
+ return {
32
+ nodeConfig: {},
33
+ drawer: false,
34
+ isEditTitle: false,
35
+ form: {}
36
+ };
37
+ },
38
+ watch: {
39
+ modelValue() {
40
+ this.nodeConfig = this.modelValue;
41
+ }
42
+ },
43
+ mounted() {
44
+ this.nodeConfig = this.modelValue;
45
+ console.log('nodeConfig', this.nodeConfig);
46
+ },
47
+ computed: {
48
+ getStatus() {
49
+ if (!this.nodeConfig?.nodeAssigneeList?.length) {
50
+ return '';
51
+ }
52
+ return this.nodeConfig?.nodeAssigneeList[0]?.extendConfig?.type;
53
+ }
54
+ },
55
+ methods: {
56
+ show() {
57
+ this.form = {};
58
+ this.form = JSON.parse(JSON.stringify(this.nodeConfig));
59
+ this.drawer = true;
60
+ },
61
+ editTitle() {
62
+ this.isEditTitle = true;
63
+ this.$nextTick(() => {
64
+ this.$refs.nodeTitle.focus();
65
+ });
66
+ },
67
+ saveTitle() {
68
+ this.isEditTitle = false;
69
+ },
70
+ save() {
71
+ this.$emit('update:modelValue', this.form);
72
+ this.drawer = false;
73
+ },
74
+ delNode() {
75
+ this.$emit('update:modelValue', this.nodeConfig.childNode);
76
+ },
77
+ delUser(index) {
78
+ this.form.nodeAssigneeList.splice(index, 1);
79
+ },
80
+ delRole(index) {
81
+ this.form.nodeAssigneeList.splice(index, 1);
82
+ },
83
+ selectHandle(type, data) {
84
+ this.select(type, data);
85
+ },
86
+ changeSetType() {
87
+ this.form.nodeAssigneeList = [];
88
+ },
89
+ toText(nodeConfig) {
90
+ if (nodeConfig.setType == 1) {
91
+ if (nodeConfig.nodeAssigneeList && nodeConfig.nodeAssigneeList.length > 0) {
92
+ const users = nodeConfig.nodeAssigneeList.map((item) => item.name).join('、');
93
+ return users;
94
+ } else {
95
+ return false;
96
+ }
97
+ } else if (nodeConfig.setType == 2) {
98
+ return nodeConfig.examineLevel == 1 ? '直接主管' : `发起人的第${nodeConfig.examineLevel}级主管`;
99
+ } else if (nodeConfig.setType == 3) {
100
+ if (nodeConfig.nodeAssigneeList && nodeConfig.nodeAssigneeList.length > 0) {
101
+ const roles = nodeConfig.nodeAssigneeList.map((item) => item.name).join('、');
102
+ return '角色-' + roles;
103
+ } else {
104
+ return false;
105
+ }
106
+ } else if (nodeConfig.setType == 4) {
107
+ return '发起人自选';
108
+ } else if (nodeConfig.setType == 5) {
109
+ return '发起人自己';
110
+ } else if (nodeConfig.setType == 7) {
111
+ return '连续多级主管';
112
+ }
113
+ }
114
+ }
115
+ };
116
+ </script>
117
+
118
+ <style lang="scss" scoped>
119
+ .node-wrap-box {
120
+ border: 3px solid #ccc;
121
+ .title {
122
+ background: #ff943e;
123
+ }
124
+ }
125
+ </style>
@@ -0,0 +1,434 @@
1
+ <template>
2
+ <div class="branch-wrap">
3
+ <div class="branch-box-wrap">
4
+ <div class="branch-box">
5
+ <el-button
6
+ class="add-branch"
7
+ type="success"
8
+ plain
9
+ round
10
+ @click="addTerm">
11
+ 添加条件
12
+ </el-button>
13
+ <div
14
+ class="col-box"
15
+ v-for="(item, index) in nodeConfig.conditionNodes"
16
+ :key="index">
17
+ <div class="condition-node">
18
+ <div class="condition-node-box">
19
+ <div
20
+ class="auto-judge"
21
+ @click="show(index)">
22
+ <div
23
+ class="sort-left"
24
+ v-if="index != 0"
25
+ @click.stop="arrTransfer(index, -1)">
26
+ <el-icon><el-icon-arrow-left /></el-icon>
27
+ </div>
28
+ <div class="title">
29
+ <span class="node-title">{{ item.nodeName }}</span>
30
+ <span class="priority-title">优先级{{ item.priorityLevel }}</span>
31
+ <el-icon
32
+ class="close"
33
+ @click.stop="delTerm(index)">
34
+ <el-icon-close />
35
+ </el-icon>
36
+ </div>
37
+ <div class="content">
38
+ <span v-if="toText(nodeConfig, index)">{{ toText(nodeConfig, index) }}</span>
39
+ <span
40
+ v-else
41
+ class="placeholder">
42
+ 请设置条件
43
+ </span>
44
+ </div>
45
+ <div
46
+ class="sort-right"
47
+ v-if="index != nodeConfig.conditionNodes.length - 1"
48
+ @click.stop="arrTransfer(index)">
49
+ <el-icon><el-icon-arrow-right /></el-icon>
50
+ </div>
51
+ </div>
52
+ <add-node v-model="item.childNode"></add-node>
53
+ </div>
54
+ </div>
55
+ <slot
56
+ v-if="item.childNode"
57
+ :node="item"></slot>
58
+ <div
59
+ class="top-left-cover-line"
60
+ v-if="index == 0"></div>
61
+ <div
62
+ class="bottom-left-cover-line"
63
+ v-if="index == 0"></div>
64
+ <div
65
+ class="top-right-cover-line"
66
+ v-if="index == nodeConfig.conditionNodes.length - 1"></div>
67
+ <div
68
+ class="bottom-right-cover-line"
69
+ v-if="index == nodeConfig.conditionNodes.length - 1"></div>
70
+ </div>
71
+ </div>
72
+ <add-node v-model="nodeConfig.childNode"></add-node>
73
+ </div>
74
+ <el-drawer
75
+ title="条件设置"
76
+ v-model="drawer"
77
+ destroy-on-close
78
+ append-to-body
79
+ :size="600">
80
+ <template #header>
81
+ <div class="node-wrap-drawer__title">
82
+ <label
83
+ @click="editTitle"
84
+ v-if="!isEditTitle">
85
+ {{ form.nodeName }}
86
+ <div @click="rmConditionGroup(conditionGroup)">
87
+ <el-icon class="node-wrap-drawer__title-edit"><el-icon-edit /></el-icon>
88
+ </div>
89
+ </label>
90
+ <el-input
91
+ v-if="isEditTitle"
92
+ ref="nodeTitle"
93
+ v-model="form.nodeName"
94
+ clearable
95
+ @blur="saveTitle"
96
+ @keyup.enter="saveTitle"></el-input>
97
+ </div>
98
+ </template>
99
+ <el-container>
100
+ <el-main style="padding: 0 20px 20px 20px">
101
+ <div class="top-tips">满足以下条件时进入当前分支</div>
102
+ <template v-for="(conditionGroup, conditionGroupIdx) in form.conditionList">
103
+ <div
104
+ class="or-branch-link-tip"
105
+ v-if="conditionGroupIdx != 0">
106
+ 或满足
107
+ </div>
108
+ <div class="condition-group-editor">
109
+ <div class="header">
110
+ <span>条件组 {{ conditionGroupIdx + 1 }}</span>
111
+ <div @click="deleteConditionGroup(conditionGroupIdx)">
112
+ <el-icon class="branch-delete-icon"><el-icon-delete /></el-icon>
113
+ </div>
114
+ </div>
115
+
116
+ <div class="main-content">
117
+ <!-- 单个条件 -->
118
+ <div class="condition-content-box cell-box">
119
+ <div>描述</div>
120
+ <div>条件字段</div>
121
+ <div>运算符</div>
122
+ <div>值</div>
123
+ </div>
124
+ <div
125
+ class="condition-content"
126
+ v-for="(condition, idx) in conditionGroup">
127
+ <div class="condition-relation">
128
+ <span>{{ idx == 0 ? '当' : '且' }}</span>
129
+ <div @click="deleteConditionList(conditionGroup, idx)">
130
+ <el-icon class="branch-delete-icon"><el-icon-delete /></el-icon>
131
+ </div>
132
+ </div>
133
+ <div class="condition-content">
134
+ <div class="condition-content-box">
135
+ <el-input
136
+ v-model="condition.label"
137
+ placeholder="描述" />
138
+ <el-input
139
+ v-model="condition.field"
140
+ placeholder="条件字段" />
141
+ <el-select
142
+ v-model="condition.operator"
143
+ placeholder="Select">
144
+ <el-option
145
+ label="等于"
146
+ value="=="></el-option>
147
+ <el-option
148
+ label="不等于"
149
+ value="!="></el-option>
150
+ <el-option
151
+ label="大于"
152
+ value=">"></el-option>
153
+ <el-option
154
+ label="大于等于"
155
+ value=">="></el-option>
156
+ <el-option
157
+ label="小于"
158
+ value="<"></el-option>
159
+ <el-option
160
+ label="小于等于"
161
+ value="<="></el-option>
162
+ <el-option
163
+ label="包含"
164
+ value="include"></el-option>
165
+ <el-option
166
+ label="不包含"
167
+ value="notinclude"></el-option>
168
+ </el-select>
169
+ <el-input
170
+ v-model="condition.value"
171
+ placeholder="值" />
172
+ </div>
173
+ </div>
174
+ </div>
175
+ </div>
176
+ <div class="sub-content">
177
+ <el-button
178
+ link
179
+ type="primary"
180
+ @click="addConditionList(conditionGroup)"
181
+ icon="el-icon-plus">
182
+ 添加条件
183
+ </el-button>
184
+ </div>
185
+ </div>
186
+ </template>
187
+ <el-button
188
+ style="width: 100%"
189
+ type="info"
190
+ icon="el-icon-plus"
191
+ text
192
+ bg
193
+ @click="addConditionGroup">
194
+ 添加条件组
195
+ </el-button>
196
+ </el-main>
197
+ <el-footer>
198
+ <el-button
199
+ type="primary"
200
+ @click="save">
201
+ 保存
202
+ </el-button>
203
+ <el-button @click="drawer = false">取消</el-button>
204
+ </el-footer>
205
+ </el-container>
206
+ </el-drawer>
207
+ </div>
208
+ </template>
209
+
210
+ <script>
211
+ import addNode from './addNode.vue'
212
+
213
+ export default {
214
+ props: {
215
+ modelValue: { type: Object, default: () => {} }
216
+ },
217
+ components: {
218
+ addNode
219
+ },
220
+ data() {
221
+ return {
222
+ nodeConfig: {},
223
+ drawer: false,
224
+ isEditTitle: false,
225
+ index: 0,
226
+ form: {}
227
+ }
228
+ },
229
+ watch: {
230
+ modelValue() {
231
+ this.nodeConfig = this.modelValue
232
+ }
233
+ },
234
+ mounted() {
235
+ this.nodeConfig = this.modelValue
236
+ },
237
+ methods: {
238
+ show(index) {
239
+ this.index = index
240
+ this.form = {}
241
+ this.form = JSON.parse(JSON.stringify(this.nodeConfig.conditionNodes[index]))
242
+ this.drawer = true
243
+ },
244
+ editTitle() {
245
+ this.isEditTitle = true
246
+ this.$nextTick(() => {
247
+ this.$refs.nodeTitle.focus()
248
+ })
249
+ },
250
+ saveTitle() {
251
+ this.isEditTitle = false
252
+ },
253
+ save() {
254
+ this.nodeConfig.conditionNodes[this.index] = this.form
255
+ this.$emit('update:modelValue', this.nodeConfig)
256
+ this.drawer = false
257
+ },
258
+ addTerm() {
259
+ let len = this.nodeConfig.conditionNodes.length + 1
260
+ this.nodeConfig.conditionNodes.push({
261
+ nodeName: '条件' + len,
262
+ type: 3,
263
+ priorityLevel: len,
264
+ conditionMode: 1,
265
+ conditionList: []
266
+ })
267
+ },
268
+ delTerm(index) {
269
+ this.nodeConfig.conditionNodes.splice(index, 1)
270
+ if (this.nodeConfig.conditionNodes.length == 1) {
271
+ if (this.nodeConfig.childNode) {
272
+ if (this.nodeConfig.conditionNodes[0].childNode) {
273
+ this.reData(this.nodeConfig.conditionNodes[0].childNode, this.nodeConfig.childNode)
274
+ } else {
275
+ this.nodeConfig.conditionNodes[0].childNode = this.nodeConfig.childNode
276
+ }
277
+ }
278
+ this.$emit('update:modelValue', this.nodeConfig.conditionNodes[0].childNode)
279
+ }
280
+ },
281
+ reData(data, addData) {
282
+ if (!data.childNode) {
283
+ data.childNode = addData
284
+ } else {
285
+ this.reData(data.childNode, addData)
286
+ }
287
+ },
288
+ arrTransfer(index, type = 1) {
289
+ this.nodeConfig.conditionNodes[index] = this.nodeConfig.conditionNodes.splice(index + type, 1, this.nodeConfig.conditionNodes[index])[0]
290
+ this.nodeConfig.conditionNodes.map((item, index) => {
291
+ item.priorityLevel = index + 1
292
+ })
293
+ this.$emit('update:modelValue', this.nodeConfig)
294
+ },
295
+ addConditionList(conditionList) {
296
+ conditionList.push({
297
+ label: '',
298
+ field: '',
299
+ operator: '=',
300
+ value: ''
301
+ })
302
+ },
303
+ deleteConditionList(conditionList, index) {
304
+ conditionList.splice(index, 1)
305
+ },
306
+ addConditionGroup() {
307
+ this.addConditionList(this.form.conditionList[this.form.conditionList.push([]) - 1])
308
+ },
309
+ deleteConditionGroup(index) {
310
+ this.form.conditionList.splice(index, 1)
311
+ },
312
+ toText(nodeConfig, index) {
313
+ var { conditionList } = nodeConfig.conditionNodes[index]
314
+ if (conditionList && conditionList.length == 1) {
315
+ const text = conditionList.map((conditionGroup) => conditionGroup.map((item) => `${item.label}${item.operator}${item.value}`)).join(' 和 ')
316
+ return text
317
+ } else if (conditionList && conditionList.length > 1) {
318
+ return conditionList.length + '个条件,或满足'
319
+ } else {
320
+ if (index == nodeConfig.conditionNodes.length - 1) {
321
+ return '其他条件进入此流程'
322
+ } else {
323
+ return false
324
+ }
325
+ }
326
+ }
327
+ }
328
+ }
329
+ </script>
330
+
331
+ <style scoped lang="scss">
332
+ .top-tips {
333
+ display: flex;
334
+ justify-content: space-between;
335
+ align-items: center;
336
+ margin-bottom: 12px;
337
+ color: #646a73;
338
+ }
339
+
340
+ .or-branch-link-tip {
341
+ margin: 10px 0;
342
+ color: #646a73;
343
+ }
344
+
345
+ .condition-group-editor {
346
+ user-select: none;
347
+ border-radius: 4px;
348
+ border: 1px solid #e4e5e7;
349
+ position: relative;
350
+ margin-bottom: 16px;
351
+
352
+ .branch-delete-icon {
353
+ font-size: 18px;
354
+ }
355
+
356
+ .header {
357
+ background-color: #f4f6f8;
358
+ padding: 0 12px;
359
+ font-size: 14px;
360
+ color: #171e31;
361
+ height: 36px;
362
+ display: flex;
363
+ align-items: center;
364
+
365
+ span {
366
+ flex: 1;
367
+ }
368
+ }
369
+
370
+ .main-content {
371
+ padding: 0 12px;
372
+
373
+ .condition-relation {
374
+ color: #9ca2a9;
375
+ display: flex;
376
+ align-items: center;
377
+ height: 36px;
378
+ display: flex;
379
+ justify-content: space-between;
380
+ padding: 0 2px;
381
+ }
382
+
383
+ .condition-content-box {
384
+ display: flex;
385
+ justify-content: space-between;
386
+ align-items: center;
387
+
388
+ div {
389
+ width: 100%;
390
+ min-width: 120px;
391
+ }
392
+
393
+ div:not(:first-child) {
394
+ margin-left: 16px;
395
+ }
396
+ }
397
+
398
+ .cell-box {
399
+ div {
400
+ padding: 16px 0;
401
+ width: 100%;
402
+ min-width: 120px;
403
+ color: #909399;
404
+ font-size: 14px;
405
+ font-weight: 600;
406
+ text-align: center;
407
+ }
408
+ }
409
+
410
+ .condition-content {
411
+ display: flex;
412
+ flex-direction: column;
413
+
414
+ :deep(.el-input__wrapper) {
415
+ border-top-left-radius: 0;
416
+ border-bottom-left-radius: 0;
417
+ }
418
+
419
+ .content {
420
+ flex: 1;
421
+ padding: 0 0 4px 0;
422
+ display: flex;
423
+ align-items: center;
424
+ min-height: 31.6px;
425
+ flex-wrap: wrap;
426
+ }
427
+ }
428
+ }
429
+
430
+ .sub-content {
431
+ padding: 12px;
432
+ }
433
+ }
434
+ </style>
@@ -0,0 +1,80 @@
1
+ <template>
2
+ <div class="node-wrap">
3
+ <div class="node-wrap-box start-node" @click="show">
4
+ <div class="title" style="background: #576a95">
5
+ <el-icon class="icon"><UserFilled /></el-icon>
6
+ <span>{{ nodeConfig.nodeName }}</span>
7
+ </div>
8
+ <div class="content">
9
+ <span>{{ toText(nodeConfig) }}</span>
10
+ </div>
11
+ </div>
12
+ <add-node v-model="nodeConfig.childNode"></add-node>
13
+ </div>
14
+ </template>
15
+
16
+ <script>
17
+ import addNode from './addNode.vue';
18
+
19
+ export default {
20
+ inject: ['select'],
21
+ props: {
22
+ modelValue: { type: Object, default: () => {} }
23
+ },
24
+ components: {
25
+ addNode
26
+ },
27
+ data() {
28
+ return {
29
+ nodeConfig: {},
30
+ drawer: false,
31
+ isEditTitle: false,
32
+ form: {}
33
+ };
34
+ },
35
+ watch: {
36
+ modelValue() {
37
+ this.nodeConfig = this.modelValue;
38
+ }
39
+ },
40
+ mounted() {
41
+ this.nodeConfig = this.modelValue;
42
+ },
43
+ methods: {
44
+ show() {
45
+ this.form = {};
46
+ this.form = JSON.parse(JSON.stringify(this.nodeConfig));
47
+ this.isEditTitle = false;
48
+ this.drawer = true;
49
+ },
50
+ editTitle() {
51
+ this.isEditTitle = true;
52
+ this.$nextTick(() => {
53
+ this.$refs.nodeTitle.focus();
54
+ });
55
+ },
56
+ saveTitle() {
57
+ this.isEditTitle = false;
58
+ },
59
+ selectHandle(type, data) {
60
+ this.select(type, data);
61
+ },
62
+ delRole(index) {
63
+ this.form.nodeAssigneeList.splice(index, 1);
64
+ },
65
+ save() {
66
+ this.$emit('update:modelValue', this.form);
67
+ this.drawer = false;
68
+ },
69
+ toText(nodeConfig) {
70
+ if (nodeConfig.nodeAssigneeList && nodeConfig.nodeAssigneeList.length > 0) {
71
+ return nodeConfig.nodeAssigneeList.map((item) => item.name).join('、');
72
+ } else {
73
+ return '所有人';
74
+ }
75
+ }
76
+ }
77
+ };
78
+ </script>
79
+
80
+ <style lang="scss" scoped></style>