Merge branch 'main' of https://dd3skj.picp.vip/zhaoxinyu/hmc_gbhd
This commit is contained in:
+58
-10
@@ -4,15 +4,21 @@ import cn.dev33.satoken.annotation.SaCheckLogin;
|
||||
import com.budwk.app.base.result.Result;
|
||||
import com.budwk.app.client.module.activity.service.ClientActivityService;
|
||||
import com.budwk.app.module.activity.models.ActGroup;
|
||||
import com.budwk.app.module.activity.models.ActGroupUser;
|
||||
import com.budwk.app.module.activity.models.ActUser;
|
||||
import com.budwk.app.module.activity.models.ActivityItem;
|
||||
import com.budwk.app.web.commons.auth.satoken.StpClientUtil;
|
||||
import org.nutz.dao.Chain;
|
||||
import org.nutz.dao.Cnd;
|
||||
import org.nutz.dao.Dao;
|
||||
import org.nutz.dao.Sqls;
|
||||
import org.nutz.dao.sql.Sql;
|
||||
import org.nutz.ioc.loader.annotation.Inject;
|
||||
import org.nutz.ioc.loader.annotation.IocBean;
|
||||
import org.nutz.lang.Lang;
|
||||
import org.nutz.lang.util.NutMap;
|
||||
import org.nutz.mvc.adaptor.JsonAdaptor;
|
||||
import org.nutz.mvc.annotation.AdaptBy;
|
||||
import org.nutz.mvc.annotation.At;
|
||||
import org.nutz.mvc.annotation.Ok;
|
||||
|
||||
@@ -37,11 +43,12 @@ public class ClientGroupController {
|
||||
|
||||
/**
|
||||
* 查询我的活动
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@At("/list-act")
|
||||
@SaCheckLogin(type = StpClientUtil.TYPE)
|
||||
public Result listAct(){
|
||||
public Result listAct() {
|
||||
Sql sql = Sqls.create("""
|
||||
SELECT
|
||||
t1.id,
|
||||
@@ -64,19 +71,60 @@ public class ClientGroupController {
|
||||
|
||||
@At("/info/?")
|
||||
@SaCheckLogin(type = StpClientUtil.TYPE)
|
||||
public Result info(Long activityId){
|
||||
ActGroup group = dao.fetch(ActGroup.class, Cnd.where(ActGroup::getActivityId, "=", activityId));
|
||||
public Result info(Long activityId) {
|
||||
Sql sql = Sqls.create("select * from act_group where activityId=@activityId").setParam("activityId", activityId);
|
||||
sql.setCallback(Sqls.callback.map());
|
||||
NutMap map = (NutMap) dao.execute(sql).getResult();
|
||||
Sql sqlGroupUser = Sqls.create("""
|
||||
SELECT
|
||||
t1.*,
|
||||
t2.userName,
|
||||
t2.unitName,
|
||||
t2.sex
|
||||
FROM
|
||||
`act_group_user` t1
|
||||
LEFT JOIN act_user t2 ON t1.userId = t2.userId
|
||||
WHERE t1.groupId=@groupId
|
||||
""").setParam("groupId", map.getString("id"));
|
||||
List<NutMap> groupUsers = clientActivityService.listMap(sqlGroupUser);
|
||||
map.put("groupUsers", groupUsers);
|
||||
NutMap leader = groupUsers.stream().filter(nutMap -> nutMap.getBoolean("isLeader")).findFirst().orElse(null);
|
||||
map.put("isSelfLeader", "");
|
||||
if (Lang.isNotEmpty(leader)) {
|
||||
map.put("isSelfLeader", leader.getString("userId").equals(StpClientUtil.STP.getLoginIdAsString()));
|
||||
}
|
||||
|
||||
return Result.success(map);
|
||||
}
|
||||
|
||||
|
||||
@At("/apply-leader/?")
|
||||
@AdaptBy(type = JsonAdaptor.class)
|
||||
@SaCheckLogin(type = StpClientUtil.TYPE)
|
||||
public Result applyLeader(Long groupId) {
|
||||
clientActivityService.dao().update(ActGroupUser.class,
|
||||
Chain.make("isLeader", true),
|
||||
Cnd.where(ActGroupUser::getGroupId, "=", groupId)
|
||||
.and(ActGroupUser::getUserId, "=", StpClientUtil.STP.getLoginIdAsLong()));
|
||||
return Result.success();
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 查询团队成员
|
||||
*/
|
||||
@At("/list-team-user/?")
|
||||
@At("/list-team/?")
|
||||
@SaCheckLogin(type = StpClientUtil.TYPE)
|
||||
public Result listTeamUser(Long activityId){
|
||||
List<ActUser> list = dao.query(ActUser.class, Cnd.where(ActUser::getActivityId, "=", activityId).and(ActUser::getIsSignIn, "=", 1));
|
||||
public Result listTeam(Long activityId){
|
||||
Sql sql = Sqls.create("""
|
||||
SELECT
|
||||
t1.*,
|
||||
COUNT( t2.id ) isSignUp
|
||||
FROM
|
||||
activity_item t1
|
||||
LEFT JOIN act_item_user t2 ON t1.id = t2.itemId
|
||||
WHERE
|
||||
t1.activityId = @activityId
|
||||
GROUP BY
|
||||
t1.id
|
||||
""").setParam("activityId",activityId);
|
||||
List<NutMap> list = clientActivityService.listMap(sql);
|
||||
return Result.success(list);
|
||||
}
|
||||
}
|
||||
|
||||
+35
-3
@@ -5,14 +5,18 @@ import com.budwk.app.base.result.Result;
|
||||
import com.budwk.app.client.module.activity.service.ClientItemService;
|
||||
import com.budwk.app.client.module.activity.vo.ClientActivitySignVO;
|
||||
import com.budwk.app.client.module.activity.vo.ClientItemSignUpVO;
|
||||
import com.budwk.app.module.activity.models.ActGroup;
|
||||
import com.budwk.app.module.activity.models.ActUser;
|
||||
import com.budwk.app.module.activity.models.ActivityItem;
|
||||
import com.budwk.app.module.activity.models.ActivityItemUser;
|
||||
import com.budwk.app.web.commons.auth.satoken.StpClientUtil;
|
||||
import org.nutz.dao.Cnd;
|
||||
import org.nutz.dao.Dao;
|
||||
import org.nutz.dao.Sqls;
|
||||
import org.nutz.dao.sql.Sql;
|
||||
import org.nutz.ioc.loader.annotation.Inject;
|
||||
import org.nutz.ioc.loader.annotation.IocBean;
|
||||
import org.nutz.lang.util.NutMap;
|
||||
import org.nutz.mvc.adaptor.JsonAdaptor;
|
||||
import org.nutz.mvc.annotation.AdaptBy;
|
||||
import org.nutz.mvc.annotation.At;
|
||||
@@ -41,6 +45,19 @@ public class ClientItemController {
|
||||
return Result.success();
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 查询出这个活动所有报名的人
|
||||
* @param activityId
|
||||
* @return
|
||||
*/
|
||||
@At("/list-apply-user/?")
|
||||
@SaCheckLogin(type = StpClientUtil.TYPE)
|
||||
public Result listApplyUser(String activityId){
|
||||
List<ActivityItemUser> userList = dao.query(ActivityItemUser.class, Cnd.where(ActivityItemUser::getActivityId, "=", activityId));
|
||||
return Result.success(userList);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取项目列表
|
||||
*/
|
||||
@@ -56,8 +73,23 @@ public class ClientItemController {
|
||||
*/
|
||||
@At("/list-team-user/?")
|
||||
@SaCheckLogin(type = StpClientUtil.TYPE)
|
||||
public Result listTeamUser(Long activityId){
|
||||
List<ActUser> list = dao.query(ActUser.class, Cnd.where(ActUser::getActivityId, "=", activityId).and(ActUser::getIsSignIn, "=", 1));
|
||||
public Result listTeamUser(Long activityId) {
|
||||
Sql sql = Sqls.create("""
|
||||
SELECT
|
||||
t1.groupId,
|
||||
t1.userId,
|
||||
t2.activityId,
|
||||
t3.userName,
|
||||
t3.unitName,
|
||||
t3.sex
|
||||
FROM
|
||||
`act_group_user` t1
|
||||
LEFT JOIN act_group t2 ON t2.id = t1.groupId
|
||||
LEFT JOIN act_user t3 ON t3.userId = t1.userId
|
||||
WHERE
|
||||
t2.activityId = @activityId
|
||||
""").setParam("activityId", activityId);
|
||||
List<NutMap> list = clientItemService.listMap(sql);
|
||||
return Result.success(list);
|
||||
}
|
||||
|
||||
@@ -66,7 +98,7 @@ public class ClientItemController {
|
||||
*/
|
||||
@At("/list-signup-user")
|
||||
@SaCheckLogin
|
||||
public Result listSignUpUser(Long activityId,Long itemId) {
|
||||
public Result listSignUpUser(Long activityId, Long itemId) {
|
||||
List<ActivityItemUser> itemUsers = dao.query(ActivityItemUser.class, Cnd.where(ActivityItemUser::getActivityId, "=", activityId).and(ActivityItemUser::getItemId, "=", itemId));
|
||||
return Result.success(itemUsers);
|
||||
}
|
||||
|
||||
+12
-2
@@ -3,6 +3,7 @@ package com.budwk.app.client.module.activity.service.impl;
|
||||
import com.budwk.app.base.service.impl.BaseServiceImpl;
|
||||
import com.budwk.app.client.module.activity.service.ClientItemService;
|
||||
import com.budwk.app.client.module.activity.vo.ClientItemSignUpVO;
|
||||
import com.budwk.app.module.activity.models.Activity;
|
||||
import com.budwk.app.module.activity.models.ActivityItemUser;
|
||||
import org.nutz.aop.interceptor.ioc.TransAop;
|
||||
import org.nutz.dao.Cnd;
|
||||
@@ -10,6 +11,8 @@ import org.nutz.dao.Dao;
|
||||
import org.nutz.ioc.aop.Aop;
|
||||
import org.nutz.ioc.loader.annotation.IocBean;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
@IocBean(args = {"refer:dao"})
|
||||
@@ -21,17 +24,24 @@ public class ClientItemServiceImpl extends BaseServiceImpl<ActivityItemUser> imp
|
||||
@Override
|
||||
@Aop(TransAop.READ_COMMITTED)
|
||||
public void signUp(ClientItemSignUpVO signVO) {
|
||||
Activity activity = dao().fetch(Activity.class, Cnd.where(Activity::getId, "=", signVO.getActivityId()));
|
||||
if (activity.getItemEndTime().isBefore(LocalDateTime.now())){
|
||||
throw new RuntimeException("项目报名已结束!");
|
||||
}
|
||||
// 删除掉之前的
|
||||
clear(Cnd.where(ActivityItemUser::getActivityId, "=", signVO.getActivityId())
|
||||
.and(ActivityItemUser::getGroupId, "=", signVO.getGroupId())
|
||||
.and(ActivityItemUser::getItemId, "=", signVO.getItemId())
|
||||
);
|
||||
|
||||
List<ActivityItemUser> userList = signVO.getUserList();
|
||||
for (ActivityItemUser itemUser : userList) {
|
||||
List<ActivityItemUser> userList = new ArrayList<>();
|
||||
for (Long userId : signVO.getUserList()) {
|
||||
ActivityItemUser itemUser = new ActivityItemUser();
|
||||
itemUser.setActivityId(signVO.getActivityId());
|
||||
itemUser.setItemId(signVO.getItemId());
|
||||
itemUser.setGroupId(signVO.getGroupId());
|
||||
itemUser.setUserId(userId);
|
||||
userList.add(itemUser);
|
||||
}
|
||||
insert(userList);
|
||||
}
|
||||
|
||||
+1
-1
@@ -14,6 +14,6 @@ public class ClientItemSignUpVO {
|
||||
|
||||
private Long groupId;
|
||||
|
||||
private List<ActivityItemUser> userList;
|
||||
private List<Long> userList;
|
||||
|
||||
}
|
||||
|
||||
+81
@@ -0,0 +1,81 @@
|
||||
package com.budwk.app.module.activity.controller;
|
||||
|
||||
import cn.dev33.satoken.annotation.SaCheckPermission;
|
||||
import com.budwk.app.base.result.Result;
|
||||
import com.budwk.app.module.activity.models.ActGroup;
|
||||
import com.budwk.app.module.activity.models.Activity;
|
||||
import com.budwk.app.module.activity.service.ActivityManageService;
|
||||
import com.budwk.app.module.activity.vo.page.ActScoreEnterPageForm;
|
||||
import com.budwk.app.module.activity.vo.page.ActSignInUserPageForm;
|
||||
import org.nutz.dao.Cnd;
|
||||
import org.nutz.dao.Dao;
|
||||
import org.nutz.dao.Sqls;
|
||||
import org.nutz.dao.sql.Sql;
|
||||
import org.nutz.ioc.loader.annotation.Inject;
|
||||
import org.nutz.ioc.loader.annotation.IocBean;
|
||||
import org.nutz.lang.util.NutMap;
|
||||
import org.nutz.mvc.annotation.At;
|
||||
import org.nutz.mvc.annotation.Ok;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author zhf
|
||||
* @date 2025/4/29 15:56
|
||||
* @description 成绩录入
|
||||
*/
|
||||
@IocBean
|
||||
@At("/platform/activity/scoreEnter")
|
||||
@Ok("json:full")
|
||||
public class ActScoreEnterController {
|
||||
|
||||
|
||||
@Inject
|
||||
private Dao dao;
|
||||
@Inject
|
||||
private ActivityManageService activityService;
|
||||
|
||||
@At("")
|
||||
@SaCheckPermission("activity.scoreEnter")
|
||||
@Ok("beetl:/platform/activity/scoreEnter/index.html")
|
||||
public void index() {
|
||||
}
|
||||
|
||||
@At()
|
||||
@SaCheckPermission("activity.scoreEnter")
|
||||
public Result getActivityOptions(Integer year) {
|
||||
return Result.success(activityService.dao().query(Activity.class, Cnd.NEW().andEX("YEAR(startTime)", "=", year)));
|
||||
}
|
||||
|
||||
@At()
|
||||
@SaCheckPermission("activity.scoreEnter")
|
||||
public Result pageData(ActScoreEnterPageForm pageForm) {
|
||||
|
||||
Sql sql = Sqls.create("""
|
||||
SELECT
|
||||
t1.*
|
||||
FROM
|
||||
`activity_item` t1
|
||||
WHERE t1.activityId=@id
|
||||
ORDER BY t1.sort asc
|
||||
""").setParam("id", pageForm.getActivityId());
|
||||
|
||||
return Result.success(activityService.listPageMap(pageForm.getPageNumber(), pageForm.getPageSize(),sql));
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 获取分组列表
|
||||
* @param activityId
|
||||
* @return
|
||||
*/
|
||||
@At()
|
||||
@SaCheckPermission("activity.scoreEnter")
|
||||
public Result getGroupList(Long activityId){
|
||||
List<ActGroup> groupList = activityService.dao().query(ActGroup.class, Cnd.where(ActGroup::getActivityId, "=", activityId));
|
||||
return Result.success(groupList);
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@@ -50,6 +50,16 @@ public class Activity extends BaseModel {
|
||||
@ColDefine(type = ColType.DATETIME)
|
||||
private LocalDateTime signEndTime;
|
||||
|
||||
@Comment("项目报名开始时间")
|
||||
@Column
|
||||
@ColDefine(type = ColType.DATETIME)
|
||||
private LocalDateTime itemStartTime;
|
||||
|
||||
@Comment("项目报名结束时间")
|
||||
@Column
|
||||
@ColDefine(type = ColType.DATETIME)
|
||||
private LocalDateTime itemEndTime;
|
||||
|
||||
@Comment("主办单位")
|
||||
@Column
|
||||
@ColDefine(type = ColType.VARCHAR, width = 255)
|
||||
|
||||
@@ -0,0 +1,30 @@
|
||||
package com.budwk.app.module.activity.models;
|
||||
|
||||
import com.budwk.app.base.model.BaseModel;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import org.nutz.dao.entity.annotation.*;
|
||||
|
||||
/**
|
||||
* @author zhf
|
||||
* @date 2025/4/29 16:41
|
||||
* @description 活动成绩
|
||||
*/
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@Table("activity_item")
|
||||
@TableMeta("{'mysql-charset':'utf8mb4'}")
|
||||
@Comment("活动成绩")
|
||||
@Data
|
||||
public class ActivityItemScore extends BaseModel {
|
||||
|
||||
@Id
|
||||
@Comment("ID")
|
||||
private Long id;
|
||||
|
||||
@Column
|
||||
@Comment("活动ID")
|
||||
@ColDefine(type = ColType.INT)
|
||||
private Long activityId;
|
||||
|
||||
|
||||
}
|
||||
+19
@@ -0,0 +1,19 @@
|
||||
package com.budwk.app.module.activity.vo.page;
|
||||
|
||||
import com.budwk.app.base.page.PageForm;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
/**
|
||||
* @author zhf
|
||||
* @date 2025/4/29 16:08
|
||||
* @description
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
public class ActScoreEnterPageForm extends PageForm {
|
||||
|
||||
// 活动ID
|
||||
private Long activityId;
|
||||
|
||||
}
|
||||
@@ -6,7 +6,7 @@ const addOrUpdate = {
|
||||
<!-- <el-step title="项目信息" icon="el-icon-upload"></el-step>-->
|
||||
<!-- </el-steps>-->
|
||||
<!-- class="mt-3"-->
|
||||
<el-form ref="form" :model="form" :rules="rules" label-width="120px">
|
||||
<el-form ref="form" :model="form" :rules="rules" label-width="140px">
|
||||
<el-form-item label="标题" prop="title">
|
||||
<el-input v-model="form.title" placeholder="请输入标题"></el-input>
|
||||
</el-form-item>
|
||||
@@ -43,6 +43,22 @@ const addOrUpdate = {
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row type="flex" :gutter="20">
|
||||
<el-col :span="12">
|
||||
<el-form-item label="项目报名开始时间" prop="itemStartTime">
|
||||
<el-date-picker v-model="form.itemStartTime" type="datetime"
|
||||
value-format="yyyy-MM-dd HH:mm:ss"
|
||||
placeholder="请选择项目报名开始时间"></el-date-picker>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="项目报名结束时间" prop="itemEndTime">
|
||||
<el-date-picker v-model="form.itemEndTime" type="datetime"
|
||||
value-format="yyyy-MM-dd HH:mm:ss"
|
||||
placeholder="请选择项目报名结束时间"></el-date-picker>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-form-item label="主办单位" prop="hostUnit">
|
||||
<el-input v-model="form.hostUnit" placeholder="请输入主办单位"></el-input>
|
||||
</el-form-item>
|
||||
@@ -95,6 +111,12 @@ const addOrUpdate = {
|
||||
signEndTime: [
|
||||
{required: true, message: '请选择报名结束时间', trigger: ['blur', 'change']}
|
||||
],
|
||||
itemStartTime: [
|
||||
{required: true, message: '请选择项目报名开始时间', trigger: ['blur', 'change']}
|
||||
],
|
||||
itemEndTime: [
|
||||
{required: true, message: '请选择项目报名结束时间', trigger: ['blur', 'change']}
|
||||
],
|
||||
hostUnit: [{required: true, message: '请输入主办单位', trigger: ['blur', 'change']}],
|
||||
coHostUnit: [{required: true, message: '请输入承办单位', trigger: ['blur', 'change']}],
|
||||
contact: [{required: true, message: '请输入联系人', trigger: ['blur', 'change']}],
|
||||
|
||||
@@ -0,0 +1,79 @@
|
||||
const addOrUpdate = {
|
||||
template: /*language=HTML*/ `
|
||||
<el-dialog title="录入成绩" :visible.sync="visible" width="70%">
|
||||
|
||||
<el-table show-overflow-tooltip :data="tableData" height="500">
|
||||
<el-table-column label="序号" type="index" header-align="center" align="center"
|
||||
width="50"></el-table-column>
|
||||
<el-table-column label="团队名称" prop="groupId">
|
||||
<template slot-scope="scope">
|
||||
<el-select v-model="scope.row.groupId" placeholder="请选择" style="width: 100%">
|
||||
<el-option v-for="item in groupList" :key="item.id" :label="item.groupName"
|
||||
:value="item.id"></el-option>
|
||||
</el-select>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="成绩" prop="score">
|
||||
<template slot-scope="scope">
|
||||
<el-input-number v-model="scope.row.score"></el-input-number>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="得分" prop="fraction">
|
||||
<template slot-scope="scope">
|
||||
<el-input-number v-model="scope.row.fraction"></el-input-number>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" fixed="right" width="150">
|
||||
<template slot="header" slot-scope="scope">
|
||||
<el-button type="primary" size="mini" @click="tableData.push({})">添加</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
<template #footer>
|
||||
<el-button @click="visible = false">取消</el-button>
|
||||
<el-button type="primary" @click="onSubmit">确定</el-button>
|
||||
</template>
|
||||
</el-dialog>
|
||||
`,
|
||||
data() {
|
||||
return {
|
||||
title: '',
|
||||
visible: false,
|
||||
infoData: {},
|
||||
tableData: [],
|
||||
groupList: []
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
onOpen(row) {
|
||||
this.infoData = row
|
||||
this.getGroupList()
|
||||
this.visible = true
|
||||
|
||||
},
|
||||
getGroupList() {
|
||||
$.get('/platform/activity/scoreEnter/getGroupList', {activityId: this.infoData.activityId}).then(res => {
|
||||
if (res.code === 0) {
|
||||
this.groupList = res.data
|
||||
}
|
||||
})
|
||||
},
|
||||
onSubmit() {
|
||||
$.post('/platform/activity/scoreEnter/addOrUpdate', {
|
||||
activityId: this.infoData.activityId,
|
||||
itemId: this.infoData.id,
|
||||
scores: JSON.stringify(this.tableData)
|
||||
}).then(res => {
|
||||
if (res.code === 0) {
|
||||
this.$message.success('保存成功')
|
||||
this.visible = false
|
||||
} else {
|
||||
this.$message.error(res.msg)
|
||||
}
|
||||
})
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,110 @@
|
||||
<!--#
|
||||
layout("/layouts/platform_1.html"){
|
||||
#-->
|
||||
<div id="app">
|
||||
<el-card shadow="never">
|
||||
<div class="search">
|
||||
|
||||
<div class="search-item">
|
||||
<div class="search-item-label">年度</div>
|
||||
<div class="search-item-option">
|
||||
<el-date-picker
|
||||
:clearable="false"
|
||||
placeholder="选择年"
|
||||
style="width: 100%"
|
||||
@change="getActivityOptions"
|
||||
type="year"
|
||||
v-model="pageForm.year"
|
||||
value-format="yyyy"
|
||||
></el-date-picker>
|
||||
</div>
|
||||
</div>
|
||||
<div class="search-item">
|
||||
<div class="search-item-label">所属活动</div>
|
||||
<div class="search-item-option">
|
||||
<el-select v-model="pageForm.activityId" placeholder="请选择活动">
|
||||
<el-option
|
||||
v-for="item in activityOptions"
|
||||
:key="item.id"
|
||||
:label="item.title"
|
||||
:value="item.id">
|
||||
</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-table v-loading="tableLoading" show-overflow-tooltip :data="tableData">
|
||||
<el-table-column label="序号" prop="index" header-align="center" align="center" width="50">
|
||||
<template slot-scope="scope">
|
||||
<span>{{scope.$index+(pageForm.pageNumber - 1) * pageForm.pageSize + 1}} </span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="项目名称" prop="name"></el-table-column>
|
||||
<el-table-column label="操作" width="200">
|
||||
<template slot-scope="{row}">
|
||||
<el-button type="text" @click="$refs.addOrUpdateRef.onOpen(row)">录入成绩</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<!--#include("/layouts/pagination.html"){}#-->
|
||||
</el-card>
|
||||
<add-or-update ref="addOrUpdateRef" @refresh="doSearch"></add-or-update>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<script>
|
||||
<!--#include('addOrUpdate.js'){}#-->
|
||||
new Vue({
|
||||
el: "#app",
|
||||
mixins: [initTableMixins],
|
||||
components: {
|
||||
"add-or-update": addOrUpdate,
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
pageForm: {
|
||||
year: new Date().getFullYear() + ""
|
||||
},
|
||||
activityOptions: []
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
getActivityOptions() {
|
||||
$.post("/platform/activity/scoreEnter/getActivityOptions", {year: this.pageForm.year}).then(res => {
|
||||
if (res.code === 0) {
|
||||
if (res.data && res.data.length > 0) {
|
||||
this.$set(this.pageForm, "activityId", res.data[0].id)
|
||||
} else {
|
||||
this.$set(this.pageForm, "activityId", "")
|
||||
}
|
||||
this.activityOptions = res.data;
|
||||
this.doSearch()
|
||||
} else {
|
||||
this.$message.error(res.msg);
|
||||
}
|
||||
})
|
||||
|
||||
},
|
||||
},
|
||||
created() {
|
||||
this.getActivityOptions()
|
||||
}
|
||||
})
|
||||
</script>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -16,7 +16,7 @@
|
||||
v-for="project in itemOptions"
|
||||
:key="project.id"
|
||||
class="project-card"
|
||||
:class="{'project-card--registered': registrationStatus[project.id]?.length}"
|
||||
:class="{'project-card--registered': registrationStatus.get(project.id)?.length}"
|
||||
@click="selectProject(project.id)"
|
||||
>
|
||||
<view class="project-card__content">
|
||||
@@ -24,14 +24,14 @@
|
||||
<view class="project-card__desc">{{ project.description }}</view>
|
||||
</view>
|
||||
<view class="project-card__status">
|
||||
<t-tag v-if="registrationStatus[project.id]?.length" theme="success" variant="light-outline">
|
||||
已报名 {{ registrationStatus[project.id]?.length }}人
|
||||
<t-tag v-if="registrationStatus.get(project.id)?.length" theme="success" variant="light-outline">
|
||||
已报名 {{ registrationStatus.get(project.id)?.length }}人
|
||||
</t-tag>
|
||||
<view v-else class="project-card__action">
|
||||
<t-icon name="chevron-right" color="#999"/>
|
||||
</view>
|
||||
</view>
|
||||
<view v-if="registrationStatus[project.id]?.length" class="project-card__checkmark">
|
||||
<view v-if="registrationStatus.get(project.id)?.length" class="project-card__checkmark">
|
||||
<t-icon name="check" color="#52c41a"/>
|
||||
</view>
|
||||
</view>
|
||||
@@ -53,24 +53,19 @@
|
||||
<t-checkbox-group v-model="selectedMemberIds">
|
||||
<view
|
||||
v-for="member in teamMembers"
|
||||
:key="member.id"
|
||||
:key="member.userId"
|
||||
>
|
||||
<t-checkbox
|
||||
:value="member.id"
|
||||
:label="member.userName"
|
||||
:value="member.userId"
|
||||
:label="member.userName+'-'+member.sex"
|
||||
:content="member.unitName"
|
||||
:disabled="registrationStatus[selectedItemId]?.includes(member.id)"
|
||||
icon-size="20px"
|
||||
/>
|
||||
<view class="member-status" v-if="registrationStatus[selectedItemId]?.includes(member.id)">
|
||||
已报名
|
||||
</view>
|
||||
</view>
|
||||
</t-checkbox-group>
|
||||
</view>
|
||||
|
||||
<view class="picker-footer">
|
||||
<t-button block theme="primary" @click="submitRegistration" :disabled="!selectedMemberIds.length">
|
||||
<t-button block theme="primary" @click="submitRegistration" >
|
||||
确认报名 ({{ selectedMemberIds.length }}人)
|
||||
</t-button>
|
||||
</view>
|
||||
@@ -116,14 +111,15 @@ const teamMembers = ref([]);
|
||||
|
||||
onLoad((option) => {
|
||||
if (option.id) {
|
||||
selectActId.value = option.id;
|
||||
selectActId.value = Number(option.id);
|
||||
}
|
||||
});
|
||||
onMounted(async () => {
|
||||
await listActs()
|
||||
await listItems();
|
||||
listTeamUser()
|
||||
// fetchRegistrationStatus();
|
||||
await listTeamUser();
|
||||
await getApplyUsers();
|
||||
fetchRegistrationStatus();
|
||||
});
|
||||
|
||||
// 选中的团队成员
|
||||
@@ -132,8 +128,7 @@ const selectedMemberIds = ref([]);
|
||||
// 成员选择弹窗显示状态
|
||||
const showMemberPicker = ref(false);
|
||||
|
||||
// 当前项目的报名状态
|
||||
const registrationStatus = ref({});
|
||||
|
||||
|
||||
// 获取活动列表
|
||||
async function listActs() {
|
||||
@@ -146,9 +141,9 @@ async function listActs() {
|
||||
label: item.title
|
||||
}
|
||||
})
|
||||
if(selectActId.value === null && data.length){
|
||||
selectActId.value = data[0].id
|
||||
}
|
||||
// if(selectActId.value === null && data.length){
|
||||
// selectActId.value = data[0].id
|
||||
// }
|
||||
} else {
|
||||
Toast.error(msg)
|
||||
}
|
||||
@@ -171,61 +166,80 @@ async function listItems() {
|
||||
}
|
||||
|
||||
// 获取团队成员
|
||||
async function listTeamUser(){
|
||||
async function listTeamUser() {
|
||||
try {
|
||||
const {code, data, msg} = await request.get('/client/item/list-team-user/'+selectActId.value)
|
||||
const {code, data, msg} = await request.get('/client/item/list-team-user/' + selectActId.value)
|
||||
if (code === 0) {
|
||||
teamMembers.value = data;
|
||||
}else{
|
||||
} else {
|
||||
Toast.error(msg)
|
||||
}
|
||||
}catch (e){
|
||||
} catch (e) {
|
||||
Toast.error(msg)
|
||||
console.error(e)
|
||||
}
|
||||
}
|
||||
|
||||
// 当前项目的报名状态
|
||||
const registrationStatus = ref(new Map());
|
||||
// 获取报名状态 - 使用静态数据
|
||||
const fetchRegistrationStatus = async () => {
|
||||
const fetchRegistrationStatus = () => {
|
||||
|
||||
const resultMap = selectedMemberList.value.reduce((acc, item) => {
|
||||
const key = item.itemId;
|
||||
if (!acc.has(key)) {
|
||||
acc.set(key, []);
|
||||
}
|
||||
acc.get(key).push(item);
|
||||
return acc;
|
||||
}, new Map());
|
||||
registrationStatus.value = resultMap;
|
||||
};
|
||||
|
||||
// 选择项目
|
||||
const selectProject = (projectId) => {
|
||||
selectedItemId.value = projectId;
|
||||
selectedMemberIds.value = [];
|
||||
selectedMemberIds.value = selectedMemberList.value.filter(v => v.itemId === projectId).map(v => v.userId)
|
||||
|
||||
showMemberPicker.value = true;
|
||||
};
|
||||
|
||||
const selectedMemberList = ref([])
|
||||
// 每个项目报名的user
|
||||
const getApplyUsers = async () => {
|
||||
try {
|
||||
const {code, data, msg} = await useRequest().post('/client/item/list-apply-user/' + selectActId.value)
|
||||
if (code === 0) {
|
||||
selectedMemberList.value = data
|
||||
} else {
|
||||
Toast.error(msg)
|
||||
}
|
||||
} catch (e) {
|
||||
Toast.error(e.message)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// 提交报名 - 使用静态数据模拟
|
||||
const submitRegistration = async () => {
|
||||
if (!selectedMemberIds.value.length) {
|
||||
Toast.warning('请选择团队成员');
|
||||
return;
|
||||
}
|
||||
|
||||
try {
|
||||
console.log(selectedMemberIds.value)
|
||||
console.log(selectedItemId.value)
|
||||
console.log(selectActId.value)
|
||||
|
||||
const teamUser = teamMembers.value.filter(v=>selectedMemberIds.value.includes(v.id))
|
||||
|
||||
// const {code, msg} = await request.post('/client/item/sign-up', {
|
||||
// activityId: selectActId.value,
|
||||
// itemId: selectedItemId.value,
|
||||
// userList: selectedMemberIds.value
|
||||
// })
|
||||
// if (code === 0) {
|
||||
// Toast.success('报名成功')
|
||||
// showMemberPicker.value = false;
|
||||
// selectedMemberIds.value = []
|
||||
// }else{
|
||||
// Toast.error(msg)
|
||||
// }
|
||||
}catch (e){
|
||||
let data = {}
|
||||
data.activityId = selectActId.value
|
||||
data.itemId = selectedItemId.value
|
||||
data.userList = selectedMemberIds.value
|
||||
const {code, msg} = await useRequest().post('/client/item/sign-up', {...data})
|
||||
if (code === 0) {
|
||||
Toast.success('报名成功')
|
||||
showMemberPicker.value = false;
|
||||
selectedMemberIds.value = []
|
||||
await getApplyUsers();
|
||||
fetchRegistrationStatus();
|
||||
} else {
|
||||
Toast.error(msg)
|
||||
}
|
||||
} catch (e) {
|
||||
Toast.error(e.message)
|
||||
console.error(e)
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
@@ -1,118 +1,109 @@
|
||||
<template>
|
||||
<view class="page-container" :style="{ backgroundColor: '#f7f7f9' }">
|
||||
<t-sticky>
|
||||
<t-dropdown-menu class="top-dropdown-menu">
|
||||
<t-dropdown-item :options="actOptions" :value="pageForm.actId" @change="actChange" />
|
||||
</t-dropdown-menu>
|
||||
</t-sticky>
|
||||
<view class="page-container">
|
||||
<view v-if="actList&&actList?.length>0">
|
||||
<t-sticky>
|
||||
<t-dropdown-menu class="top-dropdown-menu">
|
||||
<t-dropdown-item :options="actOptions" :value="pageForm.actId" @change="actChange"/>
|
||||
</t-dropdown-menu>
|
||||
</t-sticky>
|
||||
<!-- 团队卡片 -->
|
||||
<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="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-basic-info">
|
||||
<div class="team-name">{{ team.name }}</div>
|
||||
<div class="team-meta">创建于 {{ team.createdDate }}</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="team-stats">
|
||||
<div class="stat-item">
|
||||
<div class="stat-icon"><i class="bi bi-people"></i></div>
|
||||
<div class="stat-content">
|
||||
<div class="stat-value">{{ team.memberCount }}</div>
|
||||
<div class="stat-label">成员</div>
|
||||
<div class="team-basic-info">
|
||||
<div class="team-name">{{ team.groupName }}</div>
|
||||
<div class="team-meta">创建于 {{moment(team.createdAt).format("YYYY-MM-DD HH:mm")}}</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="stat-divider"></div>
|
||||
<div class="stat-item">
|
||||
<div class="stat-icon"><i class="bi bi-trophy"></i></div>
|
||||
<div class="stat-content">
|
||||
<div class="stat-value">{{ team.rank }}</div>
|
||||
<div class="stat-label">排名</div>
|
||||
|
||||
<div class="team-stats">
|
||||
<div class="stat-item">
|
||||
<div class="stat-icon"><i class="bi bi-people"></i></div>
|
||||
<div class="stat-content">
|
||||
<div class="stat-value">{{ team.groupUsers?.length }}</div>
|
||||
<div class="stat-label">成员</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div v-if="team.description" class="team-desc-toggle" @click="showDesc = !showDesc">
|
||||
<span>团队介绍</span>
|
||||
<i class="bi" :class="showDesc ? 'bi-chevron-up' : 'bi-chevron-down'"></i>
|
||||
</div>
|
||||
|
||||
<div v-if="showDesc && team.description" class="team-desc">
|
||||
<i class="bi bi-quote"></i>
|
||||
{{ team.description }}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- 项目报名按钮 -->
|
||||
<div class="action-section">
|
||||
<t-button block theme="danger" size="large" class="register-btn" @click="goToEventRegistration">
|
||||
参与项目报名
|
||||
</t-button>
|
||||
</div>
|
||||
|
||||
<!-- 团队成员列表 -->
|
||||
<div class="members-section">
|
||||
<div class="section-header">
|
||||
<div class="section-title">
|
||||
<i class="bi bi-people-fill"></i>
|
||||
团队成员
|
||||
</div>
|
||||
<div class="section-badge">{{ team.memberCount }}</div>
|
||||
</div>
|
||||
|
||||
<div class="member-grid">
|
||||
<div class="member-grid-item" v-for="member in team.members" :key="member.id">
|
||||
<div class="member-name">
|
||||
{{ member.name }}
|
||||
<t-tag theme="danger" size="small" v-if="member.role === 'leader'">队长</t-tag>
|
||||
</div>
|
||||
<div class="member-details">
|
||||
<span><i class="bi bi-gender-ambiguous"></i> {{ member.gender }}</span>
|
||||
<span><i class="bi bi-building"></i> {{ member.organization }}</span>
|
||||
<div class="stat-divider"></div>
|
||||
<div class="stat-item">
|
||||
<div class="stat-icon"><i class="bi bi-trophy"></i></div>
|
||||
<div class="stat-content">
|
||||
<div class="stat-value">{{ team.totalRank ? team.totalRank : '--' }}</div>
|
||||
<div class="stat-label">排名</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- 当前角色与申请队长 -->
|
||||
<div class="role-section">
|
||||
<div class="role-card" v-if="currentUserRole === 'leader'">
|
||||
<div class="role-icon">
|
||||
<i class="bi bi-trophy"></i>
|
||||
<!-- 项目报名按钮 -->
|
||||
<div class="action-section" v-if="team.isSelfLeader">
|
||||
<t-button block theme="danger" size="large" class="register-btn" @click="goToEventRegistration">
|
||||
参与项目报名
|
||||
</t-button>
|
||||
</div>
|
||||
|
||||
<!-- 团队成员列表 -->
|
||||
<div class="members-section">
|
||||
<div class="section-header">
|
||||
<div class="section-title">
|
||||
<i class="bi bi-people-fill"></i>
|
||||
团队成员
|
||||
</div>
|
||||
<div class="role-info">
|
||||
<div class="role-title">您是队长</div>
|
||||
<div class="role-desc">拥有团队所有管理权限</div>
|
||||
<div class="section-badge">{{ team.groupUsers.length }}</div>
|
||||
</div>
|
||||
<div class="member-grid">
|
||||
<div class="member-grid-item" v-for="member in team.groupUsers" :key="member.id">
|
||||
<div class="member-name">
|
||||
{{ member.userName }}
|
||||
<t-tag theme="danger" size="small" v-if="member.isLeader">队长</t-tag>
|
||||
</div>
|
||||
<div class="member-details">
|
||||
<span><i class="bi bi-gender-ambiguous"></i>{{ member.sex }}</span>
|
||||
<span><i class="bi bi-building"></i>{{ member.unitName }}</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div v-else>
|
||||
<div class="role-card">
|
||||
|
||||
<!-- 当前角色与申请队长 -->
|
||||
<div class="role-section">
|
||||
<div class="role-card" v-if="team.isSelfLeader">
|
||||
<div class="role-icon">
|
||||
<i class="bi bi-person"></i>
|
||||
<i class="bi bi-trophy"></i>
|
||||
</div>
|
||||
<div class="role-info">
|
||||
<div class="role-title">您是普通成员</div>
|
||||
<div class="role-desc">申请成为队长可获得更多权限</div>
|
||||
<div class="role-title">您是队长</div>
|
||||
<div class="role-desc">拥有团队所有管理权限</div>
|
||||
</div>
|
||||
</div>
|
||||
<t-button block
|
||||
class="leader-apply-btn"
|
||||
theme="danger"
|
||||
variant="outline"
|
||||
@click="leaderConfirmVisible = true">
|
||||
申请成为队长
|
||||
</t-button>
|
||||
|
||||
<div v-else>
|
||||
<div class="role-card">
|
||||
<div class="role-icon">
|
||||
<i class="bi bi-person"></i>
|
||||
</div>
|
||||
<div class="role-info">
|
||||
<div class="role-title">您是普通成员</div>
|
||||
<div class="role-desc">申请成为队长可获得更多权限</div>
|
||||
</div>
|
||||
</div>
|
||||
<t-button block
|
||||
class="leader-apply-btn"
|
||||
theme="danger"
|
||||
variant="outline"
|
||||
@click="leaderConfirmVisible = true">
|
||||
申请成为队长
|
||||
</t-button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</view>
|
||||
<view v-else>暂无团队</view>
|
||||
</view>
|
||||
|
||||
<t-dialog
|
||||
@@ -135,21 +126,36 @@
|
||||
</div>
|
||||
</template>
|
||||
</t-dialog>
|
||||
|
||||
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import {ref, reactive} from "vue";
|
||||
import {ref, reactive, onMounted, computed} from 'vue';
|
||||
import {Dialog, Toast} from 'tdesign-mobile-vue';
|
||||
import {useRequest} from "@/utils/request";
|
||||
import moment from "moment";
|
||||
import {onLoad} from "@dcloudio/uni-app";
|
||||
|
||||
const actOptions = ref([])
|
||||
const actList = ref([])
|
||||
const showDesc = ref(false)
|
||||
|
||||
const actOptions = computed(() => {
|
||||
return actList.value.map(item => {
|
||||
return {
|
||||
value: item.id,
|
||||
label: item.title
|
||||
}
|
||||
})
|
||||
})
|
||||
|
||||
const pageForm = reactive({
|
||||
actId: null,
|
||||
})
|
||||
|
||||
const teamId = ''
|
||||
|
||||
const team = reactive({
|
||||
let team = ref({
|
||||
id: teamId,
|
||||
name: 'xx队',
|
||||
logoUrl: null,
|
||||
@@ -162,70 +168,79 @@ const team = reactive({
|
||||
description: 'xxxxxxxxxxxxxxxxxxx',
|
||||
|
||||
// 团队成员
|
||||
members: [
|
||||
{
|
||||
id: '101',
|
||||
name: '张伟',
|
||||
role: 'leader',
|
||||
gender: '男',
|
||||
organization: '江苏体育学院',
|
||||
avatar: null
|
||||
},
|
||||
{
|
||||
id: '102',
|
||||
name: '李娜',
|
||||
role: 'admin',
|
||||
gender: '女',
|
||||
organization: '南京体育局',
|
||||
avatar: null
|
||||
},
|
||||
{
|
||||
id: '103',
|
||||
name: '王强',
|
||||
role: 'member',
|
||||
gender: '男',
|
||||
organization: '南京体育学院',
|
||||
avatar: null
|
||||
},
|
||||
{
|
||||
id: '104',
|
||||
name: '刘芳',
|
||||
role: 'member',
|
||||
gender: '女',
|
||||
organization: '江苏大学',
|
||||
avatar: null
|
||||
},
|
||||
{
|
||||
id: '105',
|
||||
name: '陈明',
|
||||
role: 'member',
|
||||
gender: '男',
|
||||
organization: '苏州体育中心',
|
||||
avatar: null
|
||||
}
|
||||
]
|
||||
groupUsers: []
|
||||
});
|
||||
|
||||
const currentUserRole = ref('')
|
||||
// 申请成为队长弹框提示
|
||||
const leaderConfirmVisible = ref(false)
|
||||
|
||||
function handleMenuOpened(){
|
||||
const handleMenuOpened = () => {
|
||||
|
||||
}
|
||||
|
||||
function handleMenuClosed(){}
|
||||
const handleMenuClosed = () => {
|
||||
}
|
||||
|
||||
function actChange(val){
|
||||
console.log(val)
|
||||
const actChange = (val) => {
|
||||
getListAct()
|
||||
}
|
||||
|
||||
// 申请成为队长
|
||||
function onLeaderConfirm(){
|
||||
|
||||
const onLeaderConfirm = async () => {
|
||||
try {
|
||||
pageForm.groupId = team.value.id
|
||||
const {code, msg} = await useRequest().post('/client/group/apply-leader/' + team.value.id);
|
||||
if (code === 0) {
|
||||
Toast({message: '申请成功', theme: 'success'});
|
||||
leaderConfirmVisible.value = false
|
||||
} else {
|
||||
Toast({message: msg, theme: 'error'});
|
||||
}
|
||||
} catch (e) {
|
||||
Toast({message: e, theme: 'error'});
|
||||
}
|
||||
}
|
||||
|
||||
function goToEventRegistration(){}
|
||||
// 点击参与项目报名
|
||||
const goToEventRegistration = () => {
|
||||
uni.navigateTo({url: '/pages/activity/team-form/index?id=' + pageForm.actId})
|
||||
};
|
||||
|
||||
|
||||
// 根据活动查询队伍信息
|
||||
const getTeamInfo = async () => {
|
||||
try {
|
||||
const {code, msg, data} = await useRequest().post('/client/group/info/' + pageForm.actId);
|
||||
if (code === 0) {
|
||||
team.value = data
|
||||
} else {
|
||||
Toast({message: msg, theme: 'error'});
|
||||
}
|
||||
} catch (e) {
|
||||
Toast({message: e, theme: 'error'});
|
||||
}
|
||||
};
|
||||
|
||||
// 查询自己已经签到的活动
|
||||
const getListAct = async () => {
|
||||
try {
|
||||
const {code, msg, data} = await useRequest().post('/client/group/list-act');
|
||||
if (code === 0) {
|
||||
actList.value = data;
|
||||
if (data.length > 0) {
|
||||
pageForm.actId = data[0].id;
|
||||
await getTeamInfo();
|
||||
}
|
||||
}
|
||||
} catch (error) {
|
||||
Toast({message: error, theme: 'error'});
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
// 初始化
|
||||
onLoad(() => {
|
||||
getListAct();
|
||||
});
|
||||
</script>
|
||||
|
||||
<style scoped lang="less">
|
||||
|
||||
Reference in New Issue
Block a user