@zhijiancloud/bpm 0.0.6 → 0.0.7

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 (97) hide show
  1. package/components/api/batch-loader.js +61 -0
  2. package/components/api/index.js +108 -0
  3. package/components/css/bpmAudit.less +13 -0
  4. package/components/css/bpmMulFile.less +9 -5
  5. package/components/css/bpmSelectEntranceForm.less +62 -0
  6. package/components/css/bpmSelectHouseOwner.less +30 -0
  7. package/components/css/bpmSignature.less +40 -0
  8. package/components/css/bpmText.less +0 -10
  9. package/components/css/common.less +43 -0
  10. package/components/css/index.less +6 -1
  11. package/components/lib/bpmAudit/src/main.vue +35 -4
  12. package/components/lib/bpmAudit/src/part/auditor/audit-new.vue +534 -0
  13. package/components/lib/bpmAudit/src/part/auditor/audit-select.vue +127 -0
  14. package/components/lib/bpmAudit/src/part/auditor/audit-with-others.vue +634 -0
  15. package/components/lib/bpmAudit/src/part/auditor.vue +54 -0
  16. package/components/lib/bpmAudit/src/part/editor.vue +7 -5
  17. package/components/lib/bpmAudit/src/part/reader.vue +10 -9
  18. package/components/lib/bpmDateTime/src/part/editor.vue +3 -1
  19. package/components/lib/bpmField/src/main.vue +5 -150
  20. package/components/lib/bpmFieldsFilter/index.js +7 -0
  21. package/components/lib/bpmFieldsFilter/src/main.vue +324 -0
  22. package/components/lib/bpmFormField/index.js +7 -0
  23. package/components/lib/bpmFormField/src/lib/form_mixin.js +818 -0
  24. package/components/lib/bpmFormField/src/lib/mixin.js +245 -0
  25. package/components/lib/bpmFormField/src/main.vue +35 -0
  26. package/components/lib/bpmMulFile/src/main.vue +0 -1
  27. package/components/lib/bpmMulFile/src/part/editor.vue +1 -1
  28. package/components/lib/bpmMulFile/src/part/reader.vue +12 -33
  29. package/components/lib/bpmMulImage/src/main.vue +1 -2
  30. package/components/lib/bpmMulImage/src/part/editor.vue +5 -1
  31. package/components/lib/bpmMulImage/src/part/reader.vue +14 -4
  32. package/components/lib/bpmNumber/src/part/editor.vue +8 -9
  33. package/components/lib/bpmSelect/src/part/reader.vue +11 -2
  34. package/components/lib/bpmSelectCheckItem/src/part/editor.vue +3 -7
  35. package/components/lib/bpmSelectEntranceForm/index.js +7 -0
  36. package/components/lib/bpmSelectEntranceForm/src/main.vue +529 -0
  37. package/components/lib/bpmSelectFromField/src/main.vue +1 -0
  38. package/components/lib/bpmSelectFromField/src/part/editor.vue +27 -13
  39. package/components/lib/bpmSelectFromForm/src/part/editor.vue +2 -5
  40. package/components/lib/bpmSelectHouseOwner/index.js +7 -0
  41. package/components/lib/bpmSelectHouseOwner/src/main.vue +102 -0
  42. package/components/lib/bpmSelectHouseOwner/src/part/editor.vue +101 -0
  43. package/components/lib/bpmSelectHouseOwner/src/part/reader.vue +17 -0
  44. package/components/lib/bpmSelectIssue/index.js +7 -0
  45. package/components/lib/bpmSelectIssue/src/main.vue +180 -0
  46. package/components/lib/bpmSignature/index.js +7 -0
  47. package/components/lib/bpmSignature/src/main.vue +248 -0
  48. package/components/lib/bpmSubForm/src/main.vue +25 -3
  49. package/components/lib/bpmTime/src/part/editor.vue +3 -2
  50. package/components/lib/field-const.js +5 -2
  51. package/components/lib/index.ts +32 -2
  52. package/components/mixins/field_base_mixin.vue +188 -0
  53. package/components/vendor/draw.js +240 -0
  54. package/dist/bpmAudit.umd.js +1 -1
  55. package/dist/bpmDateTime.umd.js +1 -1
  56. package/dist/bpmField.umd.js +7 -1
  57. package/dist/bpmField.umd.js.LICENSE.txt +2 -0
  58. package/dist/bpmFieldsFilter.umd.js +8 -0
  59. package/dist/bpmFieldsFilter.umd.js.LICENSE.txt +1 -0
  60. package/dist/bpmFormField.umd.js +8 -0
  61. package/dist/bpmFormField.umd.js.LICENSE.txt +11 -0
  62. package/dist/bpmMulFile.umd.js +1 -1
  63. package/dist/bpmMulImage.umd.js +1 -1
  64. package/dist/bpmNumber.umd.js +1 -1
  65. package/dist/bpmSelect.umd.js +1 -1
  66. package/dist/bpmSelectCheckItem.umd.js +1 -1
  67. package/dist/bpmSelectEntranceForm.umd.js +8 -0
  68. package/dist/bpmSelectEntranceForm.umd.js.LICENSE.txt +1 -0
  69. package/dist/bpmSelectFromField.umd.js +1 -1
  70. package/dist/bpmSelectFromForm.umd.js +1 -1
  71. package/dist/bpmSelectHouseOwner.umd.js +1 -0
  72. package/dist/bpmSelectIssue.umd.js +1 -0
  73. package/dist/bpmSignature.umd.js +2 -0
  74. package/dist/bpmSignature.umd.js.LICENSE.txt +9 -0
  75. package/dist/bpmSubForm.umd.js +1 -1
  76. package/dist/bpmText.umd.js +1 -1
  77. package/dist/bpmTime.umd.js +1 -1
  78. package/dist/css/bpmAudit.css +1 -0
  79. package/dist/css/bpmMulFile.css +1 -1
  80. package/dist/css/bpmSelectEntranceForm.css +1 -0
  81. package/dist/css/bpmSelectHouseOwner.css +1 -0
  82. package/dist/css/bpmSignature.css +1 -0
  83. package/dist/css/bpmText.css +1 -1
  84. package/dist/css/common.css +1 -0
  85. package/dist/css/index.css +1 -1
  86. package/dist/demo.umd.js +1 -1
  87. package/dist/demo2.umd.js +1 -1
  88. package/dist/index.umd.js +7 -1
  89. package/dist/index.umd.js.LICENSE.txt +2 -0
  90. package/package.json +25 -18
  91. package/CHANGELOG.md +0 -27
  92. package/dist/bpmDateTime.umd.js.LICENSE.txt +0 -38
  93. package/dist/bpmNumber.umd.js.LICENSE.txt +0 -38
  94. package/dist/bpmSelect.umd.js.LICENSE.txt +0 -38
  95. package/dist/bpmSelectUser.umd.js +0 -1
  96. package/dist/bpmText.umd.js.LICENSE.txt +0 -38
  97. package/dist/bpmTime.umd.js.LICENSE.txt +0 -38
@@ -0,0 +1,634 @@
1
+ <template>
2
+ <div class="audit-with-others">
3
+
4
+
5
+ </div>
6
+ </template>
7
+
8
+ <script>
9
+ // import buildMixin from "../mixin";
10
+ // import MulImageMobile from "./lib/mul-image-mobile-base";
11
+ // import MulImagePc from "./lib/mul-image-pc-base";
12
+ // import MulImage from "../reader/lib/mul-image-base.vue"
13
+ //import Draw from "./lib/draw";
14
+
15
+ export default {
16
+ // mixins: [buildMixin()],
17
+ props: ["value", "fieldConf", "row" ,"container","dispMode"],
18
+ components: {
19
+ // Draw,
20
+ // MulImageMobile,
21
+ // MulImagePc,
22
+ // MulImage
23
+ },
24
+ data() {
25
+ return {
26
+ opened: false,
27
+ degree: 0,
28
+ selectOptions: [
29
+ {
30
+ label: zj.z('通过', 'b2.common.pass'),
31
+ value: 1,
32
+ },
33
+ {
34
+ label: zj.z('不通过', 'b2.common.fail'),
35
+ value: 2,
36
+ },
37
+ ],
38
+ canvasBox: null,
39
+ form: {
40
+ result: 1,
41
+ judgment: "",
42
+ photos: [],
43
+ reject_target: ''
44
+ },
45
+ hasDraw: false,
46
+ openLastSign: false,
47
+ lastSign: "",
48
+ useNextUser: false
49
+ };
50
+ },
51
+ computed: {
52
+ useDetail() {
53
+ return !!_.get(this.fieldConf, "detail_allow", null) && !!_.get(this.fieldConf, "detail_deny", null)
54
+ },
55
+ jucdgment() {
56
+ let result = this.form.result
57
+ let jucdgment = _.get(this.fieldConf, "judgment");
58
+ if (this.useDetail) {
59
+ jucdgment = result == 1 ? _.get(this.fieldConf, 'detail_allow.judgment') : _.get(this.fieldConf, 'detail_deny.judgment')
60
+ }
61
+ return jucdgment
62
+ },
63
+ showJudgment() {
64
+ return this.jucdgment == "yes" || this.jucdgment == "must";
65
+ },
66
+ resultColor() {
67
+ let result = _.get(this.value, "result", -1);
68
+ let color = result == 1 ? this.allowColor : result == -1 ? null : this.denyColor
69
+ return this.useDetail ? color : null
70
+ },
71
+ allowColor() {
72
+ let color = _.get(this.fieldConf, "detail_allow.color", "#fff")
73
+ return color == "#fff" || color == "#ffffff" ? null : color
74
+ },
75
+ denyColor() {
76
+ let color = _.get(this.fieldConf, "detail_deny.color", "#fff")
77
+ return color == "#fff" || color == "#ffffff" ? null : color
78
+ },
79
+ signature() {
80
+ let result = this.form.result
81
+ let signature = _.get(this.fieldConf, "signature");
82
+ if (this.useDetail) {
83
+ signature = result == 1 ? _.get(this.fieldConf, 'detail_allow.signature') : _.get(this.fieldConf, 'detail_deny.signature')
84
+ }
85
+ return signature
86
+ },
87
+ showSignature() {
88
+ return this.signature == "yes" || this.signature == "must";
89
+ },
90
+ photo() {
91
+ let result = this.form.result
92
+ let photo = _.get(this.fieldConf, "photo");
93
+ if (this.useDetail) {
94
+ photo = result == 1 ? _.get(this.fieldConf, 'detail_allow.photo') : _.get(this.fieldConf, 'detail_deny.photo')
95
+ }
96
+ return photo
97
+ },
98
+ showPhoto() {
99
+ return this.photo == "yes" || this.photo == "must";
100
+ },
101
+ isJudgmentMust() {
102
+ return this.judgment == "must";
103
+ },
104
+ isSignatureMust() {
105
+ return this.signature == "must";
106
+ },
107
+ isPhotoMust() {
108
+ return this.photo == "must";
109
+ },
110
+ isRequired() {
111
+ return _.get(this.fieldConf, "check.required");
112
+ },
113
+ getViewFont() {
114
+
115
+ let result = _.get(this.value, "result", -1);
116
+ let font = result == 1 ? zj.z('通过', 'b2.common.pass') : result == -1 ? "" : zj.z('不通过', 'b2.common.fail')
117
+ if (this.useDetail) {
118
+ font = result == 1 ? _.get(this.fieldConf, "detail_allow.text", zj.z('通过', 'b2.common.pass')) : result == -1 ? "" : _.get(this.fieldConf, "detail_deny.text", zj.z('不通过', 'b2.common.fail'))
119
+ }
120
+ return font;
121
+ },
122
+ getCanvasBoxStyle() {
123
+ return {
124
+ height: "150px",
125
+ width: "100%",
126
+ };
127
+ },
128
+ componentName() {
129
+ return "MulImagePc"
130
+ },
131
+ userId() {
132
+ return _.get(this.$bpm.userInfo, "user_id", 0);
133
+ },
134
+ userName() {
135
+ return _.get(this.$bpm.userInfo, "user_name", "");
136
+ },
137
+
138
+ rejectTargetMap() {
139
+ let rejectTargets = _.get(this.container, "formSchema.reject_targets")
140
+ return _.keyBy(rejectTargets, "node")
141
+ },
142
+ rejectTargetList() {
143
+ let rejectTargets = _.get(this.container, "formSchema.reject_targets")
144
+ let passedNodes = _.get(this.container, "_formData.passed_nodes")
145
+ let list = []
146
+ _.each(rejectTargets, rejectTarget => {
147
+ if (_.includes(passedNodes, rejectTarget.node) && rejectTarget.only_passed) {
148
+ list.push({
149
+ label: rejectTarget.name,
150
+ value: rejectTarget.node
151
+ })
152
+ }
153
+ else {
154
+ list.push({
155
+ label: rejectTarget.name || zj.z("上一个节点", "b2.common.previous_node"),
156
+ value: rejectTarget.node || "last_id"
157
+ })
158
+ }
159
+ })
160
+ return list
161
+ }
162
+ },
163
+ mounted() {
164
+ let container = this.container
165
+ container.$on("afterFormSubmit", (errors) => {
166
+ if (!errors && this.openLastSign && this.value.signature) {
167
+ this.$bpm.postEleSign(this.value.signature, this.useNextUser)
168
+ }
169
+ })
170
+
171
+ if (this.useDetail) {
172
+ this.selectOptions = [
173
+ {
174
+ label: _.get(this.fieldConf, "detail_allow.text", zj.z('通过', 'b2.common.pass')),
175
+ value: 1
176
+ },
177
+ {
178
+ label: _.get(this.fieldConf, "detail_deny.text", zj.z('不通过', 'b2.common.fail')),
179
+ value: 2
180
+ }
181
+ ]
182
+ }
183
+ },
184
+ destroyed() {
185
+ let container = this.container
186
+ container.$off("afterFormSubmit")
187
+ },
188
+ methods: {
189
+ onHide() {
190
+ this.opened = false;
191
+ },
192
+ onOpen() {
193
+ if (this.draw) return;
194
+ if (this.value) {
195
+ this.form = this.value;
196
+ }
197
+ setTimeout(() => {
198
+ this.useNextUser = false
199
+ this.handleInit()
200
+ //this.initCanvas();
201
+
202
+ }, 200);
203
+ },
204
+ handleInit() {
205
+ if (!this.showSignature) return
206
+ let userSign = this.$bpm.userSign
207
+ this.openLastSign = userSign.open
208
+ if (this.openLastSign && !this.form.signature && userSign.for_next_use) this.form.signature = userSign.signature
209
+ if (userSign.for_next_use) this.lastSign = userSign.signature
210
+ if (userSign.for_next_use && this.openLastSign) this.useNextUser = true
211
+
212
+ },
213
+ onDataLoaded(container) {
214
+ this.resetForm();
215
+ let value = {
216
+ result: 1,
217
+ judgment: "",
218
+ photos: [],
219
+ reject_target: ''
220
+ }
221
+
222
+ this.$emit("input",value)
223
+ this.$emit("change",value)
224
+ this.hasDraw = false;
225
+ this.draw && this.draw.clear();
226
+ },
227
+
228
+ clearSignature() {
229
+ this.hasDraw = false;
230
+ this.draw && this.draw.clear();
231
+ this.lastSign = ""
232
+ },
233
+ resetForm() {
234
+ this.form = {
235
+ result: 1,
236
+ judgment: "",
237
+ photos: [],
238
+ };
239
+ },
240
+ async loadUserInfo() {
241
+ this.$bpm.networking = true
242
+ let info = await this.$bpm.requestAppendOrgParams({
243
+ url: "/uc/common/user_info/",
244
+ params: zj.utils.pageParam(),
245
+ });
246
+ info = _.get(info, "data.data")
247
+ this.$bpm.networking = false
248
+ console.log("info", info.user_info);
249
+ this.$bpm.setUserInfo(info.user_info);
250
+ },
251
+ async onSubmit() {
252
+ let form = this.form;
253
+
254
+ let auditor =
255
+ (zj.app.accessInfo && zj.app.accessInfo.user_info.user_id) ||
256
+ this.userId;
257
+ if (!auditor) {
258
+ this.loadUserInfo();
259
+ this.$message({
260
+ message: zj.z("当前网络加载有问题,请重新进入", 'b2.common.network_err'),
261
+ type: 'warning',
262
+ });
263
+
264
+ return;
265
+ }
266
+
267
+ if (form.result == 2 && this.showReject && !form.reject_target) {
268
+ // 打回节点必选
269
+ this.$message({
270
+ message: zj.z("回退节点必填", "b2.common.back_to_required"),
271
+ type: 'warning',
272
+ });
273
+
274
+ return;
275
+ }
276
+
277
+ if (this.isRequired && !this.form.result) {
278
+ this.$message({
279
+ message: zj.z("请选择审批结果", 'b2.common.please_select_audit'),
280
+ type: 'warning',
281
+ });
282
+
283
+ return;
284
+ }
285
+ if (this.isSignatureMust && !this.form.signature && !this.hasDraw) {
286
+ this.$message({
287
+ message: zj.z("请完成签名", 'b2.common.please_complete_sign'),
288
+ type: 'warning',
289
+ });
290
+
291
+ return;
292
+ }
293
+ if (this.isJudgmentMust && !this.form.judgment && !this.hasDraw) {
294
+ this.$message({
295
+ message: zj.z("请填写意见", 'b2.common.please_fill_comment'),
296
+ type: 'warning',
297
+ });
298
+ return;
299
+ }
300
+ if (this.isPhotoMust && _.isEmpty(this.form.photos)) {
301
+ this.$message({
302
+ message: zj.z("请至少上传一张图片", 'b2.common.least_one_image'),
303
+ type: 'warning',
304
+ });
305
+
306
+ return;
307
+ } else if (this.hasDraw) {
308
+ let signatureImg = this.draw.getPNGImage();
309
+ //let url = _.get(this.field, "conf.upload_url");
310
+ this.uploadImage(
311
+ {
312
+ basestr: signatureImg,
313
+ type: "png",
314
+ name: "签名图片.png",
315
+ model: "userfile",
316
+ },
317
+ (md5) => {
318
+ let value = {
319
+ result: form.result,
320
+ signature: md5,
321
+ judgment: form.judgment,
322
+ photos: form.photos,
323
+ audit_at: new Date().getTime() / 1000,
324
+ auditor:
325
+ (zj.app.accessInfo && zj.app.accessInfo.user_info.user_id) ||
326
+ this.userId,
327
+ auditor_name:
328
+ (zj.app.accessInfo && zj.app.accessInfo.user_info.user_name) ||
329
+ this.userName,
330
+ }
331
+ if (form.result == 2 && this.showReject) {
332
+ _.set(value, "reject_target", this.getRejectTarget(form.reject_target))
333
+ }
334
+ this.field.value = value;
335
+ this.opened = false;
336
+ }
337
+ );
338
+ } else {
339
+ let value = {
340
+ result: form.result,
341
+ signature: form.signature,
342
+ judgment: form.judgment,
343
+ photos: form.photos,
344
+ audit_at: new Date().getTime() / 1000,
345
+ auditor:
346
+ (zj.app.accessInfo && zj.app.accessInfo.user_info.user_id) ||
347
+ this.userId,
348
+ auditor_name:
349
+ (zj.app.accessInfo && zj.app.accessInfo.user_info.user_name) ||
350
+ this.userName,
351
+ }
352
+ if (form.result == 2 && this.showReject) {
353
+ _.set(value, "reject_target", this.getRejectTarget(form.reject_target))
354
+ }
355
+ this.field.value = value;
356
+ this.opened = false;
357
+ }
358
+ },
359
+ getRejectTarget(id) {
360
+ let rejectTargetMap = this.rejectTargetMap
361
+ return id == 'last_id' ? { type: 'RejectToLastUserNode' } : _.get(rejectTargetMap, id)
362
+
363
+ },
364
+ //上传图片
365
+ uploadImage({ basestr, type, name, model }, resolve) {
366
+ let text = window.atob(basestr.split(",")[1]);
367
+ let buffer = new ArrayBuffer(text.length);
368
+ let ubuffer = new Uint8Array(buffer);
369
+
370
+ for (let i = 0; i < text.length; i++) {
371
+ ubuffer[i] = text.charCodeAt(i);
372
+ }
373
+
374
+ let Builder = window.WebKitBlobBuilder || window.MozBlobBuilder;
375
+
376
+ let blob;
377
+ if (Builder) {
378
+ let builder = new Builder();
379
+ builder.append(buffer);
380
+ blob = builder.getBlob(type);
381
+ } else {
382
+ blob = new window.Blob([buffer], { type: type });
383
+ }
384
+
385
+ let formdata = new FormData();
386
+ formdata.append(model, blob, name);
387
+
388
+ zj.net.w
389
+ .noapi({
390
+ method: "POST",
391
+ url: "/platform/v1/papi/app_file/upload/",
392
+ data: formdata,
393
+ processData: false,
394
+ contentType: false,
395
+ })
396
+ .then((res) => {
397
+ if (resolve) resolve(res.file_md5);
398
+ });
399
+ },
400
+ handleSpeechToText(evt) {
401
+ this.$refs.input.blur()
402
+ evt.cancelBubble = true
403
+ evt.stopPropagation()
404
+ this.$bpm.getSpeechToText((data) => {
405
+ if (data.text) {
406
+ this.$set(
407
+ this.form,
408
+ "judgment",
409
+ (this.form.judgment || "") + data.text
410
+ );
411
+ }
412
+ });
413
+ },
414
+ },
415
+ };
416
+ </script>
417
+
418
+ <style lang="less" scoped>
419
+ .input-microphone {
420
+ width: 40px;
421
+ display: inline-block;
422
+ margin-right: 8px;
423
+ position: absolute;
424
+ z-index: 10;
425
+ text-align: center;
426
+ right: 0;
427
+ top: 39px;
428
+ font-size: 17px;
429
+ color: #979797;
430
+ }
431
+
432
+ .input-microphone.active {
433
+ color: #2894df;
434
+ }
435
+
436
+ .audit {
437
+ .fa-angle-right {
438
+ font-size: 24px;
439
+ font-weight: 600;
440
+ color: #c1c1c1;
441
+ }
442
+
443
+ .items-center {
444
+ padding-right: 10px;
445
+ display: unset;
446
+ margin: 0;
447
+ }
448
+ }
449
+
450
+ .canvas-box {
451
+ display: flex;
452
+ flex-direction: column;
453
+ width: 100%;
454
+ height: 220px;
455
+ border: 1px dashed #c9c5c5;
456
+ }
457
+
458
+ .audit-modal-content {
459
+ padding: 20px;
460
+ padding-bottom: 30px;
461
+ }
462
+
463
+ canvas {
464
+ flex: 1;
465
+ cursor: crosshair;
466
+ }
467
+
468
+ .ovh {
469
+ overflow: hidden;
470
+ padding: 4px;
471
+ }
472
+
473
+ .modal-footer {
474
+ text-align: center;
475
+
476
+ // position: absolute;
477
+ // bottom: 0;
478
+ // left: 0;
479
+ // width: 100%;
480
+ // z-index: 2;
481
+ button {
482
+ width: 100%;
483
+ }
484
+ }
485
+
486
+ .speech-control {
487
+ color: #2894df;
488
+ float: right;
489
+ margin-top: 5px;
490
+ cursor: pointer;
491
+ }
492
+ </style>
493
+
494
+ <style lang="less">
495
+ .audit-modal {
496
+ .q-field-required {
497
+ .q-field-label-inner::before {
498
+ content: "*";
499
+ color: #f44336 !important;
500
+ font-size: 18px;
501
+ padding-top: 5px;
502
+ padding-right: 5px;
503
+ }
504
+ }
505
+
506
+ .q-field-label {
507
+ color: #333333;
508
+ }
509
+
510
+ .reset-btn {
511
+ .q-btn {
512
+ width: 96px;
513
+ height: 36px;
514
+ background: #ffffff;
515
+ border-radius: 100px;
516
+ box-shadow: -1px 1px 5px -1px rgba(0, 0, 0, 0.18);
517
+ margin-top: 8px;
518
+ }
519
+
520
+ .next-use {
521
+ margin: 15px 0 0 203pt
522
+ }
523
+ }
524
+ }
525
+
526
+ .mobile {
527
+ .audit-modal {
528
+ .reset-btn {
529
+ .next-use {
530
+ margin: 15px 0 0 0 !important;
531
+ }
532
+ }
533
+
534
+ }
535
+ }
536
+
537
+ .modal-scroll {
538
+ max-height: 100vh !important;
539
+ }
540
+
541
+ .audit-modal {
542
+ .modal-body {
543
+ padding: 0;
544
+ }
545
+
546
+ .audit-modal-content {
547
+ padding: 0;
548
+ }
549
+
550
+ .modal-content {
551
+ padding: 14px;
552
+ border-radius: 10px;
553
+ width: 90vw;
554
+ max-height: 90vh !important;
555
+ max-width: 40vw !important;
556
+ }
557
+
558
+ .modal-header {
559
+ font-size: 16px;
560
+ padding: 0;
561
+ }
562
+
563
+ .q-field {
564
+ padding: 0;
565
+ margin: 0;
566
+ margin-top: 10px;
567
+ }
568
+
569
+ .upload-box {
570
+ padding: 0px 5px 0px;
571
+ margin-bottom: 0;
572
+ }
573
+
574
+ .q-layout-header {
575
+ box-shadow: 0 0px 6px -1px rgba(0, 0, 0, 0.1);
576
+ -webkit-box-shadow: 0 0px 6px -1px rgba(0, 0, 0, 0.1);
577
+
578
+ .q-toolbar {
579
+ color: #333 !important;
580
+ }
581
+ }
582
+ }
583
+
584
+ .mobile {
585
+ .modal-footer {
586
+ button {
587
+ margin-top: 7px;
588
+ background: linear-gradient(270deg, #34b2d5, #16a7cf) !important;
589
+ border-radius: 25px;
590
+ height: 44px;
591
+ color: #333;
592
+ margin-bottom: 7px;
593
+ }
594
+ }
595
+
596
+ .audit-modal {
597
+ .modal-content {
598
+ max-width: 90vw !important;
599
+ }
600
+ }
601
+ }
602
+
603
+ .aduit-result {
604
+ padding: 0px 10px;
605
+ border-radius: 15px;
606
+ overflow: hidden;
607
+ line-height: 30px;
608
+ height: 30px;
609
+ box-sizing: border-box;
610
+ display: inline-block;
611
+ vertical-align: middle;
612
+
613
+ }
614
+ </style>
615
+ <style lang="less">
616
+ .bpm-default-input {
617
+ max-width: 100%;
618
+ overflow: hidden;
619
+
620
+ .material-icons {
621
+ width: 26px;
622
+ display: inline-block;
623
+ margin-right: 8px;
624
+ // margin: 0!important;
625
+ // transform: translateX(10px);
626
+ }
627
+
628
+ .q-if-inner {
629
+ padding-right: 22px;
630
+ }
631
+ }
632
+ </style>
633
+
634
+
@@ -0,0 +1,54 @@
1
+ <template>
2
+ <component :is="componentName" :field="fieldConf" v-model="curVal" :fieldConf="fieldConf" :row="row" :container="container" @change="changeVal"></component>
3
+ </template>
4
+
5
+ <script>
6
+ import AuditWithOthers from "./auditor/audit-with-others";
7
+ import AuditSelect from "./auditor/audit-select"
8
+ import AduitNew from "./auditor/audit-new"
9
+ export default {
10
+ props: ["value", "fieldConf", "row","container"],
11
+ components: {
12
+ AuditWithOthers,
13
+ AuditSelect,
14
+ AduitNew
15
+ },
16
+ data(){
17
+ return {
18
+ curVal: {
19
+ result: 1,
20
+ judgment: "",
21
+ photos: [],
22
+ reject_target: "",
23
+ signature: "",
24
+ auditor_name: "",
25
+ audit_at: "",
26
+ auditor: "",
27
+ }
28
+ }
29
+ },
30
+ computed: {
31
+
32
+ componentName() {
33
+ let signature = _.get(this.fieldConf, "signature")
34
+ let jucdgment = _.get(this.fieldConf, "jucdgment")
35
+ let photo = _.get(this.fieldConf, "photo")
36
+ let style = _.get(this.container, "formSchema.audit_style")
37
+ return style == 'collaboration' ? 'AduitNew' : (signature == "yes" || signature == "must" || jucdgment == "yes" || jucdgment == "must" || photo == "yes" || photo == "must" ? 'AuditWithOthers' : 'AuditSelect');
38
+ }
39
+ },
40
+ mounted() {
41
+ if(this.value){
42
+ let value = _.cloneDeep(this.value);
43
+ value.audit_at = value.audit_at * 1000
44
+ this.curVal = _.merge(this.curVal, value)
45
+ }
46
+ },
47
+ methods: {
48
+ changeVal(data) {
49
+ this.$emit("input",data)
50
+ this.$emit("change",data)
51
+ }
52
+ },
53
+ }
54
+ </script>
@@ -1,9 +1,9 @@
1
1
  <template>
2
- <div class="audit">
3
- <div class="row no-wrap relative-position q-chips-input">
4
- <div class="col row items-center q-input-chips" @click="opened = true">
2
+ <div class="audit-editor">
3
+ <div >
4
+ <div @click="opened = true">
5
5
  <span
6
- class="aduit-result"
6
+ class="aduit-result-title"
7
7
  :style="{
8
8
  background: resultColor,
9
9
  color: resultColor ? '#fff' : '#333',
@@ -30,7 +30,7 @@
30
30
  >
31
31
  <el-form-item label="审批结果:">
32
32
  <span
33
- class="aduit-result"
33
+ class="aduit-result-title"
34
34
  :style="{
35
35
  background: resultColor,
36
36
  color: resultColor ? '#fff' : '#333',
@@ -314,3 +314,5 @@ export default {
314
314
  };
315
315
  </script>
316
316
 
317
+
318
+