@zscreate/zhxy-app-component 1.0.249 → 1.0.252
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.
|
@@ -1,128 +1,128 @@
|
|
|
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) {
|
|
42
|
-
this.isShow = true
|
|
43
|
-
return
|
|
44
|
-
}
|
|
45
|
-
this.isShow = true
|
|
46
|
-
this.countDown = 0
|
|
47
|
-
clearInterval(this.clearTimeout)
|
|
48
|
-
if (this.widget.options.force) {
|
|
49
|
-
this.countDown = this.widget.options.countDown
|
|
50
|
-
this.clearTimeout = setInterval(() => {
|
|
51
|
-
if (this.countDown < 0) {
|
|
52
|
-
clearInterval(this.clearTimeout)
|
|
53
|
-
}
|
|
54
|
-
this.countDown -= 1
|
|
55
|
-
}, 1000)
|
|
56
|
-
}
|
|
57
|
-
},
|
|
58
|
-
confirm() {
|
|
59
|
-
if (this.countDown <= 0) {
|
|
60
|
-
this.dataModel = true
|
|
61
|
-
this.isShow = false
|
|
62
|
-
}
|
|
63
|
-
},
|
|
64
|
-
cancel() {
|
|
65
|
-
this.isShow = false
|
|
66
|
-
this.dataModel = false
|
|
67
|
-
clearInterval(this.clearTimeout)
|
|
68
|
-
},
|
|
69
|
-
handleCheck() {
|
|
70
|
-
const { disabled, force} = this.widget.options
|
|
71
|
-
if (disabled) return
|
|
72
|
-
if (force && !disabled) {
|
|
73
|
-
if (this.dataModel) return this.dataModel = false
|
|
74
|
-
return this.handleClick()
|
|
75
|
-
}
|
|
76
|
-
this.dataModel = !this.dataModel
|
|
77
|
-
},
|
|
78
|
-
change(e) {
|
|
79
|
-
console.log(e)
|
|
80
|
-
},
|
|
81
|
-
disabledScroll() {
|
|
82
|
-
return
|
|
83
|
-
}
|
|
84
|
-
}
|
|
85
|
-
}
|
|
86
|
-
</script>
|
|
87
|
-
|
|
88
|
-
<template>
|
|
89
|
-
<view>
|
|
90
|
-
<full-modal v-model="isShow">
|
|
91
|
-
<view style="height: 100%; background-color: #fff" @touchmove.stop.prevent="disabledScroll">
|
|
92
|
-
<scroll-view scroll-y="true" style="height: calc(100% - 100rpx); " >
|
|
93
|
-
<view style="padding: 20rpx 40rpx;">
|
|
94
|
-
<rich-text :nodes="widget.options.content" style="text-align: left"></rich-text>
|
|
95
|
-
</view>
|
|
96
|
-
<view v-if="!widget.options.disabled" style="display: flex; padding: 20rpx; margin-bottom: 20rpx; justify-content: center">
|
|
97
|
-
<button @click="confirm" type="primary" style="margin-right: 10px; border-radius: 10rpx; padding: 0 20px; 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>
|
|
98
|
-
<button style="height: 60rpx; line-height: 60rpx; font-size: 26rpx; border-radius: 10rpx; color: #333" @click="cancel">不同意</button>
|
|
99
|
-
</view>
|
|
100
|
-
<view v-else style="display: flex; justify-content: center; align-items: center">
|
|
101
|
-
<button @click="isShow = false" type="primary" style="margin-bottom: 20px; border-radius: 10rpx; padding: 0 20px; height: 60rpx; line-height: 60rpx; font-size: 26rpx; " >关闭</button>
|
|
102
|
-
</view>
|
|
103
|
-
</scroll-view>
|
|
104
|
-
</view>
|
|
105
|
-
</full-modal>
|
|
106
|
-
<view class="responsibility_check" >
|
|
107
|
-
<view @click.stop="handleCheck">
|
|
108
|
-
<label>
|
|
109
|
-
<checkbox :disabled="widget.options.disabled" :readonly="widget.options.disabled" v-if="!isShow" :checked="dataModel" color="#007AFF" style="transform: scale(0.8,0.8);"/>
|
|
110
|
-
</label>
|
|
111
|
-
</view>
|
|
112
|
-
<view class="option-font-size" @click.stop="handleClick">{{ widget.options.title }}</view>
|
|
113
|
-
|
|
114
|
-
</view>
|
|
115
|
-
</view>
|
|
116
|
-
|
|
117
|
-
</template>
|
|
118
|
-
|
|
119
|
-
<style lang="less">
|
|
120
|
-
.responsibility_check {
|
|
121
|
-
display: flex;
|
|
122
|
-
align-items: center;
|
|
123
|
-
/deep/ .uni-checkbox-input {
|
|
124
|
-
width: 18px;
|
|
125
|
-
height: 18px;
|
|
126
|
-
}
|
|
127
|
-
}
|
|
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) {
|
|
42
|
+
this.isShow = true
|
|
43
|
+
return
|
|
44
|
+
}
|
|
45
|
+
this.isShow = true
|
|
46
|
+
this.countDown = 0
|
|
47
|
+
clearInterval(this.clearTimeout)
|
|
48
|
+
if (this.widget.options.force) {
|
|
49
|
+
this.countDown = this.widget.options.countDown
|
|
50
|
+
this.clearTimeout = setInterval(() => {
|
|
51
|
+
if (this.countDown < 0) {
|
|
52
|
+
clearInterval(this.clearTimeout)
|
|
53
|
+
}
|
|
54
|
+
this.countDown -= 1
|
|
55
|
+
}, 1000)
|
|
56
|
+
}
|
|
57
|
+
},
|
|
58
|
+
confirm() {
|
|
59
|
+
if (this.countDown <= 0) {
|
|
60
|
+
this.dataModel = true
|
|
61
|
+
this.isShow = false
|
|
62
|
+
}
|
|
63
|
+
},
|
|
64
|
+
cancel() {
|
|
65
|
+
this.isShow = false
|
|
66
|
+
this.dataModel = false
|
|
67
|
+
clearInterval(this.clearTimeout)
|
|
68
|
+
},
|
|
69
|
+
handleCheck() {
|
|
70
|
+
const { disabled, force} = this.widget.options
|
|
71
|
+
if (disabled) return
|
|
72
|
+
if (force && !disabled) {
|
|
73
|
+
if (this.dataModel) return this.dataModel = false
|
|
74
|
+
return this.handleClick()
|
|
75
|
+
}
|
|
76
|
+
this.dataModel = !this.dataModel
|
|
77
|
+
},
|
|
78
|
+
change(e) {
|
|
79
|
+
console.log(e)
|
|
80
|
+
},
|
|
81
|
+
disabledScroll() {
|
|
82
|
+
return
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
</script>
|
|
87
|
+
|
|
88
|
+
<template>
|
|
89
|
+
<view>
|
|
90
|
+
<full-modal v-model="isShow">
|
|
91
|
+
<view style="height: 100%; background-color: #fff" @touchmove.stop.prevent="disabledScroll">
|
|
92
|
+
<scroll-view scroll-y="true" style="height: calc(100% - 100rpx); " >
|
|
93
|
+
<view style="padding: 20rpx 40rpx;">
|
|
94
|
+
<rich-text :nodes="widget.options.content" style="text-align: left"></rich-text>
|
|
95
|
+
</view>
|
|
96
|
+
<view v-if="!widget.options.disabled" style="display: flex; padding: 20rpx; margin-bottom: 20rpx; justify-content: center">
|
|
97
|
+
<button @click="confirm" type="primary" style="margin-right: 10px; border-radius: 10rpx; padding: 0 20px; 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>
|
|
98
|
+
<button style="height: 60rpx; line-height: 60rpx; font-size: 26rpx; border-radius: 10rpx; color: #333" @click="cancel">不同意</button>
|
|
99
|
+
</view>
|
|
100
|
+
<view v-else style="display: flex; justify-content: center; align-items: center">
|
|
101
|
+
<button @click="isShow = false" type="primary" style="margin-bottom: 20px; border-radius: 10rpx; padding: 0 20px; height: 60rpx; line-height: 60rpx; font-size: 26rpx; " >关闭</button>
|
|
102
|
+
</view>
|
|
103
|
+
</scroll-view>
|
|
104
|
+
</view>
|
|
105
|
+
</full-modal>
|
|
106
|
+
<view class="responsibility_check" >
|
|
107
|
+
<view @click.stop="handleCheck">
|
|
108
|
+
<label>
|
|
109
|
+
<checkbox :disabled="widget.options.disabled" :readonly="widget.options.disabled" v-if="!isShow" :checked="dataModel" color="#007AFF" style="transform: scale(0.8,0.8);"/>
|
|
110
|
+
</label>
|
|
111
|
+
</view>
|
|
112
|
+
<view class="option-font-size" @click.stop="handleClick">{{ widget.options.title }}</view>
|
|
113
|
+
|
|
114
|
+
</view>
|
|
115
|
+
</view>
|
|
116
|
+
|
|
117
|
+
</template>
|
|
118
|
+
|
|
119
|
+
<style lang="less">
|
|
120
|
+
.responsibility_check {
|
|
121
|
+
display: flex;
|
|
122
|
+
align-items: center;
|
|
123
|
+
/deep/ .uni-checkbox-input {
|
|
124
|
+
width: 18px;
|
|
125
|
+
height: 18px;
|
|
126
|
+
}
|
|
127
|
+
}
|
|
128
128
|
</style>
|
|
@@ -701,6 +701,9 @@ export default {
|
|
|
701
701
|
}
|
|
702
702
|
},
|
|
703
703
|
inject: {
|
|
704
|
+
formContext: {
|
|
705
|
+
form: 'formContext'
|
|
706
|
+
},
|
|
704
707
|
dataObj: {
|
|
705
708
|
form: 'dataObj'
|
|
706
709
|
},
|
|
@@ -2157,11 +2160,16 @@ checkbox-group label {
|
|
|
2157
2160
|
.option-time-icon {
|
|
2158
2161
|
width: 150rpx;
|
|
2159
2162
|
}
|
|
2160
|
-
|
|
2163
|
+
// #ifdef MP-WEIXIN
|
|
2164
|
+
::v-deep .uni-calendar__mask {
|
|
2165
|
+
z-index: 10;
|
|
2166
|
+
}
|
|
2167
|
+
// #endif
|
|
2168
|
+
//#ifdef H5
|
|
2161
2169
|
::v-deep .uni-calendar__mask {
|
|
2162
2170
|
z-index: 999;
|
|
2163
2171
|
}
|
|
2164
|
-
|
|
2172
|
+
// #endif
|
|
2165
2173
|
|
|
2166
2174
|
|
|
2167
2175
|
.location-form-item {
|
|
@@ -230,6 +230,7 @@ export default {
|
|
|
230
230
|
components: { evanFormItem ,evanForm, mTextarea },
|
|
231
231
|
provide() {
|
|
232
232
|
return {
|
|
233
|
+
formContext: this,
|
|
233
234
|
dataObj: () => this.dataObj,
|
|
234
235
|
getFormData: () => this.value,
|
|
235
236
|
}
|
|
@@ -252,6 +253,7 @@ export default {
|
|
|
252
253
|
tableFlag: {
|
|
253
254
|
|
|
254
255
|
},
|
|
256
|
+
userSignature: undefined,
|
|
255
257
|
// dataObj:dataObj,
|
|
256
258
|
isScroll: true,
|
|
257
259
|
tableRowsShow: {},
|
|
@@ -293,6 +295,14 @@ export default {
|
|
|
293
295
|
// // console.log(this.models)
|
|
294
296
|
// this.isScroll = true;
|
|
295
297
|
// },
|
|
298
|
+
verifyNode: {
|
|
299
|
+
handler(val) {
|
|
300
|
+
if (val) {
|
|
301
|
+
this.userSignature = this.$u.get('workhall/userseal/queryById')
|
|
302
|
+
}
|
|
303
|
+
},
|
|
304
|
+
immediate: true
|
|
305
|
+
},
|
|
296
306
|
models: {
|
|
297
307
|
deep: true,
|
|
298
308
|
handler(v) {
|
|
@@ -445,7 +455,7 @@ export default {
|
|
|
445
455
|
const select = this.selectList.find(item => item.label === this.suggestType)
|
|
446
456
|
const { enableSign , enableSeal } = options
|
|
447
457
|
if (select.description === 'TIJIAO') {
|
|
448
|
-
this
|
|
458
|
+
this.userSignature.then(res => {
|
|
449
459
|
if (res.success) {
|
|
450
460
|
this.models[model].userSign = enableSign ? res.result.userSign : ''
|
|
451
461
|
this.models[model].userSeal = enableSeal ? res.result.userSeal : ''
|