<template>
  <div class="main-contain">
    <div v-if="isShow">
      <div class="cell clearfix marginBottom1">
        <div class="block">
          <span class="demonstration">上报时间：</span>
          <el-date-picker v-model="value" type="month" placeholder="选择年月">
          </el-date-picker>
          <el-button type="primary">一键上报</el-button>
        </div>
      </div>
      <div class="cell clearfix marginBottom2">
        <el-radio-group v-model="radio">
          <el-radio label="自动上报"></el-radio>
          <el-radio label="离线上报"></el-radio>
        </el-radio-group>
      </div>
      <!-- <div class="cell clearfix">
        <el-button type="primary">一键上报</el-button>
      </div> -->

      <div>
        <el-row :gutter="12" style="margin-top: 10px">
          <el-table
            :data="list"
            border
            highlight-current-row
            :row-style="{ color: '#303133' }"
            :header-cell-style="{
              backgroundColor: 'rgb(245, 247, 250)',
              color: '#606266'
            }"
          >
            <el-table-column label="日期" align="center">
              <template slot-scope="scope"> </template>
            </el-table-column>

            <el-table-column label="上传项目" align="center">
              <template slot-scope="scope"> </template>
            </el-table-column>

            <el-table-column label="上传状态" align="center">
              <template slot-scope="scope"> </template>
            </el-table-column>

            <el-table-column label="回报详情" align="center">
              <template slot-scope="scope"> </template>
            </el-table-column>
          </el-table>

          <!--<el-pagination-->
          <!--@size-change="handleSizeChange"-->
          <!--@current-change="handleCurrentChange"-->
          <!--:page-sizes="[7, 10, 50, 100]"-->
          <!--:page-size="7"-->
          <!--background-->
          <!--style="margin-top:20px;float: right"-->
          <!--layout="total, sizes, prev, pager, next, jumper"-->
          <!--:total="total">-->
          <!--</el-pagination>-->
        </el-row>
      </div>
    </div>
    <div v-else>
      <div class="cell clearfix">
        <div class="cellTitle">
          质控平台上报配置未完成!请在"质控上报>质控上报配置"中完成集成配置内容,再重新打开此功能。
        </div>
      </div>
    </div>
  </div>
</template>

<script>
import { getConfig } from "@/api/config";

export default {
  name: "DataCountry",
  created() {
    this.getConfig();
  },
  data() {
    return {
      value: "",
      list: [],
      radio: "",
      isShow: true
    };
  },
  methods: {
    getConfig: function() {
      getConfig({ config_type: 1 })
        .then(response => {
          var res = response.data;
          if (res.state === 1) {
            this.isShow = true;
          } else {
            this.isShow = false;
          }
        })
        .catch(e => {});
    }
  }
};
</script>

<style rel="stylesheet/css" lang="scss" scoped>
.information {
  border: 1px #dcdfe6 solid;
  padding: 30px 20px 30px 20px;

  .border {
    border-bottom: 1px #dcdfe6 solid;
    margin: 0px 0 20px 0;
  }
}

.edit_separater {
  border-top: 1px solid rgb(233, 233, 233);
  margin-top: 15px;
  margin-bottom: 15px;
}
.demonstration {
  color: #909399;
}
.marginBottom1 {
  margin-bottom: 20px !important;
  margin-top: 5px !important;
}
.marginBottom2 {
  margin-bottom: 20px !important;
}
.cellTitle {
  width: 100%;
  text-align: center;
  margin-top: 50px;
}
</style>

<style>
.sign-and-weigh-box .sign-and-weigh-box-patients .cell {
  font-size: 12px;
}

.sign-and-weigh-box .sign-and-weigh-box-patients .current-row > td {
  background: #6fb5fa;
}

.count {
  color: #bd2c00;
}
.el-table td,
.el-table th.is-leaf,
.el-table--border,
.el-table--group {
  border-color: #d0d3da;
}
.el-table--border::after,
.el-table--group::after,
.el-table::before {
  background-color: #d0d3da;
}
</style>
