..
This commit is contained in:
+23
-21
@@ -34,10 +34,7 @@ import org.nutz.mvc.annotation.At;
|
|||||||
import org.nutz.mvc.annotation.Ok;
|
import org.nutz.mvc.annotation.Ok;
|
||||||
import org.nutz.mvc.annotation.Param;
|
import org.nutz.mvc.annotation.Param;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.*;
|
||||||
import java.util.Date;
|
|
||||||
import java.util.List;
|
|
||||||
import java.util.Map;
|
|
||||||
import java.util.concurrent.locks.ReentrantLock;
|
import java.util.concurrent.locks.ReentrantLock;
|
||||||
import java.util.stream.Collectors;
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
@@ -205,7 +202,7 @@ public class FamilyActivityApplyController {
|
|||||||
try {
|
try {
|
||||||
lock.lock();
|
lock.lock();
|
||||||
if(StrUtil.isBlank(courseId)) {
|
if(StrUtil.isBlank(courseId)) {
|
||||||
return Result.error("报名信息为空");
|
return Result.error(99, "报名信息为空");
|
||||||
}
|
}
|
||||||
|
|
||||||
currentFamilyNumber = currentFamilyNumber != null ? currentFamilyNumber : 0;
|
currentFamilyNumber = currentFamilyNumber != null ? currentFamilyNumber : 0;
|
||||||
@@ -214,50 +211,50 @@ public class FamilyActivityApplyController {
|
|||||||
|
|
||||||
//判断时间
|
//判断时间
|
||||||
if(DateUtil.compare(new Date(), activity.getActivitySignUpStartTime(), "yyyy-MM-dd HH:mm:ss") < 0) {
|
if(DateUtil.compare(new Date(), activity.getActivitySignUpStartTime(), "yyyy-MM-dd HH:mm:ss") < 0) {
|
||||||
return Result.error("报名未开始");
|
return Result.error(99,"报名未开始");
|
||||||
}
|
}
|
||||||
if(DateUtil.compare(new Date(), activity.getActivitySignUpEndTime(), "yyyy-MM-dd HH:mm:ss") > 0) {
|
if(DateUtil.compare(new Date(), activity.getActivitySignUpEndTime(), "yyyy-MM-dd HH:mm:ss") > 0) {
|
||||||
return Result.error("报名已结束");
|
return Result.error(99,"报名已结束");
|
||||||
}
|
}
|
||||||
|
|
||||||
//判断活动组别
|
//判断活动组别
|
||||||
int count = dao.count(ActivityUserScope.class, Cnd.where("groupId", "=", activity.getActivityGroupId()).and("userId", "=", SecurityUtil.getUserId()));
|
int count = dao.count(ActivityUserScope.class, Cnd.where("groupId", "=", activity.getActivityGroupId()).and("userId", "=", SecurityUtil.getUserId()));
|
||||||
if(count == 0) {
|
if(count == 0) {
|
||||||
return Result.error("抱歉,您没有此次活动的权限");
|
return Result.error(99,"抱歉,您没有此次活动的权限");
|
||||||
}
|
}
|
||||||
|
|
||||||
//判断是否报名
|
//判断是否报名
|
||||||
boolean courseByUser = familyActivityService.isSignCourseByUser(courseId, SecurityUtil.getUserId());
|
boolean courseByUser = familyActivityService.isSignCourseByUser(courseId, SecurityUtil.getUserId());
|
||||||
if(courseByUser) {
|
if(courseByUser) {
|
||||||
return Result.error("抱歉,您已经报名");
|
return Result.error(99,"抱歉,您已经报名");
|
||||||
}
|
}
|
||||||
|
|
||||||
//判断活动人数
|
//判断活动人数
|
||||||
boolean signFull = familyActivityService.isSignFull(course, currentFamilyNumber);
|
boolean signFull = familyActivityService.isSignFull(course, currentFamilyNumber);
|
||||||
if(signFull) {
|
if(signFull) {
|
||||||
return Result.error("名额剩余数量不足");
|
return Result.error(99,"啊哦,目前报名人数已达上限。您可保持关注,如有老师取消之前的报名从而释放出名额,您可再来试试。谢谢!");
|
||||||
}
|
}
|
||||||
|
|
||||||
//判断活动限制
|
//判断活动限制
|
||||||
boolean signCourse = familyActivityService.isSignCourse(course, activity);
|
boolean signCourse = familyActivityService.isSignCourse(course, activity);
|
||||||
if(!signCourse) {
|
if(!signCourse) {
|
||||||
if(activity.getRestrictLimit() != 3) {
|
if(activity.getRestrictLimit() != 3) {
|
||||||
return Result.error("您选择的类型已达上限,不能再报该类型的了");
|
return Result.error(99,"您选择的类型已达上限,不能再报该类型的了");
|
||||||
} else {
|
} else {
|
||||||
return Result.error(activity.getActivityName() + "限制报" + activity.getLimitNum() + "个活动,已达上限");
|
return Result.error(99,activity.getActivityName() + "限制报" + activity.getLimitNum() + "个活动,已达上限");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//判断分工会人数限制
|
//判断分工会人数限制
|
||||||
boolean signFullByUnionId = familyActivityService.isSignFullByUnionId(course, currentFamilyNumber);
|
boolean signFullByUnionId = familyActivityService.isSignFullByUnionId(course, currentFamilyNumber);
|
||||||
if(signFullByUnionId) {
|
if(signFullByUnionId) {
|
||||||
return Result.error("您所在的分工会名额不足");
|
return Result.error(99,"您所在的分工会名额不足");
|
||||||
}
|
}
|
||||||
|
|
||||||
return Result.success();
|
return Result.success();
|
||||||
}catch (Exception e) {
|
}catch (Exception e) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
return Result.error("报名失败");
|
return Result.error(99,"报名失败");
|
||||||
} finally {
|
} finally {
|
||||||
lock.unlock();
|
lock.unlock();
|
||||||
}
|
}
|
||||||
@@ -315,13 +312,13 @@ public class FamilyActivityApplyController {
|
|||||||
Integer courseLimitNum = course.getCourseLimitNum();
|
Integer courseLimitNum = course.getCourseLimitNum();
|
||||||
// 报名加上自己,如果大于了限制人数,那就无法报名
|
// 报名加上自己,如果大于了限制人数,那就无法报名
|
||||||
if (count + 1 > courseLimitNum) {
|
if (count + 1 > courseLimitNum) {
|
||||||
return Result.error("该时间段名额已报满,请选择其他时段报名");
|
return Result.error(99,"该时间段名额已报满,请选择其他时段报名");
|
||||||
} else {
|
} else {
|
||||||
return Result.success();
|
return Result.success();
|
||||||
}
|
}
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
return Result.error("报名失败");
|
return Result.error(99,"报名失败");
|
||||||
} finally {
|
} finally {
|
||||||
lock.unlock();
|
lock.unlock();
|
||||||
}
|
}
|
||||||
@@ -336,7 +333,12 @@ public class FamilyActivityApplyController {
|
|||||||
lock.lock();
|
lock.lock();
|
||||||
boolean courseByUser = familyActivityService.isSignCourseByUser(familyUser.getCourseId(), SecurityUtil.getUserId());
|
boolean courseByUser = familyActivityService.isSignCourseByUser(familyUser.getCourseId(), SecurityUtil.getUserId());
|
||||||
if(courseByUser) {
|
if(courseByUser) {
|
||||||
return Result.error("您已报过该活动");
|
return Result.error(99,"您已报过该活动");
|
||||||
|
}
|
||||||
|
FamilyActivity activity = familyActivityService.fetch(familyUser.getActivityId());
|
||||||
|
boolean validFamilyCount = familyActivityService.validFamilyCount(familyUser);
|
||||||
|
if(validFamilyCount) {
|
||||||
|
return Result.error(99,activity.getKeyWord() + "人数最多为" + activity.getFamilyMaxCount());
|
||||||
}
|
}
|
||||||
//判断人数
|
//判断人数
|
||||||
int number = 0;
|
int number = 0;
|
||||||
@@ -350,17 +352,17 @@ public class FamilyActivityApplyController {
|
|||||||
}
|
}
|
||||||
boolean signFull = familyActivityService.isSignFull(course, number);
|
boolean signFull = familyActivityService.isSignFull(course, number);
|
||||||
if(signFull) {
|
if(signFull) {
|
||||||
return Result.error("当前报名人数已满");
|
return Result.error(99,"当前报名人数已满");
|
||||||
}
|
}
|
||||||
boolean signFullByUnionId = familyActivityService.isSignFullByUnionId(course, number);
|
boolean signFullByUnionId = familyActivityService.isSignFullByUnionId(course, number);
|
||||||
if(signFullByUnionId) {
|
if(signFullByUnionId) {
|
||||||
return Result.error("该活动您所在的分工会名额不足");
|
return Result.error(99,"该活动您所在的分工会名额不足");
|
||||||
}
|
}
|
||||||
familyActivityService.doSignUp(familyUser);
|
familyActivityService.doSignUp(familyUser);
|
||||||
return Result.success();
|
return Result.success("祝贺您!您已报名成功!请留意各分场活动的准确时间、地点,提前10-15分钟到达活动现场做好准备。如您因故不能参加活动,还请及时登录系统取消报名,以便将机会留给其他有需要的教职工。谢谢!");
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
return Result.success("报名失败");
|
return Result.error("报名失败");
|
||||||
} finally {
|
} finally {
|
||||||
lock.unlock();
|
lock.unlock();
|
||||||
}
|
}
|
||||||
|
|||||||
+1
-1
@@ -177,7 +177,7 @@ public class FamilyActivityStatisticsController {
|
|||||||
Map.of("name", "单位", "key", "unitName"),
|
Map.of("name", "单位", "key", "unitName"),
|
||||||
Map.of("name", "分工会", "key", "unionName"),
|
Map.of("name", "分工会", "key", "unionName"),
|
||||||
Map.of("name", "性别", "key", "sex"),
|
Map.of("name", "性别", "key", "sex"),
|
||||||
Map.of("name", "手机号", "key", "newMobile"),
|
Map.of("name", "人事系统手机号", "key", "newMobile"),
|
||||||
Map.of("name", "报名时段", "key", "courseTime")
|
Map.of("name", "报名时段", "key", "courseTime")
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|||||||
@@ -122,6 +122,16 @@ public class FamilyActivity extends BaseModel implements Serializable, SysHomeCo
|
|||||||
@ColDefine(type = ColType.VARCHAR, width = 20)
|
@ColDefine(type = ColType.VARCHAR, width = 20)
|
||||||
private String keyWord;
|
private String keyWord;
|
||||||
|
|
||||||
|
@Column
|
||||||
|
@Comment("家属最多数")
|
||||||
|
@ColDefine(type = ColType.INT)
|
||||||
|
private Integer familyMaxCount;
|
||||||
|
|
||||||
|
@Column
|
||||||
|
@Comment("判断家属数量的唯一标识")
|
||||||
|
@ColDefine(type = ColType.VARCHAR, width = 50)
|
||||||
|
private String onlyKey;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Sys_home_activity covertToSysHomeActivity() {
|
public Sys_home_activity covertToSysHomeActivity() {
|
||||||
Sys_home_activity sysHomeActivity = new Sys_home_activity();
|
Sys_home_activity sysHomeActivity = new Sys_home_activity();
|
||||||
|
|||||||
@@ -85,6 +85,8 @@ public interface FamilyActivityService extends BaseService<FamilyActivity> {
|
|||||||
*/
|
*/
|
||||||
boolean isSignFull(FamilyCourse course, Integer currentFamilyNumber);
|
boolean isSignFull(FamilyCourse course, Integer currentFamilyNumber);
|
||||||
|
|
||||||
|
boolean validFamilyCount(FamilyUser user);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 还能报该类型的培训班吗 比如书画班最多报一项 健身班两项
|
* 还能报该类型的培训班吗 比如书画班最多报一项 健身班两项
|
||||||
* @return
|
* @return
|
||||||
|
|||||||
+30
@@ -3,6 +3,7 @@ package com.budwk.app.zhgh.activity.family.service.impl;
|
|||||||
import cn.hutool.core.util.StrUtil;
|
import cn.hutool.core.util.StrUtil;
|
||||||
import com.budwk.app.base.page.Pagination;
|
import com.budwk.app.base.page.Pagination;
|
||||||
import com.budwk.app.base.param.PageForm;
|
import com.budwk.app.base.param.PageForm;
|
||||||
|
import com.budwk.app.base.result.Result;
|
||||||
import com.budwk.app.base.service.impl.BaseServiceImpl;
|
import com.budwk.app.base.service.impl.BaseServiceImpl;
|
||||||
import com.budwk.app.sys.models.Sys_home_activity;
|
import com.budwk.app.sys.models.Sys_home_activity;
|
||||||
import com.budwk.app.sys.views.View_user;
|
import com.budwk.app.sys.views.View_user;
|
||||||
@@ -368,6 +369,35 @@ public class FamilyActivityServiceImpl extends BaseServiceImpl<FamilyActivity> i
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean validFamilyCount(FamilyUser user) {
|
||||||
|
String activityId = user.getActivityId();
|
||||||
|
// 查询报名记录
|
||||||
|
List<FamilyUser> list = dao().query(FamilyUser.class, Cnd.where(FamilyUser::getActivityId, "=", activityId).and(FamilyUser::getUserId, "=", SecurityUtil.getUserId()));
|
||||||
|
if(Lang.isEmpty(list)) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
FamilyActivity activity = dao().fetch(FamilyActivity.class, activityId);
|
||||||
|
|
||||||
|
List<List<NutMap>> allMobileColumnsValue = new ArrayList<>(list.stream()
|
||||||
|
.map(FamilyUser::getMobileColumnsValue)
|
||||||
|
.filter(Objects::nonNull)
|
||||||
|
.flatMap(List::stream)
|
||||||
|
.toList());
|
||||||
|
|
||||||
|
allMobileColumnsValue.addAll(user.getMobileColumnsValue());
|
||||||
|
|
||||||
|
long count = allMobileColumnsValue.stream()
|
||||||
|
.flatMap(List::stream)
|
||||||
|
.filter(nutMap -> activity.getOnlyKey().equals(nutMap.getString("columnCode")))
|
||||||
|
.map(nutMap -> nutMap.getString("columnValue"))
|
||||||
|
.filter(Objects::nonNull)
|
||||||
|
.distinct()
|
||||||
|
.count();
|
||||||
|
|
||||||
|
return count > activity.getFamilyMaxCount();
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean isSignCourse(FamilyCourse course, FamilyActivity activity) {
|
public boolean isSignCourse(FamilyCourse course, FamilyActivity activity) {
|
||||||
//培训班类型
|
//培训班类型
|
||||||
|
|||||||
+1
@@ -101,6 +101,7 @@ public class MemberManageServiceImpl extends BaseServiceImpl<Sys_user> implement
|
|||||||
}
|
}
|
||||||
cnd.asc("u.unionId");
|
cnd.asc("u.unionId");
|
||||||
cnd.asc("u.unitId");
|
cnd.asc("u.unitId");
|
||||||
|
cnd.asc("u.id");
|
||||||
sql.setCondition(cnd);
|
sql.setCondition(cnd);
|
||||||
return sql;
|
return sql;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -47,12 +47,12 @@ layout("/layouts/platform.html"){
|
|||||||
<el-option v-for="item in userStateOptions" :label="item" :value="item"></el-option>
|
<el-option v-for="item in userStateOptions" :label="item" :value="item"></el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
</search-item>
|
</search-item>
|
||||||
<search-item label="用人方式">
|
<search-item label="聘用方式">
|
||||||
<el-select v-model="pageForm.preparedBy" clearable filterable>
|
<el-select v-model="pageForm.preparedBy" clearable filterable>
|
||||||
<el-option v-for="item in preparedByOptions" :label="item" :value="item"></el-option>
|
<el-option v-for="item in preparedByOptions" :label="item" :value="item"></el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
</search-item>
|
</search-item>
|
||||||
<search-item label="教职工类别">
|
<search-item label="人员类型">
|
||||||
<el-select v-model="pageForm.personType" clearable filterable>
|
<el-select v-model="pageForm.personType" clearable filterable>
|
||||||
<el-option v-for="item in personTypeOptions" :label="item" :value="item"></el-option>
|
<el-option v-for="item in personTypeOptions" :label="item" :value="item"></el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
@@ -76,9 +76,9 @@ layout("/layouts/platform.html"){
|
|||||||
<template slot-scope="{row}">{{$moment(row.birthday).format('YYYY-MM-DD')}}</template>
|
<template slot-scope="{row}">{{$moment(row.birthday).format('YYYY-MM-DD')}}</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column prop="userState" label="在职状态" sortable width="120"></el-table-column>
|
<el-table-column prop="userState" label="在职状态" sortable width="120"></el-table-column>
|
||||||
<el-table-column prop="preparedBy" label="人事编制" sortable width="120"></el-table-column>
|
<el-table-column prop="preparedBy" label="聘用方式" sortable width="120"></el-table-column>
|
||||||
<el-table-column prop="postDoctoralJoinDate" label="进站时间" sortable width="120"></el-table-column>
|
<el-table-column prop="postDoctoralJoinDate" label="进站时间" sortable width="120"></el-table-column>
|
||||||
<el-table-column prop="personType" label="教职工类别" sortable width="120"></el-table-column>
|
<el-table-column prop="personType" label="人员类型" sortable width="120"></el-table-column>
|
||||||
<el-table-column prop="comeSchoolDate" label="来校年月" sortable width="120"></el-table-column>
|
<el-table-column prop="comeSchoolDate" label="来校年月" sortable width="120"></el-table-column>
|
||||||
<el-table-column prop="technicalTitle" label="技术职称" sortable width="120"></el-table-column>
|
<el-table-column prop="technicalTitle" label="技术职称" sortable width="120"></el-table-column>
|
||||||
<el-table-column prop="position" label="干部职务" sortable width="120" show-overflow-tooltip></el-table-column>
|
<el-table-column prop="position" label="干部职务" sortable width="120" show-overflow-tooltip></el-table-column>
|
||||||
|
|||||||
@@ -69,7 +69,7 @@ const courseList = {
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<template v-slot="{row}" v-else-if="column.prop=='introduce'">
|
<template v-slot="{row}" v-else-if="column.prop=='introduce'">
|
||||||
<span v-if="!row.introduce">暂无</span>
|
<span v-if="!row.introduce?.trim()">暂无</span>
|
||||||
<el-button v-else style="padding: 0" @click="onPreview(row.introduce)" type="text">点击查看</el-button>
|
<el-button v-else style="padding: 0" @click="onPreview(row.introduce)" type="text">点击查看</el-button>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@@ -108,6 +108,13 @@ const courseList = {
|
|||||||
<el-button @click="viewMapDialog = false">取 消</el-button>
|
<el-button @click="viewMapDialog = false">取 消</el-button>
|
||||||
</el-row>
|
</el-row>
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
|
|
||||||
|
<el-dialog :visible.sync="infoVisible" title="详细信息" append-to-body>
|
||||||
|
<div v-html="introduce"></div>
|
||||||
|
<el-row class="mt20" justify="end" type="flex">
|
||||||
|
<el-button @click="infoVisible = false">取 消</el-button>
|
||||||
|
</el-row>
|
||||||
|
</el-dialog>
|
||||||
|
|
||||||
<sign-form ref="signFormRef" @refresh="doSearch"></sign-form>
|
<sign-form ref="signFormRef" @refresh="doSearch"></sign-form>
|
||||||
</div>
|
</div>
|
||||||
@@ -129,28 +136,40 @@ const courseList = {
|
|||||||
tableColumns: [
|
tableColumns: [
|
||||||
{ prop: "courseName", label: "名称" },
|
{ prop: "courseName", label: "名称" },
|
||||||
{ prop: "typeName", label: "类型", width: 130},
|
{ prop: "typeName", label: "类型", width: 130},
|
||||||
|
{ prop: "campus", label: "校区", width: 160 },
|
||||||
{ prop: "courseLocationCoordinates", label: "地点", width: 200 },
|
{ prop: "courseLocationCoordinates", label: "地点", width: 200 },
|
||||||
{ prop: "courseInstructor", label: "联系人", width: 100 },
|
{ prop: "courseInstructor", label: "联系人", width: 100 },
|
||||||
{ prop: "courseTime", label: "时间", width: 200 },
|
{ prop: "courseTime", label: "时间", width: 160 },
|
||||||
|
{ prop: "introduce", label: "详细信息", width: 100 },
|
||||||
{ prop: "applyNum", label: "已报名人数", width: 200 }
|
{ prop: "applyNum", label: "已报名人数", width: 200 }
|
||||||
],
|
],
|
||||||
activity: {},
|
activity: {},
|
||||||
courseTypeList: [],
|
courseTypeList: [],
|
||||||
|
|
||||||
activityType: '',
|
activityType: '',
|
||||||
|
pdf: false,
|
||||||
|
infoVisible: false,
|
||||||
|
introduce: '',
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
async onPreview(introduce) {
|
async onPreview(introduce) {
|
||||||
const parser = new DOMParser();
|
try {
|
||||||
const doc = parser.parseFromString(introduce, 'text/html');
|
const parser = new DOMParser();
|
||||||
const link = doc.querySelector('a');
|
const doc = parser.parseFromString(introduce, 'text/html');
|
||||||
const href = link.getAttribute('href');
|
const link = doc.querySelector('a');
|
||||||
|
const href = link.getAttribute('href');
|
||||||
|
|
||||||
const id = href.substring(href.indexOf("=") + 1)
|
const id = href.substring(href.indexOf("=") + 1)
|
||||||
const res = await this.$axios.post("/platform/sys/file/previewFileData", { ids: JSON.stringify([id]) })
|
const res = await this.$axios.post("/platform/sys/file/previewFileData", { ids: JSON.stringify([id]) })
|
||||||
|
|
||||||
window.open("/assets/platform/plugins/pdfJs/web/viewer.html?file=" + encodeURIComponent(res.data[0].downloadPath), res.data[0].name)
|
this.pdf = true
|
||||||
|
window.open("/assets/platform/plugins/pdfJs/web/viewer.html?file=" + encodeURIComponent(res.data[0].downloadPath), res.data[0].name)
|
||||||
|
} catch (e) {
|
||||||
|
this.introduce = introduce
|
||||||
|
this.pdf = false
|
||||||
|
this.infoVisible = true
|
||||||
|
}
|
||||||
},
|
},
|
||||||
tagClick(key, val) {
|
tagClick(key, val) {
|
||||||
let idx = this.pageForm[key].indexOf(val)
|
let idx = this.pageForm[key].indexOf(val)
|
||||||
@@ -185,7 +204,7 @@ const courseList = {
|
|||||||
type: "warning"
|
type: "warning"
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
this.$refs.signFormRef.onOpen(row, courseType)
|
this.$refs.signFormRef.onOpen(row, courseType, this.activity)
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -30,6 +30,10 @@ layout("/layouts/platform.html"){
|
|||||||
font-size: 20px;
|
font-size: 20px;
|
||||||
padding: 0 4px;
|
padding: 0 4px;
|
||||||
}
|
}
|
||||||
|
.info-dialog .el-dialog__body {
|
||||||
|
max-height: 600px;
|
||||||
|
overflow-y: auto;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
<div id="app" v-cloak>
|
<div id="app" v-cloak>
|
||||||
@@ -99,26 +103,26 @@ layout("/layouts/platform.html"){
|
|||||||
</template>
|
</template>
|
||||||
</guava>
|
</guava>
|
||||||
|
|
||||||
<el-dialog title="详细信息" :visible.sync="infoVisible" width="60%">
|
<el-dialog title="详细信息" :visible.sync="infoVisible" width="60%" class="info-dialog">
|
||||||
|
|
||||||
<activity-info ref="infoRef"></activity-info>
|
<activity-info ref="infoRef"></activity-info>
|
||||||
|
|
||||||
<el-statistic
|
|
||||||
v-if="time < 0"
|
|
||||||
format="DD 天 HH 时 mm 分钟 ss 秒"
|
|
||||||
:value="new Date(infoRow.activitySignUpStartTime)"
|
|
||||||
time-indices
|
|
||||||
title="距离开始:"
|
|
||||||
@finish="time = 0"
|
|
||||||
style="margin-top: 30px"
|
|
||||||
>
|
|
||||||
</el-statistic>
|
|
||||||
|
|
||||||
<span slot="footer" class="dialog-footer">
|
<span slot="footer" class="dialog-footer">
|
||||||
<el-button @click="infoVisible = false">取消</el-button>
|
<el-statistic
|
||||||
<el-button type="primary" @click="onOpen(infoRow)" :disabled="time < 0">
|
v-if="time < 0"
|
||||||
去报名
|
format="DD 天 HH 时 mm 分钟 ss 秒"
|
||||||
</el-button>
|
:value="new Date(infoRow.activitySignUpStartTime)"
|
||||||
|
time-indices
|
||||||
|
title="距离开始:"
|
||||||
|
@finish="time = 0"
|
||||||
|
>
|
||||||
|
</el-statistic>
|
||||||
|
<template v-else>
|
||||||
|
<el-button @click="infoVisible = false">取消</el-button>
|
||||||
|
<el-button type="primary" @click="onOpen(infoRow)" :disabled="time < 0">
|
||||||
|
去报名
|
||||||
|
</el-button>
|
||||||
|
</template>
|
||||||
</span>
|
</span>
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
|
|
||||||
|
|||||||
@@ -61,7 +61,7 @@ const signForm = {
|
|||||||
style="display: flex; justify-content: space-between; align-items: center">
|
style="display: flex; justify-content: space-between; align-items: center">
|
||||||
<div>家属信息</div>
|
<div>家属信息</div>
|
||||||
<div>
|
<div>
|
||||||
<el-button type="primary" size="mini" @click="delFamily">
|
<el-button type="danger" size="mini" @click="delFamily">
|
||||||
删除家属
|
删除家属
|
||||||
</el-button>
|
</el-button>
|
||||||
<el-button type="primary" size="mini" @click="addFamily">
|
<el-button type="primary" size="mini" @click="addFamily">
|
||||||
@@ -76,7 +76,7 @@ const signForm = {
|
|||||||
:name="index + ''"
|
:name="index + ''"
|
||||||
:label="'家属' + (index + 1)"
|
:label="'家属' + (index + 1)"
|
||||||
:key="index">
|
:key="index">
|
||||||
<el-row>
|
<el-row class="mt20">
|
||||||
<el-col :span="24">
|
<el-col :span="24">
|
||||||
<el-form-item
|
<el-form-item
|
||||||
v-for="(column, index) in item"
|
v-for="(column, index) in item"
|
||||||
@@ -154,12 +154,14 @@ const signForm = {
|
|||||||
courseTypeRow: {},
|
courseTypeRow: {},
|
||||||
courseTimeSelectList: [],
|
courseTimeSelectList: [],
|
||||||
active: '',
|
active: '',
|
||||||
|
|
||||||
|
activity: {},
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
addFamily() {
|
addFamily() {
|
||||||
if(this.formData.mobileColumnsValue.length >= this.courseTypeRow.familyMaxCount) {
|
if(this.formData.mobileColumnsValue.length >= this.activity.familyMaxCount) {
|
||||||
this.$message.warning('家属最多人数为' + this.courseTypeRow.familyMaxCount)
|
this.$message.warning('家属最多人数为' + this.activity.familyMaxCount)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
const list = clone(this.courseTypeRow.familyMobileSignColumnList)
|
const list = clone(this.courseTypeRow.familyMobileSignColumnList)
|
||||||
@@ -177,7 +179,10 @@ const signForm = {
|
|||||||
currentFamilyNumber: this.formData.mobileColumnsValue.length || 0
|
currentFamilyNumber: this.formData.mobileColumnsValue.length || 0
|
||||||
})
|
})
|
||||||
if (res.code !== 0) {
|
if (res.code !== 0) {
|
||||||
this.$message.warning(res.msg)
|
this.$alert(res.msg, "提示", {
|
||||||
|
confirmButtonText: "确定",
|
||||||
|
type: "warning"
|
||||||
|
})
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
return true
|
return true
|
||||||
@@ -189,7 +194,10 @@ const signForm = {
|
|||||||
courseId: this.courseRow.id
|
courseId: this.courseRow.id
|
||||||
})
|
})
|
||||||
if (resp.code !== 0) {
|
if (resp.code !== 0) {
|
||||||
this.$message.warning(resp.msg)
|
this.$alert(resp.msg, "提示", {
|
||||||
|
confirmButtonText: "确定",
|
||||||
|
type: "warning"
|
||||||
|
})
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -203,8 +211,8 @@ const signForm = {
|
|||||||
this.$message.warning('获取时段信息失败,请联系管理员')
|
this.$message.warning('获取时段信息失败,请联系管理员')
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
async onOpen(row, courseType) {
|
async onOpen(row, courseType, activity) {
|
||||||
this.initData(row, courseType)
|
this.initData(row, courseType, activity)
|
||||||
if (row.courseIsLimitApply) {
|
if (row.courseIsLimitApply) {
|
||||||
await this.getCourseTimeSelectList(row)
|
await this.getCourseTimeSelectList(row)
|
||||||
}
|
}
|
||||||
@@ -373,8 +381,11 @@ const signForm = {
|
|||||||
this.formData.mobileColumnsValue = JSON.stringify(clone(array))
|
this.formData.mobileColumnsValue = JSON.stringify(clone(array))
|
||||||
const resp = await this.$axios.post("/platform/family/apply/doSignUp", this.formData)
|
const resp = await this.$axios.post("/platform/family/apply/doSignUp", this.formData)
|
||||||
if (resp.code === 0) {
|
if (resp.code === 0) {
|
||||||
|
this.$alert(resp.msg, "提示", {
|
||||||
|
confirmButtonText: "确定",
|
||||||
|
type: "warning"
|
||||||
|
})
|
||||||
this.signDialog = false
|
this.signDialog = false
|
||||||
this.$message.success(resp.msg)
|
|
||||||
this.$emit('refresh')
|
this.$emit('refresh')
|
||||||
} else {
|
} else {
|
||||||
this.$message.warning(resp.msg)
|
this.$message.warning(resp.msg)
|
||||||
@@ -383,7 +394,8 @@ const signForm = {
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
initData(row, courseType) {
|
initData(row, courseType, activity) {
|
||||||
|
this.activity = activity
|
||||||
this.formData = {
|
this.formData = {
|
||||||
activityId: row.activityId,
|
activityId: row.activityId,
|
||||||
courseId: row.id,
|
courseId: row.id,
|
||||||
|
|||||||
@@ -108,6 +108,11 @@ const basicForm = {
|
|||||||
<el-input maxlength="50" v-model="formData.keyWord" placeholder="请输入关键词"></el-input>
|
<el-input maxlength="50" v-model="formData.keyWord" placeholder="请输入关键词"></el-input>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item :rules="{required:true,message: '请输入家属最多数', trigger: 'blur'}" label="家属最多数" prop="familyMaxCount">
|
||||||
|
<el-input maxlength="50" v-model="formData.familyMaxCount" placeholder="请输入家属最多数" type="number"></el-input>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
<el-form-item :rules="{required:true,message: '请输入活动介绍', trigger: 'blur'}" label="活动介绍" prop="introduce">
|
<el-form-item :rules="{required:true,message: '请输入活动介绍', trigger: 'blur'}" label="活动介绍" prop="introduce">
|
||||||
<text-editor v-model="formData.introduce"></text-editor>
|
<text-editor v-model="formData.introduce"></text-editor>
|
||||||
@@ -272,6 +277,13 @@ const basicForm = {
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
|
||||||
|
<div class="left-span-label" style="margin-top: 20px">判断家属数量唯一标识</div>
|
||||||
|
<el-form-item label="唯一标识" prop="onlyKey">
|
||||||
|
<el-select @focus="keyFocus" v-model="formData.onlyKey" placeholder="请选择唯一标识">
|
||||||
|
<el-option v-for="item in typeArray" :key="item.columnCode" :label="item.columnName" :value="item.columnCode"></el-option>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
</div>
|
</div>
|
||||||
</el-form>
|
</el-form>
|
||||||
<div style="float: right; margin: 20px 0">
|
<div style="float: right; margin: 20px 0">
|
||||||
@@ -349,6 +361,8 @@ const basicForm = {
|
|||||||
},
|
},
|
||||||
campusList: [],
|
campusList: [],
|
||||||
courseTypeList: [],
|
courseTypeList: [],
|
||||||
|
|
||||||
|
typeArray: [],
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
components: {
|
components: {
|
||||||
@@ -357,6 +371,19 @@ const basicForm = {
|
|||||||
"custom-form": customForm,
|
"custom-form": customForm,
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
keyFocus() {
|
||||||
|
const types = this.formData.courseList.filter(o => o.courseType !== undefined).map(o => o.courseType)
|
||||||
|
if(types.length === 0) {
|
||||||
|
this.$message.warning('请先设置' + this.activityType + '类型')
|
||||||
|
return
|
||||||
|
}
|
||||||
|
const typeList = this.courseTypeList.filter(o => types.includes(o.id))
|
||||||
|
let array = []
|
||||||
|
typeList.forEach(item => {
|
||||||
|
array = array.concat(item.familyMobileSignColumnList)
|
||||||
|
})
|
||||||
|
this.typeArray = array
|
||||||
|
},
|
||||||
async validNumber(row, old) {
|
async validNumber(row, old) {
|
||||||
if (GetQueryString("id") === "") {
|
if (GetQueryString("id") === "") {
|
||||||
if (row.courseReservedNumber > row.coursePeopleNumber && row.reserveMode === 1) {
|
if (row.courseReservedNumber > row.coursePeopleNumber && row.reserveMode === 1) {
|
||||||
@@ -593,6 +620,7 @@ const basicForm = {
|
|||||||
if (resp.code === 0) {
|
if (resp.code === 0) {
|
||||||
this.formData = resp.data
|
this.formData = resp.data
|
||||||
this.typeChange(this.formData.trainType)
|
this.typeChange(this.formData.trainType)
|
||||||
|
if(this.formData.onlyKey) this.keyFocus()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -11,6 +11,9 @@ const info = {
|
|||||||
<el-descriptions-item label="活动结束时间">{{viewData.activityEndTime}}</el-descriptions-item>
|
<el-descriptions-item label="活动结束时间">{{viewData.activityEndTime}}</el-descriptions-item>
|
||||||
<el-descriptions-item label="报名开始时间">{{viewData.activitySignUpStartTime}}</el-descriptions-item>
|
<el-descriptions-item label="报名开始时间">{{viewData.activitySignUpStartTime}}</el-descriptions-item>
|
||||||
<el-descriptions-item label="报名结束时间">{{viewData.activitySignUpEndTime}}</el-descriptions-item>
|
<el-descriptions-item label="报名结束时间">{{viewData.activitySignUpEndTime}}</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="详细信息" :span="2">
|
||||||
|
<div v-html="viewData.introduce"></div>
|
||||||
|
</el-descriptions-item>
|
||||||
</el-descriptions>
|
</el-descriptions>
|
||||||
</el-tab-pane>
|
</el-tab-pane>
|
||||||
<el-tab-pane :label="activityType + '信息'">
|
<el-tab-pane :label="activityType + '信息'">
|
||||||
|
|||||||
+1
@@ -158,6 +158,7 @@ const MEMBER_MANAGE_TABLE = {
|
|||||||
{prop: "birthday", label: "出生年月", sortable: true},
|
{prop: "birthday", label: "出生年月", sortable: true},
|
||||||
{prop: "userState", label: "在职状态", sortable: true},
|
{prop: "userState", label: "在职状态", sortable: true},
|
||||||
{prop: "preparedBy", label: "聘用方式", sortable: true},
|
{prop: "preparedBy", label: "聘用方式", sortable: true},
|
||||||
|
{prop: "postDoctoralJoinDate", label: "进站时间", sortable: true},
|
||||||
{prop: "personType", label: "人员类型", sortable: true},
|
{prop: "personType", label: "人员类型", sortable: true},
|
||||||
{prop: "unionName", label: "所属工会", sortable: true},
|
{prop: "unionName", label: "所属工会", sortable: true},
|
||||||
{prop: "unitName", label: "所属单位", sortable: true}
|
{prop: "unitName", label: "所属单位", sortable: true}
|
||||||
|
|||||||
@@ -43,7 +43,7 @@ const applyForm = {
|
|||||||
<div style="display: flex; align-items: center; justify-content: space-between">
|
<div style="display: flex; align-items: center; justify-content: space-between">
|
||||||
<div>{{activity.keyWord}}信息</div>
|
<div>{{activity.keyWord}}信息</div>
|
||||||
<div>
|
<div>
|
||||||
<van-tag @click="delFamily" size="large" type="primary" color="lightgrey">删除{{activity.keyWord}}</van-tag>
|
<van-tag @click="delFamily" size="large" type="primary" color="#ff3b30">删除{{activity.keyWord}}</van-tag>
|
||||||
<van-tag @click="addFamily" size="large" type="primary" color="#1867b0">添加{{activity.keyWord}}</van-tag>
|
<van-tag @click="addFamily" size="large" type="primary" color="#1867b0">添加{{activity.keyWord}}</van-tag>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -89,8 +89,8 @@ const applyForm = {
|
|||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
addFamily() {
|
addFamily() {
|
||||||
if(this.formData.mobileColumnsValue.length >= this.formData.count) {
|
if(this.formData.mobileColumnsValue.length >= this.activity.familyMaxCount) {
|
||||||
this.$toast('您选择的名额数为' + this.formData.count + ',' + this.activity.keyWord + '最多人数为' + this.formData.count)
|
this.$toast(this.activity.keyWord + '最多人数为' + this.activity.familyMaxCount)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
const list = clone(this.courseType.familyMobileSignColumnList)
|
const list = clone(this.courseType.familyMobileSignColumnList)
|
||||||
@@ -273,6 +273,9 @@ const applyForm = {
|
|||||||
courseId: this.formData.courseId,
|
courseId: this.formData.courseId,
|
||||||
currentFamilyNumber: this.formData.mobileColumnsValue.length || 0
|
currentFamilyNumber: this.formData.mobileColumnsValue.length || 0
|
||||||
})
|
})
|
||||||
|
if(res.code !== 0) {
|
||||||
|
this.$dialog.alert({title: '温馨提示', message: res.msg})
|
||||||
|
}
|
||||||
return res.code === 0
|
return res.code === 0
|
||||||
},
|
},
|
||||||
async validateCourseTime() {
|
async validateCourseTime() {
|
||||||
@@ -280,6 +283,9 @@ const applyForm = {
|
|||||||
activityCourseId: this.formData.activityCourseId,
|
activityCourseId: this.formData.activityCourseId,
|
||||||
courseId: this.row.id
|
courseId: this.row.id
|
||||||
})
|
})
|
||||||
|
if(res.code !== 0) {
|
||||||
|
this.$dialog.alert({title: '温馨提示', message: res.msg})
|
||||||
|
}
|
||||||
return res.code === 0
|
return res.code === 0
|
||||||
},
|
},
|
||||||
async onSubmit() {
|
async onSubmit() {
|
||||||
@@ -310,11 +316,13 @@ const applyForm = {
|
|||||||
})
|
})
|
||||||
formData.mobileColumnsValue = JSON.stringify(clone(array))
|
formData.mobileColumnsValue = JSON.stringify(clone(array))
|
||||||
this.$axios.post("/platform/family/apply/doSignUp", formData).then(res => {
|
this.$axios.post("/platform/family/apply/doSignUp", formData).then(res => {
|
||||||
if (res.code === 0) {
|
this.$dialog.alert({title: '温馨提示', message: res.msg})
|
||||||
this.$toast(res.msg)
|
.then(() => {
|
||||||
this.visible = false
|
if (res.code === 0) {
|
||||||
this.$emit('refresh')
|
this.visible = false
|
||||||
}
|
this.$emit('refresh')
|
||||||
|
}
|
||||||
|
})
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -12,6 +12,10 @@ layout("/layouts/platform_h5.html"){
|
|||||||
font-size: 14px;
|
font-size: 14px;
|
||||||
border-radius: 6px;
|
border-radius: 6px;
|
||||||
}
|
}
|
||||||
|
.table-list-container .table-list-item .item-title, .table-list-container .table-list-item .item-title {
|
||||||
|
text-overflow: unset !important;
|
||||||
|
white-space: normal !important;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
<div id="app">
|
<div id="app">
|
||||||
@@ -37,15 +41,20 @@ layout("/layouts/platform_h5.html"){
|
|||||||
</template>
|
</template>
|
||||||
<template v-slot="{index,row}">
|
<template v-slot="{index,row}">
|
||||||
<table-column label="类型">{{row.typeName}}</table-column>
|
<table-column label="类型">{{row.typeName}}</table-column>
|
||||||
|
<table-column label="校区">{{row.campus}}</table-column>
|
||||||
<table-column label="地点">{{row.courseLocation}}</table-column>
|
<table-column label="地点">{{row.courseLocation}}</table-column>
|
||||||
<table-column label="联系人">{{row.courseInstructor}}</table-column>
|
<table-column label="联系人">{{row.courseInstructor}}</table-column>
|
||||||
<table-column label="时间">
|
<table-column label="时间">
|
||||||
<span v-if="row.courseTimes && row.courseTimes.length === 1" class="primary-color" @click="onTime(row)">
|
<span v-if="row.courseTimes && row.courseTimes.length === 1" class="primary-color" @click="onTime(row)">
|
||||||
{{ $moment(row.courseTimes[0].courseStartTime).format('MM月DD日 HH:mm') + '~' + $moment(row.courseTimes[0].courseEndTime).format('HH:mm') }}
|
{{ weekdayCNMap[$moment(row.courseTimes[0].courseDate).day()]
|
||||||
|
+ ' '
|
||||||
|
+ $moment(row.courseTimes[0].courseStartTime).format('MM月DD日 HH:mm')
|
||||||
|
+ '~'
|
||||||
|
+ $moment(row.courseTimes[0].courseEndTime).format('HH:mm') }}
|
||||||
</span>
|
</span>
|
||||||
<span v-else @click="onTime(row)" class="primary-color">点我查看</span>
|
<span v-else @click="onTime(row)" class="primary-color">点我查看</span>
|
||||||
</table-column>
|
</table-column>
|
||||||
<table-column v-if="row.introduce" label="详细信息">
|
<table-column v-if="row.introduce?.trim()" label="详细信息">
|
||||||
<span @click="introduceRow = row; introduceVisible = true" class="primary-color">点我查看</span>
|
<span @click="introduceRow = row; introduceVisible = true" class="primary-color">点我查看</span>
|
||||||
</table-column>
|
</table-column>
|
||||||
</template>
|
</template>
|
||||||
@@ -114,6 +123,7 @@ layout("/layouts/platform_h5.html"){
|
|||||||
|
|
||||||
introduceRow: {},
|
introduceRow: {},
|
||||||
activity: {},
|
activity: {},
|
||||||
|
weekdayCNMap: {0: '周日', 1: '周一', 2: '周二', 3: '周三', 4: '周四', 5: '周五', 6: '周六'},
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
|||||||
Reference in New Issue
Block a user