<template>
  <div>
       <el-form size="small" label-width="100px">
         <el-form-item label="名称">
           <el-input placeholder="作业的名称(限50字以内)" show-word-limit maxlength="50" v-model="homework.info.name"></el-input>
         </el-form-item>
         <el-form-item label="内容">
           <el-input type="textarea" rows="5" v-model="homework.info.content" placeholder="内容换成富文编辑框(限255字以内)" show-word-limit maxlength="255"></el-input>
         </el-form-item>
         <el-form-item label="附件">
           <file-upload dir="files" :isShowTip="false" @success="uploadHomeworkFile" @remove="removeHomeworkFile"></file-upload>
         </el-form-item>
         <el-form-item label="截止时间">
           <el-date-picker v-model="homework.info.deadTime" value-format="yyyy-MM-dd HH:mm:ss" type="datetime" placeholder="选择日期时间"></el-date-picker>
         </el-form-item>
         <el-form-item label="提交模式">
           <el-radio-group v-model="homework.info.submitMode">
               <el-radio :label="1">附件文档</el-radio>
               <el-radio :label="2">在线填写</el-radio>
               <el-radio :label="3">前两种任选</el-radio>
           </el-radio-group>
         </el-form-item>
       </el-form>
  </div>
</template>

<script>
  export default{
    data(){
      return {
        homework:{
          show:1,
          dtime:'',
          info:{
            answerType:'',
            name:'',
            content:'',
            files:''
          }
        },
      }
    },
    methods:{
      changeHomeworkShow(idx){
        this.homework.show=idx;
      }
    }
  }
</script>

<style>
</style>
