|
|
@ -6,6 +6,7 @@
|
|
|
|
--%>
|
|
|
|
--%>
|
|
|
|
<%@ page contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" %>
|
|
|
|
<%@ page contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" %>
|
|
|
|
<%@ taglib prefix="shiro" uri="http://shiro.apache.org/tags" %>
|
|
|
|
<%@ taglib prefix="shiro" uri="http://shiro.apache.org/tags" %>
|
|
|
|
|
|
|
|
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
|
|
|
|
<!DOCTYPE html>
|
|
|
|
<!DOCTYPE html>
|
|
|
|
<html>
|
|
|
|
<html>
|
|
|
|
<head>
|
|
|
|
<head>
|
|
|
@ -14,6 +15,8 @@
|
|
|
|
<script src="${pageContext.request.contextPath}/vue/vue@next/vue.global.js"></script>
|
|
|
|
<script src="${pageContext.request.contextPath}/vue/vue@next/vue.global.js"></script>
|
|
|
|
<!-- 导入组件库 -->
|
|
|
|
<!-- 导入组件库 -->
|
|
|
|
<script src="${pageContext.request.contextPath}/vue/element/index.full.js"></script>
|
|
|
|
<script src="${pageContext.request.contextPath}/vue/element/index.full.js"></script>
|
|
|
|
|
|
|
|
<script src="${pageContext.request.contextPath}/vue/axios/axios.js"></script>
|
|
|
|
|
|
|
|
<script src="${pageContext.request.contextPath}/vue/qs.min.js"></script>
|
|
|
|
<!-- 引入样式 -->
|
|
|
|
<!-- 引入样式 -->
|
|
|
|
<link rel="stylesheet" href="${pageContext.request.contextPath}/vue/font-awesome/css/font-awesome.css">
|
|
|
|
<link rel="stylesheet" href="${pageContext.request.contextPath}/vue/font-awesome/css/font-awesome.css">
|
|
|
|
<link rel="stylesheet" href="${pageContext.request.contextPath}/css/main.css">
|
|
|
|
<link rel="stylesheet" href="${pageContext.request.contextPath}/css/main.css">
|
|
|
@ -32,10 +35,37 @@
|
|
|
|
<%@ include file="/jsp/aside.html" %>
|
|
|
|
<%@ include file="/jsp/aside.html" %>
|
|
|
|
</el-aside>
|
|
|
|
</el-aside>
|
|
|
|
<el-main>
|
|
|
|
<el-main>
|
|
|
|
|
|
|
|
<el-dialog
|
|
|
|
|
|
|
|
v-model="dialogVisible"
|
|
|
|
|
|
|
|
title="选择老师"
|
|
|
|
|
|
|
|
width="50%"
|
|
|
|
|
|
|
|
>
|
|
|
|
|
|
|
|
<el-table :data="teacherListResultPagination" style="width: 100%">
|
|
|
|
|
|
|
|
<el-table-column prop="username" label="用户名"></el-table-column>
|
|
|
|
|
|
|
|
<el-table-column prop="realName" label="姓名"></el-table-column>
|
|
|
|
|
|
|
|
<el-table-column align="right">
|
|
|
|
|
|
|
|
<template #header>
|
|
|
|
|
|
|
|
<el-input v-model="keyWord" size="mini" placeholder="搜索姓名/用户名"></el-input>
|
|
|
|
|
|
|
|
</template>
|
|
|
|
|
|
|
|
<template #default="scope">
|
|
|
|
|
|
|
|
<el-button size="mini" @click="addTeacher(scope.row.userId)" type="primary">添加</el-button>
|
|
|
|
|
|
|
|
</template>
|
|
|
|
|
|
|
|
</el-table-column>
|
|
|
|
|
|
|
|
</el-table>
|
|
|
|
|
|
|
|
<el-pagination
|
|
|
|
|
|
|
|
background
|
|
|
|
|
|
|
|
layout="total, prev, pager, next"
|
|
|
|
|
|
|
|
:total="teacherListResult.length"
|
|
|
|
|
|
|
|
:page-size="5"
|
|
|
|
|
|
|
|
v-model:current-page="currentPage">
|
|
|
|
|
|
|
|
</el-pagination>
|
|
|
|
|
|
|
|
</el-dialog>
|
|
|
|
<el-page-header icon="el-icon-arrow-left" :content="title" @back="goBack"></el-page-header>
|
|
|
|
<el-page-header icon="el-icon-arrow-left" :content="title" @back="goBack"></el-page-header>
|
|
|
|
<br/>
|
|
|
|
<br/>
|
|
|
|
<div class="container modifyForm">
|
|
|
|
<div class="container">
|
|
|
|
<el-form ref="activity" :rules="rules" :model="form" style="width: 100%">
|
|
|
|
<el-divider content-position="left">编辑活动信息</el-divider>
|
|
|
|
|
|
|
|
<div class="modifyForm">
|
|
|
|
|
|
|
|
<el-form ref="form" :rules="rules" :model="activity" style="width: 100%" label-width="80px">
|
|
|
|
<el-form-item label="活动名称" prop="activityName">
|
|
|
|
<el-form-item label="活动名称" prop="activityName">
|
|
|
|
<el-input v-model="activity.activityName" autocomplete="off"></el-input>
|
|
|
|
<el-input v-model="activity.activityName" autocomplete="off"></el-input>
|
|
|
|
</el-form-item>
|
|
|
|
</el-form-item>
|
|
|
@ -48,6 +78,10 @@
|
|
|
|
<el-option label="暖心公益" value="暖心公益"></el-option>
|
|
|
|
<el-option label="暖心公益" value="暖心公益"></el-option>
|
|
|
|
</el-select>
|
|
|
|
</el-select>
|
|
|
|
</el-form-item>
|
|
|
|
</el-form-item>
|
|
|
|
|
|
|
|
<el-form-item label="负责老师">
|
|
|
|
|
|
|
|
<span v-for="i in activity.teachers">{{i.realName}} </span>
|
|
|
|
|
|
|
|
<el-button @click="dialogVisible=true" size="small" type="primary">添加</el-button>
|
|
|
|
|
|
|
|
</el-form-item>
|
|
|
|
<el-form-item label="参加人数">
|
|
|
|
<el-form-item label="参加人数">
|
|
|
|
<el-slider v-model="range" range :max="50" :min="1"> </el-slider>
|
|
|
|
<el-slider v-model="range" range :max="50" :min="1"> </el-slider>
|
|
|
|
</el-form-item>
|
|
|
|
</el-form-item>
|
|
|
@ -60,6 +94,34 @@
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</el-form>
|
|
|
|
</el-form>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<el-divider content-position="left">参加活动的小组</el-divider>
|
|
|
|
|
|
|
|
<div>
|
|
|
|
|
|
|
|
<el-collapse>
|
|
|
|
|
|
|
|
<el-collapse-item :name="item.groupId" v-for="item in groupList" style="width:100%">
|
|
|
|
|
|
|
|
<template #title>
|
|
|
|
|
|
|
|
<div class="group-list-top">
|
|
|
|
|
|
|
|
<div>
|
|
|
|
|
|
|
|
{{item.groupName}}-组长:{{item.leaderName}}, 组员数量:{{item.memberCount}}
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div>
|
|
|
|
|
|
|
|
<el-button type="primary" size="mini">管理该小组</el-button>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
</template>
|
|
|
|
|
|
|
|
<el-table :data="item.memberList" style="width: 100%" stripe>
|
|
|
|
|
|
|
|
<el-table-column prop="username" label="用户名"></el-table-column>
|
|
|
|
|
|
|
|
<el-table-column prop="realName" label="姓名"></el-table-column>
|
|
|
|
|
|
|
|
<el-table-column align="right" label="加入状态">
|
|
|
|
|
|
|
|
<template #default="scope">
|
|
|
|
|
|
|
|
<el-tag type="success" v-if="scope.row.isAccept">已通过</el-tag>
|
|
|
|
|
|
|
|
<el-tag type="info" v-if="!scope.row.isAccept">审核中</el-tag>
|
|
|
|
|
|
|
|
</template>
|
|
|
|
|
|
|
|
</el-table-column>
|
|
|
|
|
|
|
|
</el-table>
|
|
|
|
|
|
|
|
</el-collapse-item>
|
|
|
|
|
|
|
|
</el-collapse>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
</el-main>
|
|
|
|
</el-main>
|
|
|
|
</el-container>
|
|
|
|
</el-container>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
@ -79,6 +141,10 @@
|
|
|
|
avatarSrc: ''
|
|
|
|
avatarSrc: ''
|
|
|
|
},
|
|
|
|
},
|
|
|
|
range:[${activity.getMinPeople()},${activity.getMaxPeople()}],
|
|
|
|
range:[${activity.getMinPeople()},${activity.getMaxPeople()}],
|
|
|
|
|
|
|
|
loading:false,
|
|
|
|
|
|
|
|
dialogVisible:false,
|
|
|
|
|
|
|
|
currentPage:1,
|
|
|
|
|
|
|
|
keyWord:'',
|
|
|
|
activity:{
|
|
|
|
activity:{
|
|
|
|
activityId: '${activity.getActivityId()}',
|
|
|
|
activityId: '${activity.getActivityId()}',
|
|
|
|
activityName: '${activity.getActivityName()}',
|
|
|
|
activityName: '${activity.getActivityName()}',
|
|
|
@ -86,8 +152,49 @@
|
|
|
|
activityIntroduction:'${activity.getActivityIntroduction()}',
|
|
|
|
activityIntroduction:'${activity.getActivityIntroduction()}',
|
|
|
|
minPeople:${activity.getMinPeople()},
|
|
|
|
minPeople:${activity.getMinPeople()},
|
|
|
|
maxPeople:${activity.getMaxPeople()},
|
|
|
|
maxPeople:${activity.getMaxPeople()},
|
|
|
|
gmtCreate:'${activity.getFormattedCreateDate()}'
|
|
|
|
gmtCreate:'${activity.getFormattedCreateDate()}',
|
|
|
|
|
|
|
|
teachers:[
|
|
|
|
|
|
|
|
<c:forEach items="${activity.getTeacherList()}" var="teacher">
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
userId:'${teacher.getUserId()}',
|
|
|
|
|
|
|
|
username:'${teacher.getUsername()}',
|
|
|
|
|
|
|
|
realName:'${teacher.getRealName()}',
|
|
|
|
|
|
|
|
userPhone:'${teacher.getUserPhone()}',
|
|
|
|
|
|
|
|
avatarSrc:'${teacher.getAvatarSrc()}'
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
</c:forEach>
|
|
|
|
|
|
|
|
]
|
|
|
|
},
|
|
|
|
},
|
|
|
|
|
|
|
|
groupList: [
|
|
|
|
|
|
|
|
<c:forEach items="${groupList}" var="group">
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
groupId:'${group.getGroupId()}',
|
|
|
|
|
|
|
|
groupName:'${group.getGroupName()}',
|
|
|
|
|
|
|
|
leaderName:'${group.getLeaderName()}',
|
|
|
|
|
|
|
|
memberCount:'${group.getMemberCount()}',
|
|
|
|
|
|
|
|
memberList:[
|
|
|
|
|
|
|
|
<c:forEach items="${group.getMemberList()}" var="member">
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
participateId:'${member.getParticipationId()}',
|
|
|
|
|
|
|
|
userId:'${member.getUserId()}',
|
|
|
|
|
|
|
|
username:'${member.getUsername()}',
|
|
|
|
|
|
|
|
realName:'${member.getRealName()}',
|
|
|
|
|
|
|
|
isAccept:${member.getAccept()}
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
</c:forEach>
|
|
|
|
|
|
|
|
]
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
</c:forEach>
|
|
|
|
|
|
|
|
],
|
|
|
|
|
|
|
|
teacherList:[
|
|
|
|
|
|
|
|
<c:forEach items="${teacherList}" var="teacher">
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
userId:'${teacher.getUserId()}',
|
|
|
|
|
|
|
|
username:'${teacher.getUsername()}',
|
|
|
|
|
|
|
|
realName:'${teacher.getRealName()}',
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
</c:forEach>
|
|
|
|
|
|
|
|
],
|
|
|
|
rules: {
|
|
|
|
rules: {
|
|
|
|
activityName: [
|
|
|
|
activityName: [
|
|
|
|
{ required: true, message: '请填写活动名称', trigger: 'blur' }
|
|
|
|
{ required: true, message: '请填写活动名称', trigger: 'blur' }
|
|
|
@ -107,6 +214,24 @@
|
|
|
|
this.user.username='${username}'
|
|
|
|
this.user.username='${username}'
|
|
|
|
this.user.avatarSrc='${avatarSrc}'
|
|
|
|
this.user.avatarSrc='${avatarSrc}'
|
|
|
|
},
|
|
|
|
},
|
|
|
|
|
|
|
|
computed:{
|
|
|
|
|
|
|
|
teacherListResult:function (){
|
|
|
|
|
|
|
|
let result=[];
|
|
|
|
|
|
|
|
for(let i=0;i<this.teacherList.length;i++)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
let str=this.teacherList[i].realName
|
|
|
|
|
|
|
|
let str1=this.teacherList[i].username
|
|
|
|
|
|
|
|
if(str.search(this.keyWord)!==-1||str1.search(this.keyWord)!==-1)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
result.push(this.teacherList[i]);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
return result;
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
teacherListResultPagination:function (){
|
|
|
|
|
|
|
|
return this.teacherListResult.slice((this.currentPage-1)*5,this.currentPage*5)
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
},
|
|
|
|
methods: {
|
|
|
|
methods: {
|
|
|
|
goBack(){
|
|
|
|
goBack(){
|
|
|
|
window.history.go(-1);
|
|
|
|
window.history.go(-1);
|
|
|
@ -115,11 +240,11 @@
|
|
|
|
this.$refs[name].validate((valid) => {
|
|
|
|
this.$refs[name].validate((valid) => {
|
|
|
|
if (valid) {
|
|
|
|
if (valid) {
|
|
|
|
this.loading=true
|
|
|
|
this.loading=true
|
|
|
|
this.form.minPeople=this.range[0]
|
|
|
|
this.activity.minPeople=this.range[0]
|
|
|
|
this.form.maxPeople=this.range[1]
|
|
|
|
this.activity.maxPeople=this.range[1]
|
|
|
|
axios({
|
|
|
|
axios({
|
|
|
|
method: "post",
|
|
|
|
method: "post",
|
|
|
|
url: "/teacher/modifyActivity",
|
|
|
|
url: "/teacher/updateActivity",
|
|
|
|
data: this.activity,
|
|
|
|
data: this.activity,
|
|
|
|
transformRequest: [ function(data){
|
|
|
|
transformRequest: [ function(data){
|
|
|
|
return Qs.stringify(data) //使用Qs将请求参数序列化
|
|
|
|
return Qs.stringify(data) //使用Qs将请求参数序列化
|
|
|
@ -142,6 +267,37 @@
|
|
|
|
}
|
|
|
|
}
|
|
|
|
})
|
|
|
|
})
|
|
|
|
},
|
|
|
|
},
|
|
|
|
|
|
|
|
addTeacher(id){
|
|
|
|
|
|
|
|
this.$messageBox.confirm(
|
|
|
|
|
|
|
|
'确认要添加改老师为负责老师吗,该老师将拥有与你相同的权限?',
|
|
|
|
|
|
|
|
'警告',
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
confirmButtonText: '确认',
|
|
|
|
|
|
|
|
cancelButtonText: '取消',
|
|
|
|
|
|
|
|
type: 'warning',
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
)
|
|
|
|
|
|
|
|
.then(() => {
|
|
|
|
|
|
|
|
axios({
|
|
|
|
|
|
|
|
method: "get",
|
|
|
|
|
|
|
|
url: "/teacher/addTeacherToActivity?userId="+id+"&activityId="+this.activity.activityId,
|
|
|
|
|
|
|
|
}).then(res=>{
|
|
|
|
|
|
|
|
this.loading=false
|
|
|
|
|
|
|
|
if(res.data==="error")
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
this.$message.error('添加失败!')
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
else if(res.data==="exist")
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
this.$message.error('该老师已经是负责老师!')
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
else
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
location.reload()
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
})
|
|
|
|
|
|
|
|
})
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
};
|
|
|
|
};
|
|
|
|
const app = Vue.createApp(App);
|
|
|
|
const app = Vue.createApp(App);
|
|
|
|