@zscreate/zhxy-app-component 1.0.0
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/dying318-picker/Demo.vue +342 -0
- package/components/dying318-picker/Picker.nvue +441 -0
- package/components/dying318-picker/Picker.vue +442 -0
- package/components/dying318-picker/Pickers.vue +321 -0
- package/components/dying318-picker/README.md +479 -0
- package/components/easydrag-sort/easydrag-sort.vue +248 -0
- package/components/evan-form/evan-form.vue +102 -0
- package/components/evan-form/utils.js +125 -0
- package/components/evan-form-item/evan-form-item.vue +1457 -0
- package/components/evan-form-item/mixins/computedMixin.js +44 -0
- package/components/evan-form-item/mixins/pubSubMixin.js +104 -0
- package/components/evan-form-item/mixins/validateByApiMinxins.js +21 -0
- package/components/evan-form-item/mixins/validateFormMixin.js +71 -0
- package/components/evan-form-item/mixins/valueChangeMixin.js +64 -0
- package/components/evan-form-item/modules/edit.png +0 -0
- package/components/evan-form-item/utilForForm.js +35 -0
- package/components/evan-form-item/utils.js +51 -0
- package/components/form-container/data.js +709 -0
- package/components/form-container/form-container.vue +897 -0
- package/components/jin-edit/jin-edit.vue +327 -0
- package/components/jin-edit/jin-icons.vue +48 -0
- package/components/jin-edit/readme.md +65 -0
- package/components/l-file/l-file.vue +260 -0
- package/components/lb-picker/index.vue +286 -0
- package/components/signatrue-write/signatrue-write.vue +220 -0
- package/components/t-color-picker/t-color-picker.vue +784 -0
- package/components/uni-datetime-picker/changelog.md +76 -0
- package/components/uni-datetime-picker/components/uni-datetime-picker/calendar-item.vue +182 -0
- package/components/uni-datetime-picker/components/uni-datetime-picker/calendar.js +546 -0
- package/components/uni-datetime-picker/components/uni-datetime-picker/calendar.vue +1024 -0
- package/components/uni-datetime-picker/components/uni-datetime-picker/i18n/en.json +19 -0
- package/components/uni-datetime-picker/components/uni-datetime-picker/i18n/index.js +8 -0
- package/components/uni-datetime-picker/components/uni-datetime-picker/i18n/zh-Hans.json +19 -0
- package/components/uni-datetime-picker/components/uni-datetime-picker/i18n/zh-Hant.json +19 -0
- package/components/uni-datetime-picker/components/uni-datetime-picker/keypress.js +45 -0
- package/components/uni-datetime-picker/components/uni-datetime-picker/time-picker.vue +927 -0
- package/components/uni-datetime-picker/components/uni-datetime-picker/uni-datetime-picker.vue +966 -0
- package/components/uni-datetime-picker/components/uni-datetime-picker/util.js +437 -0
- package/components/uni-datetime-picker/components/uni-datetime-picker/year-mont-picker.vue +901 -0
- package/components/uni-datetime-picker/components/uni-datetime-picker/year-picker.vue +271 -0
- package/components/uni-datetime-picker/package.json +89 -0
- package/components/uni-datetime-picker/readme.md +159 -0
- package/components/uni-icons/icons.js +96 -0
- package/components/uni-icons/uni-icons.vue +57 -0
- package/components/uni-popup/message.js +29 -0
- package/components/uni-popup/popup.js +25 -0
- package/components/uni-popup/uni-popup-dialog.vue +243 -0
- package/components/uni-popup/uni-popup-message.vue +116 -0
- package/components/uni-popup/uni-popup-share.vue +165 -0
- package/components/uni-popup/uni-popup.vue +297 -0
- package/components/uni-rate/uni-rate.vue +140 -0
- package/components/uni-transition/uni-transition.vue +279 -0
- package/components/uploadFile/uploadFile.vue +124 -0
- package/components/viewcomponents/applicateGrid.vue +96 -0
- package/components/viewcomponents/card.vue +166 -0
- package/components/viewcomponents/formCard.vue +82 -0
- package/components/viewcomponents/infocell.vue +122 -0
- package/components/viewcomponents/navsearch.vue +59 -0
- package/components/viewcomponents/newscontent.vue +85 -0
- package/components/xp-picker/util.js +105 -0
- package/components/xp-picker/xp-picker.vue +330 -0
- package/index.js +9 -0
- package/package.json +29 -0
- package/static/iconfont.css +32 -0
- package/static/mttf.ttf +0 -0
- package/static/uni.ttf +0 -0
- package/utils/js-interp.js +6501 -0
- package/utils/js-interp.md +10 -0
- package/utils/moment.js +4601 -0
- package/utils/util.js +106 -0
|
@@ -0,0 +1,321 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<view class="def-width">
|
|
3
|
+
<view @click.prevent.stop="showPicker">
|
|
4
|
+
<slot></slot>
|
|
5
|
+
</view>
|
|
6
|
+
<view ref="picker" class="picker-pop" v-show="show">
|
|
7
|
+
<view class="picker-mask" @click="cancel"></view>
|
|
8
|
+
<view class="picker-panel" :class="{'picker-panel-translate': show}">
|
|
9
|
+
<view class="sercc">
|
|
10
|
+
<view>
|
|
11
|
+
<navsearch @search="search" :placeholder="'请输入搜索项'">
|
|
12
|
+
</navsearch>
|
|
13
|
+
</view>
|
|
14
|
+
</view>
|
|
15
|
+
<view class="uni-list">
|
|
16
|
+
<checkbox-group @change="selectChange">
|
|
17
|
+
<template v-for="item in dataList">
|
|
18
|
+
<label class="uni-list-cell uni-list-cell-pd" :class="{notshow: !item.show}" @click="checkBox($event, item)"
|
|
19
|
+
:key="item.value">
|
|
20
|
+
<view>
|
|
21
|
+
<checkbox :value="item.value" :checked="item.checked" color="#FFFFFF" style="transform: scale(0.7,0.7);" />
|
|
22
|
+
</view>
|
|
23
|
+
<view>{{item.label}}</view>
|
|
24
|
+
</label>
|
|
25
|
+
</template>
|
|
26
|
+
|
|
27
|
+
</checkbox-group>
|
|
28
|
+
</view>
|
|
29
|
+
<cover-view style="z-index: 10001;" class="fixed">
|
|
30
|
+
<view class="select-fixed">
|
|
31
|
+
<text @click="cancel">取消</text>
|
|
32
|
+
<text></text>
|
|
33
|
+
<text @click="confirm">确定</text>
|
|
34
|
+
</view>
|
|
35
|
+
</cover-view>
|
|
36
|
+
</view>
|
|
37
|
+
</view>
|
|
38
|
+
|
|
39
|
+
</view>
|
|
40
|
+
</template>
|
|
41
|
+
|
|
42
|
+
<script>
|
|
43
|
+
import navsearch from '../viewcomponents/navsearch.vue'
|
|
44
|
+
export default {
|
|
45
|
+
props: {
|
|
46
|
+
multiple: {
|
|
47
|
+
value: Boolean,
|
|
48
|
+
default: false
|
|
49
|
+
},
|
|
50
|
+
dictTable: {
|
|
51
|
+
value: String,
|
|
52
|
+
default: ''
|
|
53
|
+
},
|
|
54
|
+
dictCode: {
|
|
55
|
+
value: String,
|
|
56
|
+
default: ''
|
|
57
|
+
},
|
|
58
|
+
pickerList: {
|
|
59
|
+
value: Array,
|
|
60
|
+
require: true,
|
|
61
|
+
default () {
|
|
62
|
+
return []
|
|
63
|
+
}
|
|
64
|
+
},
|
|
65
|
+
pickerKey: {
|
|
66
|
+
value: Object,
|
|
67
|
+
default () {
|
|
68
|
+
return {
|
|
69
|
+
value: 'value',
|
|
70
|
+
label: 'label',
|
|
71
|
+
children: 'children'
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
},
|
|
75
|
+
pickerStyle: {
|
|
76
|
+
value: Object,
|
|
77
|
+
default () {
|
|
78
|
+
return {
|
|
79
|
+
cancel: {},
|
|
80
|
+
confirm: {},
|
|
81
|
+
column: []
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
},
|
|
85
|
+
defaultValue: {
|
|
86
|
+
value: Array,
|
|
87
|
+
default () {
|
|
88
|
+
return []
|
|
89
|
+
}
|
|
90
|
+
},
|
|
91
|
+
columnNum: {
|
|
92
|
+
value: Number,
|
|
93
|
+
default: 0
|
|
94
|
+
},
|
|
95
|
+
itemRotateDeg: {
|
|
96
|
+
value: Number,
|
|
97
|
+
default: 15
|
|
98
|
+
},
|
|
99
|
+
beforeSetColumn: {
|
|
100
|
+
value: Function,
|
|
101
|
+
default: null
|
|
102
|
+
},
|
|
103
|
+
speedUpRatio: {
|
|
104
|
+
value: Number,
|
|
105
|
+
default: 1
|
|
106
|
+
},
|
|
107
|
+
},
|
|
108
|
+
components: {
|
|
109
|
+
navsearch
|
|
110
|
+
},
|
|
111
|
+
data() {
|
|
112
|
+
return {
|
|
113
|
+
show: false,
|
|
114
|
+
reactModel: true,
|
|
115
|
+
columns: [],
|
|
116
|
+
pickerItemHeight: Math.floor(68 * uni.getSystemInfoSync().windowWidth / 750),
|
|
117
|
+
startScrollTop: 0,
|
|
118
|
+
startPickedIndex: 0,
|
|
119
|
+
scrollingColumnIndex: 0,
|
|
120
|
+
checkedValues: [],
|
|
121
|
+
dataList: []
|
|
122
|
+
}
|
|
123
|
+
},
|
|
124
|
+
watch: {
|
|
125
|
+
pickerList() {
|
|
126
|
+
console.log('change')
|
|
127
|
+
},
|
|
128
|
+
defaultValue() {},
|
|
129
|
+
},
|
|
130
|
+
mounted() {},
|
|
131
|
+
created() {
|
|
132
|
+
this.dataListInit()
|
|
133
|
+
},
|
|
134
|
+
|
|
135
|
+
methods: {
|
|
136
|
+
dataListInit() {
|
|
137
|
+
this.pickerList.forEach((item, index) => {
|
|
138
|
+
this.$set(item, 'checked', false);
|
|
139
|
+
this.$set(item, 'show', true);
|
|
140
|
+
this.$set(this.dataList, index, item);
|
|
141
|
+
})
|
|
142
|
+
},
|
|
143
|
+
selectChange(e) {
|
|
144
|
+
var items = this.dataList,
|
|
145
|
+
values = e.detail.value;
|
|
146
|
+
for (var i = 0, lenI = items.length; i < lenI; ++i) {
|
|
147
|
+
const item = items[i]
|
|
148
|
+
if (values.includes(item.value)) {
|
|
149
|
+
this.$set(item, 'checked', true);
|
|
150
|
+
} else {
|
|
151
|
+
this.$set(item, 'checked', false);
|
|
152
|
+
}
|
|
153
|
+
}
|
|
154
|
+
},
|
|
155
|
+
checkBox($event, item) {
|
|
156
|
+
console.log(item)
|
|
157
|
+
if (item.checked) {
|
|
158
|
+
if (!this.multiple && this.checkedValues.length >= 1) {
|
|
159
|
+
uni.showToast({
|
|
160
|
+
title: '只支持单选',
|
|
161
|
+
duration: 2000,
|
|
162
|
+
icon: 'none'
|
|
163
|
+
});
|
|
164
|
+
this.$set(item, 'checked', false);
|
|
165
|
+
var arr = this.dataList.map(item => {
|
|
166
|
+
return item;
|
|
167
|
+
})
|
|
168
|
+
this.dataList = arr;
|
|
169
|
+
console.log(this.checkedValues)
|
|
170
|
+
console.log(this.dataList)
|
|
171
|
+
} else {
|
|
172
|
+
this.checkedValues.push(item)
|
|
173
|
+
}
|
|
174
|
+
} else {
|
|
175
|
+
this.checkedValues = this.checkedValues.filter(checkedItem => {
|
|
176
|
+
return checkedItem.value != item.value
|
|
177
|
+
})
|
|
178
|
+
}
|
|
179
|
+
|
|
180
|
+
},
|
|
181
|
+
search(val) {
|
|
182
|
+
this.dataList.forEach(item => {
|
|
183
|
+
console.log(item.label.includes(val))
|
|
184
|
+
if (item.label.includes(val)) {
|
|
185
|
+
item.show = true;
|
|
186
|
+
} else {
|
|
187
|
+
item.show = false;
|
|
188
|
+
}
|
|
189
|
+
})
|
|
190
|
+
console.log(this.dataList)
|
|
191
|
+
},
|
|
192
|
+
showPicker() {
|
|
193
|
+
this.checkedValues = []
|
|
194
|
+
this.show = true;
|
|
195
|
+
this.dataInit();
|
|
196
|
+
},
|
|
197
|
+
dataInit() {
|
|
198
|
+
if (this.dictCode) {
|
|
199
|
+
//根据字典Code, 初始化字典数组
|
|
200
|
+
this.$httpwx.get({
|
|
201
|
+
url: `/sys/dict/getDictItems/${this.dictCode}`,
|
|
202
|
+
data
|
|
203
|
+
}).then(res => {
|
|
204
|
+
if (res.success) {
|
|
205
|
+
res.result.forEach((item,index) => {
|
|
206
|
+
this.$set(item, 'checked', false);
|
|
207
|
+
this.$set(item, 'show', true);
|
|
208
|
+
this.$set(item, 'label', item.text);
|
|
209
|
+
this.$set(this.dataList, index, item);
|
|
210
|
+
});
|
|
211
|
+
|
|
212
|
+
}
|
|
213
|
+
})
|
|
214
|
+
} else if (this.dictTable) {
|
|
215
|
+
let params = {
|
|
216
|
+
tableName: this.dictTable
|
|
217
|
+
};
|
|
218
|
+
this.$httpwx.get({
|
|
219
|
+
url: `/form/formdesiger/getDataCenterDict`,
|
|
220
|
+
data: params
|
|
221
|
+
}).then(res => {
|
|
222
|
+
if (res.success) {
|
|
223
|
+
res.result.forEach((item,index) => {
|
|
224
|
+
this.$set(item, 'checked', false);
|
|
225
|
+
this.$set(item, 'show', true);
|
|
226
|
+
this.$set(item, 'value', item.dictValue);
|
|
227
|
+
this.$set(item, 'label', item.dictLabel);
|
|
228
|
+
this.$set(this.dataList, index, item);
|
|
229
|
+
});
|
|
230
|
+
}
|
|
231
|
+
})
|
|
232
|
+
}
|
|
233
|
+
},
|
|
234
|
+
confirm() {
|
|
235
|
+
this.$emit('confirm', this.checkedValues)
|
|
236
|
+
this.hide()
|
|
237
|
+
},
|
|
238
|
+
cancel() {
|
|
239
|
+
this.$emit('cancel')
|
|
240
|
+
this.hide()
|
|
241
|
+
},
|
|
242
|
+
hide() {
|
|
243
|
+
this.show = false
|
|
244
|
+
},
|
|
245
|
+
},
|
|
246
|
+
};
|
|
247
|
+
</script>
|
|
248
|
+
|
|
249
|
+
<style lang="scss" scoped>
|
|
250
|
+
$fixedHeight: 120upx;
|
|
251
|
+
.def-width {
|
|
252
|
+
width: 100%;
|
|
253
|
+
}
|
|
254
|
+
|
|
255
|
+
.notshow {
|
|
256
|
+
width: 0;
|
|
257
|
+
height: 0;
|
|
258
|
+
overflow: hidden;
|
|
259
|
+
padding: 0;
|
|
260
|
+
}
|
|
261
|
+
|
|
262
|
+
.picker-pop {
|
|
263
|
+
.picker-mask {
|
|
264
|
+
position: fixed;
|
|
265
|
+
top: 0;
|
|
266
|
+
left: 0;
|
|
267
|
+
right: 0;
|
|
268
|
+
bottom: 0;
|
|
269
|
+
z-index: 999;
|
|
270
|
+
width: 100vw;
|
|
271
|
+
height: 100vh;
|
|
272
|
+
background-color: rgba(0, 0, 0, .6);
|
|
273
|
+
}
|
|
274
|
+
|
|
275
|
+
.picker-panel {
|
|
276
|
+
position: fixed;
|
|
277
|
+
top: 0;
|
|
278
|
+
right: 0;
|
|
279
|
+
bottom: 0;
|
|
280
|
+
left: 0;
|
|
281
|
+
z-index: 999;
|
|
282
|
+
width: 100%;
|
|
283
|
+
height: 100vh;
|
|
284
|
+
background-color: #fff;
|
|
285
|
+
transform: translate(0, 100%);
|
|
286
|
+
transition: transform .3s;
|
|
287
|
+
padding-bottom: $fixedHeight;
|
|
288
|
+
|
|
289
|
+
.select-fixed {
|
|
290
|
+
height:$fixedHeight;
|
|
291
|
+
background-color: #ffffff;
|
|
292
|
+
position: fixed;
|
|
293
|
+
bottom: 10vh;
|
|
294
|
+
left: 0;
|
|
295
|
+
width: 100%;
|
|
296
|
+
overflow: hidden;
|
|
297
|
+
z-index: 10;
|
|
298
|
+
display: flex;
|
|
299
|
+
justify-content: space-between;
|
|
300
|
+
align-items: center;
|
|
301
|
+
border-top: 1upx solid #eee;
|
|
302
|
+
text{
|
|
303
|
+
flex:1;
|
|
304
|
+
text-align: center;
|
|
305
|
+
}
|
|
306
|
+
text + text {
|
|
307
|
+
color: #539dfa;
|
|
308
|
+
}
|
|
309
|
+
}
|
|
310
|
+
|
|
311
|
+
}
|
|
312
|
+
|
|
313
|
+
.picker-panel-translate {
|
|
314
|
+
transform: translate(0, 0);
|
|
315
|
+
}
|
|
316
|
+
}
|
|
317
|
+
.uni-list{
|
|
318
|
+
height: 80vh;
|
|
319
|
+
overflow-y: scroll;
|
|
320
|
+
}
|
|
321
|
+
</style>
|