<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="120px" style="width: 100%;">
          <el-row>
            <el-col :span="6">
              <el-form-item label="隐患名称:" prop="hiddenTitle">
                <font>{{form.hiddenTitle}}</font>
              </el-form-item>
              <el-form-item label="隐患发现人员:" prop="hiddenFindPeople">
                <font>{{form.hiddenFindPeople}}</font>
              </el-form-item>
            </el-col>
            <el-col :span="6">
              <el-form-item label="隐患等级:" prop="hiddenType">
                <font v-if="form.hiddenType == '1'">一级隐患</font>
                <font v-if="form.hiddenType == '2'">二级隐患</font>
                <font v-if="form.hiddenType == '3'">三级隐患</font>
              </el-form-item>
              <el-form-item label="发现时间:" prop="hiddenFindDate">
                <font>{{form.hiddenFindDate}}</font>
              </el-form-item>
            </el-col>
          </el-row>
          <el-row>
            <el-form-item label="隐患位置:" prop="hiddenLocation">
              <font>{{form.hiddenLocation}}</font>
            </el-form-item>
          </el-row>
          <el-row>
            <el-form-item label="隐患内容:" prop="hiddenContent">
              <font>{{form.hiddenContent}}</font>
            </el-form-item>
          </el-row>
          <el-row>
            <el-form-item label="整治情况:" prop="remediation">
              <font v-if="form.remediation != '' && form.remediation != null">{{form.remediation}}</font>
              <font v-else> - </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 { getHidden } from "@/api/standingBook/hidden";

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