diff --git a/public/components/frame/breadcrumb/breadcrumb.html b/public/components/frame/breadcrumb/breadcrumb.html
index 988c11a56..0cfbe1860 100755
--- a/public/components/frame/breadcrumb/breadcrumb.html
+++ b/public/components/frame/breadcrumb/breadcrumb.html
@@ -1,19 +1,9 @@
-
-
-
-
{{breadCrumbs.length > 0 ? breadCrumbs[breadCrumbs.length-1].pageName : ''}}
-
- -
- 首页
-
- -
-
- {{breadCrumb.pageName}}
-
- {{breadCrumb.pageName}}
-
-
-
-
-
+
+
+ -
+ {{item.pageName}}
+
+
+
+
\ No newline at end of file
diff --git a/public/components/frame/breadcrumb/breadcrumb.js b/public/components/frame/breadcrumb/breadcrumb.js
index dd9285239..86b235052 100755
--- a/public/components/frame/breadcrumb/breadcrumb.js
+++ b/public/components/frame/breadcrumb/breadcrumb.js
@@ -19,49 +19,36 @@
methods:{
_freshBreadCrumbByUrl:function(){
- var _tmpMenus = vc.getMenus();
- var _path = location.hash;
- if(location.hash.indexOf('?') != -1){
- _path = location.hash.substring(0,location.hash.indexOf('?'));
- }
- var _url = vc.getUrl()+_path;
- /**
- 正常情况下是走不到这里的,
- 因为系统登录时,就已经加载菜单信息缓存到本地了
+ let tabs = vc.getTabFromLocal();
+
+ let _tmpMenus = vc.getMenus();
- **/
if(_tmpMenus == null || _tmpMenus == undefined){
return ;
}
- for(var menuIndex =0 ; menuIndex < _tmpMenus.length;menuIndex ++){
- //两层结构的情况
- if(_tmpMenus[menuIndex].hasOwnProperty('childs')){
- var _childs = _tmpMenus[menuIndex].childs;
- for(var _childIndex = 0; _childIndex < _childs.length; _childIndex ++){
- if(this._getRealUrl(_childs[_childIndex].href) == _url){
- var _tmpBreadCrumbInf = {
- parentPageName: "",
- pageName: _tmpMenus[menuIndex].name
- };
- this.breadCrumbs.push(_tmpBreadCrumbInf);
+
+ tabs.forEach(item => {
+ let _path = item;
+ if(_path.indexOf('?') != -1){
+ _path = _path.substring(0,_path.indexOf('?'));
+ }
+ let _url = vc.getUrl()+_path;
+
+ _tmpMenus.forEach(_menu =>{
+ _menu.childs.forEach(child=>{
+ console.log(_url,child.href)
+ if(_url == child.href){
_tmpBreadCrumbInf = {
- parentPageName: _tmpMenus[menuIndex].name,
- pageName: _childs[_childIndex].name
+ href: child.href,
+ pageName: child.name,
+ active:'0'
};
this.breadCrumbs.push(_tmpBreadCrumbInf);
- break;
}
- }
- }else{
- if(this._getRealUrl(_tmpMenus[menuIndex].href) == url){
- var _tmpBreadCrumbInf = {
- parentPageName: "首页",
- pageName: _tmpMenus[menuIndex].name
- };
- this.breadCrumbs.push(_tmpBreadCrumbInf);
- }
- }
- }
+ })
+ })
+
+ });
},
_getRealUrl:function(_url){
@@ -69,6 +56,9 @@
return _url.substring(0, _url.indexOf('?'));
}
return _url;
+ },
+ _changeSmallTab:function(){
+
}
},
diff --git a/public/css/vc-ui.css b/public/css/vc-ui.css
index 94ef61b52..33271a622 100755
--- a/public/css/vc-ui.css
+++ b/public/css/vc-ui.css
@@ -940,7 +940,7 @@ ul.nav-second-level {
}
.vc-content {
- padding: 20px 20px 40px;
+ padding: 20px 10px 20px;
}
.white-bg {
diff --git a/public/pages/common/enterCommunity/enterCommunity.html b/public/pages/common/enterCommunity/enterCommunity.html
index d9be165fb..9d58305d3 100755
--- a/public/pages/common/enterCommunity/enterCommunity.html
+++ b/public/pages/common/enterCommunity/enterCommunity.html
@@ -32,17 +32,17 @@
|
- |
- |
- |
@@ -55,7 +55,7 @@
{{community.address}}
-->
-
+
{{community.communityId}}
|
@@ -70,12 +70,12 @@
-
+
{{community.startTime}}
|
- |
@@ -86,7 +86,7 @@
{{community.cityCode}}
-->
-
+
{{_showCommunityStatus(community.auditStatusCd)}}
|
diff --git a/public/vcCore/vcFramework.js b/public/vcCore/vcFramework.js
index 908afe59b..ed6c65a9b 100755
--- a/public/vcCore/vcFramework.js
+++ b/public/vcCore/vcFramework.js
@@ -1998,6 +1998,12 @@
if (!vcFramework.notNull(_componentUrl)) {
return;
}
+ //获取参数
+ let _tab = vc.getParam('tab')
+
+ if(_tab){
+ vcFramework.setTabToLocal(_componentUrl);
+ }
refreshVcFramework();
vcFramework.reBuilderVcTree();
}, false);
@@ -2619,6 +2625,22 @@
vcFramework.setPageRouteToLocal = function(_obj) {
let routes = vcFramework.getPageRouteFromLocal();
+
+ //判断是否已经有 如果有则删除
+ let loction = 0;
+ for (let routeIndex = 0; routeIndex < routes.length; routeIndex++) {
+ _tmpRoute = routes[routeIndex];
+ if (!_tmpRoute.pagePath || _tmpRoute.pagePath != _obj.pagePath) {
+ continue;
+ }
+ loction = routeIndex;
+ routes.splice(loction, 1);
+ }
+
+ if(routes.length > 20){
+ routes.shift();
+ }
+
routes.push(_obj);
window.localStorage.setItem('vcPageRoute', JSON.stringify(routes));
}
@@ -2678,10 +2700,10 @@
}
for (_key in _component) {
- if (_key.startsWith('$') || typeof key == 'function') {
+ if (_key.startsWith('$') || _key.startsWith('_') || typeof _key == 'function') {
continue;
}
- _pageData.pageData[key] = _component[key];
+ _pageData.pageData[_key] = _component[_key];
}
vcFramework.setPageRouteToLocal(_pageData);
}
@@ -2690,4 +2712,47 @@
//寻找当前页面是否在路由中 如果有恢复下数据,并做弹出
vcFramework.recoverComponentByPageRoute();
}, false);
+
+
+ vcFramework.getTabFromLocal = function() {
+ let tabStr = window.localStorage.getItem('vcTab');
+
+ let tabs = [];
+
+ if (!tabStr) {
+ window.localStorage.setItem('vcTab', JSON.stringify(tabs))
+ } else {
+ tabs = JSON.parse(tabStr);
+ }
+
+ return tabs;
+ }
+
+ vcFramework.setTabToLocal = function(_obj) {
+ let tabs = vcFramework.getTabFromLocal();
+
+ //判断是否已经有 如果有则删除
+ for (let tabIndex = 0; tabIndex < tabs.length; tabIndex++) {
+ _tmpTab = tabs[tabIndex];
+ if (_tmpTab[tabIndex] == _obj) {
+ return ;
+ }
+ }
+ if(tabs.length > 20){
+ tabs.shift();
+ }
+ tabs.push(_obj);
+ window.localStorage.setItem('vcTab', JSON.stringify(tabs));
+ }
+
+ vcFramework.deleteTabToLocal = function(_obj) {
+ let routes = vcFramework.getPageRouteFromLocal();
+ for (let tabIndex = 0; tabIndex < tabs.length; tabIndex++) {
+ _tmpTab = tabs[tabIndex];
+ if (_tmpTab[tabIndex] == _obj) {
+ tabs.splice(tabIndex,1);
+ }
+ }
+ window.localStorage.setItem('vcPageRoute', JSON.stringify(routes));
+ }
})(window.vcFramework);
\ No newline at end of file