|
|
|
@ -170,6 +170,7 @@ export class EntryPlanLookComponent implements OnInit {
|
|
|
|
|
} |
|
|
|
|
//编辑预案
|
|
|
|
|
editPlan(e) { |
|
|
|
|
console.log(e) |
|
|
|
|
const config = new MatSnackBarConfig(); |
|
|
|
|
config.verticalPosition = 'top'; |
|
|
|
|
config.duration = 3000 |
|
|
|
@ -368,17 +369,15 @@ export class EntryPlanLookComponent implements OnInit {
|
|
|
|
|
|
|
|
|
|
const dialogRef = this.dialog.open(editUpload, { |
|
|
|
|
width: "300px", |
|
|
|
|
height: "150px", |
|
|
|
|
height: "200px", |
|
|
|
|
data: { id: e.id, companyId: this.companyId, unitType: this.unitdata.unittype, unitName: this.unitdata.unitname }, |
|
|
|
|
disableClose: true |
|
|
|
|
}); |
|
|
|
|
dialogRef.afterClosed().subscribe(data => { |
|
|
|
|
this.getAllPlanComponents() |
|
|
|
|
}) |
|
|
|
|
//this.lookPlan(e)
|
|
|
|
|
}/* ,err => { |
|
|
|
|
this.snackBar.open(err,'确定',config); |
|
|
|
|
} */) |
|
|
|
|
|
|
|
|
|
}) |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
} |
|
|
|
@ -931,7 +930,6 @@ export class AddPlanone {
|
|
|
|
|
} else { this.pswShow = false } |
|
|
|
|
} else { this.pswShow = false } |
|
|
|
|
|
|
|
|
|
// this.startUploading()
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
//上传文件
|
|
|
|
@ -940,7 +938,6 @@ export class AddPlanone {
|
|
|
|
|
let file = this.file || null //获取上传的文件
|
|
|
|
|
let fileSize = file.size || null //上传文件的总大小
|
|
|
|
|
let shardSize = 5 * 1024 * 1024 //5MB一个分片
|
|
|
|
|
// console.log(this.psw)
|
|
|
|
|
|
|
|
|
|
if (file && fileSize <= shardSize) { //上传文件<=5MB时
|
|
|
|
|
let formData = new FormData() |
|
|
|
@ -1133,8 +1130,6 @@ export class AddPlanone {
|
|
|
|
|
website: boolean = false //网页地址
|
|
|
|
|
inputNew: boolean = false //自定义编辑
|
|
|
|
|
next(formdata) { |
|
|
|
|
//console.log(formdata.value.firstCtrlthree)
|
|
|
|
|
//console.log(this.file)
|
|
|
|
|
this.psw = false |
|
|
|
|
this.selectedPLanName = formdata.value.firstCtrlone |
|
|
|
|
this.selectedPLanType = formdata.value.firstCtrltwo |
|
|
|
@ -1720,7 +1715,6 @@ export class editUpload {
|
|
|
|
|
let file = this.file || null //获取上传的文件
|
|
|
|
|
let fileSize = file.size || null //上传文件的总大小
|
|
|
|
|
let shardSize = 5 * 1024 * 1024 //5MB一个分片
|
|
|
|
|
// console.log(this.psw)
|
|
|
|
|
if (this.file != undefined) { |
|
|
|
|
if (file && fileSize <= shardSize) { //上传文件<=5MB时
|
|
|
|
|
let formData = new FormData() |
|
|
|
@ -1733,11 +1727,8 @@ export class editUpload {
|
|
|
|
|
let options = { |
|
|
|
|
headers |
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
this.uploadover = true |
|
|
|
|
let level = sessionStorage.getItem("level") |
|
|
|
|
// console.log(level)
|
|
|
|
|
let PlanLevel |
|
|
|
|
if (level == '0') { |
|
|
|
|
PlanLevel = 1 |
|
|
|
@ -1765,9 +1756,12 @@ export class editUpload {
|
|
|
|
|
|
|
|
|
|
} else if (file && fileSize > shardSize) { //上传文件>5MB时,分块上传
|
|
|
|
|
let data = { filename: file.name } |
|
|
|
|
//this.uploadisLoading = tru
|
|
|
|
|
this.http.post(`/api/NewMultipartUpload/PlanPlatform/${this.data.companyId}/2D`, {}, { params: data }).subscribe((data: any) => { //初始化分段上传
|
|
|
|
|
this.objectName = data.objectName |
|
|
|
|
this.uploadId = data.uploadId |
|
|
|
|
this.uploadisLoading = true |
|
|
|
|
this.subsectionUploading() |
|
|
|
|
|
|
|
|
|
}) |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
else { |
|
|
|
|