@zhijiancloud/bpm 0.0.7 → 0.0.8

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 (106) hide show
  1. package/package.json +3 -4
  2. package/components/.DS_Store +0 -0
  3. package/components/api/batch-loader.js +0 -61
  4. package/components/api/index.js +0 -108
  5. package/components/css/bpmAudit.less +0 -13
  6. package/components/css/bpmMulFile.less +0 -62
  7. package/components/css/bpmSelectCheckItem.less +0 -4
  8. package/components/css/bpmSelectEntranceForm.less +0 -62
  9. package/components/css/bpmSelectFromForm.less +0 -10
  10. package/components/css/bpmSelectFromId.less +0 -33
  11. package/components/css/bpmSelectHouseOwner.less +0 -30
  12. package/components/css/bpmSignature.less +0 -40
  13. package/components/css/bpmText.less +0 -39
  14. package/components/css/common.less +0 -43
  15. package/components/css/demo.less +0 -3
  16. package/components/css/demo2.less +0 -3
  17. package/components/css/index.less +0 -8
  18. package/components/lib/bpmAudit/index.js +0 -7
  19. package/components/lib/bpmAudit/src/main.vue +0 -117
  20. package/components/lib/bpmAudit/src/part/auditor/audit-new.vue +0 -534
  21. package/components/lib/bpmAudit/src/part/auditor/audit-select.vue +0 -127
  22. package/components/lib/bpmAudit/src/part/auditor/audit-with-others.vue +0 -634
  23. package/components/lib/bpmAudit/src/part/auditor.vue +0 -54
  24. package/components/lib/bpmAudit/src/part/editor.vue +0 -318
  25. package/components/lib/bpmAudit/src/part/reader.vue +0 -218
  26. package/components/lib/bpmDateTime/index.js +0 -7
  27. package/components/lib/bpmDateTime/src/main.vue +0 -82
  28. package/components/lib/bpmDateTime/src/part/editor.vue +0 -126
  29. package/components/lib/bpmDateTime/src/part/reader.vue +0 -55
  30. package/components/lib/bpmField/index.js +0 -7
  31. package/components/lib/bpmField/src/main.vue +0 -31
  32. package/components/lib/bpmFieldsFilter/index.js +0 -7
  33. package/components/lib/bpmFieldsFilter/src/main.vue +0 -324
  34. package/components/lib/bpmFormField/index.js +0 -7
  35. package/components/lib/bpmFormField/src/lib/form_mixin.js +0 -818
  36. package/components/lib/bpmFormField/src/lib/mixin.js +0 -245
  37. package/components/lib/bpmFormField/src/main.vue +0 -35
  38. package/components/lib/bpmMulFile/index.js +0 -7
  39. package/components/lib/bpmMulFile/src/main.vue +0 -85
  40. package/components/lib/bpmMulFile/src/part/editor.vue +0 -433
  41. package/components/lib/bpmMulFile/src/part/lib/compressImageUtils.js +0 -226
  42. package/components/lib/bpmMulFile/src/part/lib/utils.js +0 -281
  43. package/components/lib/bpmMulFile/src/part/reader.vue +0 -282
  44. package/components/lib/bpmMulImage/index.js +0 -7
  45. package/components/lib/bpmMulImage/src/main.vue +0 -86
  46. package/components/lib/bpmMulImage/src/part/editor.vue +0 -449
  47. package/components/lib/bpmMulImage/src/part/lib/compressImageUtils.js +0 -226
  48. package/components/lib/bpmMulImage/src/part/lib/utils.js +0 -281
  49. package/components/lib/bpmMulImage/src/part/reader.vue +0 -181
  50. package/components/lib/bpmNumber/index.js +0 -7
  51. package/components/lib/bpmNumber/src/main.vue +0 -83
  52. package/components/lib/bpmNumber/src/part/editor.vue +0 -47
  53. package/components/lib/bpmNumber/src/part/reader.vue +0 -7
  54. package/components/lib/bpmSelect/index.js +0 -7
  55. package/components/lib/bpmSelect/src/main.vue +0 -90
  56. package/components/lib/bpmSelect/src/part/editor.vue +0 -75
  57. package/components/lib/bpmSelect/src/part/reader.vue +0 -53
  58. package/components/lib/bpmSelectCheckItem/index.js +0 -7
  59. package/components/lib/bpmSelectCheckItem/src/main.vue +0 -101
  60. package/components/lib/bpmSelectCheckItem/src/part/editor.vue +0 -103
  61. package/components/lib/bpmSelectCheckItem/src/part/reader.vue +0 -7
  62. package/components/lib/bpmSelectEntranceForm/index.js +0 -7
  63. package/components/lib/bpmSelectEntranceForm/src/main.vue +0 -529
  64. package/components/lib/bpmSelectFromField/index.js +0 -7
  65. package/components/lib/bpmSelectFromField/src/main.vue +0 -98
  66. package/components/lib/bpmSelectFromField/src/part/editor.vue +0 -96
  67. package/components/lib/bpmSelectFromField/src/part/reader.vue +0 -7
  68. package/components/lib/bpmSelectFromForm/index.js +0 -7
  69. package/components/lib/bpmSelectFromForm/src/main.vue +0 -103
  70. package/components/lib/bpmSelectFromForm/src/part/editor.vue +0 -178
  71. package/components/lib/bpmSelectFromForm/src/part/reader.vue +0 -7
  72. package/components/lib/bpmSelectFromId/index.js +0 -7
  73. package/components/lib/bpmSelectFromId/src/main.vue +0 -102
  74. package/components/lib/bpmSelectFromId/src/part/editor.vue +0 -260
  75. package/components/lib/bpmSelectFromId/src/part/reader.vue +0 -7
  76. package/components/lib/bpmSelectHouseOwner/index.js +0 -7
  77. package/components/lib/bpmSelectHouseOwner/src/main.vue +0 -102
  78. package/components/lib/bpmSelectHouseOwner/src/part/editor.vue +0 -101
  79. package/components/lib/bpmSelectHouseOwner/src/part/reader.vue +0 -17
  80. package/components/lib/bpmSelectIssue/index.js +0 -7
  81. package/components/lib/bpmSelectIssue/src/main.vue +0 -180
  82. package/components/lib/bpmSignature/index.js +0 -7
  83. package/components/lib/bpmSignature/src/main.vue +0 -248
  84. package/components/lib/bpmSubForm/index.js +0 -7
  85. package/components/lib/bpmSubForm/src/main.vue +0 -203
  86. package/components/lib/bpmText/index.ts +0 -13
  87. package/components/lib/bpmText/src/main.vue +0 -87
  88. package/components/lib/bpmText/src/part/editor.vue +0 -104
  89. package/components/lib/bpmText/src/part/reader.vue +0 -7
  90. package/components/lib/bpmTime/index.js +0 -7
  91. package/components/lib/bpmTime/src/main.vue +0 -83
  92. package/components/lib/bpmTime/src/part/editor.vue +0 -55
  93. package/components/lib/bpmTime/src/part/reader.vue +0 -24
  94. package/components/lib/demo/index.js +0 -7
  95. package/components/lib/demo/src/main.vue +0 -11
  96. package/components/lib/demo2/index.js +0 -7
  97. package/components/lib/demo2/src/main.vue +0 -11
  98. package/components/lib/field-const.js +0 -472
  99. package/components/lib/index.ts +0 -102
  100. package/components/lib/mixins/RemoteSelectReader.vue +0 -55
  101. package/components/lib/mixins/TextReader.vue +0 -22
  102. package/components/lib/net.js +0 -21
  103. package/components/lib/utils.js +0 -89
  104. package/components/mixins/field_base_mixin.vue +0 -188
  105. package/components/sfc.d.ts +0 -27
  106. package/components/vendor/draw.js +0 -240
@@ -1,634 +0,0 @@
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
-
@@ -1,54 +0,0 @@
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>