任务管理
This commit is contained in:
		| @@ -52,8 +52,8 @@ | ||||
|                   </div> | ||||
|                 </el-form-item> | ||||
|                 <el-form-item label="调用内容" prop="fileList" style="width: 100%;" :rules="[{ required: true, message: '请上传发送内容', trigger: 'blur' }]"> | ||||
|                   <!-- <ai-uploader :instance="instance" fileType="file" v-model="form.fileList" :limit="9"></ai-uploader> --> | ||||
|                   <el-upload action="/" :on-change="onChange"  :auto-upload="false"  :show-file-list="false"  accept=".csv, .CSV" :limit="1"> | ||||
|                   <!-- <ai-uploader :instance="instance" fileType="file" v-model="form.fileList" :limit="1" @change="onChange" accept=".csv, .CSV"></ai-uploader> --> | ||||
|                   <el-upload action="/" :on-change="onChange" :on-remove="handleRemove" :auto-upload="false" accept=".csv, .CSV" :limit="1"> | ||||
|                     <el-button size="small" type="primary" class="upload-bom uploadBtn"> | ||||
|                       <span class="iconXlSX-sty-test">上传附件</span> | ||||
|                     </el-button> | ||||
| @@ -643,14 +643,13 @@ export default { | ||||
|     }, | ||||
|  | ||||
|     onChange(file, fileList) { | ||||
|       this.form.fileList = fileList | ||||
|       console.log(file, fileList); | ||||
|       var reader = new FileReader(); | ||||
|       if(typeof reader == 'undefined') { | ||||
|         this.$message.error("您的浏览器暂不支持该功能") | ||||
|         return; | ||||
|       } | ||||
|  | ||||
|        | ||||
|       reader.readAsText(file.raw, 'gbk') | ||||
|       reader.onload = (e) => { | ||||
|         var list = e.target.result.split('\r\n') | ||||
| @@ -659,10 +658,15 @@ export default { | ||||
|             this.fileContentList.push(item) | ||||
|           } | ||||
|         }) | ||||
|         console.log(this.fileContentList) | ||||
|         this.form.fileList = fileList | ||||
|       } | ||||
|     }, | ||||
|  | ||||
|     handleRemove(file, fileList) { | ||||
|       this.form.fileList = fileList | ||||
|       this.fileContentList = [] | ||||
|     }, | ||||
|  | ||||
|     cancel(isRefresh) { | ||||
|       this.$emit('change', { | ||||
|         type: 'TaskList', | ||||
|   | ||||
		Reference in New Issue
	
	Block a user