@indfnd/common-mobile 0.0.100 → 0.0.101

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -2,6 +2,8 @@
2
2
 
3
3
  All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
4
4
 
5
+ ### [0.0.101](http://git.inspur.com/imp-ec/ind-front/ind-common-mobile-front/compare/v0.0.100...v0.0.101) (2025-10-10)
6
+
5
7
  ### [0.0.100](http://git.inspur.com/imp-ec/ind-front/ind-common-mobile-front/compare/v0.0.99...v0.0.100) (2025-09-26)
6
8
 
7
9
 
@@ -1,8 +1,8 @@
1
- import { getQuarterNum, getHalfYearNum, formatDate, useConfig, getLocalStorage, checkIdCard, checkVehicleNo, checkPhone, getDictMapApi, axios as axios$3, getCaptchaURL, guid, setLocalStorage, clearSessionStorage, cryptor, listComTreeApi, listItemTreeApi, config as config$1, getSessionStorage, getToken, setToken, loginApi, clearUserInfoCache, clearPermissionCache, logoutApi, getUserInfoCache, getUserInfoApi, setUserInfoCache, setSessionStorage, getAppListApi, getPermissionCache, getPermissionApi, setPermissionCache, menuHistoryApi, addMenuCollectApi, removeMenuCollectApi } from "@indfnd/utils";
1
+ import { getQuarterNum, getHalfYearNum, formatDate, useConfig, getLocalStorage, checkIdCard, checkVehicleNo, checkPhone, getDictMapApi, axios as axios$3, getCaptchaURL, guid, setLocalStorage, clearSessionStorage, cryptor, listComTreeApi, listItemTreeApi, config as config$1, getSessionStorage, getToken, setToken, loginApi, clearUserInfoCache, clearPermissionCache, logoutApi, getUserInfoCache, getUserInfoApi, setUserInfoCache, setSessionStorage, getAppListApi, getPermissionCache, getPermissionApi, setPermissionCache, menuHistoryApi, addMenuCollectApi, removeMenuCollectApi, setConfig } from "@indfnd/utils";
2
2
  import Vue$1 from "vue";
3
3
  import { DropdownMenu as DropdownMenu$1, DropdownItem as DropdownItem$1, Message, LoadingBar, Spin } from "view-design";
4
4
  const name$1 = "@indfnd/common-mobile";
5
- const version$2 = "0.0.99";
5
+ const version$2 = "0.0.100";
6
6
  const author$1 = "huxuetong";
7
7
  const publishConfig = {
8
8
  registry: "https://registry.npmjs.org/"
@@ -52,7 +52,7 @@ const dependencies$1 = {
52
52
  "xlsx-populate": "^1.11.0"
53
53
  };
54
54
  const devDependencies$1 = {
55
- "@indfnd/utils": "^0.1.21",
55
+ "@indfnd/utils": "^0.1.26",
56
56
  eslint: "^3.19.0",
57
57
  "eslint-config-prettier": "^8.5.0",
58
58
  "eslint-plugin-prettier": "^4.2.1",
@@ -43312,8 +43312,13 @@ var staticRenderFns$o = [];
43312
43312
  const __vue2_script$o = {
43313
43313
  name: "IndMLoadMore",
43314
43314
  props: {
43315
+ renderParams: Function,
43315
43316
  enableLoadMore: Boolean,
43316
43317
  dataUrl: String,
43318
+ methodsType: {
43319
+ type: String,
43320
+ default: "get"
43321
+ },
43317
43322
  params: Object,
43318
43323
  datas: {
43319
43324
  type: Array,
@@ -43335,7 +43340,9 @@ const __vue2_script$o = {
43335
43340
  },
43336
43341
  computed: {
43337
43342
  finished() {
43338
- return this.curData.length == this.datas.length || this.curData.length == this.total;
43343
+ let isFinished = this.curData.length == this.datas.length || this.curData.length == this.total;
43344
+ console.log("isFinished", "this.curData.length", this.curData.length, "this.total", this.total, isFinished);
43345
+ return isFinished;
43339
43346
  },
43340
43347
  paginationParams() {
43341
43348
  return {
@@ -43357,20 +43364,30 @@ const __vue2_script$o = {
43357
43364
  },
43358
43365
  methods: {
43359
43366
  async initData() {
43360
- var _a, _b;
43367
+ var _a, _b, _c;
43361
43368
  if (!!this.datas && !!this.datas.length) {
43362
43369
  this.curData = this.datas.slice(0, this.pageLen);
43363
43370
  } else if (this.dataUrl) {
43364
43371
  this.loading = true;
43365
43372
  try {
43366
- let resp = await axios$3.get(this.dataUrl, {
43367
- params: {
43368
- ...this.params,
43369
- ...this.paginationParams
43370
- }
43371
- });
43372
- this.curData = ((_a = resp.data) == null ? void 0 : _a.rows) || [];
43373
- this.total = ((_b = resp.data) == null ? void 0 : _b.total) || 0;
43373
+ let resp;
43374
+ let params = {
43375
+ ...this.params,
43376
+ ...this.paginationParams
43377
+ };
43378
+ if (typeof this.renderParams == "function") {
43379
+ params = this.renderParams(params);
43380
+ }
43381
+ if (this.methodsType == "post") {
43382
+ resp = await axios$3.post(this.dataUrl, params);
43383
+ } else {
43384
+ resp = await axios$3.get(this.dataUrl, {
43385
+ params
43386
+ });
43387
+ }
43388
+ this.curData = ((_a = resp.data) == null ? void 0 : _a.rows) || ((_b = resp.data) == null ? void 0 : _b.records) || [];
43389
+ this.total = ((_c = resp.data) == null ? void 0 : _c.total) || 0;
43390
+ this.$emit("total", this.total);
43374
43391
  } catch (e) {
43375
43392
  }
43376
43393
  } else {
@@ -43380,7 +43397,7 @@ const __vue2_script$o = {
43380
43397
  this.curIdx = this.curData.length;
43381
43398
  },
43382
43399
  async onLoad() {
43383
- var _a;
43400
+ var _a, _b;
43384
43401
  if (!!this.datas && !!this.datas.length) {
43385
43402
  this.curData = _.concat(
43386
43403
  this.curData,
@@ -43393,13 +43410,19 @@ const __vue2_script$o = {
43393
43410
  } else if (this.dataUrl) {
43394
43411
  this.loading = true;
43395
43412
  try {
43396
- let resp = await axios$3.get(this.dataUrl, {
43397
- params: {
43398
- ...this.params,
43399
- ...this.paginationParams
43400
- }
43401
- });
43402
- this.curData = _.concat(this.curData, ((_a = resp.data) == null ? void 0 : _a.rows) || []);
43413
+ let resp;
43414
+ let params = {
43415
+ ...this.params,
43416
+ ...this.paginationParams
43417
+ };
43418
+ if (this.methodsType == "post") {
43419
+ resp = await axios$3.post(this.dataUrl, params);
43420
+ } else {
43421
+ resp = await axios$3.get(this.dataUrl, {
43422
+ params
43423
+ });
43424
+ }
43425
+ this.curData = _.concat(this.curData, ((_a = resp.data) == null ? void 0 : _a.rows) || ((_b = resp.data) == null ? void 0 : _b.records) || []);
43403
43426
  this.curIdx = this.curIdx + this.pageLen;
43404
43427
  } catch (e) {
43405
43428
  }
@@ -44579,13 +44602,13 @@ var render$j = function() {
44579
44602
  _vm.searchVal = $event;
44580
44603
  }, "update:search-val": function($event) {
44581
44604
  _vm.searchVal = $event;
44582
- }, "doSearch": _vm.doSearch, "doSearchFilter": _vm.doSearchFilter } }), _vm.topMsg ? _c("van-notice-bar", { staticClass: "ind-flex-no-shrink", attrs: { "mode": "closeable" } }, [_vm._v(_vm._s(_vm.topMsg))]) : _vm._e(), _c("div", { class: ["ind-page", _vm.enableLoadMore ? "loadmore" : ""] }, [_c("IndMLoadMore", { attrs: { "enableLoadMore": _vm.enableLoadMore, "pageLen": _vm.enableLoadMore ? 10 : 999999, "datas": _vm.displayRows, "dataUrl": _vm.dataUrl, "params": _vm.searchForm }, scopedSlots: _vm._u([{ key: "item", fn: function(ref) {
44605
+ }, "doSearch": _vm.doSearch, "doSearchFilter": _vm.doSearchFilter } }), _vm.topMsg ? _c("van-notice-bar", { staticClass: "ind-flex-no-shrink", attrs: { "mode": "closeable" } }, [_vm._v(_vm._s(_vm.topMsg))]) : _vm._e(), _c("div", { class: ["ind-page", _vm.enableLoadMore ? "loadmore" : ""] }, [_c("IndMLoadMore", { attrs: { "enableLoadMore": _vm.enableLoadMore, "pageLen": _vm.enableLoadMore ? 10 : 999999, "datas": _vm.displayRows, "dataUrl": _vm.dataUrl, "methodsType": _vm.methodsType, "params": _vm.searchForm, "renderParams": _vm.renderParams }, on: { "total": _vm.updateTotal }, scopedSlots: _vm._u([{ key: "item", fn: function(ref) {
44583
44606
  var item2 = ref.item;
44584
44607
  return [_vm._t("item", function() {
44585
44608
  return [_c("IndMForm", { attrs: { "fieldList": _vm.formFieldList, "cardBtns": _vm.cardBtns, "value": item2, "formType": "card" } })];
44586
44609
  }, { "item": item2 })];
44587
44610
  } }], null, true) })], 1), _vm._t("bottom", function() {
44588
- return [_c("div", { staticClass: "ind-bottom-info ind-bottom-btn" }, [_c("div", { staticClass: "ind-flex" }, [_vm.bottomMsg ? [_vm._v(" " + _vm._s(_vm.bottomMsg) + " ")] : [_vm._v(" \u5171\xA0"), _c("span", { staticClass: "ind-orange ind-large" }, [_vm._v(_vm._s(_vm.displayRows.length))]), _vm._v("\xA0\u6761\u6570\u636E ")]], 2), _vm.bottom || _vm.pageBtnText || _vm.btnText ? _c("div", { staticClass: "ind-flex ind-space-between ind-mt" }, [_c("IndButton", { attrs: { "bizType": "primary" }, on: { "click": function($event) {
44611
+ return [_c("div", { staticClass: "ind-bottom-info ind-bottom-btn" }, [_c("div", { staticClass: "ind-flex" }, [_vm.bottomMsg ? [_vm._v(" " + _vm._s(_vm.bottomMsg) + " ")] : [_vm._v(" \u5171\xA0"), _c("span", { staticClass: "ind-orange ind-large" }, [_vm._v(_vm._s(_vm.total || _vm.displayRows.length || 0))]), _vm._v("\xA0\u6761\u6570\u636E ")]], 2), _vm.bottom || _vm.pageBtnText || _vm.btnText ? _c("div", { staticClass: "ind-flex ind-space-between ind-mt" }, [_c("IndButton", { attrs: { "bizType": "primary" }, on: { "click": function($event) {
44589
44612
  return _vm.$emit("bottomClick");
44590
44613
  } } }, [_vm._v(" " + _vm._s(_vm.pageBtnText || _vm.btnText || "\u65B0\u589E") + " ")])], 1) : _vm._e()])];
44591
44614
  }), _c("IndMLoadingPanel", { attrs: { "loading": _vm.loadingComp || _vm.loading } }), _vm._t("default")], 2);
@@ -44594,6 +44617,7 @@ var staticRenderFns$j = [];
44594
44617
  const __vue2_script$j = {
44595
44618
  name: "IndMPageView",
44596
44619
  props: {
44620
+ renderParams: Function,
44597
44621
  isTransfer: {
44598
44622
  type: Boolean,
44599
44623
  default: true
@@ -44625,8 +44649,10 @@ const __vue2_script$j = {
44625
44649
  data() {
44626
44650
  return {
44627
44651
  dataUrl: null,
44652
+ methodsType: "get",
44628
44653
  loadingComp: false,
44629
44654
  rows: [],
44655
+ total: 0,
44630
44656
  pageBtnText: "",
44631
44657
  columns: [],
44632
44658
  searchFormFields: [],
@@ -44691,13 +44717,17 @@ const __vue2_script$j = {
44691
44717
  }
44692
44718
  },
44693
44719
  methods: {
44720
+ updateTotal(num) {
44721
+ this.total = num;
44722
+ },
44694
44723
  initConfig() {
44695
44724
  var _a, _b;
44696
44725
  if (this.xmlInfo) {
44697
- const { dataUrl, pageBtnText, columns: columns2, searchFormFields, formFieldList, subTable } = generateConfigByXml(this.xmlInfo, this.isTransfer);
44726
+ const { dataUrl, methods, pageBtnText, columns: columns2, searchFormFields, formFieldList, subTable } = generateConfigByXml(this.xmlInfo, this.isTransfer);
44698
44727
  this.pageBtnText = pageBtnText;
44699
44728
  this.columns = columns2;
44700
44729
  this.dataUrl = dataUrl;
44730
+ this.methodsType = methods;
44701
44731
  if ((_a = this.searchFormFieldsExt) == null ? void 0 : _a.length) {
44702
44732
  _.forEach(this.searchFormFieldsExt, (d) => {
44703
44733
  let srcInfo = _.find(searchFormFields, { formKey: d.formKey });
@@ -71553,6 +71583,12 @@ const install = function(Vue2, opts = { theme: "" }) {
71553
71583
  if (install.installed)
71554
71584
  return;
71555
71585
  const theme = opts.theme || getDefaultTheme();
71586
+ let installConfig = opts.config || {};
71587
+ if (!_.isEmpty(installConfig)) {
71588
+ _.forEach(installConfig, (v, k) => {
71589
+ setConfig(k, v);
71590
+ });
71591
+ }
71556
71592
  doChangeTheme(theme);
71557
71593
  if (location.pathname.includes("scyxweb")) {
71558
71594
  let url = location.protocol + "//" + location.host + "/hbwebchat/scyxweb/ind-mobile/manage/global?t=" + new Date().getTime();