|
@@ -78,6 +78,13 @@
|
|
|
type="primary"
|
|
|
size="small"
|
|
|
>查看</el-button
|
|
|
+ >
|
|
|
+
|
|
|
+ <el-button
|
|
|
+ @click="delTest(scope.row.id)"
|
|
|
+ type="primary"
|
|
|
+ size="small"
|
|
|
+ >删除</el-button
|
|
|
>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
@@ -187,6 +194,33 @@ export default {
|
|
|
this.role
|
|
|
);
|
|
|
},
|
|
|
+ delTest(tid){
|
|
|
+ let _this = this
|
|
|
+ _this
|
|
|
+ .$confirm("确定删除此提交的表单么?", "提示", {
|
|
|
+ confirmButtonText: "确定",
|
|
|
+ cancelButtonText: "取消",
|
|
|
+ type: "warning",
|
|
|
+ })
|
|
|
+ .then(() => {
|
|
|
+ let params = [{
|
|
|
+ tid: tid,
|
|
|
+ }];
|
|
|
+ _this.ajax
|
|
|
+ .post(_this.$store.state.api + "deleteTestCourseWorks", params)
|
|
|
+ .then((res) => {
|
|
|
+ _this.$message.success("删除成功");
|
|
|
+ _this.getData();
|
|
|
+
|
|
|
+ })
|
|
|
+ .catch((err) => {
|
|
|
+ console.error(err);
|
|
|
+ });
|
|
|
+ })
|
|
|
+ .catch(() => {
|
|
|
+ return;
|
|
|
+ });
|
|
|
+ },
|
|
|
getData() {
|
|
|
this.isLoading = true;
|
|
|
let params = {
|