From a2c92276402a4c5ad6373928986e040cf1a87483 Mon Sep 17 00:00:00 2001
From: feige <791364011@qq.com>
Date: 星期二, 26 十一月 2024 15:44:43 +0800
Subject: [PATCH] 修改了对应的样式

---
 ruoyi-ui/src/views/healthy/healthYear.vue |  400 +++++++++++++++++++++++++++++++++++++++++++++++---------
 1 files changed, 331 insertions(+), 69 deletions(-)

diff --git a/ruoyi-ui/src/views/healthy/healthYear.vue b/ruoyi-ui/src/views/healthy/healthYear.vue
index 51378c3..50e540a 100644
--- a/ruoyi-ui/src/views/healthy/healthYear.vue
+++ b/ruoyi-ui/src/views/healthy/healthYear.vue
@@ -19,6 +19,26 @@
 
     <el-divider />
 
+<el-row  :gutter="2">
+  <el-col :border="1" :span="4" v-for="(item, index) in allBasicInfo" :key="o" :offset="1">
+  <div>
+    <el-card :body-style="{ padding: '1px' }">
+      <img src="https://shadow.elemecdn.com/app/element/hamburger.9cf7b091-55e9-11e9-a976-7f4d0b07eef6.png" class="image">
+      <div style="">
+        <span>{{item}}</span>
+        <div class="bottom clearfix">
+          
+          <el-button type="text" class="button" @click="handleEditInfo(index)">鏌ョ湅璇︽儏</el-button>
+        </div>
+      </div>
+    </el-card>
+	</div>
+  </el-col>
+</el-row>
+
+
+    <el-dialog  :visible.sync="open" width="800px" append-to-body @close="">
+
 
     <h2 style="font-size:21px">鍩烘湰鎯呭喌</h2>
     <el-container>
@@ -102,45 +122,6 @@
       </div>
 
 
-      <div style="padding-left:400px;padding-top:30px" >
-        <el-container >
-
-
-          <el-row :gutter="10" class="mb8">
-            <el-col  >
-              <el-button
-                plain
-                @click="handleEdit()"
-                style="width: 80px;height: 32px;background: #E0EEFE;"
-                v-if="isShow"
-                v-hasPermi="['system:role:edit']"
-              >缂栬緫</el-button>
-              <el-button v-if="isShow_2"  style="width: 80px;height: 32px;background: #E0EEFE;" @click="submitForm" :disabled="dsb">瀹屾垚</el-button>
-              <br>
-
-            </el-col>
-
-<!--            <el-col style="padding-top: 10px;">-->
-<!--              <el-button-->
-<!--                plain-->
-<!--                style="width: 80px;height: 32px;background: #D2F3E0;"-->
-<!--                @click="handleExport"-->
-<!--                v-hasPermi="['family:note:export']"-->
-<!--              >瀵煎嚭</el-button></el-col>-->
-
-            <el-col style="padding-top: 10px;">
-              <el-button
-                plain
-                style="width: 80px;height: 32px;background: #FFDDE3;"
-                v-print="'#printable-content'"
-                v-hasPermi="['family:note:export']"
-              >鎵撳嵃</el-button></el-col>
-
-
-          </el-row>
-
-        </el-container>
-      </div>
       <!--      </el-dialog> self:user:export-->
     </el-container>
     <div>
@@ -213,7 +194,50 @@
         </el-container>
       </div>
     </el-container>
+	
+	      <div style="padding-top:30px" >
+	        <el-container >
+	
+	
+	          <el-row :gutter="10" class="mb8">
+	            <el-col  >
+	              <el-button
+	                plain
+	                @click="handleEdit()"
+	                style="width: 80px;height: 32px;background: #E0EEFE;"
+	                v-if="isShow"
+	                v-hasPermi="['system:role:edit']"
+	              >缂栬緫</el-button>
+	              <el-button v-if="isShow_2"  style="width: 80px;height: 32px;background: #E0EEFE;" @click="submitForm" :disabled="dsb">瀹屾垚</el-button>
+	              <br>
+	
+	            </el-col>
+	
+	<!--            <el-col style="padding-top: 10px;">-->
+	<!--              <el-button-->
+	<!--                plain-->
+	<!--                style="width: 80px;height: 32px;background: #D2F3E0;"-->
+	<!--                @click="handleExport"-->
+	<!--                v-hasPermi="['family:note:export']"-->
+	<!--              >瀵煎嚭</el-button></el-col>-->
+	
+	  <!--          <el-col style="padding-top: 10px;">
+	              <el-button
+	                plain
+	                style="width: 80px;height: 32px;background: #FFDDE3;"
+	                v-print="'#printable-content'"
+	                v-hasPermi="['family:note:export']"
+	              >鎵撳嵃</el-button></el-col> -->
+	
+	
+	          </el-row>
+	
+	        </el-container>
+	      </div>
+</el-dialog>
 
+
+<el-dialog :visible.sync="open1" width="800px" append-to-body @close="">
     <h2 style="font-size:21px">鐢熸椿涔犳儻</h2>
     <el-container>
       <div style="padding-left:0px" >
@@ -362,8 +386,49 @@
         </el-container>
       </div>
     </el-container>
-
-
+	
+	
+	<div style="padding-top:30px" >
+	        <el-container >
+	
+	
+	          <el-row :gutter="10" class="mb8">
+	            <el-col  >
+	              <el-button
+	                plain
+	                @click="handleEdit()"
+	                style="width: 80px;height: 32px;background: #E0EEFE;"
+	                v-if="isShow"
+	                v-hasPermi="['system:role:edit']"
+	              >缂栬緫</el-button>
+	              <el-button v-if="isShow_2"  style="width: 80px;height: 32px;background: #E0EEFE;" @click="submitForm" :disabled="dsb">瀹屾垚</el-button>
+	              <br>
+	
+	            </el-col>
+	
+	<!--            <el-col style="padding-top: 10px;">-->
+	<!--              <el-button-->
+	<!--                plain-->
+	<!--                style="width: 80px;height: 32px;background: #D2F3E0;"-->
+	<!--                @click="handleExport"-->
+	<!--                v-hasPermi="['family:note:export']"-->
+	<!--              >瀵煎嚭</el-button></el-col>-->
+	
+	  <!--          <el-col style="padding-top: 10px;">
+	              <el-button
+	                plain
+	                style="width: 80px;height: 32px;background: #FFDDE3;"
+	                v-print="'#printable-content'"
+	                v-hasPermi="['family:note:export']"
+	              >鎵撳嵃</el-button></el-col> -->
+	
+	
+	          </el-row>
+	
+	        </el-container>
+	      </div>
+</el-dialog>
+<el-dialog :visible.sync="open2" width="800px" append-to-body @close="">
     <h2 style="font-size:21px">鎶ょ悊鏌ヤ綋</h2>
     <el-container>
       <div style="padding-left:0px" >
@@ -494,8 +559,47 @@
         </el-container>
       </div>
     </el-container>
-
-
+	<div style="padding-top:30px" >
+	        <el-container >
+	
+	
+	          <el-row :gutter="10" class="mb8">
+	            <el-col  >
+	              <el-button
+	                plain
+	                @click="handleEdit()"
+	                style="width: 80px;height: 32px;background: #E0EEFE;"
+	                v-if="isShow"
+	                v-hasPermi="['system:role:edit']"
+	              >缂栬緫</el-button>
+	              <el-button v-if="isShow_2"  style="width: 80px;height: 32px;background: #E0EEFE;" @click="submitForm" :disabled="dsb">瀹屾垚</el-button>
+	              <br>
+	
+	            </el-col>
+	
+	<!--            <el-col style="padding-top: 10px;">-->
+	<!--              <el-button-->
+	<!--                plain-->
+	<!--                style="width: 80px;height: 32px;background: #D2F3E0;"-->
+	<!--                @click="handleExport"-->
+	<!--                v-hasPermi="['family:note:export']"-->
+	<!--              >瀵煎嚭</el-button></el-col>-->
+	
+	  <!--          <el-col style="padding-top: 10px;">
+	              <el-button
+	                plain
+	                style="width: 80px;height: 32px;background: #FFDDE3;"
+	                v-print="'#printable-content'"
+	                v-hasPermi="['family:note:export']"
+	              >鎵撳嵃</el-button></el-col> -->
+	
+	
+	          </el-row>
+	
+	        </el-container>
+	      </div>
+</el-dialog>
+<el-dialog :visible.sync="open3" width="800px" append-to-body @close="">
     <h2 style="font-size:21px">鐜板瓨鍋ュ悍闂</h2>
 
     <el-container>
@@ -597,12 +701,12 @@
                v-loading="loading" :data="HealthNoteList" >
         <el-button size='mini' type="text" class="btn_edit" @click="saveData" style='top: 0px;right: 20px;'>
           <sapn v-html="'\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0'"></sapn>
-          <span >{{ editMode ? '淇濆瓨' : '淇敼' }}</span>
+          <span >{{ editMode ? this.bstn='淇濆瓨' : this.bstn='淇敼' }}</span>
         </el-button>
         <el-tab-pane label="鐢熸椿涔犳儻" name="lifeHabits" >
           <template v-if="editMode">
             <div style="padding-top: 10px">
-              <el-input  v-model="HealthNoteList.lifeHabits"  ></el-input>
+              <el-input  v-model="HealthNoteList.lifeHabits"  type="textarea"  ></el-input>
             </div>
           </template>
           <template v-else>
@@ -610,38 +714,134 @@
           </template>
         </el-tab-pane>
         <el-tab-pane label="浠ュ線鐥呭彶" name="historyDisease">
-          {{HealthNoteList.historyDisease}}}
+			<template v-if="editMode">
+			  <div style="padding-top: 10px">
+			    <el-input  v-model="HealthNoteList.historyDisease"  type="textarea"  ></el-input>
+			  </div>
+			</template>
+			<template v-else>
+          {{HealthNoteList.historyDisease}}
+		  			</template>
         </el-tab-pane>
         <el-tab-pane label="娌荤枟淇℃伅" name="treatmentInfo">
           <!-- 娌荤枟淇℃伅鐨勫唴瀹� -->
-          {{HealthNoteList.treatmentInfo}}}
+		  <template v-if="editMode">
+		    <div style="padding-top: 10px">
+		      <el-input  v-model="HealthNoteList.treatmentInfo"  type="textarea"  ></el-input>
+		    </div>
+		  </template>
+		  <template v-else>
+          {{HealthNoteList.treatmentInfo}}
+		  </template>
         </el-tab-pane>
         <el-tab-pane label="瀹舵棌鐥呭彶" name="familyDisease">
           <!-- 瀹舵棌鐥呭彶鐨勫唴瀹� -->
-          {{HealthNoteList.familyDisease}}}
+		  <template v-if="editMode">
+		    <div style="padding-top: 10px">
+		      <el-input  v-model="HealthNoteList.familyDisease"  type="textarea"  ></el-input>
+		    </div>
+		  </template>
+		  <template v-else>
+          {{HealthNoteList.familyDisease}}
+		  </template>
         </el-tab-pane>
         <el-tab-pane label="鐜扮梾鍙�" name="nowDisease">
           <!-- 鐩墠鐥呮儏鐨勫唴瀹� -->
-          {{HealthNoteList.nowDisease}}}
+		  <template v-if="editMode">
+		    <div style="padding-top: 10px">
+		      <el-input  v-model="HealthNoteList.nowDisease"  type="textarea"  ></el-input>
+		    </div>
+		  </template>
+		  <template v-else>
+          {{HealthNoteList.nowDisease}}
+		  </template>
         </el-tab-pane>
         <el-tab-pane label="鐤剧梾鍙戠敓" name="diseaseHappen">
           <!-- 鐤剧梾鍙戠敓鐨勫唴瀹� -->
-          {{HealthNoteList.diseaseHappen}}}
+		  <template v-if="editMode">
+		    <div style="padding-top: 10px">
+		      <el-input  v-model="HealthNoteList.diseaseHappen"  type="textarea"  ></el-input>
+		    </div>
+		  </template>
+		  <template v-else>
+          {{HealthNoteList.diseaseHappen}}
+		  </template>
         </el-tab-pane>
         <el-tab-pane label="鐤剧梾鍙戝睍" name="diseaseDevelop">
           <!-- 鐤剧梾鍙戝睍鐨勫唴瀹� -->
-          {{HealthNoteList.diseaseDevelop}}}
+		  <template v-if="editMode">
+		    <div style="padding-top: 10px">
+		      <el-input  v-model="HealthNoteList.diseaseDevelop"  type="textarea"  ></el-input>
+		    </div>
+		  </template>
+		  <template v-else>
+          {{HealthNoteList.diseaseDevelop}}
+		  </template>
         </el-tab-pane>
         <el-tab-pane label="鐤剧梾娌荤枟" name="diseaseTreat">
           <!-- 鐤剧梾娌荤枟鐨勫唴瀹� -->
-          {{HealthNoteList.diseaseTreat}}}
+		  <template v-if="editMode">
+		    <div style="padding-top: 10px">
+		      <el-input  v-model="HealthNoteList.diseaseTreat"  type="textarea"  ></el-input>
+		    </div>
+		  </template>
+		  <template v-else>
+          {{HealthNoteList.diseaseTreat}}
+		  </template>
         </el-tab-pane>
         <el-tab-pane label="鐤剧梾澶嶅彂" name="diseaseBack">
           <!-- 鐤剧梾澶嶅彂鐨勫唴瀹� -->
-          {{HealthNoteList.diseaseBack}}}
+		  <template v-if="editMode">
+		    <div style="padding-top: 10px">
+		      <el-input  v-model="HealthNoteList.diseaseBack"  type="textarea"  ></el-input>
+		    </div>
+		  </template>
+		  <template v-else>
+          {{HealthNoteList.diseaseBack}}
+		  </template>
         </el-tab-pane>
       </el-tabs>
     </div>
+	<div style="padding-top:30px" >
+	        <el-container >
+	
+	
+	          <el-row :gutter="10" class="mb8">
+	            <el-col  >
+	              <el-button
+	                plain
+	                @click="handleEdit()"
+	                style="width: 80px;height: 32px;background: #E0EEFE;"
+	                v-if="isShow"
+	                v-hasPermi="['system:role:edit']"
+	              >缂栬緫</el-button>
+	              <el-button v-if="isShow_2"  style="width: 80px;height: 32px;background: #E0EEFE;" @click="submitForm" :disabled="dsb">瀹屾垚</el-button>
+	              <br>
+	
+	            </el-col>
+	
+	<!--            <el-col style="padding-top: 10px;">-->
+	<!--              <el-button-->
+	<!--                plain-->
+	<!--                style="width: 80px;height: 32px;background: #D2F3E0;"-->
+	<!--                @click="handleExport"-->
+	<!--                v-hasPermi="['family:note:export']"-->
+	<!--              >瀵煎嚭</el-button></el-col>-->
+	
+	  <!--          <el-col style="padding-top: 10px;">
+	              <el-button
+	                plain
+	                style="width: 80px;height: 32px;background: #FFDDE3;"
+	                v-print="'#printable-content'"
+	                v-hasPermi="['family:note:export']"
+	              >鎵撳嵃</el-button></el-col> -->
+	
+	
+	          </el-row>
+	
+	        </el-container>
+	      </div>
+	</el-dialog>
   </div>
 </template>
 
@@ -667,6 +867,11 @@
   dicts: ['sys_normal_disable'],
   data() {
     return {
+		open:false,
+		open1:false,
+		open2:false,
+		open3:false,
+	  allBasicInfo:["鍩烘湰鎯呭喌","鐢熸椿涔犳儻","鎶ょ悊鏌ヤ綋","鐜板湪鍋ュ悍闂"],
       dictionary: {},
       // 閬僵灞�
       editMode: false, // 鏄惁澶勪簬缂栬緫妯″紡
@@ -701,6 +906,7 @@
       ids: [],
       // 闈炲崟涓鐢�
       single: true,
+	  bstn: '淇敼',
       // 闈炲涓鐢�
       multiple: true,
       // 鏄剧ず鎼滅储鏉′欢
@@ -941,7 +1147,7 @@
      // 鏁版嵁鑼冨洿閫夐」
      fot:['.bmp','.jpg','.jpeg','.png','.tif','.gif','.pcx','.tga','.exif','.fpx',
        '.svg','.psd','.cdr','.pcd','.dxf','.ufo','.eps','.ai','.aw','.WMF','.webp','.apng'],
-     
+
       fileList:[
       ],
       fileListOther:[
@@ -982,18 +1188,46 @@
   },
   created() {
     this.getList()
-
+    this.$route.meta.title = "鐜扮姸鍋ュ悍鎯呭喌";
+    this.$route.meta.title = "鐜扮姸鍋ュ悍鎯呭喌";
   },
 
   methods: {
+	  handleEditInfo(index)
+	  {
+		  
+		  if(index==0)
+			this.open = true
+		   else if(index==1)
+			this.open1 = true; 
+		   else if(index==2)
+			this.open2 = true; 
+		else
+			this.open3 = true; 
+	  },
     saveData() {
       // 灏嗘暟鎹彂閫佺粰鍚庣
-      const data = {
-        lifeHabits: this.HealthNoteList.lifeHabits,
-        historyDisease: this.HealthNoteList.historyDisease,
-        // 鍏朵粬瀛楁鐪佺暐锛岃琛ュ厖瀹屾暣
-      };
-
+	 // alert(this.bstn)
+	  this.editMode= true
+	  if(this.bstn=="淇濆瓨")
+	  {
+		  const data = {
+			lifeHabits: this.HealthNoteList.lifeHabits,
+			historyDisease: this.HealthNoteList.historyDisease,
+			treatmentInfo: this.HealthNoteList.treatmentInfo,
+			familyDisease:this.HealthNoteList.familyDisease,
+			nowDisease: this.HealthNoteList.nowDisease,// 鐜扮梾鍙�
+			diseaseHappen: this.HealthNoteList.diseaseHappen,// 鐤剧梾鐨勫彂鐢�
+			diseaseDevelop: this.HealthNoteList.diseaseDevelop,// 鐤剧梾鐨勫彂灞�
+			diseaseTreat: this.HealthNoteList.diseaseTreat,// 鐤剧梾鐨勬不鐤�
+			diseaseBack: this.HealthNoteList.diseaseBack// 鐤剧梾鐨勮浆褰�
+			// 鍏朵粬瀛楁鐪佺暐锛岃琛ュ厖瀹屾暣
+		  };
+		  updateHealthNote(data).then(response=>{
+			     this.$modal.msgSuccess("淇敼鎴愬姛锛�");
+		  })
+		  this.editMode = false
+		}
 
     },
     //琛�鍨嬩慨鏀�
@@ -1275,7 +1509,8 @@
 
         } else {
           this.HealthyBaseList = response.data;
-
+		  console.log("----------00000000-----------")
+		  console.log(this.HealthyBaseList)
           //琛�鍨嬬殑
           if (this.HealthyBaseList.bloodClass.a === 1) {
             this.selectedBloodType = 'a';
@@ -2007,6 +2242,7 @@
       };
       console.log(111)
       console.log(this.bloodData)
+
       if(isObjectEmpty(this.bloodData)){
         this.HealthyBaseList.bloodClass = this.HealthyBaseList.bloodClass;
       }else {
@@ -2122,11 +2358,11 @@
         this.HealthNowList.otherDiseaseClass = this.otherDiseaseTypeData;
       }
 
-
       this.$refs['elForm'].validate(valid => {
         if (valid) {
           if (this.HealthyBaseList!== undefined) {
             updateHealthBase(this.HealthyBaseList).then(response => {
+              this.$modal.msgSuccess("淇敼鎴愬姛");
 
               // this.open = false;
               this.btn=false
@@ -2134,7 +2370,7 @@
               this.dsb = true
               this.isShow_2=false
               this.isShow = true
-
+			   this.getList();
             });
           } else {
             this.$modal.msgSuccess("淇敼澶辫触");
@@ -2153,7 +2389,7 @@
               this.dsb = true
               this.isShow_2=false
               this.isShow = true
-
+   this.getList();
             });
           } else {
             this.$modal.msgSuccess("淇敼澶辫触");
@@ -2172,7 +2408,7 @@
               this.dsb = true
               this.isShow_2=false
               this.isShow = true
-
+   this.getList();
             });
           } else {
             this.$modal.msgSuccess("淇敼澶辫触");
@@ -2191,7 +2427,7 @@
               this.dsb = true
               this.isShow_2=false
               this.isShow = true
-
+   this.getList();
             });
           } else {
             this.$modal.msgSuccess("淇敼澶辫触");
@@ -2200,7 +2436,7 @@
         }
       })
       // 鍒锋柊椤甸潰
-      this.getList();
+
     },
     //骞村害鍋ュ悍鎶ュ憡
     toYearhealthy(){
@@ -2248,4 +2484,30 @@
   position: absolute;
   top: 0;
   padding-right: 90px;
-}</style>
+}
+
+  .bottom {
+    margin-top: 13px;
+    line-height: 12px;
+  }
+
+  .button {
+    padding: 0;
+    float: right;
+  }
+
+  .image {
+    width: 100%;
+    display: block;
+  }
+
+  .clearfix:before,
+  .clearfix:after {
+      display: table;
+      content: "";
+  }
+  
+  .clearfix:after {
+      clear: both
+  }
+</style>

--
Gitblit v1.9.1