ztxkutils 10.0.11 → 10.0.13
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 +10 -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,11 @@ 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 +
|
|
220
|
+
(officePreviewType ? "&officePreviewType=" + officePreviewType : ''));
|
|
218
221
|
}
|
|
219
222
|
}
|
|
220
223
|
/**
|
|
@@ -256,6 +259,8 @@ function batchPreviewFile(fileUrl, fileId, otherOption) {
|
|
|
256
259
|
* @param {string} fileType 文件类型
|
|
257
260
|
*/
|
|
258
261
|
function createOriginalUrl(fileUrl, fileId, otherOption) {
|
|
262
|
+
var _a;
|
|
263
|
+
var officePreviewType = (_a = window.PREVIEW_FILE_PARAMS) === null || _a === void 0 ? void 0 : _a.officePreviewType;
|
|
259
264
|
var token = getToken() || (otherOption === null || otherOption === void 0 ? void 0 : otherOption.authTOken);
|
|
260
265
|
var titleName = dangerouslySetXss(otherOption === null || otherOption === void 0 ? void 0 : otherOption.titleName);
|
|
261
266
|
try {
|
|
@@ -274,10 +279,11 @@ function createOriginalUrl(fileUrl, fileId, otherOption) {
|
|
|
274
279
|
titleName = suffixTitleName
|
|
275
280
|
? preTitleName + "." + suffixTitleName
|
|
276
281
|
: preTitleName;
|
|
277
|
-
return _fileUrl + "/attchPreview?attachId=" + fileId + "&Zmdms-Auth=bearer " + token + "&titleName=" + encodeURIComponent(titleName);
|
|
282
|
+
return (_fileUrl + "/attchPreview?attachId=" + fileId + "&Zmdms-Auth=bearer " + token + "&titleName=" + encodeURIComponent(titleName) + (officePreviewType ? "&officePreviewType=" + officePreviewType : ''));
|
|
278
283
|
}
|
|
279
284
|
else {
|
|
280
|
-
return _fileUrl + "/attchPreview?attachId=" + fileId + "&Zmdms-Auth=bearer " + token
|
|
285
|
+
return (_fileUrl + "/attchPreview?attachId=" + fileId + "&Zmdms-Auth=bearer " + token +
|
|
286
|
+
(officePreviewType ? "&officePreviewType=" + officePreviewType : ''));
|
|
281
287
|
}
|
|
282
288
|
}
|
|
283
289
|
/**
|
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