<template>
  <div>
    <el-dialog
      append-to-body
      :close-on-click-modal="false"
      :visible.sync="dialogConfig.show"
      title="消息详情"
      width="720px"
    >
      <el-form ref="form" :model="dialogConfig.msgData" size="small" label-width="100px">
        <el-row>
          <el-col :span="12">
            <el-form-item label="报警时间">
              <el-input v-model="dialogConfig.msgData.baseCreateTime" disabled />
            </el-form-item>
          </el-col>
          <el-col :span="12">
            <el-form-item label="报警类型">
              <el-input v-model="dialogConfig.msgData.type" disabled />
            </el-form-item>
          </el-col>
        </el-row>

        <el-row>
          <el-col :span="12">
            <el-form-item label="是否处理">
              <el-input v-model="dialogConfig.msgData.read" disabled />
            </el-form-item>
          </el-col>
          <el-col :span="12" v-if="dialogConfig.msgData.read === 1">
            <el-form-item label="处理时间">
              <el-input v-model="dialogConfig.msgData.baseModifyTime" disabled />
            </el-form-item>
          </el-col>
        </el-row>

        <el-form-item label="报警内容">
          <el-input type="textarea" :row="2" v-model="dialogConfig.msgData.content" disabled />
        </el-form-item>
        <el-form-item label="处理意见">
          <el-input
            type="textarea"
            :row="3"
            v-model="dialogConfig.msgData.dealContent"
            :disabled="dialogConfig.msgData.dealStatus === 0"
          />
        </el-form-item>
        <!-- <el-form-item label="报警图片" v-if="dialogConfig.msgData.imageUrl">
          <el-image
            fit="contain"
            :src="`${BASE_URL}${dialogConfig.msgData.imageUrl.replace('\/\/', '/')}`"
            :preview-src-list="[`${BASE_URL}${dialogConfig.msgData.imageUrl.replace('\/\/', '/')}`]"
          />
        </el-form-item> -->
      </el-form>
      <div slot="footer" class="dialog-footer">
        <el-button type="text" @click="dialogConfig.show = false">
          取消
        </el-button>
        <el-button :loading="loading" type="primary" @click="handleDeal">
          处理
        </el-button>
      </div>
    </el-dialog>
  </div>
</template>

<script>
export default {
  name: 'msgDetail',
  props: {
    dialogConfig: {
      type: Object,
      default: () => ({ show: true, msgData: {} })
    }
  },
  data() {
    return {
      loading: false
    }
  },
  methods: {
    handleDeal() {}
  }
}
</script>

<style></style>
