@bytenew/bn-applet-ui 1.1.56 → 1.1.59

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.
@@ -136,7 +136,7 @@ ___CSS_LOADER_EXPORT___.push([module.id, `.bn-fi-tax-auto-complete-pop-container
136
136
 
137
137
  /***/ },
138
138
 
139
- /***/ 9959
139
+ /***/ 6176
140
140
  (module, __webpack_exports__, __webpack_require__) {
141
141
 
142
142
  "use strict";
@@ -498,7 +498,7 @@ ___CSS_LOADER_EXPORT___.push([module.id, `.BnEmptyTip[data-v-24b4124f]{position:
498
498
 
499
499
  /***/ },
500
500
 
501
- /***/ 6408
501
+ /***/ 3241
502
502
  (module, __webpack_exports__, __webpack_require__) {
503
503
 
504
504
  "use strict";
@@ -512,7 +512,7 @@ __webpack_require__.r(__webpack_exports__);
512
512
 
513
513
  var ___CSS_LOADER_EXPORT___ = _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1___default()((_node_modules_css_loader_dist_runtime_noSourceMaps_js__WEBPACK_IMPORTED_MODULE_0___default()));
514
514
  // Module
515
- ___CSS_LOADER_EXPORT___.push([module.id, `.minWidth[data-v-27b6fb78]{min-width:92px}.bnFileView[data-v-27b6fb78]{width:100%;vertical-align:middle}.bnFileView-showDetail[data-v-27b6fb78]{width:100%;padding:5px 12px}.bnFileView-body[data-v-27b6fb78]{display:flex;flex-wrap:wrap;width:100%}.bnFileView-item[data-v-27b6fb78]{display:flex;position:relative;vertical-align:middle;border-radius:2px;font-size:0;text-align:center;border:1px solid #ebeef5;margin:2px 4px 2px 0;align-items:center;overflow:hidden}.bnFileView-item-img[data-v-27b6fb78]{display:inherit;position:relative;cursor:pointer}`, ""]);
515
+ ___CSS_LOADER_EXPORT___.push([module.id, `.minWidth[data-v-b9418100]{min-width:92px}.bnFileView[data-v-b9418100]{width:100%;vertical-align:middle}.bnFileView-showDetail[data-v-b9418100]{width:100%;padding:5px 12px}.bnFileView-body[data-v-b9418100]{display:flex;flex-wrap:wrap;width:100%}.bnFileView-item[data-v-b9418100]{display:flex;position:relative;vertical-align:middle;border-radius:2px;font-size:0;text-align:center;border:1px solid #ebeef5;margin:2px 4px 2px 0;align-items:center;overflow:hidden}.bnFileView-item-img[data-v-b9418100]{display:inherit;position:relative;cursor:pointer}`, ""]);
516
516
  // Exports
517
517
  /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (___CSS_LOADER_EXPORT___);
518
518
 
@@ -1235,19 +1235,19 @@ var update = add("c4229194", content, true, {"sourceMap":false,"shadowMode":fals
1235
1235
 
1236
1236
  /***/ },
1237
1237
 
1238
- /***/ 8002
1238
+ /***/ 5357
1239
1239
  (module, __unused_webpack_exports, __webpack_require__) {
1240
1240
 
1241
1241
  // style-loader: Adds some css to the DOM by adding a <style> tag
1242
1242
 
1243
1243
  // load the styles
1244
- var content = __webpack_require__(9959);
1244
+ var content = __webpack_require__(6176);
1245
1245
  if(content.__esModule) content = content.default;
1246
1246
  if(typeof content === 'string') content = [[module.id, content, '']];
1247
1247
  if(content.locals) module.exports = content.locals;
1248
1248
  // add the styles to the DOM
1249
1249
  var add = (__webpack_require__(9548)/* ["default"] */ .A)
1250
- var update = add("6aa55bfc", content, true, {"sourceMap":false,"shadowMode":false});
1250
+ var update = add("17dbc06a", content, true, {"sourceMap":false,"shadowMode":false});
1251
1251
 
1252
1252
  /***/ },
1253
1253
 
@@ -1459,19 +1459,19 @@ var update = add("28c22795", content, true, {"sourceMap":false,"shadowMode":fals
1459
1459
 
1460
1460
  /***/ },
1461
1461
 
1462
- /***/ 9732
1462
+ /***/ 2045
1463
1463
  (module, __unused_webpack_exports, __webpack_require__) {
1464
1464
 
1465
1465
  // style-loader: Adds some css to the DOM by adding a <style> tag
1466
1466
 
1467
1467
  // load the styles
1468
- var content = __webpack_require__(6408);
1468
+ var content = __webpack_require__(3241);
1469
1469
  if(content.__esModule) content = content.default;
1470
1470
  if(typeof content === 'string') content = [[module.id, content, '']];
1471
1471
  if(content.locals) module.exports = content.locals;
1472
1472
  // add the styles to the DOM
1473
1473
  var add = (__webpack_require__(9548)/* ["default"] */ .A)
1474
- var update = add("780b4f9c", content, true, {"sourceMap":false,"shadowMode":false});
1474
+ var update = add("22a40dee", content, true, {"sourceMap":false,"shadowMode":false});
1475
1475
 
1476
1476
  /***/ },
1477
1477
 
@@ -18416,8 +18416,8 @@ var BnEmptyTip_component = normalizeComponent(
18416
18416
  )
18417
18417
 
18418
18418
  /* harmony default export */ const BnEmptyTip = (BnEmptyTip_component.exports);
18419
- ;// ./node_modules/babel-loader/lib/index.js??clonedRuleSet-82.use[1]!./node_modules/babel-loader/lib/index.js!./node_modules/@vue/vue-loader-v15/lib/loaders/templateLoader.js??ruleSet[1].rules[3]!./node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./packages/BnFileView/BnFileView.vue?vue&type=template&id=27b6fb78&scoped=true
18420
- var BnFileViewvue_type_template_id_27b6fb78_scoped_true_render = function render() {
18419
+ ;// ./node_modules/babel-loader/lib/index.js??clonedRuleSet-82.use[1]!./node_modules/babel-loader/lib/index.js!./node_modules/@vue/vue-loader-v15/lib/loaders/templateLoader.js??ruleSet[1].rules[3]!./node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./packages/BnFileView/BnFileView.vue?vue&type=template&id=b9418100&scoped=true
18420
+ var BnFileViewvue_type_template_id_b9418100_scoped_true_render = function render() {
18421
18421
  var _vm = this,
18422
18422
  _c = _vm._self._c;
18423
18423
  return _c('div', {
@@ -18515,7 +18515,7 @@ var BnFileViewvue_type_template_id_27b6fb78_scoped_true_render = function render
18515
18515
  }) : _vm._e()], 1);
18516
18516
  }), 0)])], 1);
18517
18517
  };
18518
- var BnFileViewvue_type_template_id_27b6fb78_scoped_true_staticRenderFns = [];
18518
+ var BnFileViewvue_type_template_id_b9418100_scoped_true_staticRenderFns = [];
18519
18519
 
18520
18520
  // EXTERNAL MODULE: ./node_modules/core-js/modules/es.error.to-string.js
18521
18521
  var es_error_to_string = __webpack_require__(6918);
@@ -18926,7 +18926,7 @@ var FileDetail_component = normalizeComponent(
18926
18926
  this.$refs.videoRef.open(file.url);
18927
18927
  } else {
18928
18928
  // office 以及其他文件直接打开链接
18929
- if (!(file.id < 1)) {
18929
+ if (file.id && file.id >= 1) {
18930
18930
  window.open('/v2/attachment/showAtt?attId=' + file.id);
18931
18931
  } else {
18932
18932
  window.open(file.url);
@@ -18988,13 +18988,13 @@ var FileDetail_component = normalizeComponent(
18988
18988
  });
18989
18989
  ;// ./packages/BnFileView/BnFileView.vue?vue&type=script&lang=js
18990
18990
  /* harmony default export */ const BnFileView_BnFileViewvue_type_script_lang_js = (BnFileViewvue_type_script_lang_js);
18991
- // EXTERNAL MODULE: ./node_modules/vue-style-loader/index.js??clonedRuleSet-54.use[0]!./node_modules/css-loader/dist/cjs.js??clonedRuleSet-54.use[1]!./node_modules/@vue/vue-loader-v15/lib/loaders/stylePostLoader.js!./node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-54.use[2]!./node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-54.use[3]!./node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./packages/BnFileView/BnFileView.vue?vue&type=style&index=0&id=27b6fb78&prod&lang=css
18992
- var BnFileViewvue_type_style_index_0_id_27b6fb78_prod_lang_css = __webpack_require__(8002);
18993
- ;// ./packages/BnFileView/BnFileView.vue?vue&type=style&index=0&id=27b6fb78&prod&lang=css
18991
+ // EXTERNAL MODULE: ./node_modules/vue-style-loader/index.js??clonedRuleSet-54.use[0]!./node_modules/css-loader/dist/cjs.js??clonedRuleSet-54.use[1]!./node_modules/@vue/vue-loader-v15/lib/loaders/stylePostLoader.js!./node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-54.use[2]!./node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-54.use[3]!./node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./packages/BnFileView/BnFileView.vue?vue&type=style&index=0&id=b9418100&prod&lang=css
18992
+ var BnFileViewvue_type_style_index_0_id_b9418100_prod_lang_css = __webpack_require__(5357);
18993
+ ;// ./packages/BnFileView/BnFileView.vue?vue&type=style&index=0&id=b9418100&prod&lang=css
18994
18994
 
18995
- // EXTERNAL MODULE: ./node_modules/vue-style-loader/index.js??clonedRuleSet-64.use[0]!./node_modules/css-loader/dist/cjs.js??clonedRuleSet-64.use[1]!./node_modules/@vue/vue-loader-v15/lib/loaders/stylePostLoader.js!./node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-64.use[2]!./node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-64.use[3]!./node_modules/sass-loader/dist/cjs.js??clonedRuleSet-64.use[4]!./node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./packages/BnFileView/BnFileView.vue?vue&type=style&index=1&id=27b6fb78&prod&lang=scss&scoped=true
18996
- var BnFileViewvue_type_style_index_1_id_27b6fb78_prod_lang_scss_scoped_true = __webpack_require__(9732);
18997
- ;// ./packages/BnFileView/BnFileView.vue?vue&type=style&index=1&id=27b6fb78&prod&lang=scss&scoped=true
18995
+ // EXTERNAL MODULE: ./node_modules/vue-style-loader/index.js??clonedRuleSet-64.use[0]!./node_modules/css-loader/dist/cjs.js??clonedRuleSet-64.use[1]!./node_modules/@vue/vue-loader-v15/lib/loaders/stylePostLoader.js!./node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-64.use[2]!./node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-64.use[3]!./node_modules/sass-loader/dist/cjs.js??clonedRuleSet-64.use[4]!./node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./packages/BnFileView/BnFileView.vue?vue&type=style&index=1&id=b9418100&prod&lang=scss&scoped=true
18996
+ var BnFileViewvue_type_style_index_1_id_b9418100_prod_lang_scss_scoped_true = __webpack_require__(2045);
18997
+ ;// ./packages/BnFileView/BnFileView.vue?vue&type=style&index=1&id=b9418100&prod&lang=scss&scoped=true
18998
18998
 
18999
18999
  ;// ./packages/BnFileView/BnFileView.vue
19000
19000
 
@@ -19008,11 +19008,11 @@ var BnFileViewvue_type_style_index_1_id_27b6fb78_prod_lang_scss_scoped_true = __
19008
19008
 
19009
19009
  var BnFileView_component = normalizeComponent(
19010
19010
  BnFileView_BnFileViewvue_type_script_lang_js,
19011
- BnFileViewvue_type_template_id_27b6fb78_scoped_true_render,
19012
- BnFileViewvue_type_template_id_27b6fb78_scoped_true_staticRenderFns,
19011
+ BnFileViewvue_type_template_id_b9418100_scoped_true_render,
19012
+ BnFileViewvue_type_template_id_b9418100_scoped_true_staticRenderFns,
19013
19013
  false,
19014
19014
  null,
19015
- "27b6fb78",
19015
+ "b9418100",
19016
19016
  null
19017
19017
 
19018
19018
  )
@@ -28898,7 +28898,7 @@ function matchAreaInCity(afterCity, city, sourceData, parse) {
28898
28898
  * @param sourceData 组件配置,如 extraInfo.isFourAddress
28899
28899
  * @returns {{name: string, mobile: string, detail: string, zip_code: string, phone: string}}
28900
28900
  */
28901
- function parseAddressDetail(address, sourceData) {
28901
+ function parseAddressDetail(address, sourceData, originalAddress) {
28902
28902
  var parse = {
28903
28903
  name: '',
28904
28904
  mobile: '',
@@ -28907,6 +28907,7 @@ function parseAddressDetail(address, sourceData) {
28907
28907
  phone: '',
28908
28908
  extensionNumber: '' // 淘宝分机号码
28909
28909
  };
28910
+ originalAddress = originalAddress != null ? originalAddress : address;
28910
28911
 
28911
28912
  // 第一步:预处理
28912
28913
  address = joinAddressLines(address);
@@ -29041,6 +29042,9 @@ function parseAddressDetail(address, sourceData) {
29041
29042
  } else if (parse.province === "内蒙古") {
29042
29043
  parse.province = "内蒙古自治区";
29043
29044
  }
29045
+ if (isParsedRegionMissingInAddress(parse, originalAddress)) {
29046
+ parse.Abnormal = true;
29047
+ }
29044
29048
  console.log('最终解析结果:', JSON.stringify(parse));
29045
29049
  return parse;
29046
29050
  }
@@ -29625,13 +29629,75 @@ function preprocessAddress(address) {
29625
29629
  return cleanAddress;
29626
29630
  }
29627
29631
 
29632
+ /**
29633
+ * 用于和用户原文比对的行政区划后缀(长后缀优先)
29634
+ */
29635
+ var REGION_COMPARE_SUFFIXES = ['特别行政区', '维吾尔自治区', '壮族自治区', '回族自治区', '自治区', '自治州', '地区', '街道', '省', '市', '县', '区', '镇', '乡', '旗'];
29636
+
29637
+ /**
29638
+ * 去掉空白后的用户原文,便于匹配「广东 深圳」这类写法
29639
+ */
29640
+ function normalizeAddressForCompare(text) {
29641
+ return String(text || '').replace(/\s/g, '');
29642
+ }
29643
+
29644
+ /**
29645
+ * 识别结果全称 + 去掉一级后缀后的简称(广东省 -> 广东)
29646
+ */
29647
+ function getRegionCompareTokens(regionName) {
29648
+ var tokens = [];
29649
+ if (!regionName) {
29650
+ return tokens;
29651
+ }
29652
+ tokens.push(regionName);
29653
+ for (var i = 0; i < REGION_COMPARE_SUFFIXES.length; i++) {
29654
+ var suffix = REGION_COMPARE_SUFFIXES[i];
29655
+ if (regionName.length - suffix.length >= 2 && regionName.slice(-suffix.length) === suffix) {
29656
+ tokens.push(regionName.slice(0, -suffix.length));
29657
+ break;
29658
+ }
29659
+ }
29660
+ return tokens;
29661
+ }
29662
+
29663
+ /**
29664
+ * 识别出的省/市/区/街道是否出现在用户输入中(全称或常见简称均可)
29665
+ */
29666
+ function isRegionNameInAddress(regionName, compareText) {
29667
+ var tokens = getRegionCompareTokens(regionName);
29668
+ for (var i = 0; i < tokens.length; i++) {
29669
+ if (compareText.indexOf(tokens[i]) > -1) {
29670
+ return true;
29671
+ }
29672
+ }
29673
+ return false;
29674
+ }
29675
+
29676
+ /**
29677
+ * 任一已识别的省市区街道在原文中找不到时视为异常
29678
+ */
29679
+ function isParsedRegionMissingInAddress(parse, originalAddress) {
29680
+ var compareText = normalizeAddressForCompare(originalAddress);
29681
+ var fields = ['province', 'city', 'area', 'street'];
29682
+ for (var i = 0; i < fields.length; i++) {
29683
+ var regionName = parse[fields[i]];
29684
+ if (!regionName) {
29685
+ continue;
29686
+ }
29687
+ if (!isRegionNameInAddress(regionName, compareText)) {
29688
+ return true;
29689
+ }
29690
+ }
29691
+ return false;
29692
+ }
29693
+
29628
29694
  /**
29629
29695
  * 自动识别地址信息,格式化为省市区街道和收件人等信息
29630
29696
  * @param {string} address 原始地址字符串(可含空格、姓名、手机号等)
29631
29697
  * @param {object} [sourceData] 组件 sourceData,用于四级地址等配置(extraInfo.isFourAddress)
29632
29698
  * @param {object} [options] 可选配置
29633
29699
  * @param {array} [options.areaList] 地址库原始数据,默认从全局 areaList 获取
29634
- * @returns {{name: string, mobile: string, phone: string, zip_code: string, extensionNumber: string, province: string, city: string, area: string, street: string, addr: string, result: *}}
29700
+ * @returns {{name: string, mobile: string, phone: string, zip_code: string, extensionNumber: string, province: string, city: string, area: string, street: string, addr: string, Abnormal?: boolean}}
29635
29701
  */
29636
29702
  function addressParse(address, sourceData) {
29637
29703
  var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
@@ -29640,7 +29706,7 @@ function addressParse(address, sourceData) {
29640
29706
  parseArea(list);
29641
29707
  }
29642
29708
  var cleanAddress = preprocessAddress(address);
29643
- return parseAddressDetail(cleanAddress, sourceData || {});
29709
+ return parseAddressDetail(cleanAddress, sourceData || {}, address);
29644
29710
  }
29645
29711
  ;// ../../packages/utils/index.js
29646
29712