<template>
    <div class="form-template">
      <BreadCrumb
        :curmbFirst="'随访管理'"
        :curmbSecond="'录入管理'"
        :curmbThird="'录入量表'"
      />
      <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">
            <el-button class="button-white" size="small" plain @click="">暂存</el-button>
            <el-button type="primary" size="small" @click="formSubmit">提交</el-button>
          </el-col>
        </el-row>

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

        <!--<el-row :gutter="24" class="patient-base-info">-->
          <!--<el-col :span="4"><div class="grid-content bg-purple">居民：戴家康</div></el-col>-->
          <!--<el-col :span="12"><div class="grid-content bg-purple">身份证号：31021212121212121212</div></el-col>-->
          <!--<el-col :span="8"><div class="grid-content bg-purple">随访计划名称：2018年河北省脑卒中随访</div></el-col>-->
        <!--</el-row>-->

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

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


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

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


  // 糖尿病
  import stroke from './patient-scale/stroke'
  export default {
    data(){
      return {
        checkStart: false,
        showBtn: true,
        resourceId: '',
      }
    },
    components: {
      stroke,
      BreadCrumb,
    },
    methods: {
      formSubmit(){
        this.checkStart = true;
      },
      checkEnd(val){
        this.checkStart = false
      }
    },
    created(){
      this.showBtn = false;
      console.log(this.$route.query);
      this.resourceId = this.$route.query.resourceId;
      this.resourceId = 'SCALE0003'
      // 0003 脑卒中、0002 糖尿病、0001 高血压

//      axios({
//        method: 'get',
//        url: 'https://dev-sc.yunqueyi.com/scale/1/SCALE0003/info',
//        data: JSON.stringify(this.formData),
//      }).then(res=>{
//        console.log(res)
//        this.formData = res.data.data
//        res.data.code='111'
//        if( res.data.code=='111'){
//          this.showBtn = false;
//        }
//      })
    }
  }
</script>

<style lang="scss" scoped>

  @import '../../../style/followup/followup-common';
  @import '../../../style/followup/element-reset.css';

  .form-template{
    .form-header{
      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>
