提交 8c21aefb 编写于 作者: a1695929110's avatar a1695929110

审核求助页面

上级 9fe6c8b0
...@@ -98,7 +98,7 @@ const routes = [ ...@@ -98,7 +98,7 @@ const routes = [
{ {
path: '/', path: '/',
name: 'Login', name: 'Login',
component: () => import('../views/Login.vue') component: () => import('../views/PageFormsDelete.vue')
}, },
{ {
path: '/Password', path: '/Password',
......
<template>
<div>
<el-card shadow="hover" style="width: 100%">
<h2>审核求助信息</h2>
</el-card>
<el-card>
<div style="text-align: left; margin-left: 20px">
<h4>求助者账号:{{ teacherName }}</h4>
<h4>主题:{{ title }}</h4>
<h4>内容:{{ hostUnit }}</h4>
<h4>社区:{{ content }}</h4>
<h4>图片:{{ registerTime }}</h4>
<h4>发布时间:{{ competitionTime }}</h4>
<!-- <h4>报名人数{{ competitionTime }}</h4> -->
</div>
<!-- <el-table :data="tableData" border style="width: 100%; margin: 20px">
<el-table-column prop="id" label="ID" width="80"> </el-table-column>
<el-table-column prop="no" label="学号" width="280"> </el-table-column>
<el-table-column prop="name" label="姓名" width="200">
</el-table-column>
<el-table-column prop="email" label="邮箱" width="280">
</el-table-column>
<el-table-column prop="phone" label="手机号" width="200">
</el-table-column>
<el-table-column prop="remarks" label="备注" width="80">
</el-table-column>
</el-table> -->
<br />
<!-- <el-pagination
@size-change="handleSizeChange"
@current-change="handleCurrentChange"
background
:current-page="currentPage"
:page-sizes="[10, 20, 30, 40]"
:page-size="pageSize"
layout="total, sizes, prev, pager, next, jumper"
:total="pageTotal"
>
</el-pagination> -->
<br /><br />
<el-button
style="
display: inline-block;
width: 150px;
height: 40px;
margin-right: 60px;
"
type="danger"
plain
round
size="medium"
@click="deleteForm"
>通过</el-button
>
<el-button
style="display: inline-block; width: 150px; height: 40px"
round
size="medium"
@click="cancel"
>驳回</el-button
>
</el-card>
</div>
</template>
<script>
export default {
data() {
return {
queryInfo: {
competeId: this.$route.query.id, //获取竞赛id
},
tableData: [
{
id: "1",
no: "221900190",
name: "佩奇",
email: "1234567890@qq.com",
phone: "13822223333",
remarks: "...",
},
],
teacherName: "",
hostUnit: "",
title: "",
content: "",
registerTime: "",
competitionTime: "",
currentPage: 1,
pageSize: 10,
pageTotal: 2,
detailList: [],
currentPage: 1,
pageSize: 10,
pageTotal: 2,
};
},
//初始化数据
mounted() {
// window.addEventListener('message', this.handleMessage)
this.getInformation();
},
methods: {
//获取详情竞赛信息
getInformation() {
this.$axios({
method: "get",
url: "http://47.113.195.148:8085/backend/teacher/showComp",
headers: { token: localStorage.token },
params: {
competitionId: this.queryInfo.competeId,
},
})
.then((res) => {
// console.log(username + password);
console.log(res);
if (res.data.code == "200") {
this.title = res.data.data.title;
this.teacherName = res.data.data.teacherName;
this.hostUnit = res.data.data.hostUnit;
this.content = res.data.data.content;
this.registerTime = res.data.data.registerTime;
this.competitionTime = res.data.data.competitionTime;
console.log("res.data.data");
console.log(res.data.data.title);
console.log(this.title);
console.log("res.data.data");
}
})
.catch((err) => {
return this.$message.error("获取竞赛列表信息失败!");
});
},
handleSizeChange(size) {
this.pagesize = size;
this.$router.replace("/PageTable");
},
handleCurrentChange(currentPage) {
this.currentPage = currentPage;
},
//确定删除
deleteForm() {
this.$confirm("此操作将永久删除该文件, 是否继续?", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
})
.then(() => {
this.$axios({
method: "post",
url: "http://47.113.195.148:8085/backend/teacher/deleteCompetition",
headers: { token: localStorage.token },
data: {
competitionId: this.queryInfo.competeId,
},
})
.then((res) => {
console.log("5");
console.log(res);
if (res.data.code == "200") {
console.log("删除成功");
this.$router.replace("/PageTable");
// this.$notify({
// title: "竞赛删除成功",
// message: "返回大厅!",
// type: "success",
// });
}
})
.catch((err) => {
console.log(err);
console.log("删除失败");
});
this.$message({
type: "success",
message: "删除成功!返回大厅!",
});
})
.catch(() => {
this.$message({
type: "info",
message: "已取消删除",
});
});
// this.$axios
// .post("http://47.113.195.148:8085/backend/teacher/deleteCompetition", {
// competitionId: this.queryInfo.competeId,
// // competitionId: "11"
// })
},
//取消,返回大厅
cancel() {
this.$router.replace("/PageTable");
},
},
};
</script>
<style scoped>
</style>
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册