<template>
  <el-dialog :title="dialogTitle" v-model="dialogVisible" width="800px" :before-close="dialogBeforeClose">
    <div style="height: 600px;padding: 20px;overflow-y: auto;">
      <el-form ref="formRef" class="el-submit-form" :model="formData" label-width="6.6em" :inline="false">
        <el-form-item label="是否通过">
          <el-radio-group v-model="formData.type">
            <el-radio :key="1" :label="'01'">通过</el-radio>
            <el-radio :key="2" :label="'02'">不通过</el-radio>
          </el-radio-group>
        </el-form-item>
        <el-form-item label="不通过原因">
          <el-input style="width:100%" type="textarea" v-model="formData.desc" placeholder="请输入原因" />
        </el-form-item>
      </el-form>
    </div>
    <div slot="footer">
      <div style="display: flex;justify-content: center;">
        <el-button type="primary" @click="close">保存</el-button>
        <!-- <el-button type="danger" @click="close">不通过</el-button> -->
        <el-button @click="close">关闭</el-button>
      </div>
    </div>
  </el-dialog>
</template>

<script setup>
import { ref, defineProps, defineEmits } from 'vue';
import { getItem, setItem } from "@/utils/storage"
const props = defineProps({
  title: {
    type: String,
    default: 'Audit Timeline'
  },
  years: {
    type: String,
    default: ''
  },
});
const emits = defineEmits(['close']);

const formRef = ref(null);
const formData = ref({
  years: '',
  type: '01',
  desc: ''
});
const dialogTitle = ref('审核进度');

const dialogVisible = ref(true)

const dialogBeforeClose = () => {
  emits('close')
}
const close = () => {
  emits('close')
}
</script>

<style scoped>
.el-submit-form {
    display: block;
}
</style>
