@zscreate/zhxy-app-component 1.0.107 → 1.0.109
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/.DS_Store +0 -0
- package/components/evan-form-item/components/responsibility.vue +122 -0
- package/components/evan-form-item/css/style_2.less +0 -0
- package/components/evan-form-item/evan-form-item.vue +102 -42
- package/components/evan-form-item/mixins/pubSubMixin.js +1 -0
- package/components/form-container/.DS_Store +0 -0
- package/components/form-container/css/style_2.less +364 -0
- package/components/form-container/form-container.vue +27 -19
- package/components/fullModal/fullModal.vue +93 -0
- package/components/l-file/l-file.vue +1 -1
- package/components/rich-editor/index.vue +0 -3
- package/components/userSelectByRole/userSelectByRole.vue +210 -0
- package/package.json +1 -1
|
Binary file
|
|
@@ -0,0 +1,122 @@
|
|
|
1
|
+
<script>
|
|
2
|
+
import FullModal from "../../fullModal/fullModal.vue";
|
|
3
|
+
|
|
4
|
+
export default {
|
|
5
|
+
name: "responsibility",
|
|
6
|
+
props: {
|
|
7
|
+
value: {
|
|
8
|
+
type: String,
|
|
9
|
+
default: ''
|
|
10
|
+
},
|
|
11
|
+
widget: {
|
|
12
|
+
type: Object,
|
|
13
|
+
default: () => ({})
|
|
14
|
+
},
|
|
15
|
+
},
|
|
16
|
+
components: {FullModal},
|
|
17
|
+
data() {
|
|
18
|
+
return {
|
|
19
|
+
countDown: 0,
|
|
20
|
+
force: false,
|
|
21
|
+
clearTimeout: null,
|
|
22
|
+
dataModel: false,
|
|
23
|
+
isShow: false,
|
|
24
|
+
}
|
|
25
|
+
},
|
|
26
|
+
watch: {
|
|
27
|
+
value: {
|
|
28
|
+
handler(val) {
|
|
29
|
+
if (!val) return this.dataModel = false
|
|
30
|
+
this.dataModel = true
|
|
31
|
+
},
|
|
32
|
+
immediate: true
|
|
33
|
+
},
|
|
34
|
+
dataModel(val) {
|
|
35
|
+
this.$emit('input', val ? true : '')
|
|
36
|
+
this.$emit('change', val ? true: '')
|
|
37
|
+
},
|
|
38
|
+
},
|
|
39
|
+
methods: {
|
|
40
|
+
handleClick() {
|
|
41
|
+
if (this.widget.options.disabled) return
|
|
42
|
+
this.isShow = true
|
|
43
|
+
this.countDown = 0
|
|
44
|
+
clearInterval(this.clearTimeout)
|
|
45
|
+
if (this.widget.options.force) {
|
|
46
|
+
this.countDown = this.widget.options.countDown
|
|
47
|
+
this.clearTimeout = setInterval(() => {
|
|
48
|
+
if (this.countDown < 0) {
|
|
49
|
+
clearInterval(this.clearTimeout)
|
|
50
|
+
}
|
|
51
|
+
this.countDown -= 1
|
|
52
|
+
}, 1000)
|
|
53
|
+
}
|
|
54
|
+
},
|
|
55
|
+
confirm() {
|
|
56
|
+
if (this.countDown <= 0) {
|
|
57
|
+
this.dataModel = true
|
|
58
|
+
this.isShow = false
|
|
59
|
+
}
|
|
60
|
+
},
|
|
61
|
+
cancel() {
|
|
62
|
+
this.isShow = false
|
|
63
|
+
this.dataModel = false
|
|
64
|
+
clearInterval(this.clearTimeout)
|
|
65
|
+
},
|
|
66
|
+
handleCheck() {
|
|
67
|
+
const { disabled, force} = this.widget.options
|
|
68
|
+
if (force && !disabled) {
|
|
69
|
+
if (this.dataModel) return this.dataModel = false
|
|
70
|
+
return this.handleClick()
|
|
71
|
+
}
|
|
72
|
+
this.dataModel = !this.dataModel
|
|
73
|
+
},
|
|
74
|
+
change(e) {
|
|
75
|
+
console.log(e)
|
|
76
|
+
},
|
|
77
|
+
disabledScroll() {
|
|
78
|
+
return
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
</script>
|
|
83
|
+
|
|
84
|
+
<template>
|
|
85
|
+
<view>
|
|
86
|
+
<full-modal v-model="isShow">
|
|
87
|
+
<view style="height: 100%; background-color: #fff" @touchmove.stop.prevent="disabledScroll">
|
|
88
|
+
<scroll-view scroll-y="true" style="height: 100%; " >
|
|
89
|
+
<view style="padding: 20rpx 40rpx;">
|
|
90
|
+
<rich-text :nodes="widget.options.content" style="text-align: left"></rich-text>
|
|
91
|
+
</view>
|
|
92
|
+
<view style="display: flex; padding: 20rpx; margin-bottom: 20rpx">
|
|
93
|
+
<button @click="confirm" type="primary" style="height: 60rpx; line-height: 60rpx; font-size: 26rpx" :disabled="widget.options.force && countDown > 0">我同意 <text v-if="widget.options.force && countDown > 0">({{ countDown }}s)</text></button>
|
|
94
|
+
<button style="height: 60rpx; line-height: 60rpx; font-size: 26rpx" @click="cancel">不同意</button>
|
|
95
|
+
</view>
|
|
96
|
+
</scroll-view>
|
|
97
|
+
</view>
|
|
98
|
+
|
|
99
|
+
</full-modal>
|
|
100
|
+
<view class="responsibility_check" >
|
|
101
|
+
<view @click.stop="handleCheck">
|
|
102
|
+
<label>
|
|
103
|
+
<checkbox :disabled="widget.options.disabled" v-if="!isShow" :checked="dataModel" color="#007AFF" style="transform: scale(0.8,0.8);"/>
|
|
104
|
+
</label>
|
|
105
|
+
</view>
|
|
106
|
+
<view class="option-font-size" @click.stop="handleClick">{{ widget.options.title }}</view>
|
|
107
|
+
|
|
108
|
+
</view>
|
|
109
|
+
</view>
|
|
110
|
+
|
|
111
|
+
</template>
|
|
112
|
+
|
|
113
|
+
<style lang="less">
|
|
114
|
+
.responsibility_check {
|
|
115
|
+
display: flex;
|
|
116
|
+
align-items: center;
|
|
117
|
+
/deep/ .uni-checkbox-input {
|
|
118
|
+
width: 18px;
|
|
119
|
+
height: 18px;
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
</style>
|
|
File without changes
|
|
@@ -25,7 +25,7 @@
|
|
|
25
25
|
</view>
|
|
26
26
|
</view>
|
|
27
27
|
<!-- input -->
|
|
28
|
-
<view v-if="widget.type ==='input'" class="evan-form-item-container"
|
|
28
|
+
<view v-else-if="widget.type ==='input'" class="evan-form-item-container"
|
|
29
29
|
:class="'evan-form-item-container--' + labelPosition"
|
|
30
30
|
>
|
|
31
31
|
<view class="evan-form-item-container__label"
|
|
@@ -45,13 +45,13 @@
|
|
|
45
45
|
:class="{showAsteriskRect:hasRequiredAsterisk,isRequired:showRequiredAsterisk}" :style="mLabelStyle">
|
|
46
46
|
{{ widget.name }}
|
|
47
47
|
</view>
|
|
48
|
-
<view class="evan-form-item-container__main " style="display: block" :style="mContentStyle">
|
|
49
|
-
<view @click.prevent="downLoadFile(item)" style="margin-right: 20px;color: #007AFF;"
|
|
48
|
+
<view class="evan-form-item-container__main download_moban" style="display: block" :style="mContentStyle">
|
|
49
|
+
<view class="download_item" @click.prevent="downLoadFile(item)" style="margin-right: 20px;color: #007AFF;"
|
|
50
50
|
v-for="(item, index) in widget.options.defaultValue" :key="index"
|
|
51
51
|
:class="{disabledClick: widget.options.disabled}">
|
|
52
52
|
{{ item.name }}
|
|
53
53
|
</view>
|
|
54
|
-
<view v-if="widget.options.defaultValue.length === 0">暂无模板</view>
|
|
54
|
+
<view class="option-font-size" v-if="widget.options.defaultValue.length === 0">暂无模板</view>
|
|
55
55
|
</view>
|
|
56
56
|
</view>
|
|
57
57
|
|
|
@@ -133,7 +133,7 @@
|
|
|
133
133
|
{{ widget.name }}
|
|
134
134
|
</view>
|
|
135
135
|
<view class="evan-form-item-container__main" :style="mContentStyle" style="padding: 0;">
|
|
136
|
-
<slider style="width: 100%;" :value="dataModel" :show-value="true" @change="sliderChange"
|
|
136
|
+
<slider class="form-slider" style="width: 100%;" :value="dataModel" :show-value="true" @change="sliderChange"
|
|
137
137
|
activeColor="#007AFF" backgroundColor="#E4E7ED"
|
|
138
138
|
:max="widget.options.max"
|
|
139
139
|
:min="widget.options.min"
|
|
@@ -208,7 +208,7 @@
|
|
|
208
208
|
</view>
|
|
209
209
|
|
|
210
210
|
<!-- time -->
|
|
211
|
-
<view v-else-if="widget.type ==='time'" class="evan-form-item-container"
|
|
211
|
+
<view v-else-if="widget.type ==='time'" class="evan-form-item-container evan-form-time-container"
|
|
212
212
|
:class="'evan-form-item-container--' + labelPosition" >
|
|
213
213
|
<view class="evan-form-item-container__label"
|
|
214
214
|
:class="{showAsteriskRect:hasRequiredAsterisk,isRequired:showRequiredAsterisk}" :style="mLabelStyle">
|
|
@@ -223,7 +223,7 @@
|
|
|
223
223
|
<xp-picker :ref="widget.model" :mode="getMode(widget.options.format)" @confirm="changeTime"
|
|
224
224
|
@cancel="cancel"/>
|
|
225
225
|
</view>
|
|
226
|
-
<view class="option-font-size" @tap="showTime(widget.model,0)">
|
|
226
|
+
<view :class="[' option-font-size' ,'left-time' , widget.options.isRange ? '' : 'last-time' ]" @tap="showTime(widget.model,0)">
|
|
227
227
|
{{
|
|
228
228
|
showTimeStr(dataModel, 0) ? showTimeStr(dataModel, 0) : (widget.options.startPlaceholder || widget.options.placeholder)
|
|
229
229
|
}}
|
|
@@ -231,7 +231,7 @@
|
|
|
231
231
|
<view class="option-time-icon" v-if="widget.options.isRange">
|
|
232
232
|
~
|
|
233
233
|
</view>
|
|
234
|
-
<view v-if="widget.options.isRange" class="option-font-size" @tap="showTime(widget.model,1)">
|
|
234
|
+
<view v-if="widget.options.isRange" class="option-font-size right-time" @tap="showTime(widget.model,1)">
|
|
235
235
|
{{
|
|
236
236
|
showTimeStr(dataModel, 1) ? showTimeStr(dataModel, 1) : (widget.options.endPlaceholder || widget.options.placeholder)
|
|
237
237
|
}}
|
|
@@ -333,7 +333,7 @@
|
|
|
333
333
|
{{ widget.name }}
|
|
334
334
|
</view>
|
|
335
335
|
<view class="evan-form-item-container__main" :style="mContentStyle">
|
|
336
|
-
<view>{{ widget.key }}</view>
|
|
336
|
+
<view class="option-font-size">{{ widget.key }}</view>
|
|
337
337
|
</view>
|
|
338
338
|
</view>
|
|
339
339
|
|
|
@@ -352,7 +352,7 @@
|
|
|
352
352
|
</view>
|
|
353
353
|
|
|
354
354
|
<!-- placeholder -->
|
|
355
|
-
<view v-else-if="widget.type ==='placeholder'" class="evan-form-item-container"
|
|
355
|
+
<view v-else-if="widget.type ==='placeholder'" class="evan-form-item-container "
|
|
356
356
|
:class="'evan-form-item-container--' + labelPosition" >
|
|
357
357
|
<view class="evan-form-item-container__label"
|
|
358
358
|
:class="{showAsteriskRect:hasRequiredAsterisk,isRequired:showRequiredAsterisk}" :style="mLabelStyle">
|
|
@@ -373,14 +373,14 @@
|
|
|
373
373
|
:class="{showAsteriskRect:hasRequiredAsterisk,isRequired:showRequiredAsterisk}" :style="mLabelStyle">
|
|
374
374
|
{{ widget.name }}
|
|
375
375
|
</view>
|
|
376
|
-
<view class="evan-form-item-container__main" style="display: block" :style="mContentStyle">
|
|
377
|
-
<view style="float: left;">
|
|
376
|
+
<view class="evan-form-item-container__main form_sign_write" style="display: block" :style="mContentStyle">
|
|
377
|
+
<view class="sign_btn" style="float: left;">
|
|
378
378
|
<button v-show="!widget.options.disabled" size="mini" type="primary" @click="signatrueFlag = true"
|
|
379
379
|
style="white-space: nowrap;">签名
|
|
380
380
|
</button>
|
|
381
381
|
</view>
|
|
382
382
|
<image v-if="dataModel || signatrueImage" :src="dataModel ? dataModel : signatrueImage"
|
|
383
|
-
style="width:
|
|
383
|
+
style="width:100%;height:174rpx;"></image>
|
|
384
384
|
<!-- 签名弹框 -->
|
|
385
385
|
<view v-if="signatrueFlag" class="signatrue-view" @click="signatrueFlag = false">
|
|
386
386
|
<view class="signatrue-box">
|
|
@@ -430,9 +430,8 @@
|
|
|
430
430
|
</view>
|
|
431
431
|
<view class="evan-form-item-container__main" :style="mContentStyle"
|
|
432
432
|
@click="selectUserByRole(widget)">
|
|
433
|
-
<!--
|
|
434
|
-
|
|
435
|
-
:placeholder="widget.options.placeholder" :disabled="widget.options.disabled" /> -->
|
|
433
|
+
<!-- 需要在pages.json 里配置全局组件, 不能直接引用, 其他项目会出错 -->
|
|
434
|
+
<user-select-by-role name="user-select-by-role" ref="userSelectByRole" @ok="handleSelectRoleUserOk"/>
|
|
436
435
|
<view class="form-input">{{ dataModelShow ? dataModelShow : widget.options.placeholder }}</view>
|
|
437
436
|
</view>
|
|
438
437
|
</view>
|
|
@@ -450,7 +449,7 @@
|
|
|
450
449
|
<!-- <input class="form-input" placeholder-class="form-input-placeholder" v-model="dataModelShow"
|
|
451
450
|
:placeholder="widget.options.placeholder" :disabled="widget.options.disabled"
|
|
452
451
|
:departvalue="widget.options.defaultValue" /> -->
|
|
453
|
-
<view class="form-input">{{ dataModelShow ? dataModelShow : widget.options.placeholder }}</view>
|
|
452
|
+
<view class="form-input">{{ dataModelShow ? dataModelShow : (widget.options.placeholder) }}</view>
|
|
454
453
|
</view>
|
|
455
454
|
</view>
|
|
456
455
|
|
|
@@ -470,16 +469,17 @@
|
|
|
470
469
|
|
|
471
470
|
|
|
472
471
|
<!-- richEditor -->
|
|
473
|
-
<view v-else-if="widget.type === 'hnkj-richEditor'" class="evan-form-item-container"
|
|
472
|
+
<view v-else-if="widget.type === 'hnkj-richEditor'" class="evan-form-item-container evan-form-rich-editor"
|
|
474
473
|
:class="'evan-form-item-container--' + labelPosition" >
|
|
475
474
|
<view class="evan-form-item-container__label"
|
|
476
475
|
:class="{showAsteriskRect:hasRequiredAsterisk,isRequired:showRequiredAsterisk}" :style="mLabelStyle">
|
|
477
476
|
{{widget.name}}
|
|
478
477
|
</view>
|
|
479
|
-
<view class="evan-form-item-container__main" :style="mContentStyle"
|
|
478
|
+
<view class="evan-form-item-container__main " :style="mContentStyle"
|
|
480
479
|
style="width: 100%;box-sizing: border-box">
|
|
481
480
|
<rich-text v-if="widget.options.disabled" :nodes="dataModel" style="width: 100%;"></rich-text>
|
|
482
481
|
<richEditor v-else v-model="dataModel"
|
|
482
|
+
:widget="widget"
|
|
483
483
|
:maxLength="widget.options.wordLimits ? widget.options.maxLength: 0" style="width: 100%;">
|
|
484
484
|
</richEditor>
|
|
485
485
|
</view>
|
|
@@ -487,7 +487,7 @@
|
|
|
487
487
|
|
|
488
488
|
|
|
489
489
|
<!-- nameSignature 签名 -->
|
|
490
|
-
<view v-if="widget.type ==='hnkj-nameSignature'" class="evan-form-item-container"
|
|
490
|
+
<view v-else-if="widget.type ==='hnkj-nameSignature'" class="evan-form-item-container"
|
|
491
491
|
:class="'evan-form-item-container--' + labelPosition" >
|
|
492
492
|
<view class="evan-form-item-container__label"
|
|
493
493
|
:class="{showAsteriskRect:hasRequiredAsterisk,isRequired:showRequiredAsterisk}" :style="mLabelStyle">
|
|
@@ -496,18 +496,45 @@
|
|
|
496
496
|
<view class="evan-form-item-container__main" :style="mContentStyle">
|
|
497
497
|
<image v-if="nameSign" :src="imgUrl + nameSign" @error="nameSignLoadError"
|
|
498
498
|
style="width: 280rpx; height: 100rpx; "></image>
|
|
499
|
-
<view v-else>{{ dataModel }}</view>
|
|
499
|
+
<view v-else class="option-font-size">{{ dataModel }}</view>
|
|
500
500
|
</view>
|
|
501
501
|
</view>
|
|
502
502
|
|
|
503
503
|
<!-- 公文组件 editorAirt -->
|
|
504
|
-
<view v-else-if="widget.type ==='editorAirt'" class="evan-form-item-container"
|
|
504
|
+
<view v-else-if="widget.type ==='editorAirt'" class="evan-form-item-container evan-form-editorAirt"
|
|
505
505
|
:class="'evan-form-item-container--' + labelPosition" >
|
|
506
|
-
<view class="evan-form-item-container__main" :style="mContentStyle">
|
|
506
|
+
<view class="evan-form-item-container__main left-layout-noPaddingleft" :style="mContentStyle" style="text-align: initial">
|
|
507
507
|
<rich-text :nodes="dataModel" style="width: 100%;"></rich-text>
|
|
508
508
|
</view>
|
|
509
509
|
</view>
|
|
510
510
|
|
|
511
|
+
|
|
512
|
+
<!-- 责任书 -->
|
|
513
|
+
<view v-else-if="widget.type === 'responsibility'" class="evan-form-item-container "
|
|
514
|
+
:class="'evan-form-item-container--' + labelPosition" >
|
|
515
|
+
<view class="evan-form-item-container__label"
|
|
516
|
+
:class="{showAsteriskRect:hasRequiredAsterisk,isRequired:showRequiredAsterisk}" :style="mLabelStyle">
|
|
517
|
+
{{ widget.name }}
|
|
518
|
+
</view>
|
|
519
|
+
<view class="evan-form-item-container__main" :style="mContentStyle">
|
|
520
|
+
|
|
521
|
+
<responsibility :widget="widget" v-model="dataModel"/>
|
|
522
|
+
</view>
|
|
523
|
+
|
|
524
|
+
</view>
|
|
525
|
+
|
|
526
|
+
<!-- 其他未开发组件 -->
|
|
527
|
+
<view v-else class="evan-form-item-container "
|
|
528
|
+
:class="'evan-form-item-container--' + labelPosition" >
|
|
529
|
+
<view class="evan-form-item-container__label"
|
|
530
|
+
:class="{showAsteriskRect:hasRequiredAsterisk,isRequired:showRequiredAsterisk}" :style="mLabelStyle">
|
|
531
|
+
{{ widget.name }}
|
|
532
|
+
</view>
|
|
533
|
+
<view class="evan-form-item-container__main" :style="mContentStyle">
|
|
534
|
+
<view class="option-font-size">移动端暂不支持</view>
|
|
535
|
+
</view>
|
|
536
|
+
</view>
|
|
537
|
+
|
|
511
538
|
<!-- location 定位 -->
|
|
512
539
|
<view v-if="widget.type ==='location'" class="evan-form-item-container" :class="'evan-form-item-container--top'"
|
|
513
540
|
:style="{borderWidth:border?'1upx':0}">
|
|
@@ -526,6 +553,8 @@
|
|
|
526
553
|
</view>
|
|
527
554
|
</view>
|
|
528
555
|
<view class="error-message" v-if="showFalse">{{ showFalseMsg }}</view>
|
|
556
|
+
<view v-if="widget.options.canView && !hiddenLineTypes.includes(widget.type)" class="bottom_line">
|
|
557
|
+
</view>
|
|
529
558
|
<u-toast ref="uToast" />
|
|
530
559
|
</view>
|
|
531
560
|
</template>
|
|
@@ -562,11 +591,16 @@ import {
|
|
|
562
591
|
import {downloadFile, toAwait} from "../../utils/util";
|
|
563
592
|
import XpPicker from "../xp-picker/xp-picker.vue";
|
|
564
593
|
import signatrueWrite from "../signatrue-write/signatrue-write.vue";
|
|
594
|
+
import FullModal from "../fullModal/fullModal.vue";
|
|
595
|
+
import Responsibility from "./components/responsibility.vue";
|
|
596
|
+
import {run} from "../../utils/js-interp";
|
|
565
597
|
|
|
566
598
|
export default {
|
|
567
599
|
options: { styleIsolation: 'shared' },
|
|
568
600
|
mixins: [computedMixin, validateFormMixin, pubSubMixin, valueChangeMixin],
|
|
569
601
|
components: {
|
|
602
|
+
Responsibility,
|
|
603
|
+
FullModal,
|
|
570
604
|
'xp-picker': XpPicker,
|
|
571
605
|
UniRate,
|
|
572
606
|
tColorPicker,
|
|
@@ -655,6 +689,7 @@ export default {
|
|
|
655
689
|
inject: ['dataObj'],
|
|
656
690
|
data() {
|
|
657
691
|
return {
|
|
692
|
+
hiddenLineTypes: [ 'hidden'],
|
|
658
693
|
nameSign: '',
|
|
659
694
|
isClickByUser: false, //是否用户点击
|
|
660
695
|
single: null,
|
|
@@ -834,7 +869,14 @@ export default {
|
|
|
834
869
|
// } else {
|
|
835
870
|
// params.formDataId = ''
|
|
836
871
|
// }
|
|
837
|
-
|
|
872
|
+
|
|
873
|
+
const { onlyurl, onlyurl_type = 'GET', disabled , canView, canEdit } = this.widget.options
|
|
874
|
+
if (disabled || canView == false || canEdit == false) return callback()
|
|
875
|
+
let httpFunc = this.$u.get
|
|
876
|
+
if (onlyurl_type === 'POST') {
|
|
877
|
+
httpFunc = this.$u.post
|
|
878
|
+
}
|
|
879
|
+
httpFunc(onlyurl, params).then((res) => {
|
|
838
880
|
if (res.result) {
|
|
839
881
|
callback(res.message);
|
|
840
882
|
} else {
|
|
@@ -1150,7 +1192,7 @@ export default {
|
|
|
1150
1192
|
if (this.tableKey) {
|
|
1151
1193
|
this.dataModel = this.models[this.tableKey][this.tableIndex][this.widget.model]
|
|
1152
1194
|
} else {
|
|
1153
|
-
|
|
1195
|
+
let value = this.models[this.widget.model]
|
|
1154
1196
|
if (this.widget.type === 'number') {
|
|
1155
1197
|
if (this.models[this.widget.model]) {
|
|
1156
1198
|
this.dataModel = this.models[this.widget.model]
|
|
@@ -1159,12 +1201,28 @@ export default {
|
|
|
1159
1201
|
}
|
|
1160
1202
|
if (!this.dataModel) this.dataModel = 0
|
|
1161
1203
|
} else if (!value && this.widget.type === 'codeControl') {
|
|
1162
|
-
const
|
|
1163
|
-
|
|
1164
|
-
|
|
1165
|
-
|
|
1166
|
-
|
|
1167
|
-
|
|
1204
|
+
const { enableCustomRules , customRules} = this.widget.options
|
|
1205
|
+
if (enableCustomRules) {
|
|
1206
|
+
try {
|
|
1207
|
+
const mValue = { value }
|
|
1208
|
+
// eval(`// this.widget.key = value = (${customRules})(this.widget, this.models, this)`)
|
|
1209
|
+
run(`this.widget.key = mValue.value = (${customRules})(this.widget, this.models, this)`, {
|
|
1210
|
+
'this': this,
|
|
1211
|
+
mValue
|
|
1212
|
+
})
|
|
1213
|
+
value = mValue.value
|
|
1214
|
+
} catch (e) {
|
|
1215
|
+
console.log("codeControl customRules error")
|
|
1216
|
+
}
|
|
1217
|
+
} else {
|
|
1218
|
+
const randomNum = String(Math.random())
|
|
1219
|
+
const dateStr = String(new Date().getFullYear()).slice(2)
|
|
1220
|
+
+ (new Date().getMonth() + 1 > 9 ? new Date().getMonth() + 1 : '0' + (new Date().getMonth() + 1))
|
|
1221
|
+
+ (new Date().getDate() > 9 ? new Date().getDate() : '0' + new Date().getDate())
|
|
1222
|
+
+ randomNum.slice(-4)
|
|
1223
|
+
value = dateStr + ''
|
|
1224
|
+
}
|
|
1225
|
+
this.dataModel = value
|
|
1168
1226
|
} else {
|
|
1169
1227
|
const { max, min } = this.widget.options
|
|
1170
1228
|
if (max && value > max) {
|
|
@@ -1237,7 +1295,7 @@ export default {
|
|
|
1237
1295
|
selectUserByRole(widget) {
|
|
1238
1296
|
if (widget.options.disabled) return
|
|
1239
1297
|
this.isClickByUser = true
|
|
1240
|
-
|
|
1298
|
+
this.$refs.userSelectByRole && this.$refs.userSelectByRole.init(widget, this.dataModel)
|
|
1241
1299
|
},
|
|
1242
1300
|
handleSelectRoleUserOk(value) {
|
|
1243
1301
|
this.dataModelShow = ""
|
|
@@ -1453,16 +1511,17 @@ export default {
|
|
|
1453
1511
|
}
|
|
1454
1512
|
if (this.widget.type === 'codeControl') {
|
|
1455
1513
|
|
|
1456
|
-
const randomNum = String(Math.random())
|
|
1457
|
-
const dateStr = String(new Date().getFullYear()).slice(2)
|
|
1458
|
-
|
|
1459
|
-
|
|
1460
|
-
|
|
1461
|
-
if (!v) {
|
|
1462
|
-
|
|
1463
|
-
} else {
|
|
1464
|
-
|
|
1465
|
-
}
|
|
1514
|
+
// const randomNum = String(Math.random())
|
|
1515
|
+
// const dateStr = String(new Date().getFullYear()).slice(2)
|
|
1516
|
+
// + (new Date().getMonth() + 1 > 9 ? new Date().getMonth() + 1 : '0' + (new Date().getMonth() + 1))
|
|
1517
|
+
// + (new Date().getDate() > 9 ? new Date().getDate() : '0' + new Date().getDate())
|
|
1518
|
+
// + randomNum.slice(-4)
|
|
1519
|
+
// if (!v) {
|
|
1520
|
+
// v = this.widget.key = dateStr + ''
|
|
1521
|
+
// } else {
|
|
1522
|
+
// this.widget.key = v
|
|
1523
|
+
// }
|
|
1524
|
+
this.widget.key = v
|
|
1466
1525
|
this.$emit('upDateWidget', this.widget)
|
|
1467
1526
|
}
|
|
1468
1527
|
this.$emit("update:models", {
|
|
@@ -1769,3 +1828,4 @@ checkbox-group label {
|
|
|
1769
1828
|
}
|
|
1770
1829
|
}
|
|
1771
1830
|
</style>
|
|
1831
|
+
|
|
Binary file
|
|
@@ -0,0 +1,364 @@
|
|
|
1
|
+
/deep/ .evan-form-show {
|
|
2
|
+
.form-item {
|
|
3
|
+
margin-bottom: 0;
|
|
4
|
+
position: relative;
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
//.form_layout {
|
|
8
|
+
// .form-item-container:last-child .bottom_line {
|
|
9
|
+
// display: none;
|
|
10
|
+
// }
|
|
11
|
+
//}
|
|
12
|
+
.verify, .form_layout, .table-wrapper {
|
|
13
|
+
|
|
14
|
+
margin: 10px 0;
|
|
15
|
+
&:first-child {
|
|
16
|
+
margin-top: 0;
|
|
17
|
+
}
|
|
18
|
+
&:last-child {
|
|
19
|
+
margin-bottom: 0;
|
|
20
|
+
}
|
|
21
|
+
& + .form-item-container {
|
|
22
|
+
.bottom_line {
|
|
23
|
+
display: none;
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
.form-item-container {
|
|
30
|
+
position: relative;
|
|
31
|
+
|
|
32
|
+
&:first-child .bottom_line {
|
|
33
|
+
display: none;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
|
|
37
|
+
//&:has( + .table-wrapper, + .verify, + .form_layout) .bottom_line {
|
|
38
|
+
// display: none;
|
|
39
|
+
//}
|
|
40
|
+
|
|
41
|
+
//&.form_layout + .form_layout .bottom_line {
|
|
42
|
+
// display: none;
|
|
43
|
+
//}
|
|
44
|
+
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
.error-message {
|
|
48
|
+
padding: 0 20rpx 10rpx 20rpx;
|
|
49
|
+
background-color: initial !important;
|
|
50
|
+
text-align: right;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
.form-item /deep/ {
|
|
54
|
+
|
|
55
|
+
//.evan-form-item-placeholder-comp {
|
|
56
|
+
// padding: 0 !important;
|
|
57
|
+
// background-color: #efefef;
|
|
58
|
+
// .evan-form-item-container__label {
|
|
59
|
+
// line-height: 60rpx !important;
|
|
60
|
+
// min-height: 60rpx !important;
|
|
61
|
+
// height: initial;
|
|
62
|
+
// font-size: 28rpx;;
|
|
63
|
+
// }
|
|
64
|
+
// .bottom_line {
|
|
65
|
+
// display: none;
|
|
66
|
+
// }
|
|
67
|
+
//}
|
|
68
|
+
.evan-form-editorAirt {
|
|
69
|
+
.evan-form-item-container__main {
|
|
70
|
+
padding: 20rpx 0;
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
.evan-form-time-container {
|
|
74
|
+
.evan-form-item-container__main {
|
|
75
|
+
width: 200rpx;
|
|
76
|
+
.option-font-size {
|
|
77
|
+
line-break: anywhere;
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
> .option-font-size:nth-child(2){
|
|
81
|
+
justify-content: flex-start;
|
|
82
|
+
min-width: initial !important;
|
|
83
|
+
}
|
|
84
|
+
> .option-font-size{
|
|
85
|
+
width: 150rpx;
|
|
86
|
+
min-width: initial !important;
|
|
87
|
+
}
|
|
88
|
+
> .left-time.last-time {
|
|
89
|
+
justify-content: flex-end;
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
> .option-time-icon {
|
|
93
|
+
width: 40px;
|
|
94
|
+
position: relative;
|
|
95
|
+
text-align: center;
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
.evan-form-rich-editor {
|
|
100
|
+
flex-direction: column;
|
|
101
|
+
|
|
102
|
+
.evan-form-item-container__main {
|
|
103
|
+
padding-left: 0 !important;
|
|
104
|
+
text-align: left !important;
|
|
105
|
+
|
|
106
|
+
.toolbar {
|
|
107
|
+
padding: 0;
|
|
108
|
+
padding-bottom: 10px;
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
.bottom_line {
|
|
114
|
+
position: absolute;
|
|
115
|
+
content: ' ';
|
|
116
|
+
width: calc(100% - 40rpx);
|
|
117
|
+
left: 50%;
|
|
118
|
+
transform: translateX(-50%);
|
|
119
|
+
height: 1px;
|
|
120
|
+
background-color: #E0E0E0;
|
|
121
|
+
top: 0;
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
.evan-form-item-container--left {
|
|
125
|
+
justify-content: flex-start;
|
|
126
|
+
|
|
127
|
+
.file_item {
|
|
128
|
+
width: initial;
|
|
129
|
+
justify-content: end;
|
|
130
|
+
align-items: center;
|
|
131
|
+
font-size: 26rpx;
|
|
132
|
+
|
|
133
|
+
> uni-view {
|
|
134
|
+
margin-top: 0;
|
|
135
|
+
width: 100%;
|
|
136
|
+
margin-right: 10rpx;
|
|
137
|
+
text-align: right;
|
|
138
|
+
}
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
.download_moban {
|
|
142
|
+
display: flex !important;
|
|
143
|
+
flex-wrap: wrap;
|
|
144
|
+
|
|
145
|
+
.download_item {
|
|
146
|
+
|
|
147
|
+
text-align: right;
|
|
148
|
+
width: 100%;
|
|
149
|
+
font-size: 26rpx;
|
|
150
|
+
margin-right: 0 !important;
|
|
151
|
+
}
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
.form_sign_write {
|
|
155
|
+
.sign_btn {
|
|
156
|
+
float: right !important;
|
|
157
|
+
display: flex;
|
|
158
|
+
align-items: center;
|
|
159
|
+
justify-content: flex-end;
|
|
160
|
+
height: 96rpx;
|
|
161
|
+
}
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
.u_close {
|
|
165
|
+
display: none;
|
|
166
|
+
position: relative;
|
|
167
|
+
top: initial;
|
|
168
|
+
width: 40rpx;
|
|
169
|
+
transform: initial;
|
|
170
|
+
}
|
|
171
|
+
|
|
172
|
+
.evan-form-item-container__label {
|
|
173
|
+
align-self: flex-start;
|
|
174
|
+
padding-left: 0 !important;
|
|
175
|
+
color: #666;
|
|
176
|
+
min-height: 96rpx;
|
|
177
|
+
line-height: 96rpx;
|
|
178
|
+
font-size: 26rpx;
|
|
179
|
+
overflow: hidden;
|
|
180
|
+
}
|
|
181
|
+
|
|
182
|
+
.pick-name, .form-input, .option-font-size, .uni-input-input, .uni-input-placeholder {
|
|
183
|
+
font-size: 26rpx;
|
|
184
|
+
color: #333;
|
|
185
|
+
}
|
|
186
|
+
|
|
187
|
+
.u-add-wrap {
|
|
188
|
+
margin: 5px 0;
|
|
189
|
+
}
|
|
190
|
+
|
|
191
|
+
padding: 0 10px;
|
|
192
|
+
|
|
193
|
+
.left-layout-noPaddingleft {
|
|
194
|
+
padding-left: 0 !important;
|
|
195
|
+
}
|
|
196
|
+
|
|
197
|
+
.evan-form-item-container__main {
|
|
198
|
+
min-height: 96rpx;
|
|
199
|
+
padding-left: 20rpx;
|
|
200
|
+
.form-slider {
|
|
201
|
+
padding-left: 50rpx;
|
|
202
|
+
padding-right: 20rpx;
|
|
203
|
+
margin: 0;
|
|
204
|
+
}
|
|
205
|
+
|
|
206
|
+
|
|
207
|
+
}
|
|
208
|
+
|
|
209
|
+
.evan-form-item-container__main, .option-font-size {
|
|
210
|
+
z-index: auto;
|
|
211
|
+
font-size: 26rpx;
|
|
212
|
+
justify-content: flex-end;
|
|
213
|
+
text-align: right;
|
|
214
|
+
|
|
215
|
+
.uni-list {
|
|
216
|
+
max-width: 90%;
|
|
217
|
+
width: initial;
|
|
218
|
+
|
|
219
|
+
margin-left: 10px;
|
|
220
|
+
margin-top: 0 !important;
|
|
221
|
+
|
|
222
|
+
.uni-list-cell {
|
|
223
|
+
padding: 18rpx 0;
|
|
224
|
+
color: #333;
|
|
225
|
+
font-size: 26rpx;
|
|
226
|
+
}
|
|
227
|
+
}
|
|
228
|
+
|
|
229
|
+
.clear-btn {
|
|
230
|
+
display: none;
|
|
231
|
+
}
|
|
232
|
+
}
|
|
233
|
+
|
|
234
|
+
.file_upload {
|
|
235
|
+
margin-right: 0;
|
|
236
|
+
color: #499EF4;
|
|
237
|
+
}
|
|
238
|
+
|
|
239
|
+
.uni-list-cell::after {
|
|
240
|
+
background-color: transparent;
|
|
241
|
+
}
|
|
242
|
+
|
|
243
|
+
//.option-font-size {
|
|
244
|
+
//
|
|
245
|
+
//}
|
|
246
|
+
}
|
|
247
|
+
|
|
248
|
+
.form-input-placeholder {
|
|
249
|
+
font-size: 26rpx;
|
|
250
|
+
color: #666 !important;
|
|
251
|
+
}
|
|
252
|
+
|
|
253
|
+
.uni-label-pointer {
|
|
254
|
+
//margin-left: -23px;
|
|
255
|
+
}
|
|
256
|
+
.responsibility_check {
|
|
257
|
+
flex-direction: row-reverse;
|
|
258
|
+
}
|
|
259
|
+
.uni-list-cell.uni-list-cell-pd.uni-label-pointer {
|
|
260
|
+
display: flex;
|
|
261
|
+
flex-direction: row-reverse;
|
|
262
|
+
font-size: 26rpx;
|
|
263
|
+
color: #333;
|
|
264
|
+
padding: 3px !important;
|
|
265
|
+
text-align: right;
|
|
266
|
+
|
|
267
|
+
> view {
|
|
268
|
+
font-size: 26rpx;
|
|
269
|
+
color: #333;
|
|
270
|
+
}
|
|
271
|
+
|
|
272
|
+
.uni-label-pointer {
|
|
273
|
+
padding-right: 0 !important;
|
|
274
|
+
}
|
|
275
|
+
|
|
276
|
+
|
|
277
|
+
> view:last-child {
|
|
278
|
+
line-break: anywhere;
|
|
279
|
+
width: 100%;
|
|
280
|
+
}
|
|
281
|
+
|
|
282
|
+
.uni-radio-input {
|
|
283
|
+
width: 16px;
|
|
284
|
+
height: 16px;
|
|
285
|
+
}
|
|
286
|
+
|
|
287
|
+
.uni-checkbox-input {
|
|
288
|
+
width: 18px;
|
|
289
|
+
height: 18px;
|
|
290
|
+
}
|
|
291
|
+
}
|
|
292
|
+
}
|
|
293
|
+
|
|
294
|
+
.evan-form-container {
|
|
295
|
+
padding: 0 20rpx;
|
|
296
|
+
border-radius: 5px;
|
|
297
|
+
|
|
298
|
+
}
|
|
299
|
+
|
|
300
|
+
.verify {
|
|
301
|
+
margin-bottom: 20rpx;
|
|
302
|
+
|
|
303
|
+
.verify-step {
|
|
304
|
+
display: flex;
|
|
305
|
+
height: initial;
|
|
306
|
+
min-height: 60rpx;
|
|
307
|
+
padding: 10rpx 0;
|
|
308
|
+
line-height: 60rpx;
|
|
309
|
+
font-size: 28rpx;
|
|
310
|
+
}
|
|
311
|
+
|
|
312
|
+
.uni-input-placeholder, .uni-input-input, .verify-title, .uni-textarea-textarea, .uni-textarea-placeholder {
|
|
313
|
+
font-size: 26rpx;
|
|
314
|
+
color: #333;
|
|
315
|
+
}
|
|
316
|
+
|
|
317
|
+
.verify-cot {
|
|
318
|
+
> view:last-child {
|
|
319
|
+
font-size: 26rpx !important;
|
|
320
|
+
color: #333;
|
|
321
|
+
}
|
|
322
|
+
}
|
|
323
|
+
|
|
324
|
+
.uni-input-placeholder, .uni-textarea-placeholder {
|
|
325
|
+
color: #666 !important;
|
|
326
|
+
}
|
|
327
|
+
|
|
328
|
+
}
|
|
329
|
+
|
|
330
|
+
.table-wrapper {
|
|
331
|
+
margin-bottom: 20rpx;
|
|
332
|
+
}
|
|
333
|
+
|
|
334
|
+
.table-header {
|
|
335
|
+
display: flex;
|
|
336
|
+
min-height: 60rpx;
|
|
337
|
+
padding: 10rpx 0;
|
|
338
|
+
line-height: 60rpx;
|
|
339
|
+
font-size: 28rpx;
|
|
340
|
+
}
|
|
341
|
+
|
|
342
|
+
.table-container {
|
|
343
|
+
.add {
|
|
344
|
+
font-size: 26rpx;
|
|
345
|
+
}
|
|
346
|
+
}
|
|
347
|
+
|
|
348
|
+
.table-container .item {
|
|
349
|
+
> view {
|
|
350
|
+
font-size: 26rpx;
|
|
351
|
+
}
|
|
352
|
+
}
|
|
353
|
+
|
|
354
|
+
.title-block {
|
|
355
|
+
display: inline-block;
|
|
356
|
+
width: 6rpx;
|
|
357
|
+
height: 28rpx;
|
|
358
|
+
margin-top: 16rpx;
|
|
359
|
+
margin-right: 10rpx;
|
|
360
|
+
border-radius: 4rpx;
|
|
361
|
+
background: #499EF4;
|
|
362
|
+
}
|
|
363
|
+
}
|
|
364
|
+
|
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<view class="evan-form-show">
|
|
2
|
+
<view class="evan-form-show" >
|
|
3
3
|
<evan-form :hide-required-asterisk="hideRequiredAsterisk" ref="form">
|
|
4
4
|
<template v-for="(item, index) in dataObj.list">
|
|
5
5
|
<template v-if="item.type === 'table' && item.options.canView">
|
|
6
6
|
<view class="table-wrapper" :key="index">
|
|
7
7
|
<view class="table-header">
|
|
8
|
-
|
|
8
|
+
<text v-if="item.name" class="title-block"></text>
|
|
9
|
+
<text>{{ item.name }}</text>
|
|
9
10
|
</view>
|
|
10
11
|
<view class="table-container">
|
|
11
12
|
<view class="table-item" v-for="(table, tableCIndex) in tableData[item.model]"
|
|
@@ -40,8 +41,8 @@
|
|
|
40
41
|
</view>
|
|
41
42
|
</template>
|
|
42
43
|
|
|
43
|
-
<
|
|
44
|
-
<view v-for="(colItem, colIndex) in item.columns" :key="colIndex">
|
|
44
|
+
<view v-else-if="item.type === 'all-lay-out' && item.options.canView" class="form_layout">
|
|
45
|
+
<view v-for="(colItem, colIndex) in item.columns" :key="colIndex" class="form-item-container">
|
|
45
46
|
<view v-for="(col, itemIndex) in colItem.list" :key="itemIndex">
|
|
46
47
|
<evan-form-item :isCorrect="isCorrect" :labelPosition="labelPosition" :prop="col.model"
|
|
47
48
|
:ref="String(Math.random()).split('.')[1]" :models.sync="models" :rules="rules"
|
|
@@ -49,20 +50,24 @@
|
|
|
49
50
|
</evan-form-item>
|
|
50
51
|
</view>
|
|
51
52
|
</view>
|
|
52
|
-
</
|
|
53
|
+
</view>
|
|
53
54
|
|
|
54
|
-
<
|
|
55
|
-
<view v-for="(colItem, colIndex) in item.columns" :key="colIndex">
|
|
55
|
+
<view v-else-if="item.type === 'grid-lay-out' && item.options.canView" class="form_layout">
|
|
56
|
+
<view v-for="(colItem, colIndex) in item.columns" :key="colIndex" class="form-item-container ">
|
|
56
57
|
<view v-for="(col, itemIndex) in colItem.list" :key="itemIndex">
|
|
57
58
|
<template v-if="col.type == 'hnkj-verify' && item.options.canView">
|
|
58
59
|
<view class="verify">
|
|
59
|
-
<view class="verify-step">
|
|
60
|
+
<view class="verify-step">
|
|
61
|
+
<text v-if="col.name" class="title-block"></text>
|
|
62
|
+
<text>{{col.name }}</text>
|
|
63
|
+
|
|
64
|
+
</view>
|
|
60
65
|
<view class="verify-cot">
|
|
61
66
|
<m-textarea
|
|
62
67
|
:value="models[col.model].comments"
|
|
63
68
|
show-word-limit
|
|
64
69
|
:max-length="col.options.commentsLength"
|
|
65
|
-
:disabled="col.model !== verifyNode" :placeholder="
|
|
70
|
+
:disabled="col.model !== verifyNode" :placeholder="col.options.placeholder"
|
|
66
71
|
@change="val => handlerText(val, col.model)">
|
|
67
72
|
</m-textarea>
|
|
68
73
|
</view>
|
|
@@ -102,28 +107,31 @@
|
|
|
102
107
|
</template>
|
|
103
108
|
</view>
|
|
104
109
|
</view>
|
|
105
|
-
</
|
|
110
|
+
</view>
|
|
106
111
|
|
|
107
|
-
<
|
|
108
|
-
<view v-for="(colItem, colIndex) in item.columns" :key="colIndex">
|
|
109
|
-
<view
|
|
112
|
+
<view v-else-if="item.type === 'grid' && item.options.canView" class="form_layout">
|
|
113
|
+
<view class="form-item-container" v-for="(colItem, colIndex) in item.columns" :key="colIndex">
|
|
114
|
+
<view v-for="(col, itemIndex) in colItem.list" :key="itemIndex">
|
|
110
115
|
<evan-form-item :isCorrect="isCorrect" :labelPosition="labelPosition" :prop="col.model"
|
|
111
116
|
:ref="String(Math.random()).split('.')[1]" :models.sync="models" :rules="rules"
|
|
112
117
|
:widget="col" :isDraft="isDraft" :formId="formId" :linkage="linkage" :isApply="isApply" :applyId="applyId">
|
|
113
118
|
</evan-form-item>
|
|
114
119
|
</view>
|
|
115
120
|
</view>
|
|
116
|
-
</
|
|
121
|
+
</view>
|
|
117
122
|
|
|
118
123
|
<template v-else-if="['verify', 'hnkj-verify'].includes(item.type) && item.options.canView">
|
|
119
124
|
|
|
120
125
|
<view class="verify">
|
|
121
|
-
|
|
126
|
+
<view class="verify-step">
|
|
127
|
+
<text v-if="item.name" class="title-block"></text>
|
|
128
|
+
<text>{{item.name }}</text>
|
|
129
|
+
</view>
|
|
122
130
|
<view v-if="item.options.supportMulti && (verifyLogs && verifyLogs[item.model])" >
|
|
123
131
|
<view v-for="(v_log, idx) in verifyLogsList(item.model)" :key="idx">
|
|
124
132
|
<view class="verify-cot">
|
|
125
|
-
|
|
126
|
-
|
|
133
|
+
<textarea :value="v_log.note" disabled>
|
|
134
|
+
</textarea>
|
|
127
135
|
</view>
|
|
128
136
|
<view class="verify-cot">
|
|
129
137
|
<view class="verify-title">{{item.options.operation}}</view>
|
|
@@ -144,7 +152,7 @@
|
|
|
144
152
|
:max-length="item.options.commentsLength"
|
|
145
153
|
show-word-limit
|
|
146
154
|
:value="models[item.model].comments"
|
|
147
|
-
:disabled="item.model !== verifyNode" :placeholder="
|
|
155
|
+
:disabled="item.model !== verifyNode" :placeholder="item.options.placeholder"
|
|
148
156
|
@change="val => handlerText(val, item.model)">
|
|
149
157
|
</m-textarea>
|
|
150
158
|
</view>
|
|
@@ -177,7 +185,7 @@
|
|
|
177
185
|
</template>
|
|
178
186
|
|
|
179
187
|
<template v-else>
|
|
180
|
-
<view :key="index" v-show="item.options.canView">
|
|
188
|
+
<view :key="index" class="form-item-container" v-show="item.options.canView" >
|
|
181
189
|
<evan-form-item @upDateWidget="data => upDateWidget(data, index)" :labelPosition="labelPosition" :isCorrect="isCorrect" :prop="item.model"
|
|
182
190
|
:ref="String(Math.random()).split('.')[1]" :models.sync="models" :rules="rules"
|
|
183
191
|
:widget="item" :itemkey="index" :isDraft="isDraft" :formId="formId" :linkage="linkage" :formData="value"
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
<script>
|
|
2
|
+
export default {
|
|
3
|
+
name: "fullModal",
|
|
4
|
+
props: {
|
|
5
|
+
value: {
|
|
6
|
+
type: Boolean,
|
|
7
|
+
default: false
|
|
8
|
+
}
|
|
9
|
+
},
|
|
10
|
+
data(){
|
|
11
|
+
return{
|
|
12
|
+
fillOut: false
|
|
13
|
+
}
|
|
14
|
+
},
|
|
15
|
+
watch: {
|
|
16
|
+
value: {
|
|
17
|
+
handler(val) {
|
|
18
|
+
this.fillOut = val
|
|
19
|
+
},
|
|
20
|
+
immediate: true
|
|
21
|
+
},
|
|
22
|
+
fillOut(val) {
|
|
23
|
+
this.$emit('input', val)
|
|
24
|
+
this.$emit('change', val)
|
|
25
|
+
}
|
|
26
|
+
},
|
|
27
|
+
created() {},
|
|
28
|
+
methods: {
|
|
29
|
+
show() {
|
|
30
|
+
this.fillOut = true
|
|
31
|
+
},
|
|
32
|
+
close() {
|
|
33
|
+
this.fillOut = false
|
|
34
|
+
}
|
|
35
|
+
},
|
|
36
|
+
}
|
|
37
|
+
</script>
|
|
38
|
+
|
|
39
|
+
<template>
|
|
40
|
+
<view class="showTotal" v-if="fillOut">
|
|
41
|
+
<view class="show">
|
|
42
|
+
<slot></slot>
|
|
43
|
+
</view>
|
|
44
|
+
<view class="over" @click="fillOut = false"></view>
|
|
45
|
+
</view>
|
|
46
|
+
</template>
|
|
47
|
+
|
|
48
|
+
<style lang="scss" scoped>
|
|
49
|
+
.showTotal{
|
|
50
|
+
.show{
|
|
51
|
+
width: 100vw;
|
|
52
|
+
height: 100vh;
|
|
53
|
+
position: fixed;
|
|
54
|
+
left: 0;
|
|
55
|
+
right: 0;
|
|
56
|
+
top:0;
|
|
57
|
+
margin: auto;
|
|
58
|
+
z-index: 10000;
|
|
59
|
+
//&-image{
|
|
60
|
+
// width: 620rpx;
|
|
61
|
+
// position: relative;
|
|
62
|
+
//}
|
|
63
|
+
//&-button{
|
|
64
|
+
// width: 400rpx;
|
|
65
|
+
// line-height: 96rpx;
|
|
66
|
+
// text-align: center;
|
|
67
|
+
// color: #fff;
|
|
68
|
+
// font-size: 32rpx;
|
|
69
|
+
// border-radius: 56rpx;
|
|
70
|
+
// background: linear-gradient(90deg, #F97C55 0%, #F44545 100%);
|
|
71
|
+
// position: absolute;
|
|
72
|
+
// bottom: -40rpx;
|
|
73
|
+
// left: 110rpx;
|
|
74
|
+
//}
|
|
75
|
+
}
|
|
76
|
+
.over{
|
|
77
|
+
width: 100%;
|
|
78
|
+
height: 100%;
|
|
79
|
+
background-color: #000;
|
|
80
|
+
opacity: 0.6;
|
|
81
|
+
position: fixed;
|
|
82
|
+
top: 0;
|
|
83
|
+
left: 0;
|
|
84
|
+
z-index: 999;//这一步很重要
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
.button{
|
|
88
|
+
width: 400rpx;
|
|
89
|
+
height: 96rpx;
|
|
90
|
+
background: linear-gradient(90deg, #F97C55 0%, #F44545 100%);
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
</style>
|
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
<view class="name SXcolor" v-if="fileName" @click="downLoadFile(defaultFile[0]['url'])">{{fileName}}</view>
|
|
17
17
|
</view>
|
|
18
18
|
<view v-if="fileName" class="tips option-font-size">更多文件详情请于电脑端查看</view> -->
|
|
19
|
-
<view v-if="!disabled">
|
|
19
|
+
<view v-if="!disabled && percent > 0" >
|
|
20
20
|
<progress :percent="percent" stroke-width="5" activeColor="#007AFF" backgroundColor="#FFFFFF"
|
|
21
21
|
style="width: 200upx;" v-show="show"></progress>
|
|
22
22
|
</view>
|
|
@@ -70,13 +70,10 @@
|
|
|
70
70
|
</view>
|
|
71
71
|
<view class="container">
|
|
72
72
|
<!-- <node-text-->
|
|
73
|
-
<rich-text v-if="widget.options.disabled" :nodes="value" style="width: 100%;"></rich-text>
|
|
74
|
-
<template v-else>
|
|
75
73
|
<editor ref="editor" id="editor" show-img-size :read-only="readOnly || isEdit" show-img-resize show-img-toolbar class="ql-container"
|
|
76
74
|
:placeholder="placeholder" @statuschange="onStatusChange" @ready="onEditorReady" @input="handleInput">
|
|
77
75
|
</editor>
|
|
78
76
|
<view v-if="maxLength" class="text-num">{{textLength}}/{{maxLength}}</view>
|
|
79
|
-
</template>
|
|
80
77
|
</view>
|
|
81
78
|
<tColorPicker ref="colorPicker" :color="color" @confirm="confirm" @cancel="cancel"></tColorPicker>
|
|
82
79
|
</view>
|
|
@@ -0,0 +1,210 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<u-popup v-model="roleSelectShow" width="100%">
|
|
3
|
+
<view class="role-select-body" style="padding: 20rpx; margin-top: 40rpx">
|
|
4
|
+
<view>角色选择</view>
|
|
5
|
+
<u-radio-group v-model="roleChecked" >
|
|
6
|
+
<u-radio
|
|
7
|
+
@change="roleChange"
|
|
8
|
+
v-for="(item, index) in rolesList" :key="index"
|
|
9
|
+
:name="item.id"
|
|
10
|
+
>
|
|
11
|
+
{{item.roleName}}
|
|
12
|
+
</u-radio>
|
|
13
|
+
</u-radio-group>
|
|
14
|
+
<view style="margin-top: 20rpx; display: flex; flex-wrap: wrap">
|
|
15
|
+
<view>已选:</view>
|
|
16
|
+
<u-tag style="margin-right: 5px" v-for="val in currValue" :text="val.realname" closeable @close="removeClick(val)" :key="val.id" />
|
|
17
|
+
</view>
|
|
18
|
+
<view style="margin-top: 20rpx">
|
|
19
|
+
<u-table>
|
|
20
|
+
<u-tr>
|
|
21
|
+
<u-th width="50px" style="box-sizing: border-box">
|
|
22
|
+
<view v-if="multiple">
|
|
23
|
+
<u-checkbox :value="isAllCheck" @change="roleCheckAll">
|
|
24
|
+
</u-checkbox>
|
|
25
|
+
</view>
|
|
26
|
+
<view v-else>选择</view>
|
|
27
|
+
</u-th>
|
|
28
|
+
<u-th >姓名</u-th>
|
|
29
|
+
<u-th>所属部门</u-th>
|
|
30
|
+
</u-tr>
|
|
31
|
+
<u-tr v-for="user in roleUserList" :key="user.id">
|
|
32
|
+
<u-td width="50px" >
|
|
33
|
+
<view>
|
|
34
|
+
<u-checkbox v-model="user.checked" @change="handleCheck" :name="user.id">
|
|
35
|
+
</u-checkbox>
|
|
36
|
+
</view>
|
|
37
|
+
</u-td>
|
|
38
|
+
<u-td style="flex: 1"><view>{{ user.realname }}</view></u-td>
|
|
39
|
+
<u-td style="flex: 1; word-break: break-all; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;"><view>{{ user.departName }}</view></u-td>
|
|
40
|
+
</u-tr>
|
|
41
|
+
</u-table>
|
|
42
|
+
|
|
43
|
+
</view>
|
|
44
|
+
|
|
45
|
+
<view style="display: flex; justify-content: space-between; margin-top: 20rpx">
|
|
46
|
+
<u-button type="primary" size="medium" @click="handleSelectRoleUserOk">确定</u-button>
|
|
47
|
+
<u-button size="medium" @click="roleSelectShow = false">取消</u-button>
|
|
48
|
+
</view>
|
|
49
|
+
</view>
|
|
50
|
+
|
|
51
|
+
|
|
52
|
+
<t-loading :isLoading="isLoading"/>
|
|
53
|
+
</u-popup>
|
|
54
|
+
</template>
|
|
55
|
+
|
|
56
|
+
<script>
|
|
57
|
+
import {cloneObj} from "../../utils/util";
|
|
58
|
+
|
|
59
|
+
export default {
|
|
60
|
+
name: "userSelectByRole",
|
|
61
|
+
props: {
|
|
62
|
+
|
|
63
|
+
},
|
|
64
|
+
data() {
|
|
65
|
+
return {
|
|
66
|
+
roleSelectShow: false,
|
|
67
|
+
rolesList: [],
|
|
68
|
+
roleUserList: [],
|
|
69
|
+
currValue: [],
|
|
70
|
+
role: '',
|
|
71
|
+
multiple: false,
|
|
72
|
+
depId: '',
|
|
73
|
+
roleChecked: '',
|
|
74
|
+
isLoading: true,
|
|
75
|
+
}
|
|
76
|
+
},
|
|
77
|
+
computed: {
|
|
78
|
+
checkIds() {
|
|
79
|
+
return this.currValue.map(item => item.id)
|
|
80
|
+
},
|
|
81
|
+
isAllCheck() {
|
|
82
|
+
if (this.roleUserList.length === 0) return false
|
|
83
|
+
return this.roleUserList.every(item => item.checked)
|
|
84
|
+
},
|
|
85
|
+
},
|
|
86
|
+
methods: {
|
|
87
|
+
init(widget, value) {
|
|
88
|
+
this.roleSelectShow = true
|
|
89
|
+
this.isLoading = true
|
|
90
|
+
if (widget.options.departRelation) {
|
|
91
|
+
const userInfo = uni.getStorageSync('userinfo')
|
|
92
|
+
console.log("userInfo: ", userInfo)
|
|
93
|
+
this.depId = userInfo.departId || userInfo.depart_id
|
|
94
|
+
}
|
|
95
|
+
this.role = widget.options.role
|
|
96
|
+
this.multiple = widget.options.multiple
|
|
97
|
+
this.currValue = cloneObj(value || [])
|
|
98
|
+
this.$u.get('/sys/role/list', {
|
|
99
|
+
pageNo: 1,
|
|
100
|
+
pageSize: 100000,
|
|
101
|
+
}).then(res => {
|
|
102
|
+
this.rolesList = res.result.records.filter((item) => {
|
|
103
|
+
return this.role.includes(item.id);
|
|
104
|
+
})
|
|
105
|
+
}).finally(() => {
|
|
106
|
+
this.isLoading = false
|
|
107
|
+
})
|
|
108
|
+
},
|
|
109
|
+
removeClick(val) {
|
|
110
|
+
this.currValue = this.currValue.filter(item => item.id !== val.id)
|
|
111
|
+
const len = this.roleUserList
|
|
112
|
+
this.roleUserList.checked = this.roleUserList.filter((item, idx) => {
|
|
113
|
+
if (val.id === item.id) this.$set(item, 'checked', false )
|
|
114
|
+
return item.checked
|
|
115
|
+
}).length === len
|
|
116
|
+
},
|
|
117
|
+
handleCheck({value , name}) {
|
|
118
|
+
console.log(value, name)
|
|
119
|
+
if (!this.multiple) {
|
|
120
|
+
this.currValue = []
|
|
121
|
+
this.roleUserList = this.roleUserList.map((item, idx) => {
|
|
122
|
+
item.checked = false
|
|
123
|
+
return item
|
|
124
|
+
})
|
|
125
|
+
}
|
|
126
|
+
if (!value) {
|
|
127
|
+
this.currValue = this.currValue.filter(item => item.id != name)
|
|
128
|
+
}
|
|
129
|
+
const len = this.roleUserList
|
|
130
|
+
this.roleUserList.checked = this.roleUserList.filter((item, idx) => {
|
|
131
|
+
if (item.id === name) {
|
|
132
|
+
if (value && !this.checkIds.includes(item.id)) {
|
|
133
|
+
this.currValue.push(item)
|
|
134
|
+
}
|
|
135
|
+
this.$set(item, 'checked', value)
|
|
136
|
+
return value
|
|
137
|
+
}
|
|
138
|
+
return item.checked
|
|
139
|
+
}).length === len
|
|
140
|
+
console.log(this.currValue)
|
|
141
|
+
},
|
|
142
|
+
|
|
143
|
+
handleSelectRoleUserOk() {
|
|
144
|
+
this.roleSelectShow = false
|
|
145
|
+
// let checked = this.roleUserList.filter(item => {
|
|
146
|
+
// if (item.checked) return item
|
|
147
|
+
// })
|
|
148
|
+
//
|
|
149
|
+
// let ids = []
|
|
150
|
+
// checked = checked.concat(this.currValue).filter(item => {
|
|
151
|
+
// if (ids[item.id]) return false
|
|
152
|
+
// ids[item.id] = true
|
|
153
|
+
// return item
|
|
154
|
+
// })
|
|
155
|
+
|
|
156
|
+
this.$emit("ok", this.currValue)
|
|
157
|
+
},
|
|
158
|
+
roleCheckAll({value}) {
|
|
159
|
+
this.roleUserList.checked != this.roleUserList.checked
|
|
160
|
+
if (value) {
|
|
161
|
+
this.roleUserList.forEach(item => {
|
|
162
|
+
if (!this.checkIds.includes(item.id)) {
|
|
163
|
+
this.currValue.push(item)
|
|
164
|
+
}
|
|
165
|
+
this.$set(item, 'checked', value)
|
|
166
|
+
})
|
|
167
|
+
}
|
|
168
|
+
if (!value) {
|
|
169
|
+
this.roleUserList.forEach(item => {
|
|
170
|
+
this.currValue = this.currValue.filter(curr => curr.id !== item.id)
|
|
171
|
+
})
|
|
172
|
+
}
|
|
173
|
+
},
|
|
174
|
+
roleChange(roleId) {
|
|
175
|
+
this.isLoading = true
|
|
176
|
+
this.$u.get('/formApi/listFormUserByRole', {
|
|
177
|
+
pageNo: 1,
|
|
178
|
+
pageSize: 100000,
|
|
179
|
+
depId: this.depId,
|
|
180
|
+
roleId
|
|
181
|
+
}).then(res => {
|
|
182
|
+
this.roleUserList = res.result.records.filter(item => {
|
|
183
|
+
item.checked = this.checkIds.includes(item.id)
|
|
184
|
+
return item
|
|
185
|
+
})
|
|
186
|
+
}).finally( () => {
|
|
187
|
+
this.$nextTick(() => {
|
|
188
|
+
this.isLoading = false
|
|
189
|
+
})
|
|
190
|
+
})
|
|
191
|
+
|
|
192
|
+
},
|
|
193
|
+
}
|
|
194
|
+
}
|
|
195
|
+
</script>
|
|
196
|
+
|
|
197
|
+
<style scoped>
|
|
198
|
+
/deep/ u-th:nth-child(1) {
|
|
199
|
+
flex: 0 0 40px;
|
|
200
|
+
}
|
|
201
|
+
/deep/ u-th {
|
|
202
|
+
flex: 1;
|
|
203
|
+
}
|
|
204
|
+
|
|
205
|
+
|
|
206
|
+
.role-select-body {
|
|
207
|
+
display: flex;
|
|
208
|
+
flex-direction: column;
|
|
209
|
+
}
|
|
210
|
+
</style>
|