mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/learning-system-portal.git
synced 2025-12-11 03:46:44 +08:00
导出新增不能重复点击
This commit is contained in:
@@ -292,7 +292,7 @@
|
|||||||
<el-form-item>
|
<el-form-item>
|
||||||
<el-button type="primary" @click="studyContentRecords">搜索</el-button>
|
<el-button type="primary" @click="studyContentRecords">搜索</el-button>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-button v-if="isHomeWork" style="padding:10px 15px;margin-bottom: 10px;" type="primary" @click="downLoad">导出全部作业</el-button>
|
<el-button v-if="isHomeWork" :disabled="isTrue" style="padding:10px 15px;margin-bottom: 10px;" type="primary" @click="downLoad">导出全部作业</el-button>
|
||||||
</el-form>
|
</el-form>
|
||||||
<el-table max-height="500" border :data="learningSituation.list" style="width: 100%">
|
<el-table max-height="500" border :data="learningSituation.list" style="width: 100%">
|
||||||
<el-table-column prop="aname" label="姓名" width="180"></el-table-column>
|
<el-table-column prop="aname" label="姓名" width="180"></el-table-column>
|
||||||
@@ -354,6 +354,7 @@ export default {
|
|||||||
downParams: {},
|
downParams: {},
|
||||||
typePress: false,
|
typePress: false,
|
||||||
isHomeWork: false,
|
isHomeWork: false,
|
||||||
|
isTrue: false,
|
||||||
catalogRecordTree:[],
|
catalogRecordTree:[],
|
||||||
catalogRecordList:[],
|
catalogRecordList:[],
|
||||||
resOwnerListMap:[],
|
resOwnerListMap:[],
|
||||||
@@ -510,6 +511,7 @@ export default {
|
|||||||
this.$message.warning('当前暂无数据');
|
this.$message.warning('当前暂无数据');
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
this.isTrue = true;
|
||||||
let params = {
|
let params = {
|
||||||
courseName:this.manageStudyData.name,
|
courseName:this.manageStudyData.name,
|
||||||
courseId: this.manageStudyData.id,
|
courseId: this.manageStudyData.id,
|
||||||
@@ -534,6 +536,7 @@ export default {
|
|||||||
headers: { 'X-Access-Token': getToken() }
|
headers: { 'X-Access-Token': getToken() }
|
||||||
}).then((response) => {
|
}).then((response) => {
|
||||||
if (response.status === 200) {
|
if (response.status === 200) {
|
||||||
|
this.isTrue = false;
|
||||||
if (!(response.headers['content-type']).startsWith('application/json')) {
|
if (!(response.headers['content-type']).startsWith('application/json')) {
|
||||||
this.resolveBlob(response, 'application/zip', `${params.courseName}【作业】`);
|
this.resolveBlob(response, 'application/zip', `${params.courseName}【作业】`);
|
||||||
} else {
|
} else {
|
||||||
@@ -547,6 +550,7 @@ export default {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}).catch((error) => {
|
}).catch((error) => {
|
||||||
|
this.isTrue = false;
|
||||||
// 错误处理
|
// 错误处理
|
||||||
console.log(error);
|
console.log(error);
|
||||||
this.$message.error(error.data ? error.data.message : error.toString());
|
this.$message.error(error.data ? error.data.message : error.toString());
|
||||||
|
|||||||
Reference in New Issue
Block a user