|
|
|
@ -69,7 +69,6 @@ |
|
|
|
|
<el-button type="text" @click="edit(scope.row)" v-auth="'/quesBank/list:我上传的题库:修改'">修改</el-button> |
|
|
|
|
<el-button type="text" @click="delData(scope.row)" v-auth="'/quesBank/list:我上传的题库:删除'">删除</el-button> |
|
|
|
|
<el-button v-if="!scope.row.myShare" type="text" @click="share(scope.row)" v-auth="'/quesBank/list:我上传的题库:共享'">共享</el-button> |
|
|
|
|
<el-button v-else type="text" @click="cancelShare(scope.row)" v-auth="'/quesBank/list:我上传的题库:共享'">取消共享</el-button> |
|
|
|
|
</template> |
|
|
|
|
</el-table-column> |
|
|
|
|
</el-table> |
|
|
|
@ -91,6 +90,7 @@ |
|
|
|
|
<div style="text-align: center"> |
|
|
|
|
<div style="margin-bottom: 10px;"><el-button type="primary" @click="downLoad">模板下载<i class="el-icon-download el-icon--right"></i></el-button></div> |
|
|
|
|
<el-upload |
|
|
|
|
ref="upload" |
|
|
|
|
accept=".xls,.xlsx" |
|
|
|
|
:on-remove="handleRemove" |
|
|
|
|
:on-error="uploadError" |
|
|
|
@ -102,6 +102,7 @@ |
|
|
|
|
:file-list="uploadList" |
|
|
|
|
:data="{userId: this.userId}" |
|
|
|
|
name="file" |
|
|
|
|
:auto-upload="false" |
|
|
|
|
> |
|
|
|
|
<el-button type="primary" class="ml20">上传文件<i class="el-icon-upload2 el-icon--right"></i></el-button> |
|
|
|
|
</el-upload> |
|
|
|
@ -331,12 +332,16 @@ export default { |
|
|
|
|
uploadSuccess(res, file, fileList) { |
|
|
|
|
this.uploadFaild = false |
|
|
|
|
if(res.success){ |
|
|
|
|
if(res.data.data.token){ |
|
|
|
|
this.token = res.data.data.token |
|
|
|
|
this.uploadFaild = true |
|
|
|
|
}else{ |
|
|
|
|
// if(res.data.data.token){ |
|
|
|
|
// this.token = res.data.data.token |
|
|
|
|
// this.uploadFaild = true |
|
|
|
|
// }else{ |
|
|
|
|
this.$message.success('上传成功') |
|
|
|
|
} |
|
|
|
|
this.importVisible = false |
|
|
|
|
this.page = 1 |
|
|
|
|
this.keyword = '' |
|
|
|
|
this.getData() |
|
|
|
|
// } |
|
|
|
|
}else{ |
|
|
|
|
// res.message ? this.$message.error(res.message) : this.$message.error('上传失败,请检查数据') |
|
|
|
|
res.message && this.$message.error(res.message) |
|
|
|
@ -366,10 +371,7 @@ export default { |
|
|
|
|
this.uploadList = [] |
|
|
|
|
}, |
|
|
|
|
uploadSure(){ |
|
|
|
|
this.importVisible = false |
|
|
|
|
this.page = 1 |
|
|
|
|
this.keyword = '' |
|
|
|
|
this.getData() |
|
|
|
|
this.$refs.upload.submit() |
|
|
|
|
}, |
|
|
|
|
} |
|
|
|
|
}; |
|
|
|
|