bhq@iemsoft.cn
2018-11-01 6b6e04617cd38626c79b63726a56dbd76049dee6
报表预览时  工具栏 分页不显示
7 files modified
194 ■■■■ changed files
report-console/src/main/resources/report-asserts/js/common.bundle.js 8 ●●●● patch | view | raw | blame | history
report-console/src/main/resources/report-html/html-preview.html 11 ●●●●● patch | view | raw | blame | history
report-js/src/common.js 132 ●●●●● patch | view | raw | blame | history
report-js/src/i18n/i18n.js 1 ●●●● patch | view | raw | blame | history
src/app/core/themes/themes.service.ts 2 ●●● patch | view | raw | blame | history
src/app/routes/menu.ts 6 ●●●● patch | view | raw | blame | history
src/app/routes/routes.ts 34 ●●●● patch | view | raw | blame | history
report-console/src/main/resources/report-asserts/js/common.bundle.js
@@ -46,8 +46,7 @@
    'use strict';var _i18n=__webpack_require__(1);var _i18n2=_interopRequireDefault(_i18n);function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}window.encryptKey='';/**
     * Created by Huiqi.Bao on 2018-09-07.
     */window.is_encrypt='';window.quit_url='';window.contextPath='';window._server='';$(document).ready(function(){sysInitConifg();// 国际化
    (0,_i18n2.default)();});window.sysInitConifg=function(){$.ajax({method:'GET',url:'/assets/config/config.json',dataType:'json',contentType:"application/json",async:false}).done(function(res){window.encryptKey=decryptByMD5(res.config.encryptKey,window.encryptKey);window.is_encrypt=decryptByMD5(res.config.is_encrypt,window.encryptKey);window.quit_url=decryptByMD5(res.config.quit_url,window.encryptKey);window.contextPath=decryptByMD5(res.config.service,window.encryptKey);window._server=window.contextPath+'/ereport/report';window._contextPath=window.contextPath;});};window.initPreview=function(){var data={'id':getQueryString('id'),'groupId':getQueryString('groupId')};if(getQueryStringAll()){data=$.extend(data,getQueryStringAll());}$.ajax({method:'GET',data:data,url:window.contextPath+'/ereport/report/preview',dataType:'json',contentType:"application/json",async:false}).done(function(res){window.preview=res;$('#_ureport_table').append(window.preview.content);$('#downSearchFormHtml').append(window.preview.downSearchFormHtml);$('#upSearchFormHtml').append(window.preview.upSearchFormHtml);if(window.preview.tools.show){$('#tools_show').show();}if(window.preview.tools.print){$('#tools_print').show();}if(window.preview.tools.pdfPrint){$('#tools_pdfPrint').show();}if(window.preview.sortInfos.length>0){$('#sortInfors_sort').show();}if(window.preview.tools.pdf){$('#tools_pdf').show();}if(window.preview.tools.word){$('#tools_word').show();}if(window.preview.tools.excel){$('#tools_excel').show();}if(window.preview.tools.pagingExcel){$('#tools_pagingExcel').show();}if(window.preview.tools.pdfPreviewPrint){$('#tools_pdfPreviewPrint').show();}if(window.preview.tools.sheetPagingExcel){$('#tools_sheetPagingExcel').show();}if(window.preview.tools.pdfPreviewPrint){$('#tools_pdfPreviewPrint').show();}if(window.preview.tools.pdfPreviewPrint){$('#tools_pdfPreviewPrint').show();}if(window.preview.tools.pdfPreviewPrint){$('#tools_pdfPreviewPrint').show();}if(window.preview.pageIndex>0){$('#pagingContainer').show();}if(window.preview.totalPageWithCol>0){$('#totalPageLabel').append(window.preview.totalPageWithCol);for(var i=1;i<=window.preview.totalPageWithCol;i++){$('#pageSelector').append('<option>'+i+'</option>');}}$('#_ureport_table_style').append(window.preview.style);if(window.preview.param.sysSort){$('#sysSort').val(window.preview.param.sysSort);}if(window.preview.param.sysHide){$('#sysHide').val(window.preview.param.sysHide);}if(window.preview.reportAlign){$('#align_reportAlign').css('text-align',window.preview.reportAlign);$('#_ureport_table').css('float',window.preview.reportAlign);}});};window.initDesigner=function(){var data={"id":getQueryString('id'),"groupId":getQueryString('groupId')};if(getQueryStringAll()){data=$.extend(data,getQueryStringAll());}$.ajax({method:'GET',data:data,url:window.contextPath+'/ereport/report/designer',dataType:'json',contentType:"application/json",async:false}).done(function(res){window._groupId=res.reportGroupId;window._id=res.reportId;window._name=res.reportName;window._refModelId=res.refModelId;window.isRef=res.isRef;window.creatState=res.creatState;});};window.getQueryString=function(name){var url=window.location.href;var index=url.indexOf('?');var str=url.substring(index+1);var arr=str.split('&');var result={};arr.forEach(function(item){var a=item.split('=');result[a[0]]=a[1];});return result[name];};window.getQueryStringAll=function(){var url=window.location.href;var index=url.indexOf('?');var str=url.substring(index+1);var arr=str.split('&');var result={};arr.forEach(function(item){var a=item.split('=');result[a[0]]=a[1];});return result;};window.getCookie=function(cookie_name){var allcookies=document.cookie;var cookie_pos=allcookies.indexOf(cookie_name);//索引的长度
     */window.is_encrypt='';window.quit_url='';window.contextPath='';window._server='';window.getCookie=function(cookie_name){var allcookies=document.cookie;var cookie_pos=allcookies.indexOf(cookie_name);//索引的长度
    // 如果找到了索引,就代表cookie存在,
    // 反之,就说明不存在。
    if(cookie_pos!=-1){// 把cookie_pos放在值的开始,只要给值加1即可。
@@ -55,7 +54,8 @@
    var cookie_end=allcookies.indexOf(";",cookie_pos);if(cookie_end==-1){cookie_end=allcookies.length;};var value=unescape(allcookies.substring(cookie_pos,cookie_end));//这里就可以得到你想要的cookie的值了。。。
    };if(value){try{var item=decryptByDES(value,window.encryptKey);if(item==""){return value;}return item;// this.getCookie(decryptByDES(item,""));
    }catch(error){return value;}}else{return null;}// return value;
    };
    };window.getQueryString=function(name){var url=window.location.href;var index=url.indexOf('?');var str=url.substring(index+1);var arr=str.split('&');var result={};arr.forEach(function(item){var a=item.split('=');result[a[0]]=a[1];});return result[name];};window.getQueryStringAll=function(){var url=window.location.href;var index=url.indexOf('?');var str=url.substring(index+1);var arr=str.split('&');var result={};arr.forEach(function(item){var a=item.split('=');result[a[0]]=a[1];});return result;};(0,_i18n2.default)();$(document).ready(function(){sysInitConifg();// 国际化
    });window.sysInitConifg=function(){$.ajax({method:'GET',url:'/assets/config/config.json',dataType:'json',contentType:"application/json",async:false}).done(function(res){window.encryptKey=decryptByMD5(res.config.encryptKey,window.encryptKey);window.is_encrypt=decryptByMD5(res.config.is_encrypt,window.encryptKey);window.quit_url=decryptByMD5(res.config.quit_url,window.encryptKey);window.contextPath=decryptByMD5(res.config.service,window.encryptKey);window._server=window.contextPath+'/ereport/report';window._contextPath=window.contextPath;});};window.initPreview=function(){var data={'id':getQueryString('id'),'groupId':getQueryString('groupId')};if(getQueryStringAll()){data=$.extend(data,getQueryStringAll());}$.ajax({method:'GET',data:data,url:window.contextPath+'/ereport/report/preview',dataType:'json',contentType:"application/json",async:false}).done(function(res){window.preview=res;$('#_ureport_table').append(window.preview.content);$('#downSearchFormHtml').append(window.preview.downSearchFormHtml);$('#upSearchFormHtml').append(window.preview.upSearchFormHtml);if(window.preview.tools.show){$('#tools_show').show();}if(window.preview.tools.print){$('#tools_print').show();}if(window.preview.tools.pdfPrint){$('#tools_pdfPrint').show();}if(window.preview.sortInfos.length>0){$('#sortInfors_sort').show();}if(window.preview.tools.pdf){$('#tools_pdf').show();}if(window.preview.tools.word){$('#tools_word').show();}if(window.preview.tools.excel){$('#tools_excel').show();}if(window.preview.tools.pagingExcel){$('#tools_pagingExcel').show();}if(window.preview.tools.pdfPreviewPrint){$('#tools_pdfPreviewPrint').show();}if(window.preview.tools.sheetPagingExcel){$('#tools_sheetPagingExcel').show();}if(window.preview.tools.pdfPreviewPrint){$('#tools_pdfPreviewPrint').show();}if(window.preview.tools.pdfPreviewPrint){$('#tools_pdfPreviewPrint').show();}if(window.preview.tools.pdfPreviewPrint){$('#tools_pdfPreviewPrint').show();}if(window.preview.pageIndex>0){$('#pagingContainer').show();}if(window.preview.totalPageWithCol>0){$('#totalPageLabel').append(window.preview.totalPageWithCol);for(var i=1;i<=window.preview.totalPageWithCol;i++){$('#pageSelector').append('<option>'+i+'</option>');}}$('#_ureport_table_style').append(window.preview.style);if(window.preview.param.sysSort){$('#sysSort').val(window.preview.param.sysSort);}if(window.preview.param.sysHide){$('#sysHide').val(window.preview.param.sysHide);}if(window.preview.reportAlign){$('#align_reportAlign').css('text-align',window.preview.reportAlign);$('#_ureport_table').css('float',window.preview.reportAlign);}console.log('-----');console.log($("#common_page"));console.log(window);console.log(window.i18n);console.log(window.i18n.tools.preview.common);console.log('-----');$("#common_page").html(window.i18n.tools.preview.common);$("#page").html(window.i18n.tools.preview.page);$("#exportExcel").attr("title",window.i18n.tools.preview.exportExcel);$("#onlinePrinting").attr("title",window.i18n.tools.preview.onlinePrinting);});};window.initDesigner=function(){var data={"id":getQueryString('id'),"groupId":getQueryString('groupId')};if(getQueryStringAll()){data=$.extend(data,getQueryStringAll());}$.ajax({method:'GET',data:data,url:window.contextPath+'/ereport/report/designer',dataType:'json',contentType:"application/json",async:false}).done(function(res){window._groupId=res.reportGroupId;window._id=res.reportId;window._name=res.reportName;window._refModelId=res.refModelId;window.isRef=res.isRef;window.creatState=res.creatState;});};
/***/ }),
/* 1 */
@@ -63,7 +63,7 @@
    'use strict';Object.defineProperty(exports,"__esModule",{value:true});exports.default=buildLocal;var _zh=__webpack_require__(2);var _zh2=_interopRequireDefault(_zh);var _en=__webpack_require__(3);var _en2=_interopRequireDefault(_en);function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}/**
     * Created by Jacky.Gao on 2017-10-01.
     */function buildLocal(){var language=window.navigator.language||window.navigator.browserLanguage;var cookid_language=window.getCookie('Language');var url_language=window.getQueryString('Language');if(cookid_language){language=cookid_language;}if(url_language){language=url_language;}if(!language){language='zh-CN';}window.i18n=_zh2.default;if(language!=='zh-CN'){window.i18n=_en2.default;}setCookie('Language',language);function setCookie(name,value){//设置cookie
     */function buildLocal(){console.log('buildLocal');var language=window.navigator.language||window.navigator.browserLanguage;var cookid_language=window.getCookie('Language');var url_language=window.getQueryString('Language');if(cookid_language){language=cookid_language;}if(url_language){language=url_language;}if(!language){language='zh-CN';}window.i18n=_zh2.default;if(language!=='zh-CN'){window.i18n=_en2.default;}setCookie('Language',language);function setCookie(name,value){//设置cookie
    var Days=30;var exp=new Date();exp.setTime(exp.getTime()+Days*24*60*60*1000);document.cookie=name+"="+escape(value)+";path=/;expires="+exp.toGMTString();};}
/***/ }),
report-console/src/main/resources/report-html/html-preview.html
@@ -195,7 +195,6 @@
    }
    function initSelect(id, selectObj, inputJson, liveSearch){
        console.log('000000006');
        var otherData = {};
        if (window.preview._u) { otherData._u = window.preview._u}
@@ -249,7 +248,6 @@
        return _tempArr.join(",")
    }
    function zTreeObjInit(obj){
        console.log('000000005');
        var elName = obj.name;
        var setting = obj.setting;
        console.log(setting);
@@ -314,7 +312,6 @@
    }
     function zTreeOnCheck(event, treeId, treeNode) {
         console.log('000000001');
        var containSubset = $("#" + treeId+"_elWrap").attr("containSubset");
        if ($("#" + treeId).attr("Multi") == "Multi"){
            var selectData = $("#"+treeId+"_input_hidden").attr("tree-selectData")||"";
@@ -376,7 +373,6 @@
        }
    }
    function zTreeOnClick(event, treeId, treeNode) {
        console.log('000000002');
        if ($("#" + treeId).attr("Multi") != "Multi") {
            var selectData = $("#"+treeId+"_input_hidden").attr("tree-selectData")||"";
                isJSON(selectData)?selectData = JSON.parse(selectData):selectData = [];
@@ -389,7 +385,6 @@
    }
    // 树异步加载
        function treeAsyncSearch(e){
            console.log('000000003');
            var __setting = {};
            var __treeData = JSON.parse(e.data.treeData);
            Object.assign(__setting, e.data.setting);
@@ -406,7 +401,6 @@
            }
            
            function startAsyncSearch(){
                console.log('000000004');
                if($.trim(__search)){
                        $.get(_url+"&"+__key+"="+_selectedVal.join(",")+"&search="+$.trim(__search),function(res){
                        $.fn.zTree.init($("#" + __id), __setting, res);
@@ -446,10 +440,7 @@
        }
        $("#common_page").html(window.i18n.tools.preview.common);
        $("#page").html(window.i18n.tools.preview.page);
        $("#exportExcel").attr("title",window.i18n.tools.preview.exportExcel);
        $("#onlinePrinting").attr("title",window.i18n.tools.preview.onlinePrinting);
});
</script>
report-js/src/common.js
@@ -9,10 +9,70 @@
window.contextPath = '';
window._server = '';
window.getCookie = function(cookie_name) {
    var allcookies = document.cookie;
    var cookie_pos = allcookies.indexOf(cookie_name);//索引的长度
    // 如果找到了索引,就代表cookie存在,
    // 反之,就说明不存在。
    if (cookie_pos != -1){
        // 把cookie_pos放在值的开始,只要给值加1即可。
        cookie_pos += cookie_name.length + 1;//这里容易出问题,所以请大家参考的时候自己好好研究一下
        var cookie_end = allcookies.indexOf(";", cookie_pos);
        if (cookie_end == -1)
        {
            cookie_end = allcookies.length;
        };
        var value = unescape(allcookies.substring(cookie_pos, cookie_end));//这里就可以得到你想要的cookie的值了。。。
    };
    if (value) {
        try{
            var item = decryptByDES(value,window.encryptKey);
            if(item==""){
                return value;
            }
            return item;
            // this.getCookie(decryptByDES(item,""));
          }catch(error){
            return value;
          }
    }else{
        return null;
    }
    // return value;
};
window.getQueryString =function(name) {
      var url = window.location.href;
      var index = url.indexOf('?')
      var str = url.substring(index + 1);
      var arr = str.split('&');
      var result = {};
      arr.forEach(function (item){
          var a = item.split('=');
          result[a[0]] = a[1];
      })
      return result[name];
}
window.getQueryStringAll =function() {
      var url = window.location.href;
      var index = url.indexOf('?')
      var str = url.substring(index + 1);
      var arr = str.split('&');
      var result = {};
      arr.forEach(function (item){
          var a = item.split('=');
          result[a[0]] = a[1];
      })
      return result;
}
    buildLocal();
$(document).ready(function(){
    sysInitConifg();
    // 国际化
    buildLocal();
});
@@ -120,6 +180,17 @@
            $('#align_reportAlign').css('text-align',window.preview.reportAlign);
            $('#_ureport_table').css('float',window.preview.reportAlign);
        }
        console.log('-----');
        console.log($("#common_page"));
        console.log(window);
        console.log(window.i18n);
        console.log(window.i18n.tools.preview.common);
        console.log('-----');
        $("#common_page").html(window.i18n.tools.preview.common);
        $("#page").html(window.i18n.tools.preview.page);
        $("#exportExcel").attr("title",window.i18n.tools.preview.exportExcel);
        $("#onlinePrinting").attr("title",window.i18n.tools.preview.onlinePrinting);
        
    })
}
@@ -154,63 +225,6 @@
}
window.getQueryString =function(name) {
      var url = window.location.href;
      var index = url.indexOf('?')
      var str = url.substring(index + 1);
      var arr = str.split('&');
      var result = {};
      arr.forEach(function (item){
          var a = item.split('=');
          result[a[0]] = a[1];
      })
      return result[name];
}
window.getQueryStringAll =function() {
      var url = window.location.href;
      var index = url.indexOf('?')
      var str = url.substring(index + 1);
      var arr = str.split('&');
      var result = {};
      arr.forEach(function (item){
          var a = item.split('=');
          result[a[0]] = a[1];
      })
      return result;
}
window.getCookie = function(cookie_name) {
    var allcookies = document.cookie;
    var cookie_pos = allcookies.indexOf(cookie_name);//索引的长度
    // 如果找到了索引,就代表cookie存在,
    // 反之,就说明不存在。
    if (cookie_pos != -1){
        // 把cookie_pos放在值的开始,只要给值加1即可。
        cookie_pos += cookie_name.length + 1;//这里容易出问题,所以请大家参考的时候自己好好研究一下
        var cookie_end = allcookies.indexOf(";", cookie_pos);
        if (cookie_end == -1)
        {
            cookie_end = allcookies.length;
        };
        var value = unescape(allcookies.substring(cookie_pos, cookie_end));//这里就可以得到你想要的cookie的值了。。。
    };
    if (value) {
        try{
            var item = decryptByDES(value,window.encryptKey);
            if(item==""){
                return value;
            }
            return item;
            // this.getCookie(decryptByDES(item,""));
          }catch(error){
            return value;
          }
    }else{
        return null;
    }
    // return value;
};
report-js/src/i18n/i18n.js
@@ -4,6 +4,7 @@
import defaultI18nJsonData from './zh.json';
import en18nJsonData from './en.json';
export default function buildLocal(){
    console.log('buildLocal');
    let language=window.navigator.language || window.navigator.browserLanguage;
    var cookid_language = window.getCookie('Language');
    var url_language = window.getQueryString('Language');
src/app/core/themes/themes.service.ts
@@ -13,7 +13,7 @@
export class ThemesService {
    styleTag: any;
    defaultTheme: string = 'A';
    defaultTheme: string = 'F';
    constructor() {
        this.createStyle();
src/app/routes/menu.ts
@@ -124,9 +124,9 @@
//     icon:"icon-briefcase"
// }
const Fixedassets = {
    text:'固定资产',
    link:'/Layout/Fixedassets',
    icon:'icon-calculator',
    text: '固定资产',
    link: '/Layout/Fixedassets',
    icon: 'icon-calculator',
    submenu: [
        {
            text: '固定资产信息',
src/app/routes/routes.ts
@@ -7,32 +7,32 @@
import { Loginguard } from 'app/service/login-guard.service';
import { PreviewComponent } from "app/routes/widget-manager/my-widget/preview/preview.component";
export const routes = [
     { path: '', redirectTo: 'login', pathMatch: 'full' },
 { path: 'login', component: LoginComponent },
 { path: 'admin-login', component: LoginComponent },
 { path:'main',component: MainComponent,canActivate:[Loginguard]},
 { path:'preview',component:PreviewComponent,canActivate:[Loginguard]},
{
    { path: '', redirectTo: 'login', pathMatch: 'full' },
    { path: 'login', component: LoginComponent },
    { path: 'admin-login', component: LoginComponent },
    { path: 'main', component: MainComponent, canActivate: [Loginguard] },
    { path: 'preview', component: PreviewComponent, canActivate: [Loginguard] },
    {
        path: '',
        component: LayoutComponent,
        children: [
            // { path: '', redirectTo: 'home', pathMatch: 'full',canActivate:[Loginguard] },
            // { path: '', redirectTo: 'home', pathMatch: 'full',canActivate:[Loginguard]},
               { path: 'home', loadChildren: './home/home.module#HomeModule'},
            { path: 'home', loadChildren: './home/home.module#HomeModule',canActivate:[Loginguard] },
            { path: 'dashboard', loadChildren: './dashboard/dashboard.module#DashboardModule',canActivate:[Loginguard] },
            { path: 'data-setting', loadChildren: './data-setting/data-setting.module#DataSettingModule',canActivate:[Loginguard]},
            { path: 'widget-manager', loadChildren: './widget-manager/widget-manager.module#WidgetManagerModule',canActivate:[Loginguard]},
            { path: 'system-setting', loadChildren: './system-setting/system-setting.module#SystemSettingModule',canActivate:[Loginguard]},
            { path: 'authority-manager', loadChildren: './authority-manager/authority-manager.module#AuthorityManagerModule',canActivate:[Loginguard]},
            { path: 'platform-setting', loadChildren: './platform-setting/platform-setting.module#PlatformSettingModule',canActivate:[Loginguard]},
            { path: 'tables', loadChildren: './tables/tables.module#TablesModule',canActivate:[Loginguard]},
            { path: 'home', loadChildren: './home/home.module#HomeModule' },
            { path: 'home', loadChildren: './home/home.module#HomeModule', canActivate: [Loginguard] },
            { path: 'dashboard', loadChildren: './dashboard/dashboard.module#DashboardModule', canActivate: [Loginguard] },
            { path: 'data-setting', loadChildren: './data-setting/data-setting.module#DataSettingModule', canActivate: [Loginguard] },
            { path: 'widget-manager', loadChildren: './widget-manager/widget-manager.module#WidgetManagerModule', canActivate: [Loginguard] },
            { path: 'system-setting', loadChildren: './system-setting/system-setting.module#SystemSettingModule', canActivate: [Loginguard] },
            { path: 'authority-manager', loadChildren: './authority-manager/authority-manager.module#AuthorityManagerModule', canActivate: [Loginguard] },
            { path: 'platform-setting', loadChildren: './platform-setting/platform-setting.module#PlatformSettingModule', canActivate: [Loginguard] },
            { path: 'tables', loadChildren: './tables/tables.module#TablesModule', canActivate: [Loginguard] },
        ]
    },
    // Not found
    // { path: '**', redirectTo: 'login' }
];