ztxkutils 2.10.35 → 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 -2
- package/package.json +1 -1
- package/dist/request-ef290b9a.js +0 -2838
package/dist/fileOperation.js
CHANGED
@@ -205,7 +205,12 @@ function previewFile(fileUrl, fileId, otherOption) {
|
|
205
205
|
? fileUrl.slice(0, fileUrl.length - 1)
|
206
206
|
: fileUrl;
|
207
207
|
if (titleName) {
|
208
|
-
|
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;
|
209
214
|
window.open(_fileUrl + "/attchPreview?attachId=" + fileId + "&Zmdms-Auth=bearer " + token + "&titleName=" + encodeURIComponent(titleName) + "&officePreviewType=pdf");
|
210
215
|
}
|
211
216
|
else {
|
@@ -263,7 +268,12 @@ function createOriginalUrl(fileUrl, fileId, otherOption) {
|
|
263
268
|
? fileUrl.slice(0, fileUrl.length - 1)
|
264
269
|
: fileUrl;
|
265
270
|
if (titleName) {
|
266
|
-
|
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;
|
267
277
|
return _fileUrl + "/attchPreview?attachId=" + fileId + "&Zmdms-Auth=bearer " + token + "&titleName=" + encodeURIComponent(titleName) + "&officePreviewType=pdf";
|
268
278
|
}
|
269
279
|
else {
|