活动
This commit is contained in:
+1
-1
@@ -94,7 +94,7 @@ public class ActivityUnionApplyUserController {
|
|||||||
cnd.andEx("tissue.type", "=", type);
|
cnd.andEx("tissue.type", "=", type);
|
||||||
cnd.andEx("tissue.state", "=", 3);
|
cnd.andEx("tissue.state", "=", 3);
|
||||||
cnd.andEx("tissue.projectTypeCode", "!=", 50004);
|
cnd.andEx("tissue.projectTypeCode", "!=", 50004);
|
||||||
cnd.andEx("tissue.signUpMethod", "in", List.of(1, 2));
|
cnd.andEx("tissue.signUpMethod", "in", List.of(1, 2, 3));
|
||||||
|
|
||||||
if (Strings.isNotBlank(name)) {
|
if (Strings.isNotBlank(name)) {
|
||||||
cnd.where().andLike("tissue.name", name);
|
cnd.where().andLike("tissue.name", name);
|
||||||
|
|||||||
+43
-3
@@ -3,6 +3,7 @@ package io.v.nutz.zhgh.activity.controller.union;
|
|||||||
import cn.afterturn.easypoi.excel.ExcelExportUtil;
|
import cn.afterturn.easypoi.excel.ExcelExportUtil;
|
||||||
import cn.afterturn.easypoi.excel.entity.ExportParams;
|
import cn.afterturn.easypoi.excel.entity.ExportParams;
|
||||||
import cn.afterturn.easypoi.excel.entity.params.ExcelExportEntity;
|
import cn.afterturn.easypoi.excel.entity.params.ExcelExportEntity;
|
||||||
|
import cn.hutool.core.util.StrUtil;
|
||||||
import com.deepoove.poi.XWPFTemplate;
|
import com.deepoove.poi.XWPFTemplate;
|
||||||
import com.deepoove.poi.config.Configure;
|
import com.deepoove.poi.config.Configure;
|
||||||
import com.deepoove.poi.policy.HackLoopTableRenderPolicy;
|
import com.deepoove.poi.policy.HackLoopTableRenderPolicy;
|
||||||
@@ -36,6 +37,7 @@ import org.nutz.dao.util.cri.SqlExpressionGroup;
|
|||||||
import org.nutz.ioc.aop.Aop;
|
import org.nutz.ioc.aop.Aop;
|
||||||
import org.nutz.ioc.loader.annotation.Inject;
|
import org.nutz.ioc.loader.annotation.Inject;
|
||||||
import org.nutz.ioc.loader.annotation.IocBean;
|
import org.nutz.ioc.loader.annotation.IocBean;
|
||||||
|
import org.nutz.lang.Lang;
|
||||||
import org.nutz.lang.Strings;
|
import org.nutz.lang.Strings;
|
||||||
import org.nutz.lang.util.NutMap;
|
import org.nutz.lang.util.NutMap;
|
||||||
import org.nutz.mvc.annotation.At;
|
import org.nutz.mvc.annotation.At;
|
||||||
@@ -143,6 +145,41 @@ public class ActivityUnionManageController {
|
|||||||
return sysUserService.listPageMap(1, 30, sql);
|
return sysUserService.listPageMap(1, 30, sql);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@At
|
||||||
|
@ViReturn
|
||||||
|
@Aop(TransAop.READ_COMMITTED)
|
||||||
|
@RequiresPermissions(value = {"activity.union.info", "activity.club.info", "activity.school.info2"}, logical = Logical.OR)
|
||||||
|
public Object doSave(@Param(value = "tissue") ActivityTissue tissue){
|
||||||
|
tissue.setUserId(StrUtil.isNotBlank(tissue.getUserId()) ? tissue.getUserId() : ShiroUtil.getUserId());
|
||||||
|
tissue.setApplyTime(StrUtil.isNotBlank(tissue.getApplyTime()) ? tissue.getApplyTime() : DateUtil.getDate());
|
||||||
|
tissue.setState(0);
|
||||||
|
|
||||||
|
if (tissue.getType() == 40002) {
|
||||||
|
tissue.setUnionId(Vi.getUnionId());
|
||||||
|
} else if (tissue.getType() == 40003) {
|
||||||
|
tissue.setClubId(vi.getClubId());
|
||||||
|
}
|
||||||
|
// 如果有商品,则设置商品活动编码和活动id
|
||||||
|
if (Lang.isNotEmpty(tissue.getGoods())) {
|
||||||
|
tissue.getGoods().forEach(v -> {
|
||||||
|
v.setActivityCode(tissue.getActivityCode());
|
||||||
|
v.setReid(tissue.getId());
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
activityTissueService.insertWith(tissue, "tissuePersonList");
|
||||||
|
activitySchoolService.dao().insert(tissue.getGoods());
|
||||||
|
|
||||||
|
if (tissue.getIsEnrollSystem()) {
|
||||||
|
Sys_home_activity sysHomeActivity = tissue.covertToSysHomeActivity();
|
||||||
|
activitySchoolService.dao().insertOrUpdate(sysHomeActivity);
|
||||||
|
}
|
||||||
|
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 校工会添加
|
* 校工会添加
|
||||||
*
|
*
|
||||||
@@ -154,12 +191,14 @@ public class ActivityUnionManageController {
|
|||||||
@Aop(TransAop.READ_COMMITTED)
|
@Aop(TransAop.READ_COMMITTED)
|
||||||
@RequiresPermissions(value = {"activity.union.info", "activity.club.info", "activity.school.info2"}, logical = Logical.OR)
|
@RequiresPermissions(value = {"activity.union.info", "activity.club.info", "activity.school.info2"}, logical = Logical.OR)
|
||||||
public Object doAdd(@Param(value = "tissue") ActivityTissue tissue) {
|
public Object doAdd(@Param(value = "tissue") ActivityTissue tissue) {
|
||||||
tissue.setUserId(ShiroUtil.getUserId());
|
tissue.setUserId(StrUtil.isNotBlank(tissue.getUserId()) ? tissue.getUserId() : ShiroUtil.getUserId());
|
||||||
tissue.setApplyTime(DateUtil.getDate());
|
tissue.setApplyTime(StrUtil.isNotBlank(tissue.getApplyTime()) ? tissue.getApplyTime() : DateUtil.getDate());
|
||||||
if (!ShiroUtil.hasAnyRoles("sysadmin,A06")) {
|
if (!ShiroUtil.hasAnyRoles("sysadmin,A06")) {
|
||||||
tissue.setState(1);
|
tissue.setState(1);
|
||||||
} else {
|
} else {
|
||||||
tissue.setState(3);
|
tissue.setState(3);
|
||||||
|
tissue.setIsDisabled(true);
|
||||||
|
tissue.setIsEnrollSystem(true);
|
||||||
}
|
}
|
||||||
if (tissue.getType() == 40002) {
|
if (tissue.getType() == 40002) {
|
||||||
tissue.setUnionId(Vi.getUnionId());
|
tissue.setUnionId(Vi.getUnionId());
|
||||||
@@ -170,13 +209,14 @@ public class ActivityUnionManageController {
|
|||||||
v.setActivityCode(tissue.getActivityCode());
|
v.setActivityCode(tissue.getActivityCode());
|
||||||
v.setReid(tissue.getId());
|
v.setReid(tissue.getId());
|
||||||
});
|
});
|
||||||
tissue.getCover();
|
// tissue.getCover();
|
||||||
|
|
||||||
activityTissueService.insertWith(tissue, "tissuePersonList");
|
activityTissueService.insertWith(tissue, "tissuePersonList");
|
||||||
activitySchoolService.dao().insert(tissue.getGoods());
|
activitySchoolService.dao().insert(tissue.getGoods());
|
||||||
|
|
||||||
if (tissue.getIsEnrollSystem()) {
|
if (tissue.getIsEnrollSystem()) {
|
||||||
Sys_home_activity sysHomeActivity = tissue.covertToSysHomeActivity();
|
Sys_home_activity sysHomeActivity = tissue.covertToSysHomeActivity();
|
||||||
|
sysHomeActivity.setEnable(true);
|
||||||
activitySchoolService.dao().insertOrUpdate(sysHomeActivity);
|
activitySchoolService.dao().insertOrUpdate(sysHomeActivity);
|
||||||
}
|
}
|
||||||
return null;
|
return null;
|
||||||
|
|||||||
@@ -20,6 +20,7 @@ import org.nutz.dao.Cnd;
|
|||||||
import org.nutz.dao.Dao;
|
import org.nutz.dao.Dao;
|
||||||
import org.nutz.dao.Sqls;
|
import org.nutz.dao.Sqls;
|
||||||
import org.nutz.dao.sql.Sql;
|
import org.nutz.dao.sql.Sql;
|
||||||
|
import org.nutz.dao.util.cri.SqlExpressionGroup;
|
||||||
import org.nutz.ioc.aop.Aop;
|
import org.nutz.ioc.aop.Aop;
|
||||||
import org.nutz.ioc.loader.annotation.Inject;
|
import org.nutz.ioc.loader.annotation.Inject;
|
||||||
import org.nutz.ioc.loader.annotation.IocBean;
|
import org.nutz.ioc.loader.annotation.IocBean;
|
||||||
@@ -67,8 +68,12 @@ public class ActivityTissueServiceImpl extends ViServiceImpl<ActivityTissue> imp
|
|||||||
$condition
|
$condition
|
||||||
""");
|
""");
|
||||||
|
|
||||||
cnd.andEx("YEAR(tissue.startTime)", "=", year);
|
cnd.andEx("YEAR(tissue.applyTime)", "=", year);
|
||||||
cnd.andEx("tissue.projectTypeCode", "!=", "50004");
|
SqlExpressionGroup seg = new SqlExpressionGroup();
|
||||||
|
seg.or("tissue.projectTypeCode", "!=", "50004");
|
||||||
|
seg.or("tissue.projectTypeCode", "is", null);
|
||||||
|
cnd.and(seg);
|
||||||
|
// cnd.andEx("tissue.projectTypeCode", "!=", "50004");
|
||||||
cnd.andEx("tissue.unionId", "=", unionId);
|
cnd.andEx("tissue.unionId", "=", unionId);
|
||||||
cnd.andEx("tissue.type", "=", type);
|
cnd.andEx("tissue.type", "=", type);
|
||||||
|
|
||||||
|
|||||||
+11
-7
@@ -240,9 +240,9 @@ public class SourceChangeManageServiceImpl extends BaseServiceImpl<SourceChangeM
|
|||||||
sysRoleService.clearCache();
|
sysRoleService.clearCache();
|
||||||
|
|
||||||
// 如果有单位异动,发送消息提醒分工会
|
// 如果有单位异动,发送消息提醒分工会
|
||||||
// if (middleTable.getChangeTypes().contains(MemberChangeType.UNIT_CHANGE.name())){
|
if (middleTable.getChangeTypes().contains(MemberChangeType.UNIT_CHANGE.name())){
|
||||||
// sendUnitChangeTeacher(middleTable, history);
|
sendUnitChangeTeacher(middleTable, history);
|
||||||
// }
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -267,7 +267,7 @@ public class SourceChangeManageServiceImpl extends BaseServiceImpl<SourceChangeM
|
|||||||
@Override
|
@Override
|
||||||
public void sendUnitChangeTeacher(SourceChangeMiddleTable middleTable, UserHistory history) {
|
public void sendUnitChangeTeacher(SourceChangeMiddleTable middleTable, UserHistory history) {
|
||||||
// 查询出异动前的工会
|
// 查询出异动前的工会
|
||||||
Sql beforeUnionSql = Sqls.create("select un.id,un.unionname from sys_union un left join sys_unit unit on unit.unionid where unit.id = @unitId")
|
Sql beforeUnionSql = Sqls.create("select un.id,un.unionname from sys_unit unit left join sys_union un on unit.unionid = un.id where unit.id = @unitId")
|
||||||
.setParam("unitId", history.getUnitid());
|
.setParam("unitId", history.getUnitid());
|
||||||
beforeUnionSql.setCallback(Sqls.callback.map());
|
beforeUnionSql.setCallback(Sqls.callback.map());
|
||||||
dao().execute(beforeUnionSql);
|
dao().execute(beforeUnionSql);
|
||||||
@@ -275,7 +275,7 @@ public class SourceChangeManageServiceImpl extends BaseServiceImpl<SourceChangeM
|
|||||||
|
|
||||||
|
|
||||||
// 查询出异动后的工会
|
// 查询出异动后的工会
|
||||||
Sql afterUnionSql = Sqls.create("select un.id,un.unionname from sys_union un left join sys_unit unit on unit.unionid where unit.id = @unitId")
|
Sql afterUnionSql = Sqls.create("select un.id,un.unionname from sys_unit unit left join sys_union un on unit.unionid = un.id where unit.id = @unitId")
|
||||||
.setParam("unitId", middleTable.getUnitid());
|
.setParam("unitId", middleTable.getUnitid());
|
||||||
afterUnionSql.setCallback(Sqls.callback.map());
|
afterUnionSql.setCallback(Sqls.callback.map());
|
||||||
dao().execute(afterUnionSql);
|
dao().execute(afterUnionSql);
|
||||||
@@ -301,7 +301,9 @@ public class SourceChangeManageServiceImpl extends BaseServiceImpl<SourceChangeM
|
|||||||
for (NutMap map : beforeMapList) {
|
for (NutMap map : beforeMapList) {
|
||||||
String beforeContent = "尊敬的%s老师,根据学校最新人员信息调整,%s老师的工会关系已从您处调整至%s。特此告知,烦请知悉。祝您生活愉快!"
|
String beforeContent = "尊敬的%s老师,根据学校最新人员信息调整,%s老师的工会关系已从您处调整至%s。特此告知,烦请知悉。祝您生活愉快!"
|
||||||
.formatted(map.getString("username"), middleTable.getUsername(), afterUnionMap.getString("unionname"));
|
.formatted(map.getString("username"), middleTable.getUsername(), afterUnionMap.getString("unionname"));
|
||||||
// msgApi.sendMsg(List.of("DingTalk"), map.getString("loginname"), 1, "工会关系转出通知", beforeContent, "", "");
|
|
||||||
|
System.out.println(beforeContent);
|
||||||
|
msgApi.sendMsg(List.of("DingTalk"), map.getString("loginname"), 1, "工会关系转出通知", beforeContent, "", "");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -325,7 +327,9 @@ public class SourceChangeManageServiceImpl extends BaseServiceImpl<SourceChangeM
|
|||||||
for (NutMap map : afterMapList) {
|
for (NutMap map : afterMapList) {
|
||||||
String afterContent = "尊敬的%s老师,根据学校最新人员信息调整,%s老师的工会关系已从%s调整至您处。特此告知,烦请知悉。祝您生活愉快!"
|
String afterContent = "尊敬的%s老师,根据学校最新人员信息调整,%s老师的工会关系已从%s调整至您处。特此告知,烦请知悉。祝您生活愉快!"
|
||||||
.formatted(map.getString("username"), middleTable.getUsername(), beforeUnionMap.getString("unionname"));
|
.formatted(map.getString("username"), middleTable.getUsername(), beforeUnionMap.getString("unionname"));
|
||||||
// msgApi.sendMsg(List.of("DingTalk"), map.getString("loginname"), 1, "工会关系转入通知", afterContent, "", "");
|
|
||||||
|
System.out.println(afterContent);
|
||||||
|
msgApi.sendMsg(List.of("DingTalk"), map.getString("loginname"), 1, "工会关系转入通知", afterContent, "", "");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -171,10 +171,10 @@
|
|||||||
|
|
||||||
<el-col :lg="12" :xl="12" :xs="24">
|
<el-col :lg="12" :xl="12" :xs="24">
|
||||||
<el-form-item label="活动人数" prop="peopleNum">
|
<el-form-item label="活动人数" prop="peopleNum">
|
||||||
<el-input :disabled="[1,2].includes(formData.signUpMethod)"
|
<el-input-number :disabled="[1,2].includes(formData.signUpMethod)"
|
||||||
maxlength="10"
|
maxlength="10" style="width: 100%"
|
||||||
placeholder="请填写活动人数"
|
placeholder="请填写活动人数"
|
||||||
v-model="formData.peopleNum"></el-input>
|
v-model="formData.peopleNum"></el-input-number>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
|
|
||||||
@@ -246,6 +246,7 @@
|
|||||||
<el-form-item label="组队人数" prop="totalUserNumberLimit">
|
<el-form-item label="组队人数" prop="totalUserNumberLimit">
|
||||||
<el-input-number :max="2000" :min="1"
|
<el-input-number :max="2000" :min="1"
|
||||||
:precision="0"
|
:precision="0"
|
||||||
|
style="width: 100%"
|
||||||
v-model="formData.teamNum"
|
v-model="formData.teamNum"
|
||||||
></el-input-number>
|
></el-input-number>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
@@ -254,7 +255,7 @@
|
|||||||
<el-col :lg="12" :xl="12" :xs="12"
|
<el-col :lg="12" :xl="12" :xs="12"
|
||||||
v-if="[1,2,3].includes(formData.signUpMethod) && formData.userNumberLimit===1">
|
v-if="[1,2,3].includes(formData.signUpMethod) && formData.userNumberLimit===1">
|
||||||
<el-form-item label="总人数限制" prop="totalUserNumberLimit">
|
<el-form-item label="总人数限制" prop="totalUserNumberLimit">
|
||||||
<el-input-number :max="2000"
|
<el-input-number :max="2000" style="width: 100%"
|
||||||
:min="1" :precision="0"
|
:min="1" :precision="0"
|
||||||
v-model="formData.totalUserNumberLimit"
|
v-model="formData.totalUserNumberLimit"
|
||||||
></el-input-number>
|
></el-input-number>
|
||||||
@@ -392,6 +393,7 @@
|
|||||||
<el-form-item label="签到半径(m)">
|
<el-form-item label="签到半径(m)">
|
||||||
<el-input-number :max="1000"
|
<el-input-number :max="1000"
|
||||||
:min="50"
|
:min="50"
|
||||||
|
style="width: 100%"
|
||||||
:precision="0" :step="1"
|
:precision="0" :step="1"
|
||||||
@change="rangeMeterChange"
|
@change="rangeMeterChange"
|
||||||
v-model="formData.rangeMeter"></el-input-number>
|
v-model="formData.rangeMeter"></el-input-number>
|
||||||
@@ -411,16 +413,24 @@
|
|||||||
|
|
||||||
|
|
||||||
<el-col :span="24">
|
<el-col :span="24">
|
||||||
<el-form-item label="活动内容" prop="activityContent">
|
<el-form-item label="活动介绍" prop="activityContent" :rules="{required:true,message: '请输入活动介绍', trigger: 'blur'}">
|
||||||
<el-input
|
<text-editor v-model="formData.activityContent" ref="contentEditor"></text-editor>
|
||||||
:rows="7"
|
<!-- <el-input-->
|
||||||
placeholder="请输入活动内容"
|
<!-- :rows="7"-->
|
||||||
type="textarea"
|
<!-- placeholder="请输入活动内容"-->
|
||||||
v-model="formData.activityContent">
|
<!-- type="textarea"-->
|
||||||
</el-input>
|
<!-- v-model="formData.activityContent">-->
|
||||||
|
<!-- </el-input>-->
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
|
|
||||||
|
<el-col :span="24">
|
||||||
|
<el-form-item label="附件上传" prop="otherFiles">
|
||||||
|
<file-upload :files.sync="formData.otherFiles" card></file-upload>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
|
||||||
|
|
||||||
<el-col :span="24" v-if="formData.isEnrollSystem === false">
|
<el-col :span="24" v-if="formData.isEnrollSystem === false">
|
||||||
<el-form-item label="活动考核内容" prop="activityExamineContent">
|
<el-form-item label="活动考核内容" prop="activityExamineContent">
|
||||||
<el-input
|
<el-input
|
||||||
@@ -513,7 +523,6 @@
|
|||||||
style="color: #3ea1ec;">附件</span>
|
style="color: #3ea1ec;">附件</span>
|
||||||
</el-divider>
|
</el-divider>
|
||||||
<el-row :gutter="40">
|
<el-row :gutter="40">
|
||||||
|
|
||||||
<el-col :lg="12" :xl="12" :xs="24" class="mb25">
|
<el-col :lg="12" :xl="12" :xs="24" class="mb25">
|
||||||
<el-form-item label="发票" prop="billFiles">
|
<el-form-item label="发票" prop="billFiles">
|
||||||
<file-upload :files.sync="formData.billFiles"
|
<file-upload :files.sync="formData.billFiles"
|
||||||
@@ -526,18 +535,7 @@
|
|||||||
card></file-upload>
|
card></file-upload>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
|
|
||||||
</el-row>
|
</el-row>
|
||||||
|
|
||||||
<el-row>
|
|
||||||
<el-col :lg="12" :xl="12" :xs="24">
|
|
||||||
<el-form-item label="其他" prop="otherFiles">
|
|
||||||
<file-upload :files.sync="formData.otherFiles"
|
|
||||||
card></file-upload>
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
</el-row>
|
|
||||||
|
|
||||||
</el-tab-pane>
|
</el-tab-pane>
|
||||||
|
|
||||||
<el-tab-pane label="活动人员信息" name="3" v-if="formData.isEnrollSystem === false">
|
<el-tab-pane label="活动人员信息" name="3" v-if="formData.isEnrollSystem === false">
|
||||||
@@ -599,8 +597,10 @@
|
|||||||
</el-tab-pane>
|
</el-tab-pane>
|
||||||
</el-tabs>
|
</el-tabs>
|
||||||
</el-form>
|
</el-form>
|
||||||
<div style="padding: 20px;text-align: center;">
|
<div style="padding: 20px;text-align: right;">
|
||||||
<el-button @click="operation" style="width: 300px" type="primary">确 定</el-button>
|
<el-button v-if="formData.id" @click="doBack" style="width: 120px">返 回</el-button>
|
||||||
|
<el-button @click="doSave" style="width: 120px" type="primary">保 存</el-button>
|
||||||
|
<el-button @click="operation" style="width: 120px" type="primary">提 交</el-button>
|
||||||
</div>
|
</div>
|
||||||
</el-card>
|
</el-card>
|
||||||
|
|
||||||
@@ -699,6 +699,21 @@
|
|||||||
'drawer-user-scope': httpVueLoader('/components/plugins/DrawerUserScope.vue'),
|
'drawer-user-scope': httpVueLoader('/components/plugins/DrawerUserScope.vue'),
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
doBack() {
|
||||||
|
this.$confirm('返回将不会保存新填写或修改的内容,确定要返回吗?', '提示', {
|
||||||
|
confirmButtonText: '确定',
|
||||||
|
cancelButtonText: '取消',
|
||||||
|
type: 'warning'
|
||||||
|
}).then(async () => {
|
||||||
|
if (type === 40002) {
|
||||||
|
sublime.jumpPagePjax("/platform/activity/info/mange/union")
|
||||||
|
} else if (type === 40003) {
|
||||||
|
sublime.jumpPagePjax("/platform/activity/info/mange/club")
|
||||||
|
} else {
|
||||||
|
sublime.jumpPagePjax("/platform/activity/info/mange/school")
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
//应用比例设置
|
//应用比例设置
|
||||||
applyScaleSettings() {
|
applyScaleSettings() {
|
||||||
this.formData.unionUserNumberLimit.forEach(v => {
|
this.formData.unionUserNumberLimit.forEach(v => {
|
||||||
@@ -839,47 +854,56 @@
|
|||||||
const resp = await $.get('/platform/activity/apply/getUnionData', {activityScopeGroupId: val})
|
const resp = await $.get('/platform/activity/apply/getUnionData', {activityScopeGroupId: val})
|
||||||
this.formData.unionUserNumberLimit = resp.data
|
this.formData.unionUserNumberLimit = resp.data
|
||||||
},
|
},
|
||||||
|
async doSave() {
|
||||||
|
if (!this.formData.name) {
|
||||||
|
this.$message.warning('请输入活动名称')
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
async operation() {
|
|
||||||
if (this.formData.applyTime2 && this.formData.applyTime2.length > 0) {
|
if (this.formData.applyTime2 && this.formData.applyTime2.length > 0) {
|
||||||
if (moment(this.formData.time[0]).valueOf() <= moment(this.formData.applyTime2[0]).valueOf()) {
|
if (moment(this.formData.time[0]).valueOf() <= moment(this.formData.applyTime2[0]).valueOf()) {
|
||||||
this.$notify.error({title: '错误', message: '活动时间必须晚于报名时间'});
|
this.$message.warning('活动时间必须晚于报名时间')
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
let url = this.formData.id ? "/doEdit" : "/doAdd"
|
|
||||||
this.$refs["addForm"].validate(async (valid) => {
|
|
||||||
if (valid) {
|
|
||||||
const loading = this.$loading({
|
|
||||||
lock: true,
|
|
||||||
text: '正在提交...',
|
|
||||||
spinner: 'el-icon-loading',
|
|
||||||
background: COVER_LAYER_COLOR
|
|
||||||
});
|
|
||||||
|
|
||||||
const formData = JSON.parse(JSON.stringify(this.formData))
|
this.$confirm('保存后可在左侧活动信息管理中重新编辑,确定要保存吗?', '提示', {
|
||||||
formData.type = this.pageForm.type
|
confirmButtonText: '确定',
|
||||||
formData.apply_type = 1
|
cancelButtonText: '取消',
|
||||||
const {time, applyTime2, plannedDate} = formData
|
type: 'warning'
|
||||||
if (applyTime2 && applyTime2.length) {
|
}).then(async () => {
|
||||||
formData.applyStartTime = applyTime2[0]
|
const loading = this.$loading({
|
||||||
formData.applyEndTime = applyTime2[1]
|
lock: true,
|
||||||
formData.applyTime2 = undefined
|
text: '正在提交...',
|
||||||
}
|
spinner: 'el-icon-loading',
|
||||||
if (time && time.length) {
|
background: COVER_LAYER_COLOR
|
||||||
formData.startTime = formData.time[0]
|
});
|
||||||
formData.endTime = formData.time[1]
|
|
||||||
formData.time = undefined
|
|
||||||
}
|
|
||||||
if (plannedDate && plannedDate.length) {
|
|
||||||
formData.startPlannedDate = formData.plannedDate[0]
|
|
||||||
formData.endPlannedDate = formData.plannedDate[1]
|
|
||||||
formData.plannedDate = undefined
|
|
||||||
}
|
|
||||||
|
|
||||||
const resp = await $.post(this.actvivtyUrl + url, {tissue: JSON.stringify(formData)})
|
const formData = JSON.parse(JSON.stringify(this.formData))
|
||||||
loading.close()
|
formData.type = this.pageForm.type
|
||||||
if (resp.code === 0) {
|
formData.apply_type = 1
|
||||||
|
const {time, applyTime2, plannedDate} = formData
|
||||||
|
if (applyTime2 && applyTime2.length) {
|
||||||
|
formData.applyStartTime = applyTime2[0]
|
||||||
|
formData.applyEndTime = applyTime2[1]
|
||||||
|
formData.applyTime2 = undefined
|
||||||
|
}
|
||||||
|
if (time && time.length) {
|
||||||
|
formData.startTime = formData.time[0]
|
||||||
|
formData.endTime = formData.time[1]
|
||||||
|
formData.time = undefined
|
||||||
|
}
|
||||||
|
if (plannedDate && plannedDate.length) {
|
||||||
|
formData.startPlannedDate = formData.plannedDate[0]
|
||||||
|
formData.endPlannedDate = formData.plannedDate[1]
|
||||||
|
formData.plannedDate = undefined
|
||||||
|
}
|
||||||
|
|
||||||
|
const resp = await $.post(this.actvivtyUrl + "/doSave", {tissue: JSON.stringify(formData)})
|
||||||
|
loading.close()
|
||||||
|
if (resp.code === 0) {
|
||||||
|
this.$message.success(resp.msg)
|
||||||
|
setTimeout(() => {
|
||||||
if (type === 40002) {
|
if (type === 40002) {
|
||||||
sublime.jumpPagePjax("/platform/activity/info/mange/union")
|
sublime.jumpPagePjax("/platform/activity/info/mange/union")
|
||||||
} else if (type === 40003) {
|
} else if (type === 40003) {
|
||||||
@@ -887,13 +911,84 @@
|
|||||||
} else {
|
} else {
|
||||||
sublime.jumpPagePjax("/platform/activity/info/mange/school")
|
sublime.jumpPagePjax("/platform/activity/info/mange/school")
|
||||||
}
|
}
|
||||||
} else {
|
}, 1000)
|
||||||
this.notifyWarning(resp.msg)
|
|
||||||
}
|
|
||||||
} else {
|
} else {
|
||||||
this.$notify.error({title: '错误', message: '存在未填写的的必填项'});
|
this.$message.warning(resp.msg)
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
async operation() {
|
||||||
|
if (this.formData.applyTime2 && this.formData.applyTime2.length > 0) {
|
||||||
|
if (moment(this.formData.time[0]).valueOf() <= moment(this.formData.applyTime2[0]).valueOf()) {
|
||||||
|
this.$notify.error({title: '错误', message: '活动时间必须晚于报名时间'});
|
||||||
|
return
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
let url = this.formData.id ? "/doEdit" : "/doAdd"
|
||||||
|
this.$refs["addForm"].validate(async (valid) => {
|
||||||
|
if (valid) {
|
||||||
|
|
||||||
|
this.$confirm('确定要提交吗,请确保信息填写无误哦?', '提示', {
|
||||||
|
confirmButtonText: '确定',
|
||||||
|
cancelButtonText: '取消',
|
||||||
|
type: 'warning'
|
||||||
|
}).then(async () => {
|
||||||
|
|
||||||
|
const loading = this.$loading({
|
||||||
|
lock: true,
|
||||||
|
text: '正在提交...',
|
||||||
|
spinner: 'el-icon-loading',
|
||||||
|
background: COVER_LAYER_COLOR
|
||||||
|
});
|
||||||
|
|
||||||
|
const formData = JSON.parse(JSON.stringify(this.formData))
|
||||||
|
formData.type = this.pageForm.type
|
||||||
|
formData.apply_type = 1
|
||||||
|
const {time, applyTime2, plannedDate} = formData
|
||||||
|
if (applyTime2 && applyTime2.length) {
|
||||||
|
formData.applyStartTime = applyTime2[0]
|
||||||
|
formData.applyEndTime = applyTime2[1]
|
||||||
|
formData.applyTime2 = undefined
|
||||||
|
}
|
||||||
|
if (time && time.length) {
|
||||||
|
formData.startTime = formData.time[0]
|
||||||
|
formData.endTime = formData.time[1]
|
||||||
|
formData.time = undefined
|
||||||
|
}
|
||||||
|
if (plannedDate && plannedDate.length) {
|
||||||
|
formData.startPlannedDate = formData.plannedDate[0]
|
||||||
|
formData.endPlannedDate = formData.plannedDate[1]
|
||||||
|
formData.plannedDate = undefined
|
||||||
|
}
|
||||||
|
|
||||||
|
const resp = await $.post(this.actvivtyUrl + url, {tissue: JSON.stringify(formData)})
|
||||||
|
loading.close()
|
||||||
|
if (resp.code === 0) {
|
||||||
|
this.$message.success(resp.msg)
|
||||||
|
setTimeout(() => {
|
||||||
|
if (type === 40002) {
|
||||||
|
sublime.jumpPagePjax("/platform/activity/info/mange/union")
|
||||||
|
} else if (type === 40003) {
|
||||||
|
sublime.jumpPagePjax("/platform/activity/info/mange/club")
|
||||||
|
} else {
|
||||||
|
sublime.jumpPagePjax("/platform/activity/info/mange/school")
|
||||||
|
}
|
||||||
|
}, 1000)
|
||||||
|
} else {
|
||||||
|
this.$message.warning(resp.msg)
|
||||||
|
}
|
||||||
|
|
||||||
|
})
|
||||||
|
|
||||||
|
} else {
|
||||||
|
this.$message.warning('存在未填写的的必填项')
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
},
|
},
|
||||||
async init() {
|
async init() {
|
||||||
this.delNotesList = []
|
this.delNotesList = []
|
||||||
|
|||||||
@@ -84,9 +84,10 @@
|
|||||||
v-for="column in tableColumns">
|
v-for="column in tableColumns">
|
||||||
|
|
||||||
<template scope="{row}" v-if="column.prop=='time'">
|
<template scope="{row}" v-if="column.prop=='time'">
|
||||||
<span>
|
<span v-if="row.startTime && row.endTime">
|
||||||
{{moment(row.startTime).format('YYYY-MM-DD')}} - {{moment(row.endTime).format('YYYY-MM-DD')}}
|
{{ moment(row.startTime).format('YYYY-MM-DD')}} - {{ moment(row.endTime).format('YYYY-MM-DD')}}
|
||||||
</span>
|
</span>
|
||||||
|
<span v-else>{{ '未填写' }}</span>
|
||||||
</template>
|
</template>
|
||||||
<template scope="{row}" v-else-if="column.prop=='time2'">
|
<template scope="{row}" v-else-if="column.prop=='time2'">
|
||||||
{{row.applyStartTime}}-{{row.applyEndTime}}
|
{{row.applyStartTime}}-{{row.applyEndTime}}
|
||||||
@@ -113,10 +114,12 @@
|
|||||||
<span v-if="row.type==40001">校工会</span>
|
<span v-if="row.type==40001">校工会</span>
|
||||||
</template>
|
</template>
|
||||||
<template scope="{row}" v-else-if="column.prop=='state'">
|
<template scope="{row}" v-else-if="column.prop=='state'">
|
||||||
{{row.state===1?'未审核':row.state===2?'审核不通过':'审核通过'}}
|
<span v-if="row.state === 0" style="color: #fd835a">待提交</span>
|
||||||
|
<span v-else-if="row.state === 1" style="color: #fd835a">待校工会审核</span>
|
||||||
|
<span v-else-if="row.state === 2" style="color: #bc2a25">校工会审核拒绝</span>
|
||||||
|
<span v-else-if="row.state === 3" style="color: #0e9558">审核通过</span>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
|
|
||||||
<el-table-column align="center" header-align="center" label="操作"
|
<el-table-column align="center" header-align="center" label="操作"
|
||||||
@@ -133,6 +136,7 @@
|
|||||||
</el-dropdown-item>
|
</el-dropdown-item>
|
||||||
|
|
||||||
<el-dropdown-item :command="{type:'edit',row}"
|
<el-dropdown-item :command="{type:'edit',row}"
|
||||||
|
v-if="row.state===0 || ${@shiro.hasRole('sysadmin')||@shiro.hasRole('A06')}"
|
||||||
:disabled="row.projectTypeCode==50004">
|
:disabled="row.projectTypeCode==50004">
|
||||||
编辑
|
编辑
|
||||||
</el-dropdown-item>
|
</el-dropdown-item>
|
||||||
|
|||||||
@@ -3,69 +3,66 @@
|
|||||||
<template>
|
<template>
|
||||||
<el-card shadow="never">
|
<el-card shadow="never">
|
||||||
<div class="search">
|
<div class="search">
|
||||||
|
|
||||||
<div class="search-item">
|
<div class="search-item">
|
||||||
<div class="search-item-label">活动时间</div>
|
<div class="search-item-label">活动时间</div>
|
||||||
<div class="search-item-option">
|
<div class="search-item-option">
|
||||||
<el-date-picker
|
<el-date-picker
|
||||||
placeholder="选择年"
|
placeholder="选择年"
|
||||||
style="width: 100%"
|
style="width: 100%"
|
||||||
type="year"
|
type="year"
|
||||||
v-model="pageForm.year"
|
v-model="pageForm.year"
|
||||||
value-format="yyyy">
|
value-format="yyyy"
|
||||||
</el-date-picker>
|
></el-date-picker>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="search-item">
|
<div class="search-item">
|
||||||
<div class="search-item-label">活动名称</div>
|
<div class="search-item-label">活动名称</div>
|
||||||
<div class="search-item-option">
|
<div class="search-item-option">
|
||||||
<el-input clearable placeholder="请输入活动名称"
|
<el-input clearable placeholder="请输入活动名称" v-model="pageForm.name"></el-input>
|
||||||
v-model="pageForm.name"></el-input>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="search-query">
|
<div class="search-query">
|
||||||
<el-button @click="pageData" icon="el-icon-search" type="primary">搜索
|
<el-button @click="pageData" icon="el-icon-search" type="primary">搜索</el-button>
|
||||||
</el-button>
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</el-card>
|
</el-card>
|
||||||
|
|
||||||
|
|
||||||
<el-card class="mt10" shadow="never">
|
<el-card class="mt10" shadow="never">
|
||||||
<table-tool :app="this" label="活动列表">
|
<table-tool :app="this" label="活动列表"></table-tool>
|
||||||
|
|
||||||
</table-tool>
|
<el-table
|
||||||
|
:data="tableData"
|
||||||
|
:size="tableSize"
|
||||||
<el-table :data="tableData" :size="tableSize" @sort-change="pageOrder"
|
@sort-change="pageOrder"
|
||||||
class="vi-table" row-key="id" style="width: 100%;margin-bottom: 20px"
|
class="vi-table"
|
||||||
v-loading="tableLoading">
|
row-key="id"
|
||||||
|
style="width: 100%; margin-bottom: 20px"
|
||||||
<el-table-column :index="indexMethod" align="center" header-align="center"
|
v-loading="tableLoading"
|
||||||
label="序号" type="index"
|
>
|
||||||
width="80px"></el-table-column>
|
<el-table-column
|
||||||
|
:index="indexMethod"
|
||||||
|
align="center"
|
||||||
|
header-align="center"
|
||||||
|
label="序号"
|
||||||
|
type="index"
|
||||||
|
width="80px"
|
||||||
|
></el-table-column>
|
||||||
|
|
||||||
<el-table-column
|
<el-table-column
|
||||||
:label="column.label"
|
:label="column.label"
|
||||||
:prop="column.prop"
|
:prop="column.prop"
|
||||||
:sortable="column.sortable"
|
:sortable="column.sortable"
|
||||||
align="center"
|
align="center"
|
||||||
header-align="center"
|
header-align="center"
|
||||||
v-for="column in tableColumns">
|
v-for="column in tableColumns"
|
||||||
|
>
|
||||||
<template scope="{row}" v-if="column.prop=='time'">
|
<template scope="{row}" v-if="column.prop=='time'">
|
||||||
<span>
|
<span>{{moment(row.startTime).format('YYYY-MM-DD')}} - {{moment(row.endTime).format('YYYY-MM-DD')}}</span>
|
||||||
{{moment(row.startTime).format('YYYY-MM-DD')}} - {{moment(row.endTime).format('YYYY-MM-DD')}}
|
|
||||||
</span>
|
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<template scope="{row}" v-else-if="column.prop=='projectTypeName'">
|
<template scope="{row}" v-else-if="column.prop=='projectTypeName'">{{row.projectTypeName}}({{row.projectTypeCode}})</template>
|
||||||
{{row.projectTypeName}}({{row.projectTypeCode}})
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<template scope="{row}" v-else-if="column.prop=='tussueName'">
|
<template scope="{row}" v-else-if="column.prop=='tussueName'">
|
||||||
<span v-if="row.type==40002">{{row.unionname?row.unionname:'暂无'}}</span>
|
<span v-if="row.type==40002">{{row.unionname?row.unionname:'暂无'}}</span>
|
||||||
@@ -74,65 +71,61 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<template scope="{row}" v-else-if="column.prop=='countUser'">
|
<template scope="{row}" v-else-if="column.prop=='countUser'">
|
||||||
<el-tag type="success" v-if="row.countUser>0">已报名({{row.countUser}})
|
<el-tag type="success" v-if="row.countUser>0">已报名({{row.countUser}})</el-tag>
|
||||||
</el-tag>
|
|
||||||
<el-tag type="danger" v-else>未报名</el-tag>
|
<el-tag type="danger" v-else>未报名</el-tag>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
|
|
||||||
<el-table-column align="center" header-align="center" label="操作"
|
<el-table-column align="center" header-align="center" label="操作" prop="userOnline" width="200px">
|
||||||
prop="userOnline" width="200px">
|
|
||||||
<template scope="{row}">
|
<template scope="{row}">
|
||||||
<el-button :loading="row.loading" @click="openView(row)" size="mini"
|
<el-button :loading="row.loading" @click="openView(row)" size="mini" type="primary">查看</el-button>
|
||||||
type="primary">
|
|
||||||
查看
|
|
||||||
</el-button>
|
|
||||||
<template
|
<template
|
||||||
v-if="moment(row.applyStartTime).valueOf()<moment().valueOf()&&moment(row.applyEndTime).valueOf()>moment().valueOf()">
|
v-if="moment(row.applyStartTime).valueOf()<moment().valueOf()&&moment(row.applyEndTime).valueOf()>moment().valueOf()"
|
||||||
<el-button :loading="row.loading" @click="openAudit(row)"
|
>
|
||||||
size="mini"
|
<el-button :loading="row.loading" @click="openAudit(row)" size="mini" type="primary" v-if="row.signUpMethod === 2">
|
||||||
type="primary" v-if="row.signUpMethod === 2">
|
|
||||||
报名
|
报名
|
||||||
</el-button>
|
</el-button>
|
||||||
<el-button :loading="row.loading" @click="doAdd(row)" size="mini"
|
<el-button :loading="row.loading" @click="openAudit(row)" size="mini" type="primary" v-if="row.signUpMethod === 3">
|
||||||
type="primary"
|
|
||||||
v-if="row.signUpMethod === 1&&row.countUser===0">
|
|
||||||
报名
|
报名
|
||||||
</el-button>
|
</el-button>
|
||||||
<el-button :loading="row.loading" @click="doDelete(row)" size="mini"
|
<el-button
|
||||||
type="danger"
|
:loading="row.loading"
|
||||||
v-if="row.countUser>0&&row.signUpMethod === 1">
|
@click="doAdd(row)"
|
||||||
|
size="mini"
|
||||||
|
type="primary"
|
||||||
|
v-if="row.signUpMethod === 1&&row.countUser===0"
|
||||||
|
>
|
||||||
|
报名
|
||||||
|
</el-button>
|
||||||
|
<el-button
|
||||||
|
:loading="row.loading"
|
||||||
|
@click="doDelete(row)"
|
||||||
|
size="mini"
|
||||||
|
type="danger"
|
||||||
|
v-if="row.countUser>0&&row.signUpMethod === 1"
|
||||||
|
>
|
||||||
取消报名
|
取消报名
|
||||||
</el-button>
|
</el-button>
|
||||||
|
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table>
|
</el-table>
|
||||||
<!--#include("/layouts/pagination.html"){}#-->
|
<!--#include("/layouts/pagination.html"){}#-->
|
||||||
|
|
||||||
</el-card>
|
</el-card>
|
||||||
|
|
||||||
|
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<template #edit>
|
<template #edit>
|
||||||
|
|
||||||
|
|
||||||
<el-card shadow="never">
|
<el-card shadow="never">
|
||||||
<el-transfer
|
<el-transfer
|
||||||
:data="leftData"
|
:data="leftData"
|
||||||
:filter-method="filterMethod"
|
:filter-method="filterMethod"
|
||||||
:props="{key: 'id',label: 'name'}"
|
:props="{key: 'id',label: 'name'}"
|
||||||
:titles="['可报人员名单', '当前选择']"
|
:titles="['可报人员名单', '当前选择']"
|
||||||
filterable
|
filterable
|
||||||
ref="transfer"
|
ref="transfer"
|
||||||
v-loading="tableLoading"
|
v-loading="tableLoading"
|
||||||
v-model="rightData">
|
v-model="rightData"
|
||||||
|
>
|
||||||
<template #left-footer>
|
<template #left-footer>
|
||||||
<div></div>
|
<div></div>
|
||||||
</template>
|
</template>
|
||||||
@@ -141,208 +134,208 @@
|
|||||||
|
|
||||||
<el-card class="mt10" shadow="never">
|
<el-card class="mt10" shadow="never">
|
||||||
<el-table :data="escalationTableData" max-height="500px">
|
<el-table :data="escalationTableData" max-height="500px">
|
||||||
<el-table-column
|
<el-table-column align="center" header-align="center" label="序号" type="index" width="100"></el-table-column>
|
||||||
align="center" header-align="center" label="序号"
|
|
||||||
type="index"
|
|
||||||
width="100">
|
|
||||||
</el-table-column>
|
|
||||||
|
|
||||||
<el-table-column align="center" header-align="center" label="姓名"
|
<el-table-column align="center" header-align="center" label="姓名" prop="username"></el-table-column>
|
||||||
prop="username"></el-table-column>
|
|
||||||
|
|
||||||
<el-table-column align="center" header-align="center" label="教工号"
|
<el-table-column align="center" header-align="center" label="教工号" prop="loginname"></el-table-column>
|
||||||
prop="loginname"></el-table-column>
|
|
||||||
|
|
||||||
<el-table-column align="center" header-align="center" label="单位"
|
<el-table-column align="center" header-align="center" label="单位" prop="unitname" sortable></el-table-column>
|
||||||
prop="unitname"
|
|
||||||
sortable></el-table-column>
|
|
||||||
|
|
||||||
<el-table-column align="center" header-align="center" label="操作"
|
<!--<el-table-column align="center" header-align="center" label="操作" sortable>
|
||||||
sortable>
|
|
||||||
<template scope="{$index,row}">
|
<template scope="{$index,row}">
|
||||||
<el-button @click="rightData.splice($index,1)" size="mini"
|
<el-button @click="rightData.splice($index,1)" size="mini" type="danger">删除</el-button>
|
||||||
type="danger">删除
|
|
||||||
</el-button>
|
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>-->
|
||||||
</el-table>
|
</el-table>
|
||||||
</el-card>
|
</el-card>
|
||||||
<el-row class="mt10 text-right">
|
<el-row class="mt10 text-right">
|
||||||
|
<el-button @click="doBatchAdd" class="mt10" type="primary" v-loading="submitLoading">提交</el-button>
|
||||||
<el-button @click="doBatchAdd" class="mt10" type="primary"
|
|
||||||
v-loading="submitLoading">
|
|
||||||
提交
|
|
||||||
</el-button>
|
|
||||||
</el-row>
|
</el-row>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<template #view>
|
<template #view>
|
||||||
<tissue-info ref="info"></tissue-info>
|
<tissue-info ref="info"></tissue-info>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
</guava>
|
</guava>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
const vue = new Vue({
|
const vue = new Vue({
|
||||||
el: '#app',
|
el: "#app",
|
||||||
mixins: [initTableMixins],
|
mixins: [initTableMixins],
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
submitLoading: false,
|
submitLoading: false,
|
||||||
pageForm: {
|
pageForm: {
|
||||||
type: type,
|
type: type,
|
||||||
year: new Date().getFullYear() + ''
|
year: new Date().getFullYear() + ""
|
||||||
},
|
},
|
||||||
tableColumns: [
|
tableColumns: [
|
||||||
{prop: 'name', label: '活动名称'},
|
{ prop: "name", label: "活动名称" },
|
||||||
{prop: 'address', label: '活动地点'},
|
{ prop: "address", label: "活动地点" },
|
||||||
{prop: 'projectTypeName', label: '活动项目类型'},
|
{ prop: "projectTypeName", label: "活动项目类型" },
|
||||||
{prop: 'tussueName', label: '举办单位'},
|
{ prop: "tussueName", label: "举办单位" },
|
||||||
{prop: 'time', label: '活动日期'},
|
{ prop: "time", label: "活动日期" },
|
||||||
{prop: 'applyTime', label: '创建时间', sortable: true},
|
{ prop: "applyTime", label: "创建时间", sortable: true },
|
||||||
{prop: 'countUser', label: '报名人数', sortable: true}
|
{ prop: "countUser", label: "报名人数", sortable: true }
|
||||||
|
|
||||||
],
|
],
|
||||||
leftData: [],
|
leftData: [],
|
||||||
rightData: [],
|
rightData: [],
|
||||||
|
|
||||||
|
rowData: {}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
components: {
|
components: {
|
||||||
'tissue-info': httpVueLoader('/components/activity/school/tissueInfo.vue?v=' + new Date().getTime()),
|
"tissue-info": httpVueLoader("/components/activity/school/tissueInfo.vue?v=" + new Date().getTime())
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
escalationTableData() {
|
escalationTableData() {
|
||||||
return this.leftData.filter(v => this.rightData.includes(v.id))
|
return this.leftData.filter((v) => this.rightData.includes(v.id))
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
openView(row) {
|
openView(row) {
|
||||||
const {id} = row
|
const { id } = row
|
||||||
this.$refs.info.getInfo(id)
|
this.$refs.info.getInfo(id)
|
||||||
this.$refs.guava.view()
|
this.$refs.guava.view()
|
||||||
},
|
},
|
||||||
async doBatchAdd() {
|
async doBatchAdd() {
|
||||||
|
if (this.rightData && this.rightData.length > this.rowData.teamNum && this.rowData.signUpMethod === 3) {
|
||||||
|
this.$message.error("该模式组队限制人数为" + this.rowData.teamNum + "人!")
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
this.submitLoading = true
|
this.submitLoading = true
|
||||||
const {
|
const { code, msg } = await $.get("/mobile/activity/unionActivity/doSaveUnionRegister", {
|
||||||
code,
|
|
||||||
msg
|
|
||||||
} = await $.get('/mobile/activity/unionActivity/doSaveUnionRegister', {
|
|
||||||
activityId: this.tissueId,
|
activityId: this.tissueId,
|
||||||
personIds: JSON.stringify(this.rightData)
|
personIds: JSON.stringify(this.rightData)
|
||||||
})
|
})
|
||||||
if (code === 0) {
|
if (code === 0) {
|
||||||
this.notifySuccess(msg)
|
this.$message.success(msg)
|
||||||
this.doSearch()
|
this.doSearch()
|
||||||
this.$refs.guava.index()
|
this.$refs.guava.index()
|
||||||
} else {
|
} else {
|
||||||
this.notifyError(msg)
|
this.$message.warning(msg)
|
||||||
}
|
}
|
||||||
this.submitLoading = false
|
this.submitLoading = false
|
||||||
|
|
||||||
},
|
},
|
||||||
async doDelete(row) {
|
async doDelete(row) {
|
||||||
const confirm = await this.$confirm('确认要取消报名吗?', '提示', {
|
const confirm = await this.$confirm("确认要取消报名吗?", "提示", {
|
||||||
confirmButtonText: '确定',
|
confirmButtonText: "确定",
|
||||||
cancelButtonText: '取消',
|
cancelButtonText: "取消",
|
||||||
type: 'warning'
|
type: "warning"
|
||||||
})
|
})
|
||||||
if (confirm === "confirm") {
|
if (confirm === "confirm") {
|
||||||
row.loading = true
|
row.loading = true
|
||||||
const {
|
const { code, msg } = await $.get("/mobile/activity/unionActivity/doSingleCancelRegister", {
|
||||||
code,
|
|
||||||
msg
|
|
||||||
} = await $.get('/mobile/activity/unionActivity/doSingleCancelRegister', {
|
|
||||||
activityId: row.id
|
activityId: row.id
|
||||||
})
|
})
|
||||||
if (code === 0) {
|
if (code === 0) {
|
||||||
this.notifySuccess(msg)
|
this.$message.success(msg)
|
||||||
this.doSearch()
|
this.doSearch()
|
||||||
this.$refs.guava.index()
|
this.$refs.guava.index()
|
||||||
} else {
|
} else {
|
||||||
this.notifyError(msg)
|
this.$message.warning(msg)
|
||||||
}
|
}
|
||||||
row.loading = false
|
row.loading = false
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
async doAdd(row) {
|
async doAdd(row) {
|
||||||
const confirm = await this.$confirm('确认要报名吗?', '提示', {
|
const confirm = await this.$confirm("确认要报名吗?", "提示", {
|
||||||
confirmButtonText: '确定',
|
confirmButtonText: "确定",
|
||||||
cancelButtonText: '取消',
|
cancelButtonText: "取消",
|
||||||
type: 'warning'
|
type: "warning"
|
||||||
})
|
})
|
||||||
if (confirm === "confirm") {
|
if (confirm === "confirm") {
|
||||||
row.loading = true
|
row.loading = true
|
||||||
const {
|
const { code, msg } = await $.get("/mobile/activity/unionActivity/doSingleRegister", {
|
||||||
code,
|
|
||||||
msg
|
|
||||||
} = await $.get('/mobile/activity/unionActivity/doSingleRegister', {
|
|
||||||
activityId: row.id
|
activityId: row.id
|
||||||
})
|
})
|
||||||
if (code === 0) {
|
if (code === 0) {
|
||||||
this.notifySuccess(msg)
|
this.$message.success(msg)
|
||||||
this.doSearch()
|
this.doSearch()
|
||||||
this.$refs.guava.index()
|
this.$refs.guava.index()
|
||||||
} else {
|
} else {
|
||||||
this.notifyError(msg)
|
this.$message.warning(msg)
|
||||||
}
|
}
|
||||||
row.loading = false
|
row.loading = false
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
},
|
},
|
||||||
async openAudit(row) {
|
async openAudit(row) {
|
||||||
|
this.rowData = row
|
||||||
this.tissueId = row.id
|
this.tissueId = row.id
|
||||||
|
|
||||||
|
const flag = await getScopeUser(row.groupId)
|
||||||
|
if (!flag) {
|
||||||
|
this.$message.warning("您没有报名权限!")
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
this.tableLoading = true
|
this.tableLoading = true
|
||||||
this.$refs.guava.edit()
|
this.$refs.guava.edit()
|
||||||
const {data} = await $.get('/platform/activity/applyUser/selfUnionUsers', {
|
const { data } = await $.get("/platform/activity/applyUser/selfUnionUsers", {
|
||||||
groupId: row.groupId
|
groupId: row.groupId,
|
||||||
|
tissueId: row.id
|
||||||
})
|
})
|
||||||
this.leftData = data
|
this.leftData = data
|
||||||
|
|
||||||
const {data: rightData} = await $.get('/platform/activity/applyUser/getReportedUser', {
|
const { data: rightData } = await $.get("/platform/activity/applyUser/getReportedUser", {
|
||||||
tissueId: row.id
|
tissueId: row.id
|
||||||
})
|
})
|
||||||
this.leftData = data.map(user => {
|
this.leftData = data.map((user) => {
|
||||||
return this.getTransProp(user)
|
return this.getTransProp(user, row.signUpMethod)
|
||||||
})
|
|
||||||
this.rightData = rightData.map(user => {
|
|
||||||
return this.getTransProp(user)
|
|
||||||
})
|
})
|
||||||
|
// this.rightData = rightData.map((user) => {
|
||||||
|
// return this.getTransProp(user)
|
||||||
|
// })
|
||||||
|
|
||||||
|
this.rightData = rightData
|
||||||
|
//如果是组队报名,默认添加自己
|
||||||
|
if (rightData && rightData.length === 0 && row.signUpMethod === 3) {
|
||||||
|
rightData.push("${@shiro.getPrincipalProperty('id')}")
|
||||||
|
}
|
||||||
|
|
||||||
this.tableLoading = false
|
this.tableLoading = false
|
||||||
},
|
},
|
||||||
getTransProp(user) {
|
getTransProp(user, signUpMethod) {
|
||||||
return {
|
return {
|
||||||
id: user.id,
|
id: user.id,
|
||||||
username:user.username,
|
username: user.username,
|
||||||
loginname:user.loginname,
|
loginname: user.loginname,
|
||||||
sex:user.sex,
|
sex: user.sex,
|
||||||
unionname:user.unionname,
|
unionname: user.unionname,
|
||||||
unitname:user.unitname,
|
unitname: user.unitname,
|
||||||
userState:user.userState,
|
userState: user.userState,
|
||||||
name: user.username + "-" + user.loginname + "-" + user.unitname,
|
name: user.username + "-" + user.loginname + "-" + user.unitname,
|
||||||
|
//如果是组队报名,并且userId等于当前登入人禁用选项
|
||||||
|
disabled: signUpMethod === 3 && user.id === "${@shiro.getPrincipalProperty('id')}" ? true : false
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
filterMethod(query, item) {
|
filterMethod(query, item) {
|
||||||
if (!query){
|
if (!query) {
|
||||||
return -1
|
return -1
|
||||||
}
|
}
|
||||||
return item.name.indexOf(query) > -1;
|
return item.name.indexOf(query) > -1
|
||||||
},
|
},
|
||||||
pageData() {
|
pageData() {
|
||||||
sublime.showLoadingbar();
|
sublime.showLoadingbar()
|
||||||
this.tableLoading = true
|
this.tableLoading = true
|
||||||
$.post("/platform/activity/applyUser/pageData", this.pageForm, (data) => {
|
$.post(
|
||||||
sublime.closeLoadingbar();
|
"/platform/activity/applyUser/pageData",
|
||||||
this.tableLoading = false
|
this.pageForm,
|
||||||
if (data.code === 0) {
|
(data) => {
|
||||||
this.tableData = data.data.list;
|
sublime.closeLoadingbar()
|
||||||
this.pageForm.totalCount = data.data.totalCount;
|
this.tableLoading = false
|
||||||
} else {
|
if (data.code === 0) {
|
||||||
this.$message.error(data.msg);
|
this.tableData = data.data.list
|
||||||
}
|
this.pageForm.totalCount = data.data.totalCount
|
||||||
}, "json");
|
} else {
|
||||||
|
this.$message.error(data.msg)
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"json"
|
||||||
|
)
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
async created() {
|
async created() {
|
||||||
@@ -354,7 +347,7 @@
|
|||||||
<style>
|
<style>
|
||||||
.flexible-gifts {
|
.flexible-gifts {
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column
|
flex-direction: column;
|
||||||
}
|
}
|
||||||
|
|
||||||
.flexible-gifts-item {
|
.flexible-gifts-item {
|
||||||
@@ -387,7 +380,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
.avatar-uploader .el-upload:hover {
|
.avatar-uploader .el-upload:hover {
|
||||||
border-color: #409EFF;
|
border-color: #409eff;
|
||||||
}
|
}
|
||||||
|
|
||||||
.avatar-uploader-icon {
|
.avatar-uploader-icon {
|
||||||
@@ -428,4 +421,3 @@
|
|||||||
margin: 0 10px !important;
|
margin: 0 10px !important;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
|
|||||||
@@ -159,8 +159,8 @@ layout("/layouts/platform.html"){
|
|||||||
const ids = this.checkUsers.map(item => item.id)
|
const ids = this.checkUsers.map(item => item.id)
|
||||||
if (isHasNewTeacher) {
|
if (isHasNewTeacher) {
|
||||||
this.$confirm('勾选用户中有新入职教工,是否对新入职教职工发送入会邀请?', '提示', {
|
this.$confirm('勾选用户中有新入职教工,是否对新入职教职工发送入会邀请?', '提示', {
|
||||||
confirmButtonText: '确定',
|
confirmButtonText: '是',
|
||||||
cancelButtonText: '取消',
|
cancelButtonText: '否',
|
||||||
type: 'warning'
|
type: 'warning'
|
||||||
}).then(() => {
|
}).then(() => {
|
||||||
isSendMsg = true
|
isSendMsg = true
|
||||||
@@ -182,8 +182,8 @@ layout("/layouts/platform.html"){
|
|||||||
let isSendMsg = false;
|
let isSendMsg = false;
|
||||||
if (formData.changeInfosStr === '新入职') {
|
if (formData.changeInfosStr === '新入职') {
|
||||||
this.$confirm('该职工是新入职职工,是否发送入会邀请?', '提示', {
|
this.$confirm('该职工是新入职职工,是否发送入会邀请?', '提示', {
|
||||||
confirmButtonText: '确定',
|
confirmButtonText: '是',
|
||||||
cancelButtonText: '取消',
|
cancelButtonText: '否',
|
||||||
type: 'warning'
|
type: 'warning'
|
||||||
}).then(async () => {
|
}).then(async () => {
|
||||||
isSendMsg = true
|
isSendMsg = true
|
||||||
|
|||||||
Reference in New Issue
Block a user