Przeglądaj źródła

英文研报加默认作者

Karsa 3 miesięcy temu
rodzic
commit
acf36a4da2
1 zmienionych plików z 35 dodań i 29 usunięć
  1. 35 29
      src/views/report_manage/reportEn/reportEditor.vue

+ 35 - 29
src/views/report_manage/reportEn/reportEditor.vue

@@ -423,7 +423,7 @@ export default {
 				classifynameArr: [],
 				title: '',
 				abstract: '',
-				author: ['Investment Research Team'],
+				author: [],
 				frequency: '日度',
 				create_time: http.dateFormatter(new Date(), false),
 				content: '',
@@ -612,18 +612,17 @@ export default {
 				return JSON.parse(i).v||0
 			})
 			this.checkClassifyNameArr(2,classify)
-			// console.log(this.aeForm.classifynameArr,'this.aeForm.classifynameArr');
+
 			if (this.aeForm.add_type == 1) {
 				if (this.aeForm.classifynameArr.length == 3) {
 					this.aeForm.title = JSON.parse(this.aeForm.classifynameArr[2]).l;
 				}else{
           this.aeForm.title = ''
         }
-				return false;
 			}
-			if (this.aeForm.classifynameArr.length == 0) {
-				return false;
-			} 
+
+			if (!this.aeForm.classifynameArr.length) return
+
 			let params = {
 				ClassifyIdFirst: JSON.parse(this.aeForm.classifynameArr[1]).v,
 			};
@@ -641,29 +640,36 @@ export default {
 						this.$message.error(this.$t('ReportManage.ReportList.no_reports_msg'));
 						return false;
 					}
-					this.aeForm = {
-						add_type: 2,
-						classify_name: 1,
-						classifynameArr:[
-							JSON.stringify({
-								l: res.Data.ClassifyNameRoot,
-								v: parseInt(res.Data.ClassifyIdRoot),
-							}),
-							JSON.stringify({
-								l: res.Data.ClassifyNameFirst,
-								v: parseInt(res.Data.ClassifyIdFirst),
-							}),
-							JSON.stringify({
-								l: res.Data.ClassifyNameSecond,
-								v: parseInt(res.Data.ClassifyIdSecond),
-						})],
-						title: res.Data.Title,
-						abstract: res.Data.Abstract,
-						author: res.Data.Author ? res.Data.Author.split(',') : '',
-						frequency: res.Data.Frequency,
-						create_time: res.Data.CreateTime,
-						content: res.Data.Content,
-            			overview:res.Data.Overview||''
+
+					if(this.aeForm.add_type == 1) {
+						this.aeForm.author = res.Data.Author ? res.Data.Author.split(',') : ['']
+					}else {
+
+						this.aeForm = {
+							add_type: 2,
+							classify_name: 1,
+							classifynameArr:[
+								JSON.stringify({
+									l: res.Data.ClassifyNameRoot,
+									v: parseInt(res.Data.ClassifyIdRoot),
+								}),
+								JSON.stringify({
+									l: res.Data.ClassifyNameFirst,
+									v: parseInt(res.Data.ClassifyIdFirst),
+								}),
+								JSON.stringify({
+									l: res.Data.ClassifyNameSecond,
+									v: parseInt(res.Data.ClassifyIdSecond),
+							})],
+							title: res.Data.Title,
+							abstract: res.Data.Abstract,
+							author: res.Data.Author ? res.Data.Author.split(',') : '',
+							frequency: res.Data.Frequency,
+							create_time: res.Data.CreateTime,
+							content: res.Data.Content,
+							overview:res.Data.Overview||''
+						}
+
 					};
 				}
 			});