From 7a8920cd22441a8b14174e4dfad42be591b3725f Mon Sep 17 00:00:00 2001
From: zhangyanpeng <bob.zhang@highdatas.com>
Date: 星期二, 17 三月 2020 09:28:04 +0800
Subject: [PATCH] Merge branch 'master' of http://highdatas.com:9000/r/~kimi/srs

---
 src/components/popup/newProject.vue |   30 +++++++++++++++++-------------
 1 files changed, 17 insertions(+), 13 deletions(-)

diff --git a/src/components/popup/newProject.vue b/src/components/popup/newProject.vue
index 589a4cc..3f62450 100644
--- a/src/components/popup/newProject.vue
+++ b/src/components/popup/newProject.vue
@@ -5,7 +5,7 @@
        <el-step title="鏂规璁捐" description="纭珛鏂规"></el-step>
        <el-step title="棰勮" description=""></el-step>
      </el-steps>
-     <div style="height: 55vh; padding:0px; box-sizing:boder-box; overflow: auto;">
+     <div style="height: 45vh; padding:0px; box-sizing:boder-box; overflow: auto;">
        <div v-if="add_Step == 0" style="width: 100%; height: 100%;" align="center">
         <div style="padding-top: 5%; box-sizing:boder-box">
 					<el-form :model="ruleForm" :rules="rules" ref="ruleForm" label-width="100px" class="demo-ruleForm">
@@ -42,7 +42,7 @@
         </div>
       </div>
       <div v-if="add_Step == 1" style="width: 100%; height: 100%;" align="center">
-				<substep ref="substep_zj" v-bind:xmId="xmId"></substep>
+				<substep ref="substep_zj" v-bind:xmId="xmId" v-bind:totalItems="totalItems"></substep>
       </div>
       <div v-if="add_Step == 2" style="width: 100%; height: 100%;" align="center">
         <substepReadOnly v-bind:form_objs="form_objs" v-bind:showData_="showData_"></substepReadOnly>
@@ -77,7 +77,7 @@
     return {
 		userId: undefined,
 		assign: undefined,
-      add_Step: 0,
+		add_Step: 0,
 			loading_nextStep: false,
 			nextStepName: "涓嬩竴姝�",
 			loading_cancel: false,
@@ -85,6 +85,7 @@
 			
 			ruleForm: {},
 			xmId: null,
+			totalItems: null,
 			showData_: null,
 			form_objs: null,
 			options_objectives: [
@@ -135,9 +136,9 @@
   },
 mounted() {
 	if(this.rowData.id) {
-		this.ruleForm = this.rowData;
 		this.xmId = this.rowData.id;
 	}
+	this.ruleForm = this.rowData;
 	this.userId = localStorage.getItem('userId');
 	this.assign = localStorage.getItem('assign');
 },
@@ -168,7 +169,6 @@
 				  if (valid) {
 				    is_null1 = true;
 				  } else {
-				    console.log('error submit!!');
 				    return false;
 				  }
 				});
@@ -198,23 +198,22 @@
 		//	let items2 = new Date(ruleForm_.items[1]).Format("yyyy-MM-dd").toLocaleString();
 			
 			let url = "/api/scheme/addOrUpdate";
+			let me = this;
 			this.$axios.get(url,{
 			  params: {
 			    reseachType: ruleForm_.objective,
 			    name: ruleForm_.name,
 					startTime: items1,
 					endTime: items2,
-					id: this.xmId,
+					id: me.xmId,
 					desp:ruleForm_.desp,
-					userId: this.userId
+					userId: me.userId
 			  }
 			}).then(data_ => {
-			  console.log(data_);
-				this.xmId = data_.data.data;
-				
-				this.add_Step = 1;
+				me.xmId = data_.data.data;
+				me.totalItems = ruleForm_.items;
+				me.add_Step = 1;
 			}).catch(error =>{
-			    console.log(error);
 			})
 		},
 		
@@ -238,6 +237,11 @@
 				if (!form_obj.mustAttach) {
 					form_obj.mustAttach = false;
 				}
+				/* if (form_obj.items_fz.length > 0) {
+					form_obj.startTime = form_obj.items_fz[0];
+					form_obj.endTime = form_obj.items_fz[1];
+				} */
+				
 				if (form_obj.startTime) {
 					form_obj.startTime = this.$moment(form_obj.startTime).format('YYYY-MM-DD');
 			//		form_obj.startTime = new Date(form_obj.startTime).Format("yyyy-MM-dd").toLocaleString();
@@ -273,7 +277,7 @@
 			}
 		},
 		saveStep3() {
-			let url = "/api/scheme/working/" + this.ruleForm.id;
+			let url = "/api/scheme/working/" + this.xmId;
 			this.$axios.get(url).then(data_ => {
 				if(data_.data.success) {
 					this.$message('椤圭洰鍚姩鎴愬姛');

--
Gitblit v1.8.0