ztxkutils 10.0.11 → 10.0.12
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/dist/fileOperation.js +8 -4
- package/package.json +1 -1
- package/dist/dataModel-6c68c88f.js +0 -26
- package/dist/dataModel-914b6226.js +0 -26
- package/dist/i18next.d.ts +0 -2
- package/dist/i18next.js +0 -2401
- package/dist/reqUrl-ea7ef876.js +0 -83
- package/dist/request-1e442d5d.js +0 -2982
- package/dist/request-4c29d6de.js +0 -2977
- package/dist/request-c0970aae.js +0 -2917
- package/dist/request-d8d72b87.js +0 -2982
- package/dist/request-f600ad7a.js +0 -2992
- package/dist/test.d.ts +0 -1
- package/dist/tools-16a7fb45.js +0 -2446
- package/dist/validate-21164759.js +0 -260
- package/dist/validate-2de5a28f.js +0 -260
package/dist/fileOperation.js
CHANGED
|
@@ -187,6 +187,8 @@ function createPublicDownloadUrl(apiUrl, fileId) {
|
|
|
187
187
|
* @param {string} fileName 文件名
|
|
188
188
|
*/
|
|
189
189
|
function previewFile(fileUrl, fileId, otherOption) {
|
|
190
|
+
var _a;
|
|
191
|
+
var officePreviewType = (_a = window.PREVIEW_FILE_PARAMS) === null || _a === void 0 ? void 0 : _a.officePreviewType;
|
|
190
192
|
var token = '';
|
|
191
193
|
if (typeof otherOption === 'object') {
|
|
192
194
|
token = getToken() || (otherOption === null || otherOption === void 0 ? void 0 : otherOption.authToken);
|
|
@@ -211,10 +213,10 @@ function previewFile(fileUrl, fileId, otherOption) {
|
|
|
211
213
|
titleName = suffixTitleName
|
|
212
214
|
? preTitleName + "." + suffixTitleName
|
|
213
215
|
: preTitleName;
|
|
214
|
-
window.open(_fileUrl + "/attchPreview?attachId=" + fileId + "&Zmdms-Auth=bearer " + token + "&titleName=" + encodeURIComponent(titleName));
|
|
216
|
+
window.open(_fileUrl + "/attchPreview?attachId=" + fileId + "&Zmdms-Auth=bearer " + token + "&titleName=" + encodeURIComponent(titleName) + officePreviewType ? "&officePreviewType=" + officePreviewType : '');
|
|
215
217
|
}
|
|
216
218
|
else {
|
|
217
|
-
window.open(fileUrl + "/attchPreview?attachId=" + fileId + "&Zmdms-Auth=bearer " + token);
|
|
219
|
+
window.open(fileUrl + "/attchPreview?attachId=" + fileId + "&Zmdms-Auth=bearer " + token + officePreviewType ? "&officePreviewType=" + officePreviewType : '');
|
|
218
220
|
}
|
|
219
221
|
}
|
|
220
222
|
/**
|
|
@@ -256,6 +258,8 @@ function batchPreviewFile(fileUrl, fileId, otherOption) {
|
|
|
256
258
|
* @param {string} fileType 文件类型
|
|
257
259
|
*/
|
|
258
260
|
function createOriginalUrl(fileUrl, fileId, otherOption) {
|
|
261
|
+
var _a;
|
|
262
|
+
var officePreviewType = (_a = window.PREVIEW_FILE_PARAMS) === null || _a === void 0 ? void 0 : _a.officePreviewType;
|
|
259
263
|
var token = getToken() || (otherOption === null || otherOption === void 0 ? void 0 : otherOption.authTOken);
|
|
260
264
|
var titleName = dangerouslySetXss(otherOption === null || otherOption === void 0 ? void 0 : otherOption.titleName);
|
|
261
265
|
try {
|
|
@@ -274,10 +278,10 @@ function createOriginalUrl(fileUrl, fileId, otherOption) {
|
|
|
274
278
|
titleName = suffixTitleName
|
|
275
279
|
? preTitleName + "." + suffixTitleName
|
|
276
280
|
: preTitleName;
|
|
277
|
-
return _fileUrl + "/attchPreview?attachId=" + fileId + "&Zmdms-Auth=bearer " + token + "&titleName=" + encodeURIComponent(titleName);
|
|
281
|
+
return _fileUrl + "/attchPreview?attachId=" + fileId + "&Zmdms-Auth=bearer " + token + "&titleName=" + encodeURIComponent(titleName) + officePreviewType ? "&officePreviewType=" + officePreviewType : '';
|
|
278
282
|
}
|
|
279
283
|
else {
|
|
280
|
-
return _fileUrl + "/attchPreview?attachId=" + fileId + "&Zmdms-Auth=bearer " + token;
|
|
284
|
+
return _fileUrl + "/attchPreview?attachId=" + fileId + "&Zmdms-Auth=bearer " + token + officePreviewType ? "&officePreviewType=" + officePreviewType : '';
|
|
281
285
|
}
|
|
282
286
|
}
|
|
283
287
|
/**
|
package/package.json
CHANGED
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
import instance from './i18next.js';
|
|
2
|
-
|
|
3
|
-
/**
|
|
4
|
-
* @description 数据模型创建
|
|
5
|
-
*/
|
|
6
|
-
function createSuccessModel(data, message) {
|
|
7
|
-
return {
|
|
8
|
-
data: data,
|
|
9
|
-
message: message || instance.t('数据请求成功'),
|
|
10
|
-
success: true,
|
|
11
|
-
};
|
|
12
|
-
}
|
|
13
|
-
function createErrorModel(message) {
|
|
14
|
-
return {
|
|
15
|
-
message: message || instance.t('数据请求失败'),
|
|
16
|
-
success: false,
|
|
17
|
-
};
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
var dataModel = /*#__PURE__*/Object.freeze({
|
|
21
|
-
__proto__: null,
|
|
22
|
-
createSuccessModel: createSuccessModel,
|
|
23
|
-
createErrorModel: createErrorModel
|
|
24
|
-
});
|
|
25
|
-
|
|
26
|
-
export { createErrorModel as a, createSuccessModel as c, dataModel as d };
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
import instance from './i18next.js';
|
|
2
|
-
|
|
3
|
-
/**
|
|
4
|
-
* @description 数据模型创建
|
|
5
|
-
*/
|
|
6
|
-
function createSuccessModel(data, message) {
|
|
7
|
-
return {
|
|
8
|
-
data: data,
|
|
9
|
-
message: message || instance.t('数据请求成功'),
|
|
10
|
-
success: true,
|
|
11
|
-
};
|
|
12
|
-
}
|
|
13
|
-
function createErrorModel(message) {
|
|
14
|
-
return {
|
|
15
|
-
message: message || instance.t('数据请求失败'),
|
|
16
|
-
success: false,
|
|
17
|
-
};
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
var dataModel = /*#__PURE__*/Object.freeze({
|
|
21
|
-
__proto__: null,
|
|
22
|
-
createSuccessModel: createSuccessModel,
|
|
23
|
-
createErrorModel: createErrorModel
|
|
24
|
-
});
|
|
25
|
-
|
|
26
|
-
export { createErrorModel as a, createSuccessModel as c, dataModel as d };
|
package/dist/i18next.d.ts
DELETED