<script setup lang="ts">
import ConfigViewTemplate from '../../ConfigViewTemplate.vue'

const role = inject('role') as string

defineProps<{ node: any }>()
</script>

<template>
  <ConfigViewTemplate :node="node">
    <div>
      <el-form-item :label="role === 'student' ? '我的答案' : '学生答案'"> </el-form-item>
      <template v-if="node.data?.student">
        <el-form-item label="时间判断类型">
          {{ node.data.student.date_type }}
        </el-form-item>
        <el-form-item label="进入该步骤的时间">
          <template v-if="node.data.student?.date_type === '0'">
            {{ node.data.student?.date_rule_name }}
            {{ node.data.student?.date }}
          </template>
          <template v-else>
            {{ node.data.student.week_name }}
          </template>
        </el-form-item>
      </template>
    </div>
    <div>
      <el-form-item label="正确答案"></el-form-item>
      <template v-if="node.data?.teacher">
        <el-form-item label="时间判断类型">
          {{ node.data.teacher.date_type_name }}
        </el-form-item>
        <el-form-item label="进入该步骤的时间">
          <template v-if="node.data.teacher?.date_type === '0'">
            {{ node.data.teacher.date_rule_name }}
            {{ node.data.teacher.date }}
          </template>
          <template v-else>
            {{ node.data.teacher.week_name }}
          </template>
        </el-form-item>
      </template>
    </div>
  </ConfigViewTemplate>
</template>
