权限控制

This commit is contained in:
13405411873 2024-09-12 17:28:52 +08:00
parent b867600c29
commit 6d2875feb0
6 changed files with 197 additions and 17 deletions

View File

@ -31,6 +31,180 @@ public class UeditorController {
@Autowired
private ICmsCategoryService categoryService;
private static String configJson = "{\n" +
" \"videoMaxSize\": 102400000,\n" +
" \"videoActionName\": \"uploadvideo\",\n" +
" \"fileActionName\": \"uploadfile\",\n" +
" \"fileManagerListPath\": \"file/\",\n" +
" \"imageCompressBorder\": 1600,\n" +
" \"imageManagerAllowFiles\": [\n" +
" \".png\",\n" +
" \".jpg\",\n" +
" \".jpeg\",\n" +
" \".gif\",\n" +
" \".bmp\"\n" +
" ],\n" +
" \"imageManagerListPath\": \"image/\",\n" +
" \"fileMaxSize\": 51200000,\n" +
" \"fileManagerAllowFiles\": [\n" +
" \".png\",\n" +
" \".jpg\",\n" +
" \".jpeg\",\n" +
" \".gif\",\n" +
" \".bmp\",\n" +
" \".flv\",\n" +
" \".swf\",\n" +
" \".mkv\",\n" +
" \".avi\",\n" +
" \".rm\",\n" +
" \".rmvb\",\n" +
" \".mpeg\",\n" +
" \".mpg\",\n" +
" \".ogg\",\n" +
" \".ogv\",\n" +
" \".mov\",\n" +
" \".wmv\",\n" +
" \".mp4\",\n" +
" \".webm\",\n" +
" \".mp3\",\n" +
" \".wav\",\n" +
" \".mid\",\n" +
" \".rar\",\n" +
" \".zip\",\n" +
" \".tar\",\n" +
" \".gz\",\n" +
" \".7z\",\n" +
" \".bz2\",\n" +
" \".cab\",\n" +
" \".iso\",\n" +
" \".doc\",\n" +
" \".docx\",\n" +
" \".xls\",\n" +
" \".xlsx\",\n" +
" \".ppt\",\n" +
" \".pptx\",\n" +
" \".pdf\",\n" +
" \".txt\",\n" +
" \".md\",\n" +
" \".xml\"\n" +
" ],\n" +
" \"fileManagerActionName\": \"listfile\",\n" +
" \"snapscreenInsertAlign\": \"none\",\n" +
" \"scrawlActionName\": \"uploadscrawl\",\n" +
" \"videoFieldName\": \"upfile\",\n" +
" \"imageCompressEnable\": true,\n" +
" \"videoUrlPrefix\": \"https://meevexp.oberyun.com/hgdWebsite\",\n" +
" \"fileManagerUrlPrefix\": \"https://meevexp.oberyun.com/hgdWebsite\",\n" +
" \"catcherAllowFiles\": [\n" +
" \".png\",\n" +
" \".jpg\",\n" +
" \".jpeg\",\n" +
" \".gif\",\n" +
" \".bmp\"\n" +
" ],\n" +
" \"imageManagerActionName\": \"listimage\",\n" +
" \"snapscreenPathFormat\": \"image/{yyyy}{mm}{dd}/{time}{rand:6}\",\n" +
" \"scrawlPathFormat\": \"image/{yyyy}{mm}{dd}/{time}{rand:6}\",\n" +
" \"scrawlMaxSize\": 2048000,\n" +
" \"imageInsertAlign\": \"none\",\n" +
" \"catcherPathFormat\": \"image/{yyyy}{mm}{dd}/{time}{rand:6}\",\n" +
" \"catcherMaxSize\": 2048000,\n" +
" \"snapscreenUrlPrefix\": \"\",\n" +
" \"imagePathFormat\": \"image/{yyyy}{mm}{dd}/{time}{rand:6}\",\n" +
" \"imageManagerUrlPrefix\": \"https://meevexp.oberyun.com/hgdWebsite\",\n" +
" \"scrawlUrlPrefix\": \"\",\n" +
" \"scrawlFieldName\": \"upfile\",\n" +
" \"imageMaxSize\": 2048000,\n" +
" \"imageAllowFiles\": [\n" +
" \".png\",\n" +
" \".jpg\",\n" +
" \".jpeg\",\n" +
" \".gif\",\n" +
" \".bmp\",\n" +
" \".webp\"\n" +
" ],\n" +
" \"snapscreenActionName\": \"uploadimage\",\n" +
" \"catcherActionName\": \"catchimage\",\n" +
" \"fileFieldName\": \"upfile\",\n" +
" \"fileUrlPrefix\": \"https://meevexp.oberyun.com/hgdWebsite\",\n" +
" \"imageManagerInsertAlign\": \"none\",\n" +
" \"catcherLocalDomain\": [\n" +
" \"127.0.0.1\",\n" +
" \"localhost\",\n" +
" \"img.baidu.com\"\n" +
" ],\n" +
" \"filePathFormat\": \"file/{yyyy}{mm}{dd}/{time}{rand:6}\",\n" +
" \"videoPathFormat\": \"video/{yyyy}{mm}{dd}/{time}{rand:6}\",\n" +
" \"fileManagerListSize\": 20,\n" +
" \"imageActionName\": \"uploadimage\",\n" +
" \"imageFieldName\": \"upfile\",\n" +
" \"imageUrlPrefix\": \"https://meevexp.oberyun.com/hgdWebsite\",\n" +
" \"scrawlInsertAlign\": \"none\",\n" +
" \"fileAllowFiles\": [\n" +
" \".png\",\n" +
" \".jpg\",\n" +
" \".jpeg\",\n" +
" \".gif\",\n" +
" \".bmp\",\n" +
" \".flv\",\n" +
" \".swf\",\n" +
" \".mkv\",\n" +
" \".avi\",\n" +
" \".rm\",\n" +
" \".rmvb\",\n" +
" \".mpeg\",\n" +
" \".mpg\",\n" +
" \".ogg\",\n" +
" \".ogv\",\n" +
" \".mov\",\n" +
" \".wmv\",\n" +
" \".mp4\",\n" +
" \".webm\",\n" +
" \".mp3\",\n" +
" \".wav\",\n" +
" \".mid\",\n" +
" \".rar\",\n" +
" \".zip\",\n" +
" \".tar\",\n" +
" \".gz\",\n" +
" \".7z\",\n" +
" \".bz2\",\n" +
" \".cab\",\n" +
" \".iso\",\n" +
" \".doc\",\n" +
" \".docx\",\n" +
" \".xls\",\n" +
" \".xlsx\",\n" +
" \".ppt\",\n" +
" \".pptx\",\n" +
" \".pdf\",\n" +
" \".txt\",\n" +
" \".md\",\n" +
" \".xml\"\n" +
" ],\n" +
" \"catcherUrlPrefix\": \"\",\n" +
" \"imageManagerListSize\": 20,\n" +
" \"catcherFieldName\": \"source\",\n" +
" \"videoAllowFiles\": [\n" +
" \".flv\",\n" +
" \".swf\",\n" +
" \".mkv\",\n" +
" \".avi\",\n" +
" \".rm\",\n" +
" \".rmvb\",\n" +
" \".mpeg\",\n" +
" \".mpg\",\n" +
" \".ogg\",\n" +
" \".ogv\",\n" +
" \".mov\",\n" +
" \".wmv\",\n" +
" \".mp4\",\n" +
" \".webm\",\n" +
" \".mp3\",\n" +
" \".wav\",\n" +
" \".mid\"\n" +
" ]\n" +
"}";
//配置ueditor后端上传接口的验证
@RequestMapping("/config")
@ -43,7 +217,7 @@ public class UeditorController {
String path = ClassUtils.getDefaultClassLoader().getResource("").getPath() + "config";
System.out.println("path = " + path);
PrintWriter printWriter = response.getWriter();
printWriter.write(new ActionEnter(request, path).exec());
printWriter.write(configJson);
printWriter.flush();
printWriter.close();
}

View File

@ -194,9 +194,10 @@ public class HitCompetitionStudentInfoServiceImpl extends ServiceImpl<HitCompeti
.likeRight(HitRegistrationTeachInfo::getCreateTime, year).eq(HitRegistrationTeachInfo::getType,0).eq(HitRegistrationTeachInfo::getStatus,1);
List<HitRegistrationTeachInfo> hitRegistrationTeachInfos = hitRegistrationTeachInfoMapper.selectList(queryWrapper2);
//领队老师也可以是指导老师
hitRegistrationTeachInfos.add(hitRegistrationTeachInfo);
if (ObjectUtils.isNotEmpty(hitRegistrationTeachInfo)){
hitRegistrationTeachInfos.add(hitRegistrationTeachInfo);
}
hitCompetitionStudentInfo.setZdTeacherList(hitRegistrationTeachInfos);
LambdaQueryWrapper<HitCompetitionStudentInfo> queryWrapper3 =new LambdaQueryWrapper<>();
queryWrapper3.eq(HitCompetitionStudentInfo::getSchoolName,hitCompetitionStudentInfo.getSchoolName()).ne(HitCompetitionStudentInfo::getUserId,user.getUserId())
.likeRight(HitCompetitionStudentInfo::getCreateTime, year).eq(HitCompetitionStudentInfo::getIsPreliminary,1)

View File

@ -180,9 +180,7 @@ public class HitRegistrationTeachInfoServiceImpl implements IHitRegistrationTeac
validateCaptcha(username, user.getCode(), user.getUuid());
}
boolean validPhoneNumber = isValidPhoneNumber(username);
if (!validPhoneNumber) {
msg = "手机号码格式不正确";
}else if (StringUtils.isEmpty(username)) {
if (StringUtils.isEmpty(username)) {
msg = "用户名不能为空";
} else if (StringUtils.isEmpty(password)) {
msg = "用户密码不能为空";

View File

@ -47,9 +47,9 @@
v-hasPermi="['hit:hitRegistrationStudentInfo:export']"
>导出</el-button>
</el-col>-->
<el-col :span="1.5">
<el-col :span="1.5" v-hasPermi="['hit:open']">
<el-switch v-model="registerStatus" @change="updateRegisterStatus" active-value="1" inactive-value="0"
active-text="开启报名" inactive-text="关闭报名">
active-text="开启报名" inactive-text="关闭报名" >
</el-switch>
</el-col>
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
@ -286,7 +286,7 @@ export default {
//
if (this.HitRegistrationStudentInfoList.length == 0) {
this.loading = false;
}
}
console.log("报名信息", this.HitRegistrationStudentInfoList);
this.zdTeacherList = this.HitRegistrationStudentInfoList[0].zdTeacher.map(teacher => teacher.userId);

View File

@ -40,6 +40,7 @@
{{ currentUser }} <i class="el-icon-arrow-down el-icon--right"></i>
</span>
<el-dropdown-menu slot="dropdown">
<el-dropdown-item command="logout" divided @click.native="goBack" >进入后台</el-dropdown-item>
<el-dropdown-item command="logout" divided @click.native="logout" >退出登录</el-dropdown-item>
</el-dropdown-menu>
</el-dropdown>
@ -99,9 +100,9 @@
<el-form-item prop="hitRegistrationTeachInfo.teacherEmail" v-if="registerForm.userType=='03'||registerForm.userType=='02'">
<el-input placeholder="邮箱" v-model="registerForm.hitRegistrationTeachInfo.teacherEmail" type="text"></el-input>
</el-form-item>
<el-form-item prop="hitRegistrationTeachInfo.teacherNumber" v-if="registerForm.userType=='03'||registerForm.userType=='02'">
<el-input placeholder="手机号" v-model="registerForm.hitRegistrationTeachInfo.teacherNumber" type="text"></el-input>
</el-form-item>
<!-- <el-form-item prop="hitRegistrationTeachInfo.teacherNumber" v-if="registerForm.userType=='03'||registerForm.userType=='02'">-->
<!-- <el-input placeholder="手机号" v-model="registerForm.hitRegistrationTeachInfo.teacherNumber" type="text"></el-input>-->
<!-- </el-form-item>-->
<el-form-item prop="hitRegistrationTeachInfo.division" v-if="registerForm.userType=='03'||registerForm.userType=='02'">
<el-select v-model="registerForm.hitRegistrationTeachInfo.division" filterable allow-create default-first-option
placeholder="请选择赛区">
@ -366,6 +367,9 @@ export default {
});
return;
}
if (this.registerForm.hitRegistrationTeachInfo){
this.registerForm.hitRegistrationTeachInfo.teacherNumber = this.registerForm.username;
}
this.loading = true;
register(this.registerForm).then(res => {
@ -398,6 +402,9 @@ export default {
location.href = '/index';
})
}).catch(() => {});
},
goBack(){
this.$router.push("/index")
},
//
handleBeforeUnload() {

View File

@ -35,8 +35,8 @@
<div class="step-box" v-if="active == 0">
<div class="step-box-title">
<el-form label-width="80px" :model="signUpForm" :rules="rules" ref="form">
<el-form-item label="手机号" prop="studentId">
<el-input v-model="signUpForm.studentId" disabled></el-input>
<el-form-item label="号" prop="studentId">
<el-input v-model="signUpForm.studentId" ></el-input>
</el-form-item>
<el-form-item label="姓名" prop="stuName">
<el-input v-model="signUpForm.stuName"></el-input>
@ -81,7 +81,7 @@
<el-form-item label="邮箱" prop="email">
<el-input v-model="signUpForm.email"></el-input>
</el-form-item>
<el-form-item label="学生证|学生卡" prop="studentIdCard" label-width="130px">
<el-form-item label="学生证/学生卡" prop="studentIdCard" label-width="130px">
<image-upload :limit="1" v-model="signUpForm.studentIdCard"></image-upload>
</el-form-item>
@ -366,7 +366,7 @@ export default {
{ required: true, message: "学校名称不能为空", trigger: "blur" }
],
studentId: [
{ required: true, message: "手机号不能为空", trigger: "blur" }
{ required: true, message: "号不能为空", trigger: "blur" }
],
collegeName: [
{ required: true, message: "院系名称不能为空", trigger: "blur" }
@ -480,7 +480,7 @@ export default {
loadUserInfo() {
if (getToken()) {
getHomeUserInfo().then(response => {
this.signUpForm.studentId = response.data.userName;
// this.signUpForm.studentId = response.data.userName;
this.preliminaryForm = response.data;
this.fetchRegistrationInformation()