bxs-tools-ui 3.2.0 → 3.3.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 +20 -20
- package/es/add-and-take/index.css +1 -1
- package/es/add-and-take/index.js +283 -64
- package/es/adjust-baoe/index.css +1 -1
- package/es/adjust-baoe/index.js +444 -195
- package/es/business-card/index.css +1 -1
- package/es/business-card/index.js +1 -0
- package/es/canvas-poster/index.css +1 -1
- package/es/canvas-poster/index.js +1 -0
- package/es/index.css +1 -1
- package/es/index.js +936 -824
- package/es/insure-calculate/index.css +1 -1
- package/es/insure-calculate/index.js +438 -265
- package/es/person-info/index.css +1 -1
- package/es/person-info/index.js +296 -1370
- package/es/product-info/index.css +1 -1
- package/es/product-info/index.js +644 -548
- package/es/share-sheet/index.css +1 -1
- package/es/share-sheet/index.js +313 -21
- package/es/utils/index.js +530 -429
- package/lib/add-and-take/index.css +1 -1
- package/lib/add-and-take/index.js +283 -64
- package/lib/adjust-baoe/index.css +1 -1
- package/lib/adjust-baoe/index.js +441 -194
- package/lib/business-card/index.css +1 -1
- package/lib/business-card/index.js +1 -0
- package/lib/canvas-poster/index.css +1 -1
- package/lib/canvas-poster/index.js +1 -0
- package/lib/index.css +1 -1
- package/lib/index.js +939 -826
- package/lib/insure-calculate/index.css +1 -1
- package/lib/insure-calculate/index.js +438 -268
- package/lib/person-info/index.css +1 -1
- package/lib/person-info/index.js +295 -1372
- package/lib/product-info/index.css +1 -1
- package/lib/product-info/index.js +645 -550
- package/lib/share-sheet/index.css +1 -1
- package/lib/share-sheet/index.js +313 -25
- package/lib/utils/index.js +531 -433
- package/package.json +9 -7
- package/packages/add-and-take/components/interest-form.less +144 -0
- package/packages/add-and-take/components/interest-form.vue +179 -179
- package/packages/add-and-take/components/interest-items.less +87 -0
- package/packages/add-and-take/components/interest-items.vue +67 -80
- package/packages/add-and-take/components/interest-table.less +111 -0
- package/packages/add-and-take/components/interest-table.vue +31 -31
- package/packages/add-and-take/constant.ts +2 -2
- package/packages/add-and-take/demo/index.vue +89 -86
- package/packages/add-and-take/handler.ts +52 -57
- package/packages/add-and-take/index.less +69 -0
- package/packages/add-and-take/index.vue +156 -156
- package/packages/add-and-take/readme.md +87 -98
- package/packages/adjust-baoe/demo/index.vue +37 -47
- package/packages/adjust-baoe/index.less +125 -0
- package/packages/adjust-baoe/index.vue +134 -147
- package/packages/adjust-baoe/readme.md +35 -45
- package/packages/business-card/demo/index.vue +7 -7
- package/packages/business-card/index.less +100 -0
- package/packages/business-card/index.vue +18 -21
- package/packages/business-card/readme.md +46 -53
- package/packages/bxs-utils/demo/index.vue +2 -2
- package/packages/bxs-utils/index.ts +5 -5
- package/packages/bxs-utils/planbook/common.ts +56 -92
- package/packages/bxs-utils/planbook/index.ts +4 -4
- package/packages/bxs-utils/planbook/insurance.ts +137 -127
- package/packages/bxs-utils/planbook/person.ts +143 -147
- package/packages/bxs-utils/planbook/product.ts +473 -509
- package/packages/bxs-utils/readme.md +94 -84
- package/packages/bxs-utils/trade/index.js +1 -1
- package/packages/bxs-utils/trade/insureCalculate.js +91 -204
- package/packages/canvas-poster/demo/index.vue +9 -13
- package/packages/canvas-poster/index.less +5 -0
- package/packages/canvas-poster/index.vue +68 -79
- package/packages/canvas-poster/readme.md +106 -109
- package/packages/index.ts +1 -1
- package/packages/insure-calculate/demo/index.vue +20 -20
- package/packages/insure-calculate/index.less +366 -0
- package/packages/insure-calculate/index.vue +305 -329
- package/packages/insure-calculate/readme.md +99 -106
- package/packages/person-info/crm-popup.vue +81 -80
- package/packages/person-info/demo/index.vue +25 -37
- package/packages/person-info/index-inline.less +11 -0
- package/packages/person-info/index.vue +53 -83
- package/packages/person-info/readme.md +109 -115
- package/packages/planbook-input/components/footer.less +54 -0
- package/packages/planbook-input/components/footer.vue +8 -64
- package/packages/planbook-input/components/handler.js +33 -44
- package/packages/planbook-input/components/product-table.less +235 -0
- package/packages/planbook-input/components/product-table.vue +114 -108
- package/packages/planbook-input/demo/index.vue +3 -3
- package/packages/planbook-input/helper.js +852 -465
- package/packages/planbook-input/index.less +30 -0
- package/packages/planbook-input/index.vue +86 -103
- package/packages/planbook-input/readme.md +72 -90
- package/packages/product-info/demo/constant.js +1 -1
- package/packages/product-info/demo/index.vue +31 -43
- package/packages/product-info/index.less +271 -0
- package/packages/product-info/index.vue +198 -210
- package/packages/product-info/readme.md +72 -75
- package/packages/share-sheet/constant.js +4 -4
- package/packages/share-sheet/demo/index.vue +10 -10
- package/packages/share-sheet/handler.js +14 -14
- package/packages/share-sheet/index.less +201 -0
- package/packages/share-sheet/index.vue +39 -39
- package/packages/share-sheet/readme.md +121 -127
- package/src/api/add-and-take.js +45 -0
- package/src/api/adjust-baoe.js +16 -0
- package/src/api/index.js +6 -0
- package/src/api/planbook.js +93 -0
- package/src/api/request.js +211 -0
- package/src/api/trade.js +56 -0
- package/src/api/user.js +18 -0
- package/src/components/common/common-age-birthday.less +66 -0
- package/src/components/common/common-age-birthday.vue +27 -95
- package/src/components/common/common-popup.less +81 -0
- package/src/components/common/common-popup.vue +12 -96
- package/src/components/common/common-radio.less +75 -0
- package/src/components/common/common-radio.vue +13 -91
- package/src/components/common/common-select.less +13 -0
- package/src/components/common/common-select.vue +21 -38
- package/src/components/common/common-title.less +115 -0
- package/src/components/common/common-title.vue +24 -24
- package/src/js/loading.js +6 -6
- package/src/js/md5Token.js +38 -44
- package/src/js/utils.js +45 -53
- package/src/js/variables.js +47 -25
- package/src/style/base.less +18 -0
- package/src/style/color.less +40 -0
- package/src/style/variables.less +21 -42
- package/packages/add-and-take/api.ts +0 -70
- package/packages/add-and-take/components/interest-form.css +0 -146
- package/packages/add-and-take/components/interest-items.css +0 -87
- package/packages/add-and-take/components/interest-table.css +0 -113
- package/packages/add-and-take/index.css +0 -70
- package/packages/adjust-baoe/index.css +0 -123
- package/packages/business-card/index.css +0 -101
- package/packages/canvas-poster/index.css +0 -5
- package/packages/insure-calculate/index.css +0 -368
- package/packages/planbook-input/api.js +0 -29
- package/packages/planbook-input/components/product-table.css +0 -236
- package/packages/planbook-input/index.css +0 -31
- package/packages/product-info/index.css +0 -264
- package/packages/share-sheet/index.css +0 -203
- package/src/components/common/common-title.css +0 -116
- package/src/js/request.js +0 -64
- package/src/style/apply.css +0 -25
- package/src/style/base.css +0 -36
- package/src/style/color.css +0 -74
|
@@ -36,6 +36,8 @@
|
|
|
36
36
|
</template>
|
|
37
37
|
|
|
38
38
|
<script>
|
|
39
|
+
import './common-popup.less'
|
|
40
|
+
|
|
39
41
|
export default {
|
|
40
42
|
name: 'CommonPopup',
|
|
41
43
|
props: {
|
|
@@ -59,115 +61,29 @@ export default {
|
|
|
59
61
|
computed: {
|
|
60
62
|
visible: {
|
|
61
63
|
get() {
|
|
62
|
-
return this.value
|
|
64
|
+
return this.value
|
|
63
65
|
},
|
|
64
66
|
set(v) {
|
|
65
|
-
this.$emit('input', v)
|
|
67
|
+
this.$emit('input', v)
|
|
66
68
|
}
|
|
67
69
|
},
|
|
68
70
|
styleHeight() {
|
|
69
|
-
const { height } = this
|
|
70
|
-
return height ? (typeof height === 'number' ? `${height}px` : height) : '79.8%'
|
|
71
|
+
const { height } = this
|
|
72
|
+
return height ? (typeof height === 'number' ? `${height}px` : height) : '79.8%'
|
|
71
73
|
}
|
|
72
74
|
},
|
|
73
75
|
methods: {
|
|
74
76
|
cancel() {
|
|
75
|
-
this.visible = false
|
|
76
|
-
this.$emit('cancel')
|
|
77
|
-
this.$emit('click-overlay')
|
|
77
|
+
this.visible = false
|
|
78
|
+
this.$emit('cancel')
|
|
79
|
+
this.$emit('click-overlay')
|
|
78
80
|
},
|
|
79
81
|
confirm() {
|
|
80
82
|
if (this.confirmDisabled) {
|
|
81
|
-
return
|
|
82
|
-
}
|
|
83
|
-
this.$emit('confirm');
|
|
84
|
-
}
|
|
85
|
-
}
|
|
86
|
-
};
|
|
87
|
-
</script>
|
|
88
|
-
|
|
89
|
-
<style lang="css">
|
|
90
|
-
@import 'base.css';
|
|
91
|
-
@import 'apply';
|
|
92
|
-
@import 'color.css';
|
|
93
|
-
|
|
94
|
-
.bxt_common_popup {
|
|
95
|
-
display: flex;
|
|
96
|
-
flex-direction: column;
|
|
97
|
-
|
|
98
|
-
& .van-popup__close-icon {
|
|
99
|
-
position: absolute;
|
|
100
|
-
font-size: 22px;
|
|
101
|
-
}
|
|
102
|
-
|
|
103
|
-
& .bxt_common_popup_title {
|
|
104
|
-
padding: 11px 16px;
|
|
105
|
-
font-size: 16px;
|
|
106
|
-
color: var(--color-text-primary);
|
|
107
|
-
line-height: 24px;
|
|
108
|
-
font-weight: bold;
|
|
109
|
-
font-weight: 500;
|
|
110
|
-
text-align: center;
|
|
111
|
-
|
|
112
|
-
& > span {
|
|
113
|
-
@apply --noWrap;
|
|
114
|
-
|
|
115
|
-
width: 100%;
|
|
116
|
-
padding: 0 2em;
|
|
117
|
-
white-space: nowrap;
|
|
118
|
-
box-sizing: border-box;
|
|
119
|
-
vertical-align: middle;
|
|
120
|
-
}
|
|
121
|
-
}
|
|
122
|
-
|
|
123
|
-
& .bxt_common_popup_main {
|
|
124
|
-
position: relative;
|
|
125
|
-
flex: 1;
|
|
126
|
-
overflow: auto;
|
|
127
|
-
min-height: 0;
|
|
128
|
-
background: var(--color-bg-primary);
|
|
129
|
-
}
|
|
130
|
-
|
|
131
|
-
& .bxt_common_popup_footer {
|
|
132
|
-
@apply --safe-area-inset-bottom;
|
|
133
|
-
|
|
134
|
-
font-size: 14px;
|
|
135
|
-
line-height: 1.2;
|
|
136
|
-
text-align: center;
|
|
137
|
-
border-top: 1px solid var(--color-line-split);
|
|
138
|
-
background: var(--color-bg-minor);
|
|
139
|
-
|
|
140
|
-
& .bxt_common_popup_footer_wrapper {
|
|
141
|
-
display: flex;
|
|
142
|
-
padding: 7px 15px;
|
|
143
|
-
|
|
144
|
-
& > span {
|
|
145
|
-
flex: 1;
|
|
146
|
-
display: inline;
|
|
147
|
-
line-height: 100%;
|
|
148
|
-
padding: 10px 16px;
|
|
149
|
-
color: var(--color-text-primary);
|
|
150
|
-
background: white;
|
|
151
|
-
border: 1px solid var(--color-text-assist);
|
|
152
|
-
border-radius: 6px;
|
|
153
|
-
}
|
|
154
|
-
|
|
155
|
-
& > span:not(:last-child) {
|
|
156
|
-
margin-right: 9px;
|
|
157
|
-
}
|
|
158
|
-
|
|
159
|
-
& > span.primary {
|
|
160
|
-
color: white;
|
|
161
|
-
background: var(--color-primary);
|
|
162
|
-
border-color: var(--color-primary);
|
|
163
|
-
}
|
|
164
|
-
|
|
165
|
-
& > span.disabled {
|
|
166
|
-
color: white;
|
|
167
|
-
background: var(--color-text-patch);
|
|
168
|
-
border-color: var(--color-text-patch);
|
|
83
|
+
return
|
|
169
84
|
}
|
|
85
|
+
this.$emit('confirm')
|
|
170
86
|
}
|
|
171
87
|
}
|
|
172
88
|
}
|
|
173
|
-
</
|
|
89
|
+
</script>
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
.bxt_common_field_radio {
|
|
2
|
+
padding-top: 11px;
|
|
3
|
+
padding-bottom: 11px;
|
|
4
|
+
|
|
5
|
+
& .van-field__control--right {
|
|
6
|
+
& .bxt_common_form_radio.disabled {
|
|
7
|
+
& .bxt_common_form_radio_item {
|
|
8
|
+
padding-right: 0;
|
|
9
|
+
}
|
|
10
|
+
}
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
& .bxt_common_form_radio {
|
|
14
|
+
margin-right: -8px;
|
|
15
|
+
margin-bottom: -8px;
|
|
16
|
+
font-size: 13px;
|
|
17
|
+
|
|
18
|
+
& .bxt_common_form_radio_item {
|
|
19
|
+
display: inline-block;
|
|
20
|
+
min-width: 60px;
|
|
21
|
+
margin-bottom: 6px;
|
|
22
|
+
margin-right: 8px;
|
|
23
|
+
padding: 6px 9px;
|
|
24
|
+
text-align: center;
|
|
25
|
+
line-height: 13px;
|
|
26
|
+
font-weight: normal;
|
|
27
|
+
color: var(--bxt-text-patch);
|
|
28
|
+
border: 1px solid var(--bxt-bg-primary);
|
|
29
|
+
border-radius: 30px;
|
|
30
|
+
background: var(--bxt-bg-primary);
|
|
31
|
+
box-sizing: border-box;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
& .bxt_common_form_radio_item.active {
|
|
35
|
+
font-weight: bold;
|
|
36
|
+
font-weight: 500;
|
|
37
|
+
border-color: var(--bxt-primary);
|
|
38
|
+
color: var(--bxt-primary);
|
|
39
|
+
background: rgba(2, 92, 234, 0.1);
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
& .bxt_common_form_radio_item.disabled {
|
|
43
|
+
color: var(--bxt-text-patch);
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
& .van-radio-group {
|
|
47
|
+
& .van-radio {
|
|
48
|
+
& .van-radio__icon {
|
|
49
|
+
font-size: 16px;
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
& .bxt_common_form_radio.disabled {
|
|
56
|
+
& .bxt_common_form_radio_item {
|
|
57
|
+
padding-right: 0;
|
|
58
|
+
padding-left: 0;
|
|
59
|
+
color: var(--bxt-text-assist);
|
|
60
|
+
border-color: transparent;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
& .bxt_common_form_radio_item.active {
|
|
64
|
+
border-color: transparent;
|
|
65
|
+
color: var(--bxt-text-assist);
|
|
66
|
+
background: 0;
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
.bxt_common_field_radio.bxt_border {
|
|
72
|
+
& .bxt_common_form_radio {
|
|
73
|
+
margin-bottom: 0;
|
|
74
|
+
}
|
|
75
|
+
}
|
|
@@ -33,6 +33,8 @@
|
|
|
33
33
|
</template>
|
|
34
34
|
|
|
35
35
|
<script>
|
|
36
|
+
import './common-radio.less'
|
|
37
|
+
|
|
36
38
|
export default {
|
|
37
39
|
name: 'CommonRadio',
|
|
38
40
|
props: {
|
|
@@ -53,123 +55,43 @@ export default {
|
|
|
53
55
|
computed: {
|
|
54
56
|
cValue: {
|
|
55
57
|
get() {
|
|
56
|
-
return this.value
|
|
58
|
+
return this.value
|
|
57
59
|
},
|
|
58
60
|
set(v) {
|
|
59
|
-
this.$emit('input', v)
|
|
61
|
+
this.$emit('input', v)
|
|
60
62
|
}
|
|
61
63
|
},
|
|
62
64
|
convertOptions() {
|
|
63
|
-
const { $attrs, options, value } = this
|
|
65
|
+
const { $attrs, options, value } = this
|
|
64
66
|
return (options || [])
|
|
65
67
|
.map(o => ({
|
|
66
68
|
value: [o.value, o.val].find(v => v !== undefined),
|
|
67
69
|
name: o.name || o.desc
|
|
68
70
|
}))
|
|
69
|
-
.filter(o => o.value === value || !$attrs.disabled)
|
|
71
|
+
.filter(o => o.value === value || !$attrs.disabled)
|
|
70
72
|
},
|
|
71
73
|
listeners() {
|
|
72
74
|
// van-field 的 v-model,会将绑定的值自动转换为 string 类型
|
|
73
75
|
// 所以不取 van-field 的 input 事件
|
|
74
|
-
const listeners = {}
|
|
76
|
+
const listeners = {}
|
|
75
77
|
if (this.$listeners) {
|
|
76
78
|
for (const k in this.$listeners) {
|
|
77
79
|
if (k !== 'input') {
|
|
78
|
-
listeners[k] = this.$listeners[k]
|
|
80
|
+
listeners[k] = this.$listeners[k]
|
|
79
81
|
}
|
|
80
82
|
}
|
|
81
83
|
}
|
|
82
|
-
return listeners
|
|
84
|
+
return listeners
|
|
83
85
|
}
|
|
84
86
|
},
|
|
85
87
|
methods: {
|
|
86
88
|
onClickItem(option) {
|
|
87
|
-
const { $attrs } = this
|
|
89
|
+
const { $attrs } = this
|
|
88
90
|
if ($attrs.disabled || option.isDisabled) {
|
|
89
|
-
return
|
|
90
|
-
}
|
|
91
|
-
this.$emit('input', option.value);
|
|
92
|
-
}
|
|
93
|
-
}
|
|
94
|
-
};
|
|
95
|
-
</script>
|
|
96
|
-
|
|
97
|
-
<style lang="css">
|
|
98
|
-
@import 'color.css';
|
|
99
|
-
|
|
100
|
-
.bxt_common_field_radio {
|
|
101
|
-
padding-top: 11px;
|
|
102
|
-
padding-bottom: 11px;
|
|
103
|
-
|
|
104
|
-
& .van-field__control--right {
|
|
105
|
-
& .bxt_common_form_radio.disabled {
|
|
106
|
-
& .bxt_common_form_radio_item {
|
|
107
|
-
padding-right: 0;
|
|
91
|
+
return
|
|
108
92
|
}
|
|
109
|
-
|
|
110
|
-
}
|
|
111
|
-
|
|
112
|
-
& .bxt_common_form_radio {
|
|
113
|
-
margin-right: -8px;
|
|
114
|
-
margin-bottom: -8px;
|
|
115
|
-
font-size: 13px;
|
|
116
|
-
|
|
117
|
-
& .bxt_common_form_radio_item {
|
|
118
|
-
display: inline-block;
|
|
119
|
-
min-width: 60px;
|
|
120
|
-
margin-bottom: 6px;
|
|
121
|
-
margin-right: 8px;
|
|
122
|
-
padding: 6px 9px;
|
|
123
|
-
text-align: center;
|
|
124
|
-
line-height: 13px;
|
|
125
|
-
font-weight: normal;
|
|
126
|
-
color: var(--color-text-patch);
|
|
127
|
-
border: 1px solid var(--color-bg-primary);
|
|
128
|
-
border-radius: 30px;
|
|
129
|
-
background: var(--color-bg-primary);
|
|
130
|
-
box-sizing: border-box;
|
|
131
|
-
}
|
|
132
|
-
|
|
133
|
-
& .bxt_common_form_radio_item.active {
|
|
134
|
-
font-weight: bold;
|
|
135
|
-
font-weight: 500;
|
|
136
|
-
border-color: var(--color-primary);
|
|
137
|
-
color: var(--color-primary);
|
|
138
|
-
background: rgba(2, 92, 234, 0.1);
|
|
139
|
-
}
|
|
140
|
-
|
|
141
|
-
& .bxt_common_form_radio_item.disabled {
|
|
142
|
-
color: var(--color-text-patch);
|
|
143
|
-
}
|
|
144
|
-
|
|
145
|
-
& .van-radio-group {
|
|
146
|
-
& .van-radio {
|
|
147
|
-
& .van-radio__icon {
|
|
148
|
-
font-size: 16px;
|
|
149
|
-
}
|
|
150
|
-
}
|
|
151
|
-
}
|
|
152
|
-
}
|
|
153
|
-
|
|
154
|
-
& .bxt_common_form_radio.disabled {
|
|
155
|
-
& .bxt_common_form_radio_item {
|
|
156
|
-
padding-right: 0;
|
|
157
|
-
padding-left: 0;
|
|
158
|
-
color: var(--color-text-assist);
|
|
159
|
-
border-color: transparent;
|
|
160
|
-
}
|
|
161
|
-
|
|
162
|
-
& .bxt_common_form_radio_item.active {
|
|
163
|
-
border-color: transparent;
|
|
164
|
-
color: var(--color-text-assist);
|
|
165
|
-
background: 0;
|
|
93
|
+
this.$emit('input', option.value)
|
|
166
94
|
}
|
|
167
95
|
}
|
|
168
96
|
}
|
|
169
|
-
|
|
170
|
-
.bxt_common_field_radio.bxt_border {
|
|
171
|
-
& .bxt_common_form_radio {
|
|
172
|
-
margin-bottom: 0;
|
|
173
|
-
}
|
|
174
|
-
}
|
|
175
|
-
</style>
|
|
97
|
+
</script>
|
|
@@ -21,7 +21,8 @@
|
|
|
21
21
|
</template>
|
|
22
22
|
|
|
23
23
|
<script>
|
|
24
|
-
import { Toast } from 'vant'
|
|
24
|
+
import { Toast } from 'vant'
|
|
25
|
+
import './common-select.less'
|
|
25
26
|
|
|
26
27
|
function initPickerConfig() {
|
|
27
28
|
return {
|
|
@@ -29,7 +30,7 @@ function initPickerConfig() {
|
|
|
29
30
|
title: '',
|
|
30
31
|
columns: [],
|
|
31
32
|
element: null
|
|
32
|
-
}
|
|
33
|
+
}
|
|
33
34
|
}
|
|
34
35
|
|
|
35
36
|
export default {
|
|
@@ -54,18 +55,18 @@ export default {
|
|
|
54
55
|
data() {
|
|
55
56
|
return {
|
|
56
57
|
pickerConfig: initPickerConfig()
|
|
57
|
-
}
|
|
58
|
+
}
|
|
58
59
|
},
|
|
59
60
|
computed: {
|
|
60
61
|
convertOptions() {
|
|
61
62
|
return (this.options || []).map(o => ({
|
|
62
63
|
value: [o.value, o.val].find(v => v !== undefined),
|
|
63
64
|
name: o.name || o.desc
|
|
64
|
-
}))
|
|
65
|
+
}))
|
|
65
66
|
},
|
|
66
67
|
valueDesc() {
|
|
67
|
-
const option = this.convertOptions.find(o => o.value === this.value)
|
|
68
|
-
return option ? option.name : ''
|
|
68
|
+
const option = this.convertOptions.find(o => o.value === this.value)
|
|
69
|
+
return option ? option.name : ''
|
|
69
70
|
}
|
|
70
71
|
},
|
|
71
72
|
watch: {
|
|
@@ -74,11 +75,11 @@ export default {
|
|
|
74
75
|
deep: true,
|
|
75
76
|
handler(list) {
|
|
76
77
|
if (this.autoSelectFirstOption && list && list.length) {
|
|
77
|
-
const option = list.find(o => o.value == this.value)
|
|
78
|
-
const _value = list[0].value
|
|
78
|
+
const option = list.find(o => o.value == this.value)
|
|
79
|
+
const _value = list[0].value
|
|
79
80
|
if (!option && _value) {
|
|
80
|
-
this.$emit('input', _value)
|
|
81
|
-
this.$emit('change', _value)
|
|
81
|
+
this.$emit('input', _value)
|
|
82
|
+
this.$emit('change', _value)
|
|
82
83
|
}
|
|
83
84
|
}
|
|
84
85
|
}
|
|
@@ -86,47 +87,29 @@ export default {
|
|
|
86
87
|
},
|
|
87
88
|
methods: {
|
|
88
89
|
openPicker() {
|
|
89
|
-
const { $attrs, value, convertOptions } = this
|
|
90
|
-
const { disabled, disabledMessage, placeholder } = $attrs
|
|
90
|
+
const { $attrs, value, convertOptions } = this
|
|
91
|
+
const { disabled, disabledMessage, placeholder } = $attrs
|
|
91
92
|
if (disabled) {
|
|
92
93
|
if (disabledMessage) {
|
|
93
|
-
Toast(disabledMessage)
|
|
94
|
+
Toast(disabledMessage)
|
|
94
95
|
}
|
|
95
|
-
return
|
|
96
|
+
return
|
|
96
97
|
}
|
|
97
98
|
this.pickerConfig = {
|
|
98
99
|
visible: true,
|
|
99
100
|
title: placeholder,
|
|
100
101
|
defaultIndex: convertOptions.findIndex(o => o.value == value),
|
|
101
102
|
columns: convertOptions
|
|
102
|
-
}
|
|
103
|
+
}
|
|
103
104
|
},
|
|
104
105
|
onConfirmPicker(item) {
|
|
105
|
-
this.$emit('input', item.value)
|
|
106
|
-
this.$emit('change', item.value)
|
|
107
|
-
this.onCancelPicker()
|
|
106
|
+
this.$emit('input', item.value)
|
|
107
|
+
this.$emit('change', item.value)
|
|
108
|
+
this.onCancelPicker()
|
|
108
109
|
},
|
|
109
110
|
onCancelPicker() {
|
|
110
|
-
this.pickerConfig = initPickerConfig()
|
|
111
|
+
this.pickerConfig = initPickerConfig()
|
|
111
112
|
}
|
|
112
113
|
}
|
|
113
|
-
};
|
|
114
|
-
</script>
|
|
115
|
-
|
|
116
|
-
<style lang="css">
|
|
117
|
-
@import 'color.css';
|
|
118
|
-
|
|
119
|
-
.bxt_common_form_select {
|
|
120
|
-
font-size: 13px;
|
|
121
|
-
|
|
122
|
-
& .van-field::after {
|
|
123
|
-
display: block;
|
|
124
|
-
}
|
|
125
|
-
}
|
|
126
|
-
|
|
127
|
-
.bxt_common_form_select.with_note {
|
|
128
|
-
& .van-cell::after {
|
|
129
|
-
display: none;
|
|
130
|
-
}
|
|
131
114
|
}
|
|
132
|
-
</
|
|
115
|
+
</script>
|
|
@@ -0,0 +1,115 @@
|
|
|
1
|
+
.bxt-item-title-wrapper {
|
|
2
|
+
width: 100%;
|
|
3
|
+
}
|
|
4
|
+
|
|
5
|
+
.bxt-item-title {
|
|
6
|
+
position: relative;
|
|
7
|
+
text-align: left;
|
|
8
|
+
|
|
9
|
+
&::before {
|
|
10
|
+
position: absolute;
|
|
11
|
+
left: -15px;
|
|
12
|
+
top: 9px;
|
|
13
|
+
display: block;
|
|
14
|
+
width: 4px;
|
|
15
|
+
height: 15px;
|
|
16
|
+
content: '';
|
|
17
|
+
background: var(--bxt-primary);
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
& .van-checkbox__icon--checked .van-icon {
|
|
21
|
+
background: var(--bxt-primary);
|
|
22
|
+
border-color: var(--bxt-primary);
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
& .bxt-item-title-label {
|
|
26
|
+
display: flex;
|
|
27
|
+
padding: 5px 0;
|
|
28
|
+
line-height: normal;
|
|
29
|
+
font-size: 17px;
|
|
30
|
+
font-weight: bold;
|
|
31
|
+
vertical-align: middle;
|
|
32
|
+
white-space: nowrap;
|
|
33
|
+
|
|
34
|
+
& .bxt-item-title-label-item {
|
|
35
|
+
flex: 0 0 auto;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
& .bxt-title-code {
|
|
39
|
+
margin-right: 5px;
|
|
40
|
+
padding: 0 2px;
|
|
41
|
+
border-radius: 0.25rem;
|
|
42
|
+
color: #ff703e;
|
|
43
|
+
border: 1px solid #ff703e;
|
|
44
|
+
font-size: 12px;
|
|
45
|
+
transform: scale(0.8334);
|
|
46
|
+
transform-origin: left center;
|
|
47
|
+
vertical-align: middle;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
& .bxt-item-title-label-name {
|
|
51
|
+
flex: 1;
|
|
52
|
+
|
|
53
|
+
& span {
|
|
54
|
+
display: inline-block;
|
|
55
|
+
vertical-align: top;
|
|
56
|
+
white-space: normal;
|
|
57
|
+
|
|
58
|
+
&.bxt-title-content--disabled {
|
|
59
|
+
color: var(--bxt-text-assist);
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
&.bxt-title-persion-modify {
|
|
63
|
+
margin-left: 12px;
|
|
64
|
+
color: var(--bxt-primary);
|
|
65
|
+
font-weight: normal;
|
|
66
|
+
font-size: 14px;
|
|
67
|
+
vertical-align: middle;
|
|
68
|
+
|
|
69
|
+
& i.iconfont {
|
|
70
|
+
font-size: 12px;
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
&.bxt-title-huomian-tag {
|
|
75
|
+
margin-left: 5px;
|
|
76
|
+
color: #f90;
|
|
77
|
+
font-size: 14px;
|
|
78
|
+
line-height: normal;
|
|
79
|
+
vertical-align: middle;
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
&.bxt-title-status-tag {
|
|
83
|
+
margin-left: 5px;
|
|
84
|
+
padding: 0 4px;
|
|
85
|
+
color: #fff;
|
|
86
|
+
border: 1px solid rgb(158, 158, 158);
|
|
87
|
+
background-color: rgb(158, 158, 158);
|
|
88
|
+
border-radius: 2px;
|
|
89
|
+
font-size: 12px;
|
|
90
|
+
font-weight: normal;
|
|
91
|
+
line-height: normal;
|
|
92
|
+
vertical-align: middle;
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
.bxt-item-label-note {
|
|
100
|
+
margin-bottom: 20px;
|
|
101
|
+
text-align: left;
|
|
102
|
+
color: #ccc;
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
.bxt-title-huomian-tips {
|
|
106
|
+
padding-bottom: 12px;
|
|
107
|
+
color: var(--bxt-text-minor);
|
|
108
|
+
font-size: 13px;
|
|
109
|
+
text-align: left;
|
|
110
|
+
|
|
111
|
+
& em {
|
|
112
|
+
font-style: normal;
|
|
113
|
+
color: var(--bxt-primary);
|
|
114
|
+
}
|
|
115
|
+
}
|
|
@@ -36,88 +36,88 @@
|
|
|
36
36
|
</div>
|
|
37
37
|
</template>
|
|
38
38
|
<script lang="ts">
|
|
39
|
-
import Vue from 'vue'
|
|
40
|
-
import { Component, Model, Prop, Watch } from 'vue-property-decorator'
|
|
41
|
-
import { convertEleOrderListToObj } from 'packages/bxs-utils/index'
|
|
42
|
-
import './common-title.
|
|
39
|
+
import Vue from 'vue'
|
|
40
|
+
import { Component, Model, Prop, Watch } from 'vue-property-decorator'
|
|
41
|
+
import { convertEleOrderListToObj } from 'packages/bxs-utils/index'
|
|
42
|
+
import './common-title.less'
|
|
43
43
|
|
|
44
44
|
@Component({
|
|
45
45
|
name: 'BxtTitleItem'
|
|
46
46
|
})
|
|
47
47
|
export default class BxtTitleItem extends Vue {
|
|
48
|
-
currentValue: boolean = false
|
|
48
|
+
currentValue: boolean = false
|
|
49
49
|
@Model('input', {})
|
|
50
|
-
value!: boolean
|
|
50
|
+
value!: boolean
|
|
51
51
|
|
|
52
52
|
@Prop({
|
|
53
53
|
default: () => ({})
|
|
54
54
|
})
|
|
55
|
-
personData!: any
|
|
55
|
+
personData!: any
|
|
56
56
|
|
|
57
57
|
@Prop({
|
|
58
58
|
default: false
|
|
59
59
|
})
|
|
60
|
-
isShowCrmPerson!: boolean
|
|
60
|
+
isShowCrmPerson!: boolean
|
|
61
61
|
|
|
62
62
|
@Prop({
|
|
63
63
|
default: ''
|
|
64
64
|
})
|
|
65
|
-
label!: string
|
|
65
|
+
label!: string
|
|
66
66
|
|
|
67
67
|
@Prop({
|
|
68
68
|
default: ''
|
|
69
69
|
})
|
|
70
|
-
code!: string
|
|
70
|
+
code!: string
|
|
71
71
|
|
|
72
72
|
@Prop({
|
|
73
73
|
default: ''
|
|
74
74
|
})
|
|
75
|
-
huomianTag!: string
|
|
75
|
+
huomianTag!: string
|
|
76
76
|
|
|
77
77
|
@Prop({
|
|
78
78
|
default: ''
|
|
79
79
|
})
|
|
80
|
-
statusTag!: string
|
|
80
|
+
statusTag!: string
|
|
81
81
|
|
|
82
82
|
@Prop({
|
|
83
83
|
default: ''
|
|
84
84
|
})
|
|
85
|
-
huomianTips!: string
|
|
85
|
+
huomianTips!: string
|
|
86
86
|
|
|
87
87
|
@Prop({
|
|
88
88
|
default: null
|
|
89
89
|
})
|
|
90
|
-
disabled!: boolean
|
|
90
|
+
disabled!: boolean
|
|
91
91
|
|
|
92
92
|
@Prop({
|
|
93
93
|
default: ''
|
|
94
94
|
})
|
|
95
|
-
dataStatId!: string
|
|
95
|
+
dataStatId!: string
|
|
96
96
|
|
|
97
97
|
@Watch('value', {
|
|
98
98
|
immediate: true,
|
|
99
99
|
deep: true
|
|
100
100
|
})
|
|
101
101
|
watchValue(val: boolean) {
|
|
102
|
-
this.currentValue = val
|
|
102
|
+
this.currentValue = val
|
|
103
103
|
}
|
|
104
104
|
|
|
105
105
|
get isShowCrmModifyButton() {
|
|
106
|
-
const { value, personData, isShowCrmPerson } = this
|
|
107
|
-
const personInfo = convertEleOrderListToObj(personData)
|
|
108
|
-
return isShowCrmPerson && value && (personData.key === 'insuredInfo' || !personInfo.applicantAndInsuredSame)
|
|
106
|
+
const { value, personData, isShowCrmPerson } = this
|
|
107
|
+
const personInfo = convertEleOrderListToObj(personData)
|
|
108
|
+
return isShowCrmPerson && value && (personData.key === 'insuredInfo' || !personInfo.applicantAndInsuredSame)
|
|
109
109
|
}
|
|
110
110
|
|
|
111
111
|
created() {
|
|
112
|
-
this.currentValue = this.value
|
|
112
|
+
this.currentValue = this.value
|
|
113
113
|
}
|
|
114
114
|
onchange() {
|
|
115
115
|
if (this.disabled) {
|
|
116
|
-
return
|
|
116
|
+
return
|
|
117
117
|
}
|
|
118
|
-
this.currentValue = !this.currentValue
|
|
119
|
-
this.$emit('input', this.currentValue)
|
|
120
|
-
this.$emit('change', this.currentValue)
|
|
118
|
+
this.currentValue = !this.currentValue
|
|
119
|
+
this.$emit('input', this.currentValue)
|
|
120
|
+
this.$emit('change', this.currentValue)
|
|
121
121
|
}
|
|
122
122
|
}
|
|
123
123
|
</script>
|