From 81475c257b068c74f335024f7a15359a03cad8e8 Mon Sep 17 00:00:00 2001
From: yz3456 <2753272399@qq.com>
Date: 星期三, 01 五月 2024 14:07:05 +0800
Subject: [PATCH] 修改备忘录其他附件背景图

---
 ruoyi-ui/src/views/healthy/healthYear.vue |  144 +++++++++++++++++++++++++++++++++++++-----------
 1 files changed, 111 insertions(+), 33 deletions(-)

diff --git a/ruoyi-ui/src/views/healthy/healthYear.vue b/ruoyi-ui/src/views/healthy/healthYear.vue
index 3cb4e24..a374f05 100644
--- a/ruoyi-ui/src/views/healthy/healthYear.vue
+++ b/ruoyi-ui/src/views/healthy/healthYear.vue
@@ -8,13 +8,13 @@
     </el-backtop>
     <h1 style="font-size:21px;padding-top:30px;display: flex;justify-content: space-between;align-items: center;">
       <span>鐜扮姸鍋ュ悍鎯呭喌</span>
-      <div   style="display: flex; align-items: center;">
-        <el-button size="mini" type="text" @click="toYearhealthy" v-hasPermi="['person:healthy:healthYear']">
-          <div class="form" ><el-icon  style="padding-right:110px;"></el-icon>
-            <span class="text" style="width: 69px;height: 26px;font-size: 16px; padding-left: 10px;
-            font-family: Microsoft YaHei-Regular, Microsoft YaHei; color: #EBA4AA;">浣撴/鐪嬬梾</span></div>
-        </el-button>
-      </div>
+<!--      <div   style="display: flex; align-items: center;">-->
+<!--        <el-button size="mini" type="text" @click="toYearhealthy" v-hasPermi="['person:healthy:healthYear']">-->
+<!--          <div class="form" ><el-icon  style="padding-right:110px;"></el-icon>-->
+<!--            <span class="text" style="width: 69px;height: 26px;font-size: 16px; padding-left: 10px;-->
+<!--            font-family: Microsoft YaHei-Regular, Microsoft YaHei; color: #EBA4AA;">浣撴/鐪嬬梾</span></div>-->
+<!--        </el-button>-->
+<!--      </div>-->
     </h1>
 
     <el-divider />
@@ -597,12 +597,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,35 +610,91 @@
           </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>
@@ -701,6 +757,7 @@
       ids: [],
       // 闈炲崟涓鐢�
       single: true,
+	  bstn: '淇敼',
       // 闈炲涓鐢�
       multiple: true,
       // 鏄剧ず鎼滅储鏉′欢
@@ -938,7 +995,10 @@
       // 鏃ユ湡鑼冨洿
       dateRange: [],
       // 鏁版嵁鑼冨洿閫夐」
-      fot:[".jpg",".jif"],
+     // 鏁版嵁鑼冨洿閫夐」
+     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:[
@@ -985,12 +1045,27 @@
   methods: {
     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
+		}
 
     },
     //琛�鍨嬩慨鏀�
@@ -1272,7 +1347,8 @@
 
         } else {
           this.HealthyBaseList = response.data;
-
+		  console.log("----------00000000-----------")
+		  console.log(this.HealthyBaseList)
           //琛�鍨嬬殑
           if (this.HealthyBaseList.bloodClass.a === 1) {
             this.selectedBloodType = 'a';
@@ -2004,6 +2080,7 @@
       };
       console.log(111)
       console.log(this.bloodData)
+	  
       if(isObjectEmpty(this.bloodData)){
         this.HealthyBaseList.bloodClass = this.HealthyBaseList.bloodClass;
       }else {
@@ -2119,11 +2196,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("淇敼鎴愬姛11");
 
               // this.open = false;
               this.btn=false
@@ -2131,7 +2208,7 @@
               this.dsb = true
               this.isShow_2=false
               this.isShow = true
-
+			   this.getList();
             });
           } else {
             this.$modal.msgSuccess("淇敼澶辫触");
@@ -2150,7 +2227,7 @@
               this.dsb = true
               this.isShow_2=false
               this.isShow = true
-
+   this.getList();
             });
           } else {
             this.$modal.msgSuccess("淇敼澶辫触");
@@ -2169,7 +2246,7 @@
               this.dsb = true
               this.isShow_2=false
               this.isShow = true
-
+   this.getList();
             });
           } else {
             this.$modal.msgSuccess("淇敼澶辫触");
@@ -2188,7 +2265,7 @@
               this.dsb = true
               this.isShow_2=false
               this.isShow = true
-
+   this.getList();
             });
           } else {
             this.$modal.msgSuccess("淇敼澶辫触");
@@ -2197,12 +2274,12 @@
         }
       })
       // 鍒锋柊椤甸潰
-      this.getList();
+   
     },
     //骞村害鍋ュ悍鎶ュ憡
     toYearhealthy(){
-      console.log(this.HealthyBaseList.uid)
-      this.$router.push("/self/healthy/healthYear/" + this.HealthyBaseList.uid);
+      // console.log(this.HealthyBaseList.uid)
+      this.$router.push("/self/healthy/index");
     },
     //闅旇鍙樿壊
     tableRowClassName({ row, rowIndex }) {
@@ -2239,6 +2316,7 @@
 .app-container {
   background-color: #FEF7FC;
 }
+
 .btn_edit{
   background:center no-repeat url('../../assets/icons/edit.png') ;
   position: absolute;

--
Gitblit v1.9.1