@zscreate/zhxy-app-component 1.0.221 → 1.0.223
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/components/responsibility.vue +127 -127
- package/components/evan-form-item/evan-form-item.vue +5 -1
- package/components/evan-form-item/mixins/commonMixin.js +15 -0
- package/components/l-file/l-file.vue +7 -1
- package/components/uni-datetime-picker/components/uni-datetime-picker/calendar.vue +1 -1
- package/components/uploadFile/uploadFile.vue +6 -1
- package/package.json +1 -1
|
@@ -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>
|
|
@@ -2144,9 +2144,11 @@ checkbox-group label {
|
|
|
2144
2144
|
}
|
|
2145
2145
|
|
|
2146
2146
|
::v-deep .uni-calendar__mask {
|
|
2147
|
-
z-index:
|
|
2147
|
+
z-index: 999;
|
|
2148
2148
|
}
|
|
2149
2149
|
|
|
2150
|
+
|
|
2151
|
+
|
|
2150
2152
|
.location-form-item {
|
|
2151
2153
|
width: 100%;
|
|
2152
2154
|
display: flex;
|
|
@@ -2174,4 +2176,6 @@ checkbox-group label {
|
|
|
2174
2176
|
z-index: 1;
|
|
2175
2177
|
}
|
|
2176
2178
|
</style>
|
|
2179
|
+
<style>
|
|
2177
2180
|
|
|
2181
|
+
</style>
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import {toAwait} from "../../../utils/util";
|
|
2
|
+
import Vue from 'vue'
|
|
3
|
+
export default {
|
|
4
|
+
methods: {
|
|
5
|
+
async getOpenId() {
|
|
6
|
+
let openId = Vue.prototype._openId
|
|
7
|
+
if (openId) return Promise.resolve(openId)
|
|
8
|
+
|
|
9
|
+
const [ err , res ] = await toAwait(this.$u.get('/sys/user/getUserPublicOpenId'))
|
|
10
|
+
openId = await this.$async_encryption(res.result)
|
|
11
|
+
Vue.prototype._openId = openId
|
|
12
|
+
return openId
|
|
13
|
+
},
|
|
14
|
+
}
|
|
15
|
+
}
|
|
@@ -175,6 +175,12 @@ import {downloadFile, getOpenId, toAwait} from "../../utils/util";
|
|
|
175
175
|
title: (e && e.toString()) || '文件上传失败',
|
|
176
176
|
icon: 'none'
|
|
177
177
|
})
|
|
178
|
+
}
|
|
179
|
+
let message = res.message
|
|
180
|
+
try {
|
|
181
|
+
message = decodeURIComponent(message)
|
|
182
|
+
} catch (e) {
|
|
183
|
+
|
|
178
184
|
}
|
|
179
185
|
let uid = String(Math.random()).substr(2) - 0
|
|
180
186
|
let imgObj = {
|
|
@@ -182,7 +188,7 @@ import {downloadFile, getOpenId, toAwait} from "../../utils/util";
|
|
|
182
188
|
key: uid,
|
|
183
189
|
name: that.name,
|
|
184
190
|
status: "success",
|
|
185
|
-
url:
|
|
191
|
+
url: message
|
|
186
192
|
}
|
|
187
193
|
if (that.widget.options.uploadEncrypt) {
|
|
188
194
|
imgObj['fileId'] = res.result.fileId
|
|
@@ -139,7 +139,12 @@ export default {
|
|
|
139
139
|
// })
|
|
140
140
|
for (let i = 0; i < lists.length; i++) {
|
|
141
141
|
|
|
142
|
-
|
|
142
|
+
let { message, result = {}, success } = await this.uploadFilePromise(lists[i].url)
|
|
143
|
+
try {
|
|
144
|
+
message = decodeURIComponent(message)
|
|
145
|
+
} catch (e) {
|
|
146
|
+
|
|
147
|
+
}
|
|
143
148
|
let id = new Date().getTime();
|
|
144
149
|
if (!success) {
|
|
145
150
|
return uni.showToast({
|