/*
 *    Copyright (c) 2018-2025, lengleng All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions are met:
 *
 * Redistributions of source code must retain the above copyright notice,
 * this list of conditions and the following disclaimer.
 * Redistributions in binary form must reproduce the above copyright
 * notice, this list of conditions and the following disclaimer in the
 * documentation and/or other materials provided with the distribution.
 * Neither the name of the pig4cloud.com developer nor the names of its
 * contributors may be used to endorse or promote products derived from
 * this software without specific prior written permission.
 * Author: lengleng (493840844@qq.com)
 */

const DICT_SUB_TYPE=[
  {label:'选择题',value:'0'},
  {label:'判断题',value:'1'}
]
const DICT_SUB_CATE=[
  {label:'单选',value:'0'},
  {label:'多选',value:'1'}
]

export const tableOption = {
  border: true,
  index: true,
  indexLabel: '序号',
  stripe: true,
  menuAlign: 'center',
  align: 'center',
  editBtn: false,
  delBtn: false,
  addBtn: false,
  dialogHeight:768,
  dialogDrag:true,
  top:1,
  column: [
	  {
      label: '题目',
      prop: 'subjectTitle',
      type:'textarea',
      rules: [{
        required: true,
        message: '请填写题目'
      }]
    },
    {
      label: '解析',
      prop: 'subDesc',
      type:'textarea',
      hide:true
    },
    // {
    //   label: '图片',
    //   prop: 'pic',
    //   formslot:true,
    //   slot:true
    // },
	  {
      label: '分数',
      prop: 'score',
      type:'number',
        rules: [{
          required: true,
          message: '请填写分数'
        }]
    },
	  // {
    //   label: '类别',
    //   prop: 'type',
    //   type:'radio',
    //   dicData:DICT_SUB_TYPE,
    //   search:true,
    //     rules: [{
    //       required: true,
    //       message: '请选择类别'
    //     }]
    // },
	  {
      label: '类型',
      prop: 'cate',
        type:'radio',
      dicData:DICT_SUB_CATE,
      search:true,
        display:false
    },
    {
      label: '选项',
      prop: 'options',
      span:24,
      hide:true,
      formslot:true,
    },
    {
      label: '答案',
      prop: 'answer',
      hide:true,
      span:24,
      formslot:true,
    },
      {
          label: '创建时间',
          prop: 'createTime',
          addDisplay:false,
          editDisabled:true
      },
  ]
}
