bxs-tools-ui 2.0.7 → 3.0.0-1

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.
Files changed (89) hide show
  1. package/README.md +9 -8
  2. package/es/add-and-take/index.css +1 -0
  3. package/es/add-and-take/index.js +2877 -0
  4. package/es/adjust-baoe/index.css +1 -0
  5. package/es/adjust-baoe/index.js +1717 -0
  6. package/es/business-card/index.css +1 -0
  7. package/es/business-card/index.js +616 -0
  8. package/es/canvas-poster/index.css +1 -0
  9. package/es/canvas-poster/index.js +698 -0
  10. package/es/index.css +1 -0
  11. package/es/index.js +39458 -0
  12. package/es/insure-calculate/index.css +1 -0
  13. package/es/insure-calculate/index.js +31180 -0
  14. package/es/person-info/index.css +1 -0
  15. package/es/person-info/index.js +4240 -0
  16. package/es/product-info/index.css +1 -0
  17. package/es/product-info/index.js +4570 -0
  18. package/es/utils/index.js +3160 -0
  19. package/lib/add-and-take/index.css +1 -702
  20. package/lib/add-and-take/index.js +2641 -25431
  21. package/lib/adjust-baoe/index.css +1 -281
  22. package/lib/adjust-baoe/index.js +1534 -27044
  23. package/lib/business-card/index.css +1 -179
  24. package/lib/business-card/index.js +515 -1361
  25. package/lib/canvas-poster/index.css +1 -84
  26. package/lib/canvas-poster/index.js +594 -1414
  27. package/lib/index.css +1 -2538
  28. package/lib/index.js +36329 -40571
  29. package/lib/insure-calculate/index.css +1 -510
  30. package/lib/insure-calculate/index.js +28980 -25191
  31. package/lib/person-info/index.css +1 -562
  32. package/lib/person-info/index.js +3881 -27346
  33. package/lib/product-info/index.css +1 -510
  34. package/lib/product-info/index.js +4235 -34572
  35. package/lib/utils/index.js +3199 -0
  36. package/package.json +47 -18
  37. package/packages/add-and-take/components/interest-form.css +4 -3
  38. package/packages/add-and-take/components/interest-form.vue +11 -36
  39. package/packages/add-and-take/components/interest-items.css +1 -1
  40. package/packages/add-and-take/components/interest-table.css +46 -93
  41. package/packages/add-and-take/components/interest-table.vue +37 -196
  42. package/packages/add-and-take/demo/index.vue +86 -96
  43. package/packages/add-and-take/handler.ts +9 -8
  44. package/packages/add-and-take/index.css +3 -2
  45. package/packages/add-and-take/index.vue +7 -28
  46. package/packages/add-and-take/readme.md +17 -33
  47. package/packages/adjust-baoe/demo/index.vue +63 -66
  48. package/packages/adjust-baoe/index.css +21 -29
  49. package/packages/adjust-baoe/index.vue +41 -54
  50. package/packages/adjust-baoe/readme.md +52 -87
  51. package/packages/business-card/demo/index.vue +2 -11
  52. package/packages/business-card/index.css +1 -0
  53. package/packages/business-card/readme.md +36 -16
  54. package/packages/bxs-utils/index.ts +7 -0
  55. package/packages/bxs-utils/planbook/insurance.ts +5 -5
  56. package/packages/bxs-utils/planbook/product.ts +2 -1
  57. package/packages/canvas-poster/readme.md +86 -66
  58. package/packages/index.ts +52 -0
  59. package/packages/insure-calculate/demo/index.vue +22 -8
  60. package/packages/insure-calculate/index.css +8 -6
  61. package/packages/insure-calculate/index.vue +189 -146
  62. package/packages/insure-calculate/readme.md +1 -1
  63. package/packages/person-info/{crm-person.vue → crm-popup.vue} +117 -108
  64. package/packages/person-info/demo/index.vue +2 -1
  65. package/packages/person-info/index.vue +117 -130
  66. package/packages/person-info/readme.md +5 -8
  67. package/packages/planbook-input/components/product-table.css +2 -0
  68. package/packages/planbook-input/components/product-table.vue +38 -16
  69. package/packages/planbook-input/index.css +4 -1
  70. package/packages/planbook-input/index.vue +12 -9
  71. package/packages/product-info/demo/index.vue +4 -2
  72. package/packages/product-info/index.css +131 -116
  73. package/packages/product-info/index.vue +130 -145
  74. package/packages/product-info/readme.md +1 -2
  75. package/src/components/common/common-age-birthday.vue +205 -0
  76. package/{packages/components/common-popup/index.vue → src/components/common/common-popup.vue} +40 -25
  77. package/src/components/common/common-radio.vue +175 -0
  78. package/src/components/common/common-select.vue +132 -0
  79. package/{packages/components/form-item/title-item.css → src/components/common/common-title.css} +13 -5
  80. package/{packages/components/form-item/title-item.vue → src/components/common/common-title.vue} +6 -21
  81. package/src/js/request.js +3 -3
  82. package/src/style/apply.css +25 -0
  83. package/src/style/base.css +0 -28
  84. package/packages/components/common-radio.vue +0 -142
  85. package/packages/components/form-item/age-birthday-item.vue +0 -183
  86. package/packages/components/form-item/select-item.vue +0 -110
  87. package/packages/person-info/crm-person.css +0 -57
  88. package/packages/person-info/index.css +0 -51
  89. package/src/index.ts +0 -48
package/package.json CHANGED
@@ -1,28 +1,33 @@
1
1
  {
2
2
  "name": "bxs-tools-ui",
3
- "version": "2.0.7",
3
+ "version": "3.0.0-1",
4
4
  "description": "微易前端业务组件",
5
5
  "main": "lib/index.js",
6
+ "module": "es/index.js",
6
7
  "files": [
8
+ "es",
7
9
  "lib",
8
10
  "packages",
9
11
  "src"
10
12
  ],
11
13
  "scripts": {
12
- "create": "node build/node.copy.demo.js",
13
- "init": "node build/node.docs.config.js && node build/node.src.index.js",
14
- "dev": "webpack-dev-server --progress --config build/webpack.dev.js",
15
- "build:prod": "webpack -p --progress --config build/webpack.prod.js",
16
- "docs": "webpack -p --progress --config build/webpack.docs.js",
17
- "build:component": "webpack -p --progress --config build/webpack.component.js",
18
- "build": "npm run init && npm run docs && npm run build:prod && npm run build:component",
14
+ "init:webpack": "node build/node.docs.config.js && node build/node.src.index.js",
15
+ "dev:webpack": "webpack-dev-server --progress --config build/webpack.dev.js",
16
+ "build:webpack:prod": "webpack -p --progress --config build/webpack.prod.js",
17
+ "docs:webpack": "webpack -p --progress --config build/webpack.docs.js",
18
+ "build:webpack:component": "webpack -p --progress --config build/webpack.component.js",
19
+ "build:webpack": "npm run init:webpack && npm run docs:webpack && npm run build:webpack:prod && npm run build:webpack:component",
20
+ "init": "sh rollup/auto.create.entry.file",
21
+ "dev": "npm run init && rollup -c rollup/rollup.dev.js -w",
22
+ "build": "npm run init && rollup -c rollup/rollup.prod.js",
19
23
  "test": "echo \"Error: no test specified\" && exit 1",
20
24
  "eslint:fix": "eslint --fix '{src,packages,docs}/**/*.{js,vue,ts}'",
21
25
  "precommit": "lint-staged",
22
26
  "prettier": "prettier --write '{src,packages}/**/*.{js,vue}'",
23
- "jsdoc2md": "node build/jsdoc2md.js",
24
27
  "ts": "tsc --noEmit -w",
25
- "release": "bash build/release.sh"
28
+ "create": "node build/node.copy.demo.js",
29
+ "jsdoc2md": "node build/jsdoc2md.js",
30
+ "changelog": "standard-version"
26
31
  },
27
32
  "lint-staged": {
28
33
  "{src,packages}/**/*.{js,vue}": [
@@ -45,25 +50,38 @@
45
50
  "devDependencies": {
46
51
  "@babel/core": "^7.16.0",
47
52
  "@babel/plugin-proposal-class-properties": "^7.10.4",
53
+ "@babel/plugin-proposal-decorators": "^7.28.0",
48
54
  "@babel/plugin-proposal-object-rest-spread": "^7.20.7",
49
- "@babel/plugin-transform-runtime": "^7.12.1",
55
+ "@babel/plugin-proposal-optional-chaining": "^7.21.0",
56
+ "@babel/plugin-transform-optional-chaining": "^7.27.1",
57
+ "@babel/plugin-transform-runtime": "^7.28.0",
50
58
  "@babel/preset-env": "^7.16.0",
51
59
  "@babel/preset-typescript": "^7.10.4",
52
60
  "@commitlint/cli": "^19.3.0",
53
61
  "@commitlint/config-conventional": "^19.2.2",
54
62
  "@commitlint/parse": "^19.0.3",
63
+ "@rollup/plugin-alias": "^5.1.1",
64
+ "@rollup/plugin-babel": "^6.0.4",
65
+ "@rollup/plugin-commonjs": "^28.0.6",
66
+ "@rollup/plugin-eslint": "^9.0.5",
67
+ "@rollup/plugin-html": "^1.1.0",
68
+ "@rollup/plugin-json": "^6.1.0",
69
+ "@rollup/plugin-node-resolve": "^16.0.1",
70
+ "@rollup/plugin-replace": "^6.0.2",
71
+ "@rollup/plugin-typescript": "^12.1.4",
55
72
  "@types/vue": "^2.0.0",
56
73
  "@typescript-eslint/eslint-plugin": "^2.34.0",
57
74
  "@typescript-eslint/parser": "^2.34.0",
58
75
  "@vant/doc": "^2.3.6",
59
76
  "@vant/touch-emulator": "^1.0.0",
77
+ "@vue/compiler-sfc": "^3.5.17",
60
78
  "@vue/eslint-config-typescript": "^5.0.1",
61
79
  "autoprefixer": "^9.6.1",
62
80
  "babel-loader": "^8.0.6",
63
81
  "babel-plugin-component": "^1.1.1",
64
82
  "babel-plugin-transform-runtime": "^6.23.0",
65
83
  "babel-preset-env": "^1.7.0",
66
- "bxs-ui-vue": "^3.5.9",
84
+ "buble": "^0.20.0",
67
85
  "crypto": "^1.0.1",
68
86
  "crypto-js": "^3.1.9-1",
69
87
  "css-loader": "^3.1.0",
@@ -89,6 +107,15 @@
89
107
  "prettier": "^1.18.2",
90
108
  "pretty-error": "^2.1.1",
91
109
  "progress-bar-webpack-plugin": "^1.12.1",
110
+ "rollup": "^4.45.0",
111
+ "rollup-plugin-copy": "^3.5.0",
112
+ "rollup-plugin-livereload": "^2.0.5",
113
+ "rollup-plugin-md": "^1.0.1",
114
+ "rollup-plugin-postcss": "^4.0.2",
115
+ "rollup-plugin-serve": "^3.0.0",
116
+ "rollup-plugin-typescript2": "^0.36.0",
117
+ "rollup-plugin-vue": "^5.1.9",
118
+ "selfsigned": "^2.4.1",
92
119
  "standard-version": "^9.5.0",
93
120
  "style-loader": "^0.23.1",
94
121
  "stylelint": "^10.1.0",
@@ -102,24 +129,26 @@
102
129
  "tslint-loader": "^3.5.4",
103
130
  "typescript": "^4.5.0",
104
131
  "vconsole": "^3.15.0",
105
- "vue": "^2.6.12",
106
132
  "vue-json-tree": "^0.4.3",
107
133
  "vue-loader": "^15.7.1",
108
134
  "vue-md-loader": "^1.1.10",
109
135
  "vue-router": "^3.0.7",
110
- "vue-template-compiler": "^2.6.12",
136
+ "vue-template-compiler": "2.6.14",
111
137
  "webpack": "^4.38.0",
112
138
  "webpack-bundle-analyzer": "^4.1.0",
113
139
  "webpack-cli": "^3.3.11",
114
- "webpack-dev-server": "^3.11.2"
140
+ "webpack-dev-server": "^3.11.2",
141
+ "vue-class-component": "^7.2.1",
142
+ "vue-property-decorator": "^8.3.0"
115
143
  },
116
144
  "dependencies": {
145
+ "@babel/runtime": "^7.27.6",
117
146
  "axios": "^0.20.0",
118
- "lodash": "^4.17.21",
119
- "vue-class-component": "^7.2.1",
120
- "vue-property-decorator": "^8.3.0"
147
+ "bxs-ui-vue": "^4.2.1",
148
+ "lodash": "^4.17.21"
121
149
  },
122
150
  "peerDependencies": {
151
+ "vue": "2.6.14",
123
152
  "vant": "^2.13.2"
124
153
  },
125
154
  "browserslist": [
@@ -7,6 +7,7 @@
7
7
 
8
8
  & .bxt_aatif_adjust {
9
9
  padding: 0 16px;
10
+ box-sizing: border-box;
10
11
 
11
12
  & table {
12
13
  width: 100%;
@@ -18,7 +19,7 @@
18
19
 
19
20
  & tr {
20
21
  & td {
21
- min-width: 40px;
22
+ min-width: 32px;
22
23
  padding: 6px;
23
24
  border-bottom: 1px solid white;
24
25
  border-left: 1px solid white;
@@ -29,7 +30,7 @@
29
30
 
30
31
  & td:nth-child(1),
31
32
  & td:nth-child(2) {
32
- width: 40px;
33
+ width: 32px;
33
34
  }
34
35
 
35
36
  & td:nth-child(3),
@@ -39,7 +40,7 @@
39
40
  }
40
41
 
41
42
  & td:last-child {
42
- width: 40px;
43
+ width: 32px;
43
44
  border-right: 1px solid white;
44
45
  }
45
46
  }
@@ -4,11 +4,7 @@
4
4
  <table>
5
5
  <tr v-for="item in adjustData" :key="JSON.stringify(item)">
6
6
  <template v-for="key in ['index', 'typeName', 'age', 'baof', 'purpose', 'operate']">
7
- <td
8
- v-if="key === 'operate' && item[key] === 'delete'"
9
- :key="JSON.stringify(item) + key"
10
- @click="deleteAdjustData(item)"
11
- >
7
+ <td v-if="key === 'operate' && item[key] === 'delete'" :key="JSON.stringify(item) + key" @click="deleteAdjustData(item)">
12
8
  <van-icon name="delete-o" :size="16" />
13
9
  </td>
14
10
  <td v-else :key="JSON.stringify(item) + key">
@@ -63,16 +59,12 @@
63
59
  </div>
64
60
 
65
61
  <div v-if="['take'].includes(formValues.type)" class="bxt_aatif_form_item purpose">
66
- <van-field label="用途" autocomplete="off">
67
- <template #extra>
68
- <CommonRadio v-model="formValues.purpose" name="purpose" :options="PURPOSE_OPTIONS" />
69
- </template>
70
- </van-field>
71
-
62
+ <CommonRadio v-model="formValues.purpose" name="purpose" label="用途" :options="PURPOSE_OPTIONS" border input-align="right" />
72
63
  <van-field
73
64
  v-if="formValues.purpose === ''"
74
65
  v-model="formValues.customPurpose"
75
66
  class="bxt_custom_purpose"
67
+ name="customPurpose"
76
68
  label=" "
77
69
  placeholder="请输入,5个字以内"
78
70
  :maxlength="5"
@@ -120,10 +112,11 @@
120
112
 
121
113
  <script>
122
114
  import { get as _get, cloneDeep } from 'lodash';
123
- import { Icon, Toast } from 'vant';
115
+ import { Toast, Icon } from 'vant';
124
116
  import { formatNumberToThousand } from 'packages/bxs-utils/planbook/index';
125
117
  import { PURPOSE_OPTIONS } from '../constant';
126
- import CommonRadio from 'packages/components/common-radio.vue';
118
+ import CommonRadio from '@src/components/common/common-radio.vue';
119
+ import './interest-form.css';
127
120
 
128
121
  function initPickerConfig() {
129
122
  return {
@@ -142,8 +135,8 @@ export default {
142
135
  }
143
136
  },
144
137
  components: {
145
- CommonRadio,
146
- VanIcon: Icon
138
+ [Icon.name]: Icon,
139
+ CommonRadio
147
140
  },
148
141
  props: {
149
142
  type: String,
@@ -355,11 +348,7 @@ export default {
355
348
  const maxAvailableAmount1 = remainderNum / willTakeCoefficient;
356
349
  // 最大可领取金额2:当前领取期间内的最大可领取值 - 当前年度已领取的金额
357
350
  const maxAvailableAmount2 = drawMaxValue ? drawMaxValue - currentYearHadReduceAmount : Infinity;
358
- maxAvailableAmount = Math.min.apply(null, [
359
- maxAvailableAmount === null ? Infinity : maxAvailableAmount,
360
- maxAvailableAmount1,
361
- maxAvailableAmount2
362
- ]);
351
+ maxAvailableAmount = Math.min.apply(null, [maxAvailableAmount === null ? Infinity : maxAvailableAmount, maxAvailableAmount1, maxAvailableAmount2]);
363
352
  }
364
353
  }
365
354
  return maxAvailableAmount === null ? null : Math.max(0, Math.floor(Number(maxAvailableAmount.toFixed(6))));
@@ -423,11 +412,7 @@ export default {
423
412
  });
424
413
  maxAvailableAmount2 = takeMaxValues[beginYear - 1] - beginYearAdjustbaof;
425
414
  }
426
- maxAvailableAmount = Math.min.apply(null, [
427
- maxAvailableAmount === null ? Infinity : maxAvailableAmount,
428
- maxAvailableAmount1,
429
- maxAvailableAmount2
430
- ]);
415
+ maxAvailableAmount = Math.min.apply(null, [maxAvailableAmount === null ? Infinity : maxAvailableAmount, maxAvailableAmount1, maxAvailableAmount2]);
431
416
  }
432
417
  }
433
418
  return maxAvailableAmount === null ? null : Math.max(0, Math.floor(Number(maxAvailableAmount.toFixed(6))));
@@ -482,15 +467,7 @@ export default {
482
467
  }
483
468
  },
484
469
  getBeginYearOptions() {
485
- const {
486
- type,
487
- addAndTakeRecordData,
488
- minTakeYear,
489
- insuredAge,
490
- interestInitData,
491
- addAndTakeDetailData,
492
- formValues
493
- } = this;
470
+ const { type, addAndTakeRecordData, minTakeYear, insuredAge, interestInitData, addAndTakeDetailData, formValues } = this;
494
471
  const options = [];
495
472
  if (interestInitData && addAndTakeDetailData) {
496
473
  const { startPolicyNo, startIndex } = interestInitData;
@@ -591,8 +568,6 @@ export default {
591
568
  </script>
592
569
 
593
570
  <style>
594
- @import './interest-form.css';
595
-
596
571
  .aat_interest_form .aatif_add_button .add-disabled {
597
572
  border: 0.0625rem solid transparent;
598
573
  background: rgba(2, 92, 234, 0.3);
@@ -30,7 +30,7 @@
30
30
  & > span {
31
31
  display: inline-block;
32
32
  width: 42%;
33
- margin: 0 9px 12px 0;
33
+ margin: 0 9px 9px 0;
34
34
  padding: 3px 6px;
35
35
  text-align: center;
36
36
  border-radius: 50px;
@@ -1,115 +1,68 @@
1
1
  @import 'color.css';
2
2
 
3
3
  .bxt_aat_interest_table {
4
- & .bxt_aatit_content {
4
+ & table {
5
5
  width: 100%;
6
- font-size: 0;
6
+ table-layout: fixed;
7
+ border-collapse: collapse;
8
+ border-spacing: 0;
9
+ font-size: 12px;
7
10
  color: var(--color-text-primary);
8
- white-space: nowrap;
11
+ text-align: left;
9
12
 
10
- & .bxt_aatit_content_left,
11
- & .bxt_aatit_content_right {
12
- display: inline-block;
13
- width: 18%;
14
- font-size: 12px;
15
- vertical-align: top;
16
- text-align: left;
13
+ & tr {
14
+ & td {
15
+ padding: 6px;
16
+ border: 1px solid var(--color-line-split);
17
17
 
18
- & .bxt_aatit_content_record {
19
- display: flex;
20
- height: 32px;
21
- line-height: 32px;
22
- white-space: nowrap;
23
-
24
- & .bxt_aatit_content_cell {
18
+ & .bxt_aatit_purpose {
25
19
  display: inline-block;
26
- flex: 1;
27
- padding: 0 6px;
28
- overflow: hidden;
20
+ margin-left: 2px;
21
+ padding: 2px 2px;
22
+ line-height: 100%;
23
+ color: var(--color-primary);
24
+ border-radius: 2px;
25
+ background: rgba(10, 100, 254, 0.1);
26
+ transform: scale(0.8333);
27
+ transform-origin: left center;
29
28
  white-space: nowrap;
30
- box-sizing: border-box;
31
- border-right: 1px solid var(--color-line-split);
32
- border-bottom: 1px solid var(--color-line-split);
33
29
  }
34
30
  }
35
31
 
36
- & .bxt_aatit_content_record:first-child {
37
- line-height: 14px;
38
- height: auto;
39
- min-height: 32px;
40
-
41
- & .bxt_aatit_content_cell {
42
- display: flex;
43
- align-items: center;
44
- justify-content: center;
45
- height: auto;
46
- padding: 6px;
47
- white-space: normal;
48
- background: #f2f3f5;
49
- border-color: white;
50
-
51
- & span {
52
- text-align: center;
53
- }
54
- }
32
+ & td:nth-child(1),
33
+ & td:nth-child(2) {
34
+ width: 1.8em;
35
+ color: var(--color-text-patch);
36
+ text-align: center;
55
37
  }
56
- }
57
38
 
58
- & .bxt_aatit_content_left {
59
- overflow: hidden;
39
+ & td:nth-child(3),
40
+ & td:nth-child(4) {
41
+ width: 5.5em;
42
+ }
60
43
 
61
- & .bxt_aatit_content_record {
62
- & .bxt_aatit_content_cell {
63
- width: 50%;
64
- text-align: center;
65
- color: var(--color-text-patch);
66
- }
44
+ & td.edit {
45
+ color: var(--color-primary);
46
+ text-decoration: underline;
47
+ }
67
48
 
68
- & .bxt_aatit_content_cell:first-child {
69
- border-left: 1px solid var(--color-line-split);
70
- }
49
+ & td.disabled {
50
+ color: var(--color-text-disabled);
51
+ text-decoration: none;
71
52
  }
72
53
  }
73
54
 
74
- & .bxt_aatit_content_right {
75
- width: 82%;
76
- min-height: 0;
77
- overflow: hidden;
78
-
79
- & .bxt_aatit_content_record {
80
- & .bxt_aatit_content_cell {
81
- font-weight: bold;
82
- font-weight: 500;
83
- }
84
-
85
- & .bxt_aatit_content_cell.disabled {
86
- color: var(--color-text-patch);
87
- }
88
-
89
- & .bxt_aatit_content_cell.zero {
90
- & span:nth-child(1) {
91
- color: var(--color-text-patch);
92
- }
93
- }
94
-
95
- & .bxt_aatit_content_cell.purpose {
96
- & span {
97
- vertical-align: middle;
98
- }
99
-
100
- & span:nth-child(2) {
101
- display: inline-block;
102
- margin-left: 2px;
103
- padding: 2px 2px;
104
- font-size: 12px;
105
- line-height: 100%;
106
- color: var(--color-primary);
107
- border-radius: 2px;
108
- background: rgba(10, 100, 254, 0.1);
109
- transform: scale(0.8333);
110
- transform-origin: left center;
111
- }
112
- }
55
+ & tr:first-child {
56
+ position: sticky;
57
+ top: 0;
58
+ z-index: 1;
59
+ will-change: scroll-position;
60
+
61
+ & td {
62
+ font-weight: bold;
63
+ text-align: center;
64
+ background-color: #f2f3f5;
65
+ border: 0;
113
66
  }
114
67
  }
115
68
  }