@ -53,6 +53,11 @@
< / e l - t a b - p a n e >
< / e l - t a b - p a n e >
< el -tab -pane label = "球队审核" name = "competitionTeamApprove" > < span slot = "label" > < i class = "el-icon-s-check" > < / i > 球队审核 < / span >
< el -tab -pane label = "球队审核" name = "competitionTeamApprove" > < span slot = "label" > < i class = "el-icon-s-check" > < / i > 球队审核 < / span >
< div style = "margin-bottom: 5px;" >
< el -button size = "small" type = "success" @click ="addOfTeam" >
新增球队
< / e l - b u t t o n >
< / div >
< el -table
< el -table
max - height = "800"
max - height = "800"
v - loading = "loading" : data = "competitionOfTeamList" @ selection - change = "handleSelectionChange" >
v - loading = "loading" : data = "competitionOfTeamList" @ selection - change = "handleSelectionChange" >
@ -89,35 +94,17 @@
< el -table -column label = "领队人电话" align = "center" prop = "contactsTel" / >
< el -table -column label = "领队人电话" align = "center" prop = "contactsTel" / >
< el -table -column label = "操作" align = "center" class -name = " small -padding fixed -width " >
< el -table -column label = "操作" align = "center" class -name = " small -padding fixed -width " >
< template slot -scope = " scope " >
< template slot -scope = " scope " >
< el -popconfirm v -if = " competitionObj.status = = = 0 " @confirm ="bindConfirm(scope.row.id,1)"
< el -button size = "mini" type = "text" icon = "el-icon-edit" @click ="handleEditOfTeam(scope.row)" v-hasPermi ="['system:competitionOfTeam:edit']" > 编 辑 < / el -button >
title = "你确定同意此球队加入赛会吗?"
< el -popconfirm v-if ="scope.row.status===0" @confirm="bindConfirm(scope.row.id,1)" title="你确定同意此球队加入赛会吗?" >
>
< el -button slot = "reference" size = "mini" type = "text" icon = "el-icon-success" v-hasPermi ="['system:competitionOfTeam:edit']" > 同 意 < / el -button >
< el -button
slot = "reference"
size = "mini"
type = "text"
icon = "el-icon-success"
v - hasPermi = "['system:competitionOfTeam:edit']"
> 同意 < / e l - b u t t o n >
< / e l - p o p c o n f i r m >
< / e l - p o p c o n f i r m >
< el -popconfirm v -if = " competitionObj.status = = = 0 " @confirm ="bindConfirm(scope.row.id,-1)"
< el -popconfirm v-if ="scope.row.status===0" @confirm="bindConfirm(scope.row.id,-1)" title="你确定不同意此球队加入赛会吗?" >
title = "你确定不同意此球队加入赛会吗?"
< el -button slot = "reference" size = "mini" type = "text" icon = "el-icon-info" v-hasPermi ="['system:competitionOfTeam:remove']" > 驳 回 < / el -button >
>
< / e l - p o p c o n f i r m >
< el -button
< el -button size = "mini" type = "text" icon = "el-icon-s-custom" @click ="handleTeamUser(scope.row)" v-hasPermi ="['system:competitionOfTeam:list']" > 球 队 成 员 < / el -button >
slot = "reference"
< el -popconfirm v-if ="scope.row.status===0" @confirm="bindDelOfTeamConfirm(scope.row.id,1)" title="你确定要删除此球队吗?" >
size = "mini"
< el -button slot = "reference" size = "mini" type = "text" icon = "el-icon-delete" v-hasPermi ="['system:competitionOfTeam:remove']" > 删 除 < / el -button >
type = "text"
icon = "el-icon-info"
v - hasPermi = "['system:competitionOfTeam:remove']"
> 驳回 < / e l - b u t t o n >
< / e l - p o p c o n f i r m >
< / e l - p o p c o n f i r m >
< el -button
size = "mini"
type = "text"
icon = "el-icon-s-custom"
@ click = "handleTeamUser(scope.row)"
v - hasPermi = "['system:competitionOfTeam:list']"
> 球队成员 < / e l - b u t t o n >
< / template >
< / template >
< / e l - t a b l e - c o l u m n >
< / e l - t a b l e - c o l u m n >
< / e l - t a b l e >
< / e l - t a b l e >
@ -250,28 +237,10 @@
< el -table -column label = "球场名称" align = "center" prop = "buildingName" width = "250" / >
< el -table -column label = "球场名称" align = "center" prop = "buildingName" width = "250" / >
< el -table -column label = "操作" align = "center" class -name = " small -padding fixed -width " >
< el -table -column label = "操作" align = "center" class -name = " small -padding fixed -width " >
< template slot -scope = " scope " >
< template slot -scope = " scope " >
< el -button
< el -button size = "mini" type = "text" icon = "el-icon-edit-outline" @click ="handleTeamVsTeamRecord(scope.row)" v-hasPermi ="['system:competitionOfTeam:edit']" > 比 赛 记 录 < / el -button >
size = "mini"
< el -button size = "mini" type = "text" icon = "el-icon-edit" @click ="handleTeamVsTeamEdit(scope.row)" v-hasPermi ="['system:competitionTeamVsTeam:edit']" > 编 辑 赛 程 < / el -button >
type = "text"
< el -button size = "mini" type = "text" icon = "el-icon-delete" @click ="handleTeamVsTeamDel(scope.row)" v-hasPermi ="['system:competitionOfTeam:del']" > 删 除 赛 程 < / el -button >
icon = "el-icon-edit-outline"
<!-- < el -button v-if ="new Date(scope.row.competitionDate).getTime() > new Date().getTime()" size="mini" type="text" icon="el-icon-delete" @click="handleTeamVsTeamDel(scope.row)" v-hasPermi="['system:competitionOfTeam:del']" > 删 除 赛 程 < / el -button > -- >
@ click = "handleTeamVsTeamRecord(scope.row)"
v - hasPermi = "['system:competitionOfTeam:edit']"
> 比赛记录 < / e l - b u t t o n >
< el -button
size = "mini"
type = "text"
icon = "el-icon-edit"
@ click = "handleTeamVsTeamEdit(scope.row)"
v - hasPermi = "['system:competitionTeamVsTeam:edit']"
> 编辑赛程 < / e l - b u t t o n >
< el -button
v - if = "new Date(scope.row.competitionDate).getTime() > new Date().getTime()"
size = "mini"
type = "text"
icon = "el-icon-delete"
@ click = "handleTeamVsTeamDel(scope.row)"
v - hasPermi = "['system:competitionOfTeam:del']"
> 删除赛程 < / e l - b u t t o n >
< / template >
< / template >
< / e l - t a b l e - c o l u m n >
< / e l - t a b l e - c o l u m n >
< / e l - t a b l e >
< / e l - t a b l e >
@ -354,6 +323,55 @@
< / e l - t a b s >
< / e l - t a b s >
< / e l - t a b - p a n e >
< / e l - t a b - p a n e >
< / e l - t a b s >
< / e l - t a b s >
<!-- 添加或修改赛会中 - 参赛队伍对话框 -- >
< el -dialog :title ="ofTeamTitle" :visible.sync ="ofTeamOpen" width = "700px" append -to -body >
< el -form ref = "ofTeamForm" :model ="ofTeamForm" :rules ="ofTeamFormRules" label -width = " 120px " >
< el -form -item label = "球队名" prop = "teamName" >
< el -input v -model = " ofTeamForm.teamName " placeholder = "请输入球队名" / >
< / e l - f o r m - i t e m >
< el -form -item label = "球队logo" prop = "teamLogo" >
< el -upload
class = "avatar-uploader"
action = "https://mall.lzsport.cn/prod-api/system/file/uploadMore"
: show - file - list = "false"
name = "files"
: on - success = "handleAvatarSuccess"
: before - upload = "beforeAvatarUpload" >
< img v-if ="ofTeamForm.teamLogo" :src="ofTeamForm.teamLogo" class="avatar" >
< i v -else class = "el-icon-plus avatar-uploader-icon" > < / i >
< / e l - u p l o a d >
< / e l - f o r m - i t e m >
< el -form -item label = "隐藏队员头像" prop = "isHideAvatar" >
< el -switch
v - model = "ofTeamForm.isHideAvatar"
active - text = "隐藏"
inactive - text = "显示" >
< / e l - s w i t c h >
< / e l - f o r m - i t e m >
< el -form -item label = "队长" prop = "captain" >
< el -input v -model = " ofTeamForm.captain " placeholder = "请输入队长姓名" / >
< / e l - f o r m - i t e m >
< el -form -item label = "领队人" prop = "contacts" >
< el -input v -model = " ofTeamForm.contacts " placeholder = "请输入领队人" / >
< / e l - f o r m - i t e m >
< el -form -item label = "领队人电话" prop = "contactsTel" >
< el -input v -model = " ofTeamForm.contactsTel " placeholder = "请输入领队人电话" / >
< / e l - f o r m - i t e m >
< el -form -item label = "领队人电话区号" prop = "contactsAreaCode" >
< el -input v -model = " ofTeamForm.contactsAreaCode " placeholder = "请输入领队人电话区号" / >
< / e l - f o r m - i t e m >
< el -form -item label = "组内的序号" prop = "serialNumber" >
< el -input -number v -model = " ofTeamForm.serialNumber " :min ="0" :max ="100" placeholder = "请输入组内的序号" / >
< / e l - f o r m - i t e m >
< el -form -item label = "备注说明" prop = "remark" >
< el -input v -model = " ofTeamForm.remark " type = "textarea" placeholder = "请输入内容" / >
< / e l - f o r m - i t e m >
< / e l - f o r m >
< div slot = "footer" class = "dialog-footer" >
< el -button type = "primary" @click ="ofTeamSubmitForm" > 确 定 < / el -button >
< el -button @click ="ofTeamCancel" > 取 消 < / el -button >
< / div >
< / e l - d i a l o g >
< el -drawer
< el -drawer
title = "球队成员"
title = "球队成员"
@ -742,7 +760,15 @@
< script >
< script >
import { listCompetition , getCompetition , genCompetitionCommonAqrSpread , addCompetition , updateCompetition } from "@/api/system/competition" ;
import { listCompetition , getCompetition , genCompetitionCommonAqrSpread , addCompetition , updateCompetition } from "@/api/system/competition" ;
import { listCompetitionOfTeam , batchEditById , intoTeamGroup , removeTeamGroup , updateCompetitionOfTeam } from "@/api/system/competitionOfTeam" ;
import {
listCompetitionOfTeam ,
batchEditById ,
intoTeamGroup ,
removeTeamGroup ,
updateCompetitionOfTeam ,
addCompetitionOfTeam ,
getCompetitionOfTeam
} from "@/api/system/competitionOfTeam" ;
import { listCompetitionMembers , getCompetitionMembers , delCompetitionMembers , addCompetitionMembers , updateCompetitionMembers } from "@/api/system/competitionMembers" ;
import { listCompetitionMembers , getCompetitionMembers , delCompetitionMembers , addCompetitionMembers , updateCompetitionMembers } from "@/api/system/competitionMembers" ;
import { listCompetitionTeamGroup , arrangeTeamGroupSchedule , delCompetitionTeamGroup , addCompetitionTeamGroup , updateCompetitionTeamGroup } from "@/api/system/competitionTeamGroup" ;
import { listCompetitionTeamGroup , arrangeTeamGroupSchedule , delCompetitionTeamGroup , addCompetitionTeamGroup , updateCompetitionTeamGroup } from "@/api/system/competitionTeamGroup" ;
import { listCompetitionTeamVsTeam , getCompetitionVsRecordById , delCompetitionTeamVsTeam , addCompetitionTeamVsTeam , updateCompetitionTeamVsTeam } from "@/api/system/competitionTeamVsTeam" ;
import { listCompetitionTeamVsTeam , getCompetitionVsRecordById , delCompetitionTeamVsTeam , addCompetitionTeamVsTeam , updateCompetitionTeamVsTeam } from "@/api/system/competitionTeamVsTeam" ;
@ -750,6 +776,7 @@ import { listWxBuilding, getWxBuilding, delWxBuilding, addWxBuilding, updateWxBu
import { listCompetitionResult , getCompetitionResult , editDataCompetitionResult , batchUpdateCompetitionResult , updateCompetitionResult } from "@/api/system/competitionResult" ;
import { listCompetitionResult , getCompetitionResult , editDataCompetitionResult , batchUpdateCompetitionResult , updateCompetitionResult } from "@/api/system/competitionResult" ;
import { listCompetitionMemberScore , getCompetitionMemberScore , delCompetitionMemberScore , addCompetitionMemberScore , updateCompetitionMemberScore } from "@/api/system/competitionMemberScore" ;
import { listCompetitionMemberScore , getCompetitionMemberScore , delCompetitionMemberScore , addCompetitionMemberScore , updateCompetitionMemberScore } from "@/api/system/competitionMemberScore" ;
import { getWxApplesAccessToken , genWxApplesAqrCode } from "@/api/system/wxApplesCode" ;
import { getWxApplesAccessToken , genWxApplesAqrCode } from "@/api/system/wxApplesCode" ;
import { parseTime } from "@/utils/ruoyi" ;
export default {
export default {
name : "CompetitionSet" ,
name : "CompetitionSet" ,
@ -894,6 +921,16 @@ export default {
totalScore : [
totalScore : [
{ required : true , message : "总分不能为空" , trigger : "blur" }
{ required : true , message : "总分不能为空" , trigger : "blur" }
]
]
} ,
/ / 新 增 球 队 变 量
imageUrl : null ,
ofTeamOpen : false ,
ofTeamTitle : "" ,
ofTeamForm : { } ,
ofTeamFormRules : {
teamName : [
{ required : true , message : "球队名称不能为空" , trigger : "blur" }
] ,
}
}
} ;
} ;
} ,
} ,
@ -1069,6 +1106,14 @@ export default {
} ) ;
} ) ;
} ) ;
} ) ;
} ,
} ,
bindDelOfTeamConfirm ( id , tage ) {
updateCompetitionOfTeam ( { "id" : id , "status" : tage } ) . then ( response => {
this . $modal . msgSuccess ( "球队审核成功" ) ;
listCompetitionOfTeam ( { "orderByColumn" : "t.id" , "isAsc" : "desc" , "pageNum" : 1 , "pageSize" : 1000 , "competitionId" : this . competitionObj . id } ) . then ( response => {
this . competitionOfTeamList = response . rows ;
} ) ;
} ) ;
} ,
handleTeamUser ( row ) {
handleTeamUser ( row ) {
this . drawer = true
this . drawer = true
listCompetitionMembers ( { "pageNum" : 1 , "pageSize" : 1000 , "competitionId" : this . competitionObj . id , "competitionOfTeamId" : row . id } ) . then ( response => {
listCompetitionMembers ( { "pageNum" : 1 , "pageSize" : 1000 , "competitionId" : this . competitionObj . id , "competitionOfTeamId" : row . id } ) . then ( response => {
@ -1174,6 +1219,69 @@ export default {
this . single = selection . length !== 1
this . single = selection . length !== 1
this . multiple = ! selection . length
this . multiple = ! selection . length
} ,
} ,
/ / 新 增 球 队
addOfTeam ( ) {
this . ofTeamForm = { } ;
this . ofTeamOpen = true ;
this . ofTeamTitle = "新增球队" ;
} ,
ofTeamCancel ( ) {
this . ofTeamForm = { } ;
this . ofTeamOpen = false ;
this . ofTeamTitle = "" ;
} ,
handleEditOfTeam ( row ) {
const id = row . id ;
getCompetitionOfTeam ( id ) . then ( response => {
this . ofTeamForm = response . data ;
this . ofTeamOpen = true ;
this . ofTeamTitle = "编辑球队" ;
} ) ;
} ,
ofTeamSubmitForm ( ) {
this . $refs [ "ofTeamForm" ] . validate ( valid => {
if ( valid ) {
this . ofTeamForm . competitionId = this . competitionObj . id ;
console . info ( this . ofTeamForm )
if ( this . ofTeamForm . id != null ) {
updateCompetitionOfTeam ( this . ofTeamForm ) . then ( response => {
this . $modal . msgSuccess ( "编辑球队成功" ) ;
this . ofTeamOpen = false ;
listCompetitionOfTeam ( { "orderByColumn" : "t.id" , "isAsc" : "desc" , "pageNum" : 1 , "pageSize" : 1000 , "competitionId" : this . competitionObj . id } ) . then ( response => {
this . competitionOfTeamList = response . rows ;
} ) ;
} ) ;
} else {
addCompetitionOfTeam ( this . ofTeamForm ) . then ( response => {
this . $modal . msgSuccess ( "新增球队成功" ) ;
this . ofTeamOpen = false ;
listCompetitionOfTeam ( { "orderByColumn" : "t.id" , "isAsc" : "desc" , "pageNum" : 1 , "pageSize" : 1000 , "competitionId" : this . competitionObj . id } ) . then ( response => {
this . competitionOfTeamList = response . rows ;
} ) ;
} ) ;
}
}
} ) ;
} ,
/ / 上 传 球 队 l o g o
handleAvatarSuccess ( res , file ) {
this . imageUrl = URL . createObjectURL ( file . raw ) ;
let imgUrl = res . rows [ 0 ] ;
this . ofTeamForm . teamLogo = "https://mall.lzsport.cn/image/" + imgUrl ;
} ,
beforeAvatarUpload ( file ) {
console . info ( file . type )
const isJPG = ( file . type === 'image/jpeg' || file . type === 'image/png' || file . type === 'image/x-icon' ) ;
const isLt2M = file . size / 1024 / 1024 < 2 ;
if ( ! isJPG ) {
this . $message . error ( '上传头像图片只能是 JPG/PNG/ICO 格式!' ) ;
}
if ( ! isLt2M ) {
this . $message . error ( '上传头像图片大小不能超过 2MB!' ) ;
}
return isJPG && isLt2M ;
} ,
/** 新增按钮操作 */
/** 新增按钮操作 */
handleAdd ( ) {
handleAdd ( ) {
this . reset ( ) ;
this . reset ( ) ;
@ -1267,7 +1375,7 @@ export default {
} ,
} ,
handleTeamVsTeamDel ( row ) {
handleTeamVsTeamDel ( row ) {
const ids = row . id || this . ids ;
const ids = row . id || this . ids ;
this . $modal . confirm ( ' 是否确认删除赛会中的赛程 数据?') . then ( function ( ) {
this . $modal . confirm ( ' 确认删除['+ parseTime ( row . competitionTime , '{y}-{m}-{d} {h}:{i}' ) + ']赛程[' + row . mainTeamName + ' VS ' + row . guestTeamName + '] 数据?') . then ( function ( ) {
return delCompetitionTeamVsTeam ( ids ) ;
return delCompetitionTeamVsTeam ( ids ) ;
} ) . then ( ( ) => {
} ) . then ( ( ) => {
listCompetitionTeamVsTeam ( { "orderByColumn" : "competition_time" , "isAsc" : "desc" , "isDeleted" : 0 , "pageNum" : 1 , "pageSize" : 1000 , "competitionId" : this . competitionObj . id } ) . then ( response => {
listCompetitionTeamVsTeam ( { "orderByColumn" : "competition_time" , "isAsc" : "desc" , "isDeleted" : 0 , "pageNum" : 1 , "pageSize" : 1000 , "competitionId" : this . competitionObj . id } ) . then ( response => {
@ -1506,6 +1614,29 @@ export default {
} ;
} ;
< / script >
< / script >
< style >
< style >
. avatar - uploader . el - upload {
border : 1 px dashed # d9d9d9 ;
border - radius : 6 px ;
cursor : pointer ;
position : relative ;
overflow : hidden ;
}
. avatar - uploader . el - upload : hover {
border - color : # 409 EFF ;
}
. avatar - uploader - icon {
font - size : 28 px ;
color : # 8 c939d ;
width : 178 px ;
height : 178 px ;
line - height : 178 px ;
text - align : center ;
}
. avatar {
width : 178 px ;
height : 178 px ;
display : block ;
}
. el - aside {
. el - aside {
background : white ;
background : white ;
border - width : 0 1 px 0 0 ;
border - width : 0 1 px 0 0 ;
@ -1647,8 +1778,6 @@ export default {
. pt1 { height : 610 px ; }
. pt1 { height : 610 px ; }
. pt2 { height : 640 px ; }
. pt2 { height : 640 px ; }
. pt3 { height : 668 px ; }
. pt3 { height : 668 px ; }
. invite - modle { width : 100 % ; height : 240 px ; background - color : # fff ; box - shadow : 0 , 0 , 0 rgba ( 170 , 170 , 170 , .38 ) ;
padding : 48 px 0 0 28 px ; box - sizing : border - box ; position : fixed ; bottom : 0 ; left : 0 ; }
. poster - mod { width : 100 % ; height : 150 px ; overflow : hidden ; background : # fff ; white - space : nowrap ; }
. poster - mod { width : 100 % ; height : 150 px ; overflow : hidden ; background : # fff ; white - space : nowrap ; }
. poster - item { height : 144 px ; background - color : # f0f0f0 ; border - radius : 6 px ; border : 1.5 px solid transparent ; display : inline - block ; overflow : hidden ; margin - right : 35 px ; }
. poster - item { height : 144 px ; background - color : # f0f0f0 ; border - radius : 6 px ; border : 1.5 px solid transparent ; display : inline - block ; overflow : hidden ; margin - right : 35 px ; }
. poster - item . cur { border - color : # e94579 ; }
. poster - item . cur { border - color : # e94579 ; }