From d7e4b63134fbb434ef382453ed8d3ef4cf378808 Mon Sep 17 00:00:00 2001
From: zhangyanpeng <bob.zhang@highdatas.com>
Date: 星期三, 22 四月 2020 19:19:42 +0800
Subject: [PATCH] 界面调整

---
 src/components/popup/portion/substepReadOnly.vue |   68 ++++++++++++++++++++++++++++++---
 1 files changed, 61 insertions(+), 7 deletions(-)

diff --git a/src/components/popup/portion/substepReadOnly.vue b/src/components/popup/portion/substepReadOnly.vue
index 34ffde1..6b60675 100644
--- a/src/components/popup/portion/substepReadOnly.vue
+++ b/src/components/popup/portion/substepReadOnly.vue
@@ -1,6 +1,9 @@
 <template>
-  <div class="class_substep">
-		<div style="width: 79%; height: 100%; overflow: auto; padding-top: 0px; box-sizing: border-box;">
+  <div class="class_substep" >
+		<div style="width: 79%;text-align: center; margin: 0 10px;">
+			<h2 style="margin: 10px;">椤圭洰鎬婚噾棰�:<span style="font-weight: bold;">{{money}}</span></h2>
+		</div>
+		<div style="width: 79%; height: 88%; overflow: auto; padding-top: 0px; box-sizing: border-box;">
 			<transition name="el-zoom-in-top">
 				<div v-show="showData['title']" class="transition-box" style="text-align: center; margin: 0 10px;">
 					<h3 style="margin: 10px;">绔嬮鏈嶅姟</h3>
@@ -25,7 +28,7 @@
 								</el-col>
 							</el-row>
 							<el-row v-if="form_['title'].titleType">
-								<el-col :span="22" class="z_grid-content2">
+								<el-col :span="22" class="z_grid-content1">
 									<el-form-item label="鎻忚堪" prop="titleType"
 										:rules="[{required: true, message: '璇疯緭鍏�', trigger: ['blur', 'change']}]"
 									>
@@ -1178,19 +1181,30 @@
 <script>
   export default {
 		props:{
-			showData_: {
+			/* showData_: {
 				type: Object,
 				required: true
 			},
 			form_objs: {
 			   type: Object,
 			   required: true
+			}, */
+			
+			xmId: {
+			   type: String,
+			   required: true
 			},
+			/* totalItems: {
+				type: Array,
+				required: true
+			} */
 		},
     data() {
       return {
 				showData: {},
+				money:0,
 				hideData: {
+					
 					'title': false,
 					'scheme': false,
 					'search': false,
@@ -1441,7 +1455,6 @@
 			  let url = "/api/sysRoleMapping/detail";
 			  this.$axios.get(url)
 			  .then(data_ => {
-			    console.log(data_);
 			    let list = data_.data.data;
 			    let parId = "";
 			    let obj = {};
@@ -1472,14 +1485,54 @@
 			    me.options_users = result;
 			
 			  }).catch(error =>{
-			      console.log(error);
 			  })
 			},
 			
 			getDetailed() {
+				let me = this;
+				let url = "/api/detail/parent/" + this.xmId;
+				this.$axios.get(url).then(data_ => {
+					me.defaultCheckedKeys = [];
+					me.showData = {};
+					let details_ = data_.data.data;
+					me.money = 0;
+					if(details_.length > 0) {//濡傛灉瀛樺湪鏄庣粏
+						for(let i=0; i<details_.length; i++) {
+							let detail_ = details_[i];
+							//璁剧疆鏍戠殑閫変腑
+							me.defaultCheckedKeys.push(detail_.type);
+							//灞曞紑鎵�鏈夋爲鑺傜偣瀵瑰簲鐨刦rom
+							me.showData[detail_.type] = true;
+							
+							//缁欐墍鏈夌殑from鐨勬暟鎹祴鍊�
+							
+							me.form_[detail_.type] = detail_;
+							me.form_[detail_.type].userIds = [];
+							me.form_[detail_.type].userIds.push(detail_.roleName);
+							me.form_[detail_.type].userIds.push(detail_.userId);
+							
+							me.money += parseFloat(detail_.budget); 
+						}
+						
+						
+						
+					}
+				}).catch(error =>{
+				})
+				
+			},
+			
+			/* getDetailed() {
 				this.showData = this.showData_;
 				this.form_= this.form_objs;
-			},
+				this.money = 0;
+				for (let itm_k in this.showData_) {
+					
+					let form_obj = {};
+					form_obj = this.form_objs[itm_k];
+					this.money += parseFloat(form_obj.budget); 
+				}
+			}, */
 			
 			//鍗曚竴浜嬩欢
 			title_titleType(val) {
@@ -1500,6 +1553,7 @@
 <style>
 	.class_substep {
 		height: 100%;
+		overflow: hidden;
 	}
 	
 	.class_substep .el-divider--horizontal {

--
Gitblit v1.8.0