@kyfe/hroa-ui 0.0.2 → 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/README.md +77 -77
- package/dist/demo.html +10 -0
- package/dist/hroa-ui.common.js +31775 -0
- package/dist/hroa-ui.css +6 -0
- package/dist/hroa-ui.umd.js +31775 -0
- package/dist/hroa-ui.umd.min.js +9 -0
- package/lib/getJsModule/index.css +6 -0
- package/lib/getJsModule/index.js +9 -0
- package/lib/hr-at-input/index.css +6 -0
- package/lib/hr-at-input/index.js +1 -0
- package/lib/hr-bottom-button/index.css +1 -0
- package/lib/hr-bottom-button/index.js +1 -0
- package/lib/hr-button/index.css +1 -0
- package/lib/hr-button/index.js +1 -0
- package/lib/hr-clipboard/index.css +1 -0
- package/lib/hr-clipboard/index.js +1 -0
- package/lib/hr-condition-filtrate/index.css +1 -0
- package/lib/hr-condition-filtrate/index.js +1 -0
- package/lib/hr-condition-filtrate-popup/index.css +1 -0
- package/lib/hr-condition-filtrate-popup/index.js +1 -0
- package/lib/hr-elasticity-box/index.css +1 -0
- package/lib/hr-elasticity-box/index.js +1 -0
- package/lib/hr-elasticity-box-item/index.css +1 -0
- package/lib/hr-elasticity-box-item/index.js +1 -0
- package/lib/hr-emotional-picture/index.css +1 -0
- package/lib/hr-emotional-picture/index.js +1 -0
- package/lib/hr-employee-choose/index.css +1 -0
- package/lib/hr-employee-choose/index.js +1 -0
- package/lib/hr-img-list/index.css +1 -0
- package/lib/hr-img-list/index.js +1 -0
- package/lib/hr-info-card/index.css +1 -0
- package/lib/hr-info-card/index.js +1 -0
- package/lib/hr-license-plate-number/index.css +1 -0
- package/lib/hr-license-plate-number/index.js +1 -0
- package/lib/hr-module-card/index.css +1 -0
- package/lib/hr-module-card/index.js +1 -0
- package/lib/hr-multiterm-choose/index.css +1 -0
- package/lib/hr-multiterm-choose/index.js +1 -0
- package/lib/hr-no-data/index.css +1 -0
- package/lib/hr-no-data/index.js +1 -0
- package/lib/hr-notice-bar/index.js +1 -0
- package/lib/hr-open-ks/index.css +1 -0
- package/lib/hr-open-ks/index.js +1 -0
- package/lib/hr-pager/index.css +1 -0
- package/lib/hr-pager/index.js +1 -0
- package/lib/hr-popup/index.css +1 -0
- package/lib/hr-popup/index.js +1 -0
- package/lib/hr-preview-file/index.css +1 -0
- package/lib/hr-preview-file/index.js +1 -0
- package/lib/hr-rate/index.css +1 -0
- package/lib/hr-rate/index.js +1 -0
- package/lib/hr-reason-textarea/index.css +1 -0
- package/lib/hr-reason-textarea/index.js +1 -0
- package/lib/hr-search-input/index.css +1 -0
- package/lib/hr-search-input/index.js +1 -0
- package/lib/hr-select/index.js +1 -0
- package/lib/hr-select-list/index.css +1 -0
- package/lib/hr-select-list/index.js +9 -0
- package/lib/hr-single-choose/index.css +1 -0
- package/lib/hr-single-choose/index.js +1 -0
- package/lib/hr-slide-pager/index.css +1 -0
- package/lib/hr-slide-pager/index.js +1 -0
- package/lib/hr-sort/index.css +1 -0
- package/lib/hr-sort/index.js +1 -0
- package/lib/hr-stack-image/index.css +1 -0
- package/lib/hr-stack-image/index.js +1 -0
- package/lib/hr-tab-nav/index.css +1 -0
- package/lib/hr-tab-nav/index.js +1 -0
- package/lib/hr-view-item/index.css +1 -0
- package/lib/hr-view-item/index.js +1 -0
- package/lib/index/index.css +6 -0
- package/lib/index/index.js +9 -0
- package/lib/utils/index.js +1 -0
- package/package.json +7 -6
- package/packages/getJsModule.js +11 -0
- package/packages/hr-at-input/index.js +7 -0
- package/packages/hr-at-input/src/blot/atPerson.js +43 -0
- package/packages/hr-at-input/src/index.vue +472 -0
- package/packages/hr-at-input/src/quill.snow.css +945 -0
- package/packages/hr-at-input/src/utils/index.js +60 -0
- package/packages/hr-at-input//346/224/257/346/214/201@/351/200/211/344/272/272/350/276/223/345/205/245/346/241/206.md +0 -0
- package/packages/hr-bottom-button/index.js +6 -6
- package/packages/hr-bottom-button/src/index.vue +108 -84
- package/packages/hr-button/index.js +12 -12
- package/packages/hr-button/src/hr-button.vue +38 -38
- package/packages/hr-clipboard/index.js +8 -3
- package/packages/hr-clipboard/src/index.vue +46 -0
- package/packages/hr-clipboard/src/util.js +9 -9
- package/packages/hr-condition-filtrate/enum/index.js +10 -10
- package/packages/hr-condition-filtrate/index.js +6 -6
- package/packages/hr-condition-filtrate/src/employee-choose/index.vue +101 -101
- package/packages/hr-condition-filtrate/src/index.vue +245 -245
- package/packages/hr-condition-filtrate/src/multiterm-choose/index.vue +166 -166
- package/packages/hr-condition-filtrate/src/org-tree-choose/index.vue +101 -101
- package/packages/hr-condition-filtrate/src/single-choose/index.vue +143 -143
- package/packages/hr-condition-filtrate/src/text-input/index.vue +60 -60
- package/packages/hr-condition-filtrate/src/time-selector/date-range-select.vue +154 -154
- package/packages/hr-condition-filtrate/src/time-selector/index.vue +380 -380
- package/packages/hr-condition-filtrate/src/time-selector/utils/constant.js +30 -30
- package/packages/hr-condition-filtrate/src/time-selector/utils/tools.js +212 -212
- package/packages/hr-condition-filtrate-popup/index.js +7 -0
- package/packages/hr-condition-filtrate-popup/src/index.vue +236 -0
- package/packages/hr-elasticity-box/index.js +7 -0
- package/packages/hr-elasticity-box/src/elasticity-box-item.vue +61 -0
- package/packages/hr-elasticity-box/src/index.vue +52 -0
- package/packages/hr-elasticity-box-item/index.js +7 -0
- package/packages/hr-emotional-picture/index.js +6 -6
- package/packages/hr-emotional-picture/src/index.vue +66 -66
- package/packages/hr-employee-choose/index.js +7 -0
- package/packages/hr-employee-choose/src/image/arrow-right.png +0 -0
- package/packages/hr-employee-choose/src/index.vue +119 -0
- package/packages/hr-img-list/index.js +3 -3
- package/packages/hr-img-list/src/index.vue +143 -123
- package/packages/hr-info-card/index.js +7 -0
- package/packages/hr-info-card/src/index.vue +67 -0
- package/packages/hr-license-plate-number/index.js +8 -0
- package/packages/hr-license-plate-number/src/enum.js +44 -0
- package/packages/hr-license-plate-number/src/index.vue +164 -0
- package/packages/hr-license-plate-number/src/vnp-keyboard.vue +182 -0
- package/packages/hr-license-plate-number//350/275/246/347/211/214/345/217/267/345/274/271/347/252/227.md +0 -0
- package/packages/hr-module-card/index.js +12 -12
- package/packages/hr-module-card/src/index.vue +132 -132
- package/packages/hr-module-card//346/250/241/345/235/227/345/215/241/347/211/207/347/273/204/344/273/266.md +29 -29
- package/packages/hr-multiterm-choose/index.js +8 -0
- package/packages/hr-multiterm-choose/src/active-icon.png +0 -0
- package/packages/hr-multiterm-choose/src/index.vue +212 -0
- package/packages/hr-multiterm-choose//345/244/232/351/200/211/346/241/206.md +0 -0
- package/packages/hr-no-data/index.js +7 -0
- package/packages/hr-no-data/src/index.vue +48 -0
- package/packages/hr-notice-bar/index.js +6 -6
- package/packages/hr-notice-bar/src/bem.js +37 -37
- package/packages/hr-notice-bar/src/index.js +51 -51
- package/packages/hr-notice-bar//351/200/232/347/237/245/346/240/217/347/273/204/344/273/266.md +2 -2
- package/packages/hr-open-ks/index.js +7 -3
- package/packages/hr-open-ks/src/{main.vue → index.vue} +97 -85
- package/packages/hr-open-ks/src/util.js +31 -31
- package/packages/hr-pager/index.js +6 -6
- package/packages/hr-pager/src/index.vue +95 -95
- package/packages/hr-popup/index.js +3 -3
- package/packages/hr-popup/src/index.vue +59 -47
- package/packages/hr-preview-file/index.js +7 -0
- package/packages/hr-preview-file/src/index.vue +58 -0
- package/packages/hr-preview-file/src/util.js +50 -0
- package/packages/hr-rate/index.js +7 -0
- package/packages/hr-rate/src/index.vue +42 -0
- package/packages/hr-rate//350/257/204/345/210/206/347/273/204/344/273/266/357/274/210/345/270/246/346/226/207/346/241/210/357/274/211.md +0 -0
- package/packages/hr-reason-textarea/index.js +7 -0
- package/packages/hr-reason-textarea/src/index.vue +128 -0
- package/packages/hr-search-input/index.js +7 -7
- package/packages/hr-search-input/src/index.vue +144 -144
- package/packages/hr-select/index.js +7 -3
- package/packages/hr-select/src/index.vue +41 -0
- package/packages/hr-select-list/index.js +3 -3
- package/packages/hr-select-list/src/index.vue +167 -161
- package/packages/hr-single-choose/index.js +8 -0
- package/packages/hr-single-choose/src/index.vue +178 -0
- package/packages/hr-single-choose//345/215/225/351/200/211/346/241/206.md +0 -0
- package/packages/hr-slide-pager/guide/image/turn-left.png +0 -0
- package/packages/hr-slide-pager/guide/image/turn-right.png +0 -0
- package/packages/hr-slide-pager/guide/index.vue +58 -58
- package/packages/hr-slide-pager/index.js +6 -6
- package/packages/hr-slide-pager/src/index.vue +375 -370
- package/packages/hr-sort/index.js +3 -0
- package/packages/hr-sort/src/main.vue +133 -0
- package/packages/hr-sort//346/216/222/345/272/217.md +0 -0
- package/packages/hr-stack-image/index.js +3 -3
- package/packages/hr-stack-image/src/main.vue +76 -76
- package/packages/hr-tab-nav/index.js +7 -7
- package/packages/hr-tab-nav/src/index.vue +114 -96
- package/packages/hr-view-item/index.js +12 -12
- package/packages/hr-view-item/src/index.vue +89 -89
- package/packages/index.js +23 -53
- package/packages/utils/directive/common.js +0 -0
- package/packages/utils/directive/index.js +2 -0
- package/packages/utils/{directive.js → directive/specific.js} +54 -58
- package/packages/utils/index.js +7 -73
- package/packages/utils/tool/common.js +65 -0
- package/packages/utils/tool/index.js +2 -0
- package/packages/utils/tool/specific.js +0 -0
- package/dist/404.html +0 -20
- package/dist/ERP-components/index.html +0 -34
- package/dist/H5-components/custom//346/211/223/345/274/200/350/267/250/345/243/260/350/201/212/345/244/251.html +0 -34
- package/dist/H5-components/index.html +0 -34
- package/dist/H5-components/initial-stage/introduce.html +0 -71
- package/dist/H5-components/initial-stage/updateLog.html +0 -42
- package/dist/H5-components/views/hr-emotional-picture.html +0 -51
- package/dist/H5-components/views/hr-info-card.html +0 -53
- package/dist/H5-components/views/hr-no-data.html +0 -47
- package/dist/H5-components/views/hr-preview-file.html +0 -76
- package/dist/H5-components/views/hr-search-input.html +0 -50
- package/dist/H5-components/views/tic-rich-input.html +0 -95
- package/dist/H5-components/views//345/211/252/345/210/207/346/235/277/345/244/215/345/210/266.html +0 -59
- package/dist/H5-components/views//345/261/202/345/217/240/345/233/276/347/211/207.html +0 -62
- package/dist/H5-components/views//346/211/223/345/274/200/350/267/250/345/243/260/347/224/250/346/210/267.html +0 -66
- package/dist/H5-components/views//346/213/226/346/213/275dom/345/205/203/347/264/240.html +0 -52
- package/dist/H5-components/views//346/214/211/351/222/256/347/277/273/351/241/265/347/273/204/344/273/266.html +0 -48
- package/dist/H5-components/views//346/273/221/345/212/250/347/277/273/351/241/265/347/273/204/344/273/266.html +0 -55
- package/dist/H5-components/views//351/200/211/346/213/251/345/231/250/350/241/250/345/215/225.html +0 -111
- package/dist/assets/css/0.styles.89cafbc9.css +0 -8
- package/dist/assets/img/hr-emotional-picture.e7db80e6.png +0 -0
- package/dist/assets/img/hr-info-card.c50e7c33.png +0 -0
- package/dist/assets/img/hr-pager.34bafc88.png +0 -0
- package/dist/assets/img/hr-preview-file-1.3cb7c6ed.png +0 -0
- package/dist/assets/img/hr-preview-file-2.0fe45ea1.png +0 -0
- package/dist/assets/img/search.83621669.svg +0 -1
- package/dist/assets/img/select.acadd024.png +0 -0
- package/dist/assets/img/slide-pager.8e2433c6.png +0 -0
- package/dist/assets/img/tic-rich-input.8beff81a.png +0 -0
- package/dist/assets/img/v-dragable.b824e34a.png +0 -0
- package/dist/assets/js/1.1b9c091d.js +0 -1
- package/dist/assets/js/12.af649b9d.js +0 -1
- package/dist/assets/js/13.16dba19e.js +0 -1
- package/dist/assets/js/14.73f3c298.js +0 -1
- package/dist/assets/js/15.0a34e390.js +0 -1
- package/dist/assets/js/16.0cb2e2cf.js +0 -1
- package/dist/assets/js/17.ab78de8b.js +0 -1
- package/dist/assets/js/18.267c7007.js +0 -1
- package/dist/assets/js/19.879db5c0.js +0 -1
- package/dist/assets/js/2.c3a8a3e9.js +0 -16
- package/dist/assets/js/20.fe2689df.js +0 -1
- package/dist/assets/js/21.15a9e12c.js +0 -1
- package/dist/assets/js/22.8d5eaba3.js +0 -1
- package/dist/assets/js/23.333c4992.js +0 -1
- package/dist/assets/js/24.543262a0.js +0 -1
- package/dist/assets/js/25.657016f9.js +0 -1
- package/dist/assets/js/26.03bfb23b.js +0 -1
- package/dist/assets/js/27.3faf82a6.js +0 -1
- package/dist/assets/js/28.2bc37274.js +0 -1
- package/dist/assets/js/29.27882fc9.js +0 -1
- package/dist/assets/js/3.b50928b1.js +0 -1
- package/dist/assets/js/30.e682e7b5.js +0 -1
- package/dist/assets/js/31.711223cc.js +0 -1
- package/dist/assets/js/32.65c4dfd4.js +0 -1
- package/dist/assets/js/33.b3a7c2ea.js +0 -1
- package/dist/assets/js/34.159478bb.js +0 -1
- package/dist/assets/js/35.5dead2b1.js +0 -1
- package/dist/assets/js/36.b58af11f.js +0 -1
- package/dist/assets/js/37.86d4ed5a.js +0 -1
- package/dist/assets/js/38.af279c3f.js +0 -1
- package/dist/assets/js/39.89b34b70.js +0 -1
- package/dist/assets/js/4.5d6de21f.js +0 -1
- package/dist/assets/js/40.3e1516da.js +0 -1
- package/dist/assets/js/41.d021ff9e.js +0 -1
- package/dist/assets/js/42.cb50aa1c.js +0 -1
- package/dist/assets/js/43.5fded5c8.js +0 -1
- package/dist/assets/js/44.50f78d19.js +0 -1
- package/dist/assets/js/45.527386eb.js +0 -1
- package/dist/assets/js/46.9f784389.js +0 -1
- package/dist/assets/js/47.7553aa19.js +0 -1
- package/dist/assets/js/48.9fee02f5.js +0 -1
- package/dist/assets/js/49.25c724d7.js +0 -1
- package/dist/assets/js/5.b3e00557.js +0 -1
- package/dist/assets/js/50.aba60d25.js +0 -1
- package/dist/assets/js/51.01a0bacf.js +0 -1
- package/dist/assets/js/52.86012cbb.js +0 -1
- package/dist/assets/js/53.1563eb60.js +0 -1
- package/dist/assets/js/54.7e734114.js +0 -1
- package/dist/assets/js/55.28b96a29.js +0 -1
- package/dist/assets/js/56.81bd12a3.js +0 -1
- package/dist/assets/js/57.70cac198.js +0 -1
- package/dist/assets/js/58.cc1b357e.js +0 -1
- package/dist/assets/js/59.697472ae.js +0 -1
- package/dist/assets/js/6.2c85d2f8.js +0 -1
- package/dist/assets/js/60.36873359.js +0 -1
- package/dist/assets/js/61.0a367a50.js +0 -1
- package/dist/assets/js/62.1aaa7b15.js +0 -1
- package/dist/assets/js/63.52c8de07.js +0 -1
- package/dist/assets/js/64.25b51d76.js +0 -1
- package/dist/assets/js/65.462206d5.js +0 -1
- package/dist/assets/js/66.c336d9fe.js +0 -1
- package/dist/assets/js/67.1b7fa2b9.js +0 -1
- package/dist/assets/js/68.e0ebaf13.js +0 -1
- package/dist/assets/js/69.3e1b6d2e.js +0 -1
- package/dist/assets/js/7.d1b0af72.js +0 -1
- package/dist/assets/js/70.40431d36.js +0 -1
- package/dist/assets/js/71.64f24577.js +0 -1
- package/dist/assets/js/72.2cf8371b.js +0 -1
- package/dist/assets/js/73.88f7feb5.js +0 -1
- package/dist/assets/js/74.2d5471c0.js +0 -1
- package/dist/assets/js/8.9ab5ee55.js +0 -1
- package/dist/assets/js/9.aaca0f9d.js +0 -9
- package/dist/assets/js/app.7efea3c2.js +0 -16
- package/dist/assets/js/vendors~docsearch.6f3b450f.js +0 -3
- package/dist/guide/about//346/255/244/346/226/207/346/241/243/351/241/271/347/233/256.html +0 -41
- package/dist/guide/index.html +0 -34
- package/dist/index.html +0 -40
- package/dist/local-js/axios@0.19.0.min.js +0 -9
- package/dist/local-js/ks@3.0.7.umd.min.js +0 -1
- package/dist/local-js/ksui@3.0.37.umd.min.js +0 -10
- package/dist/local-js/quill.js +0 -3
- package/dist/local-js/vant@2.5.6.min.js +0 -7
- package/dist/local-js/vconsole.min.js +0 -10
- package/dist/local-js/vue-router@3.1.3.min.js +0 -6
- package/dist/local-js/vue@2.6.10.runtime.min.js +0 -6
- package/dist/local-js/vue@2.7.16.min.js +0 -11932
- package/dist/local-js/vuex@3.1.1.min.js +0 -6
- package/dist/utils/ERP/ERP/345/267/245/345/205/267/346/226/271/346/263/225.html +0 -38
- package/dist/utils/H5/H5/345/267/245/345/205/267/346/226/271/346/263/225.html +0 -55
- package/dist/utils/H5/copyText /345/244/215/345/210/266.html" +0 -45
- package/dist/utils/index.html +0 -34
- package/dist//346/226/207/346/241/243/345/272/223/346/226/207/344/273/266/345/244/271.html +0 -46
- package/lib/demo.html +0 -10
- package/lib/hrui@1.0.1.common.js +0 -7411
- package/lib/hrui@1.0.1.css +0 -1
- package/lib/hrui@1.0.1.umd.js +0 -7411
- package/lib/hrui@1.0.1.umd.min.js +0 -1
- package/packages/hr-clipboard/src/icon.png +0 -0
- package/packages/hr-clipboard/src/main.vue +0 -64
- package/packages/hr-select/src/main.vue +0 -62
|
@@ -1,380 +1,380 @@
|
|
|
1
|
-
<script>
|
|
2
|
-
import DateRangeSelect from './date-range-select.vue'
|
|
3
|
-
import { hrDayJs } from './utils/tools'
|
|
4
|
-
import { DATE_SHORTCUT_PARAMS } from '../../enum/index.js'
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
export default {
|
|
8
|
-
name: 'TimeSelector',
|
|
9
|
-
components: {
|
|
10
|
-
DateRangeSelect,
|
|
11
|
-
},
|
|
12
|
-
props: {
|
|
13
|
-
comItem: {
|
|
14
|
-
type: Object,
|
|
15
|
-
default: () => ({})
|
|
16
|
-
},
|
|
17
|
-
type: {
|
|
18
|
-
type: String,
|
|
19
|
-
default: 'daterange'
|
|
20
|
-
},
|
|
21
|
-
min: {
|
|
22
|
-
type: String,
|
|
23
|
-
default: '2020/01/01'
|
|
24
|
-
},
|
|
25
|
-
isTab: { // 是否显示快捷按钮
|
|
26
|
-
type: Boolean,
|
|
27
|
-
default: true
|
|
28
|
-
},
|
|
29
|
-
defaultValue: {
|
|
30
|
-
type: Number,
|
|
31
|
-
default: 1
|
|
32
|
-
},
|
|
33
|
-
defaultType: {
|
|
34
|
-
type: String,
|
|
35
|
-
default: 'month'
|
|
36
|
-
},
|
|
37
|
-
title: {
|
|
38
|
-
type: String,
|
|
39
|
-
default () {
|
|
40
|
-
return '请选择'
|
|
41
|
-
}
|
|
42
|
-
},
|
|
43
|
-
},
|
|
44
|
-
data () {
|
|
45
|
-
return {
|
|
46
|
-
startDate: '',
|
|
47
|
-
endDate: '',
|
|
48
|
-
show: false,
|
|
49
|
-
defaultDate: [],
|
|
50
|
-
active: '',
|
|
51
|
-
maxDate: hrDayJs(new Date())
|
|
52
|
-
.subtract(-1, 'month')
|
|
53
|
-
.format('YYYY/MM/DD'),
|
|
54
|
-
selectValue: [],
|
|
55
|
-
dateKey: 1
|
|
56
|
-
}
|
|
57
|
-
},
|
|
58
|
-
mounted () {
|
|
59
|
-
this.initDate();
|
|
60
|
-
},
|
|
61
|
-
methods: {
|
|
62
|
-
handleChoose (active) {
|
|
63
|
-
const param = DATE_SHORTCUT_PARAMS[active]
|
|
64
|
-
const { count, type } = param
|
|
65
|
-
this.startDate = hrDayJs().subtract(count, type).format('YYYY/MM/DD')
|
|
66
|
-
this.endDate = hrDayJs().format('YYYY/MM/DD')
|
|
67
|
-
this.active = active
|
|
68
|
-
this.defaultDate = [this.startDate + ' 00:00:00', this.endDate + ' 23:59:59']
|
|
69
|
-
this.$emit('input', this.defaultDate)
|
|
70
|
-
},
|
|
71
|
-
initDate () {
|
|
72
|
-
let startDate = hrDayJs(new Date()).subtract(this.defaultValue, this.defaultType).format('YYYY/MM')
|
|
73
|
-
let endDate = hrDayJs(new Date()).format('YYYY/MM/DD')
|
|
74
|
-
this.defaultDate = [startDate + '/01 00:00:00', endDate + ' 23:59:59']
|
|
75
|
-
this.selectValue = { str: [startDate, endDate] }
|
|
76
|
-
this.startDate = null
|
|
77
|
-
this.endDate = null
|
|
78
|
-
this.active = ''
|
|
79
|
-
// this.comItem.value = []
|
|
80
|
-
},
|
|
81
|
-
closePop () {
|
|
82
|
-
this.show = false
|
|
83
|
-
},
|
|
84
|
-
showPop () {
|
|
85
|
-
this.show = true
|
|
86
|
-
},
|
|
87
|
-
// 校验时间差
|
|
88
|
-
timeDifference (date1, date2) {
|
|
89
|
-
date1 = new Date(date1)
|
|
90
|
-
date2 = new Date(date2)
|
|
91
|
-
var newYear = date1.getFullYear()
|
|
92
|
-
var newMonth = date1.getMonth() + 2
|
|
93
|
-
if (newMonth >= 11) {
|
|
94
|
-
newYear += 1
|
|
95
|
-
newMonth -= 11
|
|
96
|
-
date1.setFullYear(newYear)
|
|
97
|
-
date1.setMonth(newMonth - 1)
|
|
98
|
-
} else {
|
|
99
|
-
date1.setFullYear(newYear)
|
|
100
|
-
date1.setMonth(newMonth)
|
|
101
|
-
}
|
|
102
|
-
if (date1.getTime() >= date2.getTime()) {
|
|
103
|
-
return true
|
|
104
|
-
} else {
|
|
105
|
-
return false
|
|
106
|
-
}
|
|
107
|
-
},
|
|
108
|
-
// 时间选择器确认事件
|
|
109
|
-
onSelect (value) {
|
|
110
|
-
this.selectValue = value
|
|
111
|
-
},
|
|
112
|
-
submit () {
|
|
113
|
-
console.log('submit', this.selectValue)
|
|
114
|
-
let value = this.selectValue
|
|
115
|
-
if (value.str && value.str.length && value.str[1]) {
|
|
116
|
-
let res = this.timeDifference(value.str[0] + ' 00:00:00', value.str[1] + ' 00:00:00')
|
|
117
|
-
if (res) {
|
|
118
|
-
this.startDate = value.str[0]
|
|
119
|
-
this.endDate = value.str[1]
|
|
120
|
-
let val = [value.str[0] + ' 00:00:00', value.str[1] + ' 23:59:59']
|
|
121
|
-
this.defaultDate = val
|
|
122
|
-
this.$emit('input', val)
|
|
123
|
-
this.active = ''
|
|
124
|
-
this.show = false
|
|
125
|
-
} else {
|
|
126
|
-
this.$toast('选择时间不能超过2个月')
|
|
127
|
-
}
|
|
128
|
-
|
|
129
|
-
} else {
|
|
130
|
-
this.$toast('请选择结束时间')
|
|
131
|
-
}
|
|
132
|
-
},
|
|
133
|
-
reset () {
|
|
134
|
-
this.initDate()
|
|
135
|
-
this.dateKey++
|
|
136
|
-
}
|
|
137
|
-
},
|
|
138
|
-
render () {
|
|
139
|
-
{/* 渲染时间范围选择框 */ }
|
|
140
|
-
const renderRangeInputBox = () => {
|
|
141
|
-
return <div class="input-box">
|
|
142
|
-
<span>{this.startDate}</span>
|
|
143
|
-
<span class="mid-key"> - </span>
|
|
144
|
-
<span>{this.endDate}</span>
|
|
145
|
-
</div>
|
|
146
|
-
}
|
|
147
|
-
|
|
148
|
-
{/* 渲染单个时间选择框 */ }
|
|
149
|
-
const renderInputBox = () => {
|
|
150
|
-
return <div class="input-box">
|
|
151
|
-
<span>{this.defaultDate}</span>
|
|
152
|
-
</div>
|
|
153
|
-
}
|
|
154
|
-
|
|
155
|
-
{/* 快捷选项 */ }
|
|
156
|
-
const renderSelectorShortcutBox = () => {
|
|
157
|
-
return <div class="selector-shortcut">
|
|
158
|
-
{
|
|
159
|
-
Object.keys(DATE_SHORTCUT_PARAMS).map((key) => {
|
|
160
|
-
return <div class={["shortcut-item", key == this.active ? 'active' : '']}
|
|
161
|
-
onClick={this.handleChoose.bind(this, key)}
|
|
162
|
-
key={key}>{DATE_SHORTCUT_PARAMS[key].text}</div>
|
|
163
|
-
})
|
|
164
|
-
}
|
|
165
|
-
</div>
|
|
166
|
-
}
|
|
167
|
-
|
|
168
|
-
return <div class="time-selector">
|
|
169
|
-
{/* 头部 */}
|
|
170
|
-
<div class="selector-title">{this.title}</div>
|
|
171
|
-
{/* 选择框 */}
|
|
172
|
-
<div class="selector-input" onClick={this.showPop}>
|
|
173
|
-
{this.type == 'daterange' && renderRangeInputBox()}
|
|
174
|
-
{this.type == 'date' && renderInputBox()}
|
|
175
|
-
<span class="input-icon"></span>
|
|
176
|
-
</div>
|
|
177
|
-
{/* 是否显示快捷按钮 */}
|
|
178
|
-
{this.isTab && renderSelectorShortcutBox()}
|
|
179
|
-
{/* 时间选择框 */}
|
|
180
|
-
<div class="selector-popup">
|
|
181
|
-
<van-popup
|
|
182
|
-
value={this.show}
|
|
183
|
-
onInput={(value) => { this.show = value }}
|
|
184
|
-
style="height: 100%"
|
|
185
|
-
get-container="body"
|
|
186
|
-
position="right">
|
|
187
|
-
<div class="popup-date">
|
|
188
|
-
<header class="ksui-header">
|
|
189
|
-
<div class="back-icon" onClick={() => { this.show = false }}>
|
|
190
|
-
<van-icon size={15} name="arrow-left" />
|
|
191
|
-
<span>选择时间段</span>
|
|
192
|
-
</div>
|
|
193
|
-
</header>
|
|
194
|
-
<div class="date-content">
|
|
195
|
-
<DateRangeSelect defaultValue={this.defaultDate}
|
|
196
|
-
v-show={this.show}
|
|
197
|
-
key={this.dateKey}
|
|
198
|
-
min={this.min}
|
|
199
|
-
max={this.maxDate}
|
|
200
|
-
ref="dateRangeSelect"
|
|
201
|
-
onSelect={this.onSelect} />
|
|
202
|
-
</div>
|
|
203
|
-
<div class="date-footer">
|
|
204
|
-
<van-button type="default" onClick={this.reset} class="footer-btn left-btn">重置</van-button>
|
|
205
|
-
<van-button type="primary" onClick={this.submit} class="footer-btn">确定</van-button>
|
|
206
|
-
</div>
|
|
207
|
-
</div >
|
|
208
|
-
</van-popup>
|
|
209
|
-
</div>
|
|
210
|
-
</div >
|
|
211
|
-
}
|
|
212
|
-
}
|
|
213
|
-
</script>
|
|
214
|
-
|
|
215
|
-
<style lang="less" scoped>
|
|
216
|
-
/deep/.van-calendar__body {
|
|
217
|
-
.van-calendar__day--disabled {
|
|
218
|
-
color: #ccc;
|
|
219
|
-
}
|
|
220
|
-
}
|
|
221
|
-
/deep/.ksui-header {
|
|
222
|
-
.back-icon {
|
|
223
|
-
font-weight: 600 !important;
|
|
224
|
-
font-size: 16px !important;
|
|
225
|
-
.van-icon {
|
|
226
|
-
font-weight: 600 !important;
|
|
227
|
-
}
|
|
228
|
-
}
|
|
229
|
-
}
|
|
230
|
-
.time-selector {
|
|
231
|
-
width: 100%;
|
|
232
|
-
text-align: center;
|
|
233
|
-
line-height: 38px;
|
|
234
|
-
.selector-title {
|
|
235
|
-
line-height: 20px;
|
|
236
|
-
margin-bottom: 12px;
|
|
237
|
-
text-align: left;
|
|
238
|
-
font-size: 14px;
|
|
239
|
-
font-weight: 600;
|
|
240
|
-
color: #03050d;
|
|
241
|
-
.title-black {
|
|
242
|
-
font-size: 14px;
|
|
243
|
-
font-weight: normal;
|
|
244
|
-
color: #6e6d72;
|
|
245
|
-
}
|
|
246
|
-
}
|
|
247
|
-
.selector-input {
|
|
248
|
-
background: #f3f4f6;
|
|
249
|
-
border-radius: 8px;
|
|
250
|
-
color: #232323;
|
|
251
|
-
display: flex;
|
|
252
|
-
justify-content: space-between;
|
|
253
|
-
padding: 0 20px;
|
|
254
|
-
align-items: center;
|
|
255
|
-
line-height: 32px;
|
|
256
|
-
.input-box {
|
|
257
|
-
font-size: 14px;
|
|
258
|
-
color: #333333;
|
|
259
|
-
display: flex;
|
|
260
|
-
justify-content: space-between;
|
|
261
|
-
width: 100%;
|
|
262
|
-
span {
|
|
263
|
-
flex: 3;
|
|
264
|
-
}
|
|
265
|
-
.mid-key {
|
|
266
|
-
flex: 1;
|
|
267
|
-
}
|
|
268
|
-
}
|
|
269
|
-
.input-icon {
|
|
270
|
-
display: inline-block;
|
|
271
|
-
width: 14px;
|
|
272
|
-
height: 14px;
|
|
273
|
-
background: url("./images/date-icon.png") no-repeat;
|
|
274
|
-
background-size: 100%;
|
|
275
|
-
}
|
|
276
|
-
}
|
|
277
|
-
.selector-shortcut {
|
|
278
|
-
display: flex;
|
|
279
|
-
flex-wrap: wrap;
|
|
280
|
-
// justify-content: space-between;
|
|
281
|
-
justify-content: flex-start;
|
|
282
|
-
|
|
283
|
-
margin-top: 12px;
|
|
284
|
-
.shortcut-item {
|
|
285
|
-
width: calc((100% - 16px) / 3);
|
|
286
|
-
text-align: center;
|
|
287
|
-
background: #f3f4f6;
|
|
288
|
-
border-radius: 8px;
|
|
289
|
-
margin-bottom: 11px;
|
|
290
|
-
margin-right: 8px;
|
|
291
|
-
line-height: 28px;
|
|
292
|
-
font-size: 12px;
|
|
293
|
-
color: #03050d;
|
|
294
|
-
|
|
295
|
-
&.active {
|
|
296
|
-
// border: 1px solid #7972fe;
|
|
297
|
-
background: rgba(121, 114, 254, 0.08);
|
|
298
|
-
color: #7972fe;
|
|
299
|
-
position: relative;
|
|
300
|
-
&::after {
|
|
301
|
-
content: " ";
|
|
302
|
-
position: absolute;
|
|
303
|
-
left: 0;
|
|
304
|
-
top: 0;
|
|
305
|
-
width: 200%;
|
|
306
|
-
height: 200%;
|
|
307
|
-
border: 1px solid #7972fe;
|
|
308
|
-
border-radius: 16px;
|
|
309
|
-
-webkit-transform-origin: 0 0;
|
|
310
|
-
transform-origin: 0 0;
|
|
311
|
-
-webkit-transform: scale(0.5);
|
|
312
|
-
transform: scale(0.5);
|
|
313
|
-
}
|
|
314
|
-
}
|
|
315
|
-
}
|
|
316
|
-
.shortcut-item:nth-child(3n) {
|
|
317
|
-
margin-right: 0;
|
|
318
|
-
}
|
|
319
|
-
}
|
|
320
|
-
}
|
|
321
|
-
.popup-date {
|
|
322
|
-
.back-icon {
|
|
323
|
-
font-size: 14px;
|
|
324
|
-
color: #03050d;
|
|
325
|
-
font-weight: 500;
|
|
326
|
-
display: inline-block;
|
|
327
|
-
padding: 12px;
|
|
328
|
-
i {
|
|
329
|
-
position: relative;
|
|
330
|
-
top: -1px;
|
|
331
|
-
}
|
|
332
|
-
span {
|
|
333
|
-
margin-left: 2px;
|
|
334
|
-
position: relative;
|
|
335
|
-
top: -3px;
|
|
336
|
-
}
|
|
337
|
-
}
|
|
338
|
-
/deep/ .van-calendar__bottom-info {
|
|
339
|
-
bottom: 1px !important;
|
|
340
|
-
}
|
|
341
|
-
}
|
|
342
|
-
.date-footer {
|
|
343
|
-
width: 100%;
|
|
344
|
-
padding: 14px 20px;
|
|
345
|
-
// height: 64px;
|
|
346
|
-
flex-shrink: 0;
|
|
347
|
-
display: flex;
|
|
348
|
-
justify-content: space-around;
|
|
349
|
-
align-items: center;
|
|
350
|
-
overflow: hidden;
|
|
351
|
-
box-sizing: border-box;
|
|
352
|
-
.footer-btn {
|
|
353
|
-
height: 36px;
|
|
354
|
-
width: 44%;
|
|
355
|
-
border-radius: 8px;
|
|
356
|
-
height: 40px;
|
|
357
|
-
}
|
|
358
|
-
.left-btn {
|
|
359
|
-
color: #8b83fc;
|
|
360
|
-
position: relative;
|
|
361
|
-
border: none;
|
|
362
|
-
font-size: 16px;
|
|
363
|
-
height: 40px;
|
|
364
|
-
&::after {
|
|
365
|
-
content: " ";
|
|
366
|
-
position: absolute;
|
|
367
|
-
left: 0;
|
|
368
|
-
top: 0;
|
|
369
|
-
width: 200%;
|
|
370
|
-
height: 200%;
|
|
371
|
-
border: 1px solid #7972fe;
|
|
372
|
-
border-radius: 16px;
|
|
373
|
-
-webkit-transform-origin: 0 0;
|
|
374
|
-
transform-origin: 0 0;
|
|
375
|
-
-webkit-transform: scale(0.5);
|
|
376
|
-
transform: scale(0.5);
|
|
377
|
-
}
|
|
378
|
-
}
|
|
379
|
-
}
|
|
380
|
-
</style>
|
|
1
|
+
<script>
|
|
2
|
+
import DateRangeSelect from './date-range-select.vue'
|
|
3
|
+
import { hrDayJs } from './utils/tools'
|
|
4
|
+
import { DATE_SHORTCUT_PARAMS } from '../../enum/index.js'
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
export default {
|
|
8
|
+
name: 'TimeSelector',
|
|
9
|
+
components: {
|
|
10
|
+
DateRangeSelect,
|
|
11
|
+
},
|
|
12
|
+
props: {
|
|
13
|
+
comItem: {
|
|
14
|
+
type: Object,
|
|
15
|
+
default: () => ({})
|
|
16
|
+
},
|
|
17
|
+
type: {
|
|
18
|
+
type: String,
|
|
19
|
+
default: 'daterange'
|
|
20
|
+
},
|
|
21
|
+
min: {
|
|
22
|
+
type: String,
|
|
23
|
+
default: '2020/01/01'
|
|
24
|
+
},
|
|
25
|
+
isTab: { // 是否显示快捷按钮
|
|
26
|
+
type: Boolean,
|
|
27
|
+
default: true
|
|
28
|
+
},
|
|
29
|
+
defaultValue: {
|
|
30
|
+
type: Number,
|
|
31
|
+
default: 1
|
|
32
|
+
},
|
|
33
|
+
defaultType: {
|
|
34
|
+
type: String,
|
|
35
|
+
default: 'month'
|
|
36
|
+
},
|
|
37
|
+
title: {
|
|
38
|
+
type: String,
|
|
39
|
+
default () {
|
|
40
|
+
return '请选择'
|
|
41
|
+
}
|
|
42
|
+
},
|
|
43
|
+
},
|
|
44
|
+
data () {
|
|
45
|
+
return {
|
|
46
|
+
startDate: '',
|
|
47
|
+
endDate: '',
|
|
48
|
+
show: false,
|
|
49
|
+
defaultDate: [],
|
|
50
|
+
active: '',
|
|
51
|
+
maxDate: hrDayJs(new Date())
|
|
52
|
+
.subtract(-1, 'month')
|
|
53
|
+
.format('YYYY/MM/DD'),
|
|
54
|
+
selectValue: [],
|
|
55
|
+
dateKey: 1
|
|
56
|
+
}
|
|
57
|
+
},
|
|
58
|
+
mounted () {
|
|
59
|
+
this.initDate();
|
|
60
|
+
},
|
|
61
|
+
methods: {
|
|
62
|
+
handleChoose (active) {
|
|
63
|
+
const param = DATE_SHORTCUT_PARAMS[active]
|
|
64
|
+
const { count, type } = param
|
|
65
|
+
this.startDate = hrDayJs().subtract(count, type).format('YYYY/MM/DD')
|
|
66
|
+
this.endDate = hrDayJs().format('YYYY/MM/DD')
|
|
67
|
+
this.active = active
|
|
68
|
+
this.defaultDate = [this.startDate + ' 00:00:00', this.endDate + ' 23:59:59']
|
|
69
|
+
this.$emit('input', this.defaultDate)
|
|
70
|
+
},
|
|
71
|
+
initDate () {
|
|
72
|
+
let startDate = hrDayJs(new Date()).subtract(this.defaultValue, this.defaultType).format('YYYY/MM')
|
|
73
|
+
let endDate = hrDayJs(new Date()).format('YYYY/MM/DD')
|
|
74
|
+
this.defaultDate = [startDate + '/01 00:00:00', endDate + ' 23:59:59']
|
|
75
|
+
this.selectValue = { str: [startDate, endDate] }
|
|
76
|
+
this.startDate = null
|
|
77
|
+
this.endDate = null
|
|
78
|
+
this.active = ''
|
|
79
|
+
// this.comItem.value = []
|
|
80
|
+
},
|
|
81
|
+
closePop () {
|
|
82
|
+
this.show = false
|
|
83
|
+
},
|
|
84
|
+
showPop () {
|
|
85
|
+
this.show = true
|
|
86
|
+
},
|
|
87
|
+
// 校验时间差
|
|
88
|
+
timeDifference (date1, date2) {
|
|
89
|
+
date1 = new Date(date1)
|
|
90
|
+
date2 = new Date(date2)
|
|
91
|
+
var newYear = date1.getFullYear()
|
|
92
|
+
var newMonth = date1.getMonth() + 2
|
|
93
|
+
if (newMonth >= 11) {
|
|
94
|
+
newYear += 1
|
|
95
|
+
newMonth -= 11
|
|
96
|
+
date1.setFullYear(newYear)
|
|
97
|
+
date1.setMonth(newMonth - 1)
|
|
98
|
+
} else {
|
|
99
|
+
date1.setFullYear(newYear)
|
|
100
|
+
date1.setMonth(newMonth)
|
|
101
|
+
}
|
|
102
|
+
if (date1.getTime() >= date2.getTime()) {
|
|
103
|
+
return true
|
|
104
|
+
} else {
|
|
105
|
+
return false
|
|
106
|
+
}
|
|
107
|
+
},
|
|
108
|
+
// 时间选择器确认事件
|
|
109
|
+
onSelect (value) {
|
|
110
|
+
this.selectValue = value
|
|
111
|
+
},
|
|
112
|
+
submit () {
|
|
113
|
+
console.log('submit', this.selectValue)
|
|
114
|
+
let value = this.selectValue
|
|
115
|
+
if (value.str && value.str.length && value.str[1]) {
|
|
116
|
+
let res = this.timeDifference(value.str[0] + ' 00:00:00', value.str[1] + ' 00:00:00')
|
|
117
|
+
if (res) {
|
|
118
|
+
this.startDate = value.str[0]
|
|
119
|
+
this.endDate = value.str[1]
|
|
120
|
+
let val = [value.str[0] + ' 00:00:00', value.str[1] + ' 23:59:59']
|
|
121
|
+
this.defaultDate = val
|
|
122
|
+
this.$emit('input', val)
|
|
123
|
+
this.active = ''
|
|
124
|
+
this.show = false
|
|
125
|
+
} else {
|
|
126
|
+
this.$toast('选择时间不能超过2个月')
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
} else {
|
|
130
|
+
this.$toast('请选择结束时间')
|
|
131
|
+
}
|
|
132
|
+
},
|
|
133
|
+
reset () {
|
|
134
|
+
this.initDate()
|
|
135
|
+
this.dateKey++
|
|
136
|
+
}
|
|
137
|
+
},
|
|
138
|
+
render () {
|
|
139
|
+
{/* 渲染时间范围选择框 */ }
|
|
140
|
+
const renderRangeInputBox = () => {
|
|
141
|
+
return <div class="input-box">
|
|
142
|
+
<span>{this.startDate}</span>
|
|
143
|
+
<span class="mid-key"> - </span>
|
|
144
|
+
<span>{this.endDate}</span>
|
|
145
|
+
</div>
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
{/* 渲染单个时间选择框 */ }
|
|
149
|
+
const renderInputBox = () => {
|
|
150
|
+
return <div class="input-box">
|
|
151
|
+
<span>{this.defaultDate}</span>
|
|
152
|
+
</div>
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
{/* 快捷选项 */ }
|
|
156
|
+
const renderSelectorShortcutBox = () => {
|
|
157
|
+
return <div class="selector-shortcut">
|
|
158
|
+
{
|
|
159
|
+
Object.keys(DATE_SHORTCUT_PARAMS).map((key) => {
|
|
160
|
+
return <div class={["shortcut-item", key == this.active ? 'active' : '']}
|
|
161
|
+
onClick={this.handleChoose.bind(this, key)}
|
|
162
|
+
key={key}>{DATE_SHORTCUT_PARAMS[key].text}</div>
|
|
163
|
+
})
|
|
164
|
+
}
|
|
165
|
+
</div>
|
|
166
|
+
}
|
|
167
|
+
|
|
168
|
+
return <div class="time-selector">
|
|
169
|
+
{/* 头部 */}
|
|
170
|
+
<div class="selector-title">{this.title}</div>
|
|
171
|
+
{/* 选择框 */}
|
|
172
|
+
<div class="selector-input" onClick={this.showPop}>
|
|
173
|
+
{this.type == 'daterange' && renderRangeInputBox()}
|
|
174
|
+
{this.type == 'date' && renderInputBox()}
|
|
175
|
+
<span class="input-icon"></span>
|
|
176
|
+
</div>
|
|
177
|
+
{/* 是否显示快捷按钮 */}
|
|
178
|
+
{this.isTab && renderSelectorShortcutBox()}
|
|
179
|
+
{/* 时间选择框 */}
|
|
180
|
+
<div class="selector-popup">
|
|
181
|
+
<van-popup
|
|
182
|
+
value={this.show}
|
|
183
|
+
onInput={(value) => { this.show = value }}
|
|
184
|
+
style="height: 100%"
|
|
185
|
+
get-container="body"
|
|
186
|
+
position="right">
|
|
187
|
+
<div class="popup-date">
|
|
188
|
+
<header class="ksui-header">
|
|
189
|
+
<div class="back-icon" onClick={() => { this.show = false }}>
|
|
190
|
+
<van-icon size={15} name="arrow-left" />
|
|
191
|
+
<span>选择时间段</span>
|
|
192
|
+
</div>
|
|
193
|
+
</header>
|
|
194
|
+
<div class="date-content">
|
|
195
|
+
<DateRangeSelect defaultValue={this.defaultDate}
|
|
196
|
+
v-show={this.show}
|
|
197
|
+
key={this.dateKey}
|
|
198
|
+
min={this.min}
|
|
199
|
+
max={this.maxDate}
|
|
200
|
+
ref="dateRangeSelect"
|
|
201
|
+
onSelect={this.onSelect} />
|
|
202
|
+
</div>
|
|
203
|
+
<div class="date-footer">
|
|
204
|
+
<van-button type="default" onClick={this.reset} class="footer-btn left-btn">重置</van-button>
|
|
205
|
+
<van-button type="primary" onClick={this.submit} class="footer-btn">确定</van-button>
|
|
206
|
+
</div>
|
|
207
|
+
</div >
|
|
208
|
+
</van-popup>
|
|
209
|
+
</div>
|
|
210
|
+
</div >
|
|
211
|
+
}
|
|
212
|
+
}
|
|
213
|
+
</script>
|
|
214
|
+
|
|
215
|
+
<style lang="less" scoped>
|
|
216
|
+
/deep/.van-calendar__body {
|
|
217
|
+
.van-calendar__day--disabled {
|
|
218
|
+
color: #ccc;
|
|
219
|
+
}
|
|
220
|
+
}
|
|
221
|
+
/deep/.ksui-header {
|
|
222
|
+
.back-icon {
|
|
223
|
+
font-weight: 600 !important;
|
|
224
|
+
font-size: 16px !important;
|
|
225
|
+
.van-icon {
|
|
226
|
+
font-weight: 600 !important;
|
|
227
|
+
}
|
|
228
|
+
}
|
|
229
|
+
}
|
|
230
|
+
.time-selector {
|
|
231
|
+
width: 100%;
|
|
232
|
+
text-align: center;
|
|
233
|
+
line-height: 38px;
|
|
234
|
+
.selector-title {
|
|
235
|
+
line-height: 20px;
|
|
236
|
+
margin-bottom: 12px;
|
|
237
|
+
text-align: left;
|
|
238
|
+
font-size: 14px;
|
|
239
|
+
font-weight: 600;
|
|
240
|
+
color: #03050d;
|
|
241
|
+
.title-black {
|
|
242
|
+
font-size: 14px;
|
|
243
|
+
font-weight: normal;
|
|
244
|
+
color: #6e6d72;
|
|
245
|
+
}
|
|
246
|
+
}
|
|
247
|
+
.selector-input {
|
|
248
|
+
background: #f3f4f6;
|
|
249
|
+
border-radius: 8px;
|
|
250
|
+
color: #232323;
|
|
251
|
+
display: flex;
|
|
252
|
+
justify-content: space-between;
|
|
253
|
+
padding: 0 20px;
|
|
254
|
+
align-items: center;
|
|
255
|
+
line-height: 32px;
|
|
256
|
+
.input-box {
|
|
257
|
+
font-size: 14px;
|
|
258
|
+
color: #333333;
|
|
259
|
+
display: flex;
|
|
260
|
+
justify-content: space-between;
|
|
261
|
+
width: 100%;
|
|
262
|
+
span {
|
|
263
|
+
flex: 3;
|
|
264
|
+
}
|
|
265
|
+
.mid-key {
|
|
266
|
+
flex: 1;
|
|
267
|
+
}
|
|
268
|
+
}
|
|
269
|
+
.input-icon {
|
|
270
|
+
display: inline-block;
|
|
271
|
+
width: 14px;
|
|
272
|
+
height: 14px;
|
|
273
|
+
background: url("./images/date-icon.png") no-repeat;
|
|
274
|
+
background-size: 100%;
|
|
275
|
+
}
|
|
276
|
+
}
|
|
277
|
+
.selector-shortcut {
|
|
278
|
+
display: flex;
|
|
279
|
+
flex-wrap: wrap;
|
|
280
|
+
// justify-content: space-between;
|
|
281
|
+
justify-content: flex-start;
|
|
282
|
+
|
|
283
|
+
margin-top: 12px;
|
|
284
|
+
.shortcut-item {
|
|
285
|
+
width: calc((100% - 16px) / 3);
|
|
286
|
+
text-align: center;
|
|
287
|
+
background: #f3f4f6;
|
|
288
|
+
border-radius: 8px;
|
|
289
|
+
margin-bottom: 11px;
|
|
290
|
+
margin-right: 8px;
|
|
291
|
+
line-height: 28px;
|
|
292
|
+
font-size: 12px;
|
|
293
|
+
color: #03050d;
|
|
294
|
+
|
|
295
|
+
&.active {
|
|
296
|
+
// border: 1px solid #7972fe;
|
|
297
|
+
background: rgba(121, 114, 254, 0.08);
|
|
298
|
+
color: #7972fe;
|
|
299
|
+
position: relative;
|
|
300
|
+
&::after {
|
|
301
|
+
content: " ";
|
|
302
|
+
position: absolute;
|
|
303
|
+
left: 0;
|
|
304
|
+
top: 0;
|
|
305
|
+
width: 200%;
|
|
306
|
+
height: 200%;
|
|
307
|
+
border: 1px solid #7972fe;
|
|
308
|
+
border-radius: 16px;
|
|
309
|
+
-webkit-transform-origin: 0 0;
|
|
310
|
+
transform-origin: 0 0;
|
|
311
|
+
-webkit-transform: scale(0.5);
|
|
312
|
+
transform: scale(0.5);
|
|
313
|
+
}
|
|
314
|
+
}
|
|
315
|
+
}
|
|
316
|
+
.shortcut-item:nth-child(3n) {
|
|
317
|
+
margin-right: 0;
|
|
318
|
+
}
|
|
319
|
+
}
|
|
320
|
+
}
|
|
321
|
+
.popup-date {
|
|
322
|
+
.back-icon {
|
|
323
|
+
font-size: 14px;
|
|
324
|
+
color: #03050d;
|
|
325
|
+
font-weight: 500;
|
|
326
|
+
display: inline-block;
|
|
327
|
+
padding: 12px;
|
|
328
|
+
i {
|
|
329
|
+
position: relative;
|
|
330
|
+
top: -1px;
|
|
331
|
+
}
|
|
332
|
+
span {
|
|
333
|
+
margin-left: 2px;
|
|
334
|
+
position: relative;
|
|
335
|
+
top: -3px;
|
|
336
|
+
}
|
|
337
|
+
}
|
|
338
|
+
/deep/ .van-calendar__bottom-info {
|
|
339
|
+
bottom: 1px !important;
|
|
340
|
+
}
|
|
341
|
+
}
|
|
342
|
+
.date-footer {
|
|
343
|
+
width: 100%;
|
|
344
|
+
padding: 14px 20px;
|
|
345
|
+
// height: 64px;
|
|
346
|
+
flex-shrink: 0;
|
|
347
|
+
display: flex;
|
|
348
|
+
justify-content: space-around;
|
|
349
|
+
align-items: center;
|
|
350
|
+
overflow: hidden;
|
|
351
|
+
box-sizing: border-box;
|
|
352
|
+
.footer-btn {
|
|
353
|
+
height: 36px;
|
|
354
|
+
width: 44%;
|
|
355
|
+
border-radius: 8px;
|
|
356
|
+
height: 40px;
|
|
357
|
+
}
|
|
358
|
+
.left-btn {
|
|
359
|
+
color: #8b83fc;
|
|
360
|
+
position: relative;
|
|
361
|
+
border: none;
|
|
362
|
+
font-size: 16px;
|
|
363
|
+
height: 40px;
|
|
364
|
+
&::after {
|
|
365
|
+
content: " ";
|
|
366
|
+
position: absolute;
|
|
367
|
+
left: 0;
|
|
368
|
+
top: 0;
|
|
369
|
+
width: 200%;
|
|
370
|
+
height: 200%;
|
|
371
|
+
border: 1px solid #7972fe;
|
|
372
|
+
border-radius: 16px;
|
|
373
|
+
-webkit-transform-origin: 0 0;
|
|
374
|
+
transform-origin: 0 0;
|
|
375
|
+
-webkit-transform: scale(0.5);
|
|
376
|
+
transform: scale(0.5);
|
|
377
|
+
}
|
|
378
|
+
}
|
|
379
|
+
}
|
|
380
|
+
</style>
|