|
@@ -3,7 +3,7 @@
|
|
* @Author: 旭颖
|
|
* @Author: 旭颖
|
|
* @Date: 2023-03-22 10:15:16
|
|
* @Date: 2023-03-22 10:15:16
|
|
* @LastEditors: Please set LastEditors
|
|
* @LastEditors: Please set LastEditors
|
|
- * @LastEditTime: 2023-03-24 19:15:30
|
|
|
|
|
|
+ * @LastEditTime: 2023-03-25 14:12:29
|
|
-->
|
|
-->
|
|
<template>
|
|
<template>
|
|
<div class="index-home" v-loading.fullscreen.lock="loadingFull">
|
|
<div class="index-home" v-loading.fullscreen.lock="loadingFull">
|
|
@@ -67,6 +67,13 @@
|
|
<el-button type="primary" size="mini" @click="lookDetail(row)"
|
|
<el-button type="primary" size="mini" @click="lookDetail(row)"
|
|
>查看</el-button
|
|
>查看</el-button
|
|
>
|
|
>
|
|
|
|
+ <el-button
|
|
|
|
+ v-if="is_student == true"
|
|
|
|
+ type="danger"
|
|
|
|
+ size="mini"
|
|
|
|
+ @click="handleDelete(row)"
|
|
|
|
+ >删除</el-button
|
|
|
|
+ >
|
|
</template>
|
|
</template>
|
|
</el-table-column>
|
|
</el-table-column>
|
|
</el-table>
|
|
</el-table>
|
|
@@ -77,7 +84,7 @@
|
|
</div>
|
|
</div>
|
|
</template>
|
|
</template>
|
|
<script>
|
|
<script>
|
|
-import { examineDetail, fileDetailStu } from "./api/index";
|
|
|
|
|
|
+import { examineDetail, fileDetailStu, deleteFile } from "./api/index";
|
|
import checkOut from "./components/checkOut";
|
|
import checkOut from "./components/checkOut";
|
|
import detail from "./components/detail";
|
|
import detail from "./components/detail";
|
|
export default {
|
|
export default {
|
|
@@ -96,6 +103,7 @@ export default {
|
|
loadingFull: true,
|
|
loadingFull: true,
|
|
tableData: [],
|
|
tableData: [],
|
|
examine_question_id: "",
|
|
examine_question_id: "",
|
|
|
|
+ is_student: false,
|
|
};
|
|
};
|
|
},
|
|
},
|
|
created() {
|
|
created() {
|
|
@@ -106,6 +114,10 @@ export default {
|
|
} else {
|
|
} else {
|
|
this.getList(route.id);
|
|
this.getList(route.id);
|
|
}
|
|
}
|
|
|
|
+ let roles = this.$store.state.user.roles;
|
|
|
|
+ if (roles.includes("Student")) {
|
|
|
|
+ this.is_student = true;
|
|
|
|
+ }
|
|
},
|
|
},
|
|
methods: {
|
|
methods: {
|
|
//审核
|
|
//审核
|
|
@@ -116,6 +128,25 @@ export default {
|
|
point: row.point,
|
|
point: row.point,
|
|
});
|
|
});
|
|
},
|
|
},
|
|
|
|
+ //单文件删除
|
|
|
|
+ handleDelete(row) {
|
|
|
|
+ this.$confirm("您确定要删除当前上传的文件吗?", "提示", {
|
|
|
|
+ confirmButtonText: "确定",
|
|
|
|
+ cancelButtonText: "取消",
|
|
|
|
+ type: "warning",
|
|
|
|
+ }).then(() => {
|
|
|
|
+ let route = this.$route.query;
|
|
|
|
+ const { message } = deleteFile({
|
|
|
|
+ id: row.examine.id,
|
|
|
|
+ examine_question_id: route.id,
|
|
|
|
+ staff_id: this.$store.state.user.staff_id,
|
|
|
|
+ });
|
|
|
|
+ this.$message({
|
|
|
|
+ type: "success",
|
|
|
|
+ message: message,
|
|
|
|
+ });
|
|
|
|
+ });
|
|
|
|
+ },
|
|
//查看详情
|
|
//查看详情
|
|
lookDetail(row) {
|
|
lookDetail(row) {
|
|
this.$refs["detail"].showEdit(row);
|
|
this.$refs["detail"].showEdit(row);
|