liaoyongfei 4 éve%!(EXTRA string=óta)
szülő
commit
f3107dbd64

+ 4 - 1
UI/src/components/Grid/BirdGrid.js

@@ -439,7 +439,9 @@ class BirdGrid extends React.Component {
         filters: this.getFilters(),
         sumFields: this.state.sumFields
       };
-      
+      let filters = JSON.stringify(this.getFilters()) 
+      let stroage = window.localStorage
+      stroage.setItem('filters', filters)
       //将查询的东西放入localstorge,给后续的导出使用
       let dtoStr = JSON.stringify(dto);
       sessionStorage.setItem("queryDto", dtoStr);
@@ -609,6 +611,7 @@ class BirdGrid extends React.Component {
 
     //筛选
     let filters = this.getFilters();
+   
     for (let filter of filters) {
       if (dataSource.length === 0) break;
       if (util.string.isEmpty(filter.value)) continue;

+ 40 - 0
UI/src/pages/ymall/partnerList.js

@@ -31,6 +31,7 @@ class PartnerList extends React.Component {
             needSubDataSource:[]
         };
     }
+
     //格式化时间
     dateFormat = (time, format) => {
         if (time instanceof Date) {
@@ -397,6 +398,45 @@ class PartnerList extends React.Component {
                         partnerVisible: true,
                     });
                 }
+            },{
+                name: '导出', onClick: function () {
+                    var SsoToken = util.auth.getToken();
+                    let data = JSON.parse(window.localStorage.getItem('filters'))
+                    debugger;
+                    var par='';
+                    if(data instanceof Array){
+                       for(var i=0;i<data.length;i++){
+                           let a=data[i];
+                            if(a.field=='partnerName' && a.value){
+                                par='&partnerName='+a.value;
+                            }
+                            if(a.field=='createTime' && a.value){
+                                par='&createTimeStr='+a.value+':00';
+                            }
+                            if(a.field=='partnerStatus' && a.value){
+                                par='&partnerStatus='+a.value;
+                            }
+                            if(a.field=='hasSuperior' && a.value){
+                                par='&hasSuperior='+a.value;
+                            }
+                       }     
+                    }else{
+                        let a=data;
+                        if(a.field=='partnerName' && a.value){
+                            par='&partnerName='+a.value;
+                        }
+                        if(a.field=='createTime' && a.value){
+                            par='&createTimeStr='+a.value+':00';
+                        }
+                        if(a.field=='partnerStatus' && a.value){
+                            par='&partnerStatus='+a.value;
+                        }
+                        if(a.field=='hasSuperior' && a.value){
+                            par='&hasSuperior='+a.value;
+                        }
+                    }
+                    window.location.href=encodeURI(ymallAPI+"/ymall/partner/exportPartnerList?Sso-Token="+SsoToken+par);
+                }
             }],
         };
 

+ 75 - 0
UI/src/utils/config_testOld.js

@@ -0,0 +1,75 @@
+const APIV1 = '/api/v1'
+const APIV2 = '/api/v2' 
+const APIV3 = 'http://192.168.50.32:8004'
+const APIV4 = 'http://192.168.50.32:8005'
+
+const APIV3Auth = 'http://192.168.50.50:13001/oauth2'
+const WXAPIV5= 'http://192.168.50.50:13001/qiyewechat'
+const WXMpAPI= 'http://192.168.50.50:13001/mpwechat'
+const staticMpAPI = 'http://192.168.50.50:13001/mpwechat'
+const ymallAPI = 'http://192.168.50.50:13001/ymall'
+const ymallOuter = 'http://192.168.50.50:13001/ymall'
+
+module.exports =  {
+  name: '亮健云健康',
+  prefix: 'bird',
+  footerText: 'bird admin  ? 2018 360lj.com',
+  logo: '/logo.svg',
+  iconFontCSS: '/iconfont.css',
+  iconFontJS: '/iconfont.js',
+  CORS: [
+  'http://localhost:8031',
+  'http://192.168.50.32:8031',
+  'http://localhost:8081',
+  'http://192.168.50.39:8081',
+  'http://192.168.50.32:8004',
+  'http://192.168.50.32:8005',
+  'http://localhost:7000',  
+  'http://192.168.50.32:7000',
+  'http://192.168.50.32:13001',
+  'http://192.168.50.50:13001',
+  ],
+  //YQL: ['http://localhost:57251'],
+  openPages: ['/login','/'],
+  apiPrefix: '/api/v1',
+  webApiPrefix:APIV3,
+  authApiPrefix: APIV3Auth,
+  APIV1,
+  APIV2,
+  APIV3,
+  APIV3Auth,
+  APIV4,
+  WXAPIV5,
+  WXMpAPI,
+  staticMpAPI,
+  ymallAPI,
+  ymallOuter,
+  ClientId:'f3ed0d90-3fc8-4eba-b83c-a0cfe54c174d',
+  ClientSecret:'78e238b4-c199-49ad-b619-69b6a78959d8',
+  ApplicationKey:'wechatcp',
+  grant_type:'password',
+  grant_type_refesh:'refresh_token',
+  color:{
+    success:'#52c41a',
+    warn:'#E6A23C',
+    error:'#ff4d4f'
+  },
+  api: {
+    // userLogin: `${APIV3}/web/login/index`,
+    userLogin: `${APIV3Auth}/ums/oauth2/accessToken`,
+    // userLogout: `${APIV3}/web/login/logout`,
+    userLogout: `${APIV3Auth}/web/login/logout`,
+    //menus: `${APIV1}/menus`,
+    // menus: `${APIV3}/web/auth/menus`,
+    menus: `${APIV3Auth}/ums/oauth2/list/permission`,//?types=1 两种菜单类型 顶部菜单和左侧菜单
+    getDic:`${APIV1}/getdic?key=`,
+
+    upload:`${APIV3}/web/upload/uploadprofile`,
+    //getFileName:`/file/getName?url=`,
+    getFileName:`${APIV3}/`,
+    // getOperationToken:`${APIV3}/web/login/getOperationToken`,
+    getOperationToken: `${APIV3Auth}/ums/oauth2/accessToken`,
+    // permissions:`${APIV3}/web/auth/permissions`
+    permissions:`${APIV3Auth}/ums/oauth2/list/permission?types=2`,
+  },
+}