@lambo-design/shared 1.0.0-beta.251 → 1.0.0-beta.253
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/nstyles/reset.less +8 -0
- package/package.json +1 -1
- package/utils/ajax/headers.js +11 -0
- package/utils/ajax/interceptors.js +12 -4
- package/utils/excel.js +2 -2
- package/utils/platform.js +1 -1
package/nstyles/reset.less
CHANGED
package/package.json
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import qs from 'qs'
|
|
2
2
|
import cacheRules from "./cacheconf";
|
|
3
|
-
import {getToken,getUrlParams} from '../platform'
|
|
3
|
+
import {getLocalStorage, getToken, getUrlParams} from '../platform'
|
|
4
4
|
import Bus from '../bus';
|
|
5
|
-
|
|
5
|
+
import headers from './headers';
|
|
6
6
|
|
|
7
7
|
let timer1, timer2;
|
|
8
8
|
let hasDialog = false;
|
|
@@ -12,13 +12,21 @@ function requestInterceptors(config) {
|
|
|
12
12
|
|
|
13
13
|
let token = getToken();
|
|
14
14
|
if (token) {
|
|
15
|
-
config.headers.token = token;
|
|
15
|
+
config.headers[headers.auth.token] = token;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
let systemType = getLocalStorage('systemType')
|
|
19
|
+
let tenantCode = getLocalStorage('tenantCode')
|
|
20
|
+
|
|
21
|
+
if(systemType && tenantCode){
|
|
22
|
+
config.headers[headers.tenant.tenantCode] = tenantCode;
|
|
23
|
+
config.headers[headers.tenant.systemType] = systemType;
|
|
16
24
|
}
|
|
17
25
|
|
|
18
26
|
//sso_token认证
|
|
19
27
|
if (params.hasOwnProperty('sso_token')||sessionStorage.getItem('sso_token')) {
|
|
20
28
|
config.params = Object.assign({
|
|
21
|
-
sso_token: params.sso_token||sessionStorage.getItem('sso_token')
|
|
29
|
+
sso_token: params.sso_token||sessionStorage.getItem('sso_token'),
|
|
22
30
|
sso_id: params.sso_id
|
|
23
31
|
}, config.params)
|
|
24
32
|
}
|
package/utils/excel.js
CHANGED
|
@@ -496,7 +496,7 @@ export const export_json_to_excel = ({data, key, title, filename, spanColumns, a
|
|
|
496
496
|
auto_width(ws, arr);
|
|
497
497
|
}
|
|
498
498
|
merge_content(ws, data, spanColumns)
|
|
499
|
-
XLSX.utils.book_append_sheet(wb, ws,
|
|
499
|
+
XLSX.utils.book_append_sheet(wb, ws, '');
|
|
500
500
|
XLSX.writeFile(wb, filename + '.' + format);
|
|
501
501
|
}
|
|
502
502
|
|
|
@@ -517,7 +517,7 @@ export const export_array_to_excel = ({key, data, title, filename, spanColumns,
|
|
|
517
517
|
}
|
|
518
518
|
merge_content(ws, data, spanColumns, title.length)
|
|
519
519
|
add_style(ws, title)
|
|
520
|
-
XLSX.utils.book_append_sheet(wb, ws,
|
|
520
|
+
XLSX.utils.book_append_sheet(wb, ws, '');
|
|
521
521
|
if(format === 'csv'){
|
|
522
522
|
XLSX.writeFile(wb, filename + '.' + format,{
|
|
523
523
|
// 要生成的文件类型
|