+
-
-
+
+
-
-
+
+
-
-
-
+
+
diff --git a/src/app/pages/license/update-category/edit-update-category/edit-update-category.component.ts b/src/app/pages/license/update-category/edit-update-category/edit-update-category.component.ts
index 2dcaf4a..d9b3977 100644
--- a/src/app/pages/license/update-category/edit-update-category/edit-update-category.component.ts
+++ b/src/app/pages/license/update-category/edit-update-category/edit-update-category.component.ts
@@ -119,25 +119,27 @@ export class EditUpdateCategoryComponent implements OnInit {
//查看文件
lookFile(item) {
- if (!item.imageUrl) {
+ if (!item) {
return
}
- if (this.getFileType(item.imageUrl) == 'word') {
- let arr = item.imageUrl.split('.')
+ if (this.getFileType(item) == 'word') {
+ let arr = item.split('.')
arr[arr.length - 1] = 'pdf'
window.open(arr.join('.'))
- } else if (this.getFileType(item.imageUrl) == 'pdf') {
- window.open(item.imageUrl)
+ } else if (this.getFileType(item) == 'pdf') {
+ window.open(item)
} else {
this.message.create('warning', '暂不支持查看!');
}
}
-
+ uploadType: boolean; //是否是上传副本
isLoadingSave: boolean = false
uploadIndex: string
- filechange(e) {
+ filechange(e, type: boolean) {
+ this.uploadType = type
+ this.isLoadingSave = true
let oilStationId = JSON.parse(sessionStorage.getItem('userdataOfgasstation')).organization.id
let file = e.target.files[0] || null //获取上传的文件
this.openFileSelect(file, `stationPhotos/${oilStationId}/`)
@@ -163,9 +165,12 @@ export class EditUpdateCategoryComponent implements OnInit {
this.objectsSrv.postFile(this.postFilePath, file).subscribe(data => {
let dataObj = data as any;
let filePath: string = ObjectsSimpleService.baseUrl + dataObj.objectName;
- this.imageUrl = filePath
- this.data2.imageUrl = filePath
- console.log('上传成功', filePath)
+ if (this.uploadType){
+ this.data2.imageUrl = filePath
+ } else {
+ this.data2.attachment = filePath
+ }
+ this.isLoadingSave = false
resolve('success')
});
})
@@ -179,9 +184,12 @@ export class EditUpdateCategoryComponent implements OnInit {
this.objectsSrv.postFile_MultipartUpload(this.postFilePath, file).then((value) => {
let dataObj = value as any;
let filePath = dataObj.filePath
- this.imageUrl = filePath
- this.data2.imageUrl = filePath
- console.log('上传成功', filePath)
+ if (this.uploadType){
+ this.data2.imageUrl = filePath
+ } else {
+ this.data2.attachment = filePath
+ }
+ this.isLoadingSave = false
});
}
diff --git a/src/app/pages/license/update-category/update-category.component.html b/src/app/pages/license/update-category/update-category.component.html
index 4ced581..31ccdf6 100644
--- a/src/app/pages/license/update-category/update-category.component.html
+++ b/src/app/pages/license/update-category/update-category.component.html
@@ -35,7 +35,7 @@
-
{{getHandleTypes(item.handleTypes)}} |
+
{{getHandleTypes(item.handleTypesDefault)}} |