feige
2024-11-26 a2c92276402a4c5ad6373928986e040cf1a87483
ruoyi-ui/src/views/healthy/healthYear.vue
@@ -8,16 +8,36 @@
    </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 />
<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>
@@ -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,
      // 显示搜索条件
@@ -938,7 +1144,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:[
@@ -979,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
      }
    },
    //血型修改
@@ -1272,7 +1509,8 @@
        } else {
          this.HealthyBaseList = response.data;
        console.log("----------00000000-----------")
        console.log(this.HealthyBaseList)
          //血型的
          if (this.HealthyBaseList.bloodClass.a === 1) {
            this.selectedBloodType = 'a';
@@ -2004,6 +2242,7 @@
      };
      console.log(111)
      console.log(this.bloodData)
      if(isObjectEmpty(this.bloodData)){
        this.HealthyBaseList.bloodClass = this.HealthyBaseList.bloodClass;
      }else {
@@ -2119,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
@@ -2131,7 +2370,7 @@
              this.dsb = true
              this.isShow_2=false
              this.isShow = true
            this.getList();
            });
          } else {
            this.$modal.msgSuccess("修改失败");
@@ -2150,7 +2389,7 @@
              this.dsb = true
              this.isShow_2=false
              this.isShow = true
   this.getList();
            });
          } else {
            this.$modal.msgSuccess("修改失败");
@@ -2169,7 +2408,7 @@
              this.dsb = true
              this.isShow_2=false
              this.isShow = true
   this.getList();
            });
          } else {
            this.$modal.msgSuccess("修改失败");
@@ -2188,7 +2427,7 @@
              this.dsb = true
              this.isShow_2=false
              this.isShow = true
   this.getList();
            });
          } else {
            this.$modal.msgSuccess("修改失败");
@@ -2197,12 +2436,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,9 +2478,36 @@
.app-container {
  background-color: #FEF7FC;
}
.btn_edit{
  background:center no-repeat url('../../assets/icons/edit.png') ;
  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>