团队赛队员配置修改

main
zhc077 3 months ago
parent b48bddcc24
commit 67ed396f1c
  1. 1152
      jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/annualCompPoint/controller/AnnualCompPointController.java
  2. 18
      jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/annualCompPoint/service/impl/AnnualCompPointServiceImpl.java
  3. 17
      jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/teamseq/controller/TeamSeqController.java
  4. 4
      jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/teamseq/service/ITeamSeqService.java
  5. 23
      jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/teamseq/service/impl/TeamSeqServiceImpl.java
  6. 312
      jeecgboot-vue3-master/src/views/annualCompPoint/committee/components/AnnualCompPointForm.vue

@ -4,7 +4,6 @@ import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.jeecg.common.api.vo.Result; import org.jeecg.common.api.vo.Result;
import org.jeecg.common.system.query.QueryGenerator; import org.jeecg.common.system.query.QueryGenerator;
import org.jeecg.modules.demo.annualCompPoint.entity.AnnualCompPoint; import org.jeecg.modules.demo.annualCompPoint.entity.AnnualCompPoint;
@ -14,15 +13,15 @@ import org.jeecg.modules.demo.annualcomp.entity.AnnualComp;
import org.jeecg.modules.demo.annualcomp.service.impl.AnnualCompServiceImpl; import org.jeecg.modules.demo.annualcomp.service.impl.AnnualCompServiceImpl;
import org.jeecg.modules.demo.annualcompaward.entity.AnnualCompAward; import org.jeecg.modules.demo.annualcompaward.entity.AnnualCompAward;
import org.jeecg.modules.demo.annualcompaward.mapper.AnnualCompAwardMapper; import org.jeecg.modules.demo.annualcompaward.mapper.AnnualCompAwardMapper;
import org.jeecg.modules.demo.objLevel.entity.ObjLevel;
import org.jeecg.modules.demo.objLevel.service.impl.ObjLevelServiceImpl; import org.jeecg.modules.demo.objLevel.service.impl.ObjLevelServiceImpl;
import org.jeecg.modules.demo.projectlevel.entity.Projectlevel; import org.jeecg.modules.demo.projectlevel.entity.Projectlevel;
import org.jeecg.modules.demo.projectlevel.service.IProjectlevelService; import org.jeecg.modules.demo.projectlevel.service.IProjectlevelService;
import org.jeecg.modules.demo.teamseq.entity.TeamSeq;
import org.jeecg.modules.demo.teamseq.service.ITeamSeqService;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletRequest;
import java.time.LocalDate; import java.time.LocalDate;
import java.util.List; import java.util.List;
@ -55,9 +54,6 @@ public class AnnualCompPointServiceImpl extends ServiceImpl<AnnualCompPointMappe
@Autowired @Autowired
private AnnualCompAwardMapper annualCompAwardMapper; private AnnualCompAwardMapper annualCompAwardMapper;
@Autowired
private ITeamSeqService teamSeqService;
/** /**
* 年度比赛项目 添加 * 年度比赛项目 添加
*/ */
@ -268,17 +264,9 @@ public class AnnualCompPointServiceImpl extends ServiceImpl<AnnualCompPointMappe
AnnualCompAward annualCompAward=new AnnualCompAward(); AnnualCompAward annualCompAward=new AnnualCompAward();
annualCompAward.setAnnucompid(annualCompPoint.getId()); annualCompAward.setAnnucompid(annualCompPoint.getId());
annualCompAwardMapper.insert(annualCompAward); annualCompAwardMapper.insert(annualCompAward);
//保存团队赛队员积分计算配置 add by zhc 8.22
teamSeqService.saveOrUpdate4TeamSeq(annualCompPoint);
return Result.OK("新增成功"); return Result.OK("新增成功");
} }
@Override @Override
public Result<IPage<AnnualCompPoint>> pageList(AnnualCompPoint annualCompPoint, Integer pageNo, Integer pageSize, HttpServletRequest req) { public Result<IPage<AnnualCompPoint>> pageList(AnnualCompPoint annualCompPoint, Integer pageNo, Integer pageSize, HttpServletRequest req) {
List<Projectlevel> levelList = projectlevelService.list(); List<Projectlevel> levelList = projectlevelService.list();

@ -1,5 +1,6 @@
package org.jeecg.modules.demo.teamseq.controller; package org.jeecg.modules.demo.teamseq.controller;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
@ -20,6 +21,7 @@ import org.springframework.web.servlet.ModelAndView;
import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpServletResponse;
import java.util.Arrays; import java.util.Arrays;
import java.util.List;
/** /**
* @Description: 团队赛队员积分计算配置 * @Description: 团队赛队员积分计算配置
@ -57,6 +59,12 @@ public class TeamSeqController extends JeecgController<TeamSeq, ITeamSeqService>
return Result.OK(pageList); return Result.OK(pageList);
} }
@ApiOperation(value = "团队赛队员积分计算配置-分页列表查询", notes = "团队赛队员积分计算配置-分页列表查询")
@GetMapping(value = "/listByPointId")
public Result<List<TeamSeq>> queryPageList(String pointId) {
return Result.OK(teamSeqService.list(new LambdaQueryWrapper<TeamSeq>().eq(TeamSeq::getPointId,pointId)));
}
/** /**
* 添加 * 添加
* *
@ -72,6 +80,15 @@ public class TeamSeqController extends JeecgController<TeamSeq, ITeamSeqService>
return Result.OK("添加成功!"); return Result.OK("添加成功!");
} }
@AutoLog(value = "团队赛队员积分计算配置-添加")
@ApiOperation(value = "团队赛队员积分计算配置-添加", notes = "团队赛队员积分计算配置-添加")
// @RequiresPermissions("teamseq:team_seq:add")
@PostMapping(value = "/saveOrUpdate4TeamSeq")
public Result<String> saveOrUpdate4TeamSeq(@RequestBody List<TeamSeq> seqList) {
teamSeqService.saveOrUpdate4TeamSeq(seqList);
return Result.OK("添加成功!");
}
/** /**
* 编辑 * 编辑
* *

@ -4,6 +4,8 @@ import org.jeecg.modules.demo.annualCompPoint.entity.AnnualCompPoint;
import org.jeecg.modules.demo.teamseq.entity.TeamSeq; import org.jeecg.modules.demo.teamseq.entity.TeamSeq;
import com.baomidou.mybatisplus.extension.service.IService; import com.baomidou.mybatisplus.extension.service.IService;
import java.util.List;
/** /**
* @Description: 团队赛队员积分计算配置 * @Description: 团队赛队员积分计算配置
* @Author: jeecg-boot * @Author: jeecg-boot
@ -12,5 +14,5 @@ import com.baomidou.mybatisplus.extension.service.IService;
*/ */
public interface ITeamSeqService extends IService<TeamSeq> { public interface ITeamSeqService extends IService<TeamSeq> {
void saveOrUpdate4TeamSeq(AnnualCompPoint point); void saveOrUpdate4TeamSeq(List<TeamSeq> list);
} }

@ -1,7 +1,7 @@
package org.jeecg.modules.demo.teamseq.service.impl; package org.jeecg.modules.demo.teamseq.service.impl;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import org.jeecg.modules.demo.annualCompPoint.entity.AnnualCompPoint; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.jeecg.modules.demo.teamseq.entity.TeamSeq; import org.jeecg.modules.demo.teamseq.entity.TeamSeq;
import org.jeecg.modules.demo.teamseq.mapper.TeamSeqMapper; import org.jeecg.modules.demo.teamseq.mapper.TeamSeqMapper;
import org.jeecg.modules.demo.teamseq.service.ITeamSeqService; import org.jeecg.modules.demo.teamseq.service.ITeamSeqService;
@ -9,25 +9,26 @@ import org.jeecg.modules.demo.teamseq.vo.TeamSeqVo;
import org.springframework.beans.BeanUtils; import org.springframework.beans.BeanUtils;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import java.util.List;
/** /**
* @Description: 团队赛队员积分计算配置 * @Description: 团队赛队员积分计算配置
* @Author: jeecg-boot * @Author: jeecg-boot
* @Date: 2024-08-22 * @Date: 2024-08-22
* @Version: V1.0 * @Version: V1.0
*/ */
@Service @Service
public class TeamSeqServiceImpl extends ServiceImpl<TeamSeqMapper, TeamSeq> implements ITeamSeqService { public class TeamSeqServiceImpl extends ServiceImpl<TeamSeqMapper, TeamSeq> implements ITeamSeqService {
@Override @Override
public void saveOrUpdate4TeamSeq(AnnualCompPoint point) { public void saveOrUpdate4TeamSeq(List<TeamSeq> list) {
this.remove(new LambdaQueryWrapper<TeamSeq>().eq(TeamSeq::getPointId,point.getId())); String pointId = list.get(0).getPointId();
TeamSeqVo vo = new TeamSeqVo(); this.remove(new LambdaQueryWrapper<TeamSeq>().eq(TeamSeq::getPointId, pointId));
BeanUtils.copyProperties(point,vo); // TeamSeqVo vo = new TeamSeqVo();
vo.setPointId(point.getId()); // BeanUtils.copyProperties(point, vo);
TeamSeq teamSeq = new TeamSeq(); // vo.setPointId(point.getId());
BeanUtils.copyProperties(vo,teamSeq); // TeamSeq teamSeq = new TeamSeq();
this.save(teamSeq); // BeanUtils.copyProperties(vo, teamSeq);
this.saveBatch(list);
} }
} }

@ -44,9 +44,13 @@
</a-form-item> </a-form-item>
</a-col> </a-col>
<a-col :span="16"> <a-col :span="16">
<a-form-item label="项目(赛道)层次" v-bind="validateInfos.objLevel" :labelCol="labelCol" :wrapperCol="wrapperCol7"> <a-form-item label="项目(赛道)层次" v-bind="validateInfos.objLevel" :labelCol="labelCol"
:wrapperCol="wrapperCol7">
<a-radio-group v-model:value="formData.objLevel"> <a-radio-group v-model:value="formData.objLevel">
<a-radio v-for="item in objLevelll" :key="item.id" :value="item.id">{{ item.name }}</a-radio> <a-radio v-for="item in objLevelll" :key="item.id" :value="item.id">{{
item.name
}}
</a-radio>
</a-radio-group> </a-radio-group>
</a-form-item> </a-form-item>
</a-col> </a-col>
@ -66,18 +70,21 @@
<a-col :span="11"> <a-col :span="11">
<a-form-item label="参与形式" v-bind="validateInfos.entryForm" :labelCol="labelCol" <a-form-item label="参与形式" v-bind="validateInfos.entryForm" :labelCol="labelCol"
:wrapperCol="wrapperCol8"> :wrapperCol="wrapperCol8">
<j-dict-select-tag type="radio" v-model:value="formData.entryForm" placeholder="请选择参与形式" dict-code="joinType" /> <j-dict-select-tag type="radio" v-model:value="formData.entryForm"
placeholder="请选择参与形式" dict-code="joinType"/>
</a-form-item> </a-form-item>
</a-col> </a-col>
<a-col :span="6" v-if="formData.entryForm==='Y'"> <a-col :span="6" v-if="formData.entryForm==='Y'">
<a-form-item label="是否需要领队" v-bind="validateInfos.requireLeader" :labelCol="labelCol3" <a-form-item label="是否需要领队" v-bind="validateInfos.requireLeader"
:labelCol="labelCol3"
:wrapperCol="wrapperCol3"> :wrapperCol="wrapperCol3">
<j-switch v-model:value="formData.requireLeader" :disabled="disabled"></j-switch> <j-switch v-model:value="formData.requireLeader" :disabled="disabled"></j-switch>
</a-form-item> </a-form-item>
</a-col> </a-col>
<a-col :span="7" v-if="formData.entryForm==='Y'"> <a-col :span="7" v-if="formData.entryForm==='Y'">
<a-form-item label="是否需要队伍名称" v-bind="validateInfos.requireTeamName" :labelCol="labelCol3" <a-form-item label="是否需要队伍名称" v-bind="validateInfos.requireTeamName"
:wrapperCol="wrapperCol3" > :labelCol="labelCol3"
:wrapperCol="wrapperCol3">
<j-switch type='radio' v-model:value="formData.requireTeamName" dictCode="" <j-switch type='radio' v-model:value="formData.requireTeamName" dictCode=""
placeholder="请选择是否需要队伍名称" :disabled="disabled"/> placeholder="请选择是否需要队伍名称" :disabled="disabled"/>
</a-form-item> </a-form-item>
@ -101,79 +108,79 @@
</a-col> </a-col>
</a-row> </a-row>
<!-- <!--
<a-row v-if="formData.entryForm ==='Y'"> <a-row v-if="formData.entryForm ==='Y'">
<a-col :span="12"> <a-col :span="12">
<a-form-item label="队伍第1编号" > <a-form-item label="队伍第1编号" >
<a-input-number v-model:value="formData.teamSeqFirst" placeholder="请输入队伍第1编号" style="width: 100%" disabled/> <a-input-number v-model:value="formData.teamSeqFirst" placeholder="请输入队伍第1编号" style="width: 100%" disabled/>
</a-form-item> </a-form-item>
</a-col> </a-col>
<a-col :span="12"> <a-col :span="12">
<a-form-item label="第1编号比值" v-bind="formData.teamSeqFirstVal"> <a-form-item label="第1编号比值" v-bind="formData.teamSeqFirstVal">
<a-input-number v-model:value="formData.teamSeqFirstVal" placeholder="请输入第1编号比值" <a-input-number v-model:value="formData.teamSeqFirstVal" placeholder="请输入第1编号比值"
style="width: 100%" /> style="width: 100%" />
</a-form-item> </a-form-item>
</a-col> </a-col>
</a-row> </a-row>
<a-row v-if="formData.entryForm ==='Y'"> <a-row v-if="formData.entryForm ==='Y'">
<a-col :span="12"> <a-col :span="12">
<a-form-item label="队伍第2编号" v-bind="formData.teamSeqSecond"> <a-form-item label="队伍第2编号" v-bind="formData.teamSeqSecond">
<a-input-number v-model:value="formData.teamSeqSecond" placeholder="请输入队伍第2编号" style="width: 100%" disabled/> <a-input-number v-model:value="formData.teamSeqSecond" placeholder="请输入队伍第2编号" style="width: 100%" disabled/>
</a-form-item> </a-form-item>
</a-col> </a-col>
<a-col :span="12"> <a-col :span="12">
<a-form-item label="第2编号比值" v-bind="formData.teamSeqSecondVal"> <a-form-item label="第2编号比值" v-bind="formData.teamSeqSecondVal">
<a-input-number v-model:value="formData.teamSeqSecondVal" placeholder="请输入第2编号比值" <a-input-number v-model:value="formData.teamSeqSecondVal" placeholder="请输入第2编号比值"
style="width: 100%" /> style="width: 100%" />
</a-form-item> </a-form-item>
</a-col> </a-col>
</a-row> </a-row>
<a-row v-if="formData.entryForm ==='Y'"> <a-row v-if="formData.entryForm ==='Y'">
<a-col :span="12"> <a-col :span="12">
<a-form-item label="队伍第3编号" v-bind="formData.teamSeqThird"> <a-form-item label="队伍第3编号" v-bind="formData.teamSeqThird">
<a-input-number v-model:value="formData.teamSeqThird" placeholder="请输入队伍第3编号" style="width: 100%" disabled/> <a-input-number v-model:value="formData.teamSeqThird" placeholder="请输入队伍第3编号" style="width: 100%" disabled/>
</a-form-item> </a-form-item>
</a-col> </a-col>
<a-col :span="12"> <a-col :span="12">
<a-form-item label="第3编号比值" v-bind="formData.teamSeqThirdVal"> <a-form-item label="第3编号比值" v-bind="formData.teamSeqThirdVal">
<a-input-number v-model:value="formData.teamSeqThirdVal" placeholder="请输入第3编号比值" <a-input-number v-model:value="formData.teamSeqThirdVal" placeholder="请输入第3编号比值"
style="width: 100%" /> style="width: 100%" />
</a-form-item> </a-form-item>
</a-col> </a-col>
</a-row> </a-row>
<a-row v-if="formData.entryForm ==='Y'"> <a-row v-if="formData.entryForm ==='Y'">
<a-col :span="12"> <a-col :span="12">
<a-form-item label="队伍第4编号" v-bind="formData.teamSeqFourth"> <a-form-item label="队伍第4编号" v-bind="formData.teamSeqFourth">
<a-input-number v-model:value="formData.teamSeqFourth" placeholder="请输入队伍第4编号" style="width: 100%" disabled/> <a-input-number v-model:value="formData.teamSeqFourth" placeholder="请输入队伍第4编号" style="width: 100%" disabled/>
</a-form-item> </a-form-item>
</a-col> </a-col>
<a-col :span="12"> <a-col :span="12">
<a-form-item label="第4编号比值" v-bind="formData.teamSeqFourthVal"> <a-form-item label="第4编号比值" v-bind="formData.teamSeqFourthVal">
<a-input-number v-model:value="formData.teamSeqFourthVal" placeholder="请输入第4编号比值" <a-input-number v-model:value="formData.teamSeqFourthVal" placeholder="请输入第4编号比值"
style="width: 100%" /> style="width: 100%" />
</a-form-item> </a-form-item>
</a-col> </a-col>
</a-row> </a-row>
<a-row v-if="formData.entryForm ==='Y'"> <a-row v-if="formData.entryForm ==='Y'">
<a-col :span="12"> <a-col :span="12">
<a-form-item label="队伍第5编号" v-bind="formData.teamSeqFifth"> <a-form-item label="队伍第5编号" v-bind="formData.teamSeqFifth">
<a-input-number v-model:value="formData.teamSeqFifth" placeholder="请输入队伍第5编号" style="width: 100%" disabled/> <a-input-number v-model:value="formData.teamSeqFifth" placeholder="请输入队伍第5编号" style="width: 100%" disabled/>
</a-form-item> </a-form-item>
</a-col> </a-col>
<a-col :span="12"> <a-col :span="12">
<a-form-item label="第5编号比值" v-bind="formData.teamSeqFifthVal"> <a-form-item label="第5编号比值" v-bind="formData.teamSeqFifthVal">
<a-input-number v-model:value="formData.teamSeqFifthVal" placeholder="请输入第5编号比值" <a-input-number v-model:value="formData.teamSeqFifthVal" placeholder="请输入第5编号比值"
style="width: 100%" /> style="width: 100%" />
</a-form-item> </a-form-item>
</a-col> </a-col>
</a-row> </a-row>
--> -->
<a-row> <a-row>
@ -186,7 +193,8 @@
<a-col :span="9" v-if="formData.requireApply==='Y'"> <a-col :span="9" v-if="formData.requireApply==='Y'">
<a-form-item label="开始时间" v-bind="validateInfos.applyStartTime" :labelCol="labelCol5" <a-form-item label="开始时间" v-bind="validateInfos.applyStartTime" :labelCol="labelCol5"
:wrapperCol="wrapperCol5"> :wrapperCol="wrapperCol5">
<a-date-picker placeholder="请选择报名开始时间" v-model:value="formData.applyStartTime" showTime <a-date-picker placeholder="请选择报名开始时间" v-model:value="formData.applyStartTime"
showTime
value-format="YYYY-MM-DD HH:mm:ss" style="width: 100%" value-format="YYYY-MM-DD HH:mm:ss" style="width: 100%"
:disabled="disabled"/> :disabled="disabled"/>
</a-form-item> </a-form-item>
@ -194,7 +202,8 @@
<a-col :span="9" v-if="formData.requireApply==='Y'"> <a-col :span="9" v-if="formData.requireApply==='Y'">
<a-form-item label="结束时间" v-bind="validateInfos.applyEndTime" :labelCol="labelCol5" <a-form-item label="结束时间" v-bind="validateInfos.applyEndTime" :labelCol="labelCol5"
:wrapperCol="wrapperCol5"> :wrapperCol="wrapperCol5">
<a-date-picker placeholder="请选择报名结束时间" v-model:value="formData.applyEndTime" showTime <a-date-picker placeholder="请选择报名结束时间" v-model:value="formData.applyEndTime"
showTime
value-format="YYYY-MM-DD HH:mm:ss" style="width: 100%" value-format="YYYY-MM-DD HH:mm:ss" style="width: 100%"
:disabled="disabled"/> :disabled="disabled"/>
</a-form-item> </a-form-item>
@ -212,7 +221,8 @@
<a-col :span="9" v-if="formData.requireTopic==='Y'"> <a-col :span="9" v-if="formData.requireTopic==='Y'">
<a-form-item label="开始时间" v-bind="validateInfos.topicStartTime" :labelCol="labelCol5" <a-form-item label="开始时间" v-bind="validateInfos.topicStartTime" :labelCol="labelCol5"
:wrapperCol="wrapperCol5"> :wrapperCol="wrapperCol5">
<a-date-picker placeholder="请选择选题开始时间" v-model:value="formData.topicStartTime" showTime <a-date-picker placeholder="请选择选题开始时间" v-model:value="formData.topicStartTime"
showTime
value-format="YYYY-MM-DD HH:mm:ss" style="width: 100%" value-format="YYYY-MM-DD HH:mm:ss" style="width: 100%"
:disabled="disabled"/> :disabled="disabled"/>
</a-form-item> </a-form-item>
@ -220,7 +230,8 @@
<a-col :span="9" v-if="formData.requireTopic==='Y'"> <a-col :span="9" v-if="formData.requireTopic==='Y'">
<a-form-item label="结束时间" v-bind="validateInfos.topicEndTime" :labelCol="labelCol5" <a-form-item label="结束时间" v-bind="validateInfos.topicEndTime" :labelCol="labelCol5"
:wrapperCol="wrapperCol5"> :wrapperCol="wrapperCol5">
<a-date-picker placeholder="请选择选题结束时间" v-model:value="formData.topicEndTime" showTime <a-date-picker placeholder="请选择选题结束时间" v-model:value="formData.topicEndTime"
showTime
value-format="YYYY-MM-DD HH:mm:ss" style="width: 100%" value-format="YYYY-MM-DD HH:mm:ss" style="width: 100%"
:disabled="disabled"/> :disabled="disabled"/>
</a-form-item> </a-form-item>
@ -229,7 +240,8 @@
<a-row> <a-row>
<a-col :span="5"> <a-col :span="5">
<a-form-item label="上传作品" v-bind="validateInfos.requireUploadWorks" :labelCol="labelCol4" <a-form-item label="上传作品" v-bind="validateInfos.requireUploadWorks"
:labelCol="labelCol4"
:wrapperCol="wrapperCol4"> :wrapperCol="wrapperCol4">
<j-switch v-model:value="formData.requireUploadWorks" :disabled="disabled"></j-switch> <j-switch v-model:value="formData.requireUploadWorks" :disabled="disabled"></j-switch>
</a-form-item> </a-form-item>
@ -238,7 +250,8 @@
<a-col :span="9" v-if="formData.requireUploadWorks==='Y'"> <a-col :span="9" v-if="formData.requireUploadWorks==='Y'">
<a-form-item label="开始时间" v-bind="validateInfos.uploadStartTime" :labelCol="labelCol5" <a-form-item label="开始时间" v-bind="validateInfos.uploadStartTime" :labelCol="labelCol5"
:wrapperCol="wrapperCol5"> :wrapperCol="wrapperCol5">
<a-date-picker placeholder="请选择上传作品开始时间" v-model:value="formData.uploadStartTime" <a-date-picker placeholder="请选择上传作品开始时间"
v-model:value="formData.uploadStartTime"
showTime value-format="YYYY-MM-DD HH:mm:ss" style="width: 100%" showTime value-format="YYYY-MM-DD HH:mm:ss" style="width: 100%"
:disabled="disabled"/> :disabled="disabled"/>
</a-form-item> </a-form-item>
@ -246,16 +259,19 @@
<a-col :span="9" v-if="formData.requireUploadWorks==='Y'"> <a-col :span="9" v-if="formData.requireUploadWorks==='Y'">
<a-form-item label="结束时间" v-bind="validateInfos.uploadEndTime" :labelCol="labelCol5" <a-form-item label="结束时间" v-bind="validateInfos.uploadEndTime" :labelCol="labelCol5"
:wrapperCol="wrapperCol5"> :wrapperCol="wrapperCol5">
<a-date-picker placeholder="请选择上传作品结束时间" v-model:value="formData.uploadEndTime" showTime <a-date-picker placeholder="请选择上传作品结束时间"
v-model:value="formData.uploadEndTime" showTime
value-format="YYYY-MM-DD HH:mm:ss" style="width: 100%" value-format="YYYY-MM-DD HH:mm:ss" style="width: 100%"
:disabled="disabled"/> :disabled="disabled"/>
</a-form-item> </a-form-item>
</a-col> </a-col>
<a-col :span="24" v-if="formData.requireUploadWorks==='Y'"> <a-col :span="24" v-if="formData.requireUploadWorks==='Y'">
<a-form-item label="上传作品类型" v-bind="validateInfos.uploadWorksType" :labelCol="labelCol6" <a-form-item label="上传作品类型" v-bind="validateInfos.uploadWorksType"
:labelCol="labelCol6"
:wrapperCol="wrapperCol6"> :wrapperCol="wrapperCol6">
<j-select-multiple type="list_multi" v-model:value="formData.uploadWorksType" <j-select-multiple type="list_multi" v-model:value="formData.uploadWorksType"
dictCode="updateWorksType" placeholder="请选择上传作品类型" :disabled="disabled" dictCode="updateWorksType" placeholder="请选择上传作品类型"
:disabled="disabled"
:triggerChange="false"/> :triggerChange="false"/>
</a-form-item> </a-form-item>
</a-col> </a-col>
@ -270,7 +286,8 @@
<a-col :span="9" v-if="formData.requireScore==='Y'"> <a-col :span="9" v-if="formData.requireScore==='Y'">
<a-form-item label="开始时间" v-bind="validateInfos.scoreStartTime" :labelCol="labelCol5" <a-form-item label="开始时间" v-bind="validateInfos.scoreStartTime" :labelCol="labelCol5"
:wrapperCol="wrapperCol5"> :wrapperCol="wrapperCol5">
<a-date-picker placeholder="请选择评分开始时间" v-model:value="formData.scoreStartTime" showTime <a-date-picker placeholder="请选择评分开始时间" v-model:value="formData.scoreStartTime"
showTime
value-format="YYYY-MM-DD HH:mm:ss" style="width: 100%" value-format="YYYY-MM-DD HH:mm:ss" style="width: 100%"
:disabled="disabled"/> :disabled="disabled"/>
</a-form-item> </a-form-item>
@ -278,7 +295,8 @@
<a-col :span="9" v-if="formData.requireScore==='Y'"> <a-col :span="9" v-if="formData.requireScore==='Y'">
<a-form-item label="结束时间" v-bind="validateInfos.scoreEndTime" :labelCol="labelCol5" <a-form-item label="结束时间" v-bind="validateInfos.scoreEndTime" :labelCol="labelCol5"
:wrapperCol="wrapperCol5"> :wrapperCol="wrapperCol5">
<a-date-picker placeholder="请选择评分结束时间" v-model:value="formData.scoreEndTime" showTime <a-date-picker placeholder="请选择评分结束时间" v-model:value="formData.scoreEndTime"
showTime
value-format="YYYY-MM-DD HH:mm:ss" style="width: 100%" value-format="YYYY-MM-DD HH:mm:ss" style="width: 100%"
:disabled="disabled"/> :disabled="disabled"/>
</a-form-item> </a-form-item>
@ -299,16 +317,18 @@
<BasicModal <BasicModal
v-bind="$attrs" v-bind="$attrs"
@register="register" @register="register"
title="Modal Title" title="比值配置"
:height="800"
@ok="handleOk"
> >
<!-- <div v-for="(item,index) in num" :key="index">--> <!-- <div v-for="(item,index) in num" :key="index">-->
<!-- <a-input-number v-model="item.index"></a-input-number>--> <!-- <a-input-number v-model="item.index"></a-input-number>-->
<!-- <a-input-number v-model="item.value"></a-input-number>--> <!-- <a-input-number v-model="item.value"></a-input-number>-->
<!-- <a-button @click="delNum(index)">删除</a-button>--> <!-- <a-button @click="delNum(index)">删除</a-button>-->
<!-- </div>--> <!-- </div>-->
<!-- <a-button type="primary" @click="addNum" class="mr-2">从内部关闭弹窗</a-button>--> <!-- <a-button type="primary" @click="addNum" class="mr-2">从内部关闭弹窗</a-button>-->
<!-- <a-button type="primary" @click="setModalProps">从内部修改title</a-button>--> <!-- <a-button type="primary" @click="setModalProps">从内部修改title</a-button>-->
<JVxeTable <JVxeTable
ref="tableRef" ref="tableRef"
stripe stripe
@ -326,8 +346,8 @@
</template> </template>
<script lang="ts" setup> <script lang="ts" setup>
import { BasicModal, useModalInner,useModal } from '/@/components/Modal'; import {BasicModal, useModal} from '/@/components/Modal';
import {ref, reactive, defineExpose, nextTick, defineProps, computed, onMounted} from 'vue'; import {computed, defineExpose, defineProps, nextTick, onMounted, reactive, ref} from 'vue';
import {defHttp} from '/@/utils/http/axios'; import {defHttp} from '/@/utils/http/axios';
import {useMessage} from '/@/hooks/web/useMessage'; import {useMessage} from '/@/hooks/web/useMessage';
import JDictSelectTag from '/@/components/Form/src/jeecg/components/JDictSelectTag.vue'; import JDictSelectTag from '/@/components/Form/src/jeecg/components/JDictSelectTag.vue';
@ -335,17 +355,39 @@ import JSwitch from '/@/components/Form/src/jeecg/components/JSwitch.vue';
import JSelectMultiple from '/@/components/Form/src/jeecg/components/JSelectMultiple.vue'; import JSelectMultiple from '/@/components/Form/src/jeecg/components/JSelectMultiple.vue';
import JPopup from '/@/components/Form/src/jeecg/components/JPopup.vue'; import JPopup from '/@/components/Form/src/jeecg/components/JPopup.vue';
import {getValueType} from '/@/utils'; import {getValueType} from '/@/utils';
import {saveOrUpdate, getProjectlevel} from '../AnnualCompPoint.api'; import {getProjectlevel, saveOrUpdate} from '../AnnualCompPoint.api';
import {Form} from 'ant-design-vue'; import {Form} from 'ant-design-vue';
import { JVxeTable } from '/@/components/jeecg/JVxeTable'; const title = ref<string>('');
import { JVxeTypes, JVxeColumn} from '/@/components/jeecg/JVxeTable/types'; const width = ref<number>(800);
const dataSource = ref([]) const visible = ref<boolean>(false);
const disableSubmit = ref<boolean>(false);
const realForm = ref();
import {JVxeTable} from '/@/components/jeecg/JVxeTable';
import {JVxeColumn, JVxeTypes} from '/@/components/jeecg/JVxeTable/types';
//
const loading = ref(false);
//
const pagination = reactive({
//
current: 1,
//
pageSize: 200,
//
pageSizeOptions: ['10', '20', '30', '100', '200'],
// 0
total: 0,
});
//
const selectedRows = ref<Recordable[]>([]);
//
const dataSource = ref<Recordable[]>([]);
// //
const columns = ref<JVxeColumn[]>([ const columns = ref<JVxeColumn[]>([
// { key: 'num', title: '', width: 80, type: JVxeTypes.normal }, // { key: 'num', title: '', width: 80, type: JVxeTypes.normal },
{ key: 'teamSeqFirst', title: '序号1', width: 80, type: JVxeTypes.normal },
{ {
title: '比值', title: '比值',
key: 'raito', key: 'teamSeqFirstVal',
type: JVxeTypes.input, type: JVxeTypes.input,
width: 180, width: 180,
defaultValue: '', defaultValue: '',
@ -364,7 +406,7 @@ const columns = ref<JVxeColumn[]>([
// message: '${title}', // message: '${title}',
// }, // },
{ {
handler({ cellValue, row, column }, callback, target) { handler({cellValue, row, column}, callback, target) {
// cellValue // cellValue
// callback(flag, message) // callback(flag, message)
// flag = null // flag = null
@ -381,7 +423,51 @@ const columns = ref<JVxeColumn[]>([
], ],
}, },
]) ])
function handleTableSave({ $table, target }) {
// url
enum Api {
getData = '/teamSeq/listByPointId',
//
saveRow = '/mock/vxe/immediateSaveRow',
//
saveAll = '/teamSeq/saveOrUpdate4TeamSeq',
}
//
async function loadData() {
alert(formData.id)
// loading.value = true;
//
await defHttp
.get({
//
url: Api.getData,
// //
params: {
pointId: formData.id
// pageNo: pagination.current,
// pageSize: pagination.pageSize,
},
})
.then((result) => {
// total
// pagination.total = result.total;
// dataSource
dataSource.value = result.records;
//
selectedRows.value = [];
})
.finally(() => {
// loading
loading.value = false;
});
}
function handleOk() {
alert("handleOk")
}
function handleTableSave({$table, target}) {
// //
$table.validate().then((errMap) => { $table.validate().then((errMap) => {
// //
@ -411,6 +497,7 @@ function handleTableSave({ $table, target }) {
} }
}); });
} }
const props = defineProps({ const props = defineProps({
// objLevelll: { type: Array, default: () => [] }, // objLevelll: { type: Array, default: () => [] },
formDisabled: {type: Boolean, default: false}, formDisabled: {type: Boolean, default: false},
@ -420,30 +507,33 @@ const props = defineProps({
}, },
formBpm: {type: Boolean, default: true} formBpm: {type: Boolean, default: true}
}); });
const [register, { openModal }] = useModal(); const [register, {openModal}] = useModal();
// const [register, { closeModal, setModalProps,openModal }] = useModalInner(); // const [register, { closeModal, setModalProps,openModal }] = useModalInner();
const showModel = () => { const showModel = () => {
loadData();
openModal()
// console.log(1111) // console.log(1111)
openModal()
} }
let num = ref([ let num = ref([
{ {
value:'', value: '',
index:1 index: 1
} }
]) ])
const addNum = () => { const addNum = () => {
num.value.push({value:'',index:num.value.length}) num.value.push({value: '', index: num.value.length})
} }
const delNum = (index) => { const delNum = (index) => {
num.value.splice(index,1) num.value.splice(index, 1)
} }
const objLevelll = ref([]) const objLevelll = ref([])
const getProjectlevelEvent = async() => { const getProjectlevelEvent = async () => {
const res = await getProjectlevel() const res = await getProjectlevel()
objLevelll.value = res objLevelll.value = res
console.log(res,'2222') console.log(res, '2222')
} }
getProjectlevelEvent() getProjectlevelEvent()
const formRef = ref(); const formRef = ref();
@ -542,7 +632,7 @@ function add() {
if (props.objLevelll.length !== 0) { if (props.objLevelll.length !== 0) {
formData.objLevel = props.objLevelll[0].id; formData.objLevel = props.objLevelll[0].id;
} }
edit({ ...formData }); edit({...formData});
} }
/** /**

Loading…
Cancel
Save