<template>
  <div class="app-container">
      <!--<el-row>
        <el-col :span="24" style="padding-left: 15px;margin-bottom: -10px;">
          <div style="height: 45px;" @click="$router.go(-1)">
            <el-button size="medium" type="text" style="font-size: 18px; color: rgb(7, 63, 112);float: left;">返回
            </el-button>
          </div>
        </el-col>
      </el-row>-->
      <el-row style="width: 100%;height: 40px;">
        <el-col :span="24">
          <div style="">
            <ul>
              <li style="list-style: none;font-weight: 900;font-size: 20px;color: #053b6a;">燃气用户加装安全装置台账详情</li>
            </ul>
          </div>
        </el-col>
      </el-row>

      <el-row style="width: 100%;padding: 20px;">
        <el-form ref="form" v-model="form" label-width="100px" style="width: 100%;">
          <el-row>
            <el-col :span="6">
              <el-form-item label="用户名称:" prop="userName">
                <font>{{form.userName}}</font>
              </el-form-item>
              <el-form-item label="身份证号:" prop="idCard">
                <font>{{form.idCard}}</font>
              </el-form-item>
              <el-form-item label="品牌名称:" prop="brandName">
                <font v-if="form.brandName != '' && form.brandName != null">{{form.brandName}}</font>
                <font v-else> - </font>
              </el-form-item>
            </el-col>
            <el-col :span="6">
              <el-form-item label="用户编号:" prop="userNo">
                <font v-if="form.userNo != '' && form.userNo != null">{{form.userNo}}</font>
                <font v-else> - </font>
              </el-form-item>
              <el-form-item label="联系电话:" prop="linkMobile">
                <font>{{form.linkMobile}}</font>
              </el-form-item>
              <el-form-item label="安装时间:" prop="installTime">
                <font>{{form.installTime}}</font>
              </el-form-item>
            </el-col>
          </el-row>
          <el-row>
            <el-form-item label="详细地址:" prop="userAddress">
              <font>{{form.userAddress}}</font>
            </el-form-item>
          </el-row>
          <el-row>
            <el-form-item label="备注信息:" prop="remarks">
              <font v-if="form.remarks != '' && form.remarks != null">{{form.remarks}}</font>
              <font v-else> - </font>
            </el-form-item>
          </el-row>
        </el-form>
      </el-row>

    </div>
</template>

<script>
  import { getEquipment } from "@/api/standingBook/equipment";

  export default {
    name: "equipmentDetail",
    components: {
    },
    data() {
      return {
        // 弹出层标题
        title: "",
        // 是否显示弹出层
        open: false,
        // 表单参数
        form: {},
        // 表单校验
        rules: {
        }
      };
    },
    created() {
      // 如果是跳转来的，则接受初始化参数
      this.safeEquipmentId = this.$route.query.safeEquipmentId;
    },
    mounted() {
      this.getDetail();
    },
    methods: {
      getDetail() {
        getEquipment(this.safeEquipmentId).then(response => {
          this.form = response.data;
          console.log(this.form, "this.form")
          const obj =this.form;
        });
      },
    }
  }
</script>
