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,95 @@
1
+ <template>
2
+ <div class="node-wrap">
3
+ <div class="node-wrap-box" @click="show" :class="[getStatus]">
4
+ <div class="title" style="background: #3296fa">
5
+ <el-icon class="icon"><Promotion /></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: { 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
+ computed: {
44
+ getStatus() {
45
+ if (!this.nodeConfig?.nodeAssigneeList?.length) {
46
+ return '';
47
+ }
48
+ return this.nodeConfig?.nodeAssigneeList[0]?.extendConfig?.type;
49
+ }
50
+ },
51
+ methods: {
52
+ show() {
53
+ this.form = {};
54
+ this.form = JSON.parse(JSON.stringify(this.nodeConfig));
55
+ this.drawer = true;
56
+ },
57
+ editTitle() {
58
+ this.isEditTitle = true;
59
+ this.$nextTick(() => {
60
+ this.$refs.nodeTitle.focus();
61
+ });
62
+ },
63
+ saveTitle() {
64
+ this.isEditTitle = false;
65
+ },
66
+ save() {
67
+ this.$emit('update:modelValue', this.form);
68
+ this.drawer = false;
69
+ },
70
+ delNode() {
71
+ this.$emit('update:modelValue', this.nodeConfig.childNode);
72
+ },
73
+ delUser(index) {
74
+ this.form.nodeAssigneeList.splice(index, 1);
75
+ },
76
+ selectHandle(type, data) {
77
+ this.select(type, data);
78
+ },
79
+ toText(nodeConfig) {
80
+ if (nodeConfig.nodeAssigneeList && nodeConfig.nodeAssigneeList.length > 0) {
81
+ const users = nodeConfig.nodeAssigneeList.map((item) => item.name).join('、');
82
+ return users;
83
+ } else {
84
+ if (nodeConfig.userSelectFlag) {
85
+ return '发起人自选';
86
+ } else {
87
+ return false;
88
+ }
89
+ }
90
+ }
91
+ }
92
+ };
93
+ </script>
94
+
95
+ <style></style>
@@ -0,0 +1,182 @@
1
+ <template>
2
+ <ele-modal
3
+ :width="600"
4
+ :model-value="modelValue"
5
+ @update:modelValue="updateModelValue"
6
+ :title="titleMap[type]?.title"
7
+ :close-on-click-modal="false"
8
+ @open="open"
9
+ @close="close"
10
+ >
11
+ <ele-text>{{ titleMap[type]?.subTitle }}:</ele-text>
12
+ <sohelp-textarea-input :rows="3" v-model="approveForm.reason" :placeholder="请输入"></sohelp-textarea-input>
13
+ <ele-text style="margin-top: 10px" v-if="type!=='submit'">
14
+ 推荐回复:
15
+ <span style="display: flex; gap: 5px 0; flex-wrap: wrap">
16
+ <el-tag
17
+ style="cursor: pointer"
18
+ v-for="item in quickText"
19
+ size="small"
20
+ :key="item"
21
+ @click="approveForm.reason = item"
22
+ >{{ item }}</el-tag
23
+ >
24
+ </span>
25
+ </ele-text>
26
+ <el-upload
27
+ class="pt-10"
28
+ ref="uploadRef"
29
+ name="files"
30
+ multiple
31
+ :auto-upload="false"
32
+ :on-change="uploadChange"
33
+ :on-remove="removeFile"
34
+ >
35
+ <ele-text>上传附件:</ele-text>
36
+ <el-button type="primary" :icon="Plus" plain size="small" class="ml-10"></el-button>
37
+ </el-upload>
38
+ <template #footer>
39
+ <el-button @click="close">取消</el-button>
40
+ <el-button type="primary" @click="save()" v-loading="loading">{{ titleMap[type]?.confirmText }}</el-button>
41
+ </template>
42
+ </ele-modal>
43
+ </template>
44
+
45
+ <script setup>
46
+ import { todoOperate } from '../js/index.js';
47
+ import { EleMessage } from '@/components/ele-admin-plus/components';
48
+ import { Plus } from '@element-plus/icons-vue';
49
+ import { ref } from 'vue';
50
+ import { useFormData } from '@/utils/use-form-data';
51
+
52
+ const props = defineProps({
53
+ modelValue: Boolean,
54
+ type: String,
55
+ title: String,
56
+ subTitle: String,
57
+ confirmText: {
58
+ type: String,
59
+ default: '保存'
60
+ },
61
+ data: Object
62
+ });
63
+
64
+ const emit = defineEmits(['update:modelValue', 'confirm']);
65
+
66
+ const loading = ref(false);
67
+ const [approveForm, resetFields, assignFields] = useFormData({
68
+ reason: '',
69
+ files: [],
70
+ id: '',
71
+ refid: ''
72
+ });
73
+ const quickText = [
74
+ '同意',
75
+ '已阅',
76
+ '收到',
77
+ '已核对',
78
+ '合格',
79
+ '情况属实',
80
+ '确认',
81
+ '已复核',
82
+ '知悉',
83
+ '辛苦了',
84
+ '已安排'
85
+ ];
86
+
87
+ const titleMap = {
88
+ agree: {
89
+ title: '同意',
90
+ subTitle: '建议',
91
+ confirmText: '同意'
92
+ },
93
+ reject: {
94
+ title: '拒绝',
95
+ subTitle: '建议',
96
+ confirmText: '拒绝'
97
+ },
98
+ submit: {
99
+ title: '提交申请',
100
+ subTitle: '申请理由',
101
+ confirmText: '提交'
102
+ },
103
+ batchAgree: {
104
+ title: '批量同意',
105
+ subTitle: '建议',
106
+ confirmText: '同意'
107
+ },
108
+ batchReject: {
109
+ title: '批量拒绝',
110
+ subTitle: '建议',
111
+ confirmText: '同意'
112
+ }
113
+ };
114
+
115
+ /**
116
+ * 保存
117
+ */
118
+ const save = () => {
119
+ if (!props.data?.refid && !props.data.id) {
120
+ EleMessage.error('缺少参数refid,id');
121
+ return;
122
+ }
123
+ loading.value = true;
124
+ const formData = new FormData();
125
+ formData.append('reason', approveForm.reason || '');
126
+ formData.append('refid', props.data.refid);
127
+ formData.append('id', props.data.id);
128
+ approveForm.files?.forEach((item) => {
129
+ formData.append('files', item);
130
+ });
131
+
132
+
133
+ todoOperate(props.type, formData)
134
+ .then((msg) => {
135
+ loading.value = false;
136
+ EleMessage.success(msg);
137
+ emit('confirm');
138
+ close();
139
+ })
140
+ .catch((e) => {
141
+ loading.value = false;
142
+ EleMessage.error(e.message);
143
+ });
144
+ };
145
+
146
+ /**
147
+ * 上传文件
148
+ * @param file
149
+ * @param list
150
+ */
151
+ const uploadChange = (file, list) => {
152
+ approveForm.files = [...list.map((item) => item.raw)];
153
+ };
154
+
155
+ /**
156
+ * 删除文件
157
+ */
158
+ const removeFile = (file) => {
159
+ approveForm.files = approveForm.files.filter((item) => item.uid != file.uid);
160
+ };
161
+
162
+ /** 更新modelValue */
163
+ const updateModelValue = (value) => {
164
+ emit('update:modelValue', value);
165
+ };
166
+
167
+ /**
168
+ * 打开弹窗
169
+ */
170
+ const open = () => {
171
+ assignFields(props.data);
172
+ };
173
+
174
+ /**
175
+ * 关闭弹窗
176
+ */
177
+ const close = () => {
178
+ resetFields();
179
+ updateModelValue(false);
180
+ };
181
+ </script>
182
+ <style lang="scss" scoped></style>
@@ -0,0 +1,141 @@
1
+ <template>
2
+ <div
3
+ class="draw-box"
4
+ ref="container"
5
+ @mousemove="handleMove"
6
+ @mouseup="isDragging = false"
7
+ @wheel.prevent="handleZoom"
8
+ @mouseleave="resetCursor"
9
+ >
10
+ <div class="content" @mousedown="startDrag" :style="transformStyle">
11
+ <slot />
12
+ </div>
13
+ <!-- 缩放控件 -->
14
+ <el-slider
15
+ class="slider"
16
+ v-model="scale"
17
+ :min="0.5"
18
+ :max="2"
19
+ :step="0.1"
20
+ :vertical="true"
21
+ :format-tooltip="formatTooltip"
22
+ @change="handleSliderChange"
23
+ />
24
+ </div>
25
+ </template>
26
+
27
+ <script setup>
28
+ import { ref, computed, onUnmounted, onMounted } from 'vue';
29
+
30
+ const container = ref();
31
+ const position = ref({ x: 0, y: 0 });
32
+ const scale = ref(1);
33
+ const isDragging = ref(false);
34
+ const startPos = ref({ x: 0, y: 0 });
35
+ const rafId = ref(null);
36
+
37
+ onMounted(() => {
38
+ scale.value = 1;
39
+ });
40
+
41
+ const transformStyle = computed(() => ({
42
+ transform: `translate(${position.value.x}px, ${position.value.y}px) scale(${scale.value})`,
43
+ cursor: isDragging.value ? 'grabbing' : 'grab'
44
+ }));
45
+
46
+ function startDrag(e) {
47
+ isDragging.value = true;
48
+ startPos.value = { x: e.clientX - position.value.x, y: e.clientY - position.value.y };
49
+ cancelAnimationFrame(rafId.value);
50
+ container.value.style.cursor = 'grabbing';
51
+ }
52
+
53
+ function handleMove(e) {
54
+ if (!isDragging.value) return;
55
+ rafId.value = requestAnimationFrame(() => {
56
+ position.value = { x: e.clientX - startPos.value.x, y: e.clientY - startPos.value.y };
57
+ });
58
+ }
59
+
60
+ function resetCursor() {
61
+ isDragging.value = false;
62
+ container.value.style.cursor = 'auto';
63
+ }
64
+
65
+ function handleZoom(e) {
66
+ cancelAnimationFrame(rafId.value);
67
+ const rect = container.value.getBoundingClientRect();
68
+ const mouseX = e.clientX - rect.left;
69
+ const mouseY = e.clientY - rect.top;
70
+
71
+ const delta = e.deltaY > 0 ? -0.1 : 0.1;
72
+ const newScale = Math.max(0.5, Math.min(2, scale.value + delta));
73
+
74
+ position.value = {
75
+ x: mouseX - (mouseX - position.value.x) * (newScale / scale.value),
76
+ y: mouseY - (mouseY - position.value.y) * (newScale / scale.value)
77
+ };
78
+ scale.value = newScale;
79
+ container.value.style.cursor = delta > 0 ? 'zoom-in' : 'zoom-out';
80
+ setTimeout(resetCursor, 300);
81
+ }
82
+
83
+ function handleSliderChange(val) {
84
+ const rect = container.value.getBoundingClientRect();
85
+ const centerX = rect.width / 2;
86
+ const centerY = rect.height / 2;
87
+
88
+ position.value = {
89
+ x: centerX - (centerX - position.value.x) * (val / scale.value),
90
+ y: centerY - (centerY - position.value.y) * (val / scale.value)
91
+ };
92
+ }
93
+
94
+ function formatTooltip(val) {
95
+ return `${(val * 100).toFixed(0)}%`;
96
+ }
97
+
98
+ onUnmounted(() => {
99
+ cancelAnimationFrame(rafId.value);
100
+ });
101
+ </script>
102
+
103
+ <style scoped lang="scss">
104
+ .draw-box {
105
+ width: 100%;
106
+ height: calc(100% - 0px);
107
+ overflow: hidden;
108
+ position: relative;
109
+ background-color: #fefefe;
110
+ background-image: linear-gradient(rgba(0, 0, 0, 0.06) 1px, transparent 1px),
111
+ linear-gradient(90deg, rgba(0, 0, 0, 0.06) 1px, transparent 1px);
112
+ background-size: 10px 10px;
113
+ box-sizing: border-box;
114
+ border: 1px solid #ddd;
115
+ }
116
+
117
+ .content {
118
+ transform-origin: 0 0;
119
+ display: inline-block;
120
+ will-change: transform;
121
+ }
122
+
123
+ .slider.el-slider.is-vertical {
124
+ position: absolute;
125
+ z-index: 999;
126
+ height: 160px;
127
+ right: 10px;
128
+ bottom: 10px;
129
+ transform: scale(0.6);
130
+ }
131
+
132
+ .scale-text {
133
+ font-size: 14px;
134
+ color: #666;
135
+ font-weight: bold;
136
+ }
137
+
138
+ ::-webkit-scrollbar {
139
+ display: none;
140
+ }
141
+ </style>
@@ -0,0 +1,79 @@
1
+ <template>
2
+ <div v-loading="loading" class="todo-form">
3
+ <sohelp-entity-form
4
+ ref="entityFormRef"
5
+ v-model="formValue"
6
+ :data="data"
7
+ :refid="refid"
8
+ :readonly="true"
9
+ :disabled="true"
10
+ ></sohelp-entity-form>
11
+ </div>
12
+ </template>
13
+
14
+ <script setup>
15
+ import { ref, watch } from 'vue';
16
+ import { ElMessage } from 'element-plus';
17
+ import { getTodoDetail } from '@/api/todo/index.js';
18
+ import { moduleCache } from '@/components/sohelp-eleplus/cache/ModuleCache.js';
19
+ import SohelpEntityForm from '@/components/sohelp-eleplus/sohelp-entity-form/index.vue';
20
+
21
+ const props = defineProps({
22
+ data: Object
23
+ });
24
+
25
+ const loading = ref(false);
26
+ const data = ref({});
27
+ const formValue = ref(null);
28
+ const entityFormRef = ref(null);
29
+
30
+ const refid = ref(props.data.refid.split('!')[0]);
31
+
32
+ const load = async () => {
33
+ const { id, refid } = props.data || {};
34
+ if (id && refid) {
35
+ await getDetail({ refid, id });
36
+ } else {
37
+ ElMessage.error('缺少id或refid参数');
38
+ }
39
+ };
40
+
41
+ const getDetail = async (params) => {
42
+ loading.value = true;
43
+ try {
44
+ const res = await getTodoDetail(params);
45
+ loading.value = false;
46
+ if (res) {
47
+ setTimeout(() => {
48
+ if (entityFormRef.value) {
49
+ entityFormRef.value.setFormData(res);
50
+ }
51
+ }, 100);
52
+ } else {
53
+ ElMessage.error('获取详情失败');
54
+ }
55
+ } catch (error) {
56
+ ElMessage.error('获取详情失败');
57
+ loading.value = false;
58
+ }
59
+ };
60
+
61
+ watch(
62
+ () => props.data,
63
+ (val) => {
64
+ if (val) {
65
+ load();
66
+ }
67
+ },
68
+ {
69
+ immediate: true
70
+ }
71
+ );
72
+ </script>
73
+ <style lang="scss" scoped>
74
+ .todo-form {
75
+ height: 100%;
76
+ padding-top: 20px;
77
+ box-sizing: border-box;
78
+ }
79
+ </style>
@@ -0,0 +1,153 @@
1
+ <template>
2
+ fff
3
+ <sohelp-vxe-grid
4
+ style="padding-top: 10px"
5
+ url="/engine/web/workflow/getTasks"
6
+ :gridOptions="gridOptions"
7
+ ref="tableRef"
8
+ :autoLoad="autoLoad"
9
+ @toolbarButtonClick="onToolbarButtonClick"
10
+ >
11
+ <template #type="{ row }">
12
+ <vxe-tag status="success" v-if="row.type === 'done'">办理完成</vxe-tag>
13
+ <vxe-tag status="danger" v-else-if="row.type === 'undo'">等待办理</vxe-tag>
14
+ <vxe-tag status="primary" v-else-if="row.type === 'todo'">正在办理</vxe-tag>
15
+ </template>
16
+
17
+ <template #actorList="{ row }">
18
+ <div style="display: flex; gap: 5px; flex-wrap: wrap">
19
+ <span v-for="item in row?.actorList" :key="item.actor_id">
20
+ <vxe-tag status="primary">{{ item.actor_name }}</vxe-tag>
21
+ </span>
22
+ </div>
23
+ </template>
24
+
25
+ <template #reason="{ row }">
26
+ <ele-text>{{ getVariable(row)?.reason }}</ele-text>
27
+ </template>
28
+ </sohelp-vxe-grid>
29
+ </template>
30
+
31
+ <script setup>
32
+ import { ElMessage } from 'element-plus';
33
+ import { reactive, ref, watch } from 'vue';
34
+
35
+ const props = defineProps({
36
+ data: Object
37
+ });
38
+
39
+ const tableRef = ref(null);
40
+ const autoLoad = ref(false);
41
+
42
+ const gridOptions = reactive({
43
+ params: {
44
+ refid: '',
45
+ id: ''
46
+ },
47
+ rowConfig: {
48
+ sHover: true,
49
+ isCurrent: true
50
+ },
51
+ keyboardConfig: {
52
+ isEdit: true,
53
+ isArrow: true,
54
+ isEnter: true,
55
+ isTab: true,
56
+ isDel: true,
57
+ isBack: true
58
+ },
59
+
60
+ border: true,
61
+ stripe: true,
62
+ loading: false,
63
+ minHeight: 200,
64
+ maxHeight: '100%',
65
+ size: 'mini',
66
+ columnConfig: {
67
+ resizable: true
68
+ },
69
+ formConfig: {
70
+ data: {},
71
+ items: []
72
+ },
73
+ toolbarConfig: {
74
+ custom: true, //是否开启自定义列工具栏
75
+ buttons: []
76
+ },
77
+ pageConfig: {
78
+ enabled: false
79
+ },
80
+ columns: [
81
+ {
82
+ type: 'seq',
83
+ title: '#',
84
+ fixe: 'left',
85
+ align: 'center',
86
+ width: 40
87
+ },
88
+ {
89
+ field: 'nodeName',
90
+ title: '任务名称',
91
+ width: 120
92
+ },
93
+ {
94
+ title: '办理人',
95
+ field: 'actorList',
96
+ width: 200,
97
+ slots: {
98
+ default: 'actorList'
99
+ }
100
+ },
101
+ {
102
+ title: '办理时间',
103
+ field: 'create_time',
104
+ width: 120
105
+ },
106
+ {
107
+ title: '办理状态',
108
+ align: 'center',
109
+ field: 'type',
110
+ width: 80,
111
+ slots: {
112
+ default: 'type'
113
+ }
114
+ },
115
+ {
116
+ title: '办理意见',
117
+ field: 'reason',
118
+ minWidth: 130,
119
+ slots: {
120
+ default: 'reason'
121
+ }
122
+ },
123
+ {
124
+ title: '附件',
125
+ field: 'file'
126
+ }
127
+ ],
128
+ data: []
129
+ });
130
+
131
+ const getVariable = (item) => {
132
+ return JSON.parse(item.variable || '{}');
133
+ };
134
+
135
+ watch(
136
+ () => props.data,
137
+ (val) => {
138
+ if (val) {
139
+ gridOptions.params = {
140
+ refid: val.refid,
141
+ id: val.id
142
+ };
143
+ autoLoad.value = true;
144
+ } else {
145
+ ElMessage.error('缺少variable参数');
146
+ }
147
+ },
148
+ {
149
+ immediate: true
150
+ }
151
+ );
152
+ </script>
153
+ <style lang="scss" scoped></style>