@indfnd/common-mobile 0.0.14 → 0.0.16

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,22 @@
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.16](http://git.inspur.com/imp-ec/ind-front/ind-common-mobile-front/compare/v0.0.15...v0.0.16) (2024-04-11)
6
+
7
+
8
+ ### Features
9
+
10
+ * 更新localStorage的图标 ([278a5ba](http://git.inspur.com/imp-ec/ind-front/ind-common-mobile-front/commit/278a5ba0f0faf3981d35db726df221a79c9e3b29))
11
+ * 滚动条宽度高度处理 ([7e10c24](http://git.inspur.com/imp-ec/ind-front/ind-common-mobile-front/commit/7e10c24ce50c03c950f401d70589beff307a8695))
12
+
13
+ ### [0.0.15](http://git.inspur.com/imp-ec/ind-front/ind-common-mobile-front/compare/v0.0.14...v0.0.15) (2024-04-09)
14
+
15
+
16
+ ### Bug Fixes
17
+
18
+ * 修改组件支持选择面板readonly ([a72da9a](http://git.inspur.com/imp-ec/ind-front/ind-common-mobile-front/commit/a72da9a62c5da33668d0eafa8a0fc4da7793df0f))
19
+ * 增加登录用户管理单元的store ([a5ff5fa](http://git.inspur.com/imp-ec/ind-front/ind-common-mobile-front/commit/a5ff5faf821b5195891799e966df53bbe0d4b13e))
20
+
5
21
  ### [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
22
 
7
23
 
@@ -1,8 +1,8 @@
1
- import { getQuarterNum, getHalfYearNum, getHalfYear, formatDate, checkIdCard, checkVehicleNo, checkPhone, getDictMapApi, axios, useConfig, getLocalStorage, getMenuCollectApi, getCaptchaURL, guid, setLocalStorage, removeLocalStorage, clearSessionStorage, cryptor, listComTreeApi, 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, getHalfYear, formatDate, checkIdCard, checkVehicleNo, checkPhone, getDictMapApi, axios, useConfig, getLocalStorage, getCaptchaURL, guid, setLocalStorage, clearSessionStorage, cryptor, listComTreeApi, 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";
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.13";
5
+ const version$1 = "0.0.15";
6
6
  const author = "huxuetong";
7
7
  const publishConfig = {
8
8
  registry: "https://registry.npmjs.org/"
@@ -43909,28 +43909,6 @@ function install$3(_Vue) {
43909
43909
  Vue = _Vue;
43910
43910
  applyMixin(Vue);
43911
43911
  }
43912
- var mapMutations = normalizeNamespace(function(namespace2, mutations) {
43913
- var res = {};
43914
- normalizeMap(mutations).forEach(function(ref) {
43915
- var key = ref.key;
43916
- var val = ref.val;
43917
- res[key] = function mappedMutation() {
43918
- var args = [], len = arguments.length;
43919
- while (len--)
43920
- args[len] = arguments[len];
43921
- var commit2 = this.$store.commit;
43922
- if (namespace2) {
43923
- var module2 = getModuleByNamespace(this.$store, "mapMutations", namespace2);
43924
- if (!module2) {
43925
- return;
43926
- }
43927
- commit2 = module2.context.commit;
43928
- }
43929
- return typeof val === "function" ? val.apply(this, [commit2].concat(args)) : commit2.apply(this.$store, [val].concat(args));
43930
- };
43931
- });
43932
- return res;
43933
- });
43934
43912
  var mapActions = normalizeNamespace(function(namespace2, actions) {
43935
43913
  var res = {};
43936
43914
  normalizeMap(actions).forEach(function(ref) {
@@ -44052,158 +44030,20 @@ var render$k = function() {
44052
44030
  var _c = _vm._self._c || _h;
44053
44031
  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) {
44054
44032
  return _vm.$router.go(-1);
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);
44033
+ } } }), _c("div", { staticClass: "ind-main-content-wrapper ind-flex-grow", attrs: { "id": "keepalive" } }, [_c("KeepAlive", { attrs: { "max": _vm.$store.state.app.maxTabNum } }, [_c("RouterView", { key: _vm.$route.path })], 1)], 1)], 1);
44056
44034
  };
44057
44035
  var staticRenderFns$k = [];
44058
44036
  const __vue2_script$k = {
44059
44037
  name: "IndMBasicLayout",
44060
44038
  data() {
44061
- return {
44062
- isFullscreen: false,
44063
- activeName: "",
44064
- layout: "",
44065
- collapsedState: false,
44066
- collapsed: false,
44067
- mouseState: false
44068
- };
44069
- },
44070
- computed: {
44071
- tagNavList() {
44072
- return this.$store.state.app.tagNavList;
44073
- },
44074
- userName() {
44075
- return this.$store.state.user.userName;
44076
- },
44077
- notCacheName() {
44078
- return [this.$route.meta && this.$route.meta.notCache ? this.$route.name : ""];
44079
- },
44080
- cacheList() {
44081
- const list2 = (this.tagNavList || []).filter((item2) => !(item2.meta && item2.meta.notCache)).map((item2) => item2.name);
44082
- return ["IndEmptyLayout", ...list2];
44083
- },
44084
- menuList() {
44085
- return this.$store.getters.getMenuTreeList;
44086
- },
44087
- getAppInfo() {
44088
- return this.$store.getters.getAppInfo;
44089
- }
44039
+ return {};
44090
44040
  },
44041
+ computed: {},
44091
44042
  created() {
44092
- const { query } = this.$route;
44093
- if (query.layout === "screen") {
44094
- this.layout = "screen";
44095
- }
44096
44043
  },
44097
44044
  mounted() {
44098
- const { name: name2, params, query, meta } = this.$route;
44099
- if (query.layout === "screen") {
44100
- this.layout = "screen";
44101
- }
44102
- if (this.layout === "screen") {
44103
- return;
44104
- }
44105
- this.setTagNavList();
44106
- this.setHomeRoute(this.$router);
44107
- this.getCollectMenu();
44108
- this.addTag({ route: { name: name2, params, query, meta } });
44109
- this.setBreadCrumb(this.$route);
44110
- if (!this.tagNavList.find((item2) => item2.name === this.$route.name)) {
44111
- this.$router.push({
44112
- name: this.$config.homeRouteName
44113
- });
44114
- }
44115
- const crumbs = meta.crumbs;
44116
- if (crumbs) {
44117
- crumbs.forEach((item2) => {
44118
- if (item2.type === 2) {
44119
- this.$nextTick(() => {
44120
- this.activeName = item2.name;
44121
- });
44122
- }
44123
- });
44124
- }
44125
44045
  },
44126
- methods: {
44127
- ...mapMutations([
44128
- "setBreadCrumb",
44129
- "setTagNavList",
44130
- "setActiveName",
44131
- "addTag",
44132
- "setHomeRoute",
44133
- "closeTag",
44134
- "setCollectMenuList",
44135
- "setAppInfo"
44136
- ]),
44137
- ...mapActions(["handleLogin", "addMenuHistory"]),
44138
- turnToPage(route2) {
44139
- let { name: name2, params, query } = {};
44140
- if (typeof route2 === "string") {
44141
- name2 = route2;
44142
- } else {
44143
- name2 = route2.name;
44144
- params = route2.params;
44145
- query = route2.query;
44146
- }
44147
- if (name2.indexOf("isTurnByHref_") > -1) {
44148
- window.open(name2.split("_")[1]);
44149
- return;
44150
- }
44151
- if (name2 === this.$route.name) {
44152
- return;
44153
- }
44154
- this.addMenuHistory({ name: name2, params, query });
44155
- this.$router.push({
44156
- name: name2,
44157
- params,
44158
- query
44159
- });
44160
- },
44161
- handleCloseTag(res, type2, route2) {
44162
- if (type2 !== "others") {
44163
- if (type2 === "all") {
44164
- this.turnToPage(this.$config.homeRouteName);
44165
- } else {
44166
- if (routeEqual(this.$route, route2)) {
44167
- this.closeTag({
44168
- route: route2,
44169
- $router: this.$router
44170
- });
44171
- }
44172
- }
44173
- }
44174
- this.setTagNavList(res);
44175
- },
44176
- getCollectMenu() {
44177
- getMenuCollectApi().then((result) => {
44178
- this.setCollectMenuList(result.data);
44179
- });
44180
- },
44181
- handleClick(item2) {
44182
- if (this.getAppInfo.appId != item2.meta.appId) {
44183
- this.setAppInfo(item2.meta.appId);
44184
- }
44185
- this.turnToPage(item2);
44186
- },
44187
- handleCollapsedChange() {
44188
- this.collapsedState = !this.collapsedState;
44189
- this.changeCollapsed();
44190
- },
44191
- mouseOver() {
44192
- this.mouseState = true;
44193
- this.changeCollapsed();
44194
- },
44195
- mouseLeave() {
44196
- this.mouseState = false;
44197
- this.changeCollapsed();
44198
- },
44199
- changeCollapsed() {
44200
- if (this.collapsedState) {
44201
- this.collapsed = this.collapsedState && !this.mouseState;
44202
- } else {
44203
- this.collapsed = false;
44204
- }
44205
- }
44206
- }
44046
+ methods: {}
44207
44047
  };
44208
44048
  const __cssModules$k = {};
44209
44049
  var __component__$k = /* @__PURE__ */ normalizeComponent(
@@ -44228,7 +44068,7 @@ var render$j = function() {
44228
44068
  var _vm = this;
44229
44069
  var _h = _vm.$createElement;
44230
44070
  var _c = _vm._self._c || _h;
44231
- return _c("KeepAlive", { attrs: { "include": _vm.cacheList, "exclude": _vm.notCacheName } }, [_c("RouterView", { ref: "child" })], 1);
44071
+ return _c("KeepAlive", [_c("RouterView", { ref: "child" })], 1);
44232
44072
  };
44233
44073
  var staticRenderFns$j = [];
44234
44074
  const __vue2_script$j = {
@@ -44907,6 +44747,7 @@ const __vue2_script$f = {
44907
44747
  created() {
44908
44748
  this.getCaptcha();
44909
44749
  this.form.userName = getLocalStorage("username");
44750
+ this.form.password = getLocalStorage("password");
44910
44751
  },
44911
44752
  methods: {
44912
44753
  getCaptcha() {
@@ -44919,12 +44760,8 @@ const __vue2_script$f = {
44919
44760
  validCodeInput: this.form.validCode,
44920
44761
  validCodeId: this.validCodeId
44921
44762
  });
44922
- if (this.rememberMe) {
44923
- setLocalStorage("username", this.form.userName);
44924
- }
44925
- if (!this.rememberMe) {
44926
- removeLocalStorage("username");
44927
- }
44763
+ setLocalStorage("username", this.form.userName);
44764
+ setLocalStorage("password", this.form.password);
44928
44765
  }
44929
44766
  }
44930
44767
  };
@@ -63388,7 +63225,7 @@ var render$9 = function() {
63388
63225
  var _h = _vm.$createElement;
63389
63226
  var _c = _vm._self._c || _h;
63390
63227
  return _c("div", { staticClass: "ind-input-select" }, [_c("Input", { staticClass: "selected-input", class: { readonly: _vm.readonly }, attrs: { "value": _vm.selectedTitles, "title": _vm.selectedTitles, "icon": _vm.readonly ? "" : _vm.inputIcon, "placeholder": "\u8BF7\u9009\u62E9", "readonly": "" }, nativeOn: { "click": function($event) {
63391
- _vm.visible = true;
63228
+ return _vm.setVisible.apply(null, arguments);
63392
63229
  } } }), _c("IndMSelectPanel", _vm._b({ attrs: { "defaultVisible": _vm.defaultVisible, "title": _vm.title, "multiple": _vm.showCheckbox || _vm.multiple, "show": _vm.visible, "value": _vm.value, "type": _vm.type, "dataApi": _vm.dataApiComp, "columns": _vm.columnsComp, "rowKey": _vm.rowKeyComp }, on: { "update:show": function($event) {
63393
63230
  _vm.visible = $event;
63394
63231
  }, "input": function($event) {
@@ -63491,9 +63328,17 @@ const __vue2_script$9 = {
63491
63328
  watch: {
63492
63329
  value() {
63493
63330
  this.updateSelectedTitles();
63331
+ },
63332
+ options() {
63333
+ this.updateSelectedTitles();
63494
63334
  }
63495
63335
  },
63496
63336
  methods: {
63337
+ setVisible() {
63338
+ if (!this.readonly) {
63339
+ this.visible = true;
63340
+ }
63341
+ },
63497
63342
  initSelectedTitles(tree, selected) {
63498
63343
  this.updateSelectedTitles(selected);
63499
63344
  this.loading = false;
@@ -68411,6 +68256,7 @@ const __vue2_script$3 = {
68411
68256
  if (itemA.meta.permissionId === itemB.meta.permissionId) {
68412
68257
  found = true;
68413
68258
  itemB.state = false;
68259
+ itemA.meta.icon = itemB.meta.icon;
68414
68260
  break;
68415
68261
  }
68416
68262
  itemA.state = true;
@@ -68615,7 +68461,7 @@ var __component__$2 = /* @__PURE__ */ normalizeComponent(
68615
68461
  staticRenderFns$2,
68616
68462
  false,
68617
68463
  __vue2_injectStyles$2,
68618
- "be98c510",
68464
+ "048016ce",
68619
68465
  null,
68620
68466
  null
68621
68467
  );
@@ -69160,6 +69006,7 @@ var user = {
69160
69006
  state: {
69161
69007
  userName: "",
69162
69008
  avatarImgPath: "",
69009
+ userManageUnitId: "",
69163
69010
  token: getToken()
69164
69011
  },
69165
69012
  mutations: {
@@ -69169,6 +69016,9 @@ var user = {
69169
69016
  setUserName(state, name2) {
69170
69017
  state.userName = name2;
69171
69018
  },
69019
+ setUserManageUnitId(state, userManageUnitId) {
69020
+ state.userManageUnitId = userManageUnitId;
69021
+ },
69172
69022
  setToken(state, token) {
69173
69023
  state.token = token;
69174
69024
  setToken(token);
@@ -69190,6 +69040,7 @@ var user = {
69190
69040
  await logoutApi(state.token);
69191
69041
  commit2("setToken", "");
69192
69042
  commit2("setUserName", "");
69043
+ commit2("setUserManageUnitId", "");
69193
69044
  setTimeout(() => {
69194
69045
  window.location.reload();
69195
69046
  }, 0);
@@ -69199,11 +69050,13 @@ var user = {
69199
69050
  if (userInfo) {
69200
69051
  commit2("setAvatar", userInfo.userAvater);
69201
69052
  commit2("setUserName", userInfo.userName);
69053
+ commit2("setUserManageUnitId", userInfo.manageUnitId);
69202
69054
  return userInfo;
69203
69055
  }
69204
69056
  const { data: data49 } = await getUserInfoApi();
69205
69057
  commit2("setAvatar", data49.userAvater);
69206
69058
  commit2("setUserName", data49.userName);
69059
+ commit2("setUserManageUnitId", data49.manageUnitId);
69207
69060
  setUserInfoCache(data49);
69208
69061
  return data49;
69209
69062
  }