@indfnd/common-mobile 0.0.11 → 0.0.13

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,21 @@
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.13](http://git.inspur.com/imp-ec/ind-front/ind-common-mobile-front/compare/v0.0.12...v0.0.13) (2024-03-30)
6
+
7
+
8
+ ### Features
9
+
10
+ * 单位切换round一下 ([a1e92a5](http://git.inspur.com/imp-ec/ind-front/ind-common-mobile-front/commit/a1e92a5644d3073c2951d42967deb2481b1d0e63))
11
+ * 默认样式修改 ([6a28764](http://git.inspur.com/imp-ec/ind-front/ind-common-mobile-front/commit/6a2876461b50942bb437d7ae752d42e02ddd717e))
12
+
13
+ ### [0.0.12](http://git.inspur.com/imp-ec/ind-front/ind-common-mobile-front/compare/v0.0.11...v0.0.12) (2024-03-21)
14
+
15
+
16
+ ### Features
17
+
18
+ * detail-view暴露参数,切换单位 ([c29bb43](http://git.inspur.com/imp-ec/ind-front/ind-common-mobile-front/commit/c29bb4327c9b99de589b3eaee887282c5bd95002))
19
+
5
20
  ### [0.0.11](http://git.inspur.com/imp-ec/ind-front/ind-common-mobile-front/compare/v0.0.10...v0.0.11) (2024-03-20)
6
21
 
7
22
 
@@ -2,7 +2,7 @@ import { getQuarterNum, getHalfYearNum, getHalfYear, formatDate, checkIdCard, ch
2
2
  import { DropdownMenu as DropdownMenu$1, DropdownItem as DropdownItem$1, Message, LoadingBar, Spin } from "view-design";
3
3
  import Vue$1 from "vue";
4
4
  const name = "@indfnd/common-mobile";
5
- const version$1 = "0.0.10";
5
+ const version$1 = "0.0.12";
6
6
  const author = "huxuetong";
7
7
  const publishConfig = {
8
8
  registry: "https://registry.npmjs.org/"
@@ -43282,7 +43282,7 @@ var classnames$1 = { exports: {} };
43282
43282
  var classnames = classnames$1.exports;
43283
43283
  const THEME_KEY = "ind-theme";
43284
43284
  function getDefaultTheme() {
43285
- return getLocalStorage(THEME_KEY) || "theme2";
43285
+ return getLocalStorage(THEME_KEY) || "ind-default-theme";
43286
43286
  }
43287
43287
  function doChangeTheme(theme) {
43288
43288
  var _a, _b;
@@ -44276,7 +44276,9 @@ var render$i = function() {
44276
44276
  return _vm.setForm(table, $event);
44277
44277
  }, "fieldChange": function($event) {
44278
44278
  return _vm.fieldChange(table, $event);
44279
- }, "itemClick": _vm.itemClick } })];
44279
+ }, "itemClick": function($event) {
44280
+ return _vm.itemClick($event, table);
44281
+ } } })];
44280
44282
  } }], null, true) })], 1)];
44281
44283
  }, { "table": table })] : _vm._e()];
44282
44284
  }), _c("van-collapse", { model: { value: _vm.activeNames, callback: function($$v) {
@@ -44295,7 +44297,9 @@ var render$i = function() {
44295
44297
  return _vm.setForm(cTable, $event);
44296
44298
  }, "fieldChange": function($event) {
44297
44299
  return _vm.fieldChange(cTable, $event);
44298
- }, "itemClick": _vm.itemClick } })];
44300
+ }, "itemClick": function($event) {
44301
+ return _vm.itemClick($event, cTable);
44302
+ } } })];
44299
44303
  } }], null, true) })], 1)];
44300
44304
  }, { "table": cTable })] : _vm._e()], 2);
44301
44305
  }), 1)], 2), _vm._t("bottom", function() {
@@ -44412,10 +44416,10 @@ const __vue2_script$i = {
44412
44416
  _.forEach(unitFields, (ddd) => {
44413
44417
  if (this.dataUnit == "X" && this.pageUnit == "WZ") {
44414
44418
  let t2 = _.round(parseFloat(dd[ddd]), 6);
44415
- dd[ddd] = isNaN(t2) ? null : t2 * 5;
44419
+ dd[ddd] = isNaN(t2) ? null : _.round(t2 * 5, 6);
44416
44420
  } else if (this.dataUnit == "WZ" && this.pageUnit == "X") {
44417
44421
  let t2 = _.round(parseFloat(dd[ddd]), 6);
44418
- dd[ddd] = isNaN(t2) ? null : t2 / 5;
44422
+ dd[ddd] = isNaN(t2) ? null : _.round(t2 / 5, 6);
44419
44423
  }
44420
44424
  });
44421
44425
  });
@@ -44423,10 +44427,10 @@ const __vue2_script$i = {
44423
44427
  _.forEach(unitFields, (dd) => {
44424
44428
  if (this.dataUnit == "X" && this.pageUnit == "WZ") {
44425
44429
  let t2 = _.round(parseFloat(tmpData[dd]), 6);
44426
- tmpData[dd] = isNaN(t2) ? null : t2 * 5;
44430
+ tmpData[dd] = isNaN(t2) ? null : _.round(t2 * 5, 6);
44427
44431
  } else if (this.dataUnit == "WZ" && this.pageUnit == "X") {
44428
44432
  let t2 = _.round(parseFloat(tmpData[dd]), 6);
44429
- tmpData[dd] = isNaN(t2) ? null : t2 / 5;
44433
+ tmpData[dd] = isNaN(t2) ? null : _.round(t2 / 5, 6);
44430
44434
  }
44431
44435
  });
44432
44436
  }
@@ -44436,10 +44440,10 @@ const __vue2_script$i = {
44436
44440
  _.forEach(unitFields, (dd) => {
44437
44441
  if (this.dataUnit == "X" && this.pageUnit == "WZ") {
44438
44442
  let t2 = _.round(parseFloat(dataSrc[dd]), 6);
44439
- dataSrc[dd] = isNaN(t2) ? null : t2 * 5;
44443
+ dataSrc[dd] = isNaN(t2) ? null : _.round(t2 * 5, 6);
44440
44444
  } else if (this.dataUnit == "WZ" && this.pageUnit == "X") {
44441
44445
  let t2 = _.round(parseFloat(dataSrc[dd]), 6);
44442
- dataSrc[dd] = isNaN(t2) ? null : t2 / 5;
44446
+ dataSrc[dd] = isNaN(t2) ? null : _.round(t2 / 5, 6);
44443
44447
  }
44444
44448
  });
44445
44449
  }
@@ -44465,10 +44469,10 @@ const __vue2_script$i = {
44465
44469
  _.forEach(unitFields, (ddd) => {
44466
44470
  if (this.dataUnit == "X" && this.pageUnit == "WZ") {
44467
44471
  let t2 = _.round(parseFloat(dd[ddd]), 6);
44468
- dd[ddd] = isNaN(t2) ? null : t2 / 5;
44472
+ dd[ddd] = isNaN(t2) ? null : _.round(t2 / 5, 6);
44469
44473
  } else if (this.dataUnit == "WZ" && this.pageUnit == "X") {
44470
44474
  let t2 = _.round(parseFloat(dd[ddd]), 6);
44471
- dd[ddd] = isNaN(t2) ? null : t2 * 5;
44475
+ dd[ddd] = isNaN(t2) ? null : _.round(t2 * 5, 6);
44472
44476
  }
44473
44477
  });
44474
44478
  });
@@ -44476,10 +44480,10 @@ const __vue2_script$i = {
44476
44480
  _.forEach(unitFields, (dd) => {
44477
44481
  if (this.dataUnit == "X" && this.pageUnit == "WZ") {
44478
44482
  let t2 = _.round(parseFloat(tmpData[dd]), 6);
44479
- tmpData[dd] = isNaN(t2) ? null : t2 / 5;
44483
+ tmpData[dd] = isNaN(t2) ? null : _.round(t2 / 5, 6);
44480
44484
  } else if (this.dataUnit == "WZ" && this.pageUnit == "X") {
44481
44485
  let t2 = _.round(parseFloat(tmpData[dd]), 6);
44482
- tmpData[dd] = isNaN(t2) ? null : t2 * 5;
44486
+ tmpData[dd] = isNaN(t2) ? null : _.round(t2 * 5, 6);
44483
44487
  }
44484
44488
  });
44485
44489
  }
@@ -44489,10 +44493,10 @@ const __vue2_script$i = {
44489
44493
  _.forEach(unitFields, (dd) => {
44490
44494
  if (this.dataUnit == "X" && this.pageUnit == "WZ") {
44491
44495
  let t2 = _.round(parseFloat(dataSrc[dd]), 6);
44492
- dataSrc[dd] = isNaN(t2) ? null : t2 / 5;
44496
+ dataSrc[dd] = isNaN(t2) ? null : _.round(t2 / 5, 6);
44493
44497
  } else if (this.dataUnit == "WZ" && this.pageUnit == "X") {
44494
44498
  let t2 = _.round(parseFloat(dataSrc[dd]), 6);
44495
- dataSrc[dd] = isNaN(t2) ? null : t2 * 5;
44499
+ dataSrc[dd] = isNaN(t2) ? null : _.round(t2 * 5, 6);
44496
44500
  }
44497
44501
  });
44498
44502
  }
@@ -44501,8 +44505,24 @@ const __vue2_script$i = {
44501
44505
  this.$emit("update:formValue", dataSrc);
44502
44506
  },
44503
44507
  fieldChange(table, event) {
44508
+ let itemClone = _.cloneDeep((event == null ? void 0 : event.row) || {});
44509
+ let unitFields = _.filter(table.formFieldList, (dd) => dd.isSwitchUnit === "true").map(
44510
+ (m) => m.id
44511
+ );
44512
+ if (unitFields == null ? void 0 : unitFields.length) {
44513
+ _.forEach(unitFields, (dd) => {
44514
+ if (this.dataUnit == "X" && this.pageUnit == "WZ") {
44515
+ let t2 = _.round(parseFloat(itemClone[dd]), 6);
44516
+ itemClone[dd] = isNaN(t2) ? null : _.round(t2 / 5, 6);
44517
+ } else if (this.dataUnit == "WZ" && this.pageUnit == "X") {
44518
+ let t2 = _.round(parseFloat(itemClone[dd]), 6);
44519
+ itemClone[dd] = isNaN(t2) ? null : _.round(t2 * 5, 6);
44520
+ }
44521
+ });
44522
+ }
44504
44523
  this.$emit("fieldChange", {
44505
- ...event,
44524
+ formKey: event.formKey,
44525
+ row: itemClone,
44506
44526
  table
44507
44527
  });
44508
44528
  },
@@ -44563,8 +44583,23 @@ const __vue2_script$i = {
44563
44583
  async submit() {
44564
44584
  this.$emit("submit");
44565
44585
  },
44566
- itemClick: _.debounce(function(item2) {
44567
- this.$emit("itemClick", item2);
44586
+ itemClick: _.debounce(function(item2, table) {
44587
+ let itemClone = _.cloneDeep(item2);
44588
+ let unitFields = _.filter(table.formFieldList, (dd) => dd.isSwitchUnit === "true").map(
44589
+ (m) => m.id
44590
+ );
44591
+ if (unitFields == null ? void 0 : unitFields.length) {
44592
+ _.forEach(unitFields, (dd) => {
44593
+ if (this.dataUnit == "X" && this.pageUnit == "WZ") {
44594
+ let t2 = _.round(parseFloat(itemClone[dd]), 6);
44595
+ itemClone[dd] = isNaN(t2) ? null : _.round(t2 / 5, 6);
44596
+ } else if (this.dataUnit == "WZ" && this.pageUnit == "X") {
44597
+ let t2 = _.round(parseFloat(itemClone[dd]), 6);
44598
+ itemClone[dd] = isNaN(t2) ? null : _.round(t2 * 5, 6);
44599
+ }
44600
+ });
44601
+ }
44602
+ this.$emit("itemClick", itemClone);
44568
44603
  }, 1)
44569
44604
  }
44570
44605
  };
@@ -44688,10 +44723,10 @@ const __vue2_script$h = {
44688
44723
  _.forEach(unitFields, (ddd) => {
44689
44724
  if (this.dataUnit == "X" && this.pageUnit == "WZ") {
44690
44725
  let t2 = _.round(parseFloat(dd[ddd]), 6);
44691
- dd[ddd] = isNaN(t2) ? null : t2 * 5;
44726
+ dd[ddd] = _.round(isNaN(t2) ? 0 : t2 * 5, 6);
44692
44727
  } else if (this.dataUnit == "WZ" && this.pageUnit == "X") {
44693
44728
  let t2 = _.round(parseFloat(dd[ddd]), 6);
44694
- dd[ddd] = isNaN(t2) ? null : t2 / 5;
44729
+ dd[ddd] = _.round(isNaN(t2) ? 0 : t2 / 5, 6);
44695
44730
  }
44696
44731
  });
44697
44732
  });
@@ -63631,7 +63666,7 @@ var render$6 = function() {
63631
63666
  var _vm = this;
63632
63667
  var _h = _vm.$createElement;
63633
63668
  var _c = _vm._self._c || _h;
63634
- return _c("div", { staticClass: "app-page" }, [_c("van-nav-bar", { attrs: { "fixed": true, "placeholder": true, "safe-area-inset-top": true, "title": "\u6211\u7684" } }), _c("van-cell-group", { attrs: { "title": "\u4E2A\u4EBA\u4FE1\u606F" } }, [_c("van-cell", { attrs: { "title": "\u7528\u6237\u540D", "value": _vm.user.userName } })], 1), _c("van-cell-group", { attrs: { "title": "\u5E94\u7528" } }, [_c("van-cell", { attrs: { "title": "\u540D\u79F0", "value": _vm.app.name } }), _c("van-cell", { attrs: { "title": "\u7F16\u7801", "value": _vm.app.appId } })], 1), _c("van-cell-group", { attrs: { "title": "\u901A\u7528" } }, [_c("van-cell", { directives: [{ name: "permission", rawName: "v-permission", value: ["12210071"], expression: "['12210071']" }], attrs: { "title": "v-permission=['12210071']", "value": _vm.app.version } }), _c("van-cell", { directives: [{ name: "permission", rawName: "v-permission", value: ["1221001111"], expression: "['1221001111']" }], attrs: { "title": "v-permission=['1221001111']", "value": _vm.app.version } }), _c("van-cell", { attrs: { "title": "\u8BBE\u7F6E", "is-link": "", "to": "/setting" } })], 1), _c("tabbar")], 1);
63669
+ return _c("div", { staticClass: "app-page" }, [_c("van-nav-bar", { attrs: { "fixed": true, "placeholder": true, "safe-area-inset-top": true, "title": "\u6211\u7684" } }), _c("van-cell-group", { attrs: { "title": "\u4E2A\u4EBA\u4FE1\u606F" } }, [_c("van-cell", { attrs: { "title": "\u7528\u6237\u540D", "value": _vm.user.userName } })], 1), _c("van-cell-group", { attrs: { "title": "\u5E94\u7528" } }, [_c("van-cell", { attrs: { "title": "\u540D\u79F0", "value": _vm.app.name } }), _c("van-cell", { attrs: { "title": "\u7F16\u7801", "value": _vm.app.appId } }), _c("van-cell", { attrs: { "title": "\u5E94\u7528\u7248\u672C", "value": JSON.parse(_vm.app.extendProps.extendProps).appVersion } }), _c("van-cell", { attrs: { "title": "\u914D\u7F6E\u7248\u672C", "value": JSON.parse(_vm.app.extendProps.extendProps).profileVersion } })], 1), _c("van-cell-group", { attrs: { "title": "\u901A\u7528" } }, [_c("van-cell", { directives: [{ name: "permission", rawName: "v-permission", value: ["12210071"], expression: "['12210071']" }], attrs: { "title": "v-permission=['12210071']", "value": _vm.app.version } }), _c("van-cell", { directives: [{ name: "permission", rawName: "v-permission", value: ["1221001111"], expression: "['1221001111']" }], attrs: { "title": "v-permission=['1221001111']", "value": _vm.app.version } }), _c("van-cell", { attrs: { "title": "\u8BBE\u7F6E", "is-link": "", "to": "/setting" } })], 1), _c("tabbar")], 1);
63635
63670
  };
63636
63671
  var staticRenderFns$6 = [];
63637
63672
  const __vue2_script$6 = {
@@ -63689,7 +63724,6 @@ const __vue2_script$5 = {
63689
63724
  },
63690
63725
  methods: {
63691
63726
  getImg(uri) {
63692
- console.log(location.origin + uri);
63693
63727
  return location.origin + uri;
63694
63728
  }
63695
63729
  }
@@ -63717,8 +63751,12 @@ var render$4 = function() {
63717
63751
  var _vm = this;
63718
63752
  var _h = _vm.$createElement;
63719
63753
  var _c = _vm._self._c || _h;
63720
- return _c("div", { staticStyle: { "height": "100%" }, on: { "touchend": function($event) {
63721
- return _vm.$emit("touchend", _vm.item);
63754
+ return _c("div", { staticStyle: { "height": "100%" }, on: { "touchstart": function($event) {
63755
+ return _vm.ontouchstart(_vm.item);
63756
+ }, "touchmove": function($event) {
63757
+ return _vm.ontouchmove(_vm.item);
63758
+ }, "touchend": function($event) {
63759
+ return _vm.ontouchend(_vm.item);
63722
63760
  } } }, [_vm.editStatus == "minus" || _vm.editStatus == "plus" && _vm.state ? _c("div", { staticStyle: { "text-align": "center" } }, [_c("van-badge", { attrs: { "color": "#999" }, scopedSlots: _vm._u([{ key: "content", fn: function() {
63723
63761
  return [_c("van-icon", { staticStyle: { "line-height": "1.5" }, attrs: { "name": _vm.editStatus } })];
63724
63762
  }, proxy: true }], null, false, 1274909998) }, [_c("van-image", { attrs: { "with": "3rem", "height": "3rem", "fit": "cover", "src": _vm.getImg(_vm.item.meta.icon) } })], 1)], 1) : _c("div", { staticStyle: { "text-align": "center" } }, [_c("van-image", { attrs: { "with": "3rem", "height": "3rem", "fit": "cover", "src": _vm.getImg(_vm.item.meta.icon) } })], 1), _c("div", { staticStyle: { "text-align": "center" } }, [_c("div", [_vm._v(_vm._s(_vm.item.meta.title))])])]);
@@ -63739,6 +63777,16 @@ const __vue2_script$4 = {
63739
63777
  getImg(uri) {
63740
63778
  console.log(location.origin + uri);
63741
63779
  return location.origin + uri;
63780
+ },
63781
+ ontouchstart(item2) {
63782
+ item2.move = false;
63783
+ },
63784
+ ontouchmove(item2) {
63785
+ item2.move = true;
63786
+ },
63787
+ ontouchend(item2) {
63788
+ if (!item2.move)
63789
+ this.$emit("touchend", item2);
63742
63790
  }
63743
63791
  }
63744
63792
  };
@@ -68869,9 +68917,9 @@ function filterMicroPermissionList(microType, permissionList = []) {
68869
68917
  function listToMenuTree({ list: list2, menuTree, pageNode, parentId, crumbs, root: root2 }) {
68870
68918
  if (!list2)
68871
68919
  return;
68920
+ let appInfo = getSessionStorage("appInfo");
68872
68921
  list2.forEach((item2) => {
68873
68922
  const { permissionId, label: title4, appId, pid, icon, type: type2, uri, permissionValue } = item2;
68874
- let appInfo = getSessionStorage("appInfo");
68875
68923
  if (appId != appInfo.appId)
68876
68924
  return;
68877
68925
  const name2 = permissionValue;
@@ -69002,6 +69050,21 @@ async function renderRoutes({ router, store: store2, microType, allowPermissionL
69002
69050
  await store2.dispatch("getUserInfo");
69003
69051
  await store2.dispatch("getAppListData");
69004
69052
  const permissionData = await store2.dispatch("getPermissionData");
69053
+ const sessionVersion = JSON.parse(getSessionStorage("appInfo").extendProps.extendProps);
69054
+ const localVersion = getLocalStorage("versionInfo");
69055
+ if (localVersion) {
69056
+ if (sessionVersion.appVersion > localVersion.appVersion) {
69057
+ setLocalStorage("versionInfo", sessionVersion);
69058
+ let currentURL = window.location.href;
69059
+ let url = new URL(currentURL);
69060
+ let params = new URLSearchParams(url.search);
69061
+ params.set("v", sessionVersion.appVersion);
69062
+ url.search = params.toString();
69063
+ window.location.href = url.href;
69064
+ }
69065
+ } else {
69066
+ setLocalStorage("versionInfo", sessionVersion);
69067
+ }
69005
69068
  router.options = _.cloneDeep(routerOptionsBak);
69006
69069
  const microPermissionData = filterMicroPermissionList(microType, permissionData);
69007
69070
  const dynamicRouters = generatorDynamicRouter(microPermissionData);