Commit f1b55bc6a4f6a59fce07d8f4fffc0f09c3a13817
1 parent
f552f352
删除添加loading,提示词颜色
Showing
1 changed file
with
9 additions
and
5 deletions
src/views/standard/test/index.vue
| @@ -122,9 +122,7 @@ | @@ -122,9 +122,7 @@ | ||
| 122 | style="margin-bottom: 20px" | 122 | style="margin-bottom: 20px" | 
| 123 | > | 123 | > | 
| 124 | <template v-for="(item, index) in tabList"> | 124 | <template v-for="(item, index) in tabList"> | 
| 125 | - <el-radio-button :key="index" :label="index + 1">{{ | ||
| 126 | - item | ||
| 127 | - }}</el-radio-button> | 125 | + <el-radio-button :label="index + 1">{{ item }}</el-radio-button> | 
| 128 | </template> | 126 | </template> | 
| 129 | </el-radio-group> | 127 | </el-radio-group> | 
| 130 | <div class="head-box" v-else> | 128 | <div class="head-box" v-else> | 
| @@ -376,6 +374,7 @@ | @@ -376,6 +374,7 @@ | ||
| 376 | circle | 374 | circle | 
| 377 | size="mini" | 375 | size="mini" | 
| 378 | icon="el-icon-delete" | 376 | icon="el-icon-delete" | 
| 377 | + :loading="scoped.row.loading" | ||
| 379 | ></el-button> | 378 | ></el-button> | 
| 380 | </el-popconfirm> | 379 | </el-popconfirm> | 
| 381 | </template> | 380 | </template> | 
| @@ -861,10 +860,11 @@ export default { | @@ -861,10 +860,11 @@ export default { | ||
| 861 | }, | 860 | }, | 
| 862 | //删除即时测考试 | 861 | //删除即时测考试 | 
| 863 | async removeReport(obj, index) { | 862 | async removeReport(obj, index) { | 
| 863 | + this.tableData[index].loading = true; | ||
| 864 | const { data, status, info } = await this.$request.deleteReport({ | 864 | const { data, status, info } = await this.$request.deleteReport({ | 
| 865 | id: obj.id, | 865 | id: obj.id, | 
| 866 | }); | 866 | }); | 
| 867 | - if (status == 200) { | 867 | + if (status === 0) { | 
| 868 | this.$message.success("删除成功!"); | 868 | this.$message.success("删除成功!"); | 
| 869 | this.tableData.splice(index, 1); | 869 | this.tableData.splice(index, 1); | 
| 870 | } else { | 870 | } else { | 
| @@ -1103,7 +1103,11 @@ export default { | @@ -1103,7 +1103,11 @@ export default { | ||
| 1103 | }); | 1103 | }); | 
| 1104 | this.loading = false; | 1104 | this.loading = false; | 
| 1105 | if (status === 0) { | 1105 | if (status === 0) { | 
| 1106 | - this.tableData = (data?.list && [...data?.list]) || []; | 1106 | + this.tableData = | 
| 1107 | + data?.list.map((item) => { | ||
| 1108 | + item.loading = false; | ||
| 1109 | + return item; | ||
| 1110 | + }) || []; | ||
| 1107 | this.total = data?.count || 0; | 1111 | this.total = data?.count || 0; | 
| 1108 | if (!query.classId) { | 1112 | if (!query.classId) { | 
| 1109 | //多班级 | 1113 | //多班级 | 
