<!--资格申请-添加-->
<template>
  <div class="addPage">
    <div class="addPage_title">
      <p>查看气瓶</p>
      <p  class="reset-button-one" @click="backPage">返回</p>
    </div>
     <!--基本信息-->
    <div class="info" v-if="form.qpTask">
      <li><i>申领人：</i><i>{{form.qpTask.userName}}</i></li>
      <li><i>联系方式：</i><i>{{form.qpTask.phone}}</i></li>
      <li><i>实验地点：</i><i>{{form.qpTask.location}}</i></li>
      <li><i>申请时间：</i><i>{{form.qpTask.createTime}}</i></li>
    </div>
    <div class="addPage_b">
      <!--审核记录-->
      <div  class="addPage_b_t">
        <div class="addPage_b_t_title">气瓶信息</div>
        <el-table border v-loading="loading" :data="form.detailList">
          <el-table-column label="气体名称" align="left" prop="airName"/>
          <el-table-column label="气体级别/规格" align="left" prop="configName"></el-table-column>
          <el-table-column label="气瓶厂家" align="left" prop="companyName"></el-table-column>
          <el-table-column label="气体组分" align="left" prop="airConstituents"></el-table-column>
          <el-table-column label="数量" align="left" prop="bottleNumber"></el-table-column>
          <el-table-column label="状态" align="left" prop="qpStatus">
            <template slot-scope="scope">
              <p :class="scope.row.qpStatus == 0?'color_warn':'color_14AE10'">{{scope.row.qpStatus == 0?'未派送':'已派送'}}</p>
            </template>
          </el-table-column>
        </el-table>
      </div>
    </div>
  </div>
</template>
<script>

import { getToken } from "@/utils/auth";
import { gasApplyDetail, } from '@/api/gasManage3_0/gasManage'
let Base64 = require('js-base64').Base64;
export default {
  name: "addPage",
  props:{
    pageData2: {},
  },
  data() {
    return {
      pageType:1,
      uploadImgUrl: this.uploadUrl(), // 上传的图片服务器地址
      headers: {
        Authorization: "Bearer " + getToken(),
      },

      loading:false,
      form:{
      },

      // 查询参数
      queryParams: {
        pageNum: 1,
        pageSize:20,
      },
      total:0,
      tableData:[{
        num:0,
      }],
    };
  },
  created() {

  },
  methods: {

    /* 详情 */
    getInfo(id){
      let _this=this;
      gasApplyDetail(id).then( response => {
        let res=response.data;
        if(response.code==200){
          _this.form=res;
        }
      });

    },
    //返回
    backPage(){
      this.$parent.handleClick('','','back');
    },

  },
  mounted() {
    console.log(this.pageData2.id)
    this.getInfo(this.pageData2.id);
  }

};
</script>

<style scoped lang="scss">
.addPage {
  flex:1;
  display: flex!important;
  flex-direction: column;
  box-shadow: 0 0 8px 2px rgba(0, 0, 0, 0.1);
  border-radius:10px;
  /*顶部*/
  .addPage_title{
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #E0E0E0;
    padding-top:20px;
    p:nth-child(1){
      flex: 1;
      line-height:60px;
      color: #0045AF;
      font-size:18px;
      margin:0 12px 0 20px;
    }
    p:nth-child(2){
      margin-right:20px;
    }
    p:nth-child(3){
      margin-right:20px;
    }
  }
  /*基本信息*/
  .info{
    display: flex;
    justify-content: flex-start;
    flex-wrap: wrap;
    align-items: center;
    >li{
      list-style-type: none;
      margin: 20px;
      >i{
        font-style: normal;
      }
      >i:nth-of-type(1){
        font-size: 16px;
        font-family: Microsoft YaHei;
        font-weight: 400;
        color: #999999;
        line-height: 16px;
      }
      >i:nth-of-type(2){
        font-size: 16px;
        font-family: Microsoft YaHei;
        font-weight: 400;
        color: #333333;
        line-height: 16px;
      }
    }
    .look_img{
      >i:nth-of-type(2){
        color: #0183FA;
      }
    }
  }
  .addPage_b{
    flex:1;
    display: flex!important;
    flex-direction: column;
    /*气瓶信息*/
    .addPage_b_t{
      flex:1;
      display: flex!important;
      flex-direction: column;
      padding: 0 20px;
      box-sizing: border-box;
      .addPage_b_t_title{
        font-size: 16px;
        font-family: Microsoft YaHei;
        font-weight: bold;
        color: #333333;
        line-height: 16px;
        margin: 40px 0 30px 0;
      }
    }
  }

}
</style>
