From fadf2795757ac6df1c792546725ea177c93d9d7a Mon Sep 17 00:00:00 2001
From: kimi <kimi42345@gmail.com>
Date: 星期三, 18 三月 2020 14:03:10 +0800
Subject: [PATCH] Merge branch 'master' of http://highdatas.com:9000/r/~kimi/srs

---
 src/views/calendarTask.vue |   40 +++++++++++++++++++++++++++-------------
 1 files changed, 27 insertions(+), 13 deletions(-)

diff --git a/src/views/calendarTask.vue b/src/views/calendarTask.vue
index f65229a..7683f38 100644
--- a/src/views/calendarTask.vue
+++ b/src/views/calendarTask.vue
@@ -30,12 +30,14 @@
 				<el-upload
 					class="upload-demo"
 					:action="upload_url"
-					
 					:data="upData"
 					:limit="1"
 					:file-list="fileList"
 					:auto-upload='false'
 					ref="upload"
+					:on-success="upSuccess"
+					:on-error="upError"
+					
 					>
 					<el-button size="medium" type="text">閫夋嫨鏂囦欢</el-button>
 					<div slot="tip" class="el-upload__tip">鏂囦欢涓嶈秴杩�50M</div>
@@ -133,11 +135,15 @@
 					doHandleTask() {
 						//姝d鐨勬槑缁嗕换鍔″畬鎴�
 						let id = this.handleTaskType.id;
+						if (!this.desc_task) {
+							this.$message('璇峰~鍐欐弿杩�');
+							return
+						}
+						this.upData = {//璁剧疆瑕佷紶鐨勫弬鏁�
+							desp: this.desc_task
+						};
+						
 						if(this.handleTaskType.mustAttach) {
-							this.upData = {//璁剧疆瑕佷紶鐨勫弬鏁�
-								desp: this.desc_task
-							},
-							
 							this.$refs.upload.submit();//寮�濮嬩笂浼�
 						}
 						else {
@@ -167,15 +173,23 @@
 						}
 					},
 					
-					// submitUpload() {
-					// 	this.handleTaskType; //瑕佸鐞嗙殑鏄庣粏鏁版嵁
+				submitUpload() {
+					this.handleTaskType; //瑕佸鐞嗙殑鏄庣粏鏁版嵁
+					
+					this.upData = {//璁剧疆瑕佷紶鐨勫弬鏁�
 						
-					// 	this.upData = {//璁剧疆瑕佷紶鐨勫弬鏁�
-							
-					// 	},
-					// 	this.upload_url = ""; //璁剧疆涓婁紶鎺ュ彛
-					//   this.$refs.upload.submit();//寮�濮嬩笂浼�
-					// },
+					},
+					this.upload_url; //璁剧疆涓婁紶鎺ュ彛
+					 this.$refs.upload.submit();//寮�濮嬩笂浼�
+				 },
+				 
+				 upSuccess(response, file, fileList) {
+					 this.$message('涓婁紶鎴愬姛');
+				 },
+				 
+				 upError(err, file, fileList) {
+					 this.$message('涓婁紶澶辫触');
+				 },
 					
 					Cancel() {
 						this.dialog_1 = false;

--
Gitblit v1.8.0