@zscreate/zhxy-app-component 1.0.0 → 1.0.2
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.
- package/components/evan-form-item/evan-form-item.vue +52 -37
- package/components/evan-form-item/mixins/valueChangeMixin.js +3 -2
- package/components/form-container/form-container.vue +37 -22
- package/components/l-file/l-file.vue +7 -0
- package/components/uni-rate/uni-rate.vue +352 -131
- package/package.json +1 -1
- package/static/uni.css +1449 -0
|
@@ -12,8 +12,19 @@
|
|
|
12
12
|
<img src="./modules/edit.png" alt="">
|
|
13
13
|
</view>
|
|
14
14
|
<slot></slot>
|
|
15
|
+
|
|
16
|
+
<view v-if="widget.type ==='custom'" class="evan-form-item-container" :class="'evan-form-item-container--' + labelPosition"
|
|
17
|
+
:style="{borderWidth:border?'1upx':0}">
|
|
18
|
+
<view class="evan-form-item-container__label"
|
|
19
|
+
:class="{showAsteriskRect:hasRequiredAsterisk,isRequired:showRequiredAsterisk}" :style="mLabelStyle">
|
|
20
|
+
{{widget.name}}
|
|
21
|
+
</view>
|
|
22
|
+
<view class="evan-form-item-container__main" :style="mContentStyle">
|
|
23
|
+
<slot name="custom"></slot>
|
|
24
|
+
</view>
|
|
25
|
+
</view>
|
|
15
26
|
<!-- input -->
|
|
16
|
-
<view v-if="widget.type ==='input'" class="evan-form-item-container" :class="'evan-form-item-container--
|
|
27
|
+
<view v-if="widget.type ==='input'" class="evan-form-item-container" :class="'evan-form-item-container--' + labelPosition"
|
|
17
28
|
:style="{borderWidth:border?'1upx':0}">
|
|
18
29
|
<view class="evan-form-item-container__label"
|
|
19
30
|
:class="{showAsteriskRect:hasRequiredAsterisk,isRequired:showRequiredAsterisk}" :style="mLabelStyle">
|
|
@@ -27,7 +38,7 @@
|
|
|
27
38
|
|
|
28
39
|
<!-- uploadModel -->
|
|
29
40
|
<view v-else-if="widget.type ==='uploadModel'" class="evan-form-item-container"
|
|
30
|
-
:class="'evan-form-item-container--
|
|
41
|
+
:class="'evan-form-item-container--' + labelPosition" :style="{borderWidth:border?'1upx':0}">
|
|
31
42
|
<view class="evan-form-item-container__label"
|
|
32
43
|
:class="{showAsteriskRect:hasRequiredAsterisk,isRequired:showRequiredAsterisk}" :style="mLabelStyle">
|
|
33
44
|
{{widget.name}}
|
|
@@ -44,7 +55,7 @@
|
|
|
44
55
|
|
|
45
56
|
<!-- textarea -->
|
|
46
57
|
<view v-else-if="widget.type ==='textarea'" class="evan-form-item-container"
|
|
47
|
-
:class="'evan-form-item-container--
|
|
58
|
+
:class="'evan-form-item-container--' + labelPosition" :style="{borderWidth:border?'1upx':0}">
|
|
48
59
|
<view class="evan-form-item-container__label"
|
|
49
60
|
:class="{showAsteriskRect:hasRequiredAsterisk,isRequired:showRequiredAsterisk}" :style="mLabelStyle">
|
|
50
61
|
{{widget.name}}
|
|
@@ -59,17 +70,16 @@
|
|
|
59
70
|
|
|
60
71
|
<!-- rate -->
|
|
61
72
|
<view v-else-if="widget.type ==='rate'" class="evan-form-item-container"
|
|
62
|
-
:class="'evan-form-item-container--
|
|
73
|
+
:class="'evan-form-item-container--' + labelPosition" :style="{borderWidth:border?'1upx':0}">
|
|
63
74
|
<view class="evan-form-item-container__label"
|
|
64
75
|
:class="{showAsteriskRect:hasRequiredAsterisk,isRequired:showRequiredAsterisk}" :style="mLabelStyle">
|
|
65
76
|
{{widget.name}}
|
|
66
77
|
</view>
|
|
67
78
|
<view class="evan-form-item-container__main" :style="mContentStyle">
|
|
68
|
-
<uni-rate
|
|
79
|
+
<uni-rate allow-half :min="widget.options.min ? widget.options.min : 0" size="18"
|
|
69
80
|
:max="widget.options.max ? widget.options.max : 1000000" :value="dataModel" @change="changeRate"
|
|
70
81
|
:disabled="widget.options.disabled">
|
|
71
82
|
</uni-rate>
|
|
72
|
-
|
|
73
83
|
<view class="u_close" v-if="!widget.options.disabled" @click="dataModel = 0">
|
|
74
84
|
<u-icon name="close-circle" color="#999999" size="38"></u-icon>
|
|
75
85
|
</view>
|
|
@@ -77,7 +87,7 @@
|
|
|
77
87
|
</view>
|
|
78
88
|
|
|
79
89
|
<!-- radio -->
|
|
80
|
-
<view v-else-if="widget.type ==='radio'" :class="'evan-form-item-container--
|
|
90
|
+
<view v-else-if="widget.type ==='radio'" :class="'evan-form-item-container--' + labelPosition"
|
|
81
91
|
:style="{borderWidth:border?'1upx':0}">
|
|
82
92
|
<view class="radio-height evan-form-item-container__label"
|
|
83
93
|
:class="{showAsteriskRect:hasRequiredAsterisk,isRequired:showRequiredAsterisk}"
|
|
@@ -101,7 +111,7 @@
|
|
|
101
111
|
|
|
102
112
|
<!-- switch -->
|
|
103
113
|
<view v-else-if="widget.type ==='switch'" class="evan-form-item-container"
|
|
104
|
-
:class="'evan-form-item-container--
|
|
114
|
+
:class="'evan-form-item-container--' + labelPosition" :style="{borderWidth:border?'1upx':0}">
|
|
105
115
|
<view class="evan-form-item-container__label"
|
|
106
116
|
:class="{showAsteriskRect:hasRequiredAsterisk,isRequired:showRequiredAsterisk}" :style="mLabelStyle">
|
|
107
117
|
{{widget.name}}
|
|
@@ -114,7 +124,7 @@
|
|
|
114
124
|
|
|
115
125
|
<!-- slider -->
|
|
116
126
|
<view v-else-if="widget.type ==='slider'" class="evan-form-item-container"
|
|
117
|
-
:class="'evan-form-item-container--
|
|
127
|
+
:class="'evan-form-item-container--' + labelPosition" :style="{borderWidth:border?'1upx':0}">
|
|
118
128
|
<view class="evan-form-item-container__label"
|
|
119
129
|
:class="{showAsteriskRect:hasRequiredAsterisk,isRequired:showRequiredAsterisk}" :style="mLabelStyle">
|
|
120
130
|
{{widget.name}}
|
|
@@ -128,7 +138,7 @@
|
|
|
128
138
|
|
|
129
139
|
<!-- checkbox -->
|
|
130
140
|
<view v-else-if="widget.type ==='checkbox'" @click.native="isClickByUser = true"
|
|
131
|
-
:class="'evan-form-item-container--
|
|
141
|
+
:class="'evan-form-item-container--' + labelPosition" :style="{borderWidth:border?'1upx':0}">
|
|
132
142
|
<view class="radio-height evan-form-item-container__label"
|
|
133
143
|
:class="{showAsteriskRect:hasRequiredAsterisk,isRequired:showRequiredAsterisk}"
|
|
134
144
|
style="padding-left: 30rpx;" :style="mLabelStyle">{{widget.name}}</view>
|
|
@@ -153,7 +163,7 @@
|
|
|
153
163
|
|
|
154
164
|
<!-- date -->
|
|
155
165
|
<view v-else-if="widget.type ==='date'" class="evan-form-item-container"
|
|
156
|
-
:class="'evan-form-item-container--
|
|
166
|
+
:class="'evan-form-item-container--' + labelPosition" :style="{borderWidth:border?'1upx':0}">
|
|
157
167
|
<view class="evan-form-item-container__label"
|
|
158
168
|
:class="{showAsteriskRect:hasRequiredAsterisk,isRequired:showRequiredAsterisk}" :style="mLabelStyle">
|
|
159
169
|
{{widget.name}}
|
|
@@ -192,7 +202,7 @@
|
|
|
192
202
|
|
|
193
203
|
<!-- time -->
|
|
194
204
|
<view v-else-if="widget.type ==='time'" class="evan-form-item-container"
|
|
195
|
-
:class="'evan-form-item-container--
|
|
205
|
+
:class="'evan-form-item-container--' + labelPosition" :style="{borderWidth:border?'1upx':0}">
|
|
196
206
|
<view class="evan-form-item-container__label"
|
|
197
207
|
:class="{showAsteriskRect:hasRequiredAsterisk,isRequired:showRequiredAsterisk}" :style="mLabelStyle">
|
|
198
208
|
{{widget.name}}
|
|
@@ -224,7 +234,7 @@
|
|
|
224
234
|
|
|
225
235
|
<!-- color -->
|
|
226
236
|
<view v-else-if="widget.type ==='color'" class="evan-form-item-container"
|
|
227
|
-
:class="'evan-form-item-container--
|
|
237
|
+
:class="'evan-form-item-container--' + labelPosition" :style="{borderWidth:border?'1upx':0}">
|
|
228
238
|
<view class="evan-form-item-container__label"
|
|
229
239
|
:class="{showAsteriskRect:hasRequiredAsterisk,isRequired:showRequiredAsterisk}" :style="mLabelStyle">
|
|
230
240
|
{{widget.name}}
|
|
@@ -237,7 +247,7 @@
|
|
|
237
247
|
|
|
238
248
|
<!-- imgupload -->
|
|
239
249
|
<view v-else-if="widget.type ==='imgupload'" class="evan-form-item-container"
|
|
240
|
-
:class="'evan-form-item-container--
|
|
250
|
+
:class="'evan-form-item-container--' + labelPosition" :style="{borderWidth:border?'1upx':0}">
|
|
241
251
|
<view class="evan-form-item-container__label"
|
|
242
252
|
:class="{showAsteriskRect:hasRequiredAsterisk,isRequired:showRequiredAsterisk}" :style="mLabelStyle">
|
|
243
253
|
{{widget.name}}
|
|
@@ -249,7 +259,7 @@
|
|
|
249
259
|
|
|
250
260
|
<!-- fileupload -->
|
|
251
261
|
<view v-else-if="widget.type ==='fileupload'" class="evan-form-item-container"
|
|
252
|
-
:class="'evan-form-item-container--
|
|
262
|
+
:class="'evan-form-item-container--' + labelPosition" :style="{borderWidth:border?'1upx':0}">
|
|
253
263
|
<view class="evan-form-item-container__label"
|
|
254
264
|
:class="{showAsteriskRect:hasRequiredAsterisk,isRequired:showRequiredAsterisk}" :style="mLabelStyle">
|
|
255
265
|
{{widget.name}}
|
|
@@ -263,7 +273,7 @@
|
|
|
263
273
|
|
|
264
274
|
<!-- editor -->
|
|
265
275
|
<!-- <view v-else-if="widget.type ==='editor'" class="evan-form-item-container"
|
|
266
|
-
:class="'evan-form-item-container--
|
|
276
|
+
:class="'evan-form-item-container--' + labelPosition" :style="{borderWidth:border?'1upx':0}">
|
|
267
277
|
<view class="evan-form-item-container__label"
|
|
268
278
|
:class="{showAsteriskRect:hasRequiredAsterisk,isRequired:showRequiredAsterisk}" :style="mLabelStyle">
|
|
269
279
|
{{widget.name}}
|
|
@@ -277,13 +287,13 @@
|
|
|
277
287
|
|
|
278
288
|
<!-- cascader -->
|
|
279
289
|
<view v-else-if="widget.type ==='cascader'" class="evan-form-item-container"
|
|
280
|
-
:class="'evan-form-item-container--
|
|
290
|
+
:class="'evan-form-item-container--' + labelPosition" :style="{borderWidth:border?'1upx':0}">
|
|
281
291
|
<view class="evan-form-item-container__label"
|
|
282
292
|
:class="{showAsteriskRect:hasRequiredAsterisk,isRequired:showRequiredAsterisk}" :style="mLabelStyle">
|
|
283
293
|
{{widget.name}}
|
|
284
294
|
</view>
|
|
285
295
|
<view class="evan-form-item-container__main" :style="mContentStyle">
|
|
286
|
-
<lb-picker ref="picker" v-model="dataModel" @change="
|
|
296
|
+
<lb-picker ref="picker" v-model="dataModel" @change="cityChecked" :value="widget.options.defaultValue"
|
|
287
297
|
:disabled="widget.options.disabled">
|
|
288
298
|
</lb-picker>
|
|
289
299
|
</view>
|
|
@@ -291,7 +301,7 @@
|
|
|
291
301
|
|
|
292
302
|
<!-- number -->
|
|
293
303
|
<view v-else-if="widget.type ==='number'" class="evan-form-item-container"
|
|
294
|
-
:class="'evan-form-item-container--
|
|
304
|
+
:class="'evan-form-item-container--' + labelPosition" :style="{borderWidth:border?'1upx':0}">
|
|
295
305
|
<view class="evan-form-item-container__label"
|
|
296
306
|
:class="{showAsteriskRect:hasRequiredAsterisk,isRequired:showRequiredAsterisk}" :style="mLabelStyle">
|
|
297
307
|
{{widget.name}}
|
|
@@ -307,7 +317,7 @@
|
|
|
307
317
|
|
|
308
318
|
<!-- codeControl -->
|
|
309
319
|
<view v-else-if="widget.type ==='codeControl'" class="evan-form-item-container"
|
|
310
|
-
:class="'evan-form-item-container--
|
|
320
|
+
:class="'evan-form-item-container--' + labelPosition" :style="{borderWidth:border?'1upx':0}">
|
|
311
321
|
<view class="evan-form-item-container__label"
|
|
312
322
|
:class="{showAsteriskRect:hasRequiredAsterisk,isRequired:showRequiredAsterisk}" :style="mLabelStyle">
|
|
313
323
|
{{widget.name}}
|
|
@@ -319,7 +329,7 @@
|
|
|
319
329
|
|
|
320
330
|
<!-- superLink -->
|
|
321
331
|
<view v-else-if="widget.type ==='superLink'" class="evan-form-item-container"
|
|
322
|
-
:class="'evan-form-item-container--
|
|
332
|
+
:class="'evan-form-item-container--' + labelPosition" :style="{borderWidth:border?'1upx':0}">
|
|
323
333
|
<view class="evan-form-item-container__label"
|
|
324
334
|
:class="{showAsteriskRect:hasRequiredAsterisk,isRequired:showRequiredAsterisk}" :style="mLabelStyle">
|
|
325
335
|
{{widget.name}}
|
|
@@ -333,7 +343,7 @@
|
|
|
333
343
|
|
|
334
344
|
<!-- placeholder -->
|
|
335
345
|
<view v-else-if="widget.type ==='placeholder'" class="evan-form-item-container"
|
|
336
|
-
:class="'evan-form-item-container--
|
|
346
|
+
:class="'evan-form-item-container--' + labelPosition" :style="{borderWidth:border?'1upx':0}">
|
|
337
347
|
<view class="evan-form-item-container__label"
|
|
338
348
|
:class="{showAsteriskRect:hasRequiredAsterisk,isRequired:showRequiredAsterisk}" :style="mLabelStyle">
|
|
339
349
|
{{widget.name}}
|
|
@@ -348,7 +358,7 @@
|
|
|
348
358
|
|
|
349
359
|
<!-- signature-write -->
|
|
350
360
|
<view v-else-if="widget.type ==='signature-write'" class="evan-form-item-container"
|
|
351
|
-
:class="'evan-form-item-container--
|
|
361
|
+
:class="'evan-form-item-container--' + labelPosition" :style="{borderWidth:border?'1upx':0}">
|
|
352
362
|
<view class="evan-form-item-container__label"
|
|
353
363
|
:class="{showAsteriskRect:hasRequiredAsterisk,isRequired:showRequiredAsterisk}" :style="mLabelStyle">
|
|
354
364
|
{{widget.name}}
|
|
@@ -371,7 +381,7 @@
|
|
|
371
381
|
|
|
372
382
|
<!-- select -->
|
|
373
383
|
<view v-else-if="widget.type ==='select'" class="evan-form-item-container"
|
|
374
|
-
:class="'evan-form-item-container--
|
|
384
|
+
:class="'evan-form-item-container--' + labelPosition" :style="{borderWidth:border?'1upx':0}">
|
|
375
385
|
<view class="evan-form-item-container__label"
|
|
376
386
|
:class="{showAsteriskRect:hasRequiredAsterisk,isRequired:showRequiredAsterisk}" :style="mLabelStyle">
|
|
377
387
|
{{widget.name}}
|
|
@@ -385,7 +395,7 @@
|
|
|
385
395
|
|
|
386
396
|
<!-- userSelector -->
|
|
387
397
|
<view v-else-if="widget.type ==='userSelector'" @click.native="isClickByUser = true"
|
|
388
|
-
class="evan-form-item-container" :class="'evan-form-item-container--
|
|
398
|
+
class="evan-form-item-container" :class="'evan-form-item-container--' + labelPosition"
|
|
389
399
|
:style="{borderWidth:border?'1upx':0}">
|
|
390
400
|
<view class="evan-form-item-container__label"
|
|
391
401
|
:class="{showAsteriskRect:hasRequiredAsterisk,isRequired:showRequiredAsterisk}" :style="mLabelStyle">
|
|
@@ -401,7 +411,7 @@
|
|
|
401
411
|
|
|
402
412
|
<!-- deptSelector -->
|
|
403
413
|
<view v-else-if="widget.type ==='deptSelector'" class="evan-form-item-container"
|
|
404
|
-
:class="'evan-form-item-container--
|
|
414
|
+
:class="'evan-form-item-container--' + labelPosition" :style="{borderWidth:border?'1upx':0}">
|
|
405
415
|
<view class="evan-form-item-container__label"
|
|
406
416
|
:class="{showAsteriskRect:hasRequiredAsterisk,isRequired:showRequiredAsterisk}" :style="mLabelStyle">
|
|
407
417
|
{{widget.name}}
|
|
@@ -417,7 +427,7 @@
|
|
|
417
427
|
|
|
418
428
|
<!-- relateSub -->
|
|
419
429
|
<view v-else-if="widget.type ==='relateSub'" class="evan-form-item-container"
|
|
420
|
-
:class="'evan-form-item-container--
|
|
430
|
+
:class="'evan-form-item-container--' + labelPosition" :style="{borderWidth:border?'1upx':0}">
|
|
421
431
|
<view class="evan-form-item-container__label"
|
|
422
432
|
:class="{showAsteriskRect:hasRequiredAsterisk,isRequired:showRequiredAsterisk}" :style="mLabelStyle">
|
|
423
433
|
{{widget.name}}
|
|
@@ -442,6 +452,7 @@
|
|
|
442
452
|
import jinEdit from '../../components/jin-edit/jin-edit.vue';
|
|
443
453
|
import LbPicker from '../../components/lb-picker/index.vue';
|
|
444
454
|
import MyPicker from '../../components/dying318-picker/Pickers.vue';
|
|
455
|
+
import UniRate from '../../components/uni-rate/uni-rate.vue';
|
|
445
456
|
import Pubsub from 'pubsub-js'
|
|
446
457
|
import {
|
|
447
458
|
computedMixin
|
|
@@ -461,6 +472,7 @@
|
|
|
461
472
|
export default {
|
|
462
473
|
mixins: [computedMixin, validateFormMixin, pubSubMixin, valueChangeMixin],
|
|
463
474
|
components: {
|
|
475
|
+
UniRate,
|
|
464
476
|
tColorPicker,
|
|
465
477
|
unploadFile,
|
|
466
478
|
lFile,
|
|
@@ -509,7 +521,7 @@
|
|
|
509
521
|
}
|
|
510
522
|
return ['top', 'left'].indexOf(value) !== -1
|
|
511
523
|
},
|
|
512
|
-
default: ''
|
|
524
|
+
default: 'top'
|
|
513
525
|
}
|
|
514
526
|
},
|
|
515
527
|
filters: {
|
|
@@ -540,7 +552,7 @@
|
|
|
540
552
|
showFalseMsg: '',
|
|
541
553
|
signatrueFlag: false,
|
|
542
554
|
signatrueImage: '',
|
|
543
|
-
dataModel:
|
|
555
|
+
dataModel: '',
|
|
544
556
|
// firstValidateField: true,//第一次校验
|
|
545
557
|
isScroll: false,
|
|
546
558
|
dataModelShow: '',
|
|
@@ -567,6 +579,7 @@
|
|
|
567
579
|
beforeMount() {
|
|
568
580
|
let widget = this.widget;
|
|
569
581
|
let model = widget.model;
|
|
582
|
+
if (!widget.options) return
|
|
570
583
|
// 时间比较增加校验规则
|
|
571
584
|
if (widget.options.condition && widget.options.conditionValue) {
|
|
572
585
|
let model = widget.model;
|
|
@@ -1065,7 +1078,7 @@
|
|
|
1065
1078
|
uni.navigateTo({
|
|
1066
1079
|
url: '/pages/picker/picker?departRelation=' + (this.widget.options.departRelation ? 1 : 0) + '&departId=' + departId + '&departName=' + departName +'&sign=' + PubsubSign + '&multiple=' + flag + '&roleId=' + (this
|
|
1067
1080
|
.widget.options.role ? this.widget.options.role : '') + '&selectedData=' + JSON
|
|
1068
|
-
.stringify(this.dataModel)
|
|
1081
|
+
.stringify(this.dataModel ? this.dataModel : [])
|
|
1069
1082
|
});
|
|
1070
1083
|
},
|
|
1071
1084
|
// select报修人员
|
|
@@ -1111,7 +1124,7 @@
|
|
|
1111
1124
|
var departType = this.widget.options.departType ? this.widget.options.departType : ''
|
|
1112
1125
|
uni.navigateTo({
|
|
1113
1126
|
url: '/pages/picker/depart?sign=' + PubsubSign + '&multiple=' + flag + '&departRela=' +
|
|
1114
|
-
departRela + '&selectedDepart=' + JSON.stringify(this.dataModel) + '&departType=' +
|
|
1127
|
+
departRela + '&selectedDepart=' + JSON.stringify(this.dataModel ? this.dataModel : []) + '&departType=' +
|
|
1115
1128
|
departType
|
|
1116
1129
|
});
|
|
1117
1130
|
},
|
|
@@ -1205,6 +1218,7 @@
|
|
|
1205
1218
|
|
|
1206
1219
|
|
|
1207
1220
|
<style lang="scss" scoped>
|
|
1221
|
+
@import "../../static/uni.css";
|
|
1208
1222
|
$form-item-bottom-padding:20rpx; // 每个组件底部间隔
|
|
1209
1223
|
|
|
1210
1224
|
icon {
|
|
@@ -1294,7 +1308,7 @@
|
|
|
1294
1308
|
font-size: $uni-form-title-font-size;
|
|
1295
1309
|
color: #666;
|
|
1296
1310
|
height: 70upx;
|
|
1297
|
-
line-height:
|
|
1311
|
+
line-height: 70upx;
|
|
1298
1312
|
// padding: 12upx 0 0 0;
|
|
1299
1313
|
display: inline-block;
|
|
1300
1314
|
padding-left: $uni-form-padding-left;
|
|
@@ -1307,8 +1321,8 @@
|
|
|
1307
1321
|
padding-left: 10upx;
|
|
1308
1322
|
}
|
|
1309
1323
|
|
|
1310
|
-
&.isRequired::
|
|
1311
|
-
padding-
|
|
1324
|
+
&.isRequired::before {
|
|
1325
|
+
padding-right: 10upx;
|
|
1312
1326
|
content: '*';
|
|
1313
1327
|
color: red;
|
|
1314
1328
|
}
|
|
@@ -1322,7 +1336,6 @@
|
|
|
1322
1336
|
overflow: hidden;
|
|
1323
1337
|
justify-content: flex-start;
|
|
1324
1338
|
padding-left: $uni-form-padding-left;
|
|
1325
|
-
z-index: 10;
|
|
1326
1339
|
|
|
1327
1340
|
.form-input {
|
|
1328
1341
|
font-size: $uni-form-content-font-size;
|
|
@@ -1354,9 +1367,9 @@
|
|
|
1354
1367
|
}
|
|
1355
1368
|
}
|
|
1356
1369
|
|
|
1357
|
-
.form-input-placeholder {
|
|
1370
|
+
/deep/ .form-input-placeholder {
|
|
1358
1371
|
// line-height: 90upx;
|
|
1359
|
-
color: #
|
|
1372
|
+
color: #555;
|
|
1360
1373
|
}
|
|
1361
1374
|
|
|
1362
1375
|
.form-textarea-placeholder {
|
|
@@ -1400,6 +1413,8 @@
|
|
|
1400
1413
|
width: 100%;
|
|
1401
1414
|
min-width: 100rpx;
|
|
1402
1415
|
height: 100%;
|
|
1416
|
+
display: flex;
|
|
1417
|
+
align-items: center;
|
|
1403
1418
|
}
|
|
1404
1419
|
|
|
1405
1420
|
/**checkbox radio*/
|
|
@@ -44,8 +44,9 @@ export const valueChangeMixin = {
|
|
|
44
44
|
}
|
|
45
45
|
this.dataModel = values
|
|
46
46
|
},
|
|
47
|
-
changeTime(e, index) {
|
|
47
|
+
changeTime(e, index) {
|
|
48
48
|
if (this.widget.options.isRange) {
|
|
49
|
+
if (!Array.isArray(this.dataModel)) this.dataModel = []
|
|
49
50
|
this.$set(this.dataModel, index, e.value)
|
|
50
51
|
} else {
|
|
51
52
|
this.dataModel = e.value
|
|
@@ -61,4 +62,4 @@ export const valueChangeMixin = {
|
|
|
61
62
|
}
|
|
62
63
|
},
|
|
63
64
|
}
|
|
64
|
-
}
|
|
65
|
+
}
|
|
@@ -23,6 +23,7 @@
|
|
|
23
23
|
<view class="view-port" v-show="tableRowsShow[item.model][tableCIndex]">
|
|
24
24
|
<view v-for="(tableItem, tableItemIndex) in table.columns" :key="tableItemIndex">
|
|
25
25
|
<evan-form-item v-show="tableItem.options.canView"
|
|
26
|
+
:labelPosition="labelPosition"
|
|
26
27
|
@upDateWidget="upDateTableWidget" :itemkey="tableItemIndex"
|
|
27
28
|
:tableKey="item.model" :tableIndex="tableCIndex" :prop="tableItem.model"
|
|
28
29
|
:ref="String(Math.random()).split('.')[1]" :models.sync="models"
|
|
@@ -42,7 +43,7 @@
|
|
|
42
43
|
<template v-else-if="item.type === 'all-lay-out' && item.options.canView">
|
|
43
44
|
<view v-for="(colItem, colIndex) in item.columns" :key="colIndex">
|
|
44
45
|
<view v-for="(col, itemIndex) in colItem.list" :key="itemIndex">
|
|
45
|
-
<evan-form-item :isCorrect="isCorrect" :prop="col.model"
|
|
46
|
+
<evan-form-item :isCorrect="isCorrect" :labelPosition="labelPosition" :prop="col.model"
|
|
46
47
|
:ref="String(Math.random()).split('.')[1]" :models.sync="models" :rules="rules"
|
|
47
48
|
:widget="col" :isDraft="isDraft" :formId="formId" :linkage="linkage" :isApply="isApply">
|
|
48
49
|
</evan-form-item>
|
|
@@ -53,7 +54,7 @@
|
|
|
53
54
|
<template v-else-if="item.type === 'grid-lay-out' && item.options.canView">
|
|
54
55
|
<view v-for="(colItem, colIndex) in item.columns" :key="colIndex">
|
|
55
56
|
<view v-for="(col, itemIndex) in colItem.list" :key="itemIndex">
|
|
56
|
-
<evan-form-item :isCorrect="isCorrect" :prop="col.model"
|
|
57
|
+
<evan-form-item :isCorrect="isCorrect" :labelPosition="labelPosition" :prop="col.model"
|
|
57
58
|
:ref="String(Math.random()).split('.')[1]" :models.sync="models" :rules="rules"
|
|
58
59
|
:widget="col" :isDraft="isDraft" :formId="formId" :linkage="linkage" :isApply="isApply">
|
|
59
60
|
</evan-form-item>
|
|
@@ -64,7 +65,7 @@
|
|
|
64
65
|
<template v-else-if="item.type === 'grid' && item.options.canView">
|
|
65
66
|
<view v-for="(colItem, colIndex) in item.columns" :key="colIndex">
|
|
66
67
|
<view v-for="(col, itemIndex) in colItem.list" :key="itemIndex">
|
|
67
|
-
<evan-form-item :isCorrect="isCorrect" :prop="col.model"
|
|
68
|
+
<evan-form-item :isCorrect="isCorrect" :labelPosition="labelPosition" :prop="col.model"
|
|
68
69
|
:ref="String(Math.random()).split('.')[1]" :models.sync="models" :rules="rules"
|
|
69
70
|
:widget="col" :isDraft="isDraft" :formId="formId" :linkage="linkage" :isApply="isApply">
|
|
70
71
|
</evan-form-item>
|
|
@@ -111,7 +112,7 @@
|
|
|
111
112
|
|
|
112
113
|
<template v-else>
|
|
113
114
|
<view :key="index" v-show="item.options.canView">
|
|
114
|
-
<evan-form-item @upDateWidget="upDateWidget" :isCorrect="isCorrect" :prop="item.model"
|
|
115
|
+
<evan-form-item @upDateWidget="upDateWidget" :labelPosition="labelPosition" :isCorrect="isCorrect" :prop="item.model"
|
|
115
116
|
:ref="String(Math.random()).split('.')[1]" :models.sync="models" :rules="rules"
|
|
116
117
|
:widget="item" :itemkey="index" :isDraft="isDraft" :formId="formId" :linkage="linkage"
|
|
117
118
|
:isApply="isApply">
|
|
@@ -134,7 +135,7 @@
|
|
|
134
135
|
import evanForm from "../evan-form/evan-form";
|
|
135
136
|
export default {
|
|
136
137
|
name: 'formContainer',
|
|
137
|
-
props: ['dataObj', 'value', 'isButton', 'verifyNode', 'suggest', 'isCorrect', 'isDraft', 'formId', 'linkage',
|
|
138
|
+
props: ['dataObj', 'value', 'isButton', 'verifyNode', 'suggest', 'isCorrect', 'isDraft', 'formId', 'linkage', "labelPosition",
|
|
138
139
|
'isApply'
|
|
139
140
|
],
|
|
140
141
|
components: { evanFormItem ,evanForm },
|
|
@@ -203,23 +204,28 @@
|
|
|
203
204
|
this.isScroll = true;
|
|
204
205
|
}
|
|
205
206
|
},
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
207
|
+
dataObj: {
|
|
208
|
+
handler(v) {
|
|
209
|
+
if (this.dataObj && this.dataObj.list) {
|
|
210
|
+
this.rules = {};
|
|
211
|
+
this.generateModle(this.dataObj.list);
|
|
212
|
+
console.log(this.models)
|
|
213
|
+
console.log(JSON.stringify(this.models))
|
|
214
|
+
}
|
|
215
|
+
},
|
|
216
|
+
immediate: true
|
|
217
|
+
},
|
|
218
|
+
value: {
|
|
219
|
+
handler(v) {
|
|
220
|
+
if (this.dataObj && this.dataObj.list) {
|
|
221
|
+
this.rules = {};
|
|
222
|
+
this.generateModle(this.dataObj.list);
|
|
223
|
+
console.log(this.models)
|
|
224
|
+
console.log(JSON.stringify(this.models))
|
|
225
|
+
}
|
|
226
|
+
},
|
|
227
|
+
immediate: true
|
|
228
|
+
},
|
|
223
229
|
suggest(v) {
|
|
224
230
|
this.selectList = v
|
|
225
231
|
},
|
|
@@ -262,6 +268,15 @@
|
|
|
262
268
|
// console.log(this.$children[0])
|
|
263
269
|
// this.handlerelation(this.$children[0].$children)
|
|
264
270
|
},
|
|
271
|
+
// 更新所有组件的值
|
|
272
|
+
updateAllComponentValue() {
|
|
273
|
+
for(const key in this.$refs) {
|
|
274
|
+
this.$refs[key] && [].concat(this.$refs[key]).forEach(item => {
|
|
275
|
+
item.updateDataModel && item.updateDataModel()
|
|
276
|
+
item.showFormData && item.showFormData()
|
|
277
|
+
})
|
|
278
|
+
}
|
|
279
|
+
},
|
|
265
280
|
handlerelation(arr) {
|
|
266
281
|
for (let i = 0; i < arr.length; i++) {
|
|
267
282
|
const item = arr[i]
|
|
@@ -80,6 +80,13 @@
|
|
|
80
80
|
this.$emit('fileDelete', idx)
|
|
81
81
|
},
|
|
82
82
|
downLoadFile(path, name) {
|
|
83
|
+
//#ifdef H5
|
|
84
|
+
const a = document.createElement("a")
|
|
85
|
+
a.href = this.downLoadUrl + path
|
|
86
|
+
a.target = '_blank'
|
|
87
|
+
a.click()
|
|
88
|
+
return
|
|
89
|
+
//#endif
|
|
83
90
|
// if (path.includes('.pdf')) {
|
|
84
91
|
// uni.navigateTo({
|
|
85
92
|
// url: '/pages/home/Singlepoint?url=' + this.downLoadUrl + path + "&download=true"
|