邵佳豪 4 years ago
parent
commit
124202b9cd
  1. 5
      src/app/key-unit/edit-plan-info/edit-plan-info.component.scss
  2. 5
      src/app/key-unit/view-unit-details/view-unit-details.component.scss
  3. 7
      src/app/ui/collection-tools-building/collection-tools.component.ts
  4. 7
      src/app/ui/collection-tools-plan/collection-tools.component.ts
  5. 7
      src/app/ui/collection-tools-plan/leftFunctionalDomain.ts
  6. 7
      src/app/ui/collection-tools/collection-tools.component.ts
  7. 7
      src/app/ui/collection-tools/leftFunctionalDomain.ts

5
src/app/key-unit/edit-plan-info/edit-plan-info.component.scss

@ -6,9 +6,12 @@
width: 100%; width: 100%;
height: 0px; height: 0px;
.scorePrompt { .scorePrompt {
width: 100%; width: 300px;
height: 0px;
text-align: center; text-align: center;
position: absolute; position: absolute;
left: 50%;
margin-left: -150px;
top: 88px; top: 88px;
font-size: 15px; font-size: 15px;
z-index: 111; z-index: 111;

5
src/app/key-unit/view-unit-details/view-unit-details.component.scss

@ -6,9 +6,12 @@
width: 100%; width: 100%;
height: 0px; height: 0px;
.scorePrompt { .scorePrompt {
width: 100%; width: 300px;
height: 0px;
text-align: center; text-align: center;
position: absolute; position: absolute;
left: 50%;
margin-left: -150px;
top: 88px; top: 88px;
font-size: 15px; font-size: 15px;
z-index: 111; z-index: 111;

7
src/app/ui/collection-tools-building/collection-tools.component.ts

@ -2087,6 +2087,13 @@ export class CollectionToolsBuildingComponent implements OnInit {
let fileSize = file.size || null //上传文件的总大小 let fileSize = file.size || null //上传文件的总大小
let maxSize = 5 * 1024 * 1024 //5MB一个分片 let maxSize = 5 * 1024 * 1024 //5MB一个分片
let tenSize = 10 * 1024 * 1024 //10MB限制 let tenSize = 10 * 1024 * 1024 //10MB限制
if (file && file.name.toLowerCase().indexOf('png') == -1 && file.name.toLowerCase().indexOf('jpg') == -1 && file.name.toLowerCase().indexOf('jpeg') == -1) {
const config = new MatSnackBarConfig();
config.verticalPosition = 'top';
config.duration = 3000
this.snackBar.open('请上传图片后缀为png,jpg,jpeg的文件', '确定', config);
return
}
if (file && fileSize <= maxSize) { //上传文件<=5MB时 if (file && fileSize <= maxSize) { //上传文件<=5MB时
let formData = new FormData() let formData = new FormData()

7
src/app/ui/collection-tools-plan/collection-tools.component.ts

@ -2031,6 +2031,13 @@ export class CollectionToolsPlanComponent implements OnInit {
let fileSize = file.size || null //上传文件的总大小 let fileSize = file.size || null //上传文件的总大小
let maxSize = 5 * 1024 * 1024 //5MB一个分片 let maxSize = 5 * 1024 * 1024 //5MB一个分片
let tenSize = 10 * 1024 * 1024 //10MB限制 let tenSize = 10 * 1024 * 1024 //10MB限制
    if (file && file.name.toLowerCase().indexOf('png') == -1 && file.name.toLowerCase().indexOf('jpg') == -1 && file.name.toLowerCase().indexOf('jpeg') == -1) {
      const config = new MatSnackBarConfig();
      config.verticalPosition = 'top';
      config.duration = 3000
      this.snackBar.open('请上传图片后缀为png,jpg,jpeg的文件', '确定', config);
      return
   }
if (file && fileSize <= maxSize) { //上传文件<=5MB时 if (file && fileSize <= maxSize) { //上传文件<=5MB时
let formData = new FormData() let formData = new FormData()

7
src/app/ui/collection-tools-plan/leftFunctionalDomain.ts

@ -60,6 +60,13 @@ export class leftFunctionalDomainComponentPlan implements OnInit {
//提交表单创建平面图 //提交表单创建平面图
onSubmit (e) { onSubmit (e) {
if (this.file && this.selectedType == 'image') { if (this.file && this.selectedType == 'image') {
    if (this.file.name.toLowerCase().indexOf('png') == -1 && this.file.name.toLowerCase().indexOf('jpg') == -1 && this.file.name.toLowerCase().indexOf('jpeg') == -1) {
      const config = new MatSnackBarConfig();
      config.verticalPosition = 'top';
      config.duration = 3000
      this.snackBar.open('请上传图片后缀为png,jpg,jpeg的文件', '确定', config);
      return
  }
this.maskLayerService.sendMessage(true) this.maskLayerService.sendMessage(true)
if (this.file.size<=5*1024*1024) { //小于5MB if (this.file.size<=5*1024*1024) { //小于5MB
let formData = new FormData() let formData = new FormData()

7
src/app/ui/collection-tools/collection-tools.component.ts

@ -2156,6 +2156,13 @@ export class CollectionToolsComponent implements OnInit {
let fileSize = file.size || null //上传文件的总大小 let fileSize = file.size || null //上传文件的总大小
let maxSize = 5 * 1024 * 1024 //5MB一个分片 let maxSize = 5 * 1024 * 1024 //5MB一个分片
let tenSize = 10 * 1024 * 1024 //10MB限制 let tenSize = 10 * 1024 * 1024 //10MB限制
if (file && file.name.toLowerCase().indexOf('png') == -1 && file.name.toLowerCase().indexOf('jpg') == -1 && file.name.toLowerCase().indexOf('jpeg') == -1) {
const config = new MatSnackBarConfig();
config.verticalPosition = 'top';
config.duration = 3000
this.snackBar.open('请上传图片后缀为png,jpg,jpeg的文件', '确定', config);
return
}
if (file && fileSize <= maxSize) { //上传文件<=5MB时 if (file && fileSize <= maxSize) { //上传文件<=5MB时
let formData = new FormData() let formData = new FormData()

7
src/app/ui/collection-tools/leftFunctionalDomain.ts

@ -230,6 +230,13 @@ export class addBGCDisposalNodeComponent implements OnInit {
//提交表单 //提交表单
onSubmit (e) { onSubmit (e) {
if (e.name && this.file) { if (e.name && this.file) {
     if (this.file.name.toLowerCase().indexOf('png') == -1 && this.file.name.toLowerCase().indexOf('jpg') == -1 && this.file.name.toLowerCase().indexOf('jpeg') == -1) {
      const config = new MatSnackBarConfig();
      config.verticalPosition = 'top';
      config.duration = 3000
      this.snackBar.open('请上传图片后缀为png,jpg,jpeg的文件', '确定', config);
      return
    }
e.file = this.file e.file = this.file
this.dialogRef.close(e); this.dialogRef.close(e);
} else { } else {

Loading…
Cancel
Save