feige
2024-04-17 39c0ad120acd120b62cb69dc92b6fe63e8edf902
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;