
<template>
  <el-card style="margin-top: 16px">
    <el-form
      ref="elForm"
      :disabled="true"
      :model="formData"
      size="mini"
      label-width="180px"
    >
      <div class="tit">
        修房
        <span class="time">更新于:{{ update_time }}</span>
      </div>

      <el-row>
        <el-col :span="8">
          <el-form-item label="修房类型" prop="construction_type">
            <el-radio-group v-model="datas.construction_type" size="medium">
              <el-radio label="1">自建</el-radio>
              <el-radio label="0">外包</el-radio>
            </el-radio-group>
          </el-form-item>
        </el-col>
        <el-col :span="8">
          <el-form-item label="建设面积(m²)" prop="construction_area">
            <el-input
              v-model="datas.construction_area"
              clearable
              :disabled="true"
              :style="{ width: '100%' }"
            >
            </el-input>
          </el-form-item>
        </el-col>
        <el-col :span="8">
          <el-form-item label="房屋风格" prop="house_style">
            <el-input
              v-model="datas.house_style"
              clearable
              :disabled="true"
              :style="{ width: '100%' }"
            >
            </el-input>
          </el-form-item>
        </el-col>
        <el-col :span="8">
          <el-form-item label="修建地址" prop="construction_site">
            <el-input
              v-model="datas.construction_site"
              clearable
              :disabled="true"
              :style="{ width: '100%' }"
            >
            </el-input>
          </el-form-item>
        </el-col>
        <el-col :span="8">
          <el-form-item label="预算" prop="budget">
            <el-input
              v-model="datas.budget"
              clearable
              :disabled="true"
              :style="{ width: '100%' }"
            >
            </el-input>
          </el-form-item>
        </el-col>
        <el-col :span="8">
          <el-form-item label="有无绿化" prop="afforest">
            <el-radio-group v-model="datas.afforest" size="medium">
              <el-radio label="1">有</el-radio>
              <el-radio label="0">无</el-radio>
            </el-radio-group>
          </el-form-item>
        </el-col>
        <el-col :span="8">
          <el-form-item label="有无装修" prop="fitment">
            <el-radio-group v-model="datas.fitment" size="medium">
              <el-radio label="1">有</el-radio>
              <el-radio label="0">无</el-radio>
            </el-radio-group>
          </el-form-item>
        </el-col>
        <el-col :span="8">
          <el-form-item label="房屋类型" prop="house_type">
            <el-radio-group v-model="datas.house_type" size="medium">
              <el-radio label="1">私人</el-radio>
              <el-radio label="0">公共建设</el-radio>
            </el-radio-group>
          </el-form-item>
        </el-col>
        <el-col :span="24">
          <el-form-item label="修建地照片" prop="construction_site_img">
            <el-image
              style="width: 500px; height: 320px"
              :src="datas.construction_site_img"
              :preview-src-list="[datas.construction_site_img]"
              fit="cover"
            />
          </el-form-item>
        </el-col>
      </el-row>
    </el-form>
  </el-card>
</template>

<script setup lang='ts'>
const props = defineProps({
  datas: {
    type: Object,
    defualt: function () {
      return {
        construction_type: "",
        construction_area: "",
        house_style: "",
        construction_site: "",
        budget: "",
        afforest: "",
        fitment: "",
        house_type: "",
        construction_site_img: "",
      };
    },
  },
  update_time: {
    type: String,
    defualt: "",
  },
});
</script>

<style scoped lang='scss'>
.tit {
  font-size: 1.2rem;
  translate: 1vw -1vw;
  background-color: white;
  margin: 2vh 0 0 0;
  .time {
    display: inline-block;
    font-size: 0.8rem;
    margin-left: 1vw;
    color: #999;
  }
}
</style>
