ztxkui 4.2.23-101 → 4.2.23-103

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.
@@ -1208,6 +1208,7 @@ var PrintContainer = function (_a) {
1208
1208
  errorCallback: function () {
1209
1209
  setSpinning(false);
1210
1210
  },
1211
+ isPhone: isPhone,
1211
1212
  });
1212
1213
  }
1213
1214
  else {
@@ -6,6 +6,7 @@
6
6
  export declare function autoSealThenDownloadFilesHandle(request: any, formData: any, options: {
7
7
  sucessCallback: () => void;
8
8
  errorCallback: () => void;
9
+ isPhone?: boolean;
9
10
  }): any;
10
11
  /**
11
12
  * 自动盖章下载盖章件
@@ -9,7 +9,7 @@ import { message } from '../../index';
9
9
  * @params formData: any 请求参数
10
10
  */
11
11
  export function autoSealThenDownloadFilesHandle(request, formData, options) {
12
- var sucessCallback = options.sucessCallback, errorCallback = options.errorCallback;
12
+ var sucessCallback = options.sucessCallback, errorCallback = options.errorCallback, isPhone = options.isPhone;
13
13
  return request({
14
14
  url: '/api/zmdms-resource/seal/auto-seal-then-download-files',
15
15
  method: 'POST',
@@ -27,9 +27,17 @@ export function autoSealThenDownloadFilesHandle(request, formData, options) {
27
27
  var fileName = res.headers['content-disposition'].split(';');
28
28
  var fileNameArray = (_a = fileName[1]) === null || _a === void 0 ? void 0 : _a.split('=');
29
29
  var fileNameStr = decodeURIComponent(fileNameArray[1]);
30
- var blob = new Blob([res.data], {
31
- type: 'application/vnd.ms-excel',
32
- });
30
+ var blob = null;
31
+ if (isPhone) {
32
+ blob = new Blob([res.data], {
33
+ type: 'application/pdf',
34
+ });
35
+ }
36
+ else {
37
+ blob = new Blob([res.data], {
38
+ type: 'application/vnd.ms-excel',
39
+ });
40
+ }
33
41
  if (blob.size < 1) {
34
42
  message.warning('下载失败,下载的内容为空!');
35
43
  return;
@@ -62,7 +62,7 @@ export var getTableLayoutFullData = function (columns, tableLayout) {
62
62
  var result = newAddColumns_1[index];
63
63
  var column = __assign(__assign({}, result), item);
64
64
  // 兼容存入localstorge里面的旧数据
65
- if (!item.key && !item.dataIndex) {
65
+ if (!item.key || !item.dataIndex) {
66
66
  column = result;
67
67
  }
68
68
  if (!column.fixed) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ztxkui",
3
- "version": "4.2.23-101",
3
+ "version": "4.2.23-103",
4
4
  "private": false,
5
5
  "description": "React components library",
6
6
  "author": "zt-front-end",