ztxkutils 2.10.34 → 2.10.36
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 +12 -0
- package/package.json +1 -1
- package/dist/request-ef290b9a.js +0 -2838
package/dist/fileOperation.js
CHANGED
@@ -205,6 +205,12 @@ function previewFile(fileUrl, fileId, otherOption) {
|
|
205
205
|
? fileUrl.slice(0, fileUrl.length - 1)
|
206
206
|
: fileUrl;
|
207
207
|
if (titleName) {
|
208
|
+
var lastPointIndex = titleName.lastIndexOf('.');
|
209
|
+
var preTitleName = titleName.substring(0, lastPointIndex) + ("-" + fileId);
|
210
|
+
var suffixTitleName = titleName.substring(lastPointIndex + 1);
|
211
|
+
titleName = suffixTitleName
|
212
|
+
? preTitleName + "." + suffixTitleName
|
213
|
+
: preTitleName;
|
208
214
|
window.open(_fileUrl + "/attchPreview?attachId=" + fileId + "&Zmdms-Auth=bearer " + token + "&titleName=" + encodeURIComponent(titleName) + "&officePreviewType=pdf");
|
209
215
|
}
|
210
216
|
else {
|
@@ -262,6 +268,12 @@ function createOriginalUrl(fileUrl, fileId, otherOption) {
|
|
262
268
|
? fileUrl.slice(0, fileUrl.length - 1)
|
263
269
|
: fileUrl;
|
264
270
|
if (titleName) {
|
271
|
+
var lastPointIndex = titleName.lastIndexOf('.');
|
272
|
+
var preTitleName = titleName.substring(0, lastPointIndex) + ("-" + fileId);
|
273
|
+
var suffixTitleName = titleName.substring(lastPointIndex + 1);
|
274
|
+
titleName = suffixTitleName
|
275
|
+
? preTitleName + "." + suffixTitleName
|
276
|
+
: preTitleName;
|
265
277
|
return _fileUrl + "/attchPreview?attachId=" + fileId + "&Zmdms-Auth=bearer " + token + "&titleName=" + encodeURIComponent(titleName) + "&officePreviewType=pdf";
|
266
278
|
}
|
267
279
|
else {
|