@gsp-svc/formdoc-upload 0.2.1 → 0.2.10

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.
@@ -11,7 +11,7 @@ import { FormsModule } from '@angular/forms';
11
11
  import { ComboListModule } from '@farris/ui-combo-list';
12
12
  import { FarrisFormsModule } from '@farris/ui-forms';
13
13
  import { CacheService, HttpService, LanguageService, SessionService } from '@ecp-caf/caf-common';
14
- import { Injectable, Pipe, Inject, LOCALE_ID, NgModule, Component, ViewChild, Input, Injector, ComponentFactoryResolver, defineInjectable } from '@angular/core';
14
+ import { Injectable, Pipe, Inject, LOCALE_ID, Component, Injector, ComponentFactoryResolver, NgModule, ViewChild, Input, defineInjectable } from '@angular/core';
15
15
  import { BsModalService } from '@farris/ui-modal';
16
16
  import { of as of$1 } from 'rxjs';
17
17
  import { HttpClientModule, HttpClient } from '@angular/common/http';
@@ -1177,7 +1177,7 @@ var FileUploadComponent = /** @class */ (function () {
1177
1177
  var uploadFileInfo = new UploadFileInfo();
1178
1178
  uploadFileInfo.metadataId = uuid;
1179
1179
  uploadFileInfo.fileName = fileInfo.name;
1180
- uploadFileInfo.fileSize = fileInfo.fileSize;
1180
+ uploadFileInfo.fileSize = fileInfo.size;
1181
1181
  uploadFileInfo.state = state;
1182
1182
  uploadFileInfo.securityInfo = this.securityInfoList[0];
1183
1183
  //判断是否支持分片上传
@@ -1245,11 +1245,6 @@ var FileUploadComponent = /** @class */ (function () {
1245
1245
  _this.files[_this.files.indexOf(fileInfo)].uploadProcess = Number.parseInt((_this.uploadedChunk[uuid] / _this.fileTotalChunk[uuid] * 100).toFixed(0));
1246
1246
  if (_this.uploadedChunk[uuid] == _this.fileTotalChunk[uuid]) {
1247
1247
  if (multiResultList_1.length == _this.fileTotalChunk[uuid]) {
1248
- _this.files[_this.files.indexOf(fileInfo)].uploadResult = true;
1249
- _this.files[_this.files.indexOf(fileInfo)].isUploading = false;
1250
- _this.uploadFileInfoList = _this.uploadFileInfoList.concat(uploadFileInfo);
1251
- _this.uploadedFileInfoList = _this.uploadedFileInfoList.concat(uploadFileInfo);
1252
- _this.uploadedFileTotal++;
1253
1248
  /** @type {?} */
1254
1249
  var completeMultiUploadRequest = new CompleteMultiUploadRequest;
1255
1250
  completeMultiUploadRequest.metadataId = uuid;
@@ -1264,6 +1259,18 @@ var FileUploadComponent = /** @class */ (function () {
1264
1259
  * @return {?}
1265
1260
  */
1266
1261
  function (res) {
1262
+ if (res.status != 200) {
1263
+ _this.files[_this.files.indexOf(fileInfo)].uploadResult = false;
1264
+ _this.files[_this.files.indexOf(fileInfo)].isUploading = false;
1265
+ _this.files[_this.files.indexOf(fileInfo)].errorMessage = res.error.Message;
1266
+ }
1267
+ else {
1268
+ _this.files[_this.files.indexOf(fileInfo)].uploadResult = true;
1269
+ _this.files[_this.files.indexOf(fileInfo)].isUploading = false;
1270
+ _this.uploadFileInfoList = _this.uploadFileInfoList.concat(uploadFileInfo);
1271
+ _this.uploadedFileInfoList = _this.uploadedFileInfoList.concat(uploadFileInfo);
1272
+ _this.uploadedFileTotal++;
1273
+ }
1267
1274
  }));
1268
1275
  //后台异步拼接文档
1269
1276
  }