fix: question.vue 修改上传word
This commit is contained in:
parent
6f62895a2a
commit
78538992f3
File diff suppressed because one or more lines are too long
|
@ -33,10 +33,45 @@
|
|||
<el-button size="small" type="primary" @click="popovervisible = false">上传导入</el-button>
|
||||
</el-upload>
|
||||
</div>
|
||||
|
||||
<el-button slot="reference">Excel导入</el-button>
|
||||
</el-popover>
|
||||
<el-button type="primary" icon="el-icon-download" @click="exportQuestions">导出Excel</el-button>
|
||||
<el-button type="primary" v-if="checkPermission(['question_import'])" icon="el-icon-download" @click="handleImport">导入word</el-button>
|
||||
<el-dialog
|
||||
:visible.sync="impDialogVisible"
|
||||
title="上传试题"
|
||||
:left="'200px'"
|
||||
:close-on-click-modal="false"
|
||||
:height="'600px'"
|
||||
>
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-select v-model="impForm.question_type" style="margin-right: 10px;" placeholder="题目分类">
|
||||
<el-option
|
||||
v-for="item in questioncatData"
|
||||
:key="item.id"
|
||||
:label="item.name"
|
||||
:value="item.name">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-col>
|
||||
<el-upload
|
||||
:action="upUrl"
|
||||
:on-success="handleUploadSuccess"
|
||||
:on-remove="handleRemove"
|
||||
:headers="upHeaders"
|
||||
:limit="1"
|
||||
accept=".doc,.docx">
|
||||
<el-col :span="12">
|
||||
<el-button icon="el-icon-plus" type="primary" style="margin-right: 10px;">上传试题</el-button>
|
||||
</el-col>
|
||||
</el-upload>
|
||||
</el-row>
|
||||
<div style="text-align: right">
|
||||
<el-button type="danger" @click="impDialogVisible=false">取消</el-button>
|
||||
<el-button type="primary" @click="impDialogVisible=false">确认</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
<el-button type="danger" v-if="checkPermission(['question_batch_delete'])" :disabled="this.selects.length==0" @click="batchDelete()">批量删除</el-button>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -196,6 +231,9 @@ export default {
|
|||
this.questioncatData = response.data.results;
|
||||
});
|
||||
},
|
||||
handleImport(){
|
||||
this.impDialogVisible = true;
|
||||
},
|
||||
handleFilter() {
|
||||
this.listQuery.page = 1;
|
||||
this.getList();
|
||||
|
|
|
@ -128,10 +128,10 @@
|
|||
</el-col>
|
||||
</el-upload>
|
||||
</el-row>
|
||||
<div style="text-align: right">
|
||||
<el-button type="danger" @click="impDialogVisible=false">取消</el-button>
|
||||
<el-button type="primary" @click="impDialogVisible=false">确认</el-button>
|
||||
</div>
|
||||
<div style="text-align: right">
|
||||
<el-button type="danger" @click="impDialogVisible=false">取消</el-button>
|
||||
<el-button type="primary" @click="impDialogVisible=false">确认</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
</div>
|
||||
<draggable v-model="questions">
|
||||
|
|
Loading…
Reference in New Issue