centaline-data-driven 1.4.8 → 1.4.9
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/centaline-data-driven-1.4.8.tgz +0 -0
- package/package.json +1 -1
- package/src/centaline/dynamicFile/src/dynamicFile.vue +9 -23
- package/src/centaline/dynamicForm/src/dynamicForm.vue +206 -188
- package/src/centaline/dynamicSearchList/src/dynamicSearchTable.vue +71 -58
- package/src/centaline/dynamicViewerFile/src/dynamicViewerFile.vue +35 -5
- package/src/centaline/loader/src/ctl/File.js +31 -8
- package/src/centaline/loader/src/ctl/SliceUpload.js +1 -1
- package/src/centaline/progress/src/progress.vue +9 -2
- package/src/main.js +3 -3
- package/wwwroot/static/centaline/centaline-data-driven.js +3 -3
- package/wwwroot/static/centaline/centaline-data-driven.js.map +1 -1
|
Binary file
|
package/package.json
CHANGED
|
@@ -425,28 +425,9 @@
|
|
|
425
425
|
let url = this.model.action; //上传文件接口
|
|
426
426
|
let uid = this.uploadguid();
|
|
427
427
|
try {
|
|
428
|
-
let awaitfile = {
|
|
429
|
-
"url": "",
|
|
430
|
-
"source": "",
|
|
431
|
-
"mediaUrl": "",
|
|
432
|
-
"fileName": "",
|
|
433
|
-
"flagDefault": "",
|
|
434
|
-
"mediaTypeID": "",
|
|
435
|
-
"flagDeleted": "",
|
|
436
|
-
"actionType": "",
|
|
437
|
-
"rightDel": "",
|
|
438
|
-
"rightEdit": "",
|
|
439
|
-
"rightDownload": "",
|
|
440
|
-
"mediaLabelID": "",
|
|
441
|
-
"mediaLabelName": "",
|
|
442
|
-
"fileExtension": "",
|
|
443
|
-
"progressFlag": true,
|
|
444
|
-
"loadProgress": 0,
|
|
445
|
-
"uid": uid,
|
|
446
|
-
}
|
|
447
|
-
this.model.fileList.push(awaitfile);
|
|
448
|
-
|
|
449
428
|
file.uid = uid;
|
|
429
|
+
|
|
430
|
+
this.model.addfileItem(file);
|
|
450
431
|
const res = await uploadByPieces(this.model.action, { file }, this.uploadpro, options);
|
|
451
432
|
return res;
|
|
452
433
|
|
|
@@ -461,19 +442,24 @@
|
|
|
461
442
|
return (this.S4() + this.S4() + '-' + this.S4() + '-' + this.S4() + '-' + this.S4() + '-' + this.S4() + this.S4() + this.S4());
|
|
462
443
|
},
|
|
463
444
|
uploadpro(uploadOptions, res, xhr) {
|
|
464
|
-
|
|
445
|
+
const { file, onProgress, onSuccess, onError } = uploadOptions;
|
|
465
446
|
if (xhr.status >= 400) {
|
|
466
447
|
this.$message.error(res);
|
|
448
|
+
file.source = { "actionType": 2 };
|
|
449
|
+
this.model.deleteFile(file, false);
|
|
450
|
+
this.selfValidExcute("remove");
|
|
467
451
|
}
|
|
468
452
|
else if (xhr.status == 0) {
|
|
469
453
|
this.$message.error(res);
|
|
454
|
+
file.source= { "actionType": 2 } ;
|
|
455
|
+
this.model.deleteFile(file, false);
|
|
456
|
+
this.selfValidExcute("remove");
|
|
470
457
|
}
|
|
471
458
|
else if (xhr.status == 200) {
|
|
472
459
|
if (res.rtnCode != 200 && res.rtnMsg != "") {
|
|
473
460
|
this.$message.error(res.rtnMsg);
|
|
474
461
|
return;
|
|
475
462
|
}
|
|
476
|
-
const { file, onProgress, onSuccess, onError } = uploadOptions;
|
|
477
463
|
const Progress = Math.min(100, Math.floor(1E4 * parseInt(res.content.nextOffSet) / parseInt(file.size)) / 100);
|
|
478
464
|
this.model.setByPieces(res, Progress, file);
|
|
479
465
|
|