ui-process-h5 0.1.32 → 0.1.36

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 (36) hide show
  1. package/package.json +6 -49
  2. package/packages/components/approval/index.js +0 -0
  3. package/packages/components/process/{index.ts → index.js} +2 -3
  4. package/packages/components/process/src/attchlist-upload.vue +585 -0
  5. package/packages/components/process/src/operation/backNode.vue +141 -0
  6. package/packages/components/process/src/operation/cancel.vue +170 -0
  7. package/packages/components/process/src/operation/ccTask.vue +170 -0
  8. package/packages/components/process/src/operation/complete.vue +224 -0
  9. package/packages/components/process/src/operation/counterSign.vue +178 -0
  10. package/packages/components/process/src/operation/delegateTask.vue +168 -0
  11. package/packages/components/process/src/operation/index.js +9 -0
  12. package/packages/components/process/src/operation/restart.vue +172 -0
  13. package/packages/components/process/src/popup.vue +176 -74
  14. package/packages/components/process/src/process.vue +900 -0
  15. package/packages/components/process/src/tab.vue +189 -197
  16. package/packages/components/process/src/tip.vue +207 -0
  17. package/packages/components/process/theme/img/add-file.png +0 -0
  18. package/packages/components/process/theme/img/del.png +0 -0
  19. package/packages/components/process/theme/img/doc.png +0 -0
  20. package/packages/components/process/theme/img/file.png +0 -0
  21. package/packages/components/process/theme/img/image.png +0 -0
  22. package/packages/components/process/theme/img/pdf.png +0 -0
  23. package/packages/components/process/theme/img/xls.png +0 -0
  24. package/packages/components/process/theme/img/zip.png +0 -0
  25. package/packages/components/process/theme/status/error.png +0 -0
  26. package/packages/components/process/theme/status/loading.png +0 -0
  27. package/packages/components/process/theme/status/success.png +0 -0
  28. package/packages/index.js +4 -0
  29. package/packages/component.ts +0 -4
  30. package/packages/components/process/src/button.vue +0 -55
  31. package/packages/components/process/src/index.vue +0 -447
  32. package/packages/components/utils/request/api.ts +0 -11
  33. package/packages/components/utils/request/cache.d.ts +0 -52
  34. package/packages/components/utils/request/cache.js +0 -99
  35. package/packages/components/utils/request/request.ts +0 -62
  36. package/packages/index.ts +0 -4
@@ -0,0 +1,4 @@
1
+ import TopProcess from "./components/process/index";
2
+
3
+ export default [TopProcess];
4
+ // export { TopProcess };
@@ -1,4 +0,0 @@
1
- import TopProcess from "./components/process";
2
-
3
- export default [TopProcess];
4
- export { TopProcess };
@@ -1,55 +0,0 @@
1
- <template>
2
- <div
3
- class="top-button"
4
- :style="`background-color:${style.bckColor};color:${style.textColor}`"
5
- >
6
- <slot></slot>
7
- </div>
8
- </template>
9
- <script>
10
- import { defineComponent, ref, watch, computed, onMounted } from "vue-demi";
11
- export default defineComponent({
12
- name: "TopButton",
13
- props: {
14
- type: { default: "default", type: String },
15
- },
16
- setup(props) {
17
- const style = ref({
18
- textColor: "#fff",
19
- bckColor: "3c9cff",
20
- });
21
-
22
- switch (props.type) {
23
- case "primary":
24
- style.value.textColor = "#fff";
25
- style.value.bckColor = "#3c9cff";
26
- break;
27
- case "danger":
28
- style.value.textColor = "rgb(255, 96, 96)";
29
- style.value.bckColor = "rgb(255, 230, 230)";
30
- break;
31
- case "default":
32
- style.value.textColor = "rgb(51, 51, 51)";
33
- style.value.bckColor = "rgb(241, 241, 241)";
34
- break;
35
- }
36
-
37
- return {
38
- style,
39
- };
40
- },
41
- });
42
- </script>
43
- <style scoped>
44
- .top-button {
45
- width: 100%;
46
- border-radius: 20px;
47
- height: 36px;
48
- background-color: #3c9cff;
49
- color: #fff;
50
- font-size: 14px;
51
- justify-content: center;
52
- display: flex;
53
- align-items: center;
54
- }
55
- </style>
@@ -1,447 +0,0 @@
1
- <template>
2
- <div class="process-warp">
3
- <div class="process-main" v-if="processStatus.status">
4
- <div class="process-ml-item border">
5
- <div class="process-mli-name">流程状态</div>
6
- <div class="process-mli-value">
7
- <div
8
- class="process-mliv-dd"
9
- :style="{ background: getColor(processStatus.status) }"
10
- v-if="
11
- processStatus.status || processStatus.bizStatusName
12
- "
13
- >
14
- {{
15
- processStatus.bizStatusName
16
- ? processStatus.bizStatusName
17
- : processStatus.status
18
- }}
19
- </div>
20
- </div>
21
- </div>
22
- <div class="process-ml-item border">
23
- <div class="process-mli-name">流程发起时间</div>
24
- <div class="process-mli-value">
25
- <span>{{ processStatus.createTime }}</span>
26
- </div>
27
- </div>
28
-
29
- <div
30
- class="process-ml-item"
31
- v-if="
32
- processStatus.allUserNames &&
33
- processStatus.allUserNames.length
34
- "
35
- >
36
- <div class="process-mli-name">审批节点</div>
37
- <div class="process-mli-value">
38
- <span class="process-mliv-jd">{{
39
- `${
40
- processStatus.taskState == 4
41
- ? processStatus.currUserName
42
- : processStatus.allUserNames.toString()
43
- }审批中`
44
- }}</span>
45
- </div>
46
- </div>
47
- </div>
48
- <div class="process-card" :style="{ height: processCardHeight }">
49
- <TopTab :tapList="tapList">
50
- <template #default><slot></slot></template>
51
- </TopTab>
52
- </div>
53
- <div class="process-foot" v-if="isAdditional">
54
- <div class="footBtnRow">
55
- <slot name="btn"></slot>
56
- </div>
57
- </div>
58
- <div class="process-btn">
59
- <template v-if="processStatus.status != '已完成'">
60
- <template v-for="(item, index) in operBtn" :key="item.name">
61
- <TopButton
62
- v-if="index < 3"
63
- @click="handleTest"
64
- :type="item.btnProps.type.toString()"
65
- >
66
- {{ item.name }}
67
- </TopButton>
68
- </template>
69
- </template>
70
- <div class="elips" v-if="operBtn.length > 3">
71
- <div class="circle"></div>
72
- <div class="circle"></div>
73
- <div class="circle"></div>
74
- </div>
75
- <!-- <TopButton @click="handleTest">撤销</TopButton>
76
- <TopButton @click="handleTest" type="danger">拒绝</TopButton>
77
- <TopButton @click="handleTest" type="primary">同意</TopButton> -->
78
- </div>
79
- </div>
80
- <TopPopup ref="TopPopup1" :cancel="handleCancel" :comfig="handleComfig">
81
- csaasd1
82
- </TopPopup>
83
- </template>
84
-
85
- <script lang="ts">
86
- import { defineComponent, ref, watch, computed } from "vue-demi";
87
- import TopTab from "./tab.vue";
88
- import TopPopup from "./popup.vue";
89
- import TopButton from "./button.vue";
90
- // import { getProcessStatus } from "../../utils/request/api";
91
-
92
- export default defineComponent({
93
- name: "TopProcess",
94
- components: {
95
- TopTab,
96
- TopPopup,
97
- TopButton,
98
- },
99
- props: {
100
- tapList: { require: false, default: () => [], type: Array },
101
- processId: { require: true, default: "", type: String },
102
- processDefId: { require: true, default: "", type: String },
103
- taskId: { require: true, default: "", type: String },
104
- isAdditional: { require: false, default: false, type: Boolean },
105
- isView: { default: false, type: Boolean },
106
- userId: { default: "", type: String}
107
- },
108
- setup(props) {
109
- const processStatus = ref<any>({});
110
-
111
- const TopPopup1 = ref<any>();
112
-
113
- // 底部按钮
114
- const taskNode = ref<any>([
115
- {
116
- taskId: "ecd82a93-4a62-42a7-b7bd-df38d2f1609a",
117
- taskState: 1,
118
- nodeId: "obj_026aac284c1a4303854f978b674be4b9",
119
- customUniqueId: "",
120
- nodeName: "部门负责人",
121
- },
122
- ]);
123
-
124
- const taskObj = ref<any>({
125
- id: "obj_026aac284c1a4303854f978b674be4b9",
126
- name: "部门负责人",
127
- no: "1",
128
- buttons: [],
129
- ccTaskButtonLabel: "",
130
- ccTaskButtonAnnex: null,
131
- completeButtonLabel: "同意",
132
- completeButtonAnnex: null,
133
- delegateTaskButtonLabel: "转办",
134
- delegateTaskButtonAnnex: null,
135
- printFormButtonLabel: "",
136
- supplyUnusualTransferButtonLabel: "",
137
- readingOfficeLabel: "",
138
- readingOfficeButtonAnnex: null,
139
- jointlySignLabel: "",
140
- jointlySignButtonAnnex: null,
141
- counterSignLabel: "加签",
142
- counterSignButtonAnnex: null,
143
- coordinationLabel: "",
144
- coordinationButtonAnnex: null,
145
- otherButtonAnnexList: null,
146
- humanPerformer: {
147
- id: "obj_2bd3494ae5c54309b7f2ea452921790b",
148
- name: "任意指定",
149
- resourceAssignmentExpressionModel: {
150
- formalExpression: "",
151
- },
152
- },
153
- commentModels: [
154
- {
155
- actionName: "提交",
156
- isDefault: true,
157
- },
158
- {
159
- actionName: "作废",
160
- isDefault: false,
161
- },
162
- ],
163
- routeTxt: {
164
- departmentIds: null,
165
- companyIds: null,
166
- teamList: null,
167
- routeType: "DynamicUsers",
168
- },
169
- loopCardinality: 1,
170
- isHistoryRoute: false,
171
- participantList: null,
172
- historyRoute: false,
173
- });
174
-
175
- watch(
176
- () => props.processId,
177
- (val, preVal) => {
178
- if (val) {
179
- processStatus.value = {
180
- status: "审批中",
181
- createUid: "18ccbf63229f0c79f39940ae284c111e",
182
- createTopUserId: "128ec9c9b7f26135272596fe01c57690",
183
- createTime: "2023-04-20 15:01:48",
184
- currUserName: "朱鸿飞",
185
- allUserNames: ["朱鸿飞"],
186
- userNodeGroup: {
187
- 分管领导: ["朱鸿飞"],
188
- },
189
- appId: "com.awspaas.user.apps.top.study.project",
190
- statusCode: "1",
191
- statusName: "审批中",
192
- bizStatusName: "审批中",
193
- taskState: 1,
194
- };
195
- }
196
- },
197
- {
198
- //如果加了这个参数,值为true的话,就消除了惰性,watch会在创建后立即执行一次
199
- //那么首次执行,val为默认值,preVal为undefined
200
- immediate: true,
201
- //这个参数代表监听对象时,可以监听深度嵌套的对象属性
202
- deep: true,
203
- }
204
- );
205
-
206
- /* getProcessStatus({
207
- processInstId: "4ac28800-7056-483b-8d38-a4932daf055b",
208
- }).then((res) => {
209
- console.log("res", res);
210
- }); */
211
-
212
- console.log("asd", taskNode.value[0].taskState);
213
- /* copmuted */
214
- // 按钮对象
215
- const operBtn = computed<any>(() => {
216
- let btnList = <any>[];
217
- let flag =
218
- taskNode.value &&
219
- taskNode.value[0] &&
220
- taskNode.value[0].taskState != 4;
221
-
222
- if (flag && !props.isView && taskObj.value.completeButtonLabel) {
223
- let obj = <any>{};
224
- obj.name = taskObj.value.completeButtonLabel;
225
- obj.btnProps = { type: "primary" };
226
- btnList.push(obj);
227
- }
228
-
229
- if (flag && !props.isView && processStatus.value.currUserName) {
230
- let obj = <any>{};
231
- obj.name = "拒绝";
232
- obj.btnProps = { type: "danger" };
233
- btnList.push(obj);
234
- }
235
-
236
- if (
237
- flag &&
238
- !props.isView &&
239
- taskObj.value.buttons &&
240
- taskObj.value.buttons.length
241
- ) {
242
- taskObj.value.buttons.forEach((s: any) => {
243
- if (s.label === "退回") {
244
- let obj = <any>{};
245
- obj.name = s.label;
246
- obj.btnProps = { type: "danger" };
247
- btnList.push(obj);
248
- }
249
- });
250
- }
251
-
252
- if (
253
- flag &&
254
- !props.isView &&
255
- taskObj.value.delegateTaskButtonLabel
256
- ) {
257
- let obj = <any>{};
258
- obj.name = taskObj.value.delegateTaskButtonLabel;
259
- obj.btnProps = { type: "default" };
260
- btnList.push(obj);
261
- }
262
- if (
263
- props.processId &&
264
- processStatus.value.createTopUserId == props.userId &&
265
- taskNode.value[0]?.taskState != 2 &&
266
- processStatus.value.status !== "已驳回" &&
267
- processStatus.value.status !== "已撤销"
268
- ) {
269
- let obj = <any>{};
270
- obj.name = "催办";
271
- obj.btnProps = { type: "default" };
272
- btnList.push(obj);
273
- }
274
- if (
275
- props.processId &&
276
- processStatus.value.createTopUserId == props.userId &&
277
- taskNode.value[0]?.taskState != 2 &&
278
- processStatus.value.status !== "已驳回" &&
279
- processStatus.value.status !== "已撤销"
280
- ) {
281
- let obj = <any>{};
282
- obj.name = "撤销";
283
- obj.btnProps = { type: "default" };
284
- btnList.push(obj);
285
- }
286
- if (flag && !props.isView && taskObj.value.counterSignLabel) {
287
- let obj = <any>{};
288
- obj.name = taskObj.value.counterSignLabel;
289
- obj.btnProps = { type: "primary" };
290
- btnList.push(obj);
291
- }
292
-
293
- return btnList;
294
- });
295
-
296
- //筛选
297
- const actionBtn = computed(() => {
298
- if (operBtn.value.length > 3) {
299
- return operBtn.value.slice(3);
300
- }
301
- return [];
302
- });
303
-
304
- const handleCancel = () => {
305
- console.log("handleCancel");
306
- };
307
-
308
- const handleComfig = () => {
309
- console.log("handleComfig", "确定按钮");
310
- TopPopup1.value.handleClose();
311
- };
312
-
313
- const processCardHeight = computed(() => {
314
- /* let num = 210;
315
- if (
316
- ProcessInsObj.value.end ||
317
- !operBtn.value ||
318
- operBtn.value?.length == 0
319
- ) {
320
- num -= 80;
321
- }
322
- if (!processStatus.value.status) num -= 140;
323
- else if (!processStatus.value.currUserName) num -= 40; */
324
- return `calc(100vh - ${205}px)`;
325
- });
326
-
327
- const handleTest = () => {
328
- TopPopup1.value.handleOpen();
329
- };
330
-
331
- return {
332
- processStatus,
333
- processCardHeight,
334
- handleTest,
335
- TopPopup1,
336
- handleCancel,
337
- handleComfig,
338
- operBtn,
339
- actionBtn,
340
- };
341
- },
342
- methods: {
343
- getColor(status: string) {
344
- if (status == "审核中") return "#FFA52D";
345
- if (status == "已驳回") return "#F14B4C";
346
- if (status == "已撤销") return "#CECECE";
347
- if (status == "已完成") return "#6DC743";
348
-
349
- return "#1389FF";
350
- },
351
- },
352
- });
353
- </script>
354
-
355
- <style scoped>
356
- .process-warp {
357
- overflow: hidden;
358
- height: 100vh;
359
- width: 100%;
360
- position: relative;
361
- background-color: #f3f3f7;
362
- }
363
- .process-main {
364
- display: flex;
365
- justify-content: space-between;
366
- flex-direction: column;
367
- align-items: center;
368
- padding: 0 17px;
369
- background: #fff;
370
- margin: 0 0 10px 0;
371
- }
372
-
373
- .process-main .border {
374
- border-bottom: #e8e8e8 1px solid;
375
- }
376
-
377
- .process-main .process-ml-item {
378
- display: flex;
379
- align-items: center;
380
- font-size: 15px;
381
- font-weight: 400;
382
- width: 100%;
383
- justify-content: space-between;
384
- height: 44px;
385
- }
386
-
387
- .process-main .process-ml-item .process-mli-name {
388
- color: #333333;
389
- }
390
-
391
- .process-main .process-ml-item .process-mli-value {
392
- color: #888888;
393
- }
394
-
395
- .process-main .process-ml-item .process-mli-value .process-mliv-dd {
396
- height: 26px;
397
- min-width: 30px;
398
- padding: 0 12px;
399
- border-radius: 20px;
400
- background: #1389ff;
401
- color: #fff;
402
- display: flex;
403
- align-items: center;
404
- justify-content: center;
405
- font-size: 12px;
406
- }
407
-
408
- .process-main .process-ml-item .process-mli-value .process-mliv-jd {
409
- color: #1389ff;
410
- }
411
-
412
- .process-btn {
413
- display: flex;
414
- min-height: 60px;
415
- padding-top: 5px;
416
- background: #fff;
417
- border-top: 1px solid #dddddf9e;
418
- box-sizing: border-box;
419
- justify-content: center;
420
- align-items: center;
421
- flex-direction: row-reverse;
422
- }
423
-
424
- .process-btn .top-button,
425
- .process-btn .elips {
426
- margin: 0 5px;
427
- }
428
- /* .process-btn .top-button:first-child{
429
- margin-left: 0;
430
- } */
431
-
432
- .elips {
433
- min-width: 60px;
434
- height: 100%;
435
- background-color: white;
436
- display: flex;
437
- justify-content: center;
438
- align-items: center;
439
- }
440
- .elips .circle {
441
- width: 6px;
442
- height: 6px;
443
- margin: 0 2px;
444
- background-color: #333333;
445
- border-radius: 50%;
446
- }
447
- </style>
@@ -1,11 +0,0 @@
1
- import request from "./request";
2
-
3
- const proxyStr = "/prod-api/aws";
4
-
5
- export function getProcessStatus(query: any) {
6
- return request({
7
- url: proxyStr + "/pis/getProcessStatus",
8
- method: "get",
9
- params: query,
10
- });
11
- }
@@ -1,52 +0,0 @@
1
-
2
- export const ACCESS_TOKEN :string
3
- export const SUBJECTID :string
4
- export const TASK_JSON :string
5
-
6
- /**
7
- * 设置cookie
8
- * @param key
9
- * @param value
10
- * @param options
11
- * @returns {*}
12
- */
13
- export function saveCookie(key: string, value: string, options: any): void
14
-
15
- /**
16
- * 获取cookie
17
- * @param key cookie的key
18
- * @param defaultValue
19
- * @returns {*}
20
- */
21
- export function loadCookie(key: string, defaultValue: string): string
22
-
23
-
24
- /**
25
- * 删除cookie
26
- * @param key
27
- * @returns {string}
28
- */
29
- export function removeCookie (key: string): string
30
-
31
-
32
- /**
33
- * 设置本地存储
34
- * @param key
35
- * @param value
36
- * @returns {*}
37
- */
38
- export function saveStorage (key: string, value: string) : string
39
-
40
- /**
41
- * 获取本地存储
42
- * @param key
43
- * @param defaultValue
44
- * @returns {*}
45
- */
46
- export function loadStorage (key: string, defaultValue: string) : string
47
- /**
48
- * 删除本地存储
49
- * @param key
50
- * @returns {string}
51
- */
52
- export function removeStorage (key: string) : string
@@ -1,99 +0,0 @@
1
- import Cookies from 'js-cookie'
2
- import storage from 'good-storage'
3
-
4
- export const ACCESS_TOKEN = 'Access_Token'// accessToken String
5
- export const SUBJECTID = 'SUBJECTID'// accessToken String
6
- export const TASK_JSON = "TASK_JSON"
7
- /**
8
- * 设置cookie
9
- * @param key
10
- * @param value
11
- * @param options
12
- * @returns {*}
13
- */
14
- export function saveCookie(key, value, options) {
15
- Cookies.set(key, value, options)
16
- return value
17
- }
18
-
19
- /**
20
- * 获取cookie
21
- * @param key
22
- * @param defaultValue
23
- * @returns {*}
24
- */
25
- export function loadCookie(key, defaultValue) {
26
- return Cookies.get(key) || defaultValue
27
- }
28
-
29
- /**
30
- * 删除cookie
31
- * @param key
32
- * @returns {string}
33
- */
34
- export function removeCookie(key) {
35
- Cookies.remove(key)
36
- return ''
37
- }
38
-
39
- /**
40
- * 设置本地存储
41
- * @param key
42
- * @param value
43
- * @returns {*}
44
- */
45
- export function saveStorage(key, value) {
46
- storage.set(key, value)
47
- return value
48
- }
49
-
50
- /**
51
- * 获取本地存储
52
- * @param key
53
- * @param defaultValue
54
- * @returns {*}
55
- */
56
- export function loadStorage(key, defaultValue) {
57
- return storage.get(key, defaultValue)
58
- }
59
-
60
- /**
61
- * 删除本地存储
62
- * @param key
63
- * @returns {string}
64
- */
65
- export function removeStorage(key) {
66
- storage.remove(key)
67
- return ''
68
- }
69
-
70
- /**
71
- * 保存会话存储
72
- * @param key
73
- * @param value
74
- * @returns {*}
75
- */
76
- export function saveSessionStorage(key, value) {
77
- storage.session.set(key, value)
78
- return value
79
- }
80
-
81
- /**
82
- * 获取会话存储
83
- * @param key
84
- * @param defaultValue
85
- * @returns {*}
86
- */
87
- export function loadSessionStorage(key, defaultValue) {
88
- return storage.session.get(key, defaultValue)
89
- }
90
-
91
- /**
92
- * 删除会话存储
93
- * @param key
94
- * @returns {string}
95
- */
96
- export function removeSessionStorage(key) {
97
- storage.session.remove(key)
98
- return ''
99
- }