ui-process-h5 2.0.7-beta → 2.1.0-beta

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 (91) hide show
  1. package/README.md +11 -204
  2. package/build/configure/README.md +211 -0
  3. package/build/configure/package.json +32 -0
  4. package/debug.js +9 -0
  5. package/index.html +12 -0
  6. package/package.json +56 -25
  7. package/src/App.vue +233 -0
  8. package/src/assets/font-icon/iconfont.scss +57 -0
  9. package/src/assets/font-icon/iconfont.ttf +0 -0
  10. package/src/assets/img/add-file.png +0 -0
  11. package/src/assets/img/arrow-right.png +0 -0
  12. package/src/assets/img/arrow.png +0 -0
  13. package/src/assets/img/check.png +0 -0
  14. package/src/assets/img/del.png +0 -0
  15. package/src/assets/img/doc.png +0 -0
  16. package/src/assets/img/file.png +0 -0
  17. package/src/assets/img/image.png +0 -0
  18. package/src/assets/img/pdf.png +0 -0
  19. package/src/assets/img/process.png +0 -0
  20. package/src/assets/img/xls.png +0 -0
  21. package/src/assets/img/zip.png +0 -0
  22. package/src/assets/js/auth.js +65 -0
  23. package/src/assets/js/errorCode.js +6 -0
  24. package/src/assets/js/message.js +352 -0
  25. package/src/assets/js/request.js +99 -0
  26. package/src/assets/js/toast.js +239 -0
  27. package/src/assets/js/top.js +229 -0
  28. package/src/assets/js/utils.js +83 -0
  29. package/src/assets/js/vuePopper.js +123 -0
  30. package/src/assets/query.png +0 -0
  31. package/src/assets/status/check.png +0 -0
  32. package/src/assets/status/del.png +0 -0
  33. package/src/assets/status/error.png +0 -0
  34. package/src/assets/status/loading.png +0 -0
  35. package/src/assets/status/success.png +0 -0
  36. package/src/main.js +17 -0
  37. package/src/packages/attchUpload/index.js +375 -0
  38. package/src/packages/attchUpload/index.scss +143 -0
  39. package/src/packages/attchUpload/index.vue +173 -0
  40. package/src/packages/downSelect/index.js +119 -0
  41. package/src/packages/downSelect/index.scss +88 -0
  42. package/src/packages/downSelect/index.vue +62 -0
  43. package/src/packages/index.js +6 -0
  44. package/src/packages/popup/index.js +125 -0
  45. package/src/packages/popup/index.scss +178 -0
  46. package/src/packages/popup/index.vue +80 -0
  47. package/src/packages/preview/index.js +40 -0
  48. package/src/packages/preview/index.vue +15 -0
  49. package/src/packages/previewImage/index.js +286 -0
  50. package/src/packages/previewImage/index.scss +76 -0
  51. package/src/packages/previewImage/index.vue +53 -0
  52. package/src/packages/process/index.js +1016 -0
  53. package/src/packages/process/index.scss +188 -0
  54. package/src/packages/process/index.vue +291 -0
  55. package/src/packages/process/operation/backNode.vue +396 -0
  56. package/src/packages/process/operation/cancel.vue +425 -0
  57. package/src/packages/process/operation/ccTask.vue +256 -0
  58. package/src/packages/process/operation/complete.vue +1384 -0
  59. package/src/packages/process/operation/counterSign.vue +498 -0
  60. package/src/packages/process/operation/delegateTask.vue +493 -0
  61. package/src/packages/process/operation/index.js +8 -0
  62. package/src/packages/process/operation/index.scss +212 -0
  63. package/src/packages/process/operation/msgList.vue +174 -0
  64. package/src/packages/process/operation/treeNode.vue +901 -0
  65. package/src/packages/process/operation/treePerson.vue +304 -0
  66. package/src/packages/submitPopup/index.js +708 -0
  67. package/src/packages/submitPopup/index.scss +190 -0
  68. package/src/packages/submitPopup/index.vue +125 -0
  69. package/src/packages/tab/index.js +236 -0
  70. package/src/packages/tab/index.scss +177 -0
  71. package/src/packages/tab/index.vue +155 -0
  72. package/src/packages/tip/index.js +80 -0
  73. package/src/packages/tip/index.scss +121 -0
  74. package/src/packages/tip/index.vue +57 -0
  75. package/src/packages/viewAttchList/index.js +138 -0
  76. package/src/packages/viewAttchList/index.scss +76 -0
  77. package/src/packages/viewAttchList/index.vue +121 -0
  78. package/src/style.css +80 -0
  79. package/vite.config.ts +118 -0
  80. package/v2/style.css +0 -1
  81. package/v2/ui-process-h5.js +0 -9945
  82. package/v2/ui-process-h5.umd.cjs +0 -18
  83. package/v2.7/style.css +0 -1
  84. package/v2.7/ui-process-h5.js +0 -9322
  85. package/v2.7/ui-process-h5.umd.cjs +0 -18
  86. package/v3/style.css +0 -1
  87. package/v3/ui-process-h5.js +0 -6842
  88. package/v3/ui-process-h5.umd.cjs +0 -6
  89. /package/{scripts → build/scripts}/postinstall.mjs +0 -0
  90. /package/{scripts → build/scripts}/switch-cli.mjs +0 -0
  91. /package/{scripts → build/scripts}/utils.mjs +0 -0
@@ -0,0 +1,396 @@
1
+ <template>
2
+ <div class="process-popup-content">
3
+ <div class="process-popup-content-msg">
4
+ <div
5
+ class="process-pc-label"
6
+ style="
7
+ background-color: #fff;
8
+ position: relative;
9
+ z-index: 199;
10
+ display: inline-block;
11
+ width: 50%;
12
+ "
13
+ >
14
+ 退回节点: <span class="process-pc-label--re">*</span>
15
+ </div>
16
+ <div
17
+ class="process-pc-value"
18
+ style="display: inline-block; width: 50%;"
19
+ >
20
+ <TopDownSelect
21
+ :option="option"
22
+ @change="handleChange"
23
+ optionStyle="width:calc(100% - 40px);left:20px;"
24
+ :maskShow="false"
25
+ border
26
+ ></TopDownSelect>
27
+ </div>
28
+
29
+ <div v-if="param.isMsg">
30
+ <div
31
+ class="process-radio-item"
32
+ @click="handleOpenMsg()"
33
+ style="color: #1389ff; font-size: 14px;"
34
+ >
35
+ 常用意见
36
+ </div>
37
+ </div>
38
+ <div class="process-pc-label">
39
+ 退回理由: <span class="process-pc-label--re">*</span>
40
+ </div>
41
+ <div class="process-pc-value">
42
+ <div class="process-popup-textarea">
43
+ <textarea
44
+ v-model="commentMsg"
45
+ class="textarea-item"
46
+ name="description"
47
+ cols="40"
48
+ placeholder="请输入审批意见(200字以内)"
49
+ maxlength="200"
50
+ onkeyup="this.value=this.value.replace(/[\uD800-\uDFFF]/g,'')"
51
+ ></textarea>
52
+ <div class="process-popup-textarea-num">
53
+ {{ commentMsg.length }}/200
54
+ </div>
55
+ </div>
56
+ <div class="msg-btn" v-if="param.isMsg">
57
+ <span class="msg-btn-click" @click="handleMakeMsg()"
58
+ >设置为常用意见</span
59
+ >
60
+ </div>
61
+ </div>
62
+ </div>
63
+ <TopTips
64
+ ref="topTips"
65
+ :text="textTips"
66
+ :statusTips="statusTips"
67
+ :type="typeTips"
68
+ />
69
+ <TopPopup
70
+ v-bind:visible="visibleListMsg"
71
+ v-on:update:visible="(val) => (visibleListMsg = val)"
72
+ ref="TopPopup"
73
+ titleText="常用意见"
74
+ :isDrawer="true"
75
+ >
76
+ <MsgList
77
+ :visible="visibleListMsg"
78
+ :request="param.request"
79
+ :useInfo="param.userInfo"
80
+ @handleTips="handleTips"
81
+ @handleMsg="handleMsg"
82
+ ></MsgList>
83
+ </TopPopup>
84
+
85
+ <TopPopup
86
+ titleText="操作消息提示"
87
+ :isTips="true"
88
+ :context="`将${commentMsg}设置为常用意见`"
89
+ :cancel="handleTipsCancel"
90
+ :comfig="handleTipsComfig"
91
+ v-bind:visible="visibleMsgComfig"
92
+ v-on:update:visible="(val) => (visibleMsgComfig = val)"
93
+ >
94
+ </TopPopup>
95
+
96
+ <attchViews
97
+ v-if="labels == '退回'"
98
+ :limit="limit ? limit : -1"
99
+ :requires="requires"
100
+ :request="param.request"
101
+ :linkUrl="param.linkUrl"
102
+ @getValue="getValues"
103
+ />
104
+ </div>
105
+ </template>
106
+ <script>
107
+ import TopTips from "../../tip/index.vue";
108
+ import attchViews from "../../attchUpload/index.vue";
109
+ import TopPopup from "../../popup/index.vue";
110
+ import TopDownSelect from "../../downSelect/index.vue";
111
+ import { departPerson } from "checked-pick-app";
112
+ import MsgList from "./msgList.vue";
113
+ export default {
114
+ name: "backNode",
115
+ props: {
116
+ param: {
117
+ type: Object,
118
+ defalut: () => {},
119
+ },
120
+ },
121
+ components: {
122
+ TopTips,
123
+ attchViews,
124
+ TopPopup,
125
+ departPerson,
126
+ TopDownSelect,
127
+ MsgList,
128
+ },
129
+ data() {
130
+ return {
131
+ commentMsg: "",
132
+ style: {
133
+ color: "#333",
134
+ disableColor: "#F7F6F6",
135
+ },
136
+ textTips: "",
137
+ statusTips: false,
138
+ typeTips: "success",
139
+ // annex 附件属性
140
+ limit: "",
141
+ requires: "",
142
+ labels: "",
143
+ otherList: "",
144
+ attchLists: [],
145
+ // next
146
+ nextNodeData: [],
147
+ taskNode: [],
148
+
149
+ outGatewayUserTaskModel: [],
150
+ formData: {},
151
+
152
+ // 选人组件
153
+ visible: false,
154
+ entity: {
155
+ source: "0",
156
+ type: this.param.isCheckType || "0",
157
+ orgType: this.param.isOrgType || [0],
158
+ request: this.param.request, //'http://59.53.91.231:2100' 0002
159
+ codeType: this.param.isCodeType || [3], // 可选类型 1-主体 2-部门 3-人员
160
+ multiple: true, // 是否多选
161
+ checkedArray: [],
162
+ },
163
+ /* {
164
+ source: "0",
165
+ type: "0",
166
+ request: this.param.request, //'http://59.53.91.231:2100' 0002
167
+ businessId: "6a9aaf5742572e82b5d89d6f7e52e2f2",
168
+ codeType: [3], // 可选类型 1-主体 2-部门 3-人员
169
+ multiple: true, // 是否多选
170
+ } */
171
+ // 存储选人信息
172
+ multiNodeParticipant: {},
173
+ // 当前评估对象
174
+ partObjId: [],
175
+ // 选中人员信息
176
+ partNode: {},
177
+ // 下拉节点
178
+ option: [],
179
+ nodeId: "",
180
+
181
+ actionName: "",
182
+ visibleListMsg: false,
183
+ visibleMsgComfig: false,
184
+ };
185
+ },
186
+ watch: {
187
+ param: {
188
+ async handler(val, preVal) {
189
+ this.nextNodeData = val.nextNodeData;
190
+ this.taskNode = val.taskNode;
191
+ this.outGatewayUserTaskModel = val.outGatewayUserTaskModel;
192
+ this.entity.checkedArray = [];
193
+
194
+ this.actionName = val.actionName;
195
+ },
196
+ immediate: true,
197
+ deep: true,
198
+ },
199
+ },
200
+ created() {
201
+ // console.log("isVue2", isVue2);
202
+ this.getReturnNode();
203
+ },
204
+ methods: {
205
+ // 设置msg
206
+ handleMakeMsg() {
207
+ if (this.commentMsg == "" && !this.commentMsg.length) {
208
+ this.handleTips("请输入审批意见!", false, "success");
209
+ this.visibleMsgComfig = false;
210
+ } else {
211
+ this.visibleMsgComfig = true;
212
+ }
213
+ },
214
+ handleOpenMsg() {
215
+ this.visibleListMsg = true;
216
+ },
217
+ handleTipsCancel() {
218
+ this.visibleMsgComfig = false;
219
+ },
220
+ handleTipsComfig() {
221
+ this.handleTips("", true, "loading");
222
+ this.visibleMsgComfig = false;
223
+ this.param.request
224
+ .post("/auth//user/opinion/save", {
225
+ opinionName: this.commentMsg,
226
+ })
227
+ .then((res) => {
228
+ if (res.code === 200) {
229
+ this.handleTips("设置成功!", true, "success");
230
+ } else {
231
+ this.handleTips(res.msg, true, "error");
232
+ }
233
+ })
234
+ .catch((error) => {
235
+ this.handleTips(error.msg, true, "error");
236
+ });
237
+ },
238
+ handleMsg(val) {
239
+ this.commentMsg = val;
240
+ this.visibleListMsg = false;
241
+ },
242
+ getReturnNode() {
243
+ // console.log("this.param.taskInstId", this.param.taskInstId);
244
+ this.param.request
245
+ .get("/aws/tis/getReturnableNodes", {
246
+ params: { taskId: this.param.taskInstId },
247
+ })
248
+ .then((res) => {
249
+ if (res.code === 200) {
250
+ this.option = res.data;
251
+ }
252
+ });
253
+ },
254
+ handleChange(val) {
255
+ // console.log("退回节点,", val);
256
+ this.nodeId = val.id;
257
+ },
258
+ handleOpenPopup(id) {
259
+ this.visible = true;
260
+ this.partObjId = id;
261
+ },
262
+ confirm() {
263
+ if (!this.commentMsg) {
264
+ this.textTips = "请输入退回理由!";
265
+ this.$refs.topTips.handleOpen();
266
+ return false;
267
+ }
268
+
269
+ if (!this.nodeId) {
270
+ this.textTips = "请选择退回节点!";
271
+ this.$refs.topTips.handleOpen();
272
+ return false;
273
+ }
274
+ this.handleTips("", true, "loading");
275
+ this.param.request
276
+ .post("/aws/tis/rollback", {
277
+ taskInstId: this.param.taskInstId,
278
+ rollbackReason: this.commentMsg,
279
+ isCompensation: false,
280
+ targetActivityId: this.nodeId,
281
+ })
282
+ .then((res) => {
283
+ if (res.code == 200) {
284
+ this.$emit("handleClosePopup1");
285
+ this.handleTips("提交成功!", false, "success");
286
+ this.handleFinal();
287
+ this.commentMsg = "";
288
+ } else {
289
+ this.handleTips(res.msg, true, "error");
290
+ }
291
+ })
292
+ .catch((error) => {
293
+ this.handleTips(error.msg, true, "error");
294
+ });
295
+ },
296
+ makeDelegateTaskButtonAnnex() {
297
+ if (this.param.annex && this.param.annex.length) {
298
+ this.otherList = this.param.annex;
299
+ let str = this.otherList.split(";");
300
+ this.limit = str[2];
301
+ this.requires = JSON.parse(str[1]);
302
+ this.labels = str[0];
303
+ /* console.log(
304
+ "makeDelegateTaskButtonAnnex",
305
+ this.otherList,
306
+ this.limit,
307
+ this.requires,
308
+ this.labels
309
+ ); */
310
+ }
311
+ },
312
+
313
+ handleCallback(res) {
314
+ this.visible = false;
315
+ this.multiNodeParticipant[this.partObjId] = [];
316
+ this.partNode[this.partObjId] = [];
317
+ res.map((v, i) => {
318
+ this.multiNodeParticipant[this.partObjId].push(v.uid);
319
+ this.partNode[this.partObjId].push(v.name);
320
+ this.entity.checkedArray.push({
321
+ type: 3,
322
+ uid: v.uid,
323
+ });
324
+ });
325
+ // console.log("callback_OK", res, this.multiNodeParticipant);
326
+ },
327
+ handleCancel() {
328
+ // console.log("cancel_No");
329
+ },
330
+
331
+ getValues(data) {
332
+ // console.log("获取当前附件信息::::", data);
333
+ this.attchLists = data;
334
+ },
335
+
336
+ async uploadAttch() {
337
+ if (this.attchLists.length > 0) {
338
+ this.attchLists.map((v, i) => {
339
+ v.size = v.fileSize;
340
+ v.format = v.originFileName.substring(
341
+ v.originFileName.lastIndexOf(".") + 1
342
+ );
343
+ v.uploadTime = v.createTime;
344
+ v.processInstId = this.param.processInstId;
345
+ v.taskInstId = this.param.taskInstId;
346
+ v.name = v.originFileName;
347
+ });
348
+
349
+ let param = this.attchLists;
350
+ const ress = await this.param.request.post(
351
+ "/aws/meta/annex/patchSave",
352
+ {
353
+ saveMetaAnnexCmdList: param,
354
+ }
355
+ );
356
+ // console.log("asd", ress);
357
+ if (ress.success) {
358
+ this.$emit("handleClosePopup1");
359
+ this.handleTips("提交成功!", false, "success");
360
+ this.handleFinal();
361
+ this.commentMsg = "";
362
+ } else {
363
+ this.handleTips("上传失败", true, "error");
364
+ }
365
+ }
366
+ },
367
+
368
+ isOption(humanPerformer) {
369
+ return (
370
+ humanPerformer == "任意指定" ||
371
+ humanPerformer == "固定部门" ||
372
+ humanPerformer == "固定单位" ||
373
+ humanPerformer == "与流程申请人所在组织结构的位置相关" ||
374
+ humanPerformer == "固定群组"
375
+ );
376
+ },
377
+
378
+ handleTips(text, status, type) {
379
+ this.textTips = text;
380
+ this.statusTips = status;
381
+ this.typeTips = type;
382
+ this.$refs.topTips.handleOpen();
383
+ },
384
+
385
+ handleFinal() {
386
+ if (this.param.endFunction) {
387
+ window.top && window.top.postMessage('success', '*')
388
+ this.param.endFunction("退回");
389
+ }
390
+ },
391
+ },
392
+ };
393
+ </script>
394
+ <style scoped>
395
+ @import "./index.scss";
396
+ </style>