<template>
  <Dialog :is-dialog-exist="openStateDialog" :title="dialogTitle" :dialog-style="dialogStyle" @close-dialog="handleClose">
    <el-container>
      <el-main>
        <el-form ref="formData" :model="formData" label-width="auto">
          <el-form-item label="状态">
            <span :style="{color: realNameAuthSelectItem.idVerified === '3'? '#FF494A':'#FFBB00'}">● {{ realNameAuthSelectItem.idVerifiedText }}</span>
          </el-form-item>
          <el-form-item label="备注">
            <span style="color: #999999">无</span>
          </el-form-item>
        </el-form>
      </el-main>
      <el-footer>
        <el-button type="primary" @click="handleClose">确定</el-button>
      </el-footer>
    </el-container>
  </Dialog>
</template>

<script>
import Dialog from '@/components/Dialog/index'
export default {
  components: { Dialog },
  props: {
    // 接收行数据
    realNameAuthSelectItem: {
      type: Object,
      default: () => {}
    },
    // 弹窗控制参数
    openStateDialog: {
      type: Boolean,
      default: false
    },
    // 选中的数据
    selectItem: {
      type: Object,
      default: () => {}
    }
  },
  data() {
    return {
      // dialog标题
      dialogTitle: '状态详情',
      // dialog样式
      dialogStyle: {
        '--dialog-width': '490px',
        '--dialog-height': '244px',
        '--title-height': '51px'
      },
      // 提交参数
      formData: {
      }
    }
  },
  watch: {
    showDialog(val) {
      if (val) {
        this.initDataView()
      }
    }
  },
  methods: {
    // 关闭弹窗
    handleClose() {
      this.$emit('handle-close')
    },
    // 提交弹窗
    handleSuccess() {
      this.$emit('handle-success')
    },
    // 提交表单
    submitForm() {
      this.$refs.formData.validate(vaild => {
        if (vaild && this.customValidate()) {
          console.log('提交表单')
        }
      })
    },
    customValidate() {
    }
  }
}
</script>

<style lang="scss" scoped>
  .el-container {
    width: 100%;
    height: 100%;
    .el-main {
      height: 90%;
      width: 100%;
      display: flex;
      justify-content: center;
      align-items: center;
      margin-top: 20px;
    }
    .el-footer {
      height: 10%;
      width: 100%;
      display: flex;
      justify-content: center;
      align-items: center;
    }
  }
</style>
