<template>
  <div class="form-show-scrollY">
    <div class="form-template">
      <BreadCrumb
        :curmbFirst="'随访管理'"
        :curmbSecond="'录入管理'"
        :curmbThird="'录入量表'"
        :jumPathThird="jumPathThird"
      />
      <div class="resident-content f-main-content screenSet">

        <el-row :gutter="24" align="middle" type="flex" class="form-header">
          <el-col :span="20">心脑血管病危险因素
            社区、乡镇人群随访表
          </el-col>
          <el-col :span="4" v-if="showBtn=='1'">
            <el-button class="button-white" size="small" plain @click="formSubmit(2)">暂存</el-button>
            <el-button type="primary" size="small" @click="formSubmit(1)">提交</el-button>
          </el-col>
        </el-row>

        <div class="title-box">
          <h1>心脑血管病危险因素社区、乡镇人群随访表</h1>
          <h2>（适用于社区、乡镇脑卒中高危人群满6个月、12个月时随访和中危人群满12个月时随访使用）</h2>
        </div>

        <!--模板页面除了显示居民基本信息，将病种展示作为组件引入-->

        <div class="form-container">
          <!--脑卒中-->
          <stroke v-if="resourceId=='SCALE0003'" :showBtn="showBtn" :checkStart="checkStart" @checkEnd="checkEnd" :saveWay="saveWay" />
        </div>


      </div>
    </div>
  </div>
</template>

<script>
  import BreadCrumb from '@/components/breadcrumb'


  // 糖尿病
  import stroke from './patient-scale/stroke'
  export default {
    data(){
      return {
        checkStart: false,
        showBtn: '1',
        resourceId: '',
        saveWay: 1,
        jumPathThird: '/followup/record-manage/record-list'
      }
    },
    components: {
      stroke,
      BreadCrumb,
    },
    methods: {
      formSubmit(val){
        this.saveWay = val
        this.checkStart = true;
      },
      checkEnd(val){
        this.checkStart = false
      }
    },
    created(){
      this.resourceId = this.$route.query.resourceId;
      this.resourceId = 'SCALE0003'
      if(this.$route.query.showBtn=='0'){
        this.showBtn = String(this.$route.query.showBtn);
      }
      // 0003 脑卒中、0002 糖尿病、0001 高血压
    }
  }
</script>

<style lang="scss" scoped>

  @import '../../../style/followup/followup-common';
  @import '../../../style/followup/element-reset.css';
  .form-show-scrollY{
    width: 100%; height: 100%; overflow: hidden; overflow-y: scroll;
    &::-webkit-scrollbar
    {
        width: 8px;
        height: 8px;
        background-color: #fff;
    }
  }
  .form-template{
    .form-header{
      /*position: fixed;*/
      /*z-index:100000;*/
      line-height: 60px;
      height: 60px;
      border-bottom: 1px solid #e1e1e1;
    }
    .patient-base-info{
      line-height: 60px;
      height: 60px;
      border-bottom: 1px dashed #ccc;
      [class*=el-col-]{
        float: left;
      }
    }
    .title-box{
      padding: 60px;
      text-align: center;
      h1{
        font-size: 18px;
        font-weight: normal;
      }
      h2{
        font-size: 16px;
        font-weight: normal;
        margin-top: 15px;
      }
    }
    .form-container{
      padding: 0 10px;
    }

  }
  .title{
    font-weight: bold;
  }

</style>
