import { ref } from "vue"


export const questionFormItemList = ref([
    {
        key: 'questionTitleName',
        label: '题目',
        type: 'input',
        placeholder: '请输入题目',
        rules: [
            {
                required:true,
                message:'请填写信息',
                trigger:'blur'
            }
        ],
        hidden: false,
        disabled: false,
        custom: false,
        style: {},
        className: 'percent_70'
    },
    {
        key: 'questionScore',
        label: '题目分值',
        type: 'number',
        placeholder: '请输入分值',
        rules: [
            {required:true,message:'请填写信息', trigger:'blur' },
            // {
            //     // 核心校验逻辑：允许整数或最多两位小数的数字
            //     pattern: /^\d+(\.\d{1,2})?$/,
            //     message: '请输入有效的数值，且最多保留两位小数',
            //     trigger: 'blur'
            // }
        ],
        style: {marginRight:'40px'},
        className: 'percent_30'
    },
    {
        key: 'questionType',
        label: '类型',
        type: 'select',
        selectList: [],
        placeholder: '',
        rules: [
            {
                required:true,
                message:'请填写信息',
                trigger:'blur'
            }
        ],
        style: {},
        custom:true,
        className: 'custom_itm'
    },

    {
        // 评价题字段（分制，0-数字制，1-星标制）
        key: 'evaluationType',
        label: '分制',
        type: 'radio',
        selectList: [],
        rules: [
            {
                required:true,
                message:'请填写信息',
                trigger:'blur'
            }
        ],
        style: {},
        custom:true,
        className: 'custom_itm',
        hidden:true,
    },
    {
        key: 'options',
        label: '',
        type: 'input',
        rules: [],
        className:'custom_itm',
        custom: true,
        hidden:false
    }
])

export const questionnaireBaseForm = ref([
     {
        key: 'assessmentTitle',
        label: '问卷标题',
        type: 'input',
        placeholder: '请输入问卷标题（限40字）',
        rules: [
            {
                required:true,
                message:'请输入问卷标题',
                trigger:'blur'
            }
        ],
        hidden: false,
        disabled: false,
        custom: false,
        style: {},
    },
    {
        key: 'assessmentIllustrate',
        label: '问卷说明',
        type: 'input',
        placeholder: '请输入问卷说明（限100字）',
        rules: [],
        hidden: false,
        disabled: false,
        custom: false,
        style: {},
    },

])