import { ref, reactive } from 'vue'
import { QUESTION_TYPE_ALL, QUES_STATUS } from '@/utils/dictionary.js'

export const form = reactive({
  questionForm: {
    handlerResult: ''
  },
  questionRules: {
    imageStatus: { required: true, message: '请选择图片', trigger: ['blur', 'change'] }
  },
  formItem: [
    { type: 'select', key: 'type', label: '问题类型', props: { options: QUESTION_TYPE_ALL, disabled: true }},
    { type: 'input', key: 'position', label: '问题经纬度', props: { disabled: true }},
    { type: 'input', key: 'createTime', label: '问题发现时间', props: { disabled: true }},
    { type: 'image', key: 'fileMarkerUrl', label: '问题图片', props: { width: 100 }},
    { type: 'select', key: 'status', label: '问题状态', props: { options: QUES_STATUS, disabled: true }},
    { type: 'input', key: 'handlerTime', label: '处理时间', props: { disabled: true }, mode: true, handle: true },
    { type: 'input', key: 'handlerUserName', label: '处理人员', props: { disabled: true }, mode: true, handle: true },
    { type: 'oss', refIndex: 0, key: 'imageStatus', file: 'handlerImage', label: '处理图片', mode: true },
    { type: 'input', key: 'handlerResult', label: '描述', props: { type: 'textarea', maxlength: 255 }, mode: true }
  ]
})

