Browse Source

修复工时管理bug

maotao 8 months ago
parent
commit
f0e10c8eb5

+ 5 - 1
src/app/views/repository-manage-add/repository-manage-add.component.ts

@@ -448,7 +448,7 @@ export class RepositoryManageAddComponent implements OnInit {
448
 	beforeUpload = (file: UploadFile) => {
448
 	beforeUpload = (file: UploadFile) => {
449
 		let index = file.name.lastIndexOf('.')
449
 		let index = file.name.lastIndexOf('.')
450
 		let type = file.name.slice(index + 1)
450
 		let type = file.name.slice(index + 1)
451
-		console.log('type===',type)
451
+		const isSize = file.size / 1024 / 1024 < 10;
452
 		const isPic = (type === 'xlsx' || type === 'pdf' || 
452
 		const isPic = (type === 'xlsx' || type === 'pdf' || 
453
 		type === 'xls' || type === 'ppt' || type === 'pptx' ||
453
 		type === 'xls' || type === 'ppt' || type === 'pptx' ||
454
 		type === 'txt' || type === 'doc' || type === 'docx');
454
 		type === 'txt' || type === 'doc' || type === 'docx');
@@ -456,6 +456,10 @@ export class RepositoryManageAddComponent implements OnInit {
456
 			this.message.error('只能上传PDF、word、ppt、excel、txt等文件类型格式!');
456
 			this.message.error('只能上传PDF、word、ppt、excel、txt等文件类型格式!');
457
 			return false;
457
 			return false;
458
 		}
458
 		}
459
+		if (!isSize) {
460
+		  this.message.error('文件大小不能大于10MB!');
461
+		  return false;
462
+		}
459
 		this.fileData = this.fileData.concat(file);
463
 		this.fileData = this.fileData.concat(file);
460
 		return false;
464
 		return false;
461
 	};
465
 	};

+ 4 - 4
src/app/views/repository-manage/repository-manage.component.ts

@@ -300,8 +300,8 @@ export class RepositoryManageComponent implements OnInit {
300
 		this.modal = true
300
 		this.modal = true
301
 		var that = this;
301
 		var that = this;
302
 		let query = {
302
 		let query = {
303
-			idx: that.pageIndex - 1,
304
-			sum: that.pageSize,
303
+			idx: 0,
304
+			sum: 9999,
305
 			solution: {
305
 			solution: {
306
 				hosId: this.hosId,
306
 				hosId: this.hosId,
307
 				operationType:'lookOver',
307
 				operationType:'lookOver',
@@ -358,8 +358,8 @@ export class RepositoryManageComponent implements OnInit {
358
 		this.modal = true
358
 		this.modal = true
359
 		var that = this;
359
 		var that = this;
360
 		let query = {
360
 		let query = {
361
-			idx: that.pageIndex - 1,
362
-			sum: that.pageSize,
361
+			idx: 0,
362
+			sum: 9999,
363
 			solution: {
363
 			solution: {
364
 				hosId: this.hosId,
364
 				hosId: this.hosId,
365
 				operationType:'lookOver',
365
 				operationType:'lookOver',