From c1805e1e6f41a370546e70a07d5f4496ad4b341d Mon Sep 17 00:00:00 2001
From: kimi <kimi42345@gmail.com>
Date: 星期三, 22 一月 2020 15:58:55 +0800
Subject: [PATCH] add

---
 src/components/popup/newProject.vue |   39 ++++++++++++++++++++++++++++++++-------
 1 files changed, 32 insertions(+), 7 deletions(-)

diff --git a/src/components/popup/newProject.vue b/src/components/popup/newProject.vue
index 5d6d823..82368da 100644
--- a/src/components/popup/newProject.vue
+++ b/src/components/popup/newProject.vue
@@ -35,8 +35,8 @@
 							</el-date-picker>
 					  </el-form-item>
 						
-					  <el-form-item label="椤圭洰鎻忚堪:" prop="desc" style="width: 50%;">
-					    <el-input type="textarea" v-model="ruleForm.desc"></el-input>
+					  <el-form-item label="椤圭洰鎻忚堪:" prop="desp" style="width: 50%;">
+					    <el-input type="textarea" v-model="ruleForm.desp"></el-input>
 					  </el-form-item>
 					</el-form>
         </div>
@@ -63,6 +63,12 @@
 import substepReadOnly from './portion/substepReadOnly.vue'
 export default {
   name: 'dataImport',
+  props:{
+	  rowData:{
+		  type: Object,
+		  required: true
+	  }
+  },
 	components: {
 	  substep,
 		substepReadOnly
@@ -125,7 +131,12 @@
 			
 		}
   },
-	
+mounted() {
+	if(this.rowData.id) {
+		this.ruleForm = this.rowData;
+		this.xmId = this.rowData.id;
+	}
+},
   methods:{
 		Cancel() {
 			this.add_Step = 0;
@@ -171,7 +182,7 @@
 			//	this.nextStepName = "瀹� 鎴�";
 			}
 			else if (this.add_Step == 2) {
-				this.Cancel();
+				this.saveStep3();
 			}
 		},
 		
@@ -189,7 +200,8 @@
 			    name: ruleForm_.name,
 					startTime: items1,
 					endTime: items2,
-					id: this.xmId
+					id: this.xmId,
+					desp:ruleForm_.desp
 			  }
 			}).then(data_ => {
 			  console.log(data_);
@@ -243,7 +255,7 @@
 			
 			if (is_null1) {
 				let datas = "?datas=" + encodeURI(JSON.stringify(form_array));
-				let url = "/api/schemeDetail/updates";
+				let url = "/api/detail/updates";
 				this.$axios.get(url + datas).then(data_ => {
 					console.log(data_);
 					
@@ -254,7 +266,20 @@
 				})
 			}
 		},
-		
+		saveStep3() {
+			let url = "/api/scheme/working/" + this.ruleForm.id;
+			this.$axios.get(url + datas).then(data_ => {
+				if(data_.data.success) {
+					this.$message('椤圭洰鍚姩鎴愬姛');
+					this.Cancel();
+				}else {
+					
+					this.$message({message:'椤圭洰鍚姩澶辫触', type: 'warning'});
+				}
+			}).catch(error =>{
+					console.log(error);
+			})
+		},
   }
 }
 </script>

--
Gitblit v1.8.0