<template>
  <div class="div_page_bg">
    <div class="div_content" v-for="(data,index) in standardList" :key="index">
      <div class="div_value">
        <span class="span_value">{{data.gtfieldName}}</span>
      </div>
      <div class="line_h"></div>
    </div>
  </div>
</template>

<script>
  import {getLendDeviceDetail} from "../../service/getData";

  export default {
    name: "xunJianStandard",
    data(){
      return {
        deviceNumber:'',
        standardList:[],
        companyId:localStorage.getItem('companyId'),
        type:'',
      }
    },
    created(){
      try {
        EbeiPlugins.setNavigationItemTitle("设备标准");
      }
      catch (e) {

      }
      this.type = this.$route.query.type;
      this.deviceNumber = this.$route.query.deviceNumber;
      this.getLendDeviceDetailJs();
    },
    methods:{
      getLendDeviceDetailJs(){
        let that = this;
        let params = {
          deviceNumber:this.deviceNumber,
          companyId:this.companyId,
        }
        this.$vux.loading.show({
          text: '加载中...'
        })
        getLendDeviceDetail(params).then(res => {
          that.$vux.loading.hide();
          if (res.resultCode === 200) {
            for (let i = 0;i<res.craft.craftDetail.length;i++) {
              that.standardList.push(res.craft.craftDetail[i]);
            }
          } else {

          }
        }).catch(error => {
          that.$vux.loading.hide();
          console.log(error)
        })
      },

    }
  }
</script>

<style scoped>
  .div_page_bg{
    width: 100%;
    height: 100vh;
    background-color: #F9F9F9;
  }
  .div_content{
    display: flex;
    flex-direction: column;
  }

  .div_value{
    padding: 10px;
    background-color: white;
  }

  .span_value{
    color: #333333;
    font-size: 14px;
  }

  .line_h{
    width: 100%;
    background-color: #e8e8e8;
    height: 1px;
    transform-origin: 0 100%;
    transform: scaleY(0.5);
  }
</style>
