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