commit
This commit is contained in:
+5
-1
@@ -117,6 +117,10 @@ public class ClientAuthController {
|
||||
@ApiOperation(value = "发送短信验证码", nickname = "/send-sms-code", httpMethod = "POST")
|
||||
public Object sendSmsCode(String phone) {
|
||||
try {
|
||||
int count = dao.count(Client_user.class, Cnd.where("phone", "=", phone));
|
||||
if (count == 0) {
|
||||
return Result.error("手机号码未注册");
|
||||
}
|
||||
validateService.getSmsCode(phone);
|
||||
return Result.success(NutMap.NEW().addv("key", RedisConstant.UCENTER_SMSCODE + phone)).addMsg("发送成功");
|
||||
} catch (BaseException e) {
|
||||
@@ -140,7 +144,7 @@ public class ClientAuthController {
|
||||
@AdaptBy(type = JsonAdaptor.class)
|
||||
public Result updateUserInfo(Client_user user) {
|
||||
user.setId(StpClientUtil.STP.getLoginIdAsLong());
|
||||
user.setAvatar("https://tdesign.gtimg.com/mobile/demos/avatar1.png");
|
||||
// user.setAvatar("https://tdesign.gtimg.com/mobile/demos/avatar1.png");
|
||||
dao.updateIgnoreNull(user);
|
||||
return Result.success(user);
|
||||
}
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
package com.budwk.app.client.auth.service;
|
||||
|
||||
import cn.hutool.core.bean.BeanUtil;
|
||||
import cn.hutool.core.util.IdcardUtil;
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import com.budwk.app.base.exception.BaseException;
|
||||
import com.budwk.app.base.utils.PwdUtil;
|
||||
@@ -69,6 +70,8 @@ public class ClientAuthServiceImpl implements ClientAuthService {
|
||||
validateService.checkSMSCode(registerBody.getPhone(), registerBody.getSmsCode());
|
||||
|
||||
Client_user user = BeanUtil.copyProperties(registerBody, Client_user.class);
|
||||
int gender = IdcardUtil.getGenderByIdCard(user.getIdCard());
|
||||
user.setSex(gender==1?"男":"女");
|
||||
dao.insert(user);
|
||||
StpClientUtil.STP.login(user.getId());
|
||||
StpClientUtil.STP.checkLogin();
|
||||
|
||||
+4
-1
@@ -24,6 +24,7 @@ import org.nutz.mvc.annotation.GET;
|
||||
import org.nutz.mvc.annotation.Ok;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
|
||||
@IocBean
|
||||
@@ -95,7 +96,9 @@ public class ClientActivityController {
|
||||
group.or(ActUser::getUserId, "=", StpClientUtil.STP.getLoginIdAsLong());
|
||||
group.or(ActUser::getSignUpUserId, "=", StpClientUtil.STP.getLoginIdAsLong());
|
||||
ActUser actUser = dao.fetch(ActUser.class, Cnd.where(ActUser::getActivityId, "=", activityId).and(group));
|
||||
|
||||
if (actUser == null) {
|
||||
return Result.success(Collections.emptyList());
|
||||
}
|
||||
List<ActUser> list = dao.query(ActUser.class, Cnd.where(ActUser::getActivityId, "=", activityId)
|
||||
.and(ActUser::getSignUpUserId, "=", actUser.getSignUpUserId()));
|
||||
return Result.success(list);
|
||||
|
||||
+4
-1
@@ -1,5 +1,6 @@
|
||||
package com.budwk.app.client.module.activity.service.impl;
|
||||
|
||||
import cn.hutool.core.util.IdcardUtil;
|
||||
import com.budwk.app.base.exception.BaseException;
|
||||
import com.budwk.app.base.result.Result;
|
||||
import com.budwk.app.base.service.impl.BaseServiceImpl;
|
||||
@@ -62,6 +63,8 @@ public class ClientActivityServiceImpl extends BaseServiceImpl<Activity> impleme
|
||||
clientUser.setPhone(user.getPhone());
|
||||
clientUser.setIdCard(user.getIdCard());
|
||||
clientUser.setUnitId(selfUser.getUnitId());
|
||||
int gender = IdcardUtil.getGenderByIdCard(clientUser.getIdCard());
|
||||
clientUser.setSex(gender==1?"男":"女");
|
||||
dao().insert(clientUser);
|
||||
} else {
|
||||
// 验证用户之前是不是已经报名 别人帮报 自己报 管理员报
|
||||
@@ -76,7 +79,7 @@ public class ClientActivityServiceImpl extends BaseServiceImpl<Activity> impleme
|
||||
user.setActivityId(signVO.getActivityId());
|
||||
user.setUserId(clientUser.getId());
|
||||
user.setUnitId(selfUser.getUnitId());
|
||||
user.setUnitName(signVO.getUnitName());
|
||||
user.setUnitName(selfUser.getUnit().getName());
|
||||
user.setSignUpContacts(signVO.getContactName());
|
||||
user.setSignUpMobile(signVO.getContactPhone());
|
||||
user.setSignUpUserId(StpClientUtil.STP.getLoginIdAsLong());
|
||||
|
||||
+10
-2
@@ -20,6 +20,7 @@ import io.swagger.annotations.Api;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.apache.poi.ss.usermodel.Workbook;
|
||||
import org.nutz.aop.interceptor.ioc.TransAop;
|
||||
import org.nutz.dao.Chain;
|
||||
import org.nutz.dao.Cnd;
|
||||
import org.nutz.dao.Dao;
|
||||
import org.nutz.dao.Sqls;
|
||||
@@ -157,7 +158,7 @@ public class ActUserController {
|
||||
@At
|
||||
@SaCheckPermission("activity.user")
|
||||
@SLog(tag = "报名人员管理", msg = "删除报名人员")
|
||||
public Result doDeleteActUser(String id){
|
||||
public Result doDeleteActUser(Long id){
|
||||
dao.delete(ActUser.class, id);
|
||||
return Result.success();
|
||||
}
|
||||
@@ -171,10 +172,17 @@ public class ActUserController {
|
||||
return Result.success();
|
||||
}
|
||||
|
||||
@At
|
||||
@SaCheckPermission("activity.user")
|
||||
@SLog(tag = "报名人员管理", msg = "设置已签到")
|
||||
public Result proxySignIn(Long id){
|
||||
dao.update(ActUser.class, Chain.make("isSignIn",1).add("signInTime",LocalDateTime.now()),Cnd.where(ActUser::getId,"=",id));
|
||||
return Result.success();
|
||||
}
|
||||
|
||||
@At
|
||||
@SaCheckPermission("activity.user")
|
||||
public Result findSignUserInfo(String id){
|
||||
public Result findSignUserInfo(Long id){
|
||||
return Result.success(dao.fetch(ActUser.class, Cnd.where(ActUser::getId, "=", id)));
|
||||
}
|
||||
|
||||
|
||||
-3
@@ -85,7 +85,6 @@ public class ActWonderfulMomentController {
|
||||
}
|
||||
|
||||
@At
|
||||
@SaCheckLogin(type = StpClientUtil.TYPE)
|
||||
public Result getWonderfulMoment(@Param("id") Long id) {
|
||||
Cnd cnd = Cnd.where("published", "=", true).andEX("id", "=", id);
|
||||
cnd.desc("publishTime");
|
||||
@@ -106,14 +105,12 @@ public class ActWonderfulMomentController {
|
||||
}
|
||||
|
||||
@At("/getWonderfulMomentById/?")
|
||||
@SaCheckLogin(type = StpClientUtil.TYPE)
|
||||
public Result getWonderfulMomentById(Long id) {
|
||||
ActWonderfulMoment moment = wonderfulMomentService.fetch(id);
|
||||
return Result.success(moment);
|
||||
}
|
||||
|
||||
@At("/handleWonderfulMoment/?")
|
||||
@SaCheckLogin(type = StpClientUtil.TYPE)
|
||||
public Result handleWonderfulMoment(Long id) {
|
||||
ActWonderfulMoment moment = wonderfulMomentService.fetch(id);
|
||||
moment.setReadCount(moment.getReadCount() + 1);
|
||||
|
||||
-1
@@ -167,7 +167,6 @@ public class ActivityManageController {
|
||||
|
||||
@At
|
||||
@Aop(TransAop.READ_COMMITTED)
|
||||
@SaCheckLogin(type = StpClientUtil.TYPE)
|
||||
public Result getActivity() {
|
||||
List<Activity> activityList = activityService.query(Cnd.NEW());
|
||||
return Result.success(activityList);
|
||||
|
||||
@@ -37,7 +37,8 @@ public class SysHomeController {
|
||||
// if (StpUtil.hasRole("sysadmin")) {
|
||||
// return "beetl:/platform/sys/dashboard.html";
|
||||
// }
|
||||
return "beetl:/platform/sys/home.html";
|
||||
// return "beetl:/platform/sys/home.html";
|
||||
return "beetl:/platform/activity/manage/index.html";
|
||||
}
|
||||
|
||||
@At("/403")
|
||||
|
||||
@@ -51,7 +51,7 @@ public class ValidateService {
|
||||
// throw new BaseException("请1分钟之后再试");
|
||||
}
|
||||
ThreadUtil.execute(() -> {
|
||||
smsSendServer.sendCode(mobile, "验证码为:" + text);
|
||||
smsSendServer.sendCode(mobile, text);
|
||||
log.debug("sms code:::" + text);
|
||||
redisService.setex(RedisConstant.UCENTER_SMSCODE + mobile, 300, text);
|
||||
redisService.setex(RedisConstant.UCENTER_SMSCODE + mobile + ":LOCK", 60, text);
|
||||
|
||||
@@ -146,7 +146,7 @@ public class UploadController {
|
||||
response.setStatus(HttpServletResponse.SC_BAD_REQUEST);
|
||||
response.getWriter().write("Invalid file path");
|
||||
}
|
||||
String fullPath = "D:/files" + filepath;
|
||||
String fullPath = "C:/files" + filepath;
|
||||
File file = new File(fullPath);
|
||||
if (!file.exists() || !file.isFile()) {
|
||||
response.setStatus(HttpServletResponse.SC_NOT_FOUND);
|
||||
|
||||
@@ -66,7 +66,8 @@ module.exports = {
|
||||
console.log(v)
|
||||
if (v.code === 0) {
|
||||
console.log(v.data)
|
||||
insertImgFn(v.data)
|
||||
insertImgFn('/open/file/upload/download?filepath='+v.data)
|
||||
// insertImgFn(v.data)
|
||||
} else {
|
||||
this.$message.error(v.msg)
|
||||
}
|
||||
|
||||
@@ -40,13 +40,13 @@ const actQrCode = {
|
||||
width: 150,
|
||||
height: 150
|
||||
})
|
||||
signUpCode.makeCode("https://192.168.41.118:5173" + "/pages/activity/detail/index?id=" + this.actId)
|
||||
signUpCode.makeCode("https://3skj.ltd" + "/pages/activity/detail/index?id=" + this.actId)
|
||||
|
||||
let signInCode = new QRCode(document.getElementById("signInCode"), {
|
||||
width: 150,
|
||||
height: 150
|
||||
})
|
||||
signInCode.makeCode("https://192.168.41.118:5173" + "/pages/activity/scan-sign/index?id=" + this.actId)
|
||||
signInCode.makeCode("https://3skj.ltd" + "/pages/activity/scan-sign/index?id=" + this.actId)
|
||||
},
|
||||
download() {
|
||||
// 获取base64
|
||||
|
||||
@@ -36,7 +36,6 @@ const itemForm = {
|
||||
</el-table-column>
|
||||
<el-table-column label="图片">
|
||||
<template #default="{row}">
|
||||
{{row.img}}
|
||||
<image-upload v-model="row.img" :maxCount="1"></image-upload>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
@@ -97,7 +97,7 @@ layout("/layouts/platform_1.html"){
|
||||
{{row.isStay?'住宿':'不住宿'}}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="物资发放" prop="isGrant">
|
||||
<el-table-column label="物品发放" prop="isGrant">
|
||||
<template slot-scope="scope">
|
||||
<el-tag v-if="scope.row.isGrant" type="success">已发放</el-tag>
|
||||
<el-tag v-else type="danger">未发放</el-tag>
|
||||
@@ -106,9 +106,9 @@ layout("/layouts/platform_1.html"){
|
||||
<el-table-column label="操作" fixed="right" width="200">
|
||||
<template #default="{row}">
|
||||
<el-button v-if="!row.isGrant || row.isGrant === 0" type="primary" size="mini"
|
||||
@click="doGrant(row, true)">设为已发放物资
|
||||
@click="doGrant(row, true)">设为已发放物品
|
||||
</el-button>
|
||||
<el-button v-else type="danger" size="mini" @click="doGrant(row, false)">设为未发放物资</el-button>
|
||||
<el-button v-else type="danger" size="mini" @click="doGrant(row, false)">设为未发放物品</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
@@ -22,42 +22,61 @@ layout("/layouts/platform_1.html"){
|
||||
<div class="search-item-label">所属活动</div>
|
||||
<div class="search-item-option">
|
||||
<el-select @change="doSearch"
|
||||
placeholder="请选择活动查询"
|
||||
style="width: 100%;"
|
||||
v-model="pageForm.activityId">
|
||||
placeholder="请选择活动查询"
|
||||
style="width: 100%;"
|
||||
v-model="pageForm.activityId">
|
||||
<el-option :label="item.title" :value="item.id"
|
||||
v-for="item in activityList"></el-option>
|
||||
v-for="item in activityList"></el-option>
|
||||
</el-select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="search-item">
|
||||
<div class="search-item-label">姓名/电话</div>
|
||||
<div class="search-item-option">
|
||||
<el-input v-model="pageForm.searchKeyword" placeholder="请输入姓名"
|
||||
clearable @keyup.enter.native="doSearch"></el-input>
|
||||
clearable @keyup.enter.native="doSearch"></el-input>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="search-item">
|
||||
<div class="search-item-label">签到状态</div>
|
||||
<div class="search-item-option">
|
||||
<el-select v-model="pageForm.isSignIn" placeholder="请选择发放状态" clearable>
|
||||
<el-option label="已签到" :value="1"></el-option>
|
||||
<el-option label="未签到" :value="0"></el-option>
|
||||
</el-select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="search-item">
|
||||
<div class="search-item-label">所属单位</div>
|
||||
<div class="search-item-option">
|
||||
<el-select placeholder="请选择所属单位"
|
||||
style="width: 100%;" clearable
|
||||
filterable
|
||||
@change="setModifyFormUnit"
|
||||
v-model="pageForm.unitId">
|
||||
<el-option :label="item.name" :value="item.id"
|
||||
v-for="item in units"></el-option>
|
||||
</el-select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="search-query">
|
||||
<el-button type="primary" icon="el-icon-search" @click="doSearch">搜索</el-button>
|
||||
</div>
|
||||
</div>
|
||||
</el-card>
|
||||
|
||||
|
||||
<el-card shadow="never" class="mt-3">
|
||||
<el-row type="flex" style="justify-content: flex-end" class="mb-3">
|
||||
<el-button type="primary" size="small" @click="openAddUser">添加报名人员</el-button>
|
||||
<el-button type="primary" size="small" @click="doExport">导出</el-button>
|
||||
<el-radio-group v-model="pageForm.isSignIn" type="primary" class="ml-3"@change="doSearch">
|
||||
<el-radio-button :label="1">全部</el-radio-button>
|
||||
<el-radio-button :label="2">已签到</el-radio-button>
|
||||
<el-radio-button :label="3">未签到</el-radio-button>
|
||||
</el-radio-group>
|
||||
</el-row>
|
||||
<el-button icon="el-icon-plus" type="primary" size="small" @click="openAddUser">添加报名人员</el-button>
|
||||
<el-button icon="el-icon-plus" type="primary" size="small" @click="doExport">导出</el-button>
|
||||
</el-row>
|
||||
<el-table v-loading="tableLoading" show-overflow-tooltip :data="tableData">
|
||||
<el-table-column label="序号" type="index" header-align="center" align="center"
|
||||
width="50"></el-table-column>
|
||||
width="50"></el-table-column>
|
||||
<el-table-column label="姓名" prop="userName"></el-table-column>
|
||||
<el-table-column label="性别" prop="sex"></el-table-column>
|
||||
<el-table-column label="联系方式" prop="phone"></el-table-column>
|
||||
@@ -65,28 +84,37 @@ layout("/layouts/platform_1.html"){
|
||||
<el-table-column label="职务" prop="position"></el-table-column>
|
||||
<el-table-column label="所属单位" prop="unitName"></el-table-column>
|
||||
<el-table-column label="报名时间" prop="signUpTime"></el-table-column>
|
||||
<el-table-column label="是否签到" prop="isSignIn">
|
||||
<template slot-scope="{row}">
|
||||
{{row.isSignIn?'已签到':'未签到'}}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" fixed="right" width="250">
|
||||
<el-table-column label="是否签到" prop="isSignIn">
|
||||
<template slot-scope="{row}">
|
||||
<el-tag v-if="row.isSignIn" size="mini" type="success">已签到</el-tag>
|
||||
<el-tag v-else size="mini" type="info">未签到</el-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" fixed="right" width="300">
|
||||
<template #default="scope">
|
||||
<el-button type="text" @click="openModify">修改</el-button>
|
||||
<el-button type="text" class="text-danger" @click="onTableRowDelete(scope.row.id)">删除</el-button>
|
||||
<el-button type="primary" size="mini" @click="proxySignIn(scope.row.id)" v-if="!scope.row.isSignIn">签到</el-button>
|
||||
<el-button type="primary" size="mini" @click="openModify(scope.row)">修改</el-button>
|
||||
<el-button type="danger" size="mini" @click="doRemove(scope.row.id)">删除</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<!--#include("/layouts/pagination.html"){}#-->
|
||||
</el-card>
|
||||
|
||||
|
||||
<el-dialog title="添加报名人员" :visible.sync="addDialog" width="60%">
|
||||
<el-form :model="formData" :rules="formRules" ref="formRef" label-width="100px">
|
||||
<el-form-item label="活动名称" prop="activityName">
|
||||
<el-input v-model="formData.activityName" readonly></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="参加单位" prop="unitName">
|
||||
<el-input v-model="formData.unitName" placeholder="请输入参加单位"></el-input>
|
||||
<el-select placeholder="请选择所属单位"
|
||||
style="width: 100%;" clearable
|
||||
@change="setFormDataUnit"
|
||||
v-model="formData.unitId">
|
||||
<el-option :label="item.name" :value="item.id"
|
||||
v-for="item in units"></el-option>
|
||||
</el-select>
|
||||
<!-- <el-input v-model="formData.unitName" placeholder="请输入参加单位"></el-input>-->
|
||||
</el-form-item>
|
||||
<el-form-item label="联系人" prop="contactName">
|
||||
<el-input v-model="formData.contactName" placeholder="请输入联系人"></el-input>
|
||||
@@ -99,13 +127,13 @@ layout("/layouts/platform_1.html"){
|
||||
<el-table-column label="姓名" prop="userName" fixed width="200">
|
||||
<template slot-scope="{row}">
|
||||
<el-autocomplete style="width: 100%"
|
||||
v-model="row.userName"
|
||||
:fetch-suggestions="queryUserAsync"
|
||||
placeholder="请输入内容"
|
||||
@select="handleSelect($event, row)"
|
||||
v-model="row.userName"
|
||||
:fetch-suggestions="queryUserAsync"
|
||||
placeholder="请输入内容"
|
||||
@select="handleSelect($event, row)"
|
||||
></el-autocomplete>
|
||||
<!-- <el-input v-model="row.userName" maxlength="50"-->
|
||||
<!-- placeholder="请输入姓名"></el-input>-->
|
||||
<!-- <el-input v-model="row.userName" maxlength="50"-->
|
||||
<!-- placeholder="请输入姓名"></el-input>-->
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="性别" prop="sex" width="200">
|
||||
@@ -119,30 +147,30 @@ layout("/layouts/platform_1.html"){
|
||||
<el-table-column label="联系方式" prop="phone" width="200">
|
||||
<template slot-scope="{row}">
|
||||
<el-input v-model="row.phone" maxlength="11" type="text"
|
||||
show-word-limit placeholder="请输入联系方式"></el-input>
|
||||
show-word-limit placeholder="请输入联系方式"></el-input>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="身份证件号" prop="idCard" width="250">
|
||||
<template slot-scope="{row}">
|
||||
<el-input v-model="row.idCard" maxlength="18" type="text"
|
||||
show-word-limit placeholder="请输入身份证件号"></el-input>
|
||||
show-word-limit placeholder="请输入身份证件号"></el-input>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="职务" prop="position" width="200">
|
||||
<template slot-scope="{row}">
|
||||
<el-input v-model="row.position" maxlength="100"
|
||||
placeholder="请输入职务"></el-input>
|
||||
placeholder="请输入职务"></el-input>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<!--<el-table-column label="所属单位" prop="unitName" width="250">
|
||||
<template slot-scope="{row}">
|
||||
<el-input v-model="row.unitName" maxlength="100" placeholder="请输所属单位"></el-input>
|
||||
</template>
|
||||
</el-table-column>-->
|
||||
<template slot-scope="{row}">
|
||||
<el-input v-model="row.unitName" maxlength="100" placeholder="请输所属单位"></el-input>
|
||||
</template>
|
||||
</el-table-column>-->
|
||||
<el-table-column width="100px" fixed="right">
|
||||
<template slot="header" slot-scope="scope">
|
||||
<el-button type="primary" size="mini"
|
||||
@click="formData.userList.push({})">添加
|
||||
@click="formData.userList.push({})">添加
|
||||
</el-button>
|
||||
</template>
|
||||
<template slot-scope="scope">
|
||||
@@ -163,7 +191,7 @@ layout("/layouts/platform_1.html"){
|
||||
<el-button type="primary" @click="onAddUserSubmit">确 定</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
|
||||
|
||||
<el-dialog title="修改报名信息" :visible.sync="modifyDialog" width="40%">
|
||||
<el-form :model="modifyForm" :rules="modifyRules" ref="modifyFormRef" label-width="100px">
|
||||
<el-form-item label="姓名" prop="userName">
|
||||
@@ -185,7 +213,14 @@ layout("/layouts/platform_1.html"){
|
||||
<el-input v-model="modifyForm.position"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="所属单位" prop="unitName">
|
||||
<el-input v-model="modifyForm.unitName"></el-input>
|
||||
<el-select placeholder="请选择所属单位"
|
||||
style="width: 100%;" clearable
|
||||
@change="setModifyFormUnit"
|
||||
v-model="modifyForm.unitId">
|
||||
<el-option :label="item.name" :value="item.id"
|
||||
v-for="item in units"></el-option>
|
||||
</el-select>
|
||||
<!-- <el-input v-model="modifyForm.unitName"></el-input>-->
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<span slot="footer" class="dialog-footer">
|
||||
@@ -203,7 +238,6 @@ layout("/layouts/platform_1.html"){
|
||||
data() {
|
||||
return {
|
||||
pageForm: {
|
||||
isSignIn: 1,
|
||||
year: new Date().getFullYear() + '',
|
||||
},
|
||||
activityList: [],
|
||||
@@ -262,7 +296,7 @@ layout("/layouts/platform_1.html"){
|
||||
position: [{required: true, message: '请输入职务', trigger: ['blur', 'change']}],
|
||||
unitName: [{required: true, message: '请输入所属单位', trigger: ['blur', 'change']}],
|
||||
},
|
||||
|
||||
|
||||
// 添加报名人员相关
|
||||
addDialog: false,
|
||||
formData: {
|
||||
@@ -276,9 +310,40 @@ layout("/layouts/platform_1.html"){
|
||||
contactPhone: [{required: true, message: '请填写联系电话', trigger: ['blur', 'change']}],
|
||||
userList: [{required: true, message: '请添加报名人员', trigger: ['blur', 'change']}]
|
||||
},
|
||||
|
||||
units: [],
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
setFormDataUnit(val) {
|
||||
if (!val) {
|
||||
this.formData.unitName = ''
|
||||
return
|
||||
}
|
||||
this.formData.unitName = this.units.find(item => item.id === this.formData.unitId).name
|
||||
},
|
||||
setModifyFormUnit(val) {
|
||||
if (!val) {
|
||||
this.modifyForm.unitName = ''
|
||||
return
|
||||
}
|
||||
this.modifyForm.unitName = this.units.find(item => item.id === this.modifyForm.unitId).name
|
||||
},
|
||||
doRemove(id) {
|
||||
this.$confirm('您确定要删除吗?', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
}).then(async () => {
|
||||
const resp = await $.post('/platform/activity/user/doDeleteActUser', {id})
|
||||
if (resp.code === 0) {
|
||||
this.doSearch()
|
||||
this.$message.success(resp.msg)
|
||||
} else {
|
||||
this.$message.warning('操作失败')
|
||||
}
|
||||
})
|
||||
},
|
||||
doExport() {
|
||||
window.open("/platform/activity/user/doExport?activityId=" + this.pageForm.activityId + "&searchKeyword=" + this.pageForm.searchKeyword)
|
||||
},
|
||||
@@ -321,7 +386,7 @@ layout("/layouts/platform_1.html"){
|
||||
this.$message.warning("请添加报名人员")
|
||||
return
|
||||
}
|
||||
|
||||
|
||||
let errorMessages = [];
|
||||
const requiredFields = [
|
||||
{ key: 'userName', message: '姓名不能为空' },
|
||||
@@ -330,7 +395,7 @@ layout("/layouts/platform_1.html"){
|
||||
{ key: 'idCard', message: '身份证件号不能为空' },
|
||||
{ key: 'position', message: '职务不能为空' }
|
||||
];
|
||||
|
||||
|
||||
userList.forEach((user, index) => {
|
||||
requiredFields.forEach(field => {
|
||||
if (user[field.key] == null || user[field.key] === "") {
|
||||
@@ -338,7 +403,7 @@ layout("/layouts/platform_1.html"){
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
if (errorMessages.length > 0) {
|
||||
// 将错误信息转换为 HTML 格式,使用 <br> 实现换行
|
||||
const errorSummary = errorMessages.join("<br>");
|
||||
@@ -390,6 +455,21 @@ layout("/layouts/platform_1.html"){
|
||||
}
|
||||
})
|
||||
},
|
||||
proxySignIn(id){
|
||||
this.$confirm('您确定要设为已签到吗?', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
}).then(async () => {
|
||||
const resp = await $.post('/platform/activity/user/proxySignIn', {id})
|
||||
if (resp.code === 0) {
|
||||
this.doSearch()
|
||||
this.$message.success(resp.msg)
|
||||
} else {
|
||||
this.$message.warning('操作失败')
|
||||
}
|
||||
})
|
||||
},
|
||||
async getActivityList(){
|
||||
const resp = await $.post('/platform/activity/user/getActivityList', {
|
||||
year: this.pageForm.year
|
||||
@@ -401,10 +481,17 @@ layout("/layouts/platform_1.html"){
|
||||
this.$set(this.pageForm, 'activityId', '')
|
||||
}
|
||||
this.pageData()
|
||||
},
|
||||
async getUnits(){
|
||||
const resp = await $.post('/open/common/units')
|
||||
if (resp.code === 0) {
|
||||
this.units = resp.data
|
||||
}
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.getActivityList()
|
||||
this.getUnits()
|
||||
}
|
||||
})
|
||||
</script>
|
||||
|
||||
@@ -54,6 +54,16 @@ uni-page-body {
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
/* 导航栏添加返回按钮文字 */
|
||||
:deep(.uni-page-head-btn)::after{
|
||||
content: "返回";
|
||||
position: absolute;
|
||||
left: 30px;
|
||||
color: #000;
|
||||
font-size: 16px;
|
||||
line-height: 26px;
|
||||
}
|
||||
|
||||
/* 隐藏所有页面的滚动条(包括 web 和 小程序) */
|
||||
::-webkit-scrollbar {
|
||||
display: none;
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
{
|
||||
"path": "pages/index/index",
|
||||
"style": {
|
||||
"navigationBarTitleText": "uni-app"
|
||||
"navigationBarTitleText": "趣味运动会"
|
||||
}
|
||||
},
|
||||
{
|
||||
@@ -101,7 +101,7 @@
|
||||
],
|
||||
"globalStyle": {
|
||||
"navigationBarTextStyle": "#000000",
|
||||
"navigationBarTitleText": "uni-app",
|
||||
"navigationBarTitleText": "趣味运动会",
|
||||
"navigationBarBackgroundColor": "#ffffff",
|
||||
"backgroundColor": "#F8F8F8"
|
||||
},
|
||||
@@ -118,7 +118,7 @@
|
||||
"list": [
|
||||
{
|
||||
"pagePath": "pages/index/index",
|
||||
"text": "组件",
|
||||
"text": "首页",
|
||||
"iconfont": {
|
||||
"text": "\ue64d",
|
||||
"selectedText": "\ue64d",
|
||||
|
||||
@@ -10,10 +10,10 @@
|
||||
<div class="content-area">
|
||||
<div class="team-card">
|
||||
<div class="team-header">
|
||||
<div class="team-logo">
|
||||
<i class="bi bi-people-fill" v-if="!team.logoUrl"></i>
|
||||
<img :src="team.logoUrl" alt="团队logo" v-if="team.logoUrl">
|
||||
</div>
|
||||
<!-- <div class="team-logo">-->
|
||||
<!-- <i class="bi bi-people-fill" v-if="!team.logoUrl"></i>-->
|
||||
<!-- <img :src="team.logoUrl" alt="团队logo" v-if="team.logoUrl">-->
|
||||
<!-- </div>-->
|
||||
|
||||
<div class="team-basic-info">
|
||||
<div class="team-name">{{ team.groupName }}</div>
|
||||
@@ -23,18 +23,24 @@
|
||||
|
||||
<div class="team-stats">
|
||||
<div class="stat-item">
|
||||
<div class="stat-icon"><i class="bi bi-people"></i></div>
|
||||
<div class="stat-icon">
|
||||
<!-- <i class="bi bi-people"></i>-->
|
||||
<t-icon name="chart-ring-1"></t-icon>
|
||||
</div>
|
||||
<div class="stat-content">
|
||||
<div class="stat-value">成员:{{ team.groupUsers?.length }}</div>
|
||||
<!-- <div class="stat-label">成员</div>-->
|
||||
<!-- <div class="stat-label">成员</div>-->
|
||||
</div>
|
||||
</div>
|
||||
<div class="stat-divider"></div>
|
||||
<div class="stat-item" @click="queryRank">
|
||||
<div class="stat-icon"><i class="bi bi-trophy"></i></div>
|
||||
<div class="stat-icon">
|
||||
<!-- <i class="bi bi-trophy"></i>-->
|
||||
<t-icon name="chart-bar"></t-icon>
|
||||
</div>
|
||||
<div class="stat-content">
|
||||
<div class="stat-value">排名:{{ team.totalRank ? team.totalRank : '--' }}</div>
|
||||
<div class="stat-label">点击查看排行榜</div>
|
||||
<!-- <div class="stat-label">点击查看排行榜</div>-->
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -24,6 +24,7 @@ const viewData = ref(null);
|
||||
function getWonderfulMoment() {
|
||||
request.post('/platform/activity/wonderfulMoment/getWonderfulMomentById/' + momentId.value).then(res=>{
|
||||
if(res.code === 0){
|
||||
res.data.content = res?.data?.content.replaceAll('/open/file/upload/download?filepath=','')
|
||||
viewData.value = res.data
|
||||
}else{
|
||||
Toast({message: res.msg, theme: 'error'});
|
||||
|
||||
@@ -106,6 +106,7 @@
|
||||
|
||||
<script setup>
|
||||
import {onMounted, ref} from "vue";
|
||||
import {onLoad, onShow} from "@dcloudio/uni-app";
|
||||
import {Toast} from "tdesign-mobile-vue";
|
||||
import {useRequest} from "@/utils/request";
|
||||
import moment from "moment";
|
||||
@@ -152,14 +153,9 @@ function handleWonderfulMoment(row) {
|
||||
})
|
||||
}
|
||||
|
||||
onMounted(() => {
|
||||
onShow(() => {
|
||||
getActivity()
|
||||
getWonderfulMoment()
|
||||
uni.showToast({
|
||||
title: '欢迎使用',
|
||||
icon: 'none',
|
||||
duration: 2000
|
||||
})
|
||||
})
|
||||
|
||||
|
||||
|
||||
@@ -52,7 +52,7 @@
|
||||
</div>
|
||||
|
||||
<view class="title-content">
|
||||
<text class="main-title">HELLO,</text>
|
||||
<text class="main-title">第二届“钟声杯”直属工会趣味运动会</text>
|
||||
<view class="sub-title-container">
|
||||
<text class="sub-title">欢迎使用</text>
|
||||
</view>
|
||||
|
||||
@@ -53,7 +53,7 @@
|
||||
</div>
|
||||
|
||||
<view class="title-content">
|
||||
<text class="main-title">JOIN US</text>
|
||||
<text class="main-title">第二届“钟声杯”直属工会趣味运动会</text>
|
||||
<view class="sub-title-container">
|
||||
<text class="sub-title">用户注册</text>
|
||||
</view>
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
export const config = {
|
||||
fileDomain: 'http://localhost',
|
||||
fileDomain: 'https://3skj.ltd',
|
||||
}
|
||||
@@ -90,7 +90,7 @@ async function routeInterceptor(args, whiteList) {
|
||||
} else {
|
||||
console.log('拦截导航,跳转到登录页')
|
||||
// 保存用户尝试访问的页面,以便登录后跳回
|
||||
uni.setStorageSync('REDIRECT_URL', targetUrl + args.query)
|
||||
uni.setStorageSync('REDIRECT_URL', targetUrl)
|
||||
|
||||
Dialog.confirm({
|
||||
title: '提示',
|
||||
@@ -122,6 +122,7 @@ export const getDefaultWhiteList = () => {
|
||||
return [
|
||||
'/pages/index/index',
|
||||
'/pages/login/index',
|
||||
'/pages/login/register'
|
||||
'/pages/login/register',
|
||||
'/pages/activity/list/index'
|
||||
]
|
||||
}
|
||||
|
||||
@@ -34,7 +34,7 @@ export default defineConfig({
|
||||
},*/
|
||||
proxy: {
|
||||
'/api': {
|
||||
target: 'https://3skj.ltd',
|
||||
target: 'http://119.91.224.39:9090/',
|
||||
changeOrigin: true,
|
||||
rewrite: (path) => path.replace(/^\/api/, '')
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user