<template>
  <div :class="classes">
    <div class="card-head-title">
      <h1 v-for="(t, tindex) in titles" :key="tindex">
        {{ t }}
      </h1>
    </div>
    <div class="card-head-info">
      <div v-for="(info, index) in fields" :key="index" class="info-item">
        <span>{{ info }}</span>
        <span>：</span>
        <span></span>
      </div>
    </div>

    <div class="card-head-notice">
      <h4>注意事项：</h4>
      <div
        v-for="(cont, index) in notices"
        :key="index"
        class="card-head-notice-cont"
      >
        <span>{{ index + 1 }}、</span>
        <span>{{ cont }}</span>
      </div>
    </div>
    <div class="card-head-dynamic">
      <p><span>正确填涂：</span><i></i></p>
      <p>
        <span>错误填涂：</span>
        <i>√</i>
        <i>×</i>
        <i></i>
        <i></i>
      </p>
    </div>
  </div>
</template>

<script>
/**
 * TODO:默认MODEL_ONE,后续扩展其他类型
 */
export default {
  name: "CardHead",
  props: {
    data: {
      type: Object,
      default() {
        return {};
      },
    },
  },
  data() {
    return {
      fields: ["招生单位代码及名称", "考试科目代码及名称"],
    };
  },
  computed: {
    classes() {
      return ["page-element", "card-head"];
    },
    notices() {
      return this.data.attention.split("\n") || [];
    },
    titles() {
      return this.data.title.split("\n") || [];
    },
  },
  methods: {},
};
</script>
