linwenling
2023-08-15 b37c004b2881e1d39b7ac3fa471ea421752c0906
新增健康表
3个文件已修改
1个文件已添加
2326 ■■■■ 已修改文件
ruoyi-ui/src/api/healthy/index.js 115 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-ui/src/router/index.js 17 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-ui/src/views/healthy/healthYear.vue 655 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-ui/src/views/healthy/index.vue 1539 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-ui/src/api/healthy/index.js
@@ -1,8 +1,7 @@
import request from '@/utils/request'
//http://47.93.189.255:8080/zYearInfo/all
// 查询所有家庭设备
// 查询所有
export function listHealth(query) {
  return request({
    url: '/zYearInfo/all',
@@ -63,7 +62,7 @@
    responseType: 'blob'
  })
}
//导入
//上传文件
export function enload(data) {
  return request({
    url: '/zYearInfo/importData',
@@ -72,14 +71,106 @@
  })
}
// //拿到类别
// export function getCategory()
// {
//   return request({
//     url: '/zDict/byId',
//     method: 'get',
//     params: {'id':22}
//   })
// }
//http://47.93.189.255:8080/zHealthBase/all
//获得基本信息
export function listHealthBase(query) {
  return request({
    url: '/zHealthBase/all',
    method: 'get',
    params: query
  })
}
//修改基本信息
export function updateHealthBase(data) {
  return request({
    url: '/zHealthBase',
    method: 'put',
    data: data
  })
}
//拿到字典
export function getCategory(query)
{
  return request({
    url: '/zDict/byId',
    method: 'get',
    params: query
  })
}
//http://47.93.189.255:8080/zHealthHabit/all
//获取生活习惯信息
export function listHealthHabit(query) {
  return request({
    url: '/zHealthHabit/all',
    method: 'get',
    params: query
  })
}
//修改基本信息
export function updateHealthHabit(data) {
  return request({
    url: '/zHealthHabit',
    method: 'put',
    data: data
  })
}
//http://47.93.189.255:8080/zHealthInfo/all
//获取护理查体信息
export function listHealthHuli(query) {
  return request({
    url: '/zHealthInfo/all',
    method: 'get',
    params: query
  })
}
//修改护理查体信息
export function updateHealthHuli(data) {
  return request({
    url: '/zHealthInfo',
    method: 'put',
    data: data
  })
}
//http://47.93.189.255:8080/zHealthNow/all
//获取现存健康问题信息
export function listHealthNow(query) {
  return request({
    url: '/zHealthNow/all',
    method: 'get',
    params: query
  })
}
//修改现存健康问题信息
export function updateHealthNow(data) {
  return request({
    url: '/zHealthNow',
    method: 'put',
    data: data
  })
}
//笔记内容http://47.93.189.255:8080/zHealthNote
//获得所有
export function listHealthNote(query) {
  return request({
    url: '/zHealthNote/all',
    method: 'get',
    params: query
  })
}
//修改
export function updateHealthNote(data) {
  return request({
    url: '/zHealthNote',
    method: 'put',
    data: data
  })
}
ruoyi-ui/src/router/index.js
@@ -510,6 +510,23 @@
      }
    ]
  },
  //年度健康检查报告
  {
    path: '/self/healthy',
    component: Layout,
    permissions: ['person:healthy:healthYear'],
    hidden: true,
    children: [
      {
        path: 'healthYear/:id(\\d+)',
        component: () => import('@/views/healthy/healthYear'),
        name: 'healthYear',
        meta: { title: '年度健康报告'}
      }
    ]
  },
  //藏心密语
  {
    path: '/self/secret',
ruoyi-ui/src/views/healthy/healthYear.vue
New file
@@ -0,0 +1,655 @@
<template>
  <div class="app-container" style="opacity: 1;">
    <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch">
      <el-form-item label="体检时间"  prop="checkTime">
        <el-date-picker
          v-model="dateRange"
          style="width: 240px;"
          value-format="yyyy-MM-dd"
          type="daterange"
          range-separator="-"
          start-placeholder="开始日期"
          end-placeholder="结束日期"
        ></el-date-picker>
      </el-form-item>
      <el-form-item label="救病医院" prop="hospital" >
        <el-input
          v-model="queryParams.hospital"
          placeholder="请输入就病医院"
          clearable
          style="width: 240px"
          @keyup.enter.native="handleQuery"
        />
      </el-form-item>
      <el-form-item label="类别" prop="type">
        <el-input
          v-model="queryParams.type"
          placeholder="请输入类别"
          clearable
          style="width: 240px"
          @keyup.enter.native="handleQuery"
        />
      </el-form-item>
      <el-form-item label="题名" prop="title">
        <el-input
          v-model="queryParams.title"
          placeholder="请输入题名"
          clearable
          style="width: 240px"
          @keyup.enter.native="handleQuery"
        />
      </el-form-item>
      <el-form-item>
        <el-button  size="mini" @click="handleQuery" style=" width: 65px; height: 32px;background: #FFDDE3;border-radius:6px 6px 6px 6px;opacity:1;">搜索</el-button>
        <el-button  size="mini" @click="resetQuery" style=" width: 65px;height: 32px; background: #FFDDE3; border-radius:6px 6px 6px 6px;opacity: 1;">重置</el-button>
      </el-form-item>
    </el-form>
    <el-row :gutter="10" class="mb8">
      <el-col :span="1.5">
        <el-button
          type="primary"
          plain
          icon="el-icon-plus"
          size="mini"
          @click="handleAdd"
          v-hasPermi="['system:role:add']"
        >新增</el-button>
      </el-col>
      <el-col :span="1.5">
        <el-button
          type="danger"
          plain
          icon="el-icon-delete"
          size="mini"
          :disabled="multiple"
          @click="handleDelete"
          v-hasPermi="['system:role:remove']"
        >删除</el-button>
      </el-col>
      <el-col :span="1.5">
        <el-button
          type="warning"
          plain
          icon="el-icon-download"
          size="mini"
          @click="handleExport"
          v-hasPermi="['family:note:export']"
        >导出</el-button>
      </el-col>
      <el-col :span="1.5">
        <el-button
          type="warning"
          plain
          icon="el-icon-download"
          size="mini"
          @click="handleExport"
          v-hasPermi="['family:note:export']"
        >导入模板下载</el-button>
      </el-col>
      <el-col :span="1.2">
        <el-upload
          action=""
          class="upload-demo"
          :show-file-list="false"
          :http-request="handleEnport"
        >
          <el-button size="mini"   type="primary"
                     plain
                     icon="el-icon-plus" >导入</el-button>
        </el-upload>
      </el-col>
      <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
    </el-row>
    <el-table v-loading="loading" :data="healthList"  @selection-change="handleSelectionChange" @row-click="handleCheck" :row-class-name="tableRowClassName" style="background: #FFEFF2;  border-radius: 14px 14px 14px 14px;">
      <el-table-column type="selection" width="55"  align="center" />
      <el-table-column  label="序号" sortable type="index" :index="(queryParams.pageNum-1)*queryParams.pageSize+1" width="120"/>
      <el-table-column label="体检时间" prop="checkTime" sortable width="150" align="center">
        <template slot-scope="scope">{{scope.row.checkTime? scope.row.checkTime: '————'}}</template>
      </el-table-column>
      <el-table-column label="类别" prop="type" sortable width="120" />
      <el-table-column label="就病医院" prop="hospital" sortable width="120" >
      </el-table-column>
      <el-table-column label="题名" prop="title" sortable width="150" />
      <el-table-column label="注意事项" prop="notice" sortable width="150" />
      <el-table-column label="体检报告(电子文件)" prop="url" align="center" sortable  width="200" >
        <template slot-scope="scope" >
          <div  @click="handleCheck(scope.row)">
            <img
              class="el-upload-list__item-thumbnail"
              src="../../assets/images/deviceLis.png"
              alt=""
              style="width: 35px; height: 35px;"
              fit="cover"
              v-if="!(scope.row.url === '' || scope.row.url === ',' || scope.row.url === null)"
            >
            <img
              v-else
              class="el-upload-list__item-thumbnail"
              src="../../assets/images/deviceA.png"
              alt=""
              style="width: 35px; height: 35px;"
              fit="cover"
            ></div>
        </template>
      </el-table-column>
      <el-table-column label="备注" prop="remark" sortable width="120" >
        <template slot-scope="scope">{{scope.row.remark? scope.row.remark: '————'}}</template>
      </el-table-column>
      <el-table-column label="操作" align="center" class-name="small-padding fixed-width">
        <template slot-scope="scope" v-if="scope.row.roleId !== 1">
          <el-button
            size="mini"
            type="text"
            icon="el-icon-edit"
            @click="handleUpdate(scope.row)"
            v-hasPermi="['familymodel:economy:info']"
          >修改</el-button>
          <el-button
            size="mini"
            type="text"
            icon="el-icon-delete"
            @click="handleDelete(scope.row)"
            v-hasPermi="['system:role:remove']"
          >删除</el-button>
          <!-- <el-dropdown size="mini" @command="(command) => handleCommand(command, scope.row)" v-hasPermi="['familymodel:economy:info']">
            <el-button size="mini" type="text" icon="el-icon-d-arrow-right"  @click="handleCheck(scope.row)">查看详情</el-button>
          </el-dropdown> -->
        </template>
      </el-table-column>
    </el-table>
    <pagination
      v-show="total>0"
      :total="total"
      :page.sync="queryParams.pageNum"
      :limit.sync="queryParams.pageSize"
      @pagination="getList"
      style="background: #FEF7FC;"
    />
    <el-dialog :title="title" :visible.sync="open" width="800px" append-to-body>
      <el-form ref="elForm" :model="formDat" :rules="rules" size="medium" label-width="100px">
        <el-form-item label="体检时间" prop="checkTime">
          <el-input
            v-model='formDat.checkTime'
            type='date'
            placeholder='选择日期'
          ></el-input>
        </el-form-item>
        <el-form-item label="类别" prop="type">
          <el-input v-model="formDat.type" placeholder="请输入类别" clearable :style="{width: '100%'}" >
          </el-input>
        </el-form-item>
        <el-form-item label="就病医院" prop="hospital">
          <el-input v-model="formDat.hospital" placeholder="请输入就病医院" clearable :style="{width: '100%'}" >
          </el-input>
        </el-form-item>
        <el-form-item label="题名" prop="title">
          <el-input v-model="formDat.title" placeholder="请输入题名" clearable :style="{width: '100%'}" >
          </el-input>
        </el-form-item>
        <el-form-item label="注意事项" prop="notice">
          <el-input v-model="formDat.notice" placeholder="请输入注意事项" clearable :style="{width: '100%'}" >
          </el-input>
        </el-form-item>
        <el-form-item label="备注" prop="remark">
          <el-input v-model="formDat.remark" placeholder="请输入备注" clearable :style="{width: '100%'}" ></el-input>
        </el-form-item>
        <h4 class="form-header">相关图片 </h4>
        <el-upload
          action="#"
          list-type="picture-card"
          multiple
          :http-request="requestUpload"
          :file-list="fileList"
        >
          <i slot="default" class="el-icon-plus"></i>
          <div slot="file" slot-scope="{file}">
            <img
              class="el-upload-list__item-thumbnail"
              :src="file.url"
              alt=""
              style="width: 126px; height: 126px"
              fit="cover"
              :preview-src-list="[file.url]"
            >
            <span class="el-upload-list__item-actions">
            <span
              class="el-upload-list__item-preview"
              @click="handlePictureCardPreview(file)"
            >
              <i class="el-icon-zoom-in"></i>
            </span>
            <span
              v-if="!disabled"
              class="el-upload-list__item-delete"
              @click="handleRemove(file)"
            >
              <i class="el-icon-delete"></i>
            </span>
          </span>
          </div>
        </el-upload>
        <h4 class="form-header">其他附件 </h4>
        <el-upload
          action=""
          :file-list="fileListOther"
          class="upload-demo"
          multiple
          :on-remove="handleRemoveFile"
          :http-request="requestUpload"
          :show-file-list="true"
        >
          <el-button type="primary">点击上传</el-button>
          <template #tip>
            <div class="el-upload__tip">
            </div>
          </template>
        </el-upload>
      </el-form>
      <h4 class="form-header"> </h4>
      <div slot="footer" class="dialog-footer">
        <el-button type="primary" @click="submitDataScope">确 定</el-button>
        <el-button @click="cancelData">取 消</el-button>
      </div>
    </el-dialog>
    <!-- 分配角色数据权限对话框 -->
    <el-dialog :title="title" :visible.sync="openDataScope" width="500px" append-to-body>
    </el-dialog>
  </div>
</template>
<script>
import { listRole, getRole, delRole, addRole, updateRole, dataScope, changeRoleStatus, deptTreeSelect } from "@/api/system/role";
import { treeselect as menuTreeselect, roleMenuTreeselect } from "@/api/system/menu";
//在system/note/index.js中导入接口函数  --接好了
import {listHealth,enload,delHealth,getHealthInfo, addHealth, uploadPic} from "@/api/healthy/index";
export default {
  name: "Role",
  dicts: ['sys_normal_disable'],
  data() {
    return {
      // 遮罩层
      disabled: false,
      loading: true,
      formData:[],
      // 选中数组
      ids: [],
      // 非单个禁用
      single: true,
      // 非多个禁用
      multiple: true,
      // 显示搜索条件
      showSearch: true,
      // 总条数
      total: 0,
      // 家大事记表格数据
      economyList: [],
      // 弹出层标题
      title: "",
      // 是否显示弹出层
      open: false,
      // 是否显示弹出层(数据权限)
      openDataScope: false,
      menuExpand: false,
      menuNodeAll: false,
      deptExpand: true,
      deptNodeAll: false,
      // 日期范围
      dateRange: [],
      // 数据范围选项
      fot:[".jpg",".jif"],
      fileList:[
      ],
      fileListOther:[ ],
      dsb:true,
      btn:false,
      formDat: {
        type: undefined,
        createTime: undefined,
        useFor: undefined,
        usePeople: undefined,
        kind:undefined,
        remark: undefined,
        url: undefined,
      },
      // 菜单列表
      menuOptions: [],
      // 部门列表
      deptOptions: [],
      // 查询参数
      queryParams: {
        pageNum: 1,
        pageSize: 10,
        type:undefined,
        useFor:undefined,
        usePeople:undefined,
        checkTime:undefined,
      },
      // 表单参数
      form: {},
      defaultProps: {
        children: "children",
        label: "label"
      },
      // 表单校验
      rules: {
        usePeople: [{
          required: true,
          message: '请输入使用人',
          trigger: 'blur'
        }],
        useFor: [{
          required: true,
          message: '请输入用途',
          trigger: 'blur'
        }],
        type: [{
          required: true,
          message: '请输入台账内容',
          trigger: 'blur'
        }],
        balance: [{
          required: true,
          message: '请输入金额',
          trigger: 'blur'
        }],
        kind: [{
          // required: true,
          message: '请输入支付方式',
          trigger: 'blur'
        }],
        createTime: [{
          required: true,
          message: '请选择日期选择',
          trigger: 'change'
        }],
        price: [{
          required: true,
          message: '请选择事项内容',
          trigger: 'blur'
        }],
      },
    };
  },
  created() {
    this.getList();
  },
  methods: {
    // 取消按钮
    cancelData() {
      this.open = false;
      this.reset();
    },
    //隔行变色
    tableRowClassName({ row, rowIndex }) {
      if (rowIndex % 2 == 0) {
        return "statistics-warning-row1";
      } else {
        return "statistics-warning-row";
      }
    },
    /** 查询角色列表 */
    //列表显示家大事记
    getList() {
      this.loading = true;
      this.queryParams.happenStartTime = this.dateRange.length > 0 && this.dateRange[0]
      this.queryParams.happenEndTime = this.dateRange.length > 0 && this.dateRange[1]
      // console.log(this.queryParams)
      //  listProperty(this.addDateRange(this.queryParams, this.dateRange)).then(response => {
      listHealth(this.queryParams).then(response => {
          //  alert(123)
          //   console.log(response.data)
          this.healthList = response.data.data;
          this.total = response.data.total;
          this.loading = false;
        }
      );
    },
    handleRemove(file) {
      for(let i = 0; i < this.fileList.length; i++)
      {
        if(this.fileList[i].url==file.url)
          this.$delete(this.fileList,i);
      }
    },
    handleRemoveFile(file) {
      for(let i = 0; i < this.fileListOther.length; i++)
      {
        if(this.fileListOther[i].url==file.url)
          this.$delete(this.fileListOther,i);
      }
    },
    // 取消按钮
    cancel() {
      this.open = false;
      this.reset();
    },
    // 取消按钮(数据权限)
    cancelDataScope() {
      this.openDataScope = false;
      this.reset();
    },
    // 表单重置
    reset() {
      if (this.$refs.menu != undefined) {
        this.$refs.menu.setCheckedKeys([]);
      }
      this.menuExpand = false,
        this.menuNodeAll = false,
        this.deptExpand = true,
        this.deptNodeAll = false,
        this.form = {
          roleId: undefined,
          roleName: undefined,
          roleKey: undefined,
          roleSort: 0,
          status: "0",
          menuIds: [],
          deptIds: [],
          menuCheckStrictly: true,
          deptCheckStrictly: true,
          remark: undefined
        };
      this.resetForm("form");
    },
    /** 搜索按钮操作 */
    handleQuery() {
      this.queryParams.pageNum = 1;
      this.getList();
    },
    /** 重置按钮操作 */
    resetQuery() {
      this.dateRange = [];
      this.resetForm("queryForm");
      this.handleQuery();
    },
    // 多选框选中数据
    handleSelectionChange(selection) {
      this.ids = selection.map(item => item.id)
      console.log(this.ids)
      this.single = selection.length!=1
      this.multiple = !selection.length
    },
    /** 新增按钮操作 */
    handleAdd() {
      this.reset();
      this.open = true;
      this.title = "新增健康情况";
    },
    /** 查看详细信息 */
    handleCheck(row){
      const id = row.id;
      this.$router.push("/self/healthy/healthyInfo/" + id);
    },
    /** 修改按钮操作 */
    handleUpdate(row) {
      const id = row.id;
      let jd = true
      this.$router.push({
        path:"/self/healthy/healthyInfo/" + id,
        query:{
          detail:jd
        }
      });
    },
    handlePictureCardPreview(file) {
      this.dialogImageUrl = file.url;
      this.dialogVisible = true;
    },
    /** 提交按钮(数据权限) */
    submitDataScope: function() {
      let ul = this.fileList.map(function (elem){
        return elem.url.replace(process.env.VUE_APP_BASE_TRUE_API,"")
      }).join(",")
      let uls = this.fileListOther.map(function (elem){
        return elem.url.replace(process.env.VUE_APP_BASE_TRUE_API,"")
      }).join(",")
      this.formDat.url = ul+","+uls
      this.$refs["elForm"].validate(valid => {
        if (valid) {
          addHealth(this.formDat).then(response => {
            this.$modal.msgSuccess("新增成功");
            this.open = false;
            this.getList();
          });
        }
      });
      // 清空formDat对象的数据
      Object.keys(this.formDat).forEach(key => {
        this.formDat[key] = '';
      });
      for(let i = 0; i <= this.fileList.length; i++)
      {
        this.handleRemove(this.fileList[0]);
      }
      for(let i = 0; i < this.fileListOther.length; i++){
        this.handleRemoveFile(this.fileListOther[0]);
      }
    },
    requestUpload(params)
    {
      var file = params.file;
      var formData = new FormData();
      formData.append('uploadFile', file);
      let _this = this
      uploadPic(formData).then(response => {
        let pth = response.data.originalFilename.substr(response.data.originalFilename.length-4, response.data.originalFilename.length)
        if(_this.fot.includes(pth) === true)
        {
          _this.fileList.push({name:response.data.fileName, "url":response.data.url})
        }
        else{
          _this.fileListOther.push({name:response.data.fileName, url:response.data.url})
        }
      })
    },
    /** 删除按钮操作 */
    handleDelete(row) {
      const Ids = row.id || this.ids;
      this.$modal.confirm('是否确认删除所选数据项?').then(function() {
        return delHealth(Ids);
      }).then(() => {
        this.getList();
        this.$modal.msgSuccess("删除成功");
      }).catch(() => {});
    },
    /** 导出按钮操作 */
    handleExport() {
      this.download('/zfEconomy/export', {
        ...this.queryParams
      }, `zfEconomy_${new Date().getTime()}.xlsx`)
    }
  },
  /** 导入操作*/
  handleEnport(params){
    var file = params.file;
    var formData = new FormData();
    formData.append('excelImport', file);
    let _this = this
    alert(file)
    enload(formData).then(response => {
      _this.getList();
      Message({ message: "导入成功", type: 'warning' })
    }).catch(err)
    {
      Message({ message: "导入失败", type: 'error' })
    }
  }
};
</script>
<style>
.el-table__row.statistics-warning-row {
  background: #E0EEFE;
}
.el-table__row.statistics-warning-row1 {
  background: #FFEFF2;
}
</style>
ruoyi-ui/src/views/healthy/index.vue
@@ -1,75 +1,23 @@
<template>
  <div class="app-container" style="opacity: 1;">
    <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch">
  <div class="app-container">
    <!--    回到顶部-->
    <el-backtop :bottom="150" :right="30">
      <el-button type="primary" circle
                 class="el-icon-top"
      ></el-button>
    </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>
    </h1>
    <!-- <el-row :gutter="10" class="mb8">
      <el-form-item label="体检时间"  prop="checkTime">
        <el-date-picker
          v-model="dateRange"
          style="width: 240px;"
          value-format="yyyy-MM-dd"
          type="daterange"
          range-separator="-"
          start-placeholder="开始日期"
          end-placeholder="结束日期"
        ></el-date-picker>
      </el-form-item>
      <el-form-item label="救病医院" prop="hospital" >
        <el-input
          v-model="queryParams.hospital"
          placeholder="请输入就病医院"
          clearable
          style="width: 240px"
          @keyup.enter.native="handleQuery"
        />
      </el-form-item>
      <el-form-item label="类别" prop="type">
        <el-input
          v-model="queryParams.type"
          placeholder="请输入类别"
          clearable
          style="width: 240px"
          @keyup.enter.native="handleQuery"
        />
      </el-form-item>
      <el-form-item label="题名" prop="title">
        <el-input
          v-model="queryParams.title"
          placeholder="请输入题名"
          clearable
          style="width: 240px"
          @keyup.enter.native="handleQuery"
        />
      </el-form-item>
      <el-form-item>
        <el-button  size="mini" @click="handleQuery" style=" width: 65px; height: 32px;background: #FFDDE3;border-radius:6px 6px 6px 6px;opacity:1;">搜索</el-button>
        <el-button  size="mini" @click="resetQuery" style=" width: 65px;height: 32px; background: #FFDDE3; border-radius:6px 6px 6px 6px;opacity: 1;">重置</el-button>
      </el-form-item>
    </el-form>
    <el-row :gutter="10" class="mb8">
      <el-col :span="1.5">
        <el-button
          type="primary"
          plain
          icon="el-icon-plus"
          size="mini"
          @click="handleAdd"
          v-hasPermi="['system:role:add']"
        >新增</el-button>
      </el-col>
      <el-col :span="1.5">
        <el-button
          type="danger"
          plain
          icon="el-icon-delete"
          size="mini"
          :disabled="multiple"
          @click="handleDelete"
          v-hasPermi="['system:role:remove']"
        >删除</el-button>
      </el-col>
      <el-col :span="1.5">
        <el-button
          type="warning"
@@ -80,209 +28,488 @@
          v-hasPermi="['family:note:export']"
        >导出</el-button>
      </el-col>
      <el-col :span="1.5">
        <el-button
          type="warning"
          plain
          icon="el-icon-download"
          size="mini"
          @click="handleExport"
          v-hasPermi="['family:note:export']"
        >导入模板下载</el-button>
      </el-col>
      <el-col :span="1.2">
        <el-upload
          action=""
          class="upload-demo"
          :show-file-list="false"
          :http-request="handleEnport"
        >
          <el-button size="mini"   type="primary"
                     plain
                     icon="el-icon-plus" >导入</el-button>
        </el-upload>
      </el-col>
      <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
    </el-row> -->
    <el-divider />
    <h2 style="font-size:21px">基本情况</h2>
    <el-container>
      <div style="padding-left:0px" >
        <el-container >
          <el-col >
            <el-form ref="elForm" :model="HealthyBaseList" :rules="rules" size="medium"  label-position="left"
                     v-loading="loading" :data="HealthyBaseList" @selection-change="handleSelectionChange" >
              <el-row :span="16">
                <el-form-item label="姓名" prop="name" label-width="40px">
                  <el-input v-model="HealthyBaseList.name " placeholder="" clearable :style="{width: '100%'}" :disabled="dsb">
                  </el-input>
                </el-form-item>
              </el-row>
              <el-row :span="16">
                <el-form-item label="职业" prop="work" label-width="40px">
                  <el-input v-model="HealthyBaseList.work" placeholder="" clearable :style="{width: '100%'}" :disabled="dsb">
                  </el-input>
                </el-form-item>
              </el-row>
              <el-row :span="16">
                <el-form-item label="住址" prop="address" label-width="40px">
                  <el-input v-model="HealthyBaseList.address" placeholder="" clearable :style="{width: '100%'}" :disabled="dsb">
                  </el-input>
                </el-form-item>
    </el-row>
    <el-table v-loading="loading" :data="healthList"  @selection-change="handleSelectionChange" @row-click="handleCheck" :row-class-name="tableRowClassName" style="background: #FFEFF2;  border-radius: 14px 14px 14px 14px;">
      <el-table-column type="selection" width="55"  align="center" />
      <el-table-column  label="序号" sortable type="index" :index="(queryParams.pageNum-1)*queryParams.pageSize+1" width="120"/>
      <el-table-column label="体检时间" prop="checkTime" sortable width="150" align="center">
        <template slot-scope="scope">{{scope.row.checkTime? scope.row.checkTime: '————'}}</template>
      </el-table-column>
      <el-table-column label="类别" prop="type" sortable width="120" />
      <el-table-column label="就病医院" prop="hospital" sortable width="120" >
      </el-table-column>
      <el-table-column label="题名" prop="title" sortable width="150" />
      <el-table-column label="注意事项" prop="notice" sortable width="150" />
      <el-table-column label="体检报告(电子文件)" prop="url" align="center" sortable  width="200" >
        <template slot-scope="scope" >
          <div  @click="handleCheck(scope.row)">
            <img
              class="el-upload-list__item-thumbnail"
              src="../../assets/images/deviceLis.png"
              alt=""
              style="width: 35px; height: 35px;"
              fit="cover"
              v-if="!(scope.row.url === '' || scope.row.url === ',' || scope.row.url === null)"
            >
            <img
              v-else
              class="el-upload-list__item-thumbnail"
              src="../../assets/images/deviceA.png"
              alt=""
              style="width: 35px; height: 35px;"
              fit="cover"
            ></div>
        </template>
      </el-table-column>
      <el-table-column label="备注" prop="remark" sortable width="120" >
        <template slot-scope="scope">{{scope.row.remark? scope.row.remark: '————'}}</template>
      </el-table-column>
      <el-table-column label="操作" align="center" class-name="small-padding fixed-width">
        <template slot-scope="scope" v-if="scope.row.roleId !== 1">
          <el-button
            size="mini"
            type="text"
            icon="el-icon-edit"
            @click="handleUpdate(scope.row)"
            v-hasPermi="['familymodel:economy:info']"
          >修改</el-button>
          <el-button
            size="mini"
            type="text"
            icon="el-icon-delete"
            @click="handleDelete(scope.row)"
            v-hasPermi="['system:role:remove']"
          >删除</el-button>
          <!-- <el-dropdown size="mini" @command="(command) => handleCommand(command, scope.row)" v-hasPermi="['familymodel:economy:info']">
            <el-button size="mini" type="text" icon="el-icon-d-arrow-right"  @click="handleCheck(scope.row)">查看详情</el-button>
          </el-dropdown> -->
        </template>
      </el-table-column>
    </el-table>
    <pagination
      v-show="total>0"
      :total="total"
      :page.sync="queryParams.pageNum"
      :limit.sync="queryParams.pageSize"
      @pagination="getList"
      style="background: #FEF7FC;"
    />
    <el-dialog :title="title" :visible.sync="open" width="800px" append-to-body>
      <el-form ref="elForm" :model="formDat" :rules="rules" size="medium" label-width="100px">
        <el-form-item label="体检时间" prop="checkTime">
          <el-input
            v-model='formDat.checkTime'
            type='date'
            placeholder='选择日期'
          ></el-input>
        </el-form-item>
        <el-form-item label="类别" prop="type">
          <el-input v-model="formDat.type" placeholder="请输入类别" clearable :style="{width: '100%'}" >
          </el-input>
        </el-form-item>
        <el-form-item label="就病医院" prop="hospital">
          <el-input v-model="formDat.hospital" placeholder="请输入就病医院" clearable :style="{width: '100%'}" >
          </el-input>
        </el-form-item>
        <el-form-item label="题名" prop="title">
          <el-input v-model="formDat.title" placeholder="请输入题名" clearable :style="{width: '100%'}" >
          </el-input>
        </el-form-item>
        <el-form-item label="注意事项" prop="notice">
          <el-input v-model="formDat.notice" placeholder="请输入注意事项" clearable :style="{width: '100%'}" >
          </el-input>
        </el-form-item>
        <el-form-item label="备注" prop="remark">
          <el-input v-model="formDat.remark" placeholder="请输入备注" clearable :style="{width: '100%'}" ></el-input>
        </el-form-item>
        <h4 class="form-header">相关图片 </h4>
        <el-upload
          action="#"
          list-type="picture-card"
          multiple
          :http-request="requestUpload"
          :file-list="fileList"
        >
          <div v-if="uploading" class="upload-status">正在上传...</div>
          <i v-if="!uploading" slot="default" class="el-icon-plus"></i>
          <div slot="file" slot-scope="{file}">
            <img
              class="el-upload-list__item-thumbnail"
              :src="file.url"
              alt=""
              style="width: 126px; height: 126px"
              fit="cover"
              :preview-src-list="[file.url]"
            >
            <span class="el-upload-list__item-actions">
            <span
              class="el-upload-list__item-preview"
              @click="handlePictureCardPreview(file)"
            >
              <i class="el-icon-zoom-in"></i>
            </span>
            <span
              v-if="!disabled"
              class="el-upload-list__item-delete"
              @click="handleRemove(file)"
            >
              <i class="el-icon-delete"></i>
            </span>
          </span>
            </el-form>
          </el-col>
        </el-container>
          </div>
        </el-upload>
        <h4 class="form-header">其他附件 </h4>
        <el-upload
          action=""
          :file-list="fileListOther"
          class="upload-demo"
          multiple
      <div style="padding-left:150px">
        <el-container>
          <el-col v-loading="loading" :data="HealthyBaseList" @selection-change="handleSelectionChange">
            <el-form ref="elForm" :model="HealthyBaseList" :rules="rules" size="medium"  label-position="left">
              <el-row :span="16">
          :on-remove="handleRemoveFile"
          :http-request="requestUpload"
          :show-file-list="true"
        >
          <el-button type="primary">点击上传</el-button>
          <template #tip>
            <div class="el-upload__tip">
            </div>
                <el-form-item label="性别" prop="sex" label-width="40px">
                  <template v-if="!isEditing">
                    <el-input v-model="HealthyBaseList.sex === '男' ? sinds='男':sinds='女'" placeholder="" clearable :style="{width: '100%'}" :disabled="dsb"></el-input>
          </template>
        </el-upload>
                  <template v-else>
                    <el-select v-model="sinds" placeholder="请选择性别" clearable :style="{width: '100%'}" :disabled="dsb">
                      <el-option label="男" value='男'></el-option>
                      <el-option label="女" value='女'></el-option>
                    </el-select>
                  </template>
                </el-form-item>
              </el-row>
              <el-row :span="16">
                <el-form-item label="电话" prop="phone" label-width="40px">
                  <el-input v-model="HealthyBaseList.phone " placeholder="" clearable :style="{width: '100%'}" :disabled="dsb">
                  </el-input>
                </el-form-item>
              </el-row>
      </el-form>
      <h4 class="form-header"> </h4>
      <div slot="footer" class="dialog-footer">
        <el-button type="primary" @click="submitDataScope">确 定</el-button>
        <el-button @click="cancelData">取 消</el-button>
          </el-col>
        </el-container>
      </div>
    </el-dialog>
    <!-- 分配角色数据权限对话框 -->
    <el-dialog :title="title" :visible.sync="openDataScope" width="500px" append-to-body>
      <div style="padding-left:150px">
        <el-container>
          <el-col v-loading="loading" :data="HealthyBaseList" @selection-change="handleSelectionChange">
            <el-form ref="elForm" :model="HealthyBaseList" :rules="rules" size="medium"  label-position="left">
              <el-row :span="16">
                <el-form-item label="文化程度" prop="educationLevel" label-width="70px">
                  <el-input v-model="HealthyBaseList.educationLevel " placeholder="" clearable :style="{width: '100%'}" :disabled="dsb">
                  </el-input>
                </el-form-item>
              </el-row>
              <el-row :span="16">
                <el-form-item label="电子邮件" prop="email" label-width="70px">
                  <el-input v-model="HealthyBaseList.email" placeholder="" clearable :style="{width: '100%'}" :disabled="dsb">
                  </el-input>
                </el-form-item>
              </el-row>
            </el-form>
          </el-col>
        </el-container>
      </div>
    </el-dialog>
      <div style="padding-left:100px;padding-top:40px" >
        <el-container >
          <el-row  >
            <el-button
              type="primary"
              @click="handleEdit()"
              v-if="isShow"
              v-hasPermi="['system:role:edit']"
            >编辑</el-button>
            <el-button v-if="isShow_2" type="primary" @click="submitForm" :disabled="dsb">完成</el-button>
            <br>
          </el-row>
        </el-container>
      </div>
      <!--      </el-dialog> self:user:export-->
    </el-container>
    <div>
      <el-form ref="elForm" :model="HealthyBaseList" :rules="rules" size="medium"  label-position="left"
               v-loading="loading" :data="HealthyBaseList" >
        <el-row :span="16">
          <el-form-item label="血型:" prop="bloodClass" label-width="70px">
            <el-radio-group v-model="HealthyBaseList.bloodClass">
              <el-radio v-for="(option, index) in typeOptions" :key="index" :label="option.value" :disabled="dsb">{{ option.label }}</el-radio>
            </el-radio-group>
          </el-form-item>
        </el-row>
      </el-form>
    </div>
    <el-container>
      <div >
        <el-container >
          <el-col >
            <el-form ref="elForm" :model="HealthyBaseList" :rules="rules" size="medium"  label-position="left"
                     v-loading="loading" :data="HealthyBaseList" @selection-change="handleSelectionChange" >
              <el-row :span="16">
                <el-form-item label="过敏史:" prop="allergyClass" label-width="70px">
                  <el-radio-group v-model="HealthyBaseList.allergyClass">
                    <el-radio v-for="(option, index) in typeOptions1" :key="index" :label="option.value" :disabled="dsb">{{ option.label }}</el-radio>
                  </el-radio-group>
                </el-form-item>
              </el-row>
              <el-row :span="16">
                <el-form-item label="常用药物" prop="medicine" label-width="70px">
                  <el-input v-model="HealthyBaseList.medicine" placeholder="" clearable :style="{width: '100%'}" :disabled="dsb">
                  </el-input>
                </el-form-item>
              </el-row>
            </el-form>
          </el-col>
        </el-container>
      </div>
      <div style="padding-left: 130px;">
        <el-container >
          <el-col >
            <el-form ref="elForm" :model="HealthyBaseList" :rules="rules" size="medium"  label-position="left"
                     v-loading="loading" :data="HealthyBaseList" @selection-change="handleSelectionChange" >
              <el-row :span="20">
                <el-form-item label="遗传病史:" prop="geneticDiseaseClass" label-width="80px">
                  <el-radio-group v-model="HealthyBaseList.geneticDiseaseClass">
                    <el-radio v-for="(option, index) in typeOptions2" :key="index" :label="option.value" :disabled="dsb">{{ option.label }}</el-radio>
                  </el-radio-group>
                </el-form-item>
              </el-row>
              <el-row :span="20">
                <el-form-item label="目前基础病" prop="baseDisease" label-width="90px">
                  <el-input v-model="HealthyBaseList.baseDisease" placeholder="" clearable :style="{width: '100%'}" :disabled="dsb">
                  </el-input>
                </el-form-item>
              </el-row>
            </el-form>
          </el-col>
        </el-container>
      </div>
    </el-container>
    <h2 style="font-size:21px">生活习惯</h2>
    <el-container>
      <div style="padding-left:0px" >
        <el-container >
          <el-col >
            <el-form ref="elForm" :model="LiveHabbitList" :rules="rules" size="medium"  label-position="left"
                     v-loading="loading" :data="LiveHabbitList" @selection-change="handleSelectionChange" >
              <el-row :span="16">
                <el-form-item label="饮食(喜)" prop="eatGood" label-width="70px">
                  <el-input v-model="LiveHabbitList.eatGood " placeholder="" clearable :style="{width: '100%'}" :disabled="dsb">
                  </el-input>
                </el-form-item>
              </el-row>
              <el-row :span="16">
                <el-form-item label="爱好" prop="hobby" label-width="40px">
                  <el-input v-model="LiveHabbitList.hobby" placeholder="" clearable :style="{width: '100%'}" :disabled="dsb">
                  </el-input>
                </el-form-item>
              </el-row>
            </el-form>
          </el-col>
        </el-container>
      </div>
      <div style="padding-left:150px">
        <el-container>
          <el-col v-loading="loading" :data="LiveHabbitList" @selection-change="handleSelectionChange">
            <el-form ref="elForm" :model="LiveHabbitList" :rules="rules" size="medium"  label-position="left">
              <el-row :span="16">
                <el-form-item label="饮食(忌)" prop="eatBad" label-width="70px">
                  <el-input v-model="LiveHabbitList.eatBad " placeholder="" clearable :style="{width: '100%'}" :disabled="dsb">
                  </el-input>
                </el-form-item>
              </el-row>
              <el-row :span="16">
                <el-form-item label="嗜好" prop="addition" label-width="40px">
                  <el-input v-model="LiveHabbitList.addition " placeholder="" clearable :style="{width: '100%'}" :disabled="dsb">
                  </el-input>
                </el-form-item>
              </el-row>
            </el-form>
          </el-col>
        </el-container>
      </div>
    </el-container>
    <div>
      <el-container >
        <el-col >
          <el-form ref="elForm" :model="LiveHabbitList" :rules="rules" size="medium"  label-position="left"
                   v-loading="loading" :data="LiveHabbitList" @selection-change="handleSelectionChange" >
            <el-row :span="16">
              <el-form-item label="睡眠:" prop="sleepClass" label-width="80px">
                <el-radio-group v-model="LiveHabbitList.sleepClass">
                  <el-radio v-for="(option, index) in typeOptions3" :key="index" :label="option.value" :disabled="dsb">{{ option.label }}</el-radio>
                </el-radio-group>
              </el-form-item>
            </el-row>
          </el-form>
        </el-col>
      </el-container>
    </div>
    <el-container>
      <div style="padding-left:0px" >
        <el-container >
          <el-col >
            <el-form ref="elForm" :model="LiveHabbitList" :rules="rules" size="medium"  label-position="left"
                     v-loading="loading" :data="LiveHabbitList" @selection-change="handleSelectionChange" >
              <el-row :span="16">
                <el-form-item label="大便" prop="stool" label-width="40px">
                  <el-input v-model="LiveHabbitList.stool" placeholder="" clearable :style="{width: '100%'}" :disabled="dsb">
                  </el-input>
                </el-form-item>
              </el-row>
              <el-row :span="16">
                <el-form-item label="小便" prop="urine" label-width="40px">
                  <el-input v-model="LiveHabbitList.urine" placeholder="" clearable :style="{width: '100%'}" :disabled="dsb">
                  </el-input>
                </el-form-item>
              </el-row>
            </el-form>
          </el-col>
        </el-container>
      </div>
      <div style="padding-left:170px">
        <el-container>
          <el-col v-loading="loading" :data="LiveHabbitList" @selection-change="handleSelectionChange">
            <el-form ref="elForm" :model="LiveHabbitList" :rules="rules" size="medium"  label-position="left">
              <el-row :span="16" >
                <el-form-item label="大便规律" prop="stoolStatusClass" label-width="70px">
                  <el-radio-group v-model="LiveHabbitList.stoolStatusClass">
                    <el-radio v-for="(option, index) in typeOptions4" :key="index" :label="option.value" :disabled="dsb">{{ option.label }}</el-radio>
                  </el-radio-group>
                </el-form-item>
              </el-row>
              <el-row :span="16">
                <el-form-item label="小便规律" prop="urineStatusClass" label-width="70px">
                  <el-radio-group v-model="LiveHabbitList.urineStatusClass">
                    <el-radio v-for="(option, index) in typeOptions5" :key="index" :label="option.value" :disabled="dsb">{{ option.label }}</el-radio>
                  </el-radio-group>
                </el-form-item>
              </el-row>
            </el-form>
          </el-col>
        </el-container>
      </div>
    </el-container>
    <el-container>
      <div>
        <el-container >
          <el-col >
            <el-form ref="elForm" :model="LiveHabbitList" :rules="rules" size="medium"  label-position="left"
                     v-loading="loading" :data="LiveHabbitList" @selection-change="handleSelectionChange" >
              <el-row :span="16">
                <el-form-item label="饮食习惯" prop="eatingHabitsClass" label-width="70px">
                  <el-radio-group v-model="LiveHabbitList.eatingHabitsClass">
                    <el-radio v-for="(option, index) in typeOptions6" :key="index" :label="option.value" :disabled="dsb">{{ option.label }}</el-radio>
                  </el-radio-group>
                </el-form-item>
              </el-row>
              <el-row :span="16">
                <el-form-item label="生活事件" prop="lifeEventClass" label-width="70px">
                  <el-radio-group v-model="LiveHabbitList.lifeEventClass">
                    <el-radio v-for="(option, index) in typeOptions7" :key="index" :label="option.value" :disabled="dsb">{{ option.label }}</el-radio>
                  </el-radio-group>
                </el-form-item>
              </el-row>
            </el-form>
          </el-col>
        </el-container>
      </div>
    </el-container>
    <h2 style="font-size:21px">护理查体</h2>
    <el-container>
      <div style="padding-left:0px" >
        <el-container >
          <el-col >
            <el-form ref="elForm" :model="HealthHuliList" :rules="rules" size="medium"  label-position="left"
                     v-loading="loading" :data="HealthHuliList" @selection-change="handleSelectionChange" >
              <el-row :span="16">
                <el-form-item label="体温" prop="temperature" label-width="40px">
                  <el-input v-model="HealthHuliList.temperature " placeholder="" clearable :style="{width: '100%'}" :disabled="dsb">
                  </el-input>
                </el-form-item>
              </el-row>
              <el-row :span="16">
                <el-form-item label="血压" prop="bloodPressure" label-width="40px">
                  <el-input v-model="HealthHuliList.bloodPressure" placeholder="" clearable :style="{width: '100%'}" :disabled="dsb">
                  </el-input>
                </el-form-item>
              </el-row>
            </el-form>
          </el-col>
        </el-container>
      </div>
      <div style="padding-left:150px">
        <el-container>
          <el-col v-loading="loading" :data="HealthHuliList" @selection-change="handleSelectionChange">
            <el-form ref="elForm" :model="HealthHuliList" :rules="rules" size="medium"  label-position="left">
              <el-row :span="16">
                <el-form-item label="脉搏" prop="pulse" label-width="40px">
                  <el-input v-model="HealthHuliList.pulse " placeholder="" clearable :style="{width: '100%'}" :disabled="dsb">
                  </el-input>
                </el-form-item>
              </el-row>
              <el-row :span="16">
                <el-form-item label="体重" prop="weight" label-width="40px">
                  <el-input v-model="HealthHuliList.weight " placeholder="" clearable :style="{width: '100%'}" :disabled="dsb">
                  </el-input>
                </el-form-item>
              </el-row>
            </el-form>
          </el-col>
        </el-container>
      </div>
      <div style="padding-left:150px">
        <el-container>
          <el-col v-loading="loading" :data="HealthHuliList" @selection-change="handleSelectionChange">
            <el-form ref="elForm" :model="HealthHuliList" :rules="rules" size="medium"  label-position="left">
              <el-row :span="16">
                <el-form-item label="呼吸" prop="breathe" label-width="40px">
                  <el-input v-model="HealthHuliList.breathe " placeholder="" clearable :style="{width: '100%'}" :disabled="dsb">
                  </el-input>
                </el-form-item>
              </el-row>
              <el-row :span="16">
                <el-form-item label="四肢活动" prop="movement" label-width="70px">
                  <el-input v-model="HealthHuliList.movement " placeholder="" clearable :style="{width: '100%'}" :disabled="dsb">
                  </el-input>
                </el-form-item>
              </el-row>
            </el-form>
          </el-col>
        </el-container>
      </div>
    </el-container>
    <el-container>
      <div>
        <el-container >
          <el-col >
            <el-form ref="elForm" :model="HealthHuliList" :rules="rules" size="medium"  label-position="left"
                     v-loading="loading" :data="HealthHuliList" @selection-change="handleSelectionChange" >
              <el-row :span="16">
                <el-form-item label="皮肤粘膜" prop="skinTypeClass" label-width="70px">
                  <el-radio-group v-model="HealthHuliList.skinTypeClass">
                    <el-radio v-for="(option, index) in typeOptions8" :key="index" :label="option.value" :disabled="dsb">{{ option.label }}</el-radio>
                  </el-radio-group>
                </el-form-item>
              </el-row>
              <el-row :span="16">
                <el-form-item label="心理状态" prop="psychologyTypeClass" label-width="70px">
                  <el-radio-group v-model="HealthHuliList.psychologyTypeClass">
                    <el-radio v-for="(option, index) in typeOptions9" :key="index" :label="option.value" :disabled="dsb">{{ option.label }}</el-radio>
                  </el-radio-group>
                </el-form-item>
              </el-row>
              <el-row :span="16">
                <el-form-item label="病理态度" prop="attitudeClass" label-width="70px">
                  <el-radio-group v-model="HealthHuliList.eatingHabitsClass">
                    <el-radio v-for="(option, index) in typeOptions10" :key="index" :label="option.value" :disabled="dsb">{{ option.label }}</el-radio>
                  </el-radio-group>
                </el-form-item>
              </el-row>
              <el-row :span="16">
                <el-form-item label="全身营养情况" prop="nutritionClass" label-width="100px">
                  <el-radio-group v-model="HealthHuliList.eatingHabitsClass">
                    <el-radio v-for="(option, index) in typeOptions11" :key="index" :label="option.value" :disabled="dsb">{{ option.label }}</el-radio>
                  </el-radio-group>
                </el-form-item>
              </el-row>
            </el-form>
          </el-col>
        </el-container>
      </div>
    </el-container>
    <h2 style="font-size:21px">现存健康问题</h2>
    <el-container>
      <div>
        <el-container >
          <el-col >
            <el-form ref="elForm" :model="HealthNowList" :rules="rules" size="medium"  label-position="left"
                     v-loading="loading" :data="HealthNowList" @selection-change="handleSelectionChange" >
              <el-row :span="16">
                <el-form-item label="脑血管疾病" prop="brainDiseaseClass" label-width="100px">
                  <el-radio-group v-model="HealthNowList.brainDiseaseClass">
                    <el-radio v-for="(option, index) in typeOptions12" :key="index" :label="option.value" :disabled="dsb">{{ option.label }}</el-radio>
                  </el-radio-group>
                </el-form-item>
              </el-row>
              <el-row :span="16">
                <el-form-item label="心脏疾病" prop="heartDiseaseClass" label-width="70px">
                  <el-radio-group v-model="HealthNowList.heartDiseaseClass">
                    <el-radio v-for="(option, index) in typeOptions13" :key="index" :label="option.value" :disabled="dsb">{{ option.label }}</el-radio>
                  </el-radio-group>
                </el-form-item>
              </el-row>
              <el-row :span="16">
                <el-form-item label="血管疾病" prop="vascularDiseaseClass" label-width="70px">
                  <el-radio-group v-model="HealthNowList.vascularDiseaseClass">
                    <el-radio v-for="(option, index) in typeOptions14" :key="index" :label="option.value" :disabled="dsb">{{ option.label }}</el-radio>
                  </el-radio-group>
                </el-form-item>
              </el-row>
              <el-row :span="16">
                <el-form-item label="消化系统疾病" prop="digestiveSystemDiseaseClass" label-width="100px">
                  <el-radio-group v-model="HealthNowList.digestiveSystemDiseaseClass">
                    <el-radio v-for="(option, index) in typeOptions15" :key="index" :label="option.value" :disabled="dsb">{{ option.label }}</el-radio>
                  </el-radio-group>
                </el-form-item>
              </el-row>
              <el-row :span="16">
                <el-form-item label="呼吸系统疾病" prop="respiratorySystemDiseaseClass" label-width="100px">
                  <el-radio-group v-model="HealthNowList.respiratorySystemDiseaseClass">
                    <el-radio v-for="(option, index) in typeOptions16" :key="index" :label="option.value" :disabled="dsb">{{ option.label }}</el-radio>
                  </el-radio-group>
                </el-form-item>
              </el-row>
              <el-row :span="16">
                <el-form-item label="肾脏疾病" prop="kidneyDiseaseClass" label-width="100px">
                  <el-radio-group v-model="HealthNowList.kidneyDiseaseClass">
                    <el-radio v-for="(option, index) in typeOptions17" :key="index" :label="option.value" :disabled="dsb">{{ option.label }}</el-radio>
                  </el-radio-group>
                </el-form-item>
              </el-row>
              <el-row :span="16">
                <el-form-item label="其它疾病" prop="otherDiseaseClass" label-width="100px">
                  <el-radio-group v-model="HealthNowList.otherDiseaseClass">
                    <el-radio v-for="(option, index) in typeOptions18" :key="index" :label="option.value" :disabled="dsb">{{ option.label }}</el-radio>
                  </el-radio-group>
                </el-form-item>
              </el-row>
            </el-form>
          </el-col>
        </el-container>
      </div>
    </el-container>
  </div>
</template>
@@ -290,20 +517,22 @@
<script>
import { listRole, getRole, delRole, addRole, updateRole, dataScope, changeRoleStatus, deptTreeSelect } from "@/api/system/role";
import { treeselect as menuTreeselect, roleMenuTreeselect } from "@/api/system/menu";
import {getCategory,listHealthBase,updateHealthBase,listHealthHabit,updateHealthHabit,listHealthHuli,updateHealthHuli,listHealthNow,updateHealthNow} from "@/api/healthy/index";
//在system/note/index.js中导入接口函数  --接好了
import {listHealth,enload,delHealth,getHealthInfo, addHealth, uploadPic} from "@/api/healthy/index";
import { blobValidate } from '../../utils/ruoyi'
export default {
  name: "Role",
  name: "show",
  dicts: ['sys_normal_disable'],
  data() {
    return {
      dictionary: {},
      // 遮罩层
      disabled: false,
      loading: true,
      isEditing:false,
      inds: undefined,
      sinds: undefined,
      loading: false,
      formData:[],
      // 选中数组
      ids: [],
@@ -315,13 +544,27 @@
      showSearch: true,
      // 总条数
      total: 0,
      // 家大事记表格数据
      economyList: [],
      //头像上传
      showBtnDealImg:true,
      noneBtnImg:false,
      limitCountImg:1,//上传图片的最大数量
      //个人信息数据
      HealthyBaseList:{},
      LiveHabbitList:{},
      HealthHuliList:{},
      HealthNowList:{},
      fit:['fill'],
      //下拉实现
      activeNames:['1'],
      // 弹出层标题
      title: "",
      // 是否显示弹出层
      open: false,
      // open:true,
      // 是否显示弹出层(数据权限)
      bear:undefined,
      mrs:undefined,
      smrs:undefined,
      openDataScope: false,
      menuExpand: false,
      menuNodeAll: false,
@@ -336,17 +579,18 @@
      fileListOther:[
      ],
      editStatus: {},
      dsb:true,
      btn:false,
      uploading: false,
      isShow:true,
      isShow_2:false,
      formDat: {
        type: undefined,
        createTime: undefined,
        useFor: undefined,
        usePeople: undefined,
        kind:undefined,
        remark: undefined,
        url: undefined,
      },
      form:{
        bloodClass:'',
      },
      // 菜单列表
      menuOptions: [],
@@ -355,12 +599,10 @@
      // 查询参数
      queryParams: {
        pageNum: 1,
        pageSize: 10,
        type:undefined,
        useFor:undefined,
        usePeople:undefined,
        checkTime:undefined,
        pageSize: 5,
        startDate:undefined,
        content:undefined,
        witness:undefined,
      },
      // 表单参数
      form: {},
@@ -370,50 +612,33 @@
      },
      // 表单校验
      rules: {
        usePeople: [{
          required: true,
          message: '请输入使用人',
          trigger: 'blur'
        }],
        useFor: [{
          required: true,
          message: '请输入用途',
          trigger: 'blur'
        }],
        type: [{
          required: true,
          message: '请输入台账内容',
          trigger: 'blur'
        }],
        balance: [{
          required: true,
          message: '请输入金额',
          trigger: 'blur'
        }],
        kind: [{
          // required: true,
          message: '请输入支付方式',
          trigger: 'blur'
        }],
        createTime: [{
          required: true,
          message: '请选择日期选择',
          trigger: 'change'
        }],
        price: [{
          required: true,
          message: '请选择事项内容',
          trigger: 'blur'
        }],
      },
      typeOptions: [],//血型
      typeOptions100:[],//血型2
      typeOptions1: [],//过敏史
      typeOptions2: [],//遗传病史
      typeOptions3: [],//睡眠
      typeOptions4: [],//大便规律
      typeOptions5: [],//小便规律
      typeOptions6: [],//饮食习惯
      typeOptions7: [],//生活事件
      typeOptions8: [],//皮肤粘膜
      typeOptions9: [],//心理状态
      typeOptions10: [],//病理态度
      typeOptions11: [],//全身营养情况
      typeOptions12: [],//脑血管疾病
      typeOptions13: [],//心脏疾病
      typeOptions14: [],//血管疾病
      typeOptions15: [],//消化系统疾病
      typeOptions16: [],//呼吸系统疾病
      typeOptions17: [],//肾脏疾病
      typeOptions18: [],//肾脏疾病
    };
  },
  created() {
    this.getList();
    this.getList()
  },
  methods: {
@@ -423,51 +648,470 @@
      this.open = false;
      this.reset();
    },
    //隔行变色
    tableRowClassName({ row, rowIndex }) {
      if (rowIndex % 2 == 0) {
        return "statistics-warning-row1";
      } else {
        return "statistics-warning-row";
      }
    //下拉
    handleChange(val) {
      console.log(val);
    },
    /** 查询角色列表 */
    //列表显示家大事记
    getList() {
      this.loading = true;
      this.queryParams.happenStartTime = this.dateRange.length > 0 && this.dateRange[0]
      this.queryParams.happenEndTime = this.dateRange.length > 0 && this.dateRange[1]
      // console.log(this.queryParams)
      //  listProperty(this.addDateRange(this.queryParams, this.dateRange)).then(response => {
      listHealth(this.queryParams).then(response => {
          //  alert(123)
          //   console.log(response.data)
          this.healthList = response.data.data;
          this.total = response.data.total;
          this.loading = false;
      //个人信息
      listHealthBase(this.queryParams)
        .then(response => {
          if (response.data.length === 0) {
            this.loading = false;
            this.HealthyBaseList = {};
          } else {
            this.HealthyBaseList = response.data;
            this.loading = false;
            const query ={} ;
            if (query.id = 2) {
              getCategory(query)
                .then(response => {
                  const itemValues = response.data.itemValues;
                  const keyValuePairs = itemValues.replace("{", "").replace("}", "").split(",");
                  this.typeOptions = keyValuePairs.map(elem => {
                    const [label, value] = elem.split(":").map(str => str.trim());
                    return { label, value: parseInt(value) };
                  });
                  const bloodClass = this.HealthyBaseList.bloodClass;
                  console.log(typeOptions)
                  // 将bloodClass的值转换为typeOptions数组
                  this.typeOptions = Object.keys(bloodClass).map(key => {
                    return {
                      label: key,
                      value: bloodClass[key]
                    };
                  });
                  console.log(typeOptions)
                })
                .catch(error => {
                  console.error(error);
                });}
            if (query.id = 3) {
              getCategory(query)
                .then(response => {
                  const itemValues = response.data.itemValues;
                  const keyValuePairs = itemValues.replace("{", "").replace("}", "").split(",");
                  this.typeOptions1 = keyValuePairs.map(elem => {
                    const [label, value] = elem.split(":").map(str => str.trim());
                    return { label, value: parseInt(value) };
                  });
                  const allergyClass = this.HealthyBaseList.allergyClass;
                  const selectedOption = this.typeOptions1.find(option => option.value.toString() === allergyClass);
                  if (selectedOption) {
                    this.HealthyBaseList.allergyClass = selectedOption.value.toString();
                  }
                })
                .catch(error => {
                  console.error(error);
                });}
            if (query.id = 4) {
              getCategory(query)
                .then(response => {
                  const itemValues = response.data.itemValues;
                  const keyValuePairs = itemValues.replace("{", "").replace("}", "").split(",");
                  this.typeOptions2 = keyValuePairs.map(elem => {
                    const [label, value] = elem.split(":").map(str => str.trim());
                    return { label, value: parseInt(value) };
                  });
                  const geneticDiseaseClass = this.HealthyBaseList.geneticDiseaseClass;
                  const selectedOption = this.typeOptions2.find(option => option.value.toString() === geneticDiseaseClass);
                  if (selectedOption) {
                    this.HealthyBaseList.geneticDiseaseClass = selectedOption.value.toString();
                  }
                })
                .catch(error => {
                  console.error(error);
                });}
          }
        })
        .catch(error => {
          console.error(error);
        });
      //生活习惯
      listHealthHabit(this.queryParams).then(response => {
          if(response.data.length == 0){
            this.loading = false;
            this.LiveHabbitList={};
          }
          else{
            this.LiveHabbitList = response.data;
            this.loading = false;
            const query ={} ;
            if (query.id = 5) {
              getCategory(query)
                .then(response => {
                  const itemValues = response.data.itemValues;
                  const keyValuePairs = itemValues.replace("{", "").replace("}", "").split(",");
                  this.typeOptions3 = keyValuePairs.map(elem => {
                    const [label, value] = elem.split(":").map(str => str.trim());
                    return { label, value: parseInt(value) };
                  });
                  const sleepClass = this.LiveHabbitList.sleepClass;
                  const selectedOption = this.typeOptions3.find(option => option.value.toString() === sleepClass);
                  if (selectedOption) {
                    this.LiveHabbitList.sleepClass = selectedOption.value.toString();
                  }
                })
                .catch(error => {
                  console.error(error);
                });}
            if (query.id = 6) {
              getCategory(query)
                .then(response => {
                  const itemValues = response.data.itemValues;
                  const keyValuePairs = itemValues.replace("{", "").replace("}", "").split(",");
                  this.typeOptions4 = keyValuePairs.map(elem => {
                    const [label, value] = elem.split(":").map(str => str.trim());
                    return { label, value: parseInt(value) };
                  });
                  const stoolStatusClass = this.LiveHabbitList.stoolStatusClass;
                  const selectedOption = this.typeOptions4.find(option => option.value.toString() === stoolStatusClass);
                  if (selectedOption) {
                    this.LiveHabbitList.stoolStatusClass = selectedOption.value.toString();
                  }
                })
                .catch(error => {
                  console.error(error);
                });}
            if (query.id = 7) {
              getCategory(query)
                .then(response => {
                  const itemValues = response.data.itemValues;
                  const keyValuePairs = itemValues.replace("{", "").replace("}", "").split(",");
                  this.typeOptions5 = keyValuePairs.map(elem => {
                    const [label, value] = elem.split(":").map(str => str.trim());
                    return { label, value: parseInt(value) };
                  });
                  const urineStatusClass = this.LiveHabbitList.urineStatusClass;
                  const selectedOption = this.typeOptions3.find(option => option.value.toString() === urineStatusClass);
                  if (selectedOption) {
                    this.LiveHabbitList.urineStatusClass = selectedOption.value.toString();
                  }
                })
                .catch(error => {
                  console.error(error);
                });}
            if (query.id = 8) {
              getCategory(query)
                .then(response => {
                  const itemValues = response.data.itemValues;
                  const keyValuePairs = itemValues.replace("{", "").replace("}", "").split(",");
                  this.typeOptions6 = keyValuePairs.map(elem => {
                    const [label, value] = elem.split(":").map(str => str.trim());
                    return { label, value: parseInt(value) };
                  });
                  const eatingHabitsClass = this.LiveHabbitList.eatingHabitsClass;
                  const selectedOption = this.typeOptions6.find(option => option.value.toString() === eatingHabitsClass);
                  if (selectedOption) {
                    this.LiveHabbitList.eatingHabitsClass = selectedOption.value.toString();
                  }
                })
                .catch(error => {
                  console.error(error);
                });}
            if (query.id = 9) {
              getCategory(query)
                .then(response => {
                  const itemValues = response.data.itemValues;
                  const keyValuePairs = itemValues.replace("{", "").replace("}", "").split(",");
                  this.typeOptions7 = keyValuePairs.map(elem => {
                    const [label, value] = elem.split(":").map(str => str.trim());
                    return { label, value: parseInt(value) };
                  });
                  const lifeEventClass = this.LiveHabbitList.lifeEventClass;
                  console.log(this.typeOptions7)
                  console.log(this.LiveHabbitList.lifeEventClass)
                  console.log(lifeEventClass)
                })
                .catch(error => {
                  console.error(error);
                });}
          }
        }
      );
    },
    handleRemove(file) {
      for(let i = 0; i < this.fileList.length; i++)
      {
        if(this.fileList[i].url==file.url)
          this.$delete(this.fileList,i);
      //护理查体
      listHealthHuli(this.queryParams).then(response => {
          if(response.data.length == 0){
            this.loading = false;
            this.HealthHuliList={};
      }
    },
    handleRemoveFile(file) {
      for(let i = 0; i < this.fileListOther.length; i++)
      {
        if(this.fileListOther[i].url==file.url)
          this.$delete(this.fileListOther,i);
          else{
            this.HealthHuliList = response.data;
            this.loading = false;
            const query ={} ;
            if (query.id = 10) {
              getCategory(query)
                .then(response => {
                  const itemValues = response.data.itemValues;
                  const keyValuePairs = itemValues.replace("{", "").replace("}", "").split(",");
                  this.typeOptions8 = keyValuePairs.map(elem => {
                    const [label, value] = elem.split(":").map(str => str.trim());
                    return { label, value: parseInt(value) };
                  });
                  const skinTypeClass = this.HealthHuliList.skinTypeClass;
                  const selectedOption = this.typeOptions8.find(option => option.value.toString() === skinTypeClass);
                  if (selectedOption) {
                    this.HealthHuliList.skinTypeClass = selectedOption.value.toString();
      }
                })
                .catch(error => {
                  console.error(error);
                });}
            if (query.id = 11) {
              getCategory(query)
                .then(response => {
                  const itemValues = response.data.itemValues;
                  const keyValuePairs = itemValues.replace("{", "").replace("}", "").split(",");
                  this.typeOptions9 = keyValuePairs.map(elem => {
                    const [label, value] = elem.split(":").map(str => str.trim());
                    return { label, value: parseInt(value) };
                  });
                  const psychologyTypeClass = this.HealthHuliList.psychologyTypeClass;
                  const selectedOption = this.typeOptions9.find(option => option.value.toString() === psychologyTypeClass);
                  if (selectedOption) {
                    this.HealthHuliList.psychologyTypeClass = selectedOption.value.toString();
                  }
                })
                .catch(error => {
                  console.error(error);
                });}
            if (query.id = 12) {
              getCategory(query)
                .then(response => {
                  const itemValues = response.data.itemValues;
                  const keyValuePairs = itemValues.replace("{", "").replace("}", "").split(",");
                  this.typeOptions10 = keyValuePairs.map(elem => {
                    const [label, value] = elem.split(":").map(str => str.trim());
                    return { label, value: parseInt(value) };
                  });
                  const attitudeClass = this.HealthHuliList.attitudeClass;
                  const selectedOption = this.typeOptions10.find(option => option.value.toString() === attitudeClass);
                  if (selectedOption) {
                    this.HealthHuliList.attitudeClass = selectedOption.value.toString();
                  }
                })
                .catch(error => {
                  console.error(error);
                });}
            if (query.id = 13) {
              getCategory(query)
                .then(response => {
                  const itemValues = response.data.itemValues;
                  const keyValuePairs = itemValues.replace("{", "").replace("}", "").split(",");
                  this.typeOptions11 = keyValuePairs.map(elem => {
                    const [label, value] = elem.split(":").map(str => str.trim());
                    return { label, value: parseInt(value) };
                  });
                  const nutritionClass = this.HealthHuliList.nutritionClass;
                  const selectedOption = this.typeOptions11.find(option => option.value.toString() === nutritionClass);
                  if (selectedOption) {
                    this.HealthHuliList.nutritionClass = selectedOption.value.toString();
                  }
                })
                .catch(error => {
                  console.error(error);
                });}
          }
        }
      );
      //现存健康问题
      listHealthNow(this.queryParams).then(response => {
          if(response.data.length == 0){
            this.loading = false;
            this.HealthNowList={};
          }
          else{
            this.HealthNowList = response.data;
            this.loading = false;
            const query ={} ;
            if (query.id = 14) {
              getCategory(query)
                .then(response => {
                  const itemValues = response.data.itemValues;
                  const keyValuePairs = itemValues.replace("{", "").replace("}", "").split(",");
                  this.typeOptions12 = keyValuePairs.map(elem => {
                    const [label, value] = elem.split(":").map(str => str.trim());
                    return { label, value: parseInt(value) };
                  });
                  const brainDiseaseClass = this.HealthNowList.brainDiseaseClass;
                  const selectedOption = this.typeOptions12.find(option => option.value.toString() === brainDiseaseClass);
                  if (selectedOption) {
                    this.HealthNowList.brainDiseaseClass = selectedOption.value.toString();
                  }
                })
                .catch(error => {
                  console.error(error);
                });}
            if (query.id = 15) {
              getCategory(query)
                .then(response => {
                  const itemValues = response.data.itemValues;
                  const keyValuePairs = itemValues.replace("{", "").replace("}", "").split(",");
                  this.typeOptions13 = keyValuePairs.map(elem => {
                    const [label, value] = elem.split(":").map(str => str.trim());
                    return { label, value: parseInt(value) };
                  });
                  const heartDiseaseClass = this.HealthNowList.heartDiseaseClass;
                  const selectedOption = this.typeOptions13.find(option => option.value.toString() === heartDiseaseClass);
                  if (selectedOption) {
                    this.HealthNowList.heartDiseaseClass = selectedOption.value.toString();
                  }
                })
                .catch(error => {
                  console.error(error);
                });}
            if (query.id = 16) {
              getCategory(query)
                .then(response => {
                  const itemValues = response.data.itemValues;
                  const keyValuePairs = itemValues.replace("{", "").replace("}", "").split(",");
                  this.typeOptions14 = keyValuePairs.map(elem => {
                    const [label, value] = elem.split(":").map(str => str.trim());
                    return { label, value: parseInt(value) };
                  });
                  const vascularDiseaseClass = this.HealthNowList.vascularDiseaseClass;
                  const selectedOption = this.typeOptions14.find(option => option.value.toString() === vascularDiseaseClass);
                  if (selectedOption) {
                    this.HealthNowList.vascularDiseaseClass = selectedOption.value.toString();
                  }
                })
                .catch(error => {
                  console.error(error);
                });}
            if (query.id = 17) {
              getCategory(query)
                .then(response => {
                  const itemValues = response.data.itemValues;
                  const keyValuePairs = itemValues.replace("{", "").replace("}", "").split(",");
                  this.typeOptions15 = keyValuePairs.map(elem => {
                    const [label, value] = elem.split(":").map(str => str.trim());
                    return { label, value: parseInt(value) };
                  });
                  const digestiveSystemDiseaseClass = this.HealthNowList.digestiveSystemDiseaseClass;
                  const selectedOption = this.typeOptions15.find(option => option.value.toString() === digestiveSystemDiseaseClass);
                  if (selectedOption) {
                    this.HealthNowList.digestiveSystemDiseaseClass = selectedOption.value.toString();
                  }
                })
                .catch(error => {
                  console.error(error);
                });}
            if (query.id = 18) {
              getCategory(query)
                .then(response => {
                  const itemValues = response.data.itemValues;
                  const keyValuePairs = itemValues.replace("{", "").replace("}", "").split(",");
                  this.typeOptions16 = keyValuePairs.map(elem => {
                    const [label, value] = elem.split(":").map(str => str.trim());
                    return { label, value: parseInt(value) };
                  });
                  const respiratorySystemDiseaseClass = this.HealthNowList.respiratorySystemDiseaseClass;
                  const selectedOption = this.typeOptions16.find(option => option.value.toString() === respiratorySystemDiseaseClass);
                  if (selectedOption) {
                    this.HealthNowList.respiratorySystemDiseaseClass = selectedOption.value.toString();
                  }
                })
                .catch(error => {
                  console.error(error);
                });}
            if (query.id = 19) {
              getCategory(query)
                .then(response => {
                  const itemValues = response.data.itemValues;
                  const keyValuePairs = itemValues.replace("{", "").replace("}", "").split(",");
                  this.typeOptions17 = keyValuePairs.map(elem => {
                    const [label, value] = elem.split(":").map(str => str.trim());
                    return { label, value: parseInt(value) };
                  });
                  const kidneyDiseaseClass = this.HealthNowList.kidneyDiseaseClass;
                  const selectedOption = this.typeOptions17.find(option => option.value.toString() === kidneyDiseaseClass);
                  if (selectedOption) {
                    this.HealthNowList.kidneyDiseaseClass = selectedOption.value.toString();
                  }
                })
                .catch(error => {
                  console.error(error);
                });}
            if (query.id = 20) {
              getCategory(query)
                .then(response => {
                  const itemValues = response.data.itemValues;
                  const keyValuePairs = itemValues.replace("{", "").replace("}", "").split(",");
                  this.typeOptions18 = keyValuePairs.map(elem => {
                    const [label, value] = elem.split(":").map(str => str.trim());
                    return { label, value: parseInt(value) };
                  });
                  const otherDiseaseClass = this.HealthNowList.otherDiseaseClass;
                  const selectedOption = this.typeOptions18.find(option => option.value.toString() === otherDiseaseClass);
                  if (selectedOption) {
                    this.HealthNowList.otherDiseaseClass = selectedOption.value.toString();
                  }
                })
                .catch(error => {
                  console.error(error);
                });}
          }
        }
      );
    },
    // 取消按钮
    cancel() {
@@ -502,57 +1146,39 @@
        };
      this.resetForm("form");
    },
    /** 搜索按钮操作 */
    handleQuery() {
      this.queryParams.pageNum = 1;
      this.getList();
    },
    /** 重置按钮操作 */
    resetQuery() {
      this.dateRange = [];
      this.resetForm("queryForm");
      this.handleQuery();
    },
    // 多选框选中数据
    handleSelectionChange(selection) {
      this.ids = selection.map(item => item.id)
      console.log(this.ids)
      this.single = selection.length!=1
      this.multiple = !selection.length
    },
    /** 新增按钮操作 */
    handleAdd() {
      this.reset();
      this.open = true;
      this.title = "新增健康情况";
    },
    /** 查看详细信息 */
    handleCheck(row){
      const id = row.id;
      this.$router.push("/self/healthy/healthyInfo/" + id);
      this.title = "新增婚姻信息";
    },
    /** 修改按钮操作 */
    handleUpdate(row) {
      const id = row.id;
    handleUpdate() {
      let jd = true
      this.$router.push({
        path:"/self/healthy/healthyInfo/" + id,
        query:{
          detail:jd
        }
      });
      // this.$router.push({
      //   path:"/self/marry/edit/" + id,
      //   query:{
      //     detail:jd
      //   }
      // });
    },
    // 编辑按钮
    handleEdit()
    {
      this.dsb = false
      this.btn = true
      this.isShow=false
      this.isShow_2=true
      this.isEditing=true
    },
    handlePictureCardPreview(file) {
      this.dialogImageUrl = file.url;
      this.dialogVisible = true;
    },
    /** 提交按钮(数据权限) */
    submitDataScope: function() {
@@ -566,94 +1192,87 @@
      this.$refs["elForm"].validate(valid => {
        if (valid) {
          addHealth(this.formDat).then(response => {
          addMarryOld(this.formDat).then(response => {
            this.$modal.msgSuccess("新增成功");
            this.open = false;
            this.getList();
          });
        }
      });
      // 清空formDat对象的数据
      Object.keys(this.formDat).forEach(key => {
        this.formDat[key] = '';
      });
      for(let i = 0; i <= this.fileList.length; i++)
      {
        this.handleRemove(this.fileList[0]);
      }
      for(let i = 0; i < this.fileListOther.length; i++){
        this.handleRemoveFile(this.fileListOther[0]);
      }
    },
    requestUpload(params)
    {
      var file = params.file;
      var formData = new FormData();
      formData.append('uploadFile', file);
      let _this = this
      this.uploading = true;
      uploadPic(formData).then(response => {
        let pth = response.data.originalFilename.substr(response.data.originalFilename.length-4, response.data.originalFilename.length)
        this.uploading = false;
        this.$modal.msgSuccess("上传成功");
        if(_this.fot.includes(pth) === true)
        {
          _this.fileList.push({name:response.data.fileName, "url":response.data.url})
    editRow(row) {
      this.$set(row, 'isEdit', true);
      this.$set(this.editStatus, row.id, true);
    },
    //修改后的保存
    submitForm() {
      if(parseInt(this.mrs))
        this.marryList.marryStatus = parseInt(this.mrs)
      if(parseInt(this.smrs))
        this.marryList.spouseMarryStatus = parseInt(this.smrs)
      if(parseInt(this.bear))
        this.marryList.bearStatus = parseInt(this.bear)
      this.marryList.sex = this.sinds
      this.marryList.spouseSex = this.inds
      this.$refs['elForm'].validate(valid => {
        if (valid) {
          if (this.marryList.id !== undefined) {
            updateMarry(this.marryList).then(response => {
              this.$modal.msgSuccess("修改成功");
              // this.open = false;
              this.btn=false
              this.isEditing = false
              this.dsb = true
              this.isShow_2=false
              this.isShow = true
            });
          } else {
            this.$modal.msgSuccess("修改失败");
        }
        else{
          _this.fileListOther.push({name:response.data.fileName, url:response.data.url})
        }
      })
      // 刷新页面
      // window.location.reload();
    },
    //年度健康报告
    toYearhealthy(){
      console.log(this.HealthyBaseList.uid)
      this.$router.push("/self/healthy/healthYear/" + this.HealthyBaseList.uid);
    },
    //隔行变色
    tableRowClassName({ row, rowIndex }) {
      if (rowIndex % 2 == 0) {
        return "statistics-warning-row1";
      } else {
        return "statistics-warning-row";
      }
    },
    },
    /** 删除按钮操作 */
    handleDelete(row) {
      const Ids = row.id || this.ids;
      this.$modal.confirm('是否确认删除所选数据项?').then(function() {
        return delHealth(Ids);
      }).then(() => {
        this.getList();
        this.$modal.msgSuccess("删除成功");
      }).catch(() => {});
    },
    /** 导出按钮操作 */
    handleExport() {
      this.download('/zfEconomy/export', {
      this.download('/self/user/export', {
        ...this.queryParams
      }, `zfEconomy_${new Date().getTime()}.xlsx`)
      }, `self_${new Date().getTime()}.xlsx`)
    }
  },
  /** 导入操作*/
  handleEnport(params){
    var file = params.file;
    var formData = new FormData();
    formData.append('excelImport', file);
    let _this = this
    alert(file)
    enload(formData).then(response => {
      _this.getList();
      Message({ message: "导入成功", type: 'warning' })
    }).catch(err)
    {
      Message({ message: "导入失败", type: 'error' })
    }
  }
};
</script>
<style>
.el-table__row.statistics-warning-row {
  background: #E0EEFE;
.button {
  background:center no-repeat url('../../assets/icons/add1.png') ;
  margin-left: 69.5vw;
}
.el-table__row.statistics-warning-row1 {
  background: #FFEFF2;
}
</style>
.form{
  background:center/11% no-repeat url('../../assets/icons/form.png') ;
}</style>