<template>
  <div class="dialog" v-if="dialogForm">
    <div class="head_box">
      <span class="title">警情情况详情详情</span>
      <div>
        <el-button size="small" @click="close">关闭</el-button>
      </div>
    </div>
    <div class="cntinfo">
      <el-form :model="listQuery" :label-width="230" label-position="left">
        <div class="form-row">
          <el-form-item label="场所代码">
            <el-input v-model="listQuery.placeCode" placeholder="01"/>
          </el-form-item>
          <el-form-item label="场所名称">
            <el-input v-model="listQuery.placeName" placeholder="天上人间KTV"/>
          </el-form-item>
        </div>

        <div class="form-row">
          <el-form-item label="警情登记号">
            <el-input v-model="listQuery.policeRecordNo" placeholder="1234567"/>
          </el-form-item>
          <el-form-item label="警情类别">
            <el-input v-model="listQuery.policeType" placeholder="矛盾纠纷"/>
          </el-form-item>
        </div>

        <div class="form-row">
          <el-form-item label="报警人姓名">
            <el-input v-model="listQuery.reporterName" placeholder="张三"/>
          </el-form-item>
          <el-form-item label="报警时间">
            <el-input v-model="listQuery.reportTime" placeholder="2025/1/20 10:00:00"/>
          </el-form-item>
        </div>

        <div class="form-row">
          <el-form-item label="接警时间">
            <el-input v-model="listQuery.receiveTime" placeholder="2025/1/20 10:01:00"/>
          </el-form-item>
          <el-form-item label="处警人姓名">
            <el-input v-model="listQuery.handlerName" placeholder="李四"/>
          </el-form-item>
        </div>

        <el-form-item label="警情处理结果">
          <el-input v-model="listQuery.handleResult" type="textarea" :rows="3" placeholder="自行协商"/>
        </el-form-item>

        <el-form-item label="简要案情">
          <el-input v-model="listQuery.briefCase" type="textarea" :rows="5" placeholder="请输入简要案情"/>
        </el-form-item>
      </el-form>
    </div>
  </div>
</template>

<script setup>
import { ref, reactive } from 'vue';
import { Plus } from '@element-plus/icons-vue';

const dialogForm = ref(false);
const activeName = ref('basic');
const title = ref('详情');
const listQuery = ref({
  placeCode: '',
  placeName: '',
  policeRecordNo: '',
  policeType: '',
  reporterName: '',
  reportTime: '',
  receiveTime: '',
  handlerName: '',
  handleResult: '',
  briefCase: ''
});

// 初始化数据
const init = (type, row,) => {
  dialogForm.value = true;
  // 根据type和row初始化表单数据
};

const close = () => {
  dialogForm.value = false;
};

defineExpose({init})
</script>

<style lang="scss" scoped>
.dialog {
  padding: 20px;

  :deep(.el-form-item__label) {
    background-color: #F7FAFB;
    padding: 0px 8px;
    color: #000;
    font-weight: 500;
    border: 1px solid #E3E7ED;
  }

  .head_box {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
  }
  .cntinfo{
    height: calc(100% - 70px);
    overflow: hidden;
    overflow-y: auto;
  }

  .form-row {
    display: flex;
    
    .el-form-item {
      flex: 1;
    }
  }

  .image-group {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
  
    
    .image-item {
      width: 150px;
      height: 150px;
      border: 1px solid #dcdfe6;
      
      .el-image {
        width: 100%;
        height: 100%;
      }
    }
  }

   ::v-deep .el-input__inner{
    height: 36px !important;
    line-height: 36px !important;
    border-radius: 0;
    color: #777575;
  }
}
.el-form-item--default{
  margin-bottom: 0px;
}
</style>