@indfnd/common-mobile 0.0.12 → 0.0.14

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.14](http://git.inspur.com/imp-ec/ind-front/ind-common-mobile-front/compare/v0.0.13...v0.0.14) (2024-04-03)
6
+
7
+
8
+ ### Features
9
+
10
+ * 样式修改 ([92cca18](http://git.inspur.com/imp-ec/ind-front/ind-common-mobile-front/commit/92cca18e9bf35e3788c06b6d46db5f2ac5000ca3))
11
+
12
+ ### [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)
13
+
14
+
15
+ ### Features
16
+
17
+ * 单位切换round一下 ([a1e92a5](http://git.inspur.com/imp-ec/ind-front/ind-common-mobile-front/commit/a1e92a5644d3073c2951d42967deb2481b1d0e63))
18
+ * 默认样式修改 ([6a28764](http://git.inspur.com/imp-ec/ind-front/ind-common-mobile-front/commit/6a2876461b50942bb437d7ae752d42e02ddd717e))
19
+
5
20
  ### [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)
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.11";
5
+ const version$1 = "0.0.13";
6
6
  const author = "huxuetong";
7
7
  const publishConfig = {
8
8
  registry: "https://registry.npmjs.org/"
@@ -6578,6 +6578,10 @@ var FormImpl = {
6578
6578
  break;
6579
6579
  }
6580
6580
  case "number": {
6581
+ let text = this.form[d.formKey];
6582
+ if (d.scale !== void 0) {
6583
+ text = isNaN(text) || text === null ? text : parseFloat(text).toFixed(d.scale);
6584
+ }
6581
6585
  itemInner = h("Input", {
6582
6586
  ref: d.formKey,
6583
6587
  attrs: {
@@ -43038,6 +43042,9 @@ function dealFieldFormat(s) {
43038
43042
  }
43039
43043
  function renderTable(table) {
43040
43044
  let columnSrc = table.column || [];
43045
+ if (!(columnSrc instanceof Array)) {
43046
+ columnSrc = [columnSrc];
43047
+ }
43041
43048
  columnSrc = columnSrc.map((d) => {
43042
43049
  let rlt = { ...d._attributes };
43043
43050
  rlt.id = dealFieldFormat(rlt.id);
@@ -43282,7 +43289,7 @@ var classnames$1 = { exports: {} };
43282
43289
  var classnames = classnames$1.exports;
43283
43290
  const THEME_KEY = "ind-theme";
43284
43291
  function getDefaultTheme() {
43285
- return getLocalStorage(THEME_KEY) || "theme2";
43292
+ return getLocalStorage(THEME_KEY) || "ind-default-theme";
43286
43293
  }
43287
43294
  function doChangeTheme(theme) {
43288
43295
  var _a, _b;
@@ -44043,7 +44050,7 @@ var render$k = function() {
44043
44050
  var _vm = this;
44044
44051
  var _h = _vm.$createElement;
44045
44052
  var _c = _vm._self._c || _h;
44046
- return _c("div", { staticClass: "height100 ind-basic-layout ind-flex-column" }, [_c("van-nav-bar", { staticClass: "ind-flex-no-shrink", attrs: { "title": _vm.$route.meta.title, "left-text": "\u8FD4\u56DE", "left-arrow": "" }, on: { "click-left": function($event) {
44053
+ return _c("div", { staticClass: "height100 ind-basic-layout ind-flex-column" }, [_c("van-nav-bar", { staticClass: "ind-flex-no-shrink", attrs: { "title": _vm.$route.meta.title, "left-text": "", "left-arrow": "" }, on: { "click-left": function($event) {
44047
44054
  return _vm.$router.go(-1);
44048
44055
  } } }), _c("div", { staticClass: "ind-main-content-wrapper ind-flex-grow", attrs: { "id": "keepalive" } }, [_c("KeepAlive", { attrs: { "include": _vm.cacheList, "exclude": _vm.notCacheName, "max": _vm.$store.state.app.maxTabNum } }, [_c("RouterView", { key: _vm.$route.path })], 1)], 1)], 1);
44049
44056
  };
@@ -44723,10 +44730,10 @@ const __vue2_script$h = {
44723
44730
  _.forEach(unitFields, (ddd) => {
44724
44731
  if (this.dataUnit == "X" && this.pageUnit == "WZ") {
44725
44732
  let t2 = _.round(parseFloat(dd[ddd]), 6);
44726
- dd[ddd] = isNaN(t2) ? null : t2 * 5;
44733
+ dd[ddd] = _.round(isNaN(t2) ? 0 : t2 * 5, 6);
44727
44734
  } else if (this.dataUnit == "WZ" && this.pageUnit == "X") {
44728
44735
  let t2 = _.round(parseFloat(dd[ddd]), 6);
44729
- dd[ddd] = isNaN(t2) ? null : t2 / 5;
44736
+ dd[ddd] = _.round(isNaN(t2) ? 0 : t2 / 5, 6);
44730
44737
  }
44731
44738
  });
44732
44739
  });
@@ -44808,7 +44815,7 @@ var render$g = function() {
44808
44815
  var _c = _vm._self._c || _h;
44809
44816
  return _c("van-popup", { style: { width: "100%", height: "100vh" }, attrs: { "value": _vm.value, "position": "right", "get-container": "body" }, on: { "input": function($event) {
44810
44817
  return _vm.$emit("input", $event);
44811
- } } }, [_c("div", { staticClass: "height100 ind-basic-layout ind-flex-column" }, [_c("van-nav-bar", { staticClass: "ind-flex-no-shrink", attrs: { "title": _vm.title || _vm.$route.meta.title, "left-text": "\u8FD4\u56DE", "left-arrow": "" }, on: { "click-left": function($event) {
44818
+ } } }, [_c("div", { staticClass: "height100 ind-basic-layout ind-flex-column" }, [_c("van-nav-bar", { staticClass: "ind-flex-no-shrink", attrs: { "title": _vm.title || _vm.$route.meta.title, "left-text": "", "left-arrow": "" }, on: { "click-left": function($event) {
44812
44819
  return _vm.$emit("input", false);
44813
44820
  } } }), _c("div", { staticClass: "ind-main-content-wrapper ind-flex-grow" }, [_vm._t("default")], 2)], 1)]);
44814
44821
  };
@@ -63138,7 +63145,7 @@ var render$a = function() {
63138
63145
  var _vm = this;
63139
63146
  var _h = _vm.$createElement;
63140
63147
  var _c = _vm._self._c || _h;
63141
- return _c("van-popup", { style: { width: "100%", height: "100%" }, attrs: { "value": _vm.show, "position": "right", "lazy-render": true, "get-container": "body" }, on: { "opened": _vm.getTableData } }, [_c("div", { staticClass: "ind-select-panel ind-vcenter", class: [_vm.isTree ? "ind-mobile-tree" : "", _vm.showHeader ? "ind-select-panel-widthheader" : ""], staticStyle: { "width": "100%", "height": "100vh" }, style: { paddingBottom: _vm.multiple && !_vm.showHeader ? "20px" : "0" } }, [_c("van-nav-bar", { staticClass: "ind-flex-no-shrink", attrs: { "title": "\u8BF7\u9009\u62E9" + _vm.title, "left-text": "\u8FD4\u56DE", "left-arrow": "" }, on: { "click-left": _vm.cancel } }), _c("div", { staticClass: "ind-main-content-wrapper ind-flex-grow ind-vcenter" }, [_c("van-search", { staticClass: "ind-flex-no-shrink", staticStyle: { "position": "relative", "z-index": "3" }, attrs: { "placeholder": "\u8BF7\u8F93\u5165\u641C\u7D22\u5173\u952E\u8BCD" }, on: { "search": _vm.doSearch }, model: { value: _vm.searchVal, callback: function($$v) {
63148
+ return _c("van-popup", { style: { width: "100%", height: "100%" }, attrs: { "value": _vm.show, "position": "right", "lazy-render": true, "get-container": "body" }, on: { "opened": _vm.getTableData } }, [_c("div", { staticClass: "ind-select-panel ind-vcenter", class: [_vm.isTree ? "ind-mobile-tree" : "", _vm.showHeader ? "ind-select-panel-widthheader" : ""], staticStyle: { "width": "100%", "height": "100vh" }, style: { paddingBottom: _vm.multiple && !_vm.showHeader ? "20px" : "0" } }, [_c("van-nav-bar", { staticClass: "ind-flex-no-shrink", attrs: { "title": "\u8BF7\u9009\u62E9" + _vm.title, "left-text": "", "left-arrow": "" }, on: { "click-left": _vm.cancel } }), _c("div", { staticClass: "ind-main-content-wrapper ind-flex-grow ind-vcenter" }, [_c("van-search", { staticClass: "ind-flex-no-shrink", staticStyle: { "position": "relative", "z-index": "3" }, attrs: { "placeholder": "\u8BF7\u8F93\u5165\u641C\u7D22\u5173\u952E\u8BCD" }, on: { "search": _vm.doSearch }, model: { value: _vm.searchVal, callback: function($$v) {
63142
63149
  _vm.searchVal = $$v;
63143
63150
  }, expression: "searchVal" } }), _c("IndTable", { ref: "table", attrs: { "rowClick": "", "headerHeight": 49, "rowMultiSelectWithClick": _vm.multiple, "isRowSelectable": _vm.isRowSelectable, "groupSelectsChildren": _vm.multiple, "showBottom": false, "dataApi": _vm.selectDataApi, "searchParams": _vm.searchParams, "columns": _vm.columnsData, "rowKey": _vm.selectRowKey, "showTableOption": false, "groupDefaultExpanded": 3, "disablePage": "" }, on: { "on-select-change": _vm.onSelectChange, "on-data-format-load": _vm.setLength } }), _c("div", { staticClass: "ind-bottom-info ind-bottom-btn", style: { position: _vm.showHeader ? "static" : "absolute", bottom: 0 }, attrs: { "slot": "bottom" }, slot: "bottom" }, [_vm.multiple ? _c("div", { staticClass: "ind-flex" }, [_vm._v(" \u5171\xA0"), _c("span", { staticClass: "ind-orange ind-large" }, [_vm._v(_vm._s(_vm.dataLen))]), _vm._v("\xA0\u6761\u6570\u636E\uFF0C\u5DF2\u9009\u62E9\xA0"), _c("span", { staticClass: "ind-orange ind-large" }, [_vm._v(_vm._s(_vm.selectedRows.length))]), _vm._v("\xA0\u6761 ")]) : _vm._e(), _c("div", { staticClass: "ind-flex ind-space-between", class: [_vm.multiple ? "ind-mt" : ""] }, [_vm.multiple ? _c("div", { staticClass: "ind-flex ind-flex-no-shrink ind-checkbox-bottom ag-theme-balham ag-theme-balham-dark", staticStyle: { "margin-right": "20px" }, style: { top: _vm.showHeader ? "7px" : "" }, on: { "click": _vm.toggleCheckAll } }, [_c("div", { staticClass: "ag-checkbox-input-wrapper", class: _vm.allCheck ? "ag-checked" : "" }), _vm._v(" \u5168\u9009 ")]) : _vm._e(), _c("div", { staticClass: "ind-flex", staticStyle: { "width": "100%" } }, [_c("IndButton", { attrs: { "bizType": "cancel" }, on: { "click": _vm.cancel } }, [_vm._v("\u53D6\u6D88")]), _c("IndButton", { attrs: { "bizType": "primary" }, on: { "click": _vm.confirm } }, [_vm._v("\u786E\u8BA4")])], 1)])])], 1)], 1)]);
63144
63151
  };
@@ -63666,7 +63673,7 @@ var render$6 = function() {
63666
63673
  var _vm = this;
63667
63674
  var _h = _vm.$createElement;
63668
63675
  var _c = _vm._self._c || _h;
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 } })], 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);
63676
+ 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);
63670
63677
  };
63671
63678
  var staticRenderFns$6 = [];
63672
63679
  const __vue2_script$6 = {
@@ -63724,7 +63731,6 @@ const __vue2_script$5 = {
63724
63731
  },
63725
63732
  methods: {
63726
63733
  getImg(uri) {
63727
- console.log(location.origin + uri);
63728
63734
  return location.origin + uri;
63729
63735
  }
63730
63736
  }
@@ -63752,8 +63758,12 @@ var render$4 = function() {
63752
63758
  var _vm = this;
63753
63759
  var _h = _vm.$createElement;
63754
63760
  var _c = _vm._self._c || _h;
63755
- return _c("div", { staticStyle: { "height": "100%" }, on: { "touchend": function($event) {
63756
- return _vm.$emit("touchend", _vm.item);
63761
+ return _c("div", { staticStyle: { "height": "100%" }, on: { "touchstart": function($event) {
63762
+ return _vm.ontouchstart(_vm.item);
63763
+ }, "touchmove": function($event) {
63764
+ return _vm.ontouchmove(_vm.item);
63765
+ }, "touchend": function($event) {
63766
+ return _vm.ontouchend(_vm.item);
63757
63767
  } } }, [_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() {
63758
63768
  return [_c("van-icon", { staticStyle: { "line-height": "1.5" }, attrs: { "name": _vm.editStatus } })];
63759
63769
  }, 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))])])]);
@@ -63774,6 +63784,16 @@ const __vue2_script$4 = {
63774
63784
  getImg(uri) {
63775
63785
  console.log(location.origin + uri);
63776
63786
  return location.origin + uri;
63787
+ },
63788
+ ontouchstart(item2) {
63789
+ item2.move = false;
63790
+ },
63791
+ ontouchmove(item2) {
63792
+ item2.move = true;
63793
+ },
63794
+ ontouchend(item2) {
63795
+ if (!item2.move)
63796
+ this.$emit("touchend", item2);
63777
63797
  }
63778
63798
  }
63779
63799
  };
@@ -68285,9 +68305,9 @@ var render$3 = function() {
68285
68305
  var _vm = this;
68286
68306
  var _h = _vm.$createElement;
68287
68307
  var _c = _vm._self._c || _h;
68288
- return _c("div", { staticClass: "app-page" }, [_c("van-nav-bar", { attrs: { "fixed": true, "placeholder": true, "safe-area-inset-top": true, "title": _vm.title } }), _c("div", { staticClass: "placeholder", style: { height: _vm.offsetTop - 54 + "px" } }), _c("div", { ref: "myapp", staticClass: "myapp", style: { top: 46 + "px", width: "-webkit-fill-available" } }, [_c("div", { staticClass: "ind-panel" }, [_c("div", [_c("div", { staticClass: "ind-panel-title" }, [_vm._v(" \u6211\u7684\u5E94\u7528 "), _c("van-button", { staticClass: "edit-btn", attrs: { "size": "small", "type": "info", "text": this.editButtonName }, on: { "click": _vm.toggleEdit } })], 1)]), _c("draggable", { staticClass: "wrapper", attrs: { "options": { disabled: _vm.disableDraggable } }, model: { value: _vm.list, callback: function($$v) {
68289
- _vm.list = $$v;
68290
- }, expression: "list" } }, [_c("transition-group", { staticClass: "my-app-list", staticStyle: { "display": "flex", "flex-wrap": "wrap" } }, _vm._l(_vm.my_apps, function(item2, idx) {
68308
+ return _c("div", { staticClass: "app-page" }, [_c("van-nav-bar", { attrs: { "fixed": true, "placeholder": true, "safe-area-inset-top": true, "title": _vm.title } }), _c("div", { staticClass: "placeholder", style: { height: _vm.offsetTop - 54 + "px" } }), _c("div", { ref: "myapp", staticClass: "myapp", style: { top: 46 + "px", width: "-webkit-fill-available" } }, [_c("div", { staticClass: "ind-panel" }, [_c("div", [_c("div", { staticClass: "ind-panel-title" }, [_vm._v(" \u6211\u7684\u5E94\u7528 "), _c("van-button", { staticClass: "edit-btn", attrs: { "size": "small", "type": "info", "text": this.editButtonName }, on: { "click": _vm.toggleEdit } })], 1)]), _c("draggable", { staticClass: "wrapper", attrs: { "options": { disabled: _vm.disableDraggable } }, model: { value: _vm.my_apps, callback: function($$v) {
68309
+ _vm.my_apps = $$v;
68310
+ }, expression: "my_apps" } }, [_c("transition-group", { staticClass: "my-app-list", staticStyle: { "display": "flex", "flex-wrap": "wrap" } }, _vm._l(_vm.my_apps, function(item2, idx) {
68291
68311
  return _c("apps-item", { key: idx, staticClass: "item", staticStyle: { "width": "25%", "padding": "16px 8px", "box-sizing": "border-box" }, attrs: { "item": item2, "state": item2.state, "editStatus": _vm.currentEditStatus == "on" ? "minus" : "off" }, on: { "touchend": _vm.rmFromMyAppsClick } });
68292
68312
  }), 1)], 1)], 1)]), _c("van-tabs", { attrs: { "color": "#488aff", "scrollspy": "", "sticky": "", "offset-top": _vm.offsetTop }, model: { value: _vm.active, callback: function($$v) {
68293
68313
  _vm.active = $$v;
@@ -68344,6 +68364,9 @@ const __vue2_script$3 = {
68344
68364
  }, 200);
68345
68365
  }
68346
68366
  },
68367
+ updated() {
68368
+ this.$store.commit("setMyAppsList", this.my_apps);
68369
+ },
68347
68370
  mounted() {
68348
68371
  this.my_apps = this.$store.getters.getMyAppsList;
68349
68372
  let menus = this.$store.getters.getMenuTreeList;
@@ -68904,9 +68927,9 @@ function filterMicroPermissionList(microType, permissionList = []) {
68904
68927
  function listToMenuTree({ list: list2, menuTree, pageNode, parentId, crumbs, root: root2 }) {
68905
68928
  if (!list2)
68906
68929
  return;
68930
+ let appInfo = getSessionStorage("appInfo");
68907
68931
  list2.forEach((item2) => {
68908
68932
  const { permissionId, label: title4, appId, pid, icon, type: type2, uri, permissionValue } = item2;
68909
- let appInfo = getSessionStorage("appInfo");
68910
68933
  if (appId != appInfo.appId)
68911
68934
  return;
68912
68935
  const name2 = permissionValue;
@@ -69037,6 +69060,21 @@ async function renderRoutes({ router, store: store2, microType, allowPermissionL
69037
69060
  await store2.dispatch("getUserInfo");
69038
69061
  await store2.dispatch("getAppListData");
69039
69062
  const permissionData = await store2.dispatch("getPermissionData");
69063
+ const sessionVersion = JSON.parse(getSessionStorage("appInfo").extendProps.extendProps);
69064
+ const localVersion = getLocalStorage("versionInfo");
69065
+ if (localVersion) {
69066
+ if (sessionVersion.appVersion > localVersion.appVersion) {
69067
+ setLocalStorage("versionInfo", sessionVersion);
69068
+ let currentURL = window.location.href;
69069
+ let url = new URL(currentURL);
69070
+ let params = new URLSearchParams(url.search);
69071
+ params.set("v", sessionVersion.appVersion);
69072
+ url.search = params.toString();
69073
+ window.location.href = url.href;
69074
+ }
69075
+ } else {
69076
+ setLocalStorage("versionInfo", sessionVersion);
69077
+ }
69040
69078
  router.options = _.cloneDeep(routerOptionsBak);
69041
69079
  const microPermissionData = filterMicroPermissionList(microType, permissionData);
69042
69080
  const dynamicRouters = generatorDynamicRouter(microPermissionData);