parent
6abd0eea0e
commit
9181e9eb41
@ -0,0 +1,105 @@
|
|||||||
|
package com.ruoyi.system.controller;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
import java.io.IOException;
|
||||||
|
import javax.servlet.http.HttpServletResponse;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.web.bind.annotation.GetMapping;
|
||||||
|
import org.springframework.web.bind.annotation.PostMapping;
|
||||||
|
import org.springframework.web.bind.annotation.PutMapping;
|
||||||
|
import org.springframework.web.bind.annotation.DeleteMapping;
|
||||||
|
import org.springframework.web.bind.annotation.PathVariable;
|
||||||
|
import org.springframework.web.bind.annotation.RequestBody;
|
||||||
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
|
import org.springframework.web.bind.annotation.RestController;
|
||||||
|
import com.ruoyi.common.log.annotation.Log;
|
||||||
|
import com.ruoyi.common.log.enums.BusinessType;
|
||||||
|
import com.ruoyi.common.security.annotation.RequiresPermissions;
|
||||||
|
import com.ruoyi.system.domain.Competition;
|
||||||
|
import com.ruoyi.system.service.ICompetitionService;
|
||||||
|
import com.ruoyi.common.core.web.controller.BaseController;
|
||||||
|
import com.ruoyi.common.core.web.domain.AjaxResult;
|
||||||
|
import com.ruoyi.common.core.utils.poi.ExcelUtil;
|
||||||
|
import com.ruoyi.common.core.web.page.TableDataInfo;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 比赛信息Controller
|
||||||
|
*
|
||||||
|
* @author ruoyi
|
||||||
|
* @date 2022-11-02
|
||||||
|
*/
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("/competition")
|
||||||
|
public class CompetitionController extends BaseController
|
||||||
|
{
|
||||||
|
@Autowired
|
||||||
|
private ICompetitionService competitionService;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询比赛信息列表
|
||||||
|
*/
|
||||||
|
@RequiresPermissions("system:competition:list")
|
||||||
|
@GetMapping("/list")
|
||||||
|
public TableDataInfo list(Competition competition)
|
||||||
|
{
|
||||||
|
startPage();
|
||||||
|
List<Competition> list = competitionService.selectCompetitionList(competition);
|
||||||
|
return getDataTable(list);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 导出比赛信息列表
|
||||||
|
*/
|
||||||
|
@RequiresPermissions("system:competition:export")
|
||||||
|
@Log(title = "比赛信息", businessType = BusinessType.EXPORT)
|
||||||
|
@PostMapping("/export")
|
||||||
|
public void export(HttpServletResponse response, Competition competition)
|
||||||
|
{
|
||||||
|
List<Competition> list = competitionService.selectCompetitionList(competition);
|
||||||
|
ExcelUtil<Competition> util = new ExcelUtil<Competition>(Competition.class);
|
||||||
|
util.exportExcel(response, list, "比赛信息数据");
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取比赛信息详细信息
|
||||||
|
*/
|
||||||
|
@RequiresPermissions("system:competition:query")
|
||||||
|
@GetMapping(value = "/{id}")
|
||||||
|
public AjaxResult getInfo(@PathVariable("id") Long id)
|
||||||
|
{
|
||||||
|
return AjaxResult.success(competitionService.selectCompetitionById(id));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增比赛信息
|
||||||
|
*/
|
||||||
|
@RequiresPermissions("system:competition:add")
|
||||||
|
@Log(title = "比赛信息", businessType = BusinessType.INSERT)
|
||||||
|
@PostMapping
|
||||||
|
public AjaxResult add(@RequestBody Competition competition)
|
||||||
|
{
|
||||||
|
return toAjax(competitionService.insertCompetition(competition));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改比赛信息
|
||||||
|
*/
|
||||||
|
@RequiresPermissions("system:competition:edit")
|
||||||
|
@Log(title = "比赛信息", businessType = BusinessType.UPDATE)
|
||||||
|
@PutMapping
|
||||||
|
public AjaxResult edit(@RequestBody Competition competition)
|
||||||
|
{
|
||||||
|
return toAjax(competitionService.updateCompetition(competition));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除比赛信息
|
||||||
|
*/
|
||||||
|
@RequiresPermissions("system:competition:remove")
|
||||||
|
@Log(title = "比赛信息", businessType = BusinessType.DELETE)
|
||||||
|
@DeleteMapping("/{ids}")
|
||||||
|
public AjaxResult remove(@PathVariable Long[] ids)
|
||||||
|
{
|
||||||
|
return toAjax(competitionService.deleteCompetitionByIds(ids));
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,100 @@
|
|||||||
|
package com.ruoyi.system.controller;
|
||||||
|
|
||||||
|
import com.ruoyi.common.core.utils.poi.ExcelUtil;
|
||||||
|
import com.ruoyi.common.core.web.controller.BaseController;
|
||||||
|
import com.ruoyi.common.core.web.domain.AjaxResult;
|
||||||
|
import com.ruoyi.common.core.web.page.TableDataInfo;
|
||||||
|
import com.ruoyi.common.log.annotation.Log;
|
||||||
|
import com.ruoyi.common.log.enums.BusinessType;
|
||||||
|
import com.ruoyi.common.security.annotation.RequiresPermissions;
|
||||||
|
import com.ruoyi.system.domain.Competition;
|
||||||
|
import com.ruoyi.system.service.ICompetitionService;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
|
import javax.servlet.http.HttpServletResponse;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author 吴一博
|
||||||
|
* @date 2022年11月02日 15:43
|
||||||
|
* @Description
|
||||||
|
*/
|
||||||
|
/**
|
||||||
|
* 约战Controller
|
||||||
|
* @date 2022-11-02
|
||||||
|
*/
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("/vs")
|
||||||
|
public class CompetitionVsController extends BaseController {
|
||||||
|
@Autowired
|
||||||
|
private ICompetitionService competitionService;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询约战列表
|
||||||
|
*/
|
||||||
|
@RequiresPermissions("system:vs:list")
|
||||||
|
@GetMapping("/list")
|
||||||
|
public TableDataInfo list(Competition competition)
|
||||||
|
{
|
||||||
|
startPage();
|
||||||
|
List<Competition> list = competitionService.selectCompetitionList(competition);
|
||||||
|
return getDataTable(list);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 导出约战列表
|
||||||
|
*/
|
||||||
|
@RequiresPermissions("system:vs:export")
|
||||||
|
@Log(title = "约战", businessType = BusinessType.EXPORT)
|
||||||
|
@PostMapping("/export")
|
||||||
|
public void export(HttpServletResponse response, Competition competition)
|
||||||
|
{
|
||||||
|
List<Competition> list = competitionService.selectCompetitionList(competition);
|
||||||
|
ExcelUtil<Competition> util = new ExcelUtil<Competition>(Competition.class);
|
||||||
|
util.exportExcel(response, list, "约战数据");
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取约战详细信息
|
||||||
|
*/
|
||||||
|
@RequiresPermissions("system:vs:query")
|
||||||
|
@GetMapping(value = "/{id}")
|
||||||
|
public AjaxResult getInfo(@PathVariable("id") Long id)
|
||||||
|
{
|
||||||
|
return AjaxResult.success(competitionService.selectCompetitionById(id));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增约战
|
||||||
|
*/
|
||||||
|
@RequiresPermissions("system:vs:add")
|
||||||
|
@Log(title = "约战", businessType = BusinessType.INSERT)
|
||||||
|
@PostMapping
|
||||||
|
public AjaxResult add(@RequestBody Competition competition)
|
||||||
|
{
|
||||||
|
return toAjax(competitionService.insertCompetition(competition));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改约战
|
||||||
|
*/
|
||||||
|
@RequiresPermissions("system:vs:edit")
|
||||||
|
@Log(title = "约战", businessType = BusinessType.UPDATE)
|
||||||
|
@PutMapping
|
||||||
|
public AjaxResult edit(@RequestBody Competition competition)
|
||||||
|
{
|
||||||
|
return toAjax(competitionService.updateCompetition(competition));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除约战
|
||||||
|
*/
|
||||||
|
@RequiresPermissions("system:vs:remove")
|
||||||
|
@Log(title = "约战", businessType = BusinessType.DELETE)
|
||||||
|
@DeleteMapping("/{ids}")
|
||||||
|
public AjaxResult remove(@PathVariable Long[] ids)
|
||||||
|
{
|
||||||
|
return toAjax(competitionService.deleteCompetitionByIds(ids));
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,61 @@
|
|||||||
|
package com.ruoyi.system.mapper;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
import com.ruoyi.system.domain.Competition;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 比赛信息Mapper接口
|
||||||
|
*
|
||||||
|
* @author ruoyi
|
||||||
|
* @date 2022-11-02
|
||||||
|
*/
|
||||||
|
public interface CompetitionMapper
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* 查询比赛信息
|
||||||
|
*
|
||||||
|
* @param id 比赛信息主键
|
||||||
|
* @return 比赛信息
|
||||||
|
*/
|
||||||
|
public Competition selectCompetitionById(Long id);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询比赛信息列表
|
||||||
|
*
|
||||||
|
* @param competition 比赛信息
|
||||||
|
* @return 比赛信息集合
|
||||||
|
*/
|
||||||
|
public List<Competition> selectCompetitionList(Competition competition);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增比赛信息
|
||||||
|
*
|
||||||
|
* @param competition 比赛信息
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int insertCompetition(Competition competition);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改比赛信息
|
||||||
|
*
|
||||||
|
* @param competition 比赛信息
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int updateCompetition(Competition competition);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除比赛信息
|
||||||
|
*
|
||||||
|
* @param id 比赛信息主键
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int deleteCompetitionById(Long id);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批量删除比赛信息
|
||||||
|
*
|
||||||
|
* @param ids 需要删除的数据主键集合
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int deleteCompetitionByIds(Long[] ids);
|
||||||
|
}
|
@ -0,0 +1,61 @@
|
|||||||
|
package com.ruoyi.system.service;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
import com.ruoyi.system.domain.Competition;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 比赛信息Service接口
|
||||||
|
*
|
||||||
|
* @author ruoyi
|
||||||
|
* @date 2022-11-02
|
||||||
|
*/
|
||||||
|
public interface ICompetitionService
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* 查询比赛信息
|
||||||
|
*
|
||||||
|
* @param id 比赛信息主键
|
||||||
|
* @return 比赛信息
|
||||||
|
*/
|
||||||
|
public Competition selectCompetitionById(Long id);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询比赛信息列表
|
||||||
|
*
|
||||||
|
* @param competition 比赛信息
|
||||||
|
* @return 比赛信息集合
|
||||||
|
*/
|
||||||
|
public List<Competition> selectCompetitionList(Competition competition);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增比赛信息
|
||||||
|
*
|
||||||
|
* @param competition 比赛信息
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int insertCompetition(Competition competition);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改比赛信息
|
||||||
|
*
|
||||||
|
* @param competition 比赛信息
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int updateCompetition(Competition competition);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批量删除比赛信息
|
||||||
|
*
|
||||||
|
* @param ids 需要删除的比赛信息主键集合
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int deleteCompetitionByIds(Long[] ids);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除比赛信息信息
|
||||||
|
*
|
||||||
|
* @param id 比赛信息主键
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int deleteCompetitionById(Long id);
|
||||||
|
}
|
@ -0,0 +1,93 @@
|
|||||||
|
package com.ruoyi.system.service.impl;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
import com.ruoyi.system.mapper.CompetitionMapper;
|
||||||
|
import com.ruoyi.system.domain.Competition;
|
||||||
|
import com.ruoyi.system.service.ICompetitionService;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 比赛信息Service业务层处理
|
||||||
|
*
|
||||||
|
* @author ruoyi
|
||||||
|
* @date 2022-11-02
|
||||||
|
*/
|
||||||
|
@Service
|
||||||
|
public class CompetitionServiceImpl implements ICompetitionService
|
||||||
|
{
|
||||||
|
@Autowired
|
||||||
|
private CompetitionMapper competitionMapper;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询比赛信息
|
||||||
|
*
|
||||||
|
* @param id 比赛信息主键
|
||||||
|
* @return 比赛信息
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public Competition selectCompetitionById(Long id)
|
||||||
|
{
|
||||||
|
return competitionMapper.selectCompetitionById(id);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询比赛信息列表
|
||||||
|
*
|
||||||
|
* @param competition 比赛信息
|
||||||
|
* @return 比赛信息
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public List<Competition> selectCompetitionList(Competition competition)
|
||||||
|
{
|
||||||
|
return competitionMapper.selectCompetitionList(competition);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增比赛信息
|
||||||
|
*
|
||||||
|
* @param competition 比赛信息
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public int insertCompetition(Competition competition)
|
||||||
|
{
|
||||||
|
return competitionMapper.insertCompetition(competition);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改比赛信息
|
||||||
|
*
|
||||||
|
* @param competition 比赛信息
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public int updateCompetition(Competition competition)
|
||||||
|
{
|
||||||
|
return competitionMapper.updateCompetition(competition);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批量删除比赛信息
|
||||||
|
*
|
||||||
|
* @param ids 需要删除的比赛信息主键
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public int deleteCompetitionByIds(Long[] ids)
|
||||||
|
{
|
||||||
|
return competitionMapper.deleteCompetitionByIds(ids);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除比赛信息信息
|
||||||
|
*
|
||||||
|
* @param id 比赛信息主键
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public int deleteCompetitionById(Long id)
|
||||||
|
{
|
||||||
|
return competitionMapper.deleteCompetitionById(id);
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,250 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8" ?>
|
||||||
|
<!DOCTYPE mapper
|
||||||
|
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
|
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||||
|
<mapper namespace="com.ruoyi.system.mapper.CompetitionMapper">
|
||||||
|
|
||||||
|
<resultMap type="Competition" id="CompetitionResult">
|
||||||
|
<result property="id" column="id" />
|
||||||
|
<result property="mainTeamId" column="main_team_id" />
|
||||||
|
<result property="mainTeamName" column="main_team_name" />
|
||||||
|
<result property="guestTeamId" column="guest_team_id" />
|
||||||
|
<result property="guestTeamName" column="guest_team_name" />
|
||||||
|
<result property="competitionCode" column="competition_code" />
|
||||||
|
<result property="competitionName" column="competition_name" />
|
||||||
|
<result property="designated" column="designated" />
|
||||||
|
<result property="competitionType" column="competition_type" />
|
||||||
|
<result property="competitionTime" column="competition_time" />
|
||||||
|
<result property="buildingId" column="building_id" />
|
||||||
|
<result property="buildingName" column="building_name" />
|
||||||
|
<result property="competitionAddress" column="competition_address" />
|
||||||
|
<result property="founder" column="founder" />
|
||||||
|
<result property="status" column="status" />
|
||||||
|
<result property="cityCode" column="city_code" />
|
||||||
|
<result property="cityName" column="city_name" />
|
||||||
|
<result property="maxPlayer" column="max_player" />
|
||||||
|
<result property="createdTime" column="created_time" />
|
||||||
|
<result property="lastUpdatedTime" column="last_updated_time" />
|
||||||
|
<result property="createdBy" column="created_by" />
|
||||||
|
<result property="modifiedBy" column="modified_by" />
|
||||||
|
<result property="isDeleted" column="is_deleted" />
|
||||||
|
<result property="longitude" column="longitude" />
|
||||||
|
<result property="latitude" column="latitude" />
|
||||||
|
<result property="remark" column="remark" />
|
||||||
|
<result property="competitionNature" column="competition_nature" />
|
||||||
|
<result property="enrollBeginTime" column="enroll_begin_time" />
|
||||||
|
<result property="enrollEndTime" column="enroll_end_time" />
|
||||||
|
<result property="contacts" column="contacts" />
|
||||||
|
<result property="contactsAreaCode" column="contacts_area_code" />
|
||||||
|
<result property="contactsTel" column="contacts_tel" />
|
||||||
|
<result property="competitionBeginTime" column="competition_begin_time" />
|
||||||
|
<result property="competitionEndTime" column="competition_end_time" />
|
||||||
|
<result property="organizer" column="organizer" />
|
||||||
|
<result property="undertake" column="undertake" />
|
||||||
|
<result property="competitionBackImg" column="competition_back_img" />
|
||||||
|
<result property="createdId" column="created_id" />
|
||||||
|
<result property="auditStatus" column="audit_status" />
|
||||||
|
<result property="heightHide" column="height_hide" />
|
||||||
|
<result property="sponsor" column="sponsor" />
|
||||||
|
</resultMap>
|
||||||
|
|
||||||
|
<sql id="selectCompetitionVo">
|
||||||
|
select id, main_team_id, main_team_name, guest_team_id, guest_team_name, competition_code, competition_name, designated, competition_type, competition_time, building_id, building_name, competition_address, founder, status, city_code, city_name, max_player, created_time, last_updated_time, created_by, modified_by, is_deleted, longitude, latitude, remark, competition_nature, enroll_begin_time, enroll_end_time, contacts, contacts_area_code, contacts_tel, competition_begin_time, competition_end_time, organizer, undertake, competition_back_img, created_id, audit_status, height_hide, sponsor from competition
|
||||||
|
</sql>
|
||||||
|
|
||||||
|
<select id="selectCompetitionList" parameterType="Competition" resultMap="CompetitionResult">
|
||||||
|
<include refid="selectCompetitionVo"/>
|
||||||
|
<where>
|
||||||
|
<if test="mainTeamId != null "> and main_team_id = #{mainTeamId}</if>
|
||||||
|
<if test="mainTeamName != null and mainTeamName != ''"> and main_team_name like concat('%', #{mainTeamName}, '%')</if>
|
||||||
|
<if test="guestTeamId != null "> and guest_team_id = #{guestTeamId}</if>
|
||||||
|
<if test="guestTeamName != null and guestTeamName != ''"> and guest_team_name like concat('%', #{guestTeamName}, '%')</if>
|
||||||
|
<if test="competitionCode != null and competitionCode != ''"> and competition_code = #{competitionCode}</if>
|
||||||
|
<if test="competitionName != null and competitionName != ''"> and competition_name like concat('%', #{competitionName}, '%')</if>
|
||||||
|
<if test="designated != null "> and designated = #{designated}</if>
|
||||||
|
<if test="competitionType != null "> and competition_type = #{competitionType}</if>
|
||||||
|
<if test="competitionTime != null "> and competition_time = #{competitionTime}</if>
|
||||||
|
<if test="buildingId != null "> and building_id = #{buildingId}</if>
|
||||||
|
<if test="buildingName != null and buildingName != ''"> and building_name like concat('%', #{buildingName}, '%')</if>
|
||||||
|
<if test="competitionAddress != null and competitionAddress != ''"> and competition_address = #{competitionAddress}</if>
|
||||||
|
<if test="founder != null "> and founder = #{founder}</if>
|
||||||
|
<if test="status != null "> and status = #{status}</if>
|
||||||
|
<if test="cityCode != null and cityCode != ''"> and city_code = #{cityCode}</if>
|
||||||
|
<if test="cityName != null and cityName != ''"> and city_name like concat('%', #{cityName}, '%')</if>
|
||||||
|
<if test="maxPlayer != null "> and max_player = #{maxPlayer}</if>
|
||||||
|
<if test="createdTime != null "> and created_time = #{createdTime}</if>
|
||||||
|
<if test="lastUpdatedTime != null "> and last_updated_time = #{lastUpdatedTime}</if>
|
||||||
|
<if test="createdBy != null and createdBy != ''"> and created_by = #{createdBy}</if>
|
||||||
|
<if test="modifiedBy != null and modifiedBy != ''"> and modified_by = #{modifiedBy}</if>
|
||||||
|
<if test="isDeleted != null "> and is_deleted = #{isDeleted}</if>
|
||||||
|
<if test="longitude != null "> and longitude = #{longitude}</if>
|
||||||
|
<if test="latitude != null "> and latitude = #{latitude}</if>
|
||||||
|
<if test="competitionNature != null "> and competition_nature = #{competitionNature}</if>
|
||||||
|
<if test="enrollBeginTime != null "> and enroll_begin_time = #{enrollBeginTime}</if>
|
||||||
|
<if test="enrollEndTime != null "> and enroll_end_time = #{enrollEndTime}</if>
|
||||||
|
<if test="contacts != null and contacts != ''"> and contacts = #{contacts}</if>
|
||||||
|
<if test="contactsAreaCode != null and contactsAreaCode != ''"> and contacts_area_code = #{contactsAreaCode}</if>
|
||||||
|
<if test="contactsTel != null and contactsTel != ''"> and contacts_tel = #{contactsTel}</if>
|
||||||
|
<if test="competitionBeginTime != null "> and competition_begin_time = #{competitionBeginTime}</if>
|
||||||
|
<if test="competitionEndTime != null "> and competition_end_time = #{competitionEndTime}</if>
|
||||||
|
<if test="organizer != null and organizer != ''"> and organizer = #{organizer}</if>
|
||||||
|
<if test="undertake != null and undertake != ''"> and undertake = #{undertake}</if>
|
||||||
|
<if test="competitionBackImg != null and competitionBackImg != ''"> and competition_back_img = #{competitionBackImg}</if>
|
||||||
|
<if test="createdId != null "> and created_id = #{createdId}</if>
|
||||||
|
<if test="auditStatus != null "> and audit_status = #{auditStatus}</if>
|
||||||
|
<if test="heightHide != null "> and height_hide = #{heightHide}</if>
|
||||||
|
<if test="sponsor != null and sponsor != ''"> and sponsor = #{sponsor}</if>
|
||||||
|
</where>
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<select id="selectCompetitionById" parameterType="Long" resultMap="CompetitionResult">
|
||||||
|
<include refid="selectCompetitionVo"/>
|
||||||
|
where id = #{id}
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<insert id="insertCompetition" parameterType="Competition" useGeneratedKeys="true" keyProperty="id">
|
||||||
|
insert into competition
|
||||||
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||||
|
<if test="mainTeamId != null">main_team_id,</if>
|
||||||
|
<if test="mainTeamName != null">main_team_name,</if>
|
||||||
|
<if test="guestTeamId != null">guest_team_id,</if>
|
||||||
|
<if test="guestTeamName != null">guest_team_name,</if>
|
||||||
|
<if test="competitionCode != null">competition_code,</if>
|
||||||
|
<if test="competitionName != null">competition_name,</if>
|
||||||
|
<if test="designated != null">designated,</if>
|
||||||
|
<if test="competitionType != null">competition_type,</if>
|
||||||
|
<if test="competitionTime != null">competition_time,</if>
|
||||||
|
<if test="buildingId != null">building_id,</if>
|
||||||
|
<if test="buildingName != null">building_name,</if>
|
||||||
|
<if test="competitionAddress != null">competition_address,</if>
|
||||||
|
<if test="founder != null">founder,</if>
|
||||||
|
<if test="status != null">status,</if>
|
||||||
|
<if test="cityCode != null">city_code,</if>
|
||||||
|
<if test="cityName != null">city_name,</if>
|
||||||
|
<if test="maxPlayer != null">max_player,</if>
|
||||||
|
<if test="createdTime != null">created_time,</if>
|
||||||
|
<if test="lastUpdatedTime != null">last_updated_time,</if>
|
||||||
|
<if test="createdBy != null">created_by,</if>
|
||||||
|
<if test="modifiedBy != null">modified_by,</if>
|
||||||
|
<if test="isDeleted != null">is_deleted,</if>
|
||||||
|
<if test="longitude != null">longitude,</if>
|
||||||
|
<if test="latitude != null">latitude,</if>
|
||||||
|
<if test="remark != null">remark,</if>
|
||||||
|
<if test="competitionNature != null">competition_nature,</if>
|
||||||
|
<if test="enrollBeginTime != null">enroll_begin_time,</if>
|
||||||
|
<if test="enrollEndTime != null">enroll_end_time,</if>
|
||||||
|
<if test="contacts != null">contacts,</if>
|
||||||
|
<if test="contactsAreaCode != null">contacts_area_code,</if>
|
||||||
|
<if test="contactsTel != null">contacts_tel,</if>
|
||||||
|
<if test="competitionBeginTime != null">competition_begin_time,</if>
|
||||||
|
<if test="competitionEndTime != null">competition_end_time,</if>
|
||||||
|
<if test="organizer != null">organizer,</if>
|
||||||
|
<if test="undertake != null">undertake,</if>
|
||||||
|
<if test="competitionBackImg != null">competition_back_img,</if>
|
||||||
|
<if test="createdId != null">created_id,</if>
|
||||||
|
<if test="auditStatus != null">audit_status,</if>
|
||||||
|
<if test="heightHide != null">height_hide,</if>
|
||||||
|
<if test="sponsor != null">sponsor,</if>
|
||||||
|
</trim>
|
||||||
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||||
|
<if test="mainTeamId != null">#{mainTeamId},</if>
|
||||||
|
<if test="mainTeamName != null">#{mainTeamName},</if>
|
||||||
|
<if test="guestTeamId != null">#{guestTeamId},</if>
|
||||||
|
<if test="guestTeamName != null">#{guestTeamName},</if>
|
||||||
|
<if test="competitionCode != null">#{competitionCode},</if>
|
||||||
|
<if test="competitionName != null">#{competitionName},</if>
|
||||||
|
<if test="designated != null">#{designated},</if>
|
||||||
|
<if test="competitionType != null">#{competitionType},</if>
|
||||||
|
<if test="competitionTime != null">#{competitionTime},</if>
|
||||||
|
<if test="buildingId != null">#{buildingId},</if>
|
||||||
|
<if test="buildingName != null">#{buildingName},</if>
|
||||||
|
<if test="competitionAddress != null">#{competitionAddress},</if>
|
||||||
|
<if test="founder != null">#{founder},</if>
|
||||||
|
<if test="status != null">#{status},</if>
|
||||||
|
<if test="cityCode != null">#{cityCode},</if>
|
||||||
|
<if test="cityName != null">#{cityName},</if>
|
||||||
|
<if test="maxPlayer != null">#{maxPlayer},</if>
|
||||||
|
<if test="createdTime != null">#{createdTime},</if>
|
||||||
|
<if test="lastUpdatedTime != null">#{lastUpdatedTime},</if>
|
||||||
|
<if test="createdBy != null">#{createdBy},</if>
|
||||||
|
<if test="modifiedBy != null">#{modifiedBy},</if>
|
||||||
|
<if test="isDeleted != null">#{isDeleted},</if>
|
||||||
|
<if test="longitude != null">#{longitude},</if>
|
||||||
|
<if test="latitude != null">#{latitude},</if>
|
||||||
|
<if test="remark != null">#{remark},</if>
|
||||||
|
<if test="competitionNature != null">#{competitionNature},</if>
|
||||||
|
<if test="enrollBeginTime != null">#{enrollBeginTime},</if>
|
||||||
|
<if test="enrollEndTime != null">#{enrollEndTime},</if>
|
||||||
|
<if test="contacts != null">#{contacts},</if>
|
||||||
|
<if test="contactsAreaCode != null">#{contactsAreaCode},</if>
|
||||||
|
<if test="contactsTel != null">#{contactsTel},</if>
|
||||||
|
<if test="competitionBeginTime != null">#{competitionBeginTime},</if>
|
||||||
|
<if test="competitionEndTime != null">#{competitionEndTime},</if>
|
||||||
|
<if test="organizer != null">#{organizer},</if>
|
||||||
|
<if test="undertake != null">#{undertake},</if>
|
||||||
|
<if test="competitionBackImg != null">#{competitionBackImg},</if>
|
||||||
|
<if test="createdId != null">#{createdId},</if>
|
||||||
|
<if test="auditStatus != null">#{auditStatus},</if>
|
||||||
|
<if test="heightHide != null">#{heightHide},</if>
|
||||||
|
<if test="sponsor != null">#{sponsor},</if>
|
||||||
|
</trim>
|
||||||
|
</insert>
|
||||||
|
|
||||||
|
<update id="updateCompetition" parameterType="Competition">
|
||||||
|
update competition
|
||||||
|
<trim prefix="SET" suffixOverrides=",">
|
||||||
|
<if test="mainTeamId != null">main_team_id = #{mainTeamId},</if>
|
||||||
|
<if test="mainTeamName != null">main_team_name = #{mainTeamName},</if>
|
||||||
|
<if test="guestTeamId != null">guest_team_id = #{guestTeamId},</if>
|
||||||
|
<if test="guestTeamName != null">guest_team_name = #{guestTeamName},</if>
|
||||||
|
<if test="competitionCode != null">competition_code = #{competitionCode},</if>
|
||||||
|
<if test="competitionName != null">competition_name = #{competitionName},</if>
|
||||||
|
<if test="designated != null">designated = #{designated},</if>
|
||||||
|
<if test="competitionType != null">competition_type = #{competitionType},</if>
|
||||||
|
<if test="competitionTime != null">competition_time = #{competitionTime},</if>
|
||||||
|
<if test="buildingId != null">building_id = #{buildingId},</if>
|
||||||
|
<if test="buildingName != null">building_name = #{buildingName},</if>
|
||||||
|
<if test="competitionAddress != null">competition_address = #{competitionAddress},</if>
|
||||||
|
<if test="founder != null">founder = #{founder},</if>
|
||||||
|
<if test="status != null">status = #{status},</if>
|
||||||
|
<if test="cityCode != null">city_code = #{cityCode},</if>
|
||||||
|
<if test="cityName != null">city_name = #{cityName},</if>
|
||||||
|
<if test="maxPlayer != null">max_player = #{maxPlayer},</if>
|
||||||
|
<if test="createdTime != null">created_time = #{createdTime},</if>
|
||||||
|
<if test="lastUpdatedTime != null">last_updated_time = #{lastUpdatedTime},</if>
|
||||||
|
<if test="createdBy != null">created_by = #{createdBy},</if>
|
||||||
|
<if test="modifiedBy != null">modified_by = #{modifiedBy},</if>
|
||||||
|
<if test="isDeleted != null">is_deleted = #{isDeleted},</if>
|
||||||
|
<if test="longitude != null">longitude = #{longitude},</if>
|
||||||
|
<if test="latitude != null">latitude = #{latitude},</if>
|
||||||
|
<if test="remark != null">remark = #{remark},</if>
|
||||||
|
<if test="competitionNature != null">competition_nature = #{competitionNature},</if>
|
||||||
|
<if test="enrollBeginTime != null">enroll_begin_time = #{enrollBeginTime},</if>
|
||||||
|
<if test="enrollEndTime != null">enroll_end_time = #{enrollEndTime},</if>
|
||||||
|
<if test="contacts != null">contacts = #{contacts},</if>
|
||||||
|
<if test="contactsAreaCode != null">contacts_area_code = #{contactsAreaCode},</if>
|
||||||
|
<if test="contactsTel != null">contacts_tel = #{contactsTel},</if>
|
||||||
|
<if test="competitionBeginTime != null">competition_begin_time = #{competitionBeginTime},</if>
|
||||||
|
<if test="competitionEndTime != null">competition_end_time = #{competitionEndTime},</if>
|
||||||
|
<if test="organizer != null">organizer = #{organizer},</if>
|
||||||
|
<if test="undertake != null">undertake = #{undertake},</if>
|
||||||
|
<if test="competitionBackImg != null">competition_back_img = #{competitionBackImg},</if>
|
||||||
|
<if test="createdId != null">created_id = #{createdId},</if>
|
||||||
|
<if test="auditStatus != null">audit_status = #{auditStatus},</if>
|
||||||
|
<if test="heightHide != null">height_hide = #{heightHide},</if>
|
||||||
|
<if test="sponsor != null">sponsor = #{sponsor},</if>
|
||||||
|
</trim>
|
||||||
|
where id = #{id}
|
||||||
|
</update>
|
||||||
|
|
||||||
|
<delete id="deleteCompetitionById" parameterType="Long">
|
||||||
|
delete from competition where id = #{id}
|
||||||
|
</delete>
|
||||||
|
|
||||||
|
<delete id="deleteCompetitionByIds" parameterType="String">
|
||||||
|
delete from competition where id in
|
||||||
|
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||||
|
#{id}
|
||||||
|
</foreach>
|
||||||
|
</delete>
|
||||||
|
</mapper>
|
@ -0,0 +1,44 @@
|
|||||||
|
import request from '@/utils/request'
|
||||||
|
|
||||||
|
// 查询比赛信息列表
|
||||||
|
export function listCompetition(query) {
|
||||||
|
return request({
|
||||||
|
url: '/system/competition/list',
|
||||||
|
method: 'get',
|
||||||
|
params: query
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 查询比赛信息详细
|
||||||
|
export function getCompetition(id) {
|
||||||
|
return request({
|
||||||
|
url: '/system/competition/' + id,
|
||||||
|
method: 'get'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 新增比赛信息
|
||||||
|
export function addCompetition(data) {
|
||||||
|
return request({
|
||||||
|
url: '/system/competition',
|
||||||
|
method: 'post',
|
||||||
|
data: data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 修改比赛信息
|
||||||
|
export function updateCompetition(data) {
|
||||||
|
return request({
|
||||||
|
url: '/system/competition',
|
||||||
|
method: 'put',
|
||||||
|
data: data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 删除比赛信息
|
||||||
|
export function delCompetition(id) {
|
||||||
|
return request({
|
||||||
|
url: '/system/competition/' + id,
|
||||||
|
method: 'delete'
|
||||||
|
})
|
||||||
|
}
|
@ -0,0 +1,44 @@
|
|||||||
|
import request from '@/utils/request'
|
||||||
|
|
||||||
|
// 查询约战列表
|
||||||
|
export function listVs(query) {
|
||||||
|
return request({
|
||||||
|
url: '/system/vs/list',
|
||||||
|
method: 'get',
|
||||||
|
params: query
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 查询约战详细
|
||||||
|
export function getVs(id) {
|
||||||
|
return request({
|
||||||
|
url: '/system/vs/' + id,
|
||||||
|
method: 'get'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 新增约战
|
||||||
|
export function addVs(data) {
|
||||||
|
return request({
|
||||||
|
url: '/system/vs',
|
||||||
|
method: 'post',
|
||||||
|
data: data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 修改约战
|
||||||
|
export function updateVs(data) {
|
||||||
|
return request({
|
||||||
|
url: '/system/vs',
|
||||||
|
method: 'put',
|
||||||
|
data: data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 删除约战
|
||||||
|
export function delVs(id) {
|
||||||
|
return request({
|
||||||
|
url: '/system/vs/' + id,
|
||||||
|
method: 'delete'
|
||||||
|
})
|
||||||
|
}
|
@ -0,0 +1,585 @@
|
|||||||
|
<template>
|
||||||
|
<div class="app-container">
|
||||||
|
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
|
||||||
|
<el-form-item label="比赛名称" prop="competitionName">
|
||||||
|
<el-input
|
||||||
|
v-model="queryParams.competitionName"
|
||||||
|
placeholder="请输入比赛名称"
|
||||||
|
clearable
|
||||||
|
@keyup.enter.native="handleQuery"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="球场名称" prop="buildingName">
|
||||||
|
<el-input
|
||||||
|
v-model="queryParams.buildingName"
|
||||||
|
placeholder="请输入球场名称"
|
||||||
|
clearable
|
||||||
|
@keyup.enter.native="handleQuery"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="比赛状态" prop="status">
|
||||||
|
<el-select v-model="queryParams.status" placeholder="请选择比赛状态" clearable>
|
||||||
|
<el-option
|
||||||
|
v-for="dict in dict.type.competition_status"
|
||||||
|
:key="dict.value"
|
||||||
|
:label="dict.label"
|
||||||
|
:value="dict.value"
|
||||||
|
/>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="比赛地址" prop="competitionAddress">
|
||||||
|
<el-input
|
||||||
|
v-model="queryParams.competitionAddress"
|
||||||
|
placeholder="请输入比赛地址"
|
||||||
|
clearable
|
||||||
|
@keyup.enter.native="handleQuery"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="联系人" prop="contacts">
|
||||||
|
<el-input
|
||||||
|
v-model="queryParams.contacts"
|
||||||
|
placeholder="请输入赛事联系人"
|
||||||
|
clearable
|
||||||
|
@keyup.enter.native="handleQuery"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="主办方" prop="organizer">
|
||||||
|
<el-input
|
||||||
|
v-model="queryParams.organizer"
|
||||||
|
placeholder="请输入主办方"
|
||||||
|
clearable
|
||||||
|
@keyup.enter.native="handleQuery"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
|
||||||
|
<el-form-item label="赞助商" prop="sponsor">
|
||||||
|
<el-input
|
||||||
|
v-model="queryParams.sponsor"
|
||||||
|
placeholder="请输入赞助商"
|
||||||
|
clearable
|
||||||
|
@keyup.enter.native="handleQuery"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item>
|
||||||
|
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
|
||||||
|
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
|
||||||
|
</el-form-item>
|
||||||
|
</el-form>
|
||||||
|
|
||||||
|
<el-row :gutter="10" class="mb8">
|
||||||
|
<el-col :span="1.5">
|
||||||
|
<el-button
|
||||||
|
type="primary"
|
||||||
|
plain
|
||||||
|
icon="el-icon-plus"
|
||||||
|
size="mini"
|
||||||
|
@click="handleAdd"
|
||||||
|
v-hasPermi="['system:competition:add']"
|
||||||
|
>新增</el-button>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="1.5">
|
||||||
|
<el-button
|
||||||
|
type="success"
|
||||||
|
plain
|
||||||
|
icon="el-icon-edit"
|
||||||
|
size="mini"
|
||||||
|
:disabled="single"
|
||||||
|
@click="handleUpdate"
|
||||||
|
v-hasPermi="['system:competition:edit']"
|
||||||
|
>修改</el-button>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="1.5">
|
||||||
|
<el-button
|
||||||
|
type="danger"
|
||||||
|
plain
|
||||||
|
icon="el-icon-delete"
|
||||||
|
size="mini"
|
||||||
|
:disabled="multiple"
|
||||||
|
@click="handleDelete"
|
||||||
|
v-hasPermi="['system:competition:remove']"
|
||||||
|
>删除</el-button>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="1.5">
|
||||||
|
<el-button
|
||||||
|
type="warning"
|
||||||
|
plain
|
||||||
|
icon="el-icon-download"
|
||||||
|
size="mini"
|
||||||
|
@click="handleExport"
|
||||||
|
v-hasPermi="['system:competition:export']"
|
||||||
|
>导出</el-button>
|
||||||
|
</el-col>
|
||||||
|
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
||||||
|
</el-row>
|
||||||
|
|
||||||
|
<el-table v-loading="loading" :data="competitionList" @selection-change="handleSelectionChange">
|
||||||
|
<el-table-column type="selection" width="35" align="center" />
|
||||||
|
<el-table-column label="id" align="center" prop="id" width="55" />
|
||||||
|
<el-table-column label="赛会背景图" align="center" prop="competitionBackImg" width="150" >
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<el-image
|
||||||
|
style="width: 200px; height: 100px"
|
||||||
|
:src="scope.row.competitionBackImg"
|
||||||
|
:preview-src-list="[scope.row.competitionBackImg]"
|
||||||
|
:fit="imgfit"></el-image>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="比赛名称" align="center" prop="competitionName" width="200" show-overflow-tooltip="true"/>
|
||||||
|
<el-table-column label="比赛状态" align="center" prop="status" width="100">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<el-tag>
|
||||||
|
<dict-tag :options="dict.type.competition_status" :value="scope.row.status"/>
|
||||||
|
</el-tag>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="审核状态" align="center" prop="auditStatus" width="100" >
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<el-tag v-if="scope.row.auditStatus==1" type='success' >通过</el-tag>
|
||||||
|
<el-tag v-if="scope.row.auditStatus==0" type='info' >待审核</el-tag>
|
||||||
|
<el-tag v-if="scope.row.auditStatus==-1" type='danger' >未通过</el-tag>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="比赛赛制" align="center" prop="competitionType" width="100">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<el-tag v-if="scope.row.competitionType==1">一人制</el-tag>
|
||||||
|
<el-tag v-if="scope.row.competitionType==2">二人制</el-tag>
|
||||||
|
<el-tag v-if="scope.row.competitionType==3">三人制</el-tag>
|
||||||
|
<el-tag v-if="scope.row.competitionType==4">四人制</el-tag>
|
||||||
|
<el-tag v-if="scope.row.competitionType==5">五人制</el-tag>
|
||||||
|
<el-tag v-if="scope.row.competitionType==6">六人制</el-tag>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="报名开始时间" align="center" prop="enrollBeginTime" width="110">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<span>{{ parseTime(scope.row.enrollBeginTime, '{y}-{m}-{d}') }}</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="报名结束时间" align="center" prop="enrollEndTime" width="110">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<span>{{ parseTime(scope.row.enrollEndTime, '{y}-{m}-{d}') }}</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="赛事联系人" align="center" prop="contacts" width="100"/>
|
||||||
|
<el-table-column label="联系人电话" align="center" prop="contactsTel" width="120"/>
|
||||||
|
<el-table-column label="比赛开始时间" align="center" prop="competitionBeginTime" width="100">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<span>{{ parseTime(scope.row.competitionBeginTime, '{y}-{m}-{d}') }}</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="比赛结束时间" align="center" prop="competitionEndTime" width="100">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<span>{{ parseTime(scope.row.competitionEndTime, '{y}-{m}-{d}') }}</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="比赛地址" align="center" prop="competitionAddress" show-overflow-tooltip="true" width="180"/>
|
||||||
|
<el-table-column label="备注说明" align="center" prop="remark" show-overflow-tooltip="true" width="210"/>
|
||||||
|
<el-table-column label="身高隐藏" align="center" prop="heightHide" width="100">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<el-tag v-if="scope.row.heightHide==1" type='info' >隐藏</el-tag>
|
||||||
|
<el-tag v-else type='success' >显示</el-tag>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="主办方" align="center" prop="organizer" width="180" show-overflow-tooltip="true"/>
|
||||||
|
<el-table-column label="承办方" align="center" prop="undertake" width="180" show-overflow-tooltip="true"/>
|
||||||
|
<el-table-column label="赞助商" align="center" prop="sponsor" width="100" show-overflow-tooltip="true"/>
|
||||||
|
<el-table-column label="创建时间" align="center" prop="createdTime" width="100">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<span>{{ parseTime(scope.row.createdTime, '{y}-{m}-{d}') }}</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<el-button
|
||||||
|
size="mini"
|
||||||
|
type="text"
|
||||||
|
icon="el-icon-edit"
|
||||||
|
@click="handleUpdate(scope.row)"
|
||||||
|
v-hasPermi="['system:competition:edit']"
|
||||||
|
>修改</el-button>
|
||||||
|
<el-button
|
||||||
|
size="mini"
|
||||||
|
type="text"
|
||||||
|
icon="el-icon-delete"
|
||||||
|
@click="handleDelete(scope.row)"
|
||||||
|
v-hasPermi="['system:competition:remove']"
|
||||||
|
>删除</el-button>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
</el-table>
|
||||||
|
|
||||||
|
<pagination
|
||||||
|
v-show="total>0"
|
||||||
|
:total="total"
|
||||||
|
:page.sync="queryParams.pageNum"
|
||||||
|
:limit.sync="queryParams.pageSize"
|
||||||
|
@pagination="getList"
|
||||||
|
/>
|
||||||
|
|
||||||
|
<!-- 添加或修改比赛信息对话框 -->
|
||||||
|
<el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
|
||||||
|
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
|
||||||
|
<el-form-item label="主队ID" prop="mainTeamId">
|
||||||
|
<el-input v-model="form.mainTeamId" placeholder="请输入主队ID" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="主队名" prop="mainTeamName">
|
||||||
|
<el-input v-model="form.mainTeamName" placeholder="请输入主队名" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="客队ID" prop="guestTeamId">
|
||||||
|
<el-input v-model="form.guestTeamId" placeholder="请输入客队ID" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="客队名" prop="guestTeamName">
|
||||||
|
<el-input v-model="form.guestTeamName" placeholder="请输入客队名" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="赛事编号" prop="competitionCode">
|
||||||
|
<el-input v-model="form.competitionCode" placeholder="请输入赛事编号" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="比赛名称" prop="competitionName">
|
||||||
|
<el-input v-model="form.competitionName" placeholder="请输入比赛名称" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="是否指定对手" prop="designated">
|
||||||
|
<el-input v-model="form.designated" placeholder="请输入是否指定对手" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="比赛时间" prop="competitionTime">
|
||||||
|
<el-date-picker clearable
|
||||||
|
v-model="form.competitionTime"
|
||||||
|
type="date"
|
||||||
|
value-format="yyyy-MM-dd"
|
||||||
|
placeholder="请选择比赛时间">
|
||||||
|
</el-date-picker>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="球场ID" prop="buildingId">
|
||||||
|
<el-input v-model="form.buildingId" placeholder="请输入球场ID" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="球场名称" prop="buildingName">
|
||||||
|
<el-input v-model="form.buildingName" placeholder="请输入球场名称" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="比赛地址" prop="competitionAddress">
|
||||||
|
<el-input v-model="form.competitionAddress" placeholder="请输入比赛地址" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="发起人ID" prop="founder">
|
||||||
|
<el-input v-model="form.founder" placeholder="请输入发起人ID" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="城市编码" prop="cityCode">
|
||||||
|
<el-input v-model="form.cityCode" placeholder="请输入城市编码" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="城市名称" prop="cityName">
|
||||||
|
<el-input v-model="form.cityName" placeholder="请输入城市名称" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="最大参与人数" prop="maxPlayer">
|
||||||
|
<el-input v-model="form.maxPlayer" placeholder="请输入最大参与人数" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="创建时间" prop="createdTime">
|
||||||
|
<el-date-picker clearable
|
||||||
|
v-model="form.createdTime"
|
||||||
|
type="date"
|
||||||
|
value-format="yyyy-MM-dd"
|
||||||
|
placeholder="请选择创建时间">
|
||||||
|
</el-date-picker>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="最后修改时间" prop="lastUpdatedTime">
|
||||||
|
<el-date-picker clearable
|
||||||
|
v-model="form.lastUpdatedTime"
|
||||||
|
type="date"
|
||||||
|
value-format="yyyy-MM-dd"
|
||||||
|
placeholder="请选择最后修改时间">
|
||||||
|
</el-date-picker>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="创建人" prop="createdBy">
|
||||||
|
<el-input v-model="form.createdBy" placeholder="请输入创建人" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="最后修改人" prop="modifiedBy">
|
||||||
|
<el-input v-model="form.modifiedBy" placeholder="请输入最后修改人" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="是否删除" prop="isDeleted">
|
||||||
|
<el-input v-model="form.isDeleted" placeholder="请输入是否删除" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="经度" prop="longitude">
|
||||||
|
<el-input v-model="form.longitude" placeholder="请输入经度" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="纬度" prop="latitude">
|
||||||
|
<el-input v-model="form.latitude" placeholder="请输入纬度" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="备注说明" prop="remark">
|
||||||
|
<el-input v-model="form.remark" type="textarea" placeholder="请输入内容" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="比赛性质" prop="competitionNature">
|
||||||
|
<el-input v-model="form.competitionNature" placeholder="请输入比赛性质" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="报名开始时间" prop="enrollBeginTime">
|
||||||
|
<el-date-picker clearable
|
||||||
|
v-model="form.enrollBeginTime"
|
||||||
|
type="date"
|
||||||
|
value-format="yyyy-MM-dd"
|
||||||
|
placeholder="请选择报名开始时间">
|
||||||
|
</el-date-picker>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="报名结束时间" prop="enrollEndTime">
|
||||||
|
<el-date-picker clearable
|
||||||
|
v-model="form.enrollEndTime"
|
||||||
|
type="date"
|
||||||
|
value-format="yyyy-MM-dd"
|
||||||
|
placeholder="请选择报名结束时间">
|
||||||
|
</el-date-picker>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="赛事联系人" prop="contacts">
|
||||||
|
<el-input v-model="form.contacts" placeholder="请输入赛事联系人" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="赛事联系人电话区号" prop="contactsAreaCode">
|
||||||
|
<el-input v-model="form.contactsAreaCode" placeholder="请输入赛事联系人电话区号" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="赛事联系人电话" prop="contactsTel">
|
||||||
|
<el-input v-model="form.contactsTel" placeholder="请输入赛事联系人电话" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="比赛开始时间" prop="competitionBeginTime">
|
||||||
|
<el-date-picker clearable
|
||||||
|
v-model="form.competitionBeginTime"
|
||||||
|
type="date"
|
||||||
|
value-format="yyyy-MM-dd"
|
||||||
|
placeholder="请选择比赛开始时间">
|
||||||
|
</el-date-picker>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="比赛结束时间" prop="competitionEndTime">
|
||||||
|
<el-date-picker clearable
|
||||||
|
v-model="form.competitionEndTime"
|
||||||
|
type="date"
|
||||||
|
value-format="yyyy-MM-dd"
|
||||||
|
placeholder="请选择比赛结束时间">
|
||||||
|
</el-date-picker>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="主办方" prop="organizer">
|
||||||
|
<el-input v-model="form.organizer" placeholder="请输入主办方" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="承办方" prop="undertake">
|
||||||
|
<el-input v-model="form.undertake" type="textarea" placeholder="请输入内容" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="赛会背景图" prop="competitionBackImg">
|
||||||
|
<el-input v-model="form.competitionBackImg" type="textarea" placeholder="请输入内容" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="创建人userId" prop="createdId">
|
||||||
|
<el-input v-model="form.createdId" placeholder="请输入创建人userId" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="身高隐藏 0不隐藏 1=隐藏" prop="heightHide">
|
||||||
|
<el-input v-model="form.heightHide" placeholder="请输入身高隐藏 0不隐藏 1=隐藏" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="赞助商" prop="sponsor">
|
||||||
|
<el-input v-model="form.sponsor" placeholder="请输入赞助商" />
|
||||||
|
</el-form-item>
|
||||||
|
</el-form>
|
||||||
|
<div slot="footer" class="dialog-footer">
|
||||||
|
<el-button type="primary" @click="submitForm">确 定</el-button>
|
||||||
|
<el-button @click="cancel">取 消</el-button>
|
||||||
|
</div>
|
||||||
|
</el-dialog>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import { listCompetition, getCompetition, delCompetition, addCompetition, updateCompetition } from "@/api/system/competition";
|
||||||
|
|
||||||
|
export default {
|
||||||
|
name: "Competition",
|
||||||
|
dicts: ['competition_status'],
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
imgfit:"fill",
|
||||||
|
// 遮罩层
|
||||||
|
loading: true,
|
||||||
|
// 选中数组
|
||||||
|
ids: [],
|
||||||
|
|
||||||
|
// 非单个禁用
|
||||||
|
single: true,
|
||||||
|
// 非多个禁用
|
||||||
|
multiple: true,
|
||||||
|
// 显示搜索条件
|
||||||
|
showSearch: true,
|
||||||
|
// 总条数
|
||||||
|
total: 0,
|
||||||
|
// 比赛信息表格数据
|
||||||
|
competitionList: [],
|
||||||
|
// 弹出层标题
|
||||||
|
title: "",
|
||||||
|
// 是否显示弹出层
|
||||||
|
open: false,
|
||||||
|
// 查询参数
|
||||||
|
queryParams: {
|
||||||
|
pageNum: 1,
|
||||||
|
pageSize: 10,
|
||||||
|
mainTeamId: null,
|
||||||
|
mainTeamName: null,
|
||||||
|
guestTeamId: null,
|
||||||
|
guestTeamName: null,
|
||||||
|
competitionCode: null,
|
||||||
|
competitionName: null,
|
||||||
|
designated: null,
|
||||||
|
competitionType: null,
|
||||||
|
competitionTime: null,
|
||||||
|
buildingId: null,
|
||||||
|
buildingName: null,
|
||||||
|
competitionAddress: null,
|
||||||
|
founder: null,
|
||||||
|
status: null,
|
||||||
|
cityCode: null,
|
||||||
|
cityName: null,
|
||||||
|
maxPlayer: null,
|
||||||
|
createdBy: null,
|
||||||
|
modifiedBy: null,
|
||||||
|
competitionNature: 1,
|
||||||
|
enrollBeginTime: null,
|
||||||
|
enrollEndTime: null,
|
||||||
|
contacts: null,
|
||||||
|
contactsAreaCode: null,
|
||||||
|
contactsTel: null,
|
||||||
|
competitionBeginTime: null,
|
||||||
|
competitionEndTime: null,
|
||||||
|
organizer: null,
|
||||||
|
undertake: null,
|
||||||
|
competitionBackImg: null,
|
||||||
|
createdId: null,
|
||||||
|
auditStatus: null,
|
||||||
|
heightHide: null,
|
||||||
|
sponsor: null
|
||||||
|
},
|
||||||
|
// 表单参数
|
||||||
|
form: {},
|
||||||
|
// 表单校验
|
||||||
|
rules: {
|
||||||
|
}
|
||||||
|
};
|
||||||
|
},
|
||||||
|
created() {
|
||||||
|
this.getList();
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
/** 查询比赛信息列表 */
|
||||||
|
getList() {
|
||||||
|
this.loading = true;
|
||||||
|
listCompetition(this.queryParams).then(response => {
|
||||||
|
this.competitionList = response.rows;
|
||||||
|
this.total = response.total;
|
||||||
|
this.loading = false;
|
||||||
|
});
|
||||||
|
},
|
||||||
|
// 取消按钮
|
||||||
|
cancel() {
|
||||||
|
this.open = false;
|
||||||
|
this.reset();
|
||||||
|
},
|
||||||
|
// 表单重置
|
||||||
|
reset() {
|
||||||
|
this.form = {
|
||||||
|
id: null,
|
||||||
|
mainTeamId: null,
|
||||||
|
mainTeamName: null,
|
||||||
|
guestTeamId: null,
|
||||||
|
guestTeamName: null,
|
||||||
|
competitionCode: null,
|
||||||
|
competitionName: null,
|
||||||
|
designated: null,
|
||||||
|
competitionType: null,
|
||||||
|
competitionTime: null,
|
||||||
|
buildingId: null,
|
||||||
|
buildingName: null,
|
||||||
|
competitionAddress: null,
|
||||||
|
founder: null,
|
||||||
|
status: 0,
|
||||||
|
cityCode: null,
|
||||||
|
cityName: null,
|
||||||
|
maxPlayer: null,
|
||||||
|
createdTime: null,
|
||||||
|
lastUpdatedTime: null,
|
||||||
|
createdBy: null,
|
||||||
|
modifiedBy: null,
|
||||||
|
isDeleted: null,
|
||||||
|
longitude: null,
|
||||||
|
latitude: null,
|
||||||
|
remark: null,
|
||||||
|
competitionNature: null,
|
||||||
|
enrollBeginTime: null,
|
||||||
|
enrollEndTime: null,
|
||||||
|
contacts: null,
|
||||||
|
contactsAreaCode: null,
|
||||||
|
contactsTel: null,
|
||||||
|
competitionBeginTime: null,
|
||||||
|
competitionEndTime: null,
|
||||||
|
organizer: null,
|
||||||
|
undertake: null,
|
||||||
|
competitionBackImg: null,
|
||||||
|
createdId: null,
|
||||||
|
auditStatus: 0,
|
||||||
|
heightHide: null,
|
||||||
|
sponsor: null
|
||||||
|
};
|
||||||
|
this.resetForm("form");
|
||||||
|
},
|
||||||
|
/** 搜索按钮操作 */
|
||||||
|
handleQuery() {
|
||||||
|
this.queryParams.pageNum = 1;
|
||||||
|
this.getList();
|
||||||
|
},
|
||||||
|
/** 重置按钮操作 */
|
||||||
|
resetQuery() {
|
||||||
|
this.resetForm("queryForm");
|
||||||
|
this.handleQuery();
|
||||||
|
},
|
||||||
|
// 多选框选中数据
|
||||||
|
handleSelectionChange(selection) {
|
||||||
|
this.ids = selection.map(item => item.id)
|
||||||
|
this.single = selection.length!==1
|
||||||
|
this.multiple = !selection.length
|
||||||
|
},
|
||||||
|
/** 新增按钮操作 */
|
||||||
|
handleAdd() {
|
||||||
|
this.reset();
|
||||||
|
this.open = true;
|
||||||
|
this.title = "添加比赛信息";
|
||||||
|
},
|
||||||
|
/** 修改按钮操作 */
|
||||||
|
handleUpdate(row) {
|
||||||
|
this.reset();
|
||||||
|
const id = row.id || this.ids
|
||||||
|
getCompetition(id).then(response => {
|
||||||
|
this.form = response.data;
|
||||||
|
this.open = true;
|
||||||
|
this.title = "修改比赛信息";
|
||||||
|
});
|
||||||
|
},
|
||||||
|
/** 提交按钮 */
|
||||||
|
submitForm() {
|
||||||
|
this.$refs["form"].validate(valid => {
|
||||||
|
if (valid) {
|
||||||
|
if (this.form.id != null) {
|
||||||
|
updateCompetition(this.form).then(response => {
|
||||||
|
this.$modal.msgSuccess("修改成功");
|
||||||
|
this.open = false;
|
||||||
|
this.getList();
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
addCompetition(this.form).then(response => {
|
||||||
|
this.$modal.msgSuccess("新增成功");
|
||||||
|
this.open = false;
|
||||||
|
this.getList();
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
},
|
||||||
|
/** 删除按钮操作 */
|
||||||
|
handleDelete(row) {
|
||||||
|
const ids = row.id || this.ids;
|
||||||
|
this.$modal.confirm('是否确认删除比赛信息编号为"' + ids + '"的数据项?').then(function() {
|
||||||
|
return delCompetition(ids);
|
||||||
|
}).then(() => {
|
||||||
|
this.getList();
|
||||||
|
this.$modal.msgSuccess("删除成功");
|
||||||
|
}).catch(() => {});
|
||||||
|
},
|
||||||
|
/** 导出按钮操作 */
|
||||||
|
handleExport() {
|
||||||
|
this.download('system/competition/export', {
|
||||||
|
...this.queryParams
|
||||||
|
}, `competition_${new Date().getTime()}.xlsx`)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
|
</script>
|
@ -0,0 +1,539 @@
|
|||||||
|
<template>
|
||||||
|
<div class="app-container">
|
||||||
|
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
|
||||||
|
<el-form-item label="主队名" prop="mainTeamName">
|
||||||
|
<el-input
|
||||||
|
v-model="queryParams.mainTeamName"
|
||||||
|
placeholder="请输入主队名"
|
||||||
|
clearable
|
||||||
|
@keyup.enter.native="handleQuery"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="客队名" prop="guestTeamName">
|
||||||
|
<el-input
|
||||||
|
v-model="queryParams.guestTeamName"
|
||||||
|
placeholder="请输入客队名"
|
||||||
|
clearable
|
||||||
|
@keyup.enter.native="handleQuery"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="比赛名称" prop="competitionName">
|
||||||
|
<el-input
|
||||||
|
v-model="queryParams.competitionName"
|
||||||
|
placeholder="请输入比赛名称"
|
||||||
|
clearable
|
||||||
|
@keyup.enter.native="handleQuery"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="球场名称" prop="buildingName">
|
||||||
|
<el-input
|
||||||
|
v-model="queryParams.buildingName"
|
||||||
|
placeholder="请输入球场名称"
|
||||||
|
clearable
|
||||||
|
@keyup.enter.native="handleQuery"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="比赛地址" prop="competitionAddress">
|
||||||
|
<el-input
|
||||||
|
v-model="queryParams.competitionAddress"
|
||||||
|
placeholder="请输入比赛地址"
|
||||||
|
clearable
|
||||||
|
@keyup.enter.native="handleQuery"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="赛事联系人" prop="contacts">
|
||||||
|
<el-input
|
||||||
|
v-model="queryParams.contacts"
|
||||||
|
placeholder="请输入赛事联系人"
|
||||||
|
clearable
|
||||||
|
@keyup.enter.native="handleQuery"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item>
|
||||||
|
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
|
||||||
|
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
|
||||||
|
</el-form-item>
|
||||||
|
</el-form>
|
||||||
|
|
||||||
|
<el-row :gutter="10" class="mb8">
|
||||||
|
<el-col :span="1.5">
|
||||||
|
<el-button
|
||||||
|
type="primary"
|
||||||
|
plain
|
||||||
|
icon="el-icon-plus"
|
||||||
|
size="mini"
|
||||||
|
@click="handleAdd"
|
||||||
|
v-hasPermi="['system:vs:add']"
|
||||||
|
>新增</el-button>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="1.5">
|
||||||
|
<el-button
|
||||||
|
type="success"
|
||||||
|
plain
|
||||||
|
icon="el-icon-edit"
|
||||||
|
size="mini"
|
||||||
|
:disabled="single"
|
||||||
|
@click="handleUpdate"
|
||||||
|
v-hasPermi="['system:vs:edit']"
|
||||||
|
>修改</el-button>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="1.5">
|
||||||
|
<el-button
|
||||||
|
type="danger"
|
||||||
|
plain
|
||||||
|
icon="el-icon-delete"
|
||||||
|
size="mini"
|
||||||
|
:disabled="multiple"
|
||||||
|
@click="handleDelete"
|
||||||
|
v-hasPermi="['system:vs:remove']"
|
||||||
|
>删除</el-button>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="1.5">
|
||||||
|
<el-button
|
||||||
|
type="warning"
|
||||||
|
plain
|
||||||
|
icon="el-icon-download"
|
||||||
|
size="mini"
|
||||||
|
@click="handleExport"
|
||||||
|
v-hasPermi="['system:vs:export']"
|
||||||
|
>导出</el-button>
|
||||||
|
</el-col>
|
||||||
|
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
||||||
|
</el-row>
|
||||||
|
|
||||||
|
<el-table v-loading="loading" :data="vsList" @selection-change="handleSelectionChange">
|
||||||
|
<el-table-column type="selection" width="55" align="center" />
|
||||||
|
<el-table-column label="id" align="center" prop="id" />
|
||||||
|
<el-table-column label="主队名" align="center" prop="mainTeamName" width="180" show-overflow-tooltip="true"/>
|
||||||
|
<el-table-column label="客队名" align="center" prop="guestTeamName" width="180" show-overflow-tooltip="true"/>
|
||||||
|
<el-table-column label="是否指定对手" align="center" prop="designated" width="110" >
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<el-tag style="color: crimson" v-if="scope.row.designated==1">是</el-tag>
|
||||||
|
<el-tag v-else style="color: darkgrey">否</el-tag>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="比赛时间" align="center" prop="competitionTime" width="100">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<span>{{ parseTime(scope.row.competitionTime, '{y}-{m}-{d}') }}</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="球场名称" align="center" prop="buildingName" width="150" show-overflow-tooltip="true"/>
|
||||||
|
<el-table-column label="比赛地址" align="center" prop="competitionAddress" width="150" show-overflow-tooltip="true"/>
|
||||||
|
<el-table-column label="比赛状态" align="center" prop="status" width="100" >
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<el-tag style="color: #0956f3" v-if="scope.row.status==0">约战中</el-tag>
|
||||||
|
<el-tag style="color: #60ec10" v-if="scope.row.status==1">已应战</el-tag>
|
||||||
|
<el-tag style="color: #6b5c5f" v-if="scope.row.status==2">已结束</el-tag>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="最大参与人数" align="center" prop="maxPlayer" width="120" />
|
||||||
|
<el-table-column label="创建时间" align="center" prop="createdTime" width="180">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<span>{{ parseTime(scope.row.createdTime, '{y}-{m}-{d}') }}</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="备注说明" align="center" prop="remark" width="180" show-overflow-tooltip="true"/>
|
||||||
|
<el-table-column label="身高隐藏 " align="center" prop="heightHide" width="100" >
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<el-tag v-if="scope.row.heightHide==1" type='info' >隐藏</el-tag>
|
||||||
|
<el-tag v-else type='success' >显示</el-tag>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<el-button
|
||||||
|
size="mini"
|
||||||
|
type="text"
|
||||||
|
icon="el-icon-edit"
|
||||||
|
@click="handleUpdate(scope.row)"
|
||||||
|
v-hasPermi="['system:vs:edit']"
|
||||||
|
>修改</el-button>
|
||||||
|
<el-button
|
||||||
|
size="mini"
|
||||||
|
type="text"
|
||||||
|
icon="el-icon-delete"
|
||||||
|
@click="handleDelete(scope.row)"
|
||||||
|
v-hasPermi="['system:vs:remove']"
|
||||||
|
>删除</el-button>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
</el-table>
|
||||||
|
|
||||||
|
<pagination
|
||||||
|
v-show="total>0"
|
||||||
|
:total="total"
|
||||||
|
:page.sync="queryParams.pageNum"
|
||||||
|
:limit.sync="queryParams.pageSize"
|
||||||
|
@pagination="getList"
|
||||||
|
/>
|
||||||
|
|
||||||
|
<!-- 添加或修改约战对话框 -->
|
||||||
|
<el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
|
||||||
|
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
|
||||||
|
<el-form-item label="主队ID" prop="mainTeamId">
|
||||||
|
<el-input v-model="form.mainTeamId" placeholder="请输入主队ID" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="主队名" prop="mainTeamName">
|
||||||
|
<el-input v-model="form.mainTeamName" placeholder="请输入主队名" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="客队ID" prop="guestTeamId">
|
||||||
|
<el-input v-model="form.guestTeamId" placeholder="请输入客队ID" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="客队名" prop="guestTeamName">
|
||||||
|
<el-input v-model="form.guestTeamName" placeholder="请输入客队名" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="赛事编号" prop="competitionCode">
|
||||||
|
<el-input v-model="form.competitionCode" placeholder="请输入赛事编号" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="比赛名称" prop="competitionName">
|
||||||
|
<el-input v-model="form.competitionName" placeholder="请输入比赛名称" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="是否指定对手" prop="designated">
|
||||||
|
<el-input v-model="form.designated" placeholder="请输入是否指定对手" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="比赛时间" prop="competitionTime">
|
||||||
|
<el-date-picker clearable
|
||||||
|
v-model="form.competitionTime"
|
||||||
|
type="date"
|
||||||
|
value-format="yyyy-MM-dd"
|
||||||
|
placeholder="请选择比赛时间">
|
||||||
|
</el-date-picker>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="球场ID" prop="buildingId">
|
||||||
|
<el-input v-model="form.buildingId" placeholder="请输入球场ID" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="球场名称" prop="buildingName">
|
||||||
|
<el-input v-model="form.buildingName" placeholder="请输入球场名称" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="比赛地址" prop="competitionAddress">
|
||||||
|
<el-input v-model="form.competitionAddress" placeholder="请输入比赛地址" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="发起人ID" prop="founder">
|
||||||
|
<el-input v-model="form.founder" placeholder="请输入发起人ID" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="城市编码" prop="cityCode">
|
||||||
|
<el-input v-model="form.cityCode" placeholder="请输入城市编码" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="城市名称" prop="cityName">
|
||||||
|
<el-input v-model="form.cityName" placeholder="请输入城市名称" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="最大参与人数" prop="maxPlayer">
|
||||||
|
<el-input v-model="form.maxPlayer" placeholder="请输入最大参与人数" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="创建时间" prop="createdTime">
|
||||||
|
<el-date-picker clearable
|
||||||
|
v-model="form.createdTime"
|
||||||
|
type="date"
|
||||||
|
value-format="yyyy-MM-dd"
|
||||||
|
placeholder="请选择创建时间">
|
||||||
|
</el-date-picker>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="最后修改时间" prop="lastUpdatedTime">
|
||||||
|
<el-date-picker clearable
|
||||||
|
v-model="form.lastUpdatedTime"
|
||||||
|
type="date"
|
||||||
|
value-format="yyyy-MM-dd"
|
||||||
|
placeholder="请选择最后修改时间">
|
||||||
|
</el-date-picker>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="创建人" prop="createdBy">
|
||||||
|
<el-input v-model="form.createdBy" placeholder="请输入创建人" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="最后修改人" prop="modifiedBy">
|
||||||
|
<el-input v-model="form.modifiedBy" placeholder="请输入最后修改人" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="是否删除" prop="isDeleted">
|
||||||
|
<el-input v-model="form.isDeleted" placeholder="请输入是否删除" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="经度" prop="longitude">
|
||||||
|
<el-input v-model="form.longitude" placeholder="请输入经度" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="纬度" prop="latitude">
|
||||||
|
<el-input v-model="form.latitude" placeholder="请输入纬度" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="备注说明" prop="remark">
|
||||||
|
<el-input v-model="form.remark" type="textarea" placeholder="请输入内容" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="比赛性质" prop="competitionNature">
|
||||||
|
<el-input v-model="form.competitionNature" placeholder="请输入比赛性质" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="报名开始时间" prop="enrollBeginTime">
|
||||||
|
<el-date-picker clearable
|
||||||
|
v-model="form.enrollBeginTime"
|
||||||
|
type="date"
|
||||||
|
value-format="yyyy-MM-dd"
|
||||||
|
placeholder="请选择报名开始时间">
|
||||||
|
</el-date-picker>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="报名结束时间" prop="enrollEndTime">
|
||||||
|
<el-date-picker clearable
|
||||||
|
v-model="form.enrollEndTime"
|
||||||
|
type="date"
|
||||||
|
value-format="yyyy-MM-dd"
|
||||||
|
placeholder="请选择报名结束时间">
|
||||||
|
</el-date-picker>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="赛事联系人" prop="contacts">
|
||||||
|
<el-input v-model="form.contacts" placeholder="请输入赛事联系人" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="赛事联系人电话区号" prop="contactsAreaCode">
|
||||||
|
<el-input v-model="form.contactsAreaCode" placeholder="请输入赛事联系人电话区号" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="赛事联系人电话" prop="contactsTel">
|
||||||
|
<el-input v-model="form.contactsTel" placeholder="请输入赛事联系人电话" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="比赛开始时间" prop="competitionBeginTime">
|
||||||
|
<el-date-picker clearable
|
||||||
|
v-model="form.competitionBeginTime"
|
||||||
|
type="date"
|
||||||
|
value-format="yyyy-MM-dd"
|
||||||
|
placeholder="请选择比赛开始时间">
|
||||||
|
</el-date-picker>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="比赛结束时间" prop="competitionEndTime">
|
||||||
|
<el-date-picker clearable
|
||||||
|
v-model="form.competitionEndTime"
|
||||||
|
type="date"
|
||||||
|
value-format="yyyy-MM-dd"
|
||||||
|
placeholder="请选择比赛结束时间">
|
||||||
|
</el-date-picker>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="主办方" prop="organizer">
|
||||||
|
<el-input v-model="form.organizer" placeholder="请输入主办方" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="承办方" prop="undertake">
|
||||||
|
<el-input v-model="form.undertake" type="textarea" placeholder="请输入内容" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="赛会背景图" prop="competitionBackImg">
|
||||||
|
<el-input v-model="form.competitionBackImg" type="textarea" placeholder="请输入内容" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="创建人userId" prop="createdId">
|
||||||
|
<el-input v-model="form.createdId" placeholder="请输入创建人userId" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="身高隐藏 0不隐藏 1=隐藏" prop="heightHide">
|
||||||
|
<el-input v-model="form.heightHide" placeholder="请输入身高隐藏 0不隐藏 1=隐藏" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="赞助商" prop="sponsor">
|
||||||
|
<el-input v-model="form.sponsor" placeholder="请输入赞助商" />
|
||||||
|
</el-form-item>
|
||||||
|
</el-form>
|
||||||
|
<div slot="footer" class="dialog-footer">
|
||||||
|
<el-button type="primary" @click="submitForm">确 定</el-button>
|
||||||
|
<el-button @click="cancel">取 消</el-button>
|
||||||
|
</div>
|
||||||
|
</el-dialog>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import { listVs, getVs, delVs, addVs, updateVs } from "@/api/system/vs";
|
||||||
|
|
||||||
|
export default {
|
||||||
|
name: "Vs",
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
// 遮罩层
|
||||||
|
loading: true,
|
||||||
|
// 选中数组
|
||||||
|
ids: [],
|
||||||
|
// 非单个禁用
|
||||||
|
single: true,
|
||||||
|
// 非多个禁用
|
||||||
|
multiple: true,
|
||||||
|
// 显示搜索条件
|
||||||
|
showSearch: true,
|
||||||
|
// 总条数
|
||||||
|
total: 0,
|
||||||
|
// 约战表格数据
|
||||||
|
vsList: [],
|
||||||
|
// 弹出层标题
|
||||||
|
title: "",
|
||||||
|
// 是否显示弹出层
|
||||||
|
open: false,
|
||||||
|
// 查询参数
|
||||||
|
queryParams: {
|
||||||
|
pageNum: 1,
|
||||||
|
pageSize: 10,
|
||||||
|
mainTeamId: null,
|
||||||
|
mainTeamName: null,
|
||||||
|
guestTeamId: null,
|
||||||
|
guestTeamName: null,
|
||||||
|
competitionCode: null,
|
||||||
|
competitionName: null,
|
||||||
|
designated: null,
|
||||||
|
competitionType: null,
|
||||||
|
competitionTime: null,
|
||||||
|
buildingId: null,
|
||||||
|
buildingName: null,
|
||||||
|
competitionAddress: null,
|
||||||
|
founder: null,
|
||||||
|
status: null,
|
||||||
|
cityCode: null,
|
||||||
|
cityName: null,
|
||||||
|
maxPlayer: null,
|
||||||
|
createdTime: null,
|
||||||
|
lastUpdatedTime: null,
|
||||||
|
createdBy: null,
|
||||||
|
modifiedBy: null,
|
||||||
|
isDeleted: null,
|
||||||
|
longitude: null,
|
||||||
|
latitude: null,
|
||||||
|
competitionNature: 0,
|
||||||
|
enrollBeginTime: null,
|
||||||
|
enrollEndTime: null,
|
||||||
|
contacts: null,
|
||||||
|
contactsAreaCode: null,
|
||||||
|
contactsTel: null,
|
||||||
|
competitionBeginTime: null,
|
||||||
|
competitionEndTime: null,
|
||||||
|
organizer: null,
|
||||||
|
undertake: null,
|
||||||
|
competitionBackImg: null,
|
||||||
|
createdId: null,
|
||||||
|
auditStatus: null,
|
||||||
|
heightHide: null,
|
||||||
|
sponsor: null
|
||||||
|
},
|
||||||
|
// 表单参数
|
||||||
|
form: {},
|
||||||
|
// 表单校验
|
||||||
|
rules: {
|
||||||
|
}
|
||||||
|
};
|
||||||
|
},
|
||||||
|
created() {
|
||||||
|
this.getList();
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
/** 查询约战列表 */
|
||||||
|
getList() {
|
||||||
|
this.loading = true;
|
||||||
|
listVs(this.queryParams).then(response => {
|
||||||
|
this.vsList = response.rows;
|
||||||
|
this.total = response.total;
|
||||||
|
this.loading = false;
|
||||||
|
});
|
||||||
|
},
|
||||||
|
// 取消按钮
|
||||||
|
cancel() {
|
||||||
|
this.open = false;
|
||||||
|
this.reset();
|
||||||
|
},
|
||||||
|
// 表单重置
|
||||||
|
reset() {
|
||||||
|
this.form = {
|
||||||
|
id: null,
|
||||||
|
mainTeamId: null,
|
||||||
|
mainTeamName: null,
|
||||||
|
guestTeamId: null,
|
||||||
|
guestTeamName: null,
|
||||||
|
competitionCode: null,
|
||||||
|
competitionName: null,
|
||||||
|
designated: null,
|
||||||
|
competitionType: null,
|
||||||
|
competitionTime: null,
|
||||||
|
buildingId: null,
|
||||||
|
buildingName: null,
|
||||||
|
competitionAddress: null,
|
||||||
|
founder: null,
|
||||||
|
status: 0,
|
||||||
|
cityCode: null,
|
||||||
|
cityName: null,
|
||||||
|
maxPlayer: null,
|
||||||
|
createdTime: null,
|
||||||
|
lastUpdatedTime: null,
|
||||||
|
createdBy: null,
|
||||||
|
modifiedBy: null,
|
||||||
|
isDeleted: null,
|
||||||
|
longitude: null,
|
||||||
|
latitude: null,
|
||||||
|
remark: null,
|
||||||
|
competitionNature: null,
|
||||||
|
enrollBeginTime: null,
|
||||||
|
enrollEndTime: null,
|
||||||
|
contacts: null,
|
||||||
|
contactsAreaCode: null,
|
||||||
|
contactsTel: null,
|
||||||
|
competitionBeginTime: null,
|
||||||
|
competitionEndTime: null,
|
||||||
|
organizer: null,
|
||||||
|
undertake: null,
|
||||||
|
competitionBackImg: null,
|
||||||
|
createdId: null,
|
||||||
|
auditStatus: 0,
|
||||||
|
heightHide: null,
|
||||||
|
sponsor: null
|
||||||
|
};
|
||||||
|
this.resetForm("form");
|
||||||
|
},
|
||||||
|
/** 搜索按钮操作 */
|
||||||
|
handleQuery() {
|
||||||
|
this.queryParams.pageNum = 1;
|
||||||
|
this.getList();
|
||||||
|
},
|
||||||
|
/** 重置按钮操作 */
|
||||||
|
resetQuery() {
|
||||||
|
this.resetForm("queryForm");
|
||||||
|
this.handleQuery();
|
||||||
|
},
|
||||||
|
// 多选框选中数据
|
||||||
|
handleSelectionChange(selection) {
|
||||||
|
this.ids = selection.map(item => item.id)
|
||||||
|
this.single = selection.length!==1
|
||||||
|
this.multiple = !selection.length
|
||||||
|
},
|
||||||
|
/** 新增按钮操作 */
|
||||||
|
handleAdd() {
|
||||||
|
this.reset();
|
||||||
|
this.open = true;
|
||||||
|
this.title = "添加约战";
|
||||||
|
},
|
||||||
|
/** 修改按钮操作 */
|
||||||
|
handleUpdate(row) {
|
||||||
|
this.reset();
|
||||||
|
const id = row.id || this.ids
|
||||||
|
getVs(id).then(response => {
|
||||||
|
this.form = response.data;
|
||||||
|
this.open = true;
|
||||||
|
this.title = "修改约战";
|
||||||
|
});
|
||||||
|
},
|
||||||
|
/** 提交按钮 */
|
||||||
|
submitForm() {
|
||||||
|
this.$refs["form"].validate(valid => {
|
||||||
|
if (valid) {
|
||||||
|
if (this.form.id != null) {
|
||||||
|
updateVs(this.form).then(response => {
|
||||||
|
this.$modal.msgSuccess("修改成功");
|
||||||
|
this.open = false;
|
||||||
|
this.getList();
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
addVs(this.form).then(response => {
|
||||||
|
this.$modal.msgSuccess("新增成功");
|
||||||
|
this.open = false;
|
||||||
|
this.getList();
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
},
|
||||||
|
/** 删除按钮操作 */
|
||||||
|
handleDelete(row) {
|
||||||
|
const ids = row.id || this.ids;
|
||||||
|
this.$modal.confirm('是否确认删除约战编号为"' + ids + '"的数据项?').then(function() {
|
||||||
|
return delVs(ids);
|
||||||
|
}).then(() => {
|
||||||
|
this.getList();
|
||||||
|
this.$modal.msgSuccess("删除成功");
|
||||||
|
}).catch(() => {});
|
||||||
|
},
|
||||||
|
/** 导出按钮操作 */
|
||||||
|
handleExport() {
|
||||||
|
this.download('system/vs/export', {
|
||||||
|
...this.queryParams
|
||||||
|
}, `vs_${new Date().getTime()}.xlsx`)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
|
</script>
|
Loading…
Reference in new issue