<template>
  <el-dialog v-model="visible" title="查看">
    <layout-risk-view :info="info">
      <el-descriptions-item label="是否生成新风险因素" :span="2">
        {{ info.IS_NEW === 1 ? "是" : "否" }}
      </el-descriptions-item>
      <el-descriptions-item label="风险成因" :span="2">
        {{ info.RISK_CAUSES }}
      </el-descriptions-item>
    </layout-risk-view>
    <template #footer>
      <el-button @click="visible = false">关闭</el-button>
    </template>
  </el-dialog>
</template>

<script setup>
import { useVModel } from "@vueuse/core";
import LayoutRiskView from "@/components/risk_view/index.vue";

const props = defineProps({
  visible: {
    type: Boolean,
    required: true,
    default: false,
  },
  info: {
    type: Object,
    required: true,
    default: () => ({}),
  },
});
const emits = defineEmits(["update:visible"]);
const visible = useVModel(props, "visible", emits);
</script>

<style scoped lang="scss"></style>
