@indfnd/common-mobile-pro 1.0.66 → 1.0.69

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.
@@ -59629,6 +59629,13 @@ module.exports = URIError;
59629
59629
  module.exports = Object;
59630
59630
 
59631
59631
 
59632
+ /***/ }),
59633
+
59634
+ /***/ 23520:
59635
+ /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
59636
+
59637
+ module.exports = __webpack_require__.p + "styles/images/userBack.bd9562afd8fa0c2ce8676c31ca3bd642.png";
59638
+
59632
59639
  /***/ }),
59633
59640
 
59634
59641
  /***/ 8879:
@@ -77899,7 +77906,17 @@ __webpack_require__.r(__webpack_exports__);
77899
77906
 
77900
77907
  /***/ }),
77901
77908
 
77902
- /***/ 23549:
77909
+ /***/ 28597:
77910
+ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
77911
+
77912
+ "use strict";
77913
+ __webpack_require__.r(__webpack_exports__);
77914
+ // extracted by mini-css-extract-plugin
77915
+
77916
+
77917
+ /***/ }),
77918
+
77919
+ /***/ 9822:
77903
77920
  /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
77904
77921
 
77905
77922
  "use strict";
@@ -77949,7 +77966,7 @@ __webpack_require__.r(__webpack_exports__);
77949
77966
 
77950
77967
  /***/ }),
77951
77968
 
77952
- /***/ 96554:
77969
+ /***/ 40242:
77953
77970
  /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
77954
77971
 
77955
77972
  "use strict";
@@ -77999,7 +78016,7 @@ __webpack_require__.r(__webpack_exports__);
77999
78016
 
78000
78017
  /***/ }),
78001
78018
 
78002
- /***/ 58751:
78019
+ /***/ 27852:
78003
78020
  /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
78004
78021
 
78005
78022
  "use strict";
@@ -78079,7 +78096,7 @@ __webpack_require__.r(__webpack_exports__);
78079
78096
 
78080
78097
  /***/ }),
78081
78098
 
78082
- /***/ 99295:
78099
+ /***/ 19945:
78083
78100
  /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
78084
78101
 
78085
78102
  "use strict";
@@ -80602,19 +80619,37 @@ if(false) {}
80602
80619
 
80603
80620
  /***/ }),
80604
80621
 
80605
- /***/ 45316:
80622
+ /***/ 92920:
80623
+ /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
80624
+
80625
+ // style-loader: Adds some css to the DOM by adding a <style> tag
80626
+
80627
+ // load the styles
80628
+ var content = __webpack_require__(28597);
80629
+ if(content.__esModule) content = content.default;
80630
+ if(typeof content === 'string') content = [[module.id, content, '']];
80631
+ if(content.locals) module.exports = content.locals;
80632
+ // add the styles to the DOM
80633
+ var add = (__webpack_require__(70534)["default"])
80634
+ var update = add("74bbc255", content, false, {});
80635
+ // Hot Module Replacement
80636
+ if(false) {}
80637
+
80638
+ /***/ }),
80639
+
80640
+ /***/ 92679:
80606
80641
  /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
80607
80642
 
80608
80643
  // style-loader: Adds some css to the DOM by adding a <style> tag
80609
80644
 
80610
80645
  // load the styles
80611
- var content = __webpack_require__(23549);
80646
+ var content = __webpack_require__(9822);
80612
80647
  if(content.__esModule) content = content.default;
80613
80648
  if(typeof content === 'string') content = [[module.id, content, '']];
80614
80649
  if(content.locals) module.exports = content.locals;
80615
80650
  // add the styles to the DOM
80616
80651
  var add = (__webpack_require__(70534)["default"])
80617
- var update = add("698ca103", content, false, {});
80652
+ var update = add("f4b54a44", content, false, {});
80618
80653
  // Hot Module Replacement
80619
80654
  if(false) {}
80620
80655
 
@@ -80692,19 +80727,19 @@ if(false) {}
80692
80727
 
80693
80728
  /***/ }),
80694
80729
 
80695
- /***/ 35023:
80730
+ /***/ 57831:
80696
80731
  /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
80697
80732
 
80698
80733
  // style-loader: Adds some css to the DOM by adding a <style> tag
80699
80734
 
80700
80735
  // load the styles
80701
- var content = __webpack_require__(96554);
80736
+ var content = __webpack_require__(40242);
80702
80737
  if(content.__esModule) content = content.default;
80703
80738
  if(typeof content === 'string') content = [[module.id, content, '']];
80704
80739
  if(content.locals) module.exports = content.locals;
80705
80740
  // add the styles to the DOM
80706
80741
  var add = (__webpack_require__(70534)["default"])
80707
- var update = add("5233618d", content, false, {});
80742
+ var update = add("8016467e", content, false, {});
80708
80743
  // Hot Module Replacement
80709
80744
  if(false) {}
80710
80745
 
@@ -80782,19 +80817,19 @@ if(false) {}
80782
80817
 
80783
80818
  /***/ }),
80784
80819
 
80785
- /***/ 37346:
80820
+ /***/ 96273:
80786
80821
  /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
80787
80822
 
80788
80823
  // style-loader: Adds some css to the DOM by adding a <style> tag
80789
80824
 
80790
80825
  // load the styles
80791
- var content = __webpack_require__(58751);
80826
+ var content = __webpack_require__(27852);
80792
80827
  if(content.__esModule) content = content.default;
80793
80828
  if(typeof content === 'string') content = [[module.id, content, '']];
80794
80829
  if(content.locals) module.exports = content.locals;
80795
80830
  // add the styles to the DOM
80796
80831
  var add = (__webpack_require__(70534)["default"])
80797
- var update = add("4df30ba0", content, false, {});
80832
+ var update = add("b39b6ede", content, false, {});
80798
80833
  // Hot Module Replacement
80799
80834
  if(false) {}
80800
80835
 
@@ -80926,19 +80961,19 @@ if(false) {}
80926
80961
 
80927
80962
  /***/ }),
80928
80963
 
80929
- /***/ 41110:
80964
+ /***/ 43428:
80930
80965
  /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
80931
80966
 
80932
80967
  // style-loader: Adds some css to the DOM by adding a <style> tag
80933
80968
 
80934
80969
  // load the styles
80935
- var content = __webpack_require__(99295);
80970
+ var content = __webpack_require__(19945);
80936
80971
  if(content.__esModule) content = content.default;
80937
80972
  if(typeof content === 'string') content = [[module.id, content, '']];
80938
80973
  if(content.locals) module.exports = content.locals;
80939
80974
  // add the styles to the DOM
80940
80975
  var add = (__webpack_require__(70534)["default"])
80941
- var update = add("24f37e05", content, false, {});
80976
+ var update = add("e90f6b5e", content, false, {});
80942
80977
  // Hot Module Replacement
80943
80978
  if(false) {}
80944
80979
 
@@ -149037,7 +149072,7 @@ var component = (0,componentNormalizer["default"])(
149037
149072
 
149038
149073
  /***/ }),
149039
149074
 
149040
- /***/ 68531:
149075
+ /***/ 90761:
149041
149076
  /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
149042
149077
 
149043
149078
  "use strict";
@@ -149049,7 +149084,7 @@ __webpack_require__.d(__webpack_exports__, {
149049
149084
  "default": () => (/* binding */ packages_search)
149050
149085
  });
149051
149086
 
149052
- ;// ./node_modules/vue-loader/lib/loaders/templateLoader.js??ruleSet[1].rules[1]!./node_modules/vue-loader/lib/index.js??vue-loader-options!../lambo-design-mobile/packages/search/src/search.vue?vue&type=template&id=47951db3&scoped=true
149087
+ ;// ./node_modules/vue-loader/lib/loaders/templateLoader.js??ruleSet[1].rules[1]!./node_modules/vue-loader/lib/index.js??vue-loader-options!../lambo-design-mobile/packages/search/src/search.vue?vue&type=template&id=1452541d&scoped=true
149053
149088
  var render = function render() {
149054
149089
  var _vm = this,
149055
149090
  _c = _vm._self._c
@@ -149086,11 +149121,7 @@ var render = function render() {
149086
149121
  color: "#1989fa",
149087
149122
  size: "28px",
149088
149123
  },
149089
- on: {
149090
- click: function ($event) {
149091
- _vm.displayCondition = !_vm.displayCondition
149092
- },
149093
- },
149124
+ on: { click: _vm.showDisplayCondition },
149094
149125
  }),
149095
149126
  ],
149096
149127
  1
@@ -149246,7 +149277,7 @@ var staticRenderFns = []
149246
149277
  render._withStripped = true
149247
149278
 
149248
149279
 
149249
- ;// ../lambo-design-mobile/packages/search/src/search.vue?vue&type=template&id=47951db3&scoped=true
149280
+ ;// ../lambo-design-mobile/packages/search/src/search.vue?vue&type=template&id=1452541d&scoped=true
149250
149281
 
149251
149282
  // EXTERNAL MODULE: ../lambo-design-mobile/node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/lodash.js
149252
149283
  var lodash = __webpack_require__(48163);
@@ -149340,6 +149371,12 @@ var scan_code = __webpack_require__(51752);
149340
149371
  },
149341
149372
  },
149342
149373
  methods: {
149374
+ showDisplayCondition() {
149375
+ this.displayCondition = !this.displayCondition
149376
+ if (!this.displayCondition) {
149377
+ this.confirm()
149378
+ }
149379
+ },
149343
149380
  addClick() {
149344
149381
  this.$emit('addClick');
149345
149382
  },
@@ -149405,9 +149442,9 @@ var scan_code = __webpack_require__(51752);
149405
149442
 
149406
149443
  ;// ../lambo-design-mobile/packages/search/src/search.vue?vue&type=script&lang=js
149407
149444
  /* harmony default export */ const src_searchvue_type_script_lang_js = (searchvue_type_script_lang_js);
149408
- // EXTERNAL MODULE: ./node_modules/vue-style-loader/index.js!./node_modules/mini-css-extract-plugin/dist/loader.js??clonedRuleSet-3.use[1]!./node_modules/css-loader/dist/cjs.js??clonedRuleSet-3.use[2]!./node_modules/vue-loader/lib/loaders/stylePostLoader.js!./node_modules/less-loader/dist/cjs.js??clonedRuleSet-3.use[3]!./node_modules/vue-loader/lib/index.js??vue-loader-options!../lambo-design-mobile/packages/search/src/search.vue?vue&type=style&index=0&id=47951db3&prod&lang=less&scoped=true
149409
- var searchvue_type_style_index_0_id_47951db3_prod_lang_less_scoped_true = __webpack_require__(37346);
149410
- ;// ../lambo-design-mobile/packages/search/src/search.vue?vue&type=style&index=0&id=47951db3&prod&lang=less&scoped=true
149445
+ // EXTERNAL MODULE: ./node_modules/vue-style-loader/index.js!./node_modules/mini-css-extract-plugin/dist/loader.js??clonedRuleSet-3.use[1]!./node_modules/css-loader/dist/cjs.js??clonedRuleSet-3.use[2]!./node_modules/vue-loader/lib/loaders/stylePostLoader.js!./node_modules/less-loader/dist/cjs.js??clonedRuleSet-3.use[3]!./node_modules/vue-loader/lib/index.js??vue-loader-options!../lambo-design-mobile/packages/search/src/search.vue?vue&type=style&index=0&id=1452541d&prod&lang=less&scoped=true
149446
+ var searchvue_type_style_index_0_id_1452541d_prod_lang_less_scoped_true = __webpack_require__(96273);
149447
+ ;// ../lambo-design-mobile/packages/search/src/search.vue?vue&type=style&index=0&id=1452541d&prod&lang=less&scoped=true
149411
149448
 
149412
149449
  // EXTERNAL MODULE: ./node_modules/vue-loader/lib/runtime/componentNormalizer.js
149413
149450
  var componentNormalizer = __webpack_require__(14486);
@@ -149426,7 +149463,7 @@ var component = (0,componentNormalizer["default"])(
149426
149463
  staticRenderFns,
149427
149464
  false,
149428
149465
  null,
149429
- "47951db3",
149466
+ "1452541d",
149430
149467
  null
149431
149468
 
149432
149469
  )
@@ -152237,6 +152274,7 @@ packages_headers.auth = {
152237
152274
 
152238
152275
 
152239
152276
 
152277
+
152240
152278
  let packages_timer1, packages_timer2;
152241
152279
  let packages_hasDialog = false;
152242
152280
 
@@ -152305,7 +152343,7 @@ function packages_responseInterceptors(response) {
152305
152343
  if (data instanceof Object) {
152306
152344
  const code = data["code"];
152307
152345
  if (code === 10106) {
152308
- if (!packages_hasDialog) {
152346
+ if (!packages_hasDialog && !packages_config_config.disableLoginDialog) {
152309
152347
  clearTimeout(packages_timer1);
152310
152348
  packages_timer1 = setTimeout(function () {
152311
152349
  packages_hasDialog = true;
@@ -152763,7 +152801,7 @@ const packages_checkSingle = async (rule, value, callback, {url, formKey, formN
152763
152801
  checkSingle: packages_checkSingle
152764
152802
  });
152765
152803
 
152766
- ;// ./node_modules/vue-loader/lib/loaders/templateLoader.js??ruleSet[1].rules[1]!./node_modules/vue-loader/lib/index.js??vue-loader-options!../lambo-design-mobile/packages/upload-file/src/index.vue?vue&type=template&id=33e066bf&scoped=true
152804
+ ;// ./node_modules/vue-loader/lib/loaders/templateLoader.js??ruleSet[1].rules[1]!./node_modules/vue-loader/lib/index.js??vue-loader-options!../lambo-design-mobile/packages/upload-file/src/index.vue?vue&type=template&id=8145a76a&scoped=true
152767
152805
  var packages_render = function render() {
152768
152806
  var _vm = this,
152769
152807
  _c = _vm._self._c
@@ -152903,7 +152941,7 @@ var packages_staticRenderFns = []
152903
152941
  packages_render._withStripped = true
152904
152942
 
152905
152943
 
152906
- ;// ../lambo-design-mobile/packages/upload-file/src/index.vue?vue&type=template&id=33e066bf&scoped=true
152944
+ ;// ../lambo-design-mobile/packages/upload-file/src/index.vue?vue&type=template&id=8145a76a&scoped=true
152907
152945
 
152908
152946
  ;// ../lambo-design-mobile/packages/shared/utils/file.js
152909
152947
  /**
@@ -153028,7 +153066,12 @@ const packages_formatterSizeUnit = function (size) {
153028
153066
  border: {
153029
153067
  type: Boolean,
153030
153068
  default: true
153031
- }
153069
+ },
153070
+ // 兼容业务组件自定义预览函数
153071
+ filePreviewFunction: {
153072
+ type: Function,
153073
+ default: () => {}
153074
+ },
153032
153075
  },
153033
153076
 
153034
153077
  data() {
@@ -153225,6 +153268,11 @@ const packages_formatterSizeUnit = function (size) {
153225
153268
  this.$refs.uploadInput.click();
153226
153269
  },
153227
153270
  getAttach(item) {
153271
+ // 支持业务组件个性化传递预览函数
153272
+ if (this.filePreviewFunction) {
153273
+ this.filePreviewFunction(item)
153274
+ return
153275
+ }
153228
153276
  let fjUrl = window.location.origin +
153229
153277
  this.ossServerContext + this.ossFileGetUrl + item.fileId
153230
153278
  let fileName = item.fileName
@@ -153250,9 +153298,9 @@ const packages_formatterSizeUnit = function (size) {
153250
153298
 
153251
153299
  ;// ../lambo-design-mobile/packages/upload-file/src/index.vue?vue&type=script&lang=js
153252
153300
  /* harmony default export */ const packages_upload_file_srcvue_type_script_lang_js = (packages_srcvue_type_script_lang_js);
153253
- // EXTERNAL MODULE: ./node_modules/vue-style-loader/index.js!./node_modules/mini-css-extract-plugin/dist/loader.js??clonedRuleSet-4.use[1]!./node_modules/css-loader/dist/cjs.js??clonedRuleSet-4.use[2]!./node_modules/vue-loader/lib/loaders/stylePostLoader.js!./node_modules/vue-loader/lib/index.js??vue-loader-options!../lambo-design-mobile/packages/upload-file/src/index.vue?vue&type=style&index=0&id=33e066bf&prod&scoped=true&lang=css
153254
- var packages_srcvue_type_style_index_0_id_33e066bf_prod_scoped_true_lang_css = __webpack_require__(41110);
153255
- ;// ../lambo-design-mobile/packages/upload-file/src/index.vue?vue&type=style&index=0&id=33e066bf&prod&scoped=true&lang=css
153301
+ // EXTERNAL MODULE: ./node_modules/vue-style-loader/index.js!./node_modules/mini-css-extract-plugin/dist/loader.js??clonedRuleSet-4.use[1]!./node_modules/css-loader/dist/cjs.js??clonedRuleSet-4.use[2]!./node_modules/vue-loader/lib/loaders/stylePostLoader.js!./node_modules/vue-loader/lib/index.js??vue-loader-options!../lambo-design-mobile/packages/upload-file/src/index.vue?vue&type=style&index=0&id=8145a76a&prod&scoped=true&lang=css
153302
+ var packages_srcvue_type_style_index_0_id_8145a76a_prod_scoped_true_lang_css = __webpack_require__(43428);
153303
+ ;// ../lambo-design-mobile/packages/upload-file/src/index.vue?vue&type=style&index=0&id=8145a76a&prod&scoped=true&lang=css
153256
153304
 
153257
153305
  // EXTERNAL MODULE: ./node_modules/vue-loader/lib/runtime/componentNormalizer.js
153258
153306
  var packages_componentNormalizer = __webpack_require__(14486);
@@ -153271,7 +153319,7 @@ var packages_component = (0,packages_componentNormalizer["default"])(
153271
153319
  packages_staticRenderFns,
153272
153320
  false,
153273
153321
  null,
153274
- "33e066bf",
153322
+ "8145a76a",
153275
153323
  null
153276
153324
 
153277
153325
  )
@@ -155867,8 +155915,8 @@ var packages_time_range_component = (0,packages_componentNormalizer["default"])(
155867
155915
 
155868
155916
  /* harmony default export */ const packages_packages_time_range = (packages_time_range_0);
155869
155917
 
155870
- ;// ./node_modules/vue-loader/lib/loaders/templateLoader.js??ruleSet[1].rules[1]!./node_modules/vue-loader/lib/index.js??vue-loader-options!../lambo-design-mobile/packages/dynamic-help-box/src/dynamic-help-box.vue?vue&type=template&id=40d5f27c&scoped=true
155871
- var packages_dynamic_help_boxvue_type_template_id_40d5f27c_scoped_true_render = function render() {
155918
+ ;// ./node_modules/vue-loader/lib/loaders/templateLoader.js??ruleSet[1].rules[1]!./node_modules/vue-loader/lib/index.js??vue-loader-options!../lambo-design-mobile/packages/dynamic-help-box/src/dynamic-help-box.vue?vue&type=template&id=25be70e9&scoped=true
155919
+ var packages_dynamic_help_boxvue_type_template_id_25be70e9_scoped_true_render = function render() {
155872
155920
  var _vm = this,
155873
155921
  _c = _vm._self._c
155874
155922
  return _c(
@@ -155928,7 +155976,14 @@ var packages_dynamic_help_boxvue_type_template_id_40d5f27c_scoped_true_render =
155928
155976
  [
155929
155977
  _c(
155930
155978
  "div",
155931
- { staticClass: "page-header-search" },
155979
+ {
155980
+ style: {
155981
+ background: `url(${_vm.defaultImgUrl}) no-repeat`,
155982
+ display: "flex",
155983
+ flexDirection: "column",
155984
+ height: `calc(100vh - ${_vm.marginTopWidth})`,
155985
+ },
155986
+ },
155932
155987
  [
155933
155988
  _c(
155934
155989
  "Search",
@@ -155950,6 +156005,7 @@ var packages_dynamic_help_boxvue_type_template_id_40d5f27c_scoped_true_render =
155950
156005
  _vm._l(_vm.formFields, function (item, index) {
155951
156006
  return _c(
155952
156007
  "div",
156008
+ { key: `${item.formKey}-${index}` },
155953
156009
  [
155954
156010
  _c("van-field", {
155955
156011
  attrs: {
@@ -155971,219 +156027,249 @@ var packages_dynamic_help_boxvue_type_template_id_40d5f27c_scoped_true_render =
155971
156027
  }),
155972
156028
  0
155973
156029
  ),
155974
- ],
155975
- 1
155976
- ),
155977
- _vm._v(" "),
155978
- _c("div", { staticStyle: { height: "46px" } }),
155979
- _vm._v(" "),
155980
- _c(
155981
- "van-pull-refresh",
155982
- {
155983
- attrs: { "success-text": "刷新成功" },
155984
- on: { refresh: _vm.onRefresh },
155985
- model: {
155986
- value: _vm.refreshing,
155987
- callback: function ($$v) {
155988
- _vm.refreshing = $$v
155989
- },
155990
- expression: "refreshing",
155991
- },
155992
- },
155993
- [
156030
+ _vm._v(" "),
156031
+ _vm.itemCheckList.length > 0
156032
+ ? _c(
156033
+ "div",
156034
+ { staticClass: "round-selector" },
156035
+ _vm._l(_vm.itemCheckList, function (item) {
156036
+ return _c(
156037
+ "div",
156038
+ { key: item[_vm.rowKey], staticClass: "round-item" },
156039
+ [
156040
+ _vm._v(
156041
+ "\n " +
156042
+ _vm._s(item[_vm.rowName]) +
156043
+ "\n "
156044
+ ),
156045
+ ]
156046
+ )
156047
+ }),
156048
+ 0
156049
+ )
156050
+ : _vm._e(),
156051
+ _vm._v(" "),
155994
156052
  _c(
155995
- "van-list",
155996
- {
155997
- attrs: {
155998
- finished: _vm.finished,
155999
- "finished-text": "没有更多了",
156000
- "immediate-check": false,
156001
- },
156002
- on: { load: _vm.onLoad },
156003
- model: {
156004
- value: _vm.loading,
156005
- callback: function ($$v) {
156006
- _vm.loading = $$v
156007
- },
156008
- expression: "loading",
156009
- },
156010
- },
156053
+ "div",
156054
+ { staticClass: "page-data-list" },
156011
156055
  [
156012
- _vm.isRadioType
156013
- ? _c(
156014
- "van-radio-group",
156056
+ _c(
156057
+ "van-pull-refresh",
156058
+ {
156059
+ attrs: { "success-text": "刷新成功" },
156060
+ on: { refresh: _vm.onRefresh },
156061
+ model: {
156062
+ value: _vm.refreshing,
156063
+ callback: function ($$v) {
156064
+ _vm.refreshing = $$v
156065
+ },
156066
+ expression: "refreshing",
156067
+ },
156068
+ },
156069
+ [
156070
+ _c(
156071
+ "van-list",
156015
156072
  {
156073
+ attrs: {
156074
+ finished: _vm.finished,
156075
+ "finished-text": "没有更多了",
156076
+ "immediate-check": false,
156077
+ },
156078
+ on: { load: _vm.onLoad },
156016
156079
  model: {
156017
- value: _vm.itemRadio,
156080
+ value: _vm.loading,
156018
156081
  callback: function ($$v) {
156019
- _vm.itemRadio = $$v
156082
+ _vm.loading = $$v
156020
156083
  },
156021
- expression: "itemRadio",
156084
+ expression: "loading",
156022
156085
  },
156023
156086
  },
156024
156087
  [
156025
- _vm._l(_vm.itemArr, function (item, index) {
156026
- return [
156027
- _c("div", { staticStyle: { height: "15px" } }),
156028
- _vm._v(" "),
156029
- _c(
156030
- "van-row",
156088
+ _vm.isRadioType
156089
+ ? _c(
156090
+ "van-radio-group",
156031
156091
  {
156032
- attrs: {
156033
- type: "flex",
156034
- justify: "center",
156035
- align: "center",
156036
- },
156037
- on: {
156038
- click: function ($event) {
156039
- _vm.itemRadio = "check_" + index
156092
+ model: {
156093
+ value: _vm.itemRadio,
156094
+ callback: function ($$v) {
156095
+ _vm.itemRadio = $$v
156040
156096
  },
156097
+ expression: "itemRadio",
156041
156098
  },
156042
156099
  },
156043
156100
  [
156044
- _c(
156045
- "van-col",
156046
- { attrs: { span: "22" } },
156047
- [
156101
+ _vm._l(_vm.itemArr, function (item, index) {
156102
+ return [
156048
156103
  _c(
156049
- "SchemaCard",
156050
- _vm._g(
156051
- {
156052
- attrs: {
156053
- value: item,
156054
- titleKey: _vm.titleKey,
156055
- subTitleKey: _vm.subTitleKey,
156056
- statusTitleKey:
156057
- _vm.statusTitleKey,
156058
- columnList: _vm.columnList,
156059
- isBatching: true,
156060
- "card-fields": _vm.cardFields,
156104
+ "van-row",
156105
+ {
156106
+ attrs: {
156107
+ type: "flex",
156108
+ justify: "center",
156109
+ align: "center",
156110
+ },
156111
+ on: {
156112
+ click: function ($event) {
156113
+ _vm.itemRadio = "check_" + index
156061
156114
  },
156062
156115
  },
156063
- _vm.$listeners
156064
- )
156116
+ },
156117
+ [
156118
+ _c(
156119
+ "van-col",
156120
+ { attrs: { span: "22" } },
156121
+ [
156122
+ _c(
156123
+ "SchemaCard",
156124
+ _vm._g(
156125
+ {
156126
+ attrs: {
156127
+ value: item,
156128
+ titleKey: _vm.titleKey,
156129
+ subTitleKey:
156130
+ _vm.subTitleKey,
156131
+ statusTitleKey:
156132
+ _vm.statusTitleKey,
156133
+ columnList:
156134
+ _vm.columnList,
156135
+ isBatching: true,
156136
+ "card-fields":
156137
+ _vm.cardFields,
156138
+ },
156139
+ },
156140
+ _vm.$listeners
156141
+ )
156142
+ ),
156143
+ ],
156144
+ 1
156145
+ ),
156146
+ _vm._v(" "),
156147
+ _c(
156148
+ "van-col",
156149
+ { attrs: { span: "2" } },
156150
+ [
156151
+ _c("van-radio", {
156152
+ attrs: {
156153
+ name: "check_" + index,
156154
+ },
156155
+ }),
156156
+ ],
156157
+ 1
156158
+ ),
156159
+ ],
156160
+ 1
156065
156161
  ),
156066
- ],
156067
- 1
156068
- ),
156069
- _vm._v(" "),
156070
- _c(
156071
- "van-col",
156072
- { attrs: { span: "2" } },
156073
- [
156074
- _c("van-radio", {
156075
- attrs: { name: "check_" + index },
156076
- }),
156077
- ],
156078
- 1
156079
- ),
156162
+ ]
156163
+ }),
156080
156164
  ],
156081
- 1
156082
- ),
156083
- ]
156084
- }),
156085
- ],
156086
- 2
156087
- )
156088
- : _c(
156089
- "van-checkbox-group",
156090
- {
156091
- attrs: { max: _vm.maxCheckNum },
156092
- model: {
156093
- value: _vm.itemCheck,
156094
- callback: function ($$v) {
156095
- _vm.itemCheck = $$v
156096
- },
156097
- expression: "itemCheck",
156098
- },
156099
- },
156100
- [
156101
- _vm._l(_vm.itemArr, function (item, index) {
156102
- return [
156103
- _c("div", { staticStyle: { height: "15px" } }),
156104
- _vm._v(" "),
156105
- _c(
156106
- "van-row",
156165
+ 2
156166
+ )
156167
+ : _c(
156168
+ "van-checkbox-group",
156107
156169
  {
156108
- attrs: {
156109
- type: "flex",
156110
- justify: "center",
156111
- align: "center",
156112
- },
156113
- on: {
156114
- click: function ($event) {
156115
- return _vm.itemCheckListClick(
156116
- "check_" + index
156117
- )
156170
+ attrs: { max: _vm.maxCheckNum },
156171
+ model: {
156172
+ value: _vm.itemCheck,
156173
+ callback: function ($$v) {
156174
+ _vm.itemCheck = $$v
156118
156175
  },
156176
+ expression: "itemCheck",
156119
156177
  },
156120
156178
  },
156121
156179
  [
156122
- _c(
156123
- "van-col",
156124
- { attrs: { span: "22" } },
156125
- [
156180
+ _vm._l(_vm.itemArr, function (item, index) {
156181
+ return [
156126
156182
  _c(
156127
- "SchemaCard",
156128
- _vm._g(
156129
- {
156130
- attrs: {
156131
- value: item,
156132
- titleKey: _vm.titleKey,
156133
- subTitleKey: _vm.subTitleKey,
156134
- statusTitleKey:
156135
- _vm.statusTitleKey,
156136
- columnList: _vm.columnList,
156137
- isBatching: true,
156138
- "card-fields": _vm.cardFields,
156183
+ "van-row",
156184
+ {
156185
+ attrs: {
156186
+ type: "flex",
156187
+ justify: "center",
156188
+ align: "center",
156189
+ },
156190
+ on: {
156191
+ click: function ($event) {
156192
+ return _vm.itemCheckListClick(
156193
+ item[_vm.rowKey],
156194
+ index
156195
+ )
156139
156196
  },
156140
156197
  },
156141
- _vm.$listeners
156142
- )
156143
- ),
156144
- ],
156145
- 1
156146
- ),
156147
- _vm._v(" "),
156148
- _c(
156149
- "van-col",
156150
- { attrs: { span: "2" } },
156151
- [
156152
- _c("van-checkbox", {
156153
- attrs: {
156154
- name: "check_" + index,
156155
- shape: "square",
156156
156198
  },
156157
- }),
156158
- ],
156159
- 1
156160
- ),
156199
+ [
156200
+ _c(
156201
+ "van-col",
156202
+ { attrs: { span: "22" } },
156203
+ [
156204
+ _c(
156205
+ "SchemaCard",
156206
+ _vm._g(
156207
+ {
156208
+ attrs: {
156209
+ value: item,
156210
+ titleKey: _vm.titleKey,
156211
+ subTitleKey:
156212
+ _vm.subTitleKey,
156213
+ statusTitleKey:
156214
+ _vm.statusTitleKey,
156215
+ columnList:
156216
+ _vm.columnList,
156217
+ isBatching: true,
156218
+ "card-fields":
156219
+ _vm.cardFields,
156220
+ },
156221
+ },
156222
+ _vm.$listeners
156223
+ )
156224
+ ),
156225
+ ],
156226
+ 1
156227
+ ),
156228
+ _vm._v(" "),
156229
+ _c(
156230
+ "van-col",
156231
+ { attrs: { span: "2" } },
156232
+ [
156233
+ _c("van-checkbox", {
156234
+ attrs: {
156235
+ name: item[_vm.rowKey],
156236
+ shape: "square",
156237
+ },
156238
+ }),
156239
+ ],
156240
+ 1
156241
+ ),
156242
+ ],
156243
+ 1
156244
+ ),
156245
+ ]
156246
+ }),
156161
156247
  ],
156162
- 1
156248
+ 2
156163
156249
  ),
156164
- ]
156165
- }),
156166
156250
  ],
156167
- 2
156251
+ 1
156168
156252
  ),
156253
+ ],
156254
+ 1
156255
+ ),
156169
156256
  ],
156170
156257
  1
156171
156258
  ),
156172
156259
  ],
156173
156260
  1
156174
156261
  ),
156175
- ],
156176
- 1
156262
+ ]
156177
156263
  ),
156178
156264
  ],
156179
156265
  1
156180
156266
  )
156181
156267
  }
156182
- var packages_dynamic_help_boxvue_type_template_id_40d5f27c_scoped_true_staticRenderFns = []
156183
- packages_dynamic_help_boxvue_type_template_id_40d5f27c_scoped_true_render._withStripped = true
156268
+ var packages_dynamic_help_boxvue_type_template_id_25be70e9_scoped_true_staticRenderFns = []
156269
+ packages_dynamic_help_boxvue_type_template_id_25be70e9_scoped_true_render._withStripped = true
156184
156270
 
156185
156271
 
156186
- ;// ../lambo-design-mobile/packages/dynamic-help-box/src/dynamic-help-box.vue?vue&type=template&id=40d5f27c&scoped=true
156272
+ ;// ../lambo-design-mobile/packages/dynamic-help-box/src/dynamic-help-box.vue?vue&type=template&id=25be70e9&scoped=true
156187
156273
 
156188
156274
  // EXTERNAL MODULE: ../lambo-design-mobile/packages/shared/utils/json.js
156189
156275
  var packages_json = __webpack_require__(10845);
@@ -156858,7 +156944,7 @@ var packages_schema_card_component = (0,packages_componentNormalizer["default"])
156858
156944
  /* harmony default export */ const packages_packages_schema_card = (packages_schema_card_0);
156859
156945
 
156860
156946
  // EXTERNAL MODULE: ../lambo-design-mobile/packages/search/index.js + 6 modules
156861
- var packages_packages_search = __webpack_require__(68531);
156947
+ var packages_packages_search = __webpack_require__(90761);
156862
156948
  ;// ./node_modules/vue-loader/lib/index.js??vue-loader-options!../lambo-design-mobile/packages/dynamic-help-box/src/dynamic-help-box.vue?vue&type=script&lang=js
156863
156949
 
156864
156950
 
@@ -156929,7 +157015,7 @@ var packages_packages_search = __webpack_require__(68531);
156929
157015
  //遮罩顶部边距
156930
157016
  marginTopWidth:{
156931
157017
  type: String,
156932
- default: '26vh'
157018
+ default: '28vh'
156933
157019
  }
156934
157020
  },
156935
157021
  data() {
@@ -156950,6 +157036,7 @@ var packages_packages_search = __webpack_require__(68531);
156950
157036
  itemRadio: '',
156951
157037
  itemCheck:[],
156952
157038
  itemCheckList:[],
157039
+ itemCheckRowKeyList:[],
156953
157040
  params: {},
156954
157041
  form: {},
156955
157042
  rowKey:'',
@@ -156966,6 +157053,7 @@ var packages_packages_search = __webpack_require__(68531);
156966
157053
  cardFields: [],
156967
157054
  showFilter: false,
156968
157055
  helpBoxTitle: '',
157056
+ defaultImgUrl: __webpack_require__(23520)
156969
157057
  };
156970
157058
  },
156971
157059
  mounted() {
@@ -157012,39 +157100,31 @@ var packages_packages_search = __webpack_require__(68531);
157012
157100
  console.log(e)
157013
157101
  }
157014
157102
  this.itemCheckList = itemCheckList;
157015
- },
157016
- itemCheck(){
157017
- let itemCheck = this.itemCheck;
157018
- let itemArr = this.itemArr;
157019
- let itemCheckList = [];
157020
- try{
157021
- for(let i=0;i<itemCheck.length;i++){
157022
- let checkIndexId = itemCheck[i];
157023
- if(checkIndexId){
157024
- let cks = checkIndexId.split('_');
157025
- if(cks.length>1){
157026
- let index = cks[1];
157027
- let indexInt = parseInt(index);
157028
- if(itemArr[indexInt]){
157029
- itemCheckList.push(itemArr[indexInt])
157030
- }
157031
- }
157032
- }
157033
- }
157034
- }catch(e){
157035
- console.log(e)
157036
- }
157037
- this.itemCheckList = itemCheckList;
157038
157103
  }
157039
157104
  },
157040
157105
  methods: {
157041
- itemCheckListClick(index){
157042
- const idx = this.itemCheck.indexOf(index);
157106
+ itemCheckListClick(rowKey, index){
157107
+ const idx = this.itemCheck.indexOf(rowKey);
157043
157108
  if (idx > -1) {
157044
- this.itemCheck.splice(idx, 1); // 取消选中
157109
+ // 取消选中
157110
+ this.itemCheck.splice(idx, 1);
157111
+ this.itemCheckList.splice(idx, 1);
157112
+ this.itemCheckRowKeyList.splice(idx, 1);
157045
157113
  } else {
157046
- this.itemCheck.push(index); // 选中
157114
+ // 选中
157115
+ this.itemCheck.push(rowKey);
157116
+ let itemArr = this.itemArr;
157117
+ let itemCheckList = this.itemCheckList;
157118
+ let itemCheckRowKeyList = this.itemCheckRowKeyList
157119
+
157120
+ if(itemArr[index] && !itemCheckRowKeyList.includes(itemArr[index][this.rowKey])){
157121
+ itemCheckList.push(itemArr[index])
157122
+ itemCheckRowKeyList.push(itemArr[index][this.rowKey])
157123
+ }
157124
+ this.itemCheckList = itemCheckList;
157125
+ this.itemCheckRowKeyList = itemCheckRowKeyList;
157047
157126
  }
157127
+
157048
157128
  },
157049
157129
  getNodeData(json, path) {
157050
157130
  const parts = path.split('.');
@@ -157062,6 +157142,8 @@ var packages_packages_search = __webpack_require__(68531);
157062
157142
  reload(){
157063
157143
  this.itemRadio = '';
157064
157144
  this.itemCheck = [];
157145
+ this.itemCheckRowKeyList = [];
157146
+ this.itemCheckList = [];
157065
157147
  this.onRefresh();
157066
157148
  },
157067
157149
  doSearch(searchVal, searchForm) {
@@ -157071,6 +157153,7 @@ var packages_packages_search = __webpack_require__(68531);
157071
157153
  this.itemArr = [];
157072
157154
  this.searchVal = searchVal;
157073
157155
  this.searchFormResult = searchForm;
157156
+ this.itemRadio = '';
157074
157157
  this.$set(searchForm, this.searchTitleField.formKey, searchVal)
157075
157158
  this.onLoad();
157076
157159
  },
@@ -157209,6 +157292,7 @@ var packages_packages_search = __webpack_require__(68531);
157209
157292
  self.itemRadio = '';
157210
157293
  self.itemCheck = [];
157211
157294
  self.itemCheckList = [];
157295
+ self.itemCheckRowKeyList = [];
157212
157296
  self.selectedText = ''
157213
157297
  self.$emit('input', '', '');
157214
157298
  }else if(i==1){//确定
@@ -157232,9 +157316,9 @@ var packages_packages_search = __webpack_require__(68531);
157232
157316
 
157233
157317
  ;// ../lambo-design-mobile/packages/dynamic-help-box/src/dynamic-help-box.vue?vue&type=script&lang=js
157234
157318
  /* harmony default export */ const packages_src_dynamic_help_boxvue_type_script_lang_js = (packages_dynamic_help_boxvue_type_script_lang_js);
157235
- // EXTERNAL MODULE: ./node_modules/vue-style-loader/index.js!./node_modules/mini-css-extract-plugin/dist/loader.js??clonedRuleSet-3.use[1]!./node_modules/css-loader/dist/cjs.js??clonedRuleSet-3.use[2]!./node_modules/vue-loader/lib/loaders/stylePostLoader.js!./node_modules/less-loader/dist/cjs.js??clonedRuleSet-3.use[3]!./node_modules/vue-loader/lib/index.js??vue-loader-options!../lambo-design-mobile/packages/dynamic-help-box/src/dynamic-help-box.vue?vue&type=style&index=0&id=40d5f27c&prod&scoped=true&lang=less
157236
- var packages_dynamic_help_boxvue_type_style_index_0_id_40d5f27c_prod_scoped_true_lang_less = __webpack_require__(45316);
157237
- ;// ../lambo-design-mobile/packages/dynamic-help-box/src/dynamic-help-box.vue?vue&type=style&index=0&id=40d5f27c&prod&scoped=true&lang=less
157319
+ // EXTERNAL MODULE: ./node_modules/vue-style-loader/index.js!./node_modules/mini-css-extract-plugin/dist/loader.js??clonedRuleSet-3.use[1]!./node_modules/css-loader/dist/cjs.js??clonedRuleSet-3.use[2]!./node_modules/vue-loader/lib/loaders/stylePostLoader.js!./node_modules/less-loader/dist/cjs.js??clonedRuleSet-3.use[3]!./node_modules/vue-loader/lib/index.js??vue-loader-options!../lambo-design-mobile/packages/dynamic-help-box/src/dynamic-help-box.vue?vue&type=style&index=0&id=25be70e9&prod&scoped=true&lang=less
157320
+ var packages_dynamic_help_boxvue_type_style_index_0_id_25be70e9_prod_scoped_true_lang_less = __webpack_require__(92920);
157321
+ ;// ../lambo-design-mobile/packages/dynamic-help-box/src/dynamic-help-box.vue?vue&type=style&index=0&id=25be70e9&prod&scoped=true&lang=less
157238
157322
 
157239
157323
  ;// ../lambo-design-mobile/packages/dynamic-help-box/src/dynamic-help-box.vue
157240
157324
 
@@ -157247,11 +157331,11 @@ var packages_dynamic_help_boxvue_type_style_index_0_id_40d5f27c_prod_scoped_true
157247
157331
 
157248
157332
  var packages_dynamic_help_box_component = (0,packages_componentNormalizer["default"])(
157249
157333
  packages_src_dynamic_help_boxvue_type_script_lang_js,
157250
- packages_dynamic_help_boxvue_type_template_id_40d5f27c_scoped_true_render,
157251
- packages_dynamic_help_boxvue_type_template_id_40d5f27c_scoped_true_staticRenderFns,
157334
+ packages_dynamic_help_boxvue_type_template_id_25be70e9_scoped_true_render,
157335
+ packages_dynamic_help_boxvue_type_template_id_25be70e9_scoped_true_staticRenderFns,
157252
157336
  false,
157253
157337
  null,
157254
- "40d5f27c",
157338
+ "25be70e9",
157255
157339
  null
157256
157340
 
157257
157341
  )
@@ -160300,7 +160384,7 @@ var packages_tree_select_component = (0,packages_componentNormalizer["default"])
160300
160384
  case 'idcard': {
160301
160385
  let num = 0
160302
160386
  if(d.props.maxlength){
160303
- num = parseInt(d.props.maxlength);
160387
+ num = parseInt(d.props.maxlength);
160304
160388
  }
160305
160389
  itemInner = h('LamboInputText', {
160306
160390
  ref: d.formKey,
@@ -160470,16 +160554,14 @@ var packages_tree_select_component = (0,packages_componentNormalizer["default"])
160470
160554
  }
160471
160555
  case 'select': {
160472
160556
  if(d.enumType === 'enum' && d.enumList && d.enumList.length > 0 ){
160473
- if (this.form[d.formKey]){
160474
- d.enumList.forEach(item => {
160475
- if (item.K === this.form[d.formKey]) {
160476
- this.form[d.formKey + 'Name'] = item.V
160477
- }})
160478
- }
160557
+ d.enumList.forEach(item => {
160558
+ if (item.K === this.form[d.formKey]) {
160559
+ this.form[d.formKey + 'Name'] = item.V
160560
+ }})
160479
160561
  } else if(d.enumType === 'code' && this.enumData[d.enumKey]){
160480
- this.form[d.formKey + 'Name'] = this.enumData[d.enumKey].enumData[this.form[d.formKey]] || ''
160562
+ this.form[d.formKey + 'Name'] = this.form[d.formKey] ? this.enumData[d.enumKey].enumData[this.form[d.formKey]] || '' : ''
160481
160563
  } else if(d.enumType === 'service' && this.serviceEnumData[d.formKey]){
160482
- this.form[d.formKey + 'Name'] = this.serviceEnumData[d.formKey].enumData[this.form[d.formKey]] || ''
160564
+ this.form[d.formKey + 'Name'] = this.form[d.formKey] ? this.serviceEnumData[d.formKey].enumData[this.form[d.formKey]] || '' : ''
160483
160565
  } else {
160484
160566
  this.form[d.formKey + 'Name'] = ''
160485
160567
  }
@@ -160568,150 +160650,175 @@ var packages_tree_select_component = (0,packages_componentNormalizer["default"])
160568
160650
  case 'checkbox': {
160569
160651
  let actions = [];
160570
160652
  let value = this.form[d.formKey]
160571
- if (typeof value == 'string') {
160572
- if (this.form[d.formKey]){
160573
- value = this.form[d.formKey].split(',')
160574
- }else {
160575
- value = []
160576
- }
160653
+ if (typeof value === 'string' && this.form[d.formKey]) {
160654
+ value = this.form[d.formKey].split(',');
160655
+ } else {
160656
+ value = [];
160577
160657
  }
160578
- if(d.enumType === 'enum'){
160579
- (d.enumList).map((d) => {
160580
- let values = {key:d.K,value:d.V}
160581
- actions.push(values)
160582
- })
160583
- } else if(d.enumType === 'service'){
160584
- ((this.serviceEnumData[d.formKey] && this.serviceEnumData[d.formKey].enumList) || []).map((d) => {
160585
- let values = {key:d.K,value:d.V}
160586
- actions.push(values)
160587
- })
160658
+ if(d.enumType === 'enum' && d.enumList && d.enumList.length > 0 ){
160659
+ actions = d.enumList.map(item => ({
160660
+ key: item.K,
160661
+ value: item.V
160662
+ }));
160663
+ } else if(d.enumType === 'service' && this.serviceEnumData[d.formKey] && this.serviceEnumData[d.formKey].enumList.length > 0){
160664
+ actions = this.serviceEnumData[d.formKey].enumList.map(item => ({
160665
+ key: item.K,
160666
+ value: item.V
160667
+ }));
160668
+ } else if (d.enumType === 'code' && this.enumData[d.enumKey] && this.enumData[d.enumKey].enumList.length > 0){
160669
+ actions = this.enumData[d.enumKey].enumList.map(item => ({
160670
+ key: item.K,
160671
+ value: item.V
160672
+ }));
160588
160673
  } else {
160589
- ((this.enumData[d.enumKey]&&this.enumData[d.enumKey].enumList) || []).map((d) => {
160590
- let values = {key:d.K,value:d.V}
160591
- actions.push(values)
160592
- })
160674
+ this.form[d.formKey + 'Name'] = ''
160593
160675
  }
160676
+ let actionsMap = {}
160677
+ actions.forEach(item => {
160678
+ actionsMap[item.key] = item.value
160679
+ });
160680
+ let valueName = []
160681
+ value.forEach(item => {
160682
+ valueName.push(actionsMap[item])
160683
+ })
160684
+ this.form[d.formKey + 'Name'] = valueName.join(",")
160594
160685
  itemInner = h(
160595
- 'LamboMultiSelect',
160596
- {
160597
- props: {
160598
- title: d.title,
160599
- actions:actions,
160600
- value: value,
160601
- must:d.required,
160602
- placeholder: readonly ? '' : `请选择${d.title}`,
160603
- rules: this.rules[d.formKey],
160604
- inputAlign: this.inputAlign,
160605
- readonly,
160606
- border
160607
- },
160608
- on: {
160609
- input: (val) => {
160610
- let result = val.join(",");
160611
- this.form[d.formKey] = result
160612
- if (d.onChange && d.onChange instanceof Function) {
160613
- let form = d.onChange(val,this.form)
160614
- this.form = form;
160615
- }
160616
- this.$emit('input', this.form)
160617
- this.$emit('fieldChange', { formKey: d.formKey, row: this.form })
160618
- //主动触发联动
160619
- if(d.linked){
160620
- this.refreshLinkData(d.target , this.form)
160621
- this.dynamicTextLinkData( d.target , this.form)
160622
- }
160623
- },
160686
+ 'LamboMultiSelect',
160687
+ {
160688
+ props: {
160689
+ title: d.title,
160690
+ actions:actions,
160691
+ value: value,
160692
+ must:d.required,
160693
+ placeholder: readonly ? '' : `请选择${d.title}`,
160694
+ rules: this.rules[d.formKey],
160695
+ inputAlign: this.inputAlign,
160696
+ readonly,
160697
+ border
160698
+ },
160699
+ on: {
160700
+ input: (val) => {
160701
+ let result = val.join(",");
160702
+ this.form[d.formKey] = result
160703
+ let resultName = []
160704
+ val.forEach(item => {
160705
+ resultName.push(actionsMap[item])
160706
+ })
160707
+ this.form[d.formKey + 'Name'] = resultName.join(",")
160708
+ if (d.onChange && d.onChange instanceof Function) {
160709
+ let form = d.onChange(val,this.form)
160710
+ this.form = form;
160711
+ }
160712
+ this.$emit('input', this.form)
160713
+ this.$emit('fieldChange', { formKey: d.formKey, row: this.form })
160714
+ //主动触发联动
160715
+ if(d.linked){
160716
+ this.refreshLinkData(d.target , this.form)
160717
+ this.dynamicTextLinkData( d.target , this.form)
160718
+ }
160624
160719
  },
160625
- })
160720
+ },
160721
+ })
160626
160722
  break
160627
160723
  }
160628
160724
  case 'radio': {
160629
160725
  let actions = [];
160630
- if(d.enumType === 'enum'){
160631
- (d.enumList).map((d) => {
160632
- let values = {key:d.K,value:d.V}
160633
- actions.push(values)
160634
- })
160635
- } else if(d.enumType === 'service'){
160636
- ((this.serviceEnumData[d.formKey] && this.serviceEnumData[d.formKey].enumList) || []).map((d) => {
160637
- let values = {key:d.K,value:d.V}
160638
- actions.push(values)
160726
+ if(d.enumType === 'enum' && d.enumList && d.enumList.length > 0 ){
160727
+ d.enumList.forEach(item => {
160728
+ if (item.K === this.form[d.formKey]) {
160729
+ this.form[d.formKey + 'Name'] = item.V
160730
+ }
160731
+ actions.push({key:item.K,value:item.V})
160639
160732
  })
160733
+ } else if(d.enumType === 'service' && this.serviceEnumData[d.formKey] && this.serviceEnumData[d.formKey].enumList.length > 0){
160734
+ actions = this.serviceEnumData[d.formKey].enumList.map(item => ({
160735
+ key: item.K,
160736
+ value: item.V
160737
+ }));
160738
+ this.form[d.formKey + 'Name'] = this.form[d.formKey] ? this.serviceEnumData[d.formKey].enumData[this.form[d.formKey]] || '' : ''
160739
+ } else if (d.enumType === 'code' && this.enumData[d.enumKey] && this.enumData[d.enumKey].enumList.length > 0){
160740
+ actions = this.enumData[d.enumKey].enumList.map(item => ({
160741
+ key: item.K,
160742
+ value: item.V
160743
+ }));
160744
+ this.form[d.formKey + 'Name'] = this.form[d.formKey] ? this.enumData[d.enumKey].enumData[this.form[d.formKey]] || '' : ''
160640
160745
  } else {
160641
- ((this.enumData[d.enumKey]&&this.enumData[d.enumKey].enumList) || []).map((d) => {
160642
- let values = {key:d.K,value:d.V}
160643
- actions.push(values)
160644
- })
160746
+ this.form[d.formKey + 'Name'] = ''
160645
160747
  }
160748
+ let actionsMap = {}
160749
+ actions.forEach(item => {
160750
+ actionsMap[item.key] = item.value
160751
+ });
160646
160752
  itemInner = h(
160647
- 'LamboSingleSelect',
160648
- {
160649
- props: {
160650
- title: d.title,
160651
- rules: this.rules[d.formKey],
160652
- actions:actions,
160653
- value:this.form[d.formKey],
160654
- must:d.required,
160655
- placeholder: readonly ? '' : `请选择${d.title}`,
160656
- readonly:readonly,
160657
- inputAlign: this.inputAlign,
160658
- clearable,
160659
- border
160660
- },
160661
- style: {
160662
- ...d.style
160663
- },
160664
- on: {
160665
- input: (val) => {
160666
- this.form[d.formKey] = val
160667
- if (d.onChange && d.onChange instanceof Function) {
160668
- let form = d.onChange(val,this.form)
160669
- this.form = form;
160670
- }
160671
- this.$emit('input', this.form)
160672
- this.$emit('fieldChange', { formKey: d.formKey, row: this.form })
160673
- //主动触发联动
160674
- if(d.linked){
160675
- this.refreshLinkData(d.target , this.form)
160676
- this.dynamicTextLinkData( d.target , this.form)
160677
- }
160678
- },
160753
+ 'LamboSingleSelect',
160754
+ {
160755
+ props: {
160756
+ title: d.title,
160757
+ rules: this.rules[d.formKey],
160758
+ actions:actions,
160759
+ value:this.form[d.formKey],
160760
+ must:d.required,
160761
+ placeholder: readonly ? '' : `请选择${d.title}`,
160762
+ readonly:readonly,
160763
+ inputAlign: this.inputAlign,
160764
+ clearable,
160765
+ border
160766
+ },
160767
+ style: {
160768
+ ...d.style
160769
+ },
160770
+ on: {
160771
+ input: (val) => {
160772
+ this.form[d.formKey] = val
160773
+ this.form[d.formKey + 'Name'] = actionsMap[val]
160774
+ if (d.onChange && d.onChange instanceof Function) {
160775
+ let form = d.onChange(val,this.form)
160776
+ this.form = form;
160777
+ }
160778
+ this.$emit('input', this.form)
160779
+ this.$emit('fieldChange', { formKey: d.formKey, row: this.form })
160780
+ //主动触发联动
160781
+ if(d.linked){
160782
+ this.refreshLinkData(d.target , this.form)
160783
+ this.dynamicTextLinkData( d.target , this.form)
160784
+ }
160679
160785
  },
160680
- })
160786
+ },
160787
+ })
160681
160788
  break
160682
160789
  }
160683
160790
  case 'switch': {
160684
160791
  itemInner = h(
160685
- 'LamboFieldSwitch',
160686
- {
160687
- props: {
160688
- title: d.title,
160689
- rules: this.rules[d.formKey],
160690
- value:this.form[d.formKey]?'1':'0',
160691
- must:d.required,
160692
- readonly,
160693
- border
160694
- },
160695
- style: {
160696
- ...d.style
160697
- },
160698
- on: {
160699
- input: (val) => {
160700
- this.form[d.formKey] = val==='1'
160701
- if (d.onChange && d.onChange instanceof Function) {
160702
- let form = d.onChange(val,this.form)
160703
- this.form = form;
160704
- }
160705
- this.$emit('input', this.form)
160706
- this.$emit('fieldChange', { formKey: d.formKey, row: this.form })
160707
- //主动触发联动
160708
- if(d.linked){
160709
- this.refreshLinkData(d.target , this.form)
160710
- this.dynamicTextLinkData( d.target , this.form)
160711
- }
160792
+ 'LamboFieldSwitch',
160793
+ {
160794
+ props: {
160795
+ title: d.title,
160796
+ rules: this.rules[d.formKey],
160797
+ value:this.form[d.formKey]?'1':'0',
160798
+ must:d.required,
160799
+ readonly,
160800
+ border
160801
+ },
160802
+ style: {
160803
+ ...d.style
160804
+ },
160805
+ on: {
160806
+ input: (val) => {
160807
+ this.form[d.formKey] = val==='1'
160808
+ if (d.onChange && d.onChange instanceof Function) {
160809
+ let form = d.onChange(val,this.form)
160810
+ this.form = form;
160712
160811
  }
160713
- },
160714
- })
160812
+ this.$emit('input', this.form)
160813
+ this.$emit('fieldChange', { formKey: d.formKey, row: this.form })
160814
+ //主动触发联动
160815
+ if(d.linked){
160816
+ this.refreshLinkData(d.target , this.form)
160817
+ this.dynamicTextLinkData( d.target , this.form)
160818
+ }
160819
+ }
160820
+ },
160821
+ })
160715
160822
  break
160716
160823
  }
160717
160824
  case 'datepicker': {
@@ -161148,7 +161255,6 @@ var packages_tree_select_component = (0,packages_componentNormalizer["default"])
161148
161255
  value = this.dynamicTextDataMap[d.formKey][d.formKey];
161149
161256
  }
161150
161257
  this.form[d.formKey] = value
161151
- console.log(this.form[d.formKey])
161152
161258
  let num = 0
161153
161259
  if(d.props.maxlength){
161154
161260
  num = parseInt(d.props.maxlength);
@@ -161187,35 +161293,35 @@ var packages_tree_select_component = (0,packages_componentNormalizer["default"])
161187
161293
  }
161188
161294
 
161189
161295
  itemInner = h('van-field',
161190
- {
161191
- ref: d.formKey,
161192
- props: {
161193
- label: d.title,
161194
- ...(d.props || {}),
161195
- name: d.name,
161196
- value: this.form[d.formKey],
161197
- rules: this.rules[d.formKey],
161198
- readonly,
161199
- clearable,
161200
- border
161201
- },
161202
- on: {
161203
- input: (val) => {
161204
- this.form[d.formKey] = val
161205
- if (d.onChange && d.onChange instanceof Function) {
161206
- let form = d.onChange(val,this.form)
161207
- this.form = form;
161208
- }
161209
- this.$emit('input', this.form)
161210
- this.$emit('fieldChange', { formKey: d.formKey, row: this.form })
161211
- //主动触发联动
161212
- if(d.linked){
161213
- this.refreshLinkData(d.target , this.form)
161214
- this.dynamicTextLinkData( d.target , this.form)
161215
- }
161216
- },
161296
+ {
161297
+ ref: d.formKey,
161298
+ props: {
161299
+ label: d.title,
161300
+ ...(d.props || {}),
161301
+ name: d.name,
161302
+ value: this.form[d.formKey],
161303
+ rules: this.rules[d.formKey],
161304
+ readonly,
161305
+ clearable,
161306
+ border
161307
+ },
161308
+ on: {
161309
+ input: (val) => {
161310
+ this.form[d.formKey] = val
161311
+ if (d.onChange && d.onChange instanceof Function) {
161312
+ let form = d.onChange(val,this.form)
161313
+ this.form = form;
161314
+ }
161315
+ this.$emit('input', this.form)
161316
+ this.$emit('fieldChange', { formKey: d.formKey, row: this.form })
161317
+ //主动触发联动
161318
+ if(d.linked){
161319
+ this.refreshLinkData(d.target , this.form)
161320
+ this.dynamicTextLinkData( d.target , this.form)
161321
+ }
161217
161322
  },
161218
- })
161323
+ },
161324
+ })
161219
161325
  }
161220
161326
  }
161221
161327
  }
@@ -161224,16 +161330,16 @@ var packages_tree_select_component = (0,packages_componentNormalizer["default"])
161224
161330
  d.condition instanceof Function ? d.condition(this.form) : d.condition !== false
161225
161331
  if (conditionFlag) {
161226
161332
  formItems.push(
161227
- itemInner
161333
+ itemInner
161228
161334
  )
161229
161335
  if (!border && idx !== renderFieldList.length - 1){
161230
161336
  formItems.push(
161231
- h('div', {
161232
- style: {
161233
- backgroundColor: '#efefef',
161234
- height: '1px' ,
161235
- },
161236
- }),
161337
+ h('div', {
161338
+ style: {
161339
+ backgroundColor: '#efefef',
161340
+ height: '1px' ,
161341
+ },
161342
+ }),
161237
161343
  )
161238
161344
  }
161239
161345
  }
@@ -161242,28 +161348,28 @@ var packages_tree_select_component = (0,packages_componentNormalizer["default"])
161242
161348
 
161243
161349
 
161244
161350
  return h(
161245
- 'van-form',
161246
- {
161247
- ref: 'form',
161248
- props: {
161249
- model: this.form,
161250
- labelWidth: this.labelWidth,
161251
- labelColon: false,
161252
- labelAlign: this.labelAlign,
161253
- },
161254
- nativeOn: {
161255
- submit: (event) => {
161256
- event.preventDefault()
161257
- return false
161258
- },
161259
- },
161260
- on: {
161261
- 'failed': (val) => {
161262
- console.log(val)
161263
- }
161351
+ 'van-form',
161352
+ {
161353
+ ref: 'form',
161354
+ props: {
161355
+ model: this.form,
161356
+ labelWidth: this.labelWidth,
161357
+ labelColon: false,
161358
+ labelAlign: this.labelAlign,
161359
+ },
161360
+ nativeOn: {
161361
+ submit: (event) => {
161362
+ event.preventDefault()
161363
+ return false
161264
161364
  },
161265
161365
  },
161266
- [formItems],
161366
+ on: {
161367
+ 'failed': (val) => {
161368
+ console.log(val)
161369
+ }
161370
+ },
161371
+ },
161372
+ [formItems],
161267
161373
  )
161268
161374
  },
161269
161375
  });
@@ -161992,7 +162098,7 @@ packages_srcvue_type_template_id_865b418e_scoped_true_render._withStripped = tru
161992
162098
  components: {
161993
162099
  SchemaCard: packages_packages_schema_card,
161994
162100
  LoadMore: packages_packages_load_more,
161995
- Search: () => Promise.resolve(/* import() */).then(__webpack_require__.bind(__webpack_require__, 68531)),
162101
+ Search: () => Promise.resolve(/* import() */).then(__webpack_require__.bind(__webpack_require__, 90761)),
161996
162102
  [packages_cell["default"].name]: packages_cell["default"],
161997
162103
  [packages_row["default"].name]: packages_row["default"],
161998
162104
  [packages_col["default"].name]: packages_col["default"],
@@ -163750,377 +163856,502 @@ function packages_getAddressByType(unifiedLocation, locationType) {
163750
163856
 
163751
163857
 
163752
163858
  class packages_WechatAdapter {
163753
- constructor(_options) {
163754
- this.appId = _options.wechatId; // 保存 appId 以便在 getInitInfo 中使用
163755
- // if (!window.wx) {
163756
- // const script = document.createElement('script');
163757
- // script.src = "//res.wx.qq.com/open/js/jweixin-1.6.0.js";
163758
- // document.head.appendChild(script);
163759
- // }
163760
- function loadScript(src) {
163761
- return new Promise((resolve, reject) => {
163762
- const script = document.createElement('script');
163763
- script.src = src;
163764
- script.onload = () => resolve(script);
163765
- script.onerror = () => reject(new Error('Failed to load script'));
163766
- document.head.appendChild(script);
163767
- });
163768
- }
163769
- loadScript('//res.wx.qq.com/open/js/jweixin-1.6.0.js')
163770
- .then(script => {
163771
- console.log('Script loaded');
163772
- this.init(_options);
163773
- })
163774
- .catch(err => console.error(err));
163859
+ constructor(_options) {
163860
+ this.appId = _options.wechatId; // 保存 appId 以便在 getInitInfo 中使用
163861
+ // if (!window.wx) {
163862
+ // const script = document.createElement('script');
163863
+ // script.src = "//res.wx.qq.com/open/js/jweixin-1.6.0.js";
163864
+ // document.head.appendChild(script);
163865
+ // }
163866
+ function loadScript(src) {
163867
+ return new Promise((resolve, reject) => {
163868
+ const script = document.createElement('script');
163869
+ script.src = src;
163870
+ script.onload = () => resolve(script);
163871
+ script.onerror = () => reject(new Error('Failed to load script'));
163872
+ document.head.appendChild(script);
163873
+ });
163775
163874
  }
163875
+ loadScript('//res.wx.qq.com/open/js/jweixin-1.6.0.js')
163876
+ .then((script) => {
163877
+ console.log('Script loaded');
163878
+ // this.init(_options);
163879
+ })
163880
+ .catch((err) => console.error(err));
163881
+ }
163776
163882
 
163777
- async init(options) {
163778
- const currentUrl = encodeURIComponent(window.location.href.split('#')[0]); // 确保URL编码且去除hash部分
163779
- packages_utils_ajax.request({
163780
- url: `${packages_config_config.upmsServerContext}/manage/ibpWxMpBaseinfo/gtJsTicket?appId=${options.wechatId}&url=${currentUrl}`,
163781
- method: 'get'
163782
- }).then((resp) => {
163783
- if (resp.data.code === 1) {
163784
- const { data } = resp.data;
163785
- window.wx.config({
163786
- debug: false, // 开启调试模式
163787
- appId: data.appId, // 必填,公众号的唯一标识
163788
- timestamp: data.timestamp, // 必填,生成签名的时间戳
163789
- nonceStr: data.noncestr, // 必填,生成签名的随机串
163790
- signature: data.signature, // 必填,签名
163791
- jsApiList: ['getLocation', 'scanQRCode', 'chooseImage', 'getLocalImgData', 'openLocation'] // 必填,需要使用的JS接口列表
163792
- });
163883
+ /**
163884
+ * 初始化jssdk
163885
+ * 2025-12-4 16:49:11 修改,增加审计日志回调函数auditLog,在不同阶段会调用该回调函数,调用参数如下
163886
+ * {
163887
+ * seg: 阶段,当前有 beforeConfig、configError、afterConfig、ready
163888
+ * title: 对阶段的文字描述
163889
+ * }
163890
+ * 业务系统有需要对初始化jssdk进行审计的需求,在初始化jssdk的时候,在options中增加auditLog属性,并根据需要记录所需记录日志的阶段或者全部记录
163891
+ * @param {*} options
163892
+ * @returns
163893
+ */
163894
+ async init(options) {
163895
+ const currentUrl = encodeURIComponent(window.location.href.split('#')[0]); // 确保URL编码且去除hash部分
163896
+ if (options.auditLog && options.auditLog instanceof Function) {
163897
+ options.auditLog({
163898
+ seg: 'beforeConfig',
163899
+ title: '开始小程序jssdk认证',
163900
+ });
163901
+ }
163902
+ packages_utils_ajax
163903
+ .request({
163904
+ url: `${packages_config_config.upmsServerContext}/manage/ibpWxMpBaseinfo/gtJsTicket?appId=${options.wechatId}&url=${currentUrl}`,
163905
+ method: 'get',
163906
+ })
163907
+ .then((resp) => {
163908
+ if (resp.data.code === 1) {
163909
+ const { data } = resp.data;
163910
+ window.wx.config({
163911
+ debug: false, // 开启调试模式
163912
+ appId: data.appId, // 必填,公众号的唯一标识
163913
+ timestamp: data.timestamp, // 必填,生成签名的时间戳
163914
+ nonceStr: data.noncestr, // 必填,生成签名的随机串
163915
+ signature: data.signature, // 必填,签名
163916
+ jsApiList: [
163917
+ 'getLocation',
163918
+ 'scanQRCode',
163919
+ 'chooseImage',
163920
+ 'getLocalImgData',
163921
+ 'openLocation',
163922
+ ], // 必填,需要使用的JS接口列表
163923
+ });
163793
163924
 
163794
- window.wx.error(function (res) {
163795
- console.log("error:", res);
163796
- console.error(res);
163797
- });
163925
+ window.wx.error(function (res) {
163926
+ console.log('error:', res);
163927
+ if (options.auditLog && options.auditLog instanceof Function) {
163928
+ options.auditLog({
163929
+ seg: 'configError',
163930
+ title: '小程序jssdk认证异常wxerror',
163931
+ });
163932
+ }
163933
+ });
163798
163934
 
163799
- wx.ready(function() {
163800
- console.log("ready...");
163801
- // config信息验证后会执行ready方法
163802
- // 可以在这里调用相关接口
163803
- });
163935
+ wx.ready(function () {
163936
+ if (options.auditLog && options.auditLog instanceof Function) {
163937
+ options.auditLog({
163938
+ seg: 'afterConfig',
163939
+ title: '完成小程序jssdk认证',
163940
+ });
163804
163941
  }
163805
- }).catch((err) => {
163806
- console.error(err);
163807
- });
163808
- }
163942
+ console.log('ready...');
163943
+ // config信息验证后会执行ready方法
163944
+ // 可以在这里调用相关接口
163945
+ });
163946
+ } else {
163947
+ if (options.auditLog && options.auditLog instanceof Function) {
163948
+ options.auditLog({
163949
+ seg: 'configError',
163950
+ title:
163951
+ '小程序jssdk认证异常请求认证参返回结果异常' +
163952
+ JSON.stringify(resp),
163953
+ });
163954
+ }
163955
+ }
163956
+ })
163957
+ .catch((err) => {
163958
+ if (options.auditLog && options.auditLog instanceof Function) {
163959
+ options.auditLog({
163960
+ seg: 'configError',
163961
+ title: '小程序jssdk认证异常请求认证参数失败',
163962
+ });
163963
+ }
163964
+ console.error(err);
163965
+ });
163966
+ }
163809
163967
 
163810
- async getLocation(options) {
163811
- return new Promise((resolve, reject) => {
163812
- wx.ready(async () => {
163813
- // 解决在 URL 变化时,由于 wx.config 和 wx.ready 的异步特性导致的微信接口调用使用旧配置、签名失效或调用失败的问题
163814
- // 新增重试机制检查接口可用性
163815
- let retryInterval;
163816
- try {
163817
- await new Promise((retryResolve, retryReject) => {
163818
- let retryCount = 0;
163819
- const maxRetries = 30; // 最大重试次数 (30*100ms=3秒超时)
163820
- retryInterval = setInterval(async () => {
163821
- if (retryCount++ >= maxRetries) {
163822
- clearInterval(retryInterval);
163823
- retryReject(new Error("JS-SDK接口初始化超时"));
163824
- return;
163825
- }
163968
+ /**
163969
+ * 获取定位
163970
+ * 2025-11-28 15:49:23 修改,增加审计日志回调函数auditLog,在不同阶段会调用该回调函数,调用参数如下
163971
+ * {
163972
+ * seg: 阶段,当前有 beforeCheck、checkError、afterCheck、beforeLocation、successLocation、errorLocation1、errorLocation2
163973
+ * title: 对阶段的文字描述
163974
+ * }
163975
+ * 业务系统有需要对定位进行审计的需求,在调用定位的时候,在options中增加auditLog属性,并根据需要记录所需记录日志的阶段或者全部记录
163976
+ * @param {*} options
163977
+ * @returns
163978
+ */
163979
+ async getLocation(options) {
163980
+ return new Promise((resolve, reject) => {
163981
+ wx.ready(async () => {
163982
+ // 解决在 URL 变化时,由于 wx.config 和 wx.ready 的异步特性导致的微信接口调用使用旧配置、签名失效或调用失败的问题
163983
+ // 新增重试机制检查接口可用性
163984
+ let retryInterval;
163985
+ if (options.auditLog && options.auditLog instanceof Function) {
163986
+ options.auditLog({
163987
+ seg: 'beforeCheck',
163988
+ title: '开始检测小程序jssdk授权状态',
163989
+ });
163990
+ }
163991
+ try {
163992
+ await new Promise((retryResolve, retryReject) => {
163993
+ let retryCount = 0;
163994
+ const maxRetries = 30; // 最大重试次数 (30*100ms=3秒超时)
163995
+ retryInterval = setInterval(async () => {
163996
+ if (retryCount++ >= maxRetries) {
163997
+ clearInterval(retryInterval);
163998
+ retryReject(new Error('JS-SDK接口初始化超时'));
163999
+ return;
164000
+ }
163826
164001
 
163827
- // 检查getLocation接口是否可用
163828
- wx.checkJsApi({
163829
- jsApiList: ["getLocation"],
163830
- success: (res) => {
163831
- if (res.checkResult.getLocation === true) {
163832
- clearInterval(retryInterval);
163833
- retryResolve();
163834
- }
163835
- },
163836
- fail: () => {/* 失败不计入重试,继续轮询 */
163837
- }
163838
- });
163839
- }, 100); // 每100ms检查一次
163840
- });
163841
- } catch (error) {
163842
- reject(new Error(`接口初始化失败: ${error.message}`));
163843
- return;
163844
- }
164002
+ // 检查getLocation接口是否可用
164003
+ wx.checkJsApi({
164004
+ jsApiList: ['getLocation'],
164005
+ success: (res) => {
164006
+ if (res.checkResult.getLocation === true) {
164007
+ clearInterval(retryInterval);
164008
+ retryResolve();
164009
+ }
164010
+ },
164011
+ fail: () => {
164012
+ /* 失败不计入重试,继续轮询 */
164013
+ },
164014
+ });
164015
+ }, 100); // 每100ms检查一次
164016
+ });
164017
+ } catch (error) {
164018
+ reject(new Error(`接口初始化失败: ${error.message}`));
164019
+ if (options.auditLog && options.auditLog instanceof Function) {
164020
+ options.auditLog({
164021
+ seg: 'checkError',
164022
+ title: '检测小程序jssdk授权状态异常并中止定位',
164023
+ });
164024
+ }
164025
+ return;
164026
+ }
163845
164027
 
163846
- // 检查 options.type,如果为空或者不含有 'wgs84' 'bd09',则设置为 'gcj02'
163847
- let locationType = options.type;
163848
- if (!options.type || (options.type !== 'wgs84' && options.type !== 'bd09')) {
163849
- locationType = 'gcj02';
163850
- }
164028
+ if (options.auditLog && options.auditLog instanceof Function) {
164029
+ options.auditLog({
164030
+ seg: 'afterCheck',
164031
+ title: '检测小程序jssdk授权状态结束',
164032
+ });
164033
+ }
163851
164034
 
163852
- const fetchLocation = (type) => {
163853
- return new Promise((resolve, reject) => {
163854
- wx.getLocation({
163855
- ...options,
163856
- type: type,
163857
- success: location => {
163858
- const unifiedLocation = {
163859
- latitude: location.latitude || location.lat || null, // 统一纬度属性
163860
- longitude: location.longitude || location.lng || null, // 统一经度属性
163861
- accuracy: location.accuracy || null // 精确度,如果有的话
163862
- };
163863
-
163864
- if (!unifiedLocation.latitude || !unifiedLocation.longitude) {
163865
- return reject(new Error('Invalid location data'));
163866
- }
163867
- // options.needAddress 是否需要地址信息
163868
- // if(options.needAddress && !unifiedLocation.address) {
163869
- // // 根据坐标得到地址描述
163870
- // const res = getAddress(unifiedLocation.longitude, unifiedLocation.latitude)
163871
- // unifiedLocation.city = res.addressComponents.city
163872
- // unifiedLocation.province = res.addressComponents.province
163873
- // unifiedLocation.address = res.address
163874
- // }
163875
-
163876
- resolve(unifiedLocation);
163877
- },
163878
- fail: err => {
163879
- console.error("getLocation failed:", err);
163880
- reject(err);
163881
- }
163882
- });
163883
- });
164035
+ // 检查 options.type,如果为空或者不含有 'wgs84' 或 'bd09',则设置为 'gcj02'
164036
+ let locationType = options.type;
164037
+ if (
164038
+ !options.type ||
164039
+ (options.type !== 'wgs84' && options.type !== 'bd09')
164040
+ ) {
164041
+ locationType = 'gcj02';
164042
+ }
164043
+
164044
+ const fetchLocation = (type) => {
164045
+ return new Promise((resolve, reject) => {
164046
+ if (options.auditLog && options.auditLog instanceof Function) {
164047
+ options.auditLog({
164048
+ seg: 'beforeLocation',
164049
+ title: '小程序调用jssdk发起定位',
164050
+ });
164051
+ }
164052
+ wx.getLocation({
164053
+ ...options,
164054
+ type: type,
164055
+ success: (location) => {
164056
+ const unifiedLocation = {
164057
+ latitude: location.latitude || location.lat || null, // 统一纬度属性
164058
+ longitude: location.longitude || location.lng || null, // 统一经度属性
164059
+ accuracy: location.accuracy || null, // 精确度,如果有的话
163884
164060
  };
163885
164061
 
163886
- // 先判断是否需要地理位置 如不需要 直接返回坐标
163887
- if (options.needAddress) {
163888
- fetchLocation('gcj02'.then(unifiedLocation => {
163889
- const result = packages_getAddressByType(unifiedLocation, locationType)
163890
- if (!result) {
163891
- return reject(new Error('Invalid location data'));
163892
- }
163893
- resolve(unifiedLocation);
163894
- }))
163895
- .catch(err => {
163896
- reject(err)
163897
- })
163898
- } else {
163899
- resolve(fetchLocation(locationType))
164062
+ if (options.auditLog && options.auditLog instanceof Function) {
164063
+ options.auditLog({
164064
+ seg: 'successLocation',
164065
+ title:
164066
+ '小程序调用jssdk定位成功' +
164067
+ JSON.stringify(unifiedLocation),
164068
+ });
163900
164069
  }
163901
164070
 
163902
- // // 先取gcj02 再根据type转成不同坐标系
163903
- // fetchLocation('gcj02').then(unifiedLocation => {
163904
- // // options.needAddress 是否需要地址信息
163905
- // if(options.needAddress && !unifiedLocation.address) {
163906
- // const result = getAddressByType(unifiedLocation, locationType)
163907
- // if(!result) {
163908
- // return reject(new Error('Invalid location data'));
163909
- // }
163910
- // resolve(unifiedLocation);
163911
- // }
163912
- // else {
163913
- // const result = getAxisByType(unifiedLocation, locationType)
163914
- // if(!result) {
163915
- // return reject(new Error('Invalid location data'));
163916
- // }
163917
- // resolve(unifiedLocation);
163918
- // }
163919
- // }).catch(err => {
163920
- // reject(err);
163921
- // });
163922
-
163923
-
163924
- // if (locationType === 'bd09') {
163925
- // // 先获取 gcj02 坐标
163926
- // fetchLocation('gcj02').then(unifiedLocation => {
163927
- // // 将 gcj02 坐标转换为 bd09
163928
- // const [bd09Lng, bd09Lat] = coordtransform.gcj02tobd09(unifiedLocation.longitude, unifiedLocation.latitude);
163929
- // unifiedLocation.longitude = bd09Lng;
163930
- // unifiedLocation.latitude = bd09Lat;
163931
- // if (!unifiedLocation.latitude || !unifiedLocation.longitude) {
163932
- // return reject(new Error('Invalid location data'));
163933
- // }
163934
- // // options.needAddress 是否需要地址信息
163935
- // if(options.needAddress && !unifiedLocation.address) {
163936
- // // 根据坐标得到地址描述
163937
- // const res = getAddress(unifiedLocation.longitude, unifiedLocation.latitude)
163938
- // unifiedLocation.city = res.addressComponents.city
163939
- // unifiedLocation.province = res.addressComponents.province
163940
- // unifiedLocation.address = res.address
163941
- // }
163942
-
163943
- // resolve(unifiedLocation);
163944
- // }).catch(err => {
163945
- // reject(err);
163946
- // });
164071
+ if (!unifiedLocation.latitude || !unifiedLocation.longitude) {
164072
+ if (
164073
+ options.auditLog &&
164074
+ options.auditLog instanceof Function
164075
+ ) {
164076
+ options.auditLog({
164077
+ seg: 'errorLocation1',
164078
+ title: '小程序调用jssdk定位异常,未取到经纬度',
164079
+ });
164080
+ }
164081
+ return reject(new Error('Invalid location data'));
164082
+ }
164083
+ // options.needAddress 是否需要地址信息
164084
+ // if(options.needAddress && !unifiedLocation.address) {
164085
+ // // 根据坐标得到地址描述
164086
+ // const res = getAddress(unifiedLocation.longitude, unifiedLocation.latitude)
164087
+ // unifiedLocation.city = res.addressComponents.city
164088
+ // unifiedLocation.province = res.addressComponents.province
164089
+ // unifiedLocation.address = res.address
163947
164090
  // }
163948
- });
163949
- });
163950
- }
163951
164091
 
163952
- async openLocation(options) {
163953
- return new Promise((resolve, reject) => {
163954
- wx.ready(() => {
163955
- wx.openLocation({
163956
- latitude: options.latitude,
163957
- longitude: options.longitude,
163958
- name: options.name || '',
163959
- address: options.address || '',
163960
- scale: options.scale || 1,
163961
- infoUrl: options.infoUrl || '',
163962
- success: () => {
163963
- console.log("openLocation success");
163964
- resolve();
163965
- },
163966
- fail: err => {
163967
- console.error("openLocation failed:", err);
163968
- reject(err);
163969
- }
163970
- });
164092
+ resolve(unifiedLocation);
164093
+ },
164094
+ fail: (err) => {
164095
+ console.error('getLocation failed:', err);
164096
+ if (options.auditLog && options.auditLog instanceof Function) {
164097
+ options.auditLog({
164098
+ seg: 'errorLocation2',
164099
+ title: '小程序调用jssdk定位异常,' + JSON.stringify(err),
164100
+ });
164101
+ }
164102
+ reject(err);
164103
+ },
163971
164104
  });
163972
- });
163973
- }
164105
+ });
164106
+ };
163974
164107
 
163975
- async scanCode(options) {
163976
- return new Promise((resolve, reject) => {
163977
- wx.ready(() => {
163978
- wx.scanQRCode({
163979
- ...options,
163980
- needResult: 1, // 默认为0,扫描结果由微信处理,1则直接返回扫描结果
163981
- success: (res) => {
163982
- console.log("scanQRCode success:", res);
163983
- resolve( res); // 当needResult 为 1 时,扫码返回的结果
163984
- },
163985
- fail: (err) => {
163986
- console.error("scanQRCode failed:", err);
163987
- reject(err);
163988
- }
163989
- });
163990
- });
164108
+ // 先判断是否需要地理位置 如不需要 直接返回坐标
164109
+ if (options.needAddress) {
164110
+ fetchLocation(
164111
+ 'gcj02'.then((unifiedLocation) => {
164112
+ const result = packages_getAddressByType(unifiedLocation, locationType);
164113
+ if (!result) {
164114
+ return reject(new Error('Invalid location data'));
164115
+ }
164116
+ resolve(unifiedLocation);
164117
+ })
164118
+ ).catch((err) => {
164119
+ reject(err);
164120
+ });
164121
+ } else {
164122
+ resolve(fetchLocation(locationType));
164123
+ }
164124
+
164125
+ // // 先取gcj02 再根据type转成不同坐标系
164126
+ // fetchLocation('gcj02').then(unifiedLocation => {
164127
+ // // options.needAddress 是否需要地址信息
164128
+ // if(options.needAddress && !unifiedLocation.address) {
164129
+ // const result = getAddressByType(unifiedLocation, locationType)
164130
+ // if(!result) {
164131
+ // return reject(new Error('Invalid location data'));
164132
+ // }
164133
+ // resolve(unifiedLocation);
164134
+ // }
164135
+ // else {
164136
+ // const result = getAxisByType(unifiedLocation, locationType)
164137
+ // if(!result) {
164138
+ // return reject(new Error('Invalid location data'));
164139
+ // }
164140
+ // resolve(unifiedLocation);
164141
+ // }
164142
+ // }).catch(err => {
164143
+ // reject(err);
164144
+ // });
164145
+
164146
+ // if (locationType === 'bd09') {
164147
+ // // 先获取 gcj02 坐标
164148
+ // fetchLocation('gcj02').then(unifiedLocation => {
164149
+ // // 将 gcj02 坐标转换为 bd09
164150
+ // const [bd09Lng, bd09Lat] = coordtransform.gcj02tobd09(unifiedLocation.longitude, unifiedLocation.latitude);
164151
+ // unifiedLocation.longitude = bd09Lng;
164152
+ // unifiedLocation.latitude = bd09Lat;
164153
+ // if (!unifiedLocation.latitude || !unifiedLocation.longitude) {
164154
+ // return reject(new Error('Invalid location data'));
164155
+ // }
164156
+ // // options.needAddress 是否需要地址信息
164157
+ // if(options.needAddress && !unifiedLocation.address) {
164158
+ // // 根据坐标得到地址描述
164159
+ // const res = getAddress(unifiedLocation.longitude, unifiedLocation.latitude)
164160
+ // unifiedLocation.city = res.addressComponents.city
164161
+ // unifiedLocation.province = res.addressComponents.province
164162
+ // unifiedLocation.address = res.address
164163
+ // }
164164
+
164165
+ // resolve(unifiedLocation);
164166
+ // }).catch(err => {
164167
+ // reject(err);
164168
+ // });
164169
+ // }
164170
+ });
164171
+ });
164172
+ }
164173
+
164174
+ async openLocation(options) {
164175
+ return new Promise((resolve, reject) => {
164176
+ wx.ready(() => {
164177
+ wx.openLocation({
164178
+ latitude: options.latitude,
164179
+ longitude: options.longitude,
164180
+ name: options.name || '',
164181
+ address: options.address || '',
164182
+ scale: options.scale || 1,
164183
+ infoUrl: options.infoUrl || '',
164184
+ success: () => {
164185
+ console.log('openLocation success');
164186
+ resolve();
164187
+ },
164188
+ fail: (err) => {
164189
+ console.error('openLocation failed:', err);
164190
+ reject(err);
164191
+ },
163991
164192
  });
163992
- }
164193
+ });
164194
+ });
164195
+ }
163993
164196
 
163994
- async takePhoto(options) {
163995
- return new Promise((resolve, reject) => {
163996
- wx.ready(() => {
163997
- wx.chooseImage({
163998
- ...options,
163999
- // count: options.count || 1, // 可以根据传入的options设置选择图片的数量
164000
- // sizeType: ['original', 'compressed'], // 可以指定是原图还是压缩图,默认二者都有
164001
- // sourceType: ['camera','album'], // 可以指定来源是相册还是相机,默认二者都有
164002
- success: async (res) => {
164003
- const localIds = res.localIds; // 返回选定照片的本地ID数组
164004
- const results = [];
164005
-
164006
- for (const localId of localIds) {
164007
- const result = { localId }; // 存储每张照片的处理结果
164008
- if (!options.outputType) {
164009
- // outputType为空,返回所有结果
164010
- await new Promise((resolve, reject) => {
164011
- wx.getLocalImgData({
164012
- localId,
164013
- success: (dataRes) => {
164014
- result.imageData = dataRes.localData;
164015
- resolve();
164016
- },
164017
- fail: (err) => {
164018
- console.error("getLocalImgData failed:", err);
164019
- reject(err);
164020
- }
164021
- });
164022
- });
164023
- } else {
164024
- if (options.outputType.includes('info')) {
164025
- result.imageInfo = localId;
164026
- }
164027
- if (options.outputType.includes('data')) {
164028
- await new Promise((resolve, reject) => {
164029
- wx.getLocalImgData({
164030
- localId,
164031
- success: (dataRes) => {
164032
- result.imageData = dataRes.localData;
164033
- resolve();
164034
- },
164035
- fail: (err) => {
164036
- console.error("getLocalImgData failed:", err);
164037
- reject(err);
164038
- }
164039
- });
164040
- });
164041
- }
164042
- if (options.outputType.includes('oss')) {
164043
- await new Promise((resolve, reject) => {
164044
- wx.getLocalImgData({
164045
- localId,
164046
- success: (dataRes) => {
164047
- const file = this.dataURLtoFile(dataRes.localData, 'image.png');
164048
- this.uploadToOSS(file, options).then((ossResult) => {
164049
- result.imageOss = ossResult;
164050
- resolve();
164051
- }).catch((err) => {
164052
- console.error("uploadToOSS failed:", err);
164053
- reject(err);
164054
- });
164055
- },
164056
- fail: (err) => {
164057
- console.error("getLocalImgData failed:", err);
164058
- reject(err);
164059
- }
164060
- });
164061
- });
164062
- }
164063
- }
164064
- results.push(result); // 将处理结果添加到数组中
164065
- }
164197
+ async scanCode(options) {
164198
+ return new Promise((resolve, reject) => {
164199
+ wx.ready(() => {
164200
+ wx.scanQRCode({
164201
+ ...options,
164202
+ needResult: 1, // 默认为0,扫描结果由微信处理,1则直接返回扫描结果
164203
+ success: (res) => {
164204
+ console.log('scanQRCode success:', res);
164205
+ resolve(res); // 当needResult 为 1 时,扫码返回的结果
164206
+ },
164207
+ fail: (err) => {
164208
+ console.error('scanQRCode failed:', err);
164209
+ reject(err);
164210
+ },
164211
+ });
164212
+ });
164213
+ });
164214
+ }
164066
164215
 
164067
- resolve(results); // 返回所有照片的处理结果
164216
+ async takePhoto(options) {
164217
+ return new Promise((resolve, reject) => {
164218
+ wx.ready(() => {
164219
+ wx.chooseImage({
164220
+ ...options,
164221
+ // count: options.count || 1, // 可以根据传入的options设置选择图片的数量
164222
+ // sizeType: ['original', 'compressed'], // 可以指定是原图还是压缩图,默认二者都有
164223
+ // sourceType: ['camera','album'], // 可以指定来源是相册还是相机,默认二者都有
164224
+ success: async (res) => {
164225
+ const localIds = res.localIds; // 返回选定照片的本地ID数组
164226
+ const results = [];
164227
+
164228
+ for (const localId of localIds) {
164229
+ const result = { localId }; // 存储每张照片的处理结果
164230
+ if (!options.outputType) {
164231
+ // outputType为空,返回所有结果
164232
+ await new Promise((resolve, reject) => {
164233
+ wx.getLocalImgData({
164234
+ localId,
164235
+ success: (dataRes) => {
164236
+ result.imageData = dataRes.localData;
164237
+ resolve();
164068
164238
  },
164069
164239
  fail: (err) => {
164070
- console.error("chooseImage failed:", err);
164071
- reject(err);
164072
- }
164240
+ console.error('getLocalImgData failed:', err);
164241
+ reject(err);
164242
+ },
164243
+ });
164073
164244
  });
164074
- });
164075
- });
164076
- }
164245
+ } else {
164246
+ if (options.outputType.includes('info')) {
164247
+ result.imageInfo = localId;
164248
+ }
164249
+ if (options.outputType.includes('data')) {
164250
+ await new Promise((resolve, reject) => {
164251
+ wx.getLocalImgData({
164252
+ localId,
164253
+ success: (dataRes) => {
164254
+ result.imageData = dataRes.localData;
164255
+ resolve();
164256
+ },
164257
+ fail: (err) => {
164258
+ console.error('getLocalImgData failed:', err);
164259
+ reject(err);
164260
+ },
164261
+ });
164262
+ });
164263
+ }
164264
+ if (options.outputType.includes('oss')) {
164265
+ await new Promise((resolve, reject) => {
164266
+ wx.getLocalImgData({
164267
+ localId,
164268
+ success: (dataRes) => {
164269
+ const file = this.dataURLtoFile(
164270
+ dataRes.localData,
164271
+ 'image.png'
164272
+ );
164273
+ this.uploadToOSS(file, options)
164274
+ .then((ossResult) => {
164275
+ result.imageOss = ossResult;
164276
+ resolve();
164277
+ })
164278
+ .catch((err) => {
164279
+ console.error('uploadToOSS failed:', err);
164280
+ reject(err);
164281
+ });
164282
+ },
164283
+ fail: (err) => {
164284
+ console.error('getLocalImgData failed:', err);
164285
+ reject(err);
164286
+ },
164287
+ });
164288
+ });
164289
+ }
164290
+ }
164291
+ results.push(result); // 将处理结果添加到数组中
164292
+ }
164077
164293
 
164294
+ resolve(results); // 返回所有照片的处理结果
164295
+ },
164296
+ fail: (err) => {
164297
+ console.error('chooseImage failed:', err);
164298
+ reject(err);
164299
+ },
164300
+ });
164301
+ });
164302
+ });
164303
+ }
164078
164304
 
164079
- dataURLtoFile(dataurl, filename) {
164080
- let arr = dataurl.split(',');
164081
- let mime;
164082
- if (arr[0].indexOf(':') !== -1) {
164083
- mime = arr[0].match(/:(.*?);/)[1];
164084
- } else {
164085
- mime = 'application/octet-stream'; // 默认MIME类型
164086
- }
164087
- let bstr = atob(arr[1] || arr[0]);
164088
- let n = bstr.length;
164089
- let u8arr = new Uint8Array(n);
164090
- while (n--) {
164091
- u8arr[n] = bstr.charCodeAt(n);
164092
- }
164093
- return new File([u8arr], filename, {type: mime});
164305
+ dataURLtoFile(dataurl, filename) {
164306
+ let arr = dataurl.split(',');
164307
+ let mime;
164308
+ if (arr[0].indexOf(':') !== -1) {
164309
+ mime = arr[0].match(/:(.*?);/)[1];
164310
+ } else {
164311
+ mime = 'application/octet-stream'; // 默认MIME类型
164312
+ }
164313
+ let bstr = atob(arr[1] || arr[0]);
164314
+ let n = bstr.length;
164315
+ let u8arr = new Uint8Array(n);
164316
+ while (n--) {
164317
+ u8arr[n] = bstr.charCodeAt(n);
164094
164318
  }
164319
+ return new File([u8arr], filename, { type: mime });
164320
+ }
164095
164321
 
164096
- uploadToOSS(file, options) {
164097
- return new Promise((resolve, reject) => {
164098
- let formData = new FormData();
164099
- formData.append('file', file);
164100
- packages_utils_ajax.post(options.ossServerContext + options.ossImgPutUrl, formData, { payload : true }).then(response => {
164101
- if (response.data.code === 1) {
164102
- const result = response.data.data;
164103
- if (result.length > 0) {
164104
- resolve(result[0]);
164105
- } else {
164106
- reject(new Error('No fileId returned'));
164107
- }
164108
- } else {
164109
- reject(new Error('Upload failed'));
164110
- }
164111
- }).catch(error =>{
164112
- reject(error);
164113
- });
164322
+ uploadToOSS(file, options) {
164323
+ return new Promise((resolve, reject) => {
164324
+ let formData = new FormData();
164325
+ formData.append('file', file);
164326
+ packages_utils_ajax
164327
+ .post(options.ossServerContext + options.ossImgPutUrl, formData, {
164328
+ payload: true,
164329
+ })
164330
+ .then((response) => {
164331
+ if (response.data.code === 1) {
164332
+ const result = response.data.data;
164333
+ if (result.length > 0) {
164334
+ resolve(result[0]);
164335
+ } else {
164336
+ reject(new Error('No fileId returned'));
164337
+ }
164338
+ } else {
164339
+ reject(new Error('Upload failed'));
164340
+ }
164341
+ })
164342
+ .catch((error) => {
164343
+ reject(error);
164114
164344
  });
164115
- }
164345
+ });
164346
+ }
164116
164347
 
164117
- async getPlatform(options = {}) {
164118
- // 获取初始化信息
164119
- return {
164120
- appId: this.appId,
164121
- platform: 'Wechat'
164122
- };
164123
- }
164348
+ async getPlatform(options = {}) {
164349
+ // 获取初始化信息
164350
+ return {
164351
+ appId: this.appId,
164352
+ platform: 'Wechat',
164353
+ };
164354
+ }
164124
164355
  }
164125
164356
 
164126
164357
  /* harmony default export */ const packages_sdk_WechatAdapter = (packages_WechatAdapter);
@@ -164523,12 +164754,12 @@ class packages_WeComAdapter {
164523
164754
  });
164524
164755
  }
164525
164756
 
164526
- let self = this
164757
+ let self = this;
164527
164758
  function initJsSdk() {
164528
164759
  loadScript('//res.wx.qq.com/open/js/jweixin-1.2.0.js')
164529
164760
  .then((script) => {
164530
164761
  console.log('Script loaded');
164531
- self.init(_options);
164762
+ // self.init(_options);
164532
164763
  })
164533
164764
  .catch((err) => console.error(err));
164534
164765
  }
@@ -164549,9 +164780,26 @@ class packages_WeComAdapter {
164549
164780
  }
164550
164781
  }
164551
164782
 
164783
+ /**
164784
+ * 初始化jssdk
164785
+ * 2025-12-4 16:49:11 修改,增加审计日志回调函数auditLog,在不同阶段会调用该回调函数,调用参数如下
164786
+ * {
164787
+ * seg: 阶段,当前有 beforeConfig、configError、afterConfig、ready
164788
+ * title: 对阶段的文字描述
164789
+ * }
164790
+ * 业务系统有需要对初始化jssdk进行审计的需求,在初始化jssdk的时候,在options中增加auditLog属性,并根据需要记录所需记录日志的阶段或者全部记录
164791
+ * @param {*} options
164792
+ * @returns
164793
+ */
164552
164794
  async init(options) {
164553
164795
  // 在iOS小程序的webview中,currentUrl不能使用动态的,要使用小程序首次打开webview的URL,通过参数传进来
164554
164796
  const currentUrl = encodeURIComponent(window.location.href.split('#')[0]);
164797
+ if (options.auditLog && options.auditLog instanceof Function) {
164798
+ options.auditLog({
164799
+ seg: 'beforeConfig',
164800
+ title: '开始企业微信jssdk认证',
164801
+ });
164802
+ }
164555
164803
  packages_utils_ajax
164556
164804
  .request({
164557
164805
  url:
@@ -164584,12 +164832,24 @@ class packages_WeComAdapter {
164584
164832
  'startRecord',
164585
164833
  'stopRecord',
164586
164834
  'onVoiceRecordEnd',
164587
- 'uploadVoice'
164835
+ 'uploadVoice',
164588
164836
  ], // 必填,传入需要使用的接口名称
164589
164837
  success(res) {
164590
164838
  console.log('ready...');
164839
+ if (options.auditLog && options.auditLog instanceof Function) {
164840
+ options.auditLog({
164841
+ seg: 'afterConfig',
164842
+ title: '完成企业微信jssdk认证',
164843
+ });
164844
+ }
164591
164845
  },
164592
164846
  fail(res) {
164847
+ if (options.auditLog && options.auditLog instanceof Function) {
164848
+ options.auditLog({
164849
+ seg: 'configError',
164850
+ title: '企业微信jssdk认证异常' + res.errMsg,
164851
+ });
164852
+ }
164593
164853
  if (res.errMsg.indexOf('function not exist') > -1) {
164594
164854
  alert('版本过低请升级');
164595
164855
  }
@@ -164597,9 +164857,21 @@ class packages_WeComAdapter {
164597
164857
  });
164598
164858
 
164599
164859
  wx.error(function (res) {
164860
+ if (options.auditLog && options.auditLog instanceof Function) {
164861
+ options.auditLog({
164862
+ seg: 'configError',
164863
+ title: '企业微信jssdk认证异常wxerror',
164864
+ });
164865
+ }
164600
164866
  console.error(res);
164601
164867
  });
164602
164868
  wx.ready(function () {
164869
+ if (options.auditLog && options.auditLog instanceof Function) {
164870
+ options.auditLog({
164871
+ seg: 'ready',
164872
+ title: '完成企业微信jssdk认证,进入ready状态',
164873
+ });
164874
+ }
164603
164875
  console.log('ready.....');
164604
164876
  // config信息验证后会执行ready方法,所有接口调用都必须在config接口获得结果之后,config是一个客户端的异步操作,所以如果需要在页面加载时就调用相关接口,则须把相关接口放在ready函数中调用来确保正确执行。对于用户触发时才调用的接口,则可以直接调用,不需要放在ready函数中。
164605
164877
  });
@@ -164620,9 +164892,24 @@ class packages_WeComAdapter {
164620
164892
  // 如:{"checkResult":{"chooseImage":true},"errMsg":"checkJsApi:ok"}
164621
164893
  },
164622
164894
  });
164895
+ } else {
164896
+ if (options.auditLog && options.auditLog instanceof Function) {
164897
+ options.auditLog({
164898
+ seg: 'configError',
164899
+ title:
164900
+ '企业微信jssdk认证异常请求认证参返回结果异常' +
164901
+ JSON.stringify(resp),
164902
+ });
164903
+ }
164623
164904
  }
164624
164905
  })
164625
164906
  .catch((err) => {
164907
+ if (options.auditLog && options.auditLog instanceof Function) {
164908
+ options.auditLog({
164909
+ seg: 'configError',
164910
+ title: '企业微信jssdk认证异常请求认证参数失败',
164911
+ });
164912
+ }
164626
164913
  console.error(err);
164627
164914
  });
164628
164915
  }
@@ -164640,17 +164927,23 @@ class packages_WeComAdapter {
164640
164927
  this.isRecording = false;
164641
164928
  console.log('录音满1分钟自动停止,开始处理...');
164642
164929
  this._uploadAndSave(res.localId)
164643
- .then(fileInfo => {
164644
- if (options.onAutoStopSuccess && typeof options.onAutoStopSuccess === 'function') {
164930
+ .then((fileInfo) => {
164931
+ if (
164932
+ options.onAutoStopSuccess &&
164933
+ typeof options.onAutoStopSuccess === 'function'
164934
+ ) {
164645
164935
  options.onAutoStopSuccess(fileInfo);
164646
164936
  }
164647
164937
  })
164648
- .catch(error => {
164649
- if (options.onAutoStopError && typeof options.onAutoStopError === 'function') {
164938
+ .catch((error) => {
164939
+ if (
164940
+ options.onAutoStopError &&
164941
+ typeof options.onAutoStopError === 'function'
164942
+ ) {
164650
164943
  options.onAutoStopError(error);
164651
164944
  }
164652
164945
  });
164653
- }
164946
+ },
164654
164947
  });
164655
164948
  wx.startRecord({
164656
164949
  success: () => {
@@ -164661,7 +164954,7 @@ class packages_WeComAdapter {
164661
164954
  fail: (err) => {
164662
164955
  console.error('startRecord failed:', err);
164663
164956
  reject(new Error('开始录音失败'));
164664
- }
164957
+ },
164665
164958
  });
164666
164959
  });
164667
164960
  });
@@ -164683,7 +164976,7 @@ class packages_WeComAdapter {
164683
164976
  this.isRecording = false;
164684
164977
  console.error('stopRecord failed:', err);
164685
164978
  reject(new Error('停止录音失败'));
164686
- }
164979
+ },
164687
164980
  });
164688
164981
  });
164689
164982
  });
@@ -164694,12 +164987,14 @@ class packages_WeComAdapter {
164694
164987
  localId: localId,
164695
164988
  isShowProgressTips: 1,
164696
164989
  success: (uploadRes) => {
164697
- this._saveVoiceToServer(uploadRes.serverId).then(resolve).catch(reject);
164990
+ this._saveVoiceToServer(uploadRes.serverId)
164991
+ .then(resolve)
164992
+ .catch(reject);
164698
164993
  },
164699
164994
  fail: (err) => {
164700
164995
  console.error('wx.uploadVoice failed:', err);
164701
164996
  reject(new Error('上传语音至微信服务器失败'));
164702
- }
164997
+ },
164703
164998
  });
164704
164999
  });
164705
165000
  }
@@ -164709,17 +165004,21 @@ class packages_WeComAdapter {
164709
165004
  }
164710
165005
 
164711
165006
  // 后端接口使用 @RequestParam,对应 'application/x-www-form-urlencoded'
164712
- const params = new URLSearchParams();
164713
- params.append('corpId', this.corpId);
164714
- params.append('agentId', this.agentId);
164715
- params.append('mediaId', serverId);
164716
-
165007
+ // const params = new URLSearchParams();
165008
+ // params.append('corpId', this.corpId);
165009
+ // params.append('agentId', this.agentId);
165010
+ // params.append('mediaId', serverId);
165011
+
164717
165012
  try {
164718
165013
  const response = await packages_utils_ajax({
164719
165014
  method: 'post',
164720
165015
  url: packages_config_config.upmsServerContext + '/manage/ibpWxCpBaseinfo/handleVoice',
164721
- data: params,
164722
- headers: { 'Content-Type': 'application/x-www-form-urlencoded' }
165016
+ data: {
165017
+ corpId: this.corpId,
165018
+ agentId: this.agentId,
165019
+ mediaId: this.serverId,
165020
+ },
165021
+ headers: { 'Content-Type': 'application/x-www-form-urlencoded' },
164723
165022
  });
164724
165023
  if (response.data && response.data.code === 1) {
164725
165024
  console.log('后端处理成功,返回 FileInfoVO:', response.data.data);
@@ -164732,12 +165031,29 @@ class packages_WeComAdapter {
164732
165031
  throw err;
164733
165032
  }
164734
165033
  }
165034
+ /**
165035
+ * 获取定位
165036
+ * 2025-11-28 15:49:23 修改,增加审计日志回调函数auditLog,在不同阶段会调用该回调函数,调用参数如下
165037
+ * {
165038
+ * seg: 阶段,当前有 beforeCheck、checkError、afterCheck、beforeLocation、successLocation、errorLocation1、errorLocation2
165039
+ * title: 对阶段的文字描述
165040
+ * }
165041
+ * 业务系统有需要对定位进行审计的需求,在调用定位的时候,在options中增加auditLog属性,并根据需要记录所需记录日志的阶段或者全部记录
165042
+ * @param {*} options
165043
+ * @returns
165044
+ */
164735
165045
  async getLocation(options) {
164736
165046
  return new Promise((resolve, reject) => {
164737
165047
  wx.ready(async () => {
164738
165048
  // 解决在 URL 变化时,由于 wx.config 和 wx.ready 的异步特性导致的微信接口调用使用旧配置、签名失效或调用失败的问题
164739
165049
  // 新增重试机制检查接口可用性
164740
165050
  let retryInterval;
165051
+ if (options.auditLog && options.auditLog instanceof Function) {
165052
+ options.auditLog({
165053
+ seg: 'beforeCheck',
165054
+ title: '开始检测企业微信jssdk授权状态',
165055
+ });
165056
+ }
164741
165057
  try {
164742
165058
  await new Promise((retryResolve, retryReject) => {
164743
165059
  let retryCount = 0;
@@ -164765,10 +165081,23 @@ class packages_WeComAdapter {
164765
165081
  }, 100); // 每100ms检查一次
164766
165082
  });
164767
165083
  } catch (error) {
165084
+ if (options.auditLog && options.auditLog instanceof Function) {
165085
+ options.auditLog({
165086
+ seg: 'checkError',
165087
+ title: '检测企业微信jssdk授权状态异常并中止定位',
165088
+ });
165089
+ }
164768
165090
  reject(new Error(`接口初始化失败: ${error.message}`));
164769
165091
  return;
164770
165092
  }
164771
165093
 
165094
+ if (options.auditLog && options.auditLog instanceof Function) {
165095
+ options.auditLog({
165096
+ seg: 'afterCheck',
165097
+ title: '检测企业微信jssdk授权状态结束',
165098
+ });
165099
+ }
165100
+
164772
165101
  // 检查 options.type,如果为空或者不含有 'wgs84' 或 'bd09',则设置为 'gcj02'
164773
165102
  let locationType = options.type;
164774
165103
  if (
@@ -164780,6 +165109,12 @@ class packages_WeComAdapter {
164780
165109
 
164781
165110
  const fetchLocation = (type) => {
164782
165111
  return new Promise((resolve, reject) => {
165112
+ if (options.auditLog && options.auditLog instanceof Function) {
165113
+ options.auditLog({
165114
+ seg: 'beforeLocation',
165115
+ title: '企业微信调用jssdk发起定位',
165116
+ });
165117
+ }
164783
165118
  wx.getLocation({
164784
165119
  ...options,
164785
165120
  type,
@@ -164790,7 +165125,25 @@ class packages_WeComAdapter {
164790
165125
  accuracy: location.accuracy || null, // 精确度,如果有的话
164791
165126
  };
164792
165127
 
165128
+ if (options.auditLog && options.auditLog instanceof Function) {
165129
+ options.auditLog({
165130
+ seg: 'successLocation',
165131
+ title:
165132
+ '企业微信调用jssdk定位成功' +
165133
+ JSON.stringify(unifiedLocation),
165134
+ });
165135
+ }
165136
+
164793
165137
  if (!unifiedLocation.latitude || !unifiedLocation.longitude) {
165138
+ if (
165139
+ options.auditLog &&
165140
+ options.auditLog instanceof Function
165141
+ ) {
165142
+ options.auditLog({
165143
+ seg: 'errorLocation1',
165144
+ title: '企业微信调用jssdk定位异常,未取到经纬度',
165145
+ });
165146
+ }
164794
165147
  return reject(new Error('Invalid location data'));
164795
165148
  }
164796
165149
 
@@ -164798,6 +165151,12 @@ class packages_WeComAdapter {
164798
165151
  },
164799
165152
  fail: (err) => {
164800
165153
  console.error('getLocation failed:', err);
165154
+ if (options.auditLog && options.auditLog instanceof Function) {
165155
+ options.auditLog({
165156
+ seg: 'errorLocation2',
165157
+ title: '企业微信调用jssdk定位异常,' + JSON.stringify(err),
165158
+ });
165159
+ }
164801
165160
  reject(err);
164802
165161
  },
164803
165162
  });
@@ -165985,6 +166344,10 @@ class packages_LamboJsBridge {
165985
166344
  return this.platform.initKey(options);
165986
166345
  }
165987
166346
 
166347
+ async init(options = {}) {
166348
+ return this.platform.init(options);
166349
+ }
166350
+
165988
166351
  async startRecording(options = {}) {
165989
166352
  return this.platform.startRecording(options);
165990
166353
  }
@@ -166296,8 +166659,8 @@ var packages_empty_state_component = (0,packages_componentNormalizer["default"])
166296
166659
  ;// ../lambo-design-mobile/packages/empty-state/index.js
166297
166660
 
166298
166661
  /* harmony default export */ const packages_packages_empty_state = (packages_empty_state_0);
166299
- ;// ./node_modules/vue-loader/lib/loaders/templateLoader.js??ruleSet[1].rules[1]!./node_modules/vue-loader/lib/index.js??vue-loader-options!../lambo-design-mobile/packages/list-page/src/list-page.vue?vue&type=template&id=20af5a96&scoped=true
166300
- var packages_list_pagevue_type_template_id_20af5a96_scoped_true_render = function render() {
166662
+ ;// ./node_modules/vue-loader/lib/loaders/templateLoader.js??ruleSet[1].rules[1]!./node_modules/vue-loader/lib/index.js??vue-loader-options!../lambo-design-mobile/packages/list-page/src/list-page.vue?vue&type=template&id=c20fc3be&scoped=true
166663
+ var packages_list_pagevue_type_template_id_c20fc3be_scoped_true_render = function render() {
166301
166664
  var _vm = this,
166302
166665
  _c = _vm._self._c
166303
166666
  return _c(
@@ -166307,157 +166670,142 @@ var packages_list_pagevue_type_template_id_20af5a96_scoped_true_render = functio
166307
166670
  background: `url(${
166308
166671
  _vm.isUseDefaultBackground ? _vm.defaultImgUrl : _vm.backgroundImgUrl
166309
166672
  }) center no-repeat`,
166310
- backgroundSize: "100vw 49.4vw",
166311
166673
  backgroundPosition: "0 -57px",
166674
+ display: "flex",
166675
+ flexDirection: "column",
166676
+ height: `calc(100vh - ${_vm.marginTopWidth})`,
166312
166677
  },
166313
166678
  },
166314
166679
  [
166315
166680
  _vm.searchTitleField && _vm.searchTitleField.formKey
166316
- ? _c("div", [
166317
- _c(
166318
- "div",
166319
- {
166320
- staticClass: "page-header-search",
166321
- style: { marginTop: "-57px" },
166322
- },
166323
- [
166324
- _c(
166325
- "Search",
166326
- {
166327
- attrs: {
166328
- value: _vm.searchForm,
166329
- isShowAddButton: _vm.isShowAddButton,
166330
- searchTitleField: _vm.searchTitleField,
166331
- marginTopWidth: _vm.marginTopWidth,
166332
- showFilter: _vm.showFilter,
166333
- placeholder: _vm.placeholder,
166334
- },
166335
- on: {
166336
- doSearch: _vm.doSearch,
166337
- addClick: _vm.addClick,
166338
- handleCancel: _vm.handleCancel,
166339
- },
166681
+ ? _c(
166682
+ "div",
166683
+ [
166684
+ _c(
166685
+ "Search",
166686
+ {
166687
+ attrs: {
166688
+ value: _vm.searchForm,
166689
+ isShowAddButton: _vm.isShowAddButton,
166690
+ searchTitleField: _vm.searchTitleField,
166691
+ marginTopWidth: _vm.marginTopWidth,
166692
+ showFilter: _vm.showFilter,
166693
+ placeholder: _vm.placeholder,
166340
166694
  },
166341
- [_vm._t("filter")],
166342
- 2
166343
- ),
166344
- ],
166345
- 1
166346
- ),
166347
- _vm._v(" "),
166348
- _vm.itemArr.length > 0 && _vm.listTitle
166349
- ? _c(
166350
- "div",
166351
- { style: { marginTop: "57px", paddingBottom: "9px" } },
166352
- [
166353
- _c("span", { staticClass: "list-title" }, [
166354
- _vm._v(_vm._s(_vm.listTitle)),
166355
- ]),
166356
- ]
166357
- )
166358
- : _c("div", { style: { marginTop: "56px" } }),
166359
- ])
166360
- : _c("div", [
166361
- _vm.itemArr.length > 0 && _vm.listTitle
166362
- ? _c(
166363
- "div",
166364
- { style: { paddingTop: "10px", paddingBottom: "9px" } },
166365
- [
166366
- _c("span", { staticClass: "list-title" }, [
166367
- _vm._v(_vm._s(_vm.listTitle)),
166368
- ]),
166369
- ]
166370
- )
166371
- : _vm._e(),
166372
- ]),
166373
- _vm._v(" "),
166374
- _vm._t("tip"),
166695
+ on: {
166696
+ doSearch: _vm.doSearch,
166697
+ addClick: _vm.addClick,
166698
+ handleCancel: _vm.handleCancel,
166699
+ },
166700
+ },
166701
+ [_vm._t("filter")],
166702
+ 2
166703
+ ),
166704
+ _vm._v(" "),
166705
+ _vm._t("searchDisplay"),
166706
+ ],
166707
+ 2
166708
+ )
166709
+ : _vm._e(),
166375
166710
  _vm._v(" "),
166376
166711
  _c(
166377
- "van-pull-refresh",
166378
- {
166379
- class: { "pull-refresh": _vm.refreshHeight != "" },
166380
- style: {
166381
- height: _vm.safeAreaBottom
166382
- ? `calc(100vh - ${_vm.refreshHeight}px - 12px)`
166383
- : `calc(100vh - ${_vm.refreshHeight}px)`,
166384
- },
166385
- attrs: { "success-text": _vm.successText },
166386
- on: { refresh: _vm.onRefresh },
166387
- model: {
166388
- value: _vm.refreshing,
166389
- callback: function ($$v) {
166390
- _vm.refreshing = $$v
166391
- },
166392
- expression: "refreshing",
166393
- },
166394
- },
166712
+ "div",
166713
+ { staticClass: "page-data-list" },
166395
166714
  [
166715
+ _vm.itemArr.length > 0 && _vm.listTitle
166716
+ ? _c("div", { staticClass: "list-title" }, [
166717
+ _vm._v("\n " + _vm._s(_vm.listTitle) + "\n "),
166718
+ ])
166719
+ : _vm._e(),
166720
+ _vm._v(" "),
166721
+ _vm._t("tip"),
166722
+ _vm._v(" "),
166396
166723
  _c(
166397
- "van-list",
166724
+ "van-pull-refresh",
166398
166725
  {
166399
- attrs: {
166400
- finished: _vm.finished,
166401
- "finished-text": _vm.finishedText,
166402
- "immediate-check": _vm.immediate,
166726
+ class: { "pull-refresh": _vm.refreshHeight != "" },
166727
+ style: {
166728
+ height: _vm.safeAreaBottom
166729
+ ? `calc(100vh - ${_vm.refreshHeight}px - 12px)`
166730
+ : `calc(100vh - ${_vm.refreshHeight}px)`,
166403
166731
  },
166404
- on: { load: _vm.onLoad },
166732
+ attrs: { "success-text": _vm.successText },
166733
+ on: { refresh: _vm.onRefresh },
166405
166734
  model: {
166406
- value: _vm.loading,
166735
+ value: _vm.refreshing,
166407
166736
  callback: function ($$v) {
166408
- _vm.loading = $$v
166737
+ _vm.refreshing = $$v
166409
166738
  },
166410
- expression: "loading",
166739
+ expression: "refreshing",
166411
166740
  },
166412
166741
  },
166413
166742
  [
166414
- _vm.useBatch
166415
- ? _c(
166416
- "van-checkbox-group",
166417
- {
166418
- attrs: { max: _vm.maxCheckNum },
166419
- model: {
166420
- value: _vm.itemCheck,
166421
- callback: function ($$v) {
166422
- _vm.itemCheck = $$v
166423
- },
166424
- expression: "itemCheck",
166425
- },
166743
+ _c(
166744
+ "van-list",
166745
+ {
166746
+ attrs: {
166747
+ finished: _vm.finished,
166748
+ "finished-text": _vm.finishedText,
166749
+ "immediate-check": _vm.immediate,
166750
+ },
166751
+ on: { load: _vm.onLoad },
166752
+ model: {
166753
+ value: _vm.loading,
166754
+ callback: function ($$v) {
166755
+ _vm.loading = $$v
166426
166756
  },
166427
- [
166428
- _vm._l(_vm.itemArr, function (item, index) {
166429
- return [
166430
- _vm._t("row", null, {
166431
- item: item,
166432
- isBatching: _vm.isBatching,
166433
- reload: _vm.reload,
166434
- checkboxName: "check_" + index,
166757
+ expression: "loading",
166758
+ },
166759
+ },
166760
+ [
166761
+ _vm.useBatch
166762
+ ? _c(
166763
+ "van-checkbox-group",
166764
+ {
166765
+ attrs: { max: _vm.maxCheckNum },
166766
+ model: {
166767
+ value: _vm.itemCheck,
166768
+ callback: function ($$v) {
166769
+ _vm.itemCheck = $$v
166770
+ },
166771
+ expression: "itemCheck",
166772
+ },
166773
+ },
166774
+ [
166775
+ _vm._l(_vm.itemArr, function (item, index) {
166776
+ return [
166777
+ _vm._t("row", null, {
166778
+ item: item,
166779
+ isBatching: _vm.isBatching,
166780
+ reload: _vm.reload,
166781
+ checkboxName: "check_" + index,
166782
+ }),
166783
+ ]
166435
166784
  }),
166436
- ]
166785
+ ],
166786
+ 2
166787
+ )
166788
+ : _vm._l(_vm.itemArr, function (item) {
166789
+ return [_vm._t("row", null, { item: item })]
166437
166790
  }),
166438
- _vm._v(" "),
166439
- _c("div", { staticStyle: { height: "30px" } }),
166440
- ],
166441
- 2
166442
- )
166443
- : _vm._l(_vm.itemArr, function (item) {
166444
- return [_vm._t("row", null, { item: item })]
166445
- }),
166791
+ ],
166792
+ 2
166793
+ ),
166446
166794
  ],
166447
- 2
166795
+ 1
166448
166796
  ),
166797
+ _vm._v(" "),
166798
+ _vm.showDefault
166799
+ ? _c("div", { staticClass: "defaultShow" }, [
166800
+ _c("div", { staticClass: "defaultImg" }),
166801
+ _vm._v(" "),
166802
+ _c("span", { staticClass: "defaultTip" }, [_vm._v("暂无数据")]),
166803
+ ])
166804
+ : _vm._e(),
166449
166805
  ],
166450
- 1
166806
+ 2
166451
166807
  ),
166452
166808
  _vm._v(" "),
166453
- _vm.showDefault
166454
- ? _c("div", { staticClass: "defaultShow" }, [
166455
- _c("div", { staticClass: "defaultImg" }),
166456
- _vm._v(" "),
166457
- _c("span", { staticClass: "defaultTip" }, [_vm._v("暂无数据")]),
166458
- ])
166459
- : _vm._e(),
166460
- _vm._v(" "),
166461
166809
  _vm.useBatch && _vm.itemCheck.length > 0
166462
166810
  ? _c(
166463
166811
  "div",
@@ -166540,349 +166888,345 @@ var packages_list_pagevue_type_template_id_20af5a96_scoped_true_render = functio
166540
166888
  1
166541
166889
  )
166542
166890
  : _vm._e(),
166543
- ],
166544
- 2
166891
+ ]
166545
166892
  )
166546
166893
  }
166547
- var packages_list_pagevue_type_template_id_20af5a96_scoped_true_staticRenderFns = []
166548
- packages_list_pagevue_type_template_id_20af5a96_scoped_true_render._withStripped = true
166894
+ var packages_list_pagevue_type_template_id_c20fc3be_scoped_true_staticRenderFns = []
166895
+ packages_list_pagevue_type_template_id_c20fc3be_scoped_true_render._withStripped = true
166549
166896
 
166550
166897
 
166551
- ;// ../lambo-design-mobile/packages/list-page/src/list-page.vue?vue&type=template&id=20af5a96&scoped=true
166898
+ ;// ../lambo-design-mobile/packages/list-page/src/list-page.vue?vue&type=template&id=c20fc3be&scoped=true
166552
166899
 
166553
166900
  ;// ./node_modules/vue-loader/lib/index.js??vue-loader-options!../lambo-design-mobile/packages/list-page/src/list-page.vue?vue&type=script&lang=js
166554
166901
 
166555
-
166556
-
166557
-
166902
+
166903
+
166904
+
166558
166905
 
166559
- /* harmony default export */ const packages_list_pagevue_type_script_lang_js = ({
166560
- name: 'lambo-list-page',
166561
- components: {
166562
- Search: packages_packages_search["default"]
166563
- },
166564
- props: {
166565
- isShowAddButton:{
166566
- type: Boolean,
166567
- default: false
166568
- },
166569
- isNOSelectAll:{
166570
- type: Boolean,
166571
- default: false
166572
- },
166573
- //边距高低
166574
- marginTopWidth:{
166575
- type: String,
166576
- default: '57px'
166577
- },
166578
- searchTitleField: {
166579
- type: Object,
166580
- default: () => {}
166581
- },
166582
- isBatchingBox: {
166583
- type: Boolean,
166584
- default: false
166585
- },
166586
- autoSearch: {
166587
- type: Boolean,
166588
- default: true
166589
- },
166590
- resultMsgKey:{
166591
- type: String,
166592
- default: 'message'
166593
- },
166594
- resultCodeKey:{
166595
- type: String,
166596
- default: 'code'
166597
- },
166598
- resultSuccessCode:{
166599
- type: [String,Number],
166600
- default: 1
166601
- },
166602
- resultDataKey:{
166603
- type: String,
166604
- default: 'data.rows'
166605
- },
166606
- maxCheckNum: {
166607
- type: Number,
166608
- default: 999999
166609
- },
166610
- batchColWidth: {
166611
- type: Number,
166612
- default: 3
166613
- },
166614
- listTitle: {
166615
- type: String
166616
- },
166617
- useBatch:{
166618
- type: Boolean,
166619
- default: false
166620
- },
166621
- placeholder: {
166622
- type: String,
166623
- default: '请输入搜索关键词'
166624
- },
166625
- showFilter:{
166626
- type: Boolean,
166627
- default: false
166628
- },
166629
- searchForm: {
166630
- type: Object,
166631
- },
166632
- // 刷新成功提示文案
166633
- successText: {
166634
- type: String,
166635
- default: '刷新成功'
166636
- },
166637
- // 是否在初始化时立即执行滚动位置检查
166638
- immediate: {
166639
- type: Boolean,
166640
- default: false
166641
- },
166642
- // 接口地址
166643
- url: {
166644
- type: String,
166645
- default: ''
166646
- },
166647
- // 分页请求数据条数
166648
- rowNum: {
166649
- type: [Number, String],
166650
- default: 10
166651
- },
166652
- // 请求参数
166653
- params: {
166654
- type: Object,
166655
- default: () => {}
166656
- },
166657
- // 可下拉刷新高度,谨慎使用,高度误差偏大,会导致下拉出现问题;
166658
- refreshHeight: {
166659
- type: [String,Number],
166660
- default: ''
166661
- },
166662
- // 是否开启底部安全距离
166663
- safeAreaBottom: {
166664
- type: Boolean,
166665
- default: false
166666
- },
166667
- backgroundImgUrl: {
166668
- type: String,
166669
- default: ''
166670
- },
166671
- isUseDefaultBackground: {
166672
- type: Boolean,
166673
- default: true
166674
- },
166675
- // 分页是否禁用
166676
- pageDisable: {
166677
- type: Boolean,
166678
- default: false
166679
- },
166680
- },
166681
- data() {
166682
- return {
166683
- showDefault:false,
166684
- isBatching: this.isBatchingBox,
166685
- refreshing: false,
166686
- loading: false,
166687
- finished: false,
166688
- curIdx: 0,
166689
- finishedText: '',
166690
- searchVal: null,
166691
- searchFormResult: null,
166692
- itemArr: [],
166693
- itemCheck:[],
166694
- itemCheckList:[],
166695
- itemCheckAll:false,
166696
- defaultImgUrl: __webpack_require__(99703)
166697
- // buttonStyleHeight:{
166698
- // bottom: "calc(100vh - 300px - 54px - " + this.marginTopWidth + " - 60px)"
166699
- // }
166700
- }
166701
- },
166702
- watch: {
166703
- params() {
166704
- this.refresh()
166705
- },
166706
- url() {
166707
- this.refresh()
166708
- },
166709
- itemCheckAll(){
166710
- if(this.itemArr&&this.itemArr.length>0){
166711
- if(this.itemCheckAll){
166712
- let itemCheck = [];
166713
- for(let i =0;i<this.itemArr.length&&i<this.maxCheckNum;i++){
166714
- itemCheck.push('check_'+i);
166715
- }
166716
- this.itemCheck = itemCheck;
166717
- }else{
166718
- this.itemCheck = [];
166719
- }
166720
- }
166721
- },
166722
- itemCheck(){
166723
- let itemCheck = this.itemCheck;
166724
- let itemArr = this.itemArr;
166725
- let itemCheckList = [];
166726
- try{
166727
- for(let i=0;i<itemCheck.length;i++){
166728
- let checkIndexId = itemCheck[i];
166729
- if(checkIndexId){
166730
- let cks = checkIndexId.split('_');
166731
- if(cks.length>1){
166732
- let index = cks[1];
166733
- let indexInt = parseInt(index);
166734
- if(itemArr[indexInt]){
166735
- itemCheckList.push(itemArr[indexInt])
166736
- }
166737
- }
166906
+ /* harmony default export */ const packages_list_pagevue_type_script_lang_js = ({
166907
+ name: 'lambo-list-page',
166908
+ components: {
166909
+ Search: packages_packages_search["default"]
166910
+ },
166911
+ props: {
166912
+ isShowAddButton:{
166913
+ type: Boolean,
166914
+ default: false
166915
+ },
166916
+ isNOSelectAll:{
166917
+ type: Boolean,
166918
+ default: false
166919
+ },
166920
+ //边距高低
166921
+ marginTopWidth:{
166922
+ type: String,
166923
+ default: '57px'
166924
+ },
166925
+ searchTitleField: {
166926
+ type: Object,
166927
+ default: () => {}
166928
+ },
166929
+ isBatchingBox: {
166930
+ type: Boolean,
166931
+ default: false
166932
+ },
166933
+ autoSearch: {
166934
+ type: Boolean,
166935
+ default: true
166936
+ },
166937
+ resultMsgKey:{
166938
+ type: String,
166939
+ default: 'message'
166940
+ },
166941
+ resultCodeKey:{
166942
+ type: String,
166943
+ default: 'code'
166944
+ },
166945
+ resultSuccessCode:{
166946
+ type: [String,Number],
166947
+ default: 1
166948
+ },
166949
+ resultDataKey:{
166950
+ type: String,
166951
+ default: 'data.rows'
166952
+ },
166953
+ maxCheckNum: {
166954
+ type: Number,
166955
+ default: 999999
166956
+ },
166957
+ batchColWidth: {
166958
+ type: Number,
166959
+ default: 3
166960
+ },
166961
+ listTitle: {
166962
+ type: String
166963
+ },
166964
+ useBatch:{
166965
+ type: Boolean,
166966
+ default: false
166967
+ },
166968
+ placeholder: {
166969
+ type: String,
166970
+ default: '请输入搜索关键词'
166971
+ },
166972
+ showFilter:{
166973
+ type: Boolean,
166974
+ default: false
166975
+ },
166976
+ searchForm: {
166977
+ type: Object,
166978
+ },
166979
+ // 刷新成功提示文案
166980
+ successText: {
166981
+ type: String,
166982
+ default: '刷新成功'
166983
+ },
166984
+ // 是否在初始化时立即执行滚动位置检查
166985
+ immediate: {
166986
+ type: Boolean,
166987
+ default: false
166988
+ },
166989
+ // 接口地址
166990
+ url: {
166991
+ type: String,
166992
+ default: ''
166993
+ },
166994
+ // 分页请求数据条数
166995
+ rowNum: {
166996
+ type: [Number, String],
166997
+ default: 10
166998
+ },
166999
+ // 请求参数
167000
+ params: {
167001
+ type: Object,
167002
+ default: () => {}
167003
+ },
167004
+ // 可下拉刷新高度,谨慎使用,高度误差偏大,会导致下拉出现问题;
167005
+ refreshHeight: {
167006
+ type: [String,Number],
167007
+ default: ''
167008
+ },
167009
+ // 是否开启底部安全距离
167010
+ safeAreaBottom: {
167011
+ type: Boolean,
167012
+ default: false
167013
+ },
167014
+ backgroundImgUrl: {
167015
+ type: String,
167016
+ default: ''
167017
+ },
167018
+ isUseDefaultBackground: {
167019
+ type: Boolean,
167020
+ default: true
167021
+ },
167022
+ // 分页是否禁用
167023
+ pageDisable: {
167024
+ type: Boolean,
167025
+ default: false
167026
+ },
167027
+ },
167028
+ data() {
167029
+ return {
167030
+ showDefault:false,
167031
+ isBatching: this.isBatchingBox,
167032
+ refreshing: false,
167033
+ loading: false,
167034
+ finished: false,
167035
+ curIdx: 0,
167036
+ finishedText: '',
167037
+ searchVal: null,
167038
+ searchFormResult: null,
167039
+ itemArr: [],
167040
+ itemCheck:[],
167041
+ itemCheckList:[],
167042
+ itemCheckAll:false,
167043
+ defaultImgUrl: __webpack_require__(99703)
167044
+ }
167045
+ },
167046
+ watch: {
167047
+ params() {
167048
+ this.refresh()
167049
+ },
167050
+ url() {
167051
+ this.refresh()
167052
+ },
167053
+ itemCheckAll(){
167054
+ if(this.itemArr&&this.itemArr.length>0){
167055
+ if(this.itemCheckAll){
167056
+ let itemCheck = [];
167057
+ for(let i =0;i<this.itemArr.length&&i<this.maxCheckNum;i++){
167058
+ itemCheck.push('check_'+i);
167059
+ }
167060
+ this.itemCheck = itemCheck;
167061
+ }else{
167062
+ this.itemCheck = [];
167063
+ }
167064
+ }
167065
+ },
167066
+ itemCheck(){
167067
+ let itemCheck = this.itemCheck;
167068
+ let itemArr = this.itemArr;
167069
+ let itemCheckList = [];
167070
+ try{
167071
+ for(let i=0;i<itemCheck.length;i++){
167072
+ let checkIndexId = itemCheck[i];
167073
+ if(checkIndexId){
167074
+ let cks = checkIndexId.split('_');
167075
+ if(cks.length>1){
167076
+ let index = cks[1];
167077
+ let indexInt = parseInt(index);
167078
+ if(itemArr[indexInt]){
167079
+ itemCheckList.push(itemArr[indexInt])
166738
167080
  }
166739
167081
  }
166740
- }catch(e){
166741
- console.log(e)
166742
167082
  }
166743
- this.itemCheckList = itemCheckList;
166744
167083
  }
166745
- },
166746
- mounted(){
166747
- if(this.autoSearch){
166748
- this.onRefresh();
166749
- }
166750
- },
166751
- activated() {
166752
- if(this.autoSearch){
166753
- this.onRefresh();
166754
- }
166755
- },
166756
- methods: {
166757
- addClick(){
166758
- this.$emit('addClick');
166759
- },
166760
- getNodeData(json, path) {
166761
- const parts = path.split('.');
166762
- let current = json;
167084
+ }catch(e){
167085
+ console.log(e)
167086
+ }
167087
+ this.itemCheckList = itemCheckList;
167088
+ }
167089
+ },
167090
+ mounted(){
167091
+ if(this.autoSearch){
167092
+ this.onRefresh();
167093
+ }
167094
+ },
167095
+ activated() {
167096
+ if(this.autoSearch){
167097
+ this.onRefresh();
167098
+ }
167099
+ },
167100
+ methods: {
167101
+ addClick(){
167102
+ this.$emit('addClick');
167103
+ },
167104
+ getNodeData(json, path) {
167105
+ const parts = path.split('.');
167106
+ let current = json;
166763
167107
 
166764
- for (let i = 0; i < parts.length; i++) {
166765
- if (current[parts[i]] === undefined) {
166766
- return undefined; // 节点不存在
166767
- }
166768
- current = current[parts[i]];
166769
- }
167108
+ for (let i = 0; i < parts.length; i++) {
167109
+ if (current[parts[i]] === undefined) {
167110
+ return undefined; // 节点不存在
167111
+ }
167112
+ current = current[parts[i]];
167113
+ }
166770
167114
 
166771
- return current;
166772
- },
166773
- reload(){
166774
- this.isBatching = false;
166775
- this.itemCheck = [];
166776
- this.onRefresh();
166777
- },
166778
- reloadBox(){
166779
- // this.isBatching = false;
166780
- this.itemCheck = [];
166781
- this.itemCheckList = [];
166782
- this.itemCheckAll = false
166783
- // this.onRefresh();
166784
- },
166785
- clickBatch(){
166786
- this.isBatching = !this.isBatching;
166787
- },
166788
- handleCancel(){
166789
- this.$emit('formReset')
166790
- },
166791
- doSearch(searchVal, searchForm) {
166792
- if (this.loading) return
166793
- this.curIdx = 0;
166794
- this.finished = false;
166795
- this.loading = true;
166796
- this.itemArr = [];
166797
- this.searchVal = searchVal;
166798
- this.searchFormResult = searchForm;
166799
- this.$set(searchForm, this.searchTitleField.formKey, searchVal)
166800
- this.onLoad();
166801
- },
166802
- onRefresh() {
166803
- if (this.loading) return
166804
- this.curIdx = 0;
166805
- this.finished = false;
166806
- this.loading = true;
166807
- this.itemArr = [];
166808
- this.onLoad();
166809
- },
166810
- refresh() {// 强制刷新
166811
- this.isBatching = false;
166812
- this.itemCheck = [];
166813
- this.curIdx = 0;
166814
- this.finished = false;
166815
- this.loading = true;
166816
- this.itemArr = [];
166817
- this.onLoad(true);
166818
- },
166819
- onLoad(force) {
166820
- if (this.url) {
166821
- let urlParams = {};
166822
- if(this.params && !this.searchFormResult){
166823
- urlParams = Object.assign(urlParams,this.params);
166824
- }
166825
- if(this.searchFormResult){
166826
- urlParams = Object.assign(urlParams,this.searchFormResult);
167115
+ return current;
167116
+ },
167117
+ reload(){
167118
+ this.isBatching = false;
167119
+ this.itemCheck = [];
167120
+ this.onRefresh();
167121
+ },
167122
+ reloadBox(){
167123
+ // this.isBatching = false;
167124
+ this.itemCheck = [];
167125
+ this.itemCheckList = [];
167126
+ this.itemCheckAll = false
167127
+ // this.onRefresh();
167128
+ },
167129
+ clickBatch(){
167130
+ this.isBatching = !this.isBatching;
167131
+ },
167132
+ handleCancel(){
167133
+ this.$emit('formReset')
167134
+ },
167135
+ doSearch(searchVal, searchForm) {
167136
+ if (this.loading) return
167137
+ this.curIdx = 0;
167138
+ this.finished = false;
167139
+ this.loading = true;
167140
+ this.itemArr = [];
167141
+ this.searchVal = searchVal;
167142
+ this.searchFormResult = searchForm;
167143
+ this.$set(searchForm, this.searchTitleField.formKey, searchVal)
167144
+ this.onLoad();
167145
+ },
167146
+ onRefresh() {
167147
+ if (this.loading) return
167148
+ this.curIdx = 0;
167149
+ this.finished = false;
167150
+ this.loading = true;
167151
+ this.itemArr = [];
167152
+ this.onLoad();
167153
+ },
167154
+ refresh() {// 强制刷新
167155
+ this.isBatching = false;
167156
+ this.itemCheck = [];
167157
+ this.curIdx = 0;
167158
+ this.finished = false;
167159
+ this.loading = true;
167160
+ this.itemArr = [];
167161
+ this.onLoad(true);
167162
+ },
167163
+ onLoad(force) {
167164
+ if (this.url) {
167165
+ let urlParams = {};
167166
+ if(this.params && !this.searchFormResult){
167167
+ urlParams = Object.assign(urlParams,this.params);
167168
+ }
167169
+ if(this.searchFormResult){
167170
+ urlParams = Object.assign(urlParams,this.searchFormResult);
167171
+ }
167172
+ urlParams.offset = this.curIdx;
167173
+ if(!this.pageDisable){
167174
+ urlParams.limit = this.rowNum;
167175
+ }
167176
+ urlParams.searchVal = this.searchVal;
167177
+ packages_utils_ajax.get(this.url, {
167178
+ params: urlParams
167179
+ }).then(res => {
167180
+ packages_src_Toast.clear();
167181
+ if (res.data[this.resultCodeKey] === this.resultSuccessCode) {
167182
+ let data = this.getNodeData(res.data,this.resultDataKey);
167183
+ //let data = []
167184
+ // 避免与没有数据提示冲突
167185
+ if (data.length == 0 && urlParams.offset == 0) {
167186
+ this.finishedText = '';
167187
+ this.showDefault = true
167188
+ } else {
167189
+ this.finishedText = this.pageDisable ? '' :'没有更多了';
167190
+ this.showDefault = false
166827
167191
  }
166828
- urlParams.offset = this.curIdx;
166829
- if(!this.pageDisable){
166830
- urlParams.limit = this.rowNum;
167192
+ this.loading = false;
167193
+ if(!force){
167194
+ this.itemArr = this.itemArr.concat(data);
167195
+ }else{
167196
+ this.itemArr = data;
166831
167197
  }
166832
- urlParams.searchVal = this.searchVal;
166833
- packages_utils_ajax.get(this.url, {
166834
- params: urlParams
166835
- }).then(res => {
166836
- packages_src_Toast.clear();
166837
- if (res.data[this.resultCodeKey] === this.resultSuccessCode) {
166838
- let data = this.getNodeData(res.data,this.resultDataKey);
166839
- //let data = []
166840
- // 避免与没有数据提示冲突
166841
- if (data.length == 0 && urlParams.offset == 0) {
166842
- this.finishedText = '';
166843
- this.showDefault = true
166844
- } else {
166845
- this.finishedText = this.pageDisable ? '' :'没有更多了';
166846
- this.showDefault = false
166847
- }
166848
- this.loading = false;
166849
- if(!force){
166850
- this.itemArr = this.itemArr.concat(data);
166851
- }else{
166852
- this.itemArr = data;
166853
- }
166854
- // 开启分页时判断数据是否全部加载
166855
- if(this.pageDisable){
166856
- this.finished = true;
166857
- } else {
166858
- if (data['length'] < parseInt(this.rowNum)) {
166859
- this.finished = true;
166860
- } else {
166861
- this.finished = false;
166862
- this.curIdx += parseInt(this.rowNum);
166863
- }
166864
- }
167198
+ // 开启分页时判断数据是否全部加载
167199
+ if(this.pageDisable){
167200
+ this.finished = true;
167201
+ } else {
167202
+ if (data['length'] < parseInt(this.rowNum)) {
167203
+ this.finished = true;
166865
167204
  } else {
166866
- this.loading = false;
166867
- packages_src_Toast.fail(res.data[this.resultMsgKey]);
167205
+ this.finished = false;
167206
+ this.curIdx += parseInt(this.rowNum);
166868
167207
  }
166869
- this.refreshing = false;
166870
- }).catch(e => {
166871
- packages_src_Toast.clear();
166872
- this.refreshing = false;
166873
- console.log(e)
166874
- packages_src_Toast.fail('网络异常,请稍后重试或联系系统管理员')
166875
- });
166876
- }
166877
- }
167208
+ }
167209
+ } else {
167210
+ this.loading = false;
167211
+ packages_src_Toast.fail(res.data[this.resultMsgKey]);
167212
+ }
167213
+ this.refreshing = false;
167214
+ }).catch(e => {
167215
+ packages_src_Toast.clear();
167216
+ this.refreshing = false;
167217
+ console.log(e)
167218
+ packages_src_Toast.fail('网络异常,请稍后重试或联系系统管理员')
167219
+ });
166878
167220
  }
166879
- });
166880
-
167221
+ }
167222
+ }
167223
+ });
167224
+
166881
167225
  ;// ../lambo-design-mobile/packages/list-page/src/list-page.vue?vue&type=script&lang=js
166882
167226
  /* harmony default export */ const packages_src_list_pagevue_type_script_lang_js = (packages_list_pagevue_type_script_lang_js);
166883
- // EXTERNAL MODULE: ./node_modules/vue-style-loader/index.js!./node_modules/mini-css-extract-plugin/dist/loader.js??clonedRuleSet-3.use[1]!./node_modules/css-loader/dist/cjs.js??clonedRuleSet-3.use[2]!./node_modules/vue-loader/lib/loaders/stylePostLoader.js!./node_modules/less-loader/dist/cjs.js??clonedRuleSet-3.use[3]!./node_modules/vue-loader/lib/index.js??vue-loader-options!../lambo-design-mobile/packages/list-page/src/list-page.vue?vue&type=style&index=0&id=20af5a96&prod&scoped=true&lang=less
166884
- var packages_list_pagevue_type_style_index_0_id_20af5a96_prod_scoped_true_lang_less = __webpack_require__(35023);
166885
- ;// ../lambo-design-mobile/packages/list-page/src/list-page.vue?vue&type=style&index=0&id=20af5a96&prod&scoped=true&lang=less
167227
+ // EXTERNAL MODULE: ./node_modules/vue-style-loader/index.js!./node_modules/mini-css-extract-plugin/dist/loader.js??clonedRuleSet-3.use[1]!./node_modules/css-loader/dist/cjs.js??clonedRuleSet-3.use[2]!./node_modules/vue-loader/lib/loaders/stylePostLoader.js!./node_modules/less-loader/dist/cjs.js??clonedRuleSet-3.use[3]!./node_modules/vue-loader/lib/index.js??vue-loader-options!../lambo-design-mobile/packages/list-page/src/list-page.vue?vue&type=style&index=0&id=c20fc3be&prod&scoped=true&lang=less
167228
+ var packages_list_pagevue_type_style_index_0_id_c20fc3be_prod_scoped_true_lang_less = __webpack_require__(57831);
167229
+ ;// ../lambo-design-mobile/packages/list-page/src/list-page.vue?vue&type=style&index=0&id=c20fc3be&prod&scoped=true&lang=less
166886
167230
 
166887
167231
  ;// ../lambo-design-mobile/packages/list-page/src/list-page.vue
166888
167232
 
@@ -166895,11 +167239,11 @@ var packages_list_pagevue_type_style_index_0_id_20af5a96_prod_scoped_true_lang_l
166895
167239
 
166896
167240
  var packages_list_page_component = (0,packages_componentNormalizer["default"])(
166897
167241
  packages_src_list_pagevue_type_script_lang_js,
166898
- packages_list_pagevue_type_template_id_20af5a96_scoped_true_render,
166899
- packages_list_pagevue_type_template_id_20af5a96_scoped_true_staticRenderFns,
167242
+ packages_list_pagevue_type_template_id_c20fc3be_scoped_true_render,
167243
+ packages_list_pagevue_type_template_id_c20fc3be_scoped_true_staticRenderFns,
166900
167244
  false,
166901
167245
  null,
166902
- "20af5a96",
167246
+ "c20fc3be",
166903
167247
  null
166904
167248
 
166905
167249
  )
@@ -167890,8 +168234,8 @@ var packages_dynamic_form_component = (0,packages_componentNormalizer["default"]
167890
168234
 
167891
168235
  /* harmony default export */ const packages_packages_dynamic_form = (packages_dynamic_form_0);
167892
168236
 
167893
- ;// ./node_modules/vue-loader/lib/loaders/templateLoader.js??ruleSet[1].rules[1]!./node_modules/vue-loader/lib/index.js??vue-loader-options!../lambo-design-mobile/packages/dynamic-load-list/src/dynamic-load-list.vue?vue&type=template&id=2ff67df8
167894
- var packages_dynamic_load_listvue_type_template_id_2ff67df8_render = function render() {
168237
+ ;// ./node_modules/vue-loader/lib/loaders/templateLoader.js??ruleSet[1].rules[1]!./node_modules/vue-loader/lib/index.js??vue-loader-options!../lambo-design-mobile/packages/dynamic-load-list/src/dynamic-load-list.vue?vue&type=template&id=cf5e761e&scoped=true
168238
+ var packages_dynamic_load_listvue_type_template_id_cf5e761e_scoped_true_render = function render() {
167895
168239
  var _vm = this,
167896
168240
  _c = _vm._self._c
167897
168241
  return _vm.dataUrl
@@ -167939,6 +168283,34 @@ var packages_dynamic_load_listvue_type_template_id_2ff67df8_render = function re
167939
168283
  },
167940
168284
  proxy: true,
167941
168285
  },
168286
+ {
168287
+ key: "searchDisplay",
168288
+ fn: function () {
168289
+ return [
168290
+ _vm.filterFormFields.length > 0
168291
+ ? _c(
168292
+ "div",
168293
+ { staticClass: "round-selector" },
168294
+ _vm._l(_vm.filterFormFields, function (field) {
168295
+ return _c(
168296
+ "div",
168297
+ { key: field.formKey, staticClass: "round-item" },
168298
+ [
168299
+ _vm._v(
168300
+ "\n " +
168301
+ _vm._s(_vm.getFieldDisplayValue(field)) +
168302
+ "\n "
168303
+ ),
168304
+ ]
168305
+ )
168306
+ }),
168307
+ 0
168308
+ )
168309
+ : _vm._e(),
168310
+ ]
168311
+ },
168312
+ proxy: true,
168313
+ },
167942
168314
  {
167943
168315
  key: "tip",
167944
168316
  fn: function () {
@@ -168019,13 +168391,6 @@ var packages_dynamic_load_listvue_type_template_id_2ff67df8_render = function re
168019
168391
  null,
168020
168392
  true
168021
168393
  ),
168022
- model: {
168023
- value: _vm.showPopover,
168024
- callback: function ($$v) {
168025
- _vm.showPopover = $$v
168026
- },
168027
- expression: "showPopover",
168028
- },
168029
168394
  })
168030
168395
  : _vm._e(),
168031
168396
  ]
@@ -168066,11 +168431,11 @@ var packages_dynamic_load_listvue_type_template_id_2ff67df8_render = function re
168066
168431
  })
168067
168432
  : _vm._e()
168068
168433
  }
168069
- var packages_dynamic_load_listvue_type_template_id_2ff67df8_staticRenderFns = []
168070
- packages_dynamic_load_listvue_type_template_id_2ff67df8_render._withStripped = true
168434
+ var packages_dynamic_load_listvue_type_template_id_cf5e761e_scoped_true_staticRenderFns = []
168435
+ packages_dynamic_load_listvue_type_template_id_cf5e761e_scoped_true_render._withStripped = true
168071
168436
 
168072
168437
 
168073
- ;// ../lambo-design-mobile/packages/dynamic-load-list/src/dynamic-load-list.vue?vue&type=template&id=2ff67df8
168438
+ ;// ../lambo-design-mobile/packages/dynamic-load-list/src/dynamic-load-list.vue?vue&type=template&id=cf5e761e&scoped=true
168074
168439
 
168075
168440
  ;// ./node_modules/vue-loader/lib/index.js??vue-loader-options!../lambo-design-mobile/packages/dynamic-load-list/src/dynamic-load-list.vue?vue&type=script&lang=js
168076
168441
 
@@ -168083,6 +168448,8 @@ packages_dynamic_load_listvue_type_template_id_2ff67df8_render._withStripped = t
168083
168448
 
168084
168449
 
168085
168450
 
168451
+
168452
+
168086
168453
  /* harmony default export */ const packages_dynamic_load_listvue_type_script_lang_js = ({
168087
168454
  name: "dynamic-load-list",
168088
168455
  components: {
@@ -168095,8 +168462,9 @@ packages_dynamic_load_listvue_type_template_id_2ff67df8_render._withStripped = t
168095
168462
  },
168096
168463
  data() {
168097
168464
  return {
168465
+ serviceEnumData:{},
168466
+ enumData: {},
168098
168467
  form: {},
168099
- showPopover: false,
168100
168468
  moreButtonList: [],
168101
168469
  rowKey:'',
168102
168470
  rowName:'',
@@ -168163,6 +168531,13 @@ packages_dynamic_load_listvue_type_template_id_2ff67df8_render._withStripped = t
168163
168531
  customValidates: Object
168164
168532
  },
168165
168533
  computed: {
168534
+ // 过滤出需要显示的表单字段
168535
+ filterFormFields() {
168536
+ return this.formFields.filter(field => {
168537
+ const { formKey } = field;
168538
+ return formKey && this.form[formKey];
168539
+ });
168540
+ },
168166
168541
  queryUrl:function (){
168167
168542
  let url = this.dataUrl;
168168
168543
  if (url) {
@@ -168201,6 +168576,59 @@ packages_dynamic_load_listvue_type_template_id_2ff67df8_render._withStripped = t
168201
168576
  this.init();
168202
168577
  },
168203
168578
  methods: {
168579
+ // 根据字段类型获取显示值
168580
+ getFieldDisplayValue(field) {
168581
+ const { type, formKey } = field;
168582
+ const value = this.form[formKey];
168583
+
168584
+ // 处理特殊类型的显示值
168585
+ if (['select', 'radio', 'checkbox'].includes(type)) {
168586
+ // 默认值处理逻辑
168587
+ if (!this.form[`${formKey}Name`]) {
168588
+ if (['select', 'radio'].includes(type)) {
168589
+ if(field.enumType === 'enum' && field.enumList && field.enumList.length > 0 ){
168590
+ field.enumList.forEach(item => {
168591
+ if (item.K === value) {
168592
+ this.form[`${formKey}Name`] = item.V
168593
+ }})
168594
+ // 请求接口取到的字典key不能为空
168595
+ } else if(field.enumType === 'code' && this.enumData[field.enumKey]){
168596
+ this.form[`${formKey}Name`] = this.enumData[field.enumKey].enumData[value] || ''
168597
+ } else if(field.enumType === 'service' && this.serviceEnumData[formKey]){
168598
+ this.form[`${formKey}Name`] = this.serviceEnumData[formKey].enumData[value] || ''
168599
+ }
168600
+ } else {
168601
+ let allEnumData = {}
168602
+ if(field.enumType === 'enum'){
168603
+ field.enumList.forEach(item => {
168604
+ allEnumData[item.K] = item.V
168605
+ })
168606
+ } else if(field.enumType === 'service'){
168607
+ this.serviceEnumData[formKey].enumList.forEach(item => {
168608
+ allEnumData[item.K] = item.V
168609
+ });
168610
+ } else if(field.enumType === 'code'){
168611
+ this.enumData[field.enumKey].enumList.forEach(item => {
168612
+ allEnumData[item.K] = item.V
168613
+ });
168614
+ }
168615
+ let resultName = []
168616
+ const valueList = value.split(',')
168617
+ valueList.forEach(item => {
168618
+ resultName.push(allEnumData[item])
168619
+ })
168620
+ this.form[`${formKey}Name`] = resultName.join(",")
168621
+ }
168622
+ }
168623
+ return this.form[`${formKey}Name`] || value;
168624
+ }
168625
+
168626
+ if (['datepicker', 'timepicker'].includes(type)) {
168627
+ return value.replaceAll(',', '-');
168628
+ }
168629
+ // 默认显示原始值
168630
+ return value;
168631
+ },
168204
168632
  formReset(){
168205
168633
  this.form = {}
168206
168634
  },
@@ -168320,11 +168748,28 @@ packages_dynamic_load_listvue_type_template_id_2ff67df8_render._withStripped = t
168320
168748
  this.isUseDefaultBackground = isUseDefaultBackground === undefined ? true : isUseDefaultBackground
168321
168749
  this.backgroundImgUrl = backgroundImgId ? packages_config_config.upmsServerContext + '/oss/file/get/' + backgroundImgId : ""
168322
168750
  this.searchTitleField = search
168751
+ let enumListRlt = []
168752
+ let enumServiceKeyList = []
168753
+ let enumLinkServiceList = []
168323
168754
  for (let field of formFields) {
168324
168755
  if(field.formKey !== this.searchTitleField.formKey){
168325
168756
  this.formFields.push(field)
168326
168757
  }
168327
168758
  tempForm[field.formKey] = await this.getDefaultValue(field);
168759
+ if (field.enumType == 'code' && field.enumKey) {
168760
+ enumListRlt.push(field.enumKey)
168761
+ }
168762
+ if(field.enumType == 'service' && field.serviceUrl){
168763
+ enumServiceKeyList.push(field.formKey)
168764
+ const url = field.serviceUrl.replace(/\{(\w+)\}/g, (match, p) => tempForm[p] || '');
168765
+ enumLinkServiceList.push(url)
168766
+ }
168767
+ }
168768
+ if (enumListRlt.length) {
168769
+ this.getDictData(enumListRlt)
168770
+ }
168771
+ if (enumServiceKeyList.length && enumLinkServiceList.length) {
168772
+ this.getServiceDictData(enumServiceKeyList, enumLinkServiceList)
168328
168773
  }
168329
168774
  if(this.formFields.length > 0){
168330
168775
  this.showFilter = true
@@ -168344,16 +168789,16 @@ packages_dynamic_load_listvue_type_template_id_2ff67df8_render._withStripped = t
168344
168789
  this.detailButton = header.detailButtonList
168345
168790
  this.detailArrowhead = true
168346
168791
  } else {
168347
- columnList.forEach(item => {
168348
- if (item.type === 'operate' && item.button.length > 0) {
168349
- if(item.key === header.detailTitle.key) {
168350
- this.detailButton = item.button
168351
- this.detailArrowhead = true
168792
+ columnList.forEach(item => {
168793
+ if (item.type === 'operate' && item.button.length > 0) {
168794
+ if(item.key === header.detailTitle.key) {
168795
+ this.detailButton = item.button
168796
+ this.detailArrowhead = true
168797
+ }
168352
168798
  }
168353
- }
168354
- })
168799
+ })
168800
+ }
168355
168801
  }
168356
- }
168357
168802
  this.isNOSelectAll = !!this.multiSelect();//控制全选是否显示(多选状态下才会显示)
168358
168803
  this.rowKey = rowKey
168359
168804
  this.rowName = rowName
@@ -168424,6 +168869,21 @@ packages_dynamic_load_listvue_type_template_id_2ff67df8_render._withStripped = t
168424
168869
  }
168425
168870
  this.cardFields = cardFields
168426
168871
  },
168872
+ async getServiceDictData(enumServiceKeyList, enumServiceList) {
168873
+ const result = await packages_getServiceUrlDict(enumServiceKeyList,enumServiceList)
168874
+ this.serviceEnumData = result
168875
+ },
168876
+ async getDictData(enumListRlt) {
168877
+ const result = await packages_getAllDict(enumListRlt)
168878
+ let enumDataRlt = {}
168879
+ packages_lodash_default().forEach(result, (v, k) => {
168880
+ enumDataRlt[k] = {
168881
+ enumData: v.enumData,
168882
+ enumList: v.enumList,
168883
+ }
168884
+ })
168885
+ this.enumData = enumDataRlt
168886
+ },
168427
168887
  getDefaultValue(field) {
168428
168888
  return new Promise((resolve, reject) => {
168429
168889
  let value;
@@ -168434,17 +168894,8 @@ packages_dynamic_load_listvue_type_template_id_2ff67df8_render._withStripped = t
168434
168894
  }
168435
168895
  } else if (field.type && ['number'].includes(field.type)) {
168436
168896
  value = field.defaultValue || 0;
168437
- } else if (field.type && ['checkbox'].includes(field.type)) {
168438
- value = field.defaultValue ? field.defaultValue.split(',') : [];
168439
168897
  } else if (field.type && ['switch'].includes(field.type)) {
168440
168898
  value = field.defaultValue ? field.defaultValue : false;
168441
- } else if (field.type && ['select', 'videoUpload'].includes(field.type)) {
168442
- value = field.props && field.props.multiple ? [] : '';
168443
- if (field.defaultValue) {
168444
- value = field.props && field.props.multiple
168445
- ? field.defaultValue.split(',')
168446
- : field.defaultValue;
168447
- }
168448
168899
  } else if (field.type && ['datepicker', 'imgUpload', 'imgListUpload', 'fileUpload'].includes(field.type)) {
168449
168900
  // 图片文件上传没有defaultValue逻辑 日期选择框schema-form有处理
168450
168901
  value = '';
@@ -168459,21 +168910,26 @@ packages_dynamic_load_listvue_type_template_id_2ff67df8_render._withStripped = t
168459
168910
 
168460
168911
  ;// ../lambo-design-mobile/packages/dynamic-load-list/src/dynamic-load-list.vue?vue&type=script&lang=js
168461
168912
  /* harmony default export */ const packages_src_dynamic_load_listvue_type_script_lang_js = (packages_dynamic_load_listvue_type_script_lang_js);
168913
+ // EXTERNAL MODULE: ./node_modules/vue-style-loader/index.js!./node_modules/mini-css-extract-plugin/dist/loader.js??clonedRuleSet-3.use[1]!./node_modules/css-loader/dist/cjs.js??clonedRuleSet-3.use[2]!./node_modules/vue-loader/lib/loaders/stylePostLoader.js!./node_modules/less-loader/dist/cjs.js??clonedRuleSet-3.use[3]!./node_modules/vue-loader/lib/index.js??vue-loader-options!../lambo-design-mobile/packages/dynamic-load-list/src/dynamic-load-list.vue?vue&type=style&index=0&id=cf5e761e&prod&lang=less&scoped=true
168914
+ var packages_dynamic_load_listvue_type_style_index_0_id_cf5e761e_prod_lang_less_scoped_true = __webpack_require__(92679);
168915
+ ;// ../lambo-design-mobile/packages/dynamic-load-list/src/dynamic-load-list.vue?vue&type=style&index=0&id=cf5e761e&prod&lang=less&scoped=true
168916
+
168462
168917
  ;// ../lambo-design-mobile/packages/dynamic-load-list/src/dynamic-load-list.vue
168463
168918
 
168464
168919
 
168465
168920
 
168921
+ ;
168466
168922
 
168467
168923
 
168468
168924
  /* normalize component */
168469
- ;
168925
+
168470
168926
  var packages_dynamic_load_list_component = (0,packages_componentNormalizer["default"])(
168471
168927
  packages_src_dynamic_load_listvue_type_script_lang_js,
168472
- packages_dynamic_load_listvue_type_template_id_2ff67df8_render,
168473
- packages_dynamic_load_listvue_type_template_id_2ff67df8_staticRenderFns,
168928
+ packages_dynamic_load_listvue_type_template_id_cf5e761e_scoped_true_render,
168929
+ packages_dynamic_load_listvue_type_template_id_cf5e761e_scoped_true_staticRenderFns,
168474
168930
  false,
168475
168931
  null,
168476
- null,
168932
+ "cf5e761e",
168477
168933
  null
168478
168934
 
168479
168935
  )