@indfnd/common-mobile 0.0.14 → 0.0.15
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 +8 -0
- package/dist/ind-common-mobile.es.js +23 -168
- package/dist/ind-common-mobile.umd.cjs +29 -29
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,14 @@
|
|
|
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.15](http://git.inspur.com/imp-ec/ind-front/ind-common-mobile-front/compare/v0.0.14...v0.0.15) (2024-04-09)
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
### Bug Fixes
|
|
9
|
+
|
|
10
|
+
* 修改组件支持选择面板readonly ([a72da9a](http://git.inspur.com/imp-ec/ind-front/ind-common-mobile-front/commit/a72da9a62c5da33668d0eafa8a0fc4da7793df0f))
|
|
11
|
+
* 增加登录用户管理单元的store ([a5ff5fa](http://git.inspur.com/imp-ec/ind-front/ind-common-mobile-front/commit/a5ff5faf821b5195891799e966df53bbe0d4b13e))
|
|
12
|
+
|
|
5
13
|
### [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
14
|
|
|
7
15
|
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { getQuarterNum, getHalfYearNum, getHalfYear, formatDate, checkIdCard, checkVehicleNo, checkPhone, getDictMapApi, axios, useConfig, getLocalStorage,
|
|
1
|
+
import { getQuarterNum, getHalfYearNum, getHalfYear, formatDate, checkIdCard, checkVehicleNo, checkPhone, getDictMapApi, axios, useConfig, getLocalStorage, 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";
|
|
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.
|
|
5
|
+
const version$1 = "0.0.14";
|
|
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: { "
|
|
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",
|
|
44071
|
+
return _c("KeepAlive", [_c("RouterView", { ref: "child" })], 1);
|
|
44232
44072
|
};
|
|
44233
44073
|
var staticRenderFns$j = [];
|
|
44234
44074
|
const __vue2_script$j = {
|
|
@@ -63388,7 +63228,7 @@ var render$9 = function() {
|
|
|
63388
63228
|
var _h = _vm.$createElement;
|
|
63389
63229
|
var _c = _vm._self._c || _h;
|
|
63390
63230
|
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.
|
|
63231
|
+
return _vm.setVisible.apply(null, arguments);
|
|
63392
63232
|
} } }), _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
63233
|
_vm.visible = $event;
|
|
63394
63234
|
}, "input": function($event) {
|
|
@@ -63491,9 +63331,17 @@ const __vue2_script$9 = {
|
|
|
63491
63331
|
watch: {
|
|
63492
63332
|
value() {
|
|
63493
63333
|
this.updateSelectedTitles();
|
|
63334
|
+
},
|
|
63335
|
+
options() {
|
|
63336
|
+
this.updateSelectedTitles();
|
|
63494
63337
|
}
|
|
63495
63338
|
},
|
|
63496
63339
|
methods: {
|
|
63340
|
+
setVisible() {
|
|
63341
|
+
if (!this.readonly) {
|
|
63342
|
+
this.visible = true;
|
|
63343
|
+
}
|
|
63344
|
+
},
|
|
63497
63345
|
initSelectedTitles(tree, selected) {
|
|
63498
63346
|
this.updateSelectedTitles(selected);
|
|
63499
63347
|
this.loading = false;
|
|
@@ -69160,6 +69008,7 @@ var user = {
|
|
|
69160
69008
|
state: {
|
|
69161
69009
|
userName: "",
|
|
69162
69010
|
avatarImgPath: "",
|
|
69011
|
+
userManageUnitId: "",
|
|
69163
69012
|
token: getToken()
|
|
69164
69013
|
},
|
|
69165
69014
|
mutations: {
|
|
@@ -69169,6 +69018,9 @@ var user = {
|
|
|
69169
69018
|
setUserName(state, name2) {
|
|
69170
69019
|
state.userName = name2;
|
|
69171
69020
|
},
|
|
69021
|
+
setUserManageUnitId(state, userManageUnitId) {
|
|
69022
|
+
state.userManageUnitId = userManageUnitId;
|
|
69023
|
+
},
|
|
69172
69024
|
setToken(state, token) {
|
|
69173
69025
|
state.token = token;
|
|
69174
69026
|
setToken(token);
|
|
@@ -69190,6 +69042,7 @@ var user = {
|
|
|
69190
69042
|
await logoutApi(state.token);
|
|
69191
69043
|
commit2("setToken", "");
|
|
69192
69044
|
commit2("setUserName", "");
|
|
69045
|
+
commit2("setUserManageUnitId", "");
|
|
69193
69046
|
setTimeout(() => {
|
|
69194
69047
|
window.location.reload();
|
|
69195
69048
|
}, 0);
|
|
@@ -69199,11 +69052,13 @@ var user = {
|
|
|
69199
69052
|
if (userInfo) {
|
|
69200
69053
|
commit2("setAvatar", userInfo.userAvater);
|
|
69201
69054
|
commit2("setUserName", userInfo.userName);
|
|
69055
|
+
commit2("setUserManageUnitId", userInfo.manageUnitId);
|
|
69202
69056
|
return userInfo;
|
|
69203
69057
|
}
|
|
69204
69058
|
const { data: data49 } = await getUserInfoApi();
|
|
69205
69059
|
commit2("setAvatar", data49.userAvater);
|
|
69206
69060
|
commit2("setUserName", data49.userName);
|
|
69061
|
+
commit2("setUserManageUnitId", data49.manageUnitId);
|
|
69207
69062
|
setUserInfoCache(data49);
|
|
69208
69063
|
return data49;
|
|
69209
69064
|
}
|