8621078b by 杨炀

no message

1 parent 8ede71b2
Showing 62 changed files with 525 additions and 749 deletions
......@@ -33,3 +33,4 @@ export function getExamRegionsList() {
method: 'get'
})
}
......
......@@ -555,6 +555,14 @@ export function getPayedOrderPdf(cptId, groupId) {
method: 'get'
})
}
export function checkNoRepeat(query) {
return request({
url: `/league/wdsf/checkNoRepeat`,
method: 'get',
params: query
})
}
//todo
export function bindWdsf(perId,card) {
return request({
......
......@@ -140,3 +140,10 @@ export function getDropsorts() {
method: 'get'
})
}
export function getWeather() {
return request({
url: '/weather',
method: 'get'
})
}
......
......@@ -335,7 +335,7 @@ export const rankList = [
yin: '0',
tong: '2'
},
{index: '7', code: 'cn', name: 'Yan Bangbang - Du Yujun', gj: '中国', en_gj: 'China', jin: '0', yin: '0', tong: '1'}
{index: '7', code: 'cn', name: 'Yan Bangbang - Du Yujun', gj: '中国', en_gj: 'CHN', jin: '0', yin: '0', tong: '1'}
]
export const cjList = [
{
......
This diff could not be displayed because it is too large.
......@@ -1002,13 +1002,47 @@ img{display: block;}
&:hover{filter: brightness(1.1)}
}
.fixed_gg {
position: fixed;right:0;
top: 25%;
z-index: 10;
.cclose.el-icon{font-size:0;color: #fff;z-index: 2;
transition: font-size 0.2s;cursor: pointer;
position: absolute;right: 0;}
&:hover .el-icon{font-size: 26px;}
img {
width: 100%;
}
.bg-lineg{position: relative;border-radius: 15px;}
.cover{position: absolute;width: 100%;z-index: 1;height: 100%;background: red;opacity: 0;top:0;}
}
.smallToday{display: flex;align-items: center;
.type{margin-right: 20px;}
h3{margin: 0 0 10px;}
}
.weatherbox{padding: 20px 0;
.today{text-align: center;display: flex;justify-content: center;align-items: center;margin: 0 0 30px;
.type{margin-left: 30px;}
.wd{font-size: 50px;font-weight: bold;font-family: "DIN"}
.wd_p{font-size: 14px;}
.week{display: none}
}
.wlist{
display: flex;justify-content: space-between;
li{text-align: center;margin: 0 10px;
.wd{font-size: 15px;font-weight: bold;margin: 10px 0;white-space: nowrap}
.week{font-size: 14px;}
.type{}
}
}
}
//赛事
.ph-30{padding-top: 30px;padding-bottom: 30px;}
.panel{border-radius: 0;background: #FFFFFF;padding: 1px 0 0;
.panel-header{line-height: 50px;height: 50px;border-bottom: 1px solid #EEEEEE;
padding: 0 20px;position: relative;
.fr{position: absolute;right: 20px;top: 0px;font-size: 14px;color: #666;
.fr{position: absolute;right: 20px;top: 0px;font-size: 14px;}
a.fr{color: #666;
text-decoration: underline;}
}
.panel-title{font-size: 16px;line-height: 50px;margin: 0;
......
......@@ -48,7 +48,7 @@
</el-col>
<el-col :lg="6" :md="12" :xs="24">
<ul style="text-align: right">
<li>Telephone:15606190026</li>
<li>Telephone:086-15606190026</li>
<li>E-mail:info@wdsfwuxicenter.com</li>
<li>
......
......@@ -103,6 +103,7 @@
<el-menu-item index="/about/wuDao">舞蹈节</el-menu-item>
<el-menu-item index="/about/culture">地方文化</el-menu-item>
</el-sub-menu>
<el-menu-item v-if="isLogin" index="/center/myInfo">个人中心</el-menu-item>
</el-menu>
<el-menu class="weiMenu"
v-if="language==1"
......@@ -337,9 +338,7 @@ function getCode() {
.home-menu .el-menu--horizontal > .el-menu-item{font-size: 15px}
}
@media (max-width: 1340px) {
.loginBtn {
display: none;
}
.home-menu .el-menu--horizontal > .el-menu-item{margin: 0; }
}
@media (max-width: 1250px) {
......@@ -354,7 +353,9 @@ function getCode() {
display: none;
}
.ropenbtn{display: block}
.loginBtn {
display: none;
}
}
</style>
......
......@@ -44,7 +44,7 @@
</el-row>
</el-col>
</el-row>
<el-alert v-if="n.reason" :title="language==0?'驳回理由:':'Reason:'+n.reason" type="error" show-icon :closable="false"/>
<el-alert v-if="n.reason" :title="language==0?'驳回理由:'+n.reason :'Reason:'+n.reason" type="error" show-icon :closable="false"/>
</div>
<el-empty :image="`/img/order_no.png`" :image-size="228" v-if="billList?.length == 0"/>
......
<template>
<div :style="`width: ${width}px`" class="mauto">
<img v-if="type == '晴'" src="@/assets/weather/01_sunny_color_w64.png"/>
<img v-if="type == '多云'" src="@/assets/weather/04_sun_cloudy_color_w64.png"/>
<img v-if="type == '阴'" src="@/assets/weather/03_cloud_color_w64.png"/>
<img v-if="type == '小雨'" src="@/assets/weather/09_light_rain_color_w64.png"/>
<img v-if="type == '中雨'" src="@/assets/weather/10_moderate_rain_color_w64.png"/>
<img v-if="type == '大雨'" src="@/assets/weather/12_rainstorm_color_w64.png"/>
<img v-if="type == '暴雨'" src="@/assets/weather/13_heavy_rainstorm_color_w64.png"/>
<img v-if="type.indexOf('雷') > -1" src="@/assets/weather/14_thunderstorm_color_w64.png"/>
<img v-if="type.indexOf('雾') > -1" src="@/assets/weather/15_fog_color_w64.png"/>
<img v-if="type.indexOf('雪') > -1" src="@/assets/weather/22_snow_color_w64.png"/>
<img v-if="type.indexOf('风') > -1" src="@/assets/weather/23_windy_color_w64.png"/>
</div>
</template>
<script setup>
const props = defineProps({
type: {
type: String,
default: '晴',
required: false
},
width: {
type: Number,
default: 32,
required: false
}
})
</script>
<style scoped lang="scss">
img{width: 100%}
</style>
......@@ -105,23 +105,12 @@
</template>
</el-calendar>
<div class="calendarList">
<ul>
<li>
<label>08:00~10:30</label> 无锡公开赛
</li>
<li>
<label>11:00</label> 2024年WDSF公开赛 A组
</li>
<li>
<label>12:00</label> 2024年WDSF公开赛 B组
</li>
<li>
<label>13:00</label> 2024年WDSF公开赛 C组
</li>
<li>
<label>15:00</label> 2024年WDSF公开赛 D组
</li>
</ul>
<!-- <ul>-->
<!-- <li v-for="n in 6">-->
<!-- <label>08:00~10:30</label> 无锡公开赛-->
<!-- </li>-->
<!-- </ul>-->
<el-empty style="--el-empty-padding:0;--el-empty-description-margin-top:0" :image="`/img/order_no.png`" :image-size="200"/>
</div>
</el-card>
......@@ -366,17 +355,65 @@
<div v-if="showgg" class="fixed_gg">
<!--天气-->
<el-icon @click="showgg=false">
<circle-close/>
</el-icon>
<img src="@/assets/dance/weather.png">
<el-icon class="cclose" @click.stop="showgg=false"><circle-close /></el-icon>
<!-- <img src="@/assets/dance/weather_en.png">-->
<div class="bg-lineg pd10">
<div class="smallToday" @click="popWeather">
<div>
<div class="type">
<weather-icon :type="weatherObj.forecast[0]?.type" :width="50"/>
</div>
</div>
<div>
<h3>无锡</h3>
<div class="wd_p">{{weatherObj.forecast[0]?.low.slice(2)}}~{{weatherObj.forecast[0]?.high.slice(2)}}</div>
</div>
</div>
<!-- <iframe width="150" scrolling="no" height="60" frameborder="0" allowtransparency="true" src="https://i.tianqi.com?c=code&id=84&color=%23FFFFFF&bgc=%23&icon=1&py=binhuqu&site=17"></iframe>-->
</div>
<el-dialog v-model="weatherdialog" width="540" :close-on-click-modal="true" :show-close="false"
style="--el-dialog-padding-primary:0;--el-dialog-border-radius:15px;
--el-dialog-bg-color:transparent;overflow: hidden;">
<div class="bg-lineg pd20">
<!-- <iframe width="500" scrolling="no" height="270" frameborder="0" allowtransparency="true" src="https://i.tianqi.com?c=code&id=95&color=%23FFFFFF&icon=4&py=binhuqu&site=15"></iframe>-->
<div class="weatherbox">
<div class="today">
<div>
<div class="wd">{{weatherObj.wendu}}°c</div>
<div class="wd_p">{{weatherObj.forecast[0]?.low.slice(2)}}~{{weatherObj.forecast[0]?.high.slice(2)}}</div>
<div class="week">{{weatherObj.forecast[0]?.week}}</div>
</div>
<div>
<div class="type">
<weather-icon :type="weatherObj.forecast[0].type" :width="64"/>
<!-- <div class="mt10">{{weatherObj.forecast[0].type}}</div>-->
</div>
</div>
</div>
<ul class="wlist">
<li v-for="n in weatherObj.forecast.slice(1,6)">
<div class="type">
<weather-icon :type="n.type" :width="32"/>
</div>
<div class="wd">{{n.low.slice(2,-1)}}/{{n.high.slice(2)}}</div>
<!-- <div class="date">{{n.ymd}}</div>-->
<div class="week">
{{n.week}}
</div>
</li>
</ul>
</div>
</div>
</el-dialog>
</div>
</div>
</template>
<script setup>
import {ref, nextTick, onMounted, watch} from 'vue'
import {getCurrentInstance} from '@vue/runtime-core'
import {getHomePage, getNewsListById, getNewsList} from '@/apiPc/webSite'
import {getHomePage, getNewsListById, getNewsList, getWeather} from '@/apiPc/webSite'
import {useRouter} from 'vue-router'
import {rankList} from '@/assets/js/data'
import _ from 'lodash'
......@@ -386,7 +423,7 @@ import {Autoplay, Navigation} from 'swiper'
import 'swiper/css'
import {dayjs} from 'element-plus'
import * as match from "@/apiPc/match";
import WeatherIcon from '@/viewsPc/components/weatherIcon'
const modules = [Autoplay, Navigation]
const navigationPic = ref({
nextEl: '.picnext',
......@@ -399,6 +436,9 @@ const isPlay = ref(false)
const canPrev = ref(false)
const canNext = ref(false)
const activeRankName = ref(0)
const weatherObj = ref({
forecast:[]
})
const time = ref(0)
const personList = ref([
{ name: 'Wolfgang Eliasch', pp: '拉丁舞裁判长 奥地利', src: '/img/1.png' },
......@@ -421,6 +461,7 @@ const livelist = ref([])
const matchData = ref({})
const maList = ref([])
const loading = ref(false)
const weatherdialog = ref(false)
const picList = ref([])
const calendarValue = ref(dayjs('2024-07-22').toDate())
const calendarRange = ref([dayjs('2024-07-21').toDate(), dayjs('2024-07-27').toDate()])
......@@ -472,6 +513,11 @@ const init = () => {
}
matchData.value = maList.value[0]
})
getWeather().then(res=>{
weatherObj.value = JSON.parse(res.data).data
console.log(weatherObj.value)
})
}
const carouselChange = (e) => {
console.log(e)
......@@ -508,6 +554,9 @@ const goMatch = (n) => {
path: `/match/list/${n.id}`
})
}
const popWeather = () => {
weatherdialog.value = true
}
</script>
<style scoped lang="scss">
......@@ -816,33 +865,6 @@ const goMatch = (n) => {
position: relative;
height: 400px;
}
.fixed_gg {
position: fixed;
right: 0;
top: 25%;
z-index: 10;
width: 200px;
.el-icon {
font-size: 0;
color: #fff;
transition: font-size 0.2s;
cursor: pointer;
position: absolute;
right: 0;
}
&:hover .el-icon {
font-size: 26px;
}
img {
width: 100%;
}
}
.ggbond {
height: 230px;
position: relative;
......
......@@ -108,24 +108,12 @@
</template>
</el-calendar>
<div class="calendarList">
<ul>
<li class="esp">
<label>08:00~10:30</label> Wuxi Open
</li>
<li class="esp">
<label>11:00</label> 2024 WDSF Open Group A
</li>
<li class="esp">
<label>12:00</label> 2024 WDSF Open Group B
</li>
<li class="esp">
<label>13:00</label> 2024 WDSF Open Group C
</li>
<li class="esp">
<label>15:00</label> 2024 WDSF Open Group D
</li>
</ul>
<!-- <ul>-->
<!-- <li class="esp" v-for="n in 6">-->
<!-- <label>08:00~10:30</label> 2024 WDSF Open Group B-->
<!-- </li>-->
<!-- </ul>-->
<el-empty style="--el-empty-padding:0;--el-empty-description-margin-top:0" :image="`/img/order_no.png`" :image-size="200"/>
</div>
</el-card>
</el-col>
......@@ -369,16 +357,62 @@
<div v-if="showgg" class="fixed_gg">
<!--天气-->
<el-icon @click="showgg=false"><circle-close /></el-icon>
<img src="@/assets/dance/weather_en.png">
<el-icon class="cclose" @click.stop="showgg=false"><circle-close /></el-icon>
<div class="bg-lineg pd20">
<div class="smallToday" @click="popWeather">
<div>
<div class="type">
<weather-icon :type="weatherObj.forecast[0]?.type" :width="50"/>
</div>
</div>
<div>
<h3>WUXI</h3>
<div class="wd_p">{{weatherObj.forecast[0]?.low.slice(2)}}~{{weatherObj.forecast[0]?.high.slice(2)}}</div>
</div>
</div>
</div>
<el-dialog v-model="weatherdialog" width="540" :close-on-click-modal="true"
style="--el-dialog-padding-primary:0;--el-dialog-border-radius:15px;
--el-dialog-bg-color:transparent;overflow: hidden;">
<div class="bg-lineg pd20">
<!-- <iframe width="500" scrolling="no" height="270" frameborder="0" allowtransparency="true" src="https://i.tianqi.com?c=code&id=95&color=%23FFFFFF&icon=4&py=binhuqu&site=15"></iframe>-->
<div class="weatherbox">
<div class="today">
<div>
<div class="wd">{{weatherObj.wendu}}°c</div>
<div class="wd_p">{{weatherObj.forecast[0]?.low.slice(2)}}~{{weatherObj.forecast[0]?.high.slice(2)}}</div>
<div class="week">{{weatherObj.forecast[0]?.week}}</div>
</div>
<div>
<div class="type">
<weather-icon :type="weatherObj.forecast[0].type" :width="64"/>
</div>
</div>
</div>
<ul class="wlist">
<li v-for="n in weatherObj.forecast.slice(1,6)">
<div class="type">
<weather-icon :type="n.type" :width="32"/>
</div>
<div class="wd">{{n.low.slice(2,-1)}}/{{n.high.slice(2)}}</div>
<!-- <div class="date">{{n.ymd}}</div>-->
<div class="week">
{{n.week=='星期一'?'Mon':n.week=='星期二'?'Tue':n.week=='星期三'?'Wed':n.week=='星期四'?'Thu':n.week=='星期五'?'Fri':n.week=='星期六'?'Sat':n.week=='星期日'?'Sun':''}}
</div>
</li>
</ul>
</div>
</div>
</el-dialog>
</div>
</div>
</template>
<script setup>
import { ref, nextTick, onMounted, watch } from 'vue'
import { getCurrentInstance } from '@vue/runtime-core'
import { getNewsListById, getNewsList } from '@/apiPc/webSite'
import { getNewsListById, getNewsList,getWeather} from '@/apiPc/webSite'
import { useRouter } from 'vue-router'
import WeatherIcon from '@/viewsPc/components/weatherIcon'
import _ from 'lodash'
import { Swiper, SwiperSlide } from 'swiper/vue'
import { Autoplay, Navigation } from 'swiper'
......@@ -394,6 +428,10 @@ const navigationPic = ref({
const router = useRouter()
const { proxy } = getCurrentInstance()
const time = ref(0)
const weatherObj = ref({
forecast:[]
})
const weatherdialog = ref(false)
const personList = ref([
{ name: 'Wolfgang Eliasch', pp: 'Chairperson for Latin AUT', src: '/img/1.png' },
{ name: 'Nenad Jeftic', pp: 'Chairperson for Standard SRB', src: '/img/2.png' },
......@@ -456,6 +494,10 @@ const init = () => {
}
matchData.value = maList.value[0]
})
getWeather().then(res=>{
weatherObj.value = JSON.parse(res.data).data
console.log(weatherObj.value)
})
}
......@@ -490,6 +532,10 @@ const goMatch = (n) => {
path: `/match/list/${n.id}`
})
}
const popWeather = () => {
weatherdialog.value = true
}
</script>
<style scoped lang="scss">
......@@ -665,20 +711,6 @@ const goMatch = (n) => {
}
.fixed_gg {
position: fixed;right: 0;
top: 25%;
z-index: 10;
width: 200px;
.el-icon{font-size: 0;color: #fff;
transition: font-size 0.2s;cursor: pointer;
position: absolute;right: 0;}
&:hover .el-icon{font-size: 26px;}
img {
width: 100%;
}
}
.ggbond {
height: 230px;
position: relative;
......
......@@ -196,7 +196,6 @@ import dialogEditWdsf from './components/addWdsf'
import dialogEditAccompany from './components/addAccompany'
import dialogAllSportsmanList from './components/allSportsmanList'
import dialogExtraForm from './components/extraForm'
import dialogMates from './components/dialogMates'
import {Search, Switch} from "@element-plus/icons-vue";
const {proxy} = getCurrentInstance()
......
......@@ -7,67 +7,53 @@
<el-card :body-style="{'padding-top': '0'}">
<el-row class="mt20" :gutter="20">
<el-col :lg="8">
<el-col :lg="24">
<div class="panel border">
<div class="panel-header ">
<h3 class="panel-title" v-if="language==0">选择参赛运动员清单</h3>
<h3 class="panel-title" v-else>Select list of participating athletes</h3>
<a class="fr" @click="emptyChoosed">{{ language == 0 ? '清空' : 'Empty' }}</a>
<!-- <a class="fr" @click="emptyChoosed">{{ language == 0 ? '清空' : 'Empty' }}</a>-->
<el-button type="primary" plain class="fr" @click="chooseSportman">选手管理</el-button>
</div>
<div class="panel-body" style="padding: 10px">
<div style="margin: 0 4px 10px">
<el-input size="small" v-model="athletesQuery.name" :prefix-icon="Search"
@change="queryAthletes"
clearable/>
</div>
<div class="noPicChooseForm" id="chooseArr">
<el-checkbox-group v-model="choosedchoosed" @change="changechoosed">
<el-button id="addRef" plain @click="chooseSportman">+{{ language == 0 ? '选择' : 'add' }}</el-button>
<el-checkbox v-for="c in choosedListBak" :value="c.id" border>
<p class="name">{{ c.realName }}
<!-- ({{ c.sexStr }})-->
<div style="margin: 0 4px 10px;display: flex">
<el-select multiple v-model="choosedchoosed" collapse-tags-tooltip filterable
@change="changechoosed">
<el-option v-for="c in athletesList" :key="c.id" :label="c.xing + c.ming" :value="c.id">
<div class="flexOption">
{{ c.xing }}{{ c.ming }}
<img v-if="c.sex=='0'" src="@/assets/img/female.png"/>
<img v-if="c.sex=='1'" src="@/assets/img/male.png"/>
</p>
</el-checkbox>
</el-checkbox-group>
</div>
</div>
</div>
</el-col>
<el-col :lg="8">
<div class="panel border">
<div class="panel-header ">
<h3 class="panel-title" v-if="language==0">选择一个参赛组合</h3>
<h3 class="panel-title" v-else>Select a Participating team</h3>
<a class="fr" @click="emptyChangechoosed">{{ language == 0 ? '清空' : 'Empty' }}</a>
</div>
<div class="panel-body" style="padding: 10px">
<div class="mb20">
<el-input size="small" v-model="zuQuery.name" :prefix-icon="Search"
@change="queryTeam" clearable/>
<!-- ({{ c.sexStr }})-->
-{{ c.age }}
</div>
<div class="chooseForm">
<el-checkbox-group v-model="choosedchoosed" @change="changechoosed">
<!-- v-show="choosedchoosed.indexOf(c.id) !== -1"-->
<el-checkbox v-for="c in choosed2Listbak" :value="c.id" checked>
<el-avatar fit="cover" v-if="c.picUrl" :size="60" :src="fillImgUrl(c.picUrl)"/>
<el-avatar fit="cover" v-else-if="c.sex == 0" :size="60" src="/img/head1.png"/>
<el-avatar fit="cover" v-else-if="c.sex == 1" :size="60" src="/img/head0.png"/>
<p class="name">{{ c.realName }}
<img v-if="c.sex=='0'" src="@/assets/img/female.png"/>
<img v-if="c.sex=='1'" src="@/assets/img/male.png"/>
<!-- <el-icon @click.stop="editPerson(c.id)">-->
<!-- <Edit/>-->
<!-- </el-icon>-->
</p>
</el-checkbox>
</el-checkbox-group>
</el-option>
<template #tag>
<el-tag v-for="v in choosed2List" :key="v.value" type="primary">
{{ v.xing + v.ming }}
</el-tag>
</template>
</el-select>
<el-button type="primary" @click="emptychoosedchoosed">{{
language == 0 ? '重选' : 'Re-select'
}}
</el-button>
</div>
<!-- <div class="noPicChooseForm" id="chooseArr">-->
<!-- <el-checkbox-group v-model="choosedchoosed" @change="changechoosed">-->
<!-- <el-checkbox v-for="c in choosedListBak" :value="c.id" border>-->
<!-- <p class="name">{{ c.xing }}{{c.ming}}-->
<!-- &lt;!&ndash; ({{ c.sexStr }})&ndash;&gt;-->
<!-- <img v-if="c.sex=='0'" src="@/assets/img/female.png"/>-->
<!-- <img v-if="c.sex=='1'" src="@/assets/img/male.png"/>-->
<!-- </p>-->
<!-- </el-checkbox>-->
<!-- </el-checkbox-group>-->
<!-- </div>-->
</div>
</div>
</el-col>
<el-col :lg="8">
<el-col :lg="24">
<div class="panel border">
<div class="panel-header ">
<h3 class="panel-title" v-if="language==0">可参与报名的项目</h3>
......@@ -78,7 +64,7 @@
clearable/>
</div>
</div>
<div v-loading="loadingProject" id="projectbox" style="height: 60vh;overflow: auto;">
<div v-loading="loadingProject" id="projectbox" style="height: 50vh;overflow: auto;">
<el-checkbox-group v-model="projectIds" @change="changeProject">
<el-checkbox class="flexBetweenBox" v-for="c in projectList" :value="c.id" :key="c.id">
<div class="flexBetween w100">
......@@ -107,12 +93,12 @@
</el-col>
</el-row>
</el-card>
<!-- <el-button type="success" @click="importSportman">批量导入人员</el-button>-->
<!-- <el-button type="success" @click="addCoach">新增运动员</el-button>-->
<el-card class="mt20" :body-style="{'padding': '0'}">
<coach-info-row :match-id="matchId" :group-id="groupId" :language="language"/>
<div class="m20">
<!-- <el-button type="success" @click="importSportman">批量导入人员</el-button>-->
<!-- <el-button type="success" @click="addCoach">新增运动员</el-button>-->
<div class="ttbb">
<div :class="tableType==1 ? 'active' : ''" @click="switchTabletype">
{{ language == 0 ? '按组别查看报项' : 'View Entries by Group' }}
......@@ -158,7 +144,7 @@
</el-dialog>
<dialogExtraForm ref="popExtraForm" @submitForm="getSignInfoList"/>
<dialogWdsf ref="popWdsf" @submitForm="getSignInfoList"/>
<dialogWdsf ref="popWdsf" @submitForm="getProjectList" @cancel="removeCurproject"/>
<el-tour v-model="openTour" :current="tourCurrent">
<el-tour-step target="#addRef" title="第一步" description="点击选择运动员" :next-button-props="nextButtonProps"/>
<el-tour-step v-if="choosedList.length>0" target="#chooseArr" title="第二步" description="勾选报项运动员"/>
......@@ -178,6 +164,7 @@ import DialogImport from './components/import'
import DialogExtraForm from './components/extraForm'
import DialogWdsf from './components/wdsfForm'
import {Search, Switch} from "@element-plus/icons-vue";
const {proxy} = getCurrentInstance()
const router = useRouter()
const route = useRoute()
......@@ -190,14 +177,16 @@ import SignInfoTable from "@/viewsPc/match/components/signInfo-table"
import ZuTable from '@/viewsPc/match/components/zu-table'
import {signgetSignInfoConflict} from "@/apiPc/match";
import {useStorage} from "@vueuse/core/index";
const language= useStorage('language',0)
const language = useStorage('language', 0)
const data = reactive({
coachForm: {}, activeStep: 2,
tourCurrent:0,
tourCurrent: 0,
tableData: [],
signInfoList: [],
zuTableList: [],
choosedList: [],
athletesList: [],
choosedListBak: [],
athletesQuery: {
name: ''
......@@ -223,12 +212,36 @@ const data = reactive({
choosed2List: [],
choosed2Listbak: [],
projectQuery: {}, tableType: 1,
openTour:false
currProjectId: '',
openTour: false
})
const {
activeTeam, names, tableData, signInfoList, zuTableList, choosedList,choosedListBak,
extraform, groupId, signType, coachOrLeaderFlag, showResult, noPhotoCanSign, projectIds, choosedchoosed, activeStep, projectList, choosed2List,choosed2Listbak, loadingProject,
projectQuery, tableType, athletesQuery, zuQuery,openTour,tourCurrent
activeTeam,
names,
tableData,
signInfoList,
zuTableList,
choosedList,
choosedListBak,
athletesList,
extraform,
groupId,
signType,
coachOrLeaderFlag,
showResult,
noPhotoCanSign,
projectIds,
choosedchoosed,
activeStep,
projectList,
choosed2List,
choosed2Listbak,
loadingProject,
projectQuery,
tableType,
zuQuery,
openTour, currProjectId,
tourCurrent
} = toRefs(data)
const nextButtonProps = ref({})
const matchId = ref(route.query.matchId)
......@@ -238,11 +251,19 @@ onMounted(() => {
getSignInfoList()
getMatch(matchId.value)
getMySignInfo()
getAthletesList()
// openTour.value = true
})
let chargeFlag
function getAthletesList() {
// athletesList.value
match.getGroupPersonList({label: '0'}, groupId.value).then(res => {
athletesList.value = res.rows
})
}
function getMatch(id) {
match.getMatchById({
id: id
......@@ -328,6 +349,11 @@ function goPrev() {
})
}
function emptychoosedchoosed() {
choosedchoosed.value = []
choosed2List.value = []
}
function chooseSportman() {
const params = {
title: language.value == 0 ? '选择运动员' : 'Participating athletes',
......@@ -345,17 +371,16 @@ function chooseSportman() {
function changechoosed(e) {
// console.log(e)
choosed2List.value = []
choosed2Listbak.value = []
for (var c of choosedList.value) {
for (var c of athletesList.value) {
if (choosedchoosed.value.indexOf(c.id) > -1) {
choosed2List.value.push(c)
choosed2Listbak.value.push(c)
}
}
getProjectList()
}
function getProjectList() {
console.log(choosedchoosed.value)
projectIds.value = []
if (choosedchoosed.value.length == 0) {
projectList.value = []
......@@ -370,42 +395,18 @@ function getProjectList() {
match.getProjectPageByPerIds(obj).then(res => {
projectList.value = res.rows
loadingProject.value = false
if(choosed2Listbak.value.length>0 && projectList.value.length>0){
tourCurrent.value = 2
}
}).catch(err => {
loadingProject.value = false
ElMessage.warning(err.msg)
})
}
function queryAthletes() {
choosedListBak.value = []
for (var t of choosedList.value) {
if (t.realName.indexOf(athletesQuery.value.name) > -1) {
// 筛选
choosedListBak.value.push(t)
}
}
}
function queryTeam() {
choosed2Listbak.value = []
choosedchoosed.value = []
for (var t of choosed2List.value) {
if (t.realName.indexOf(zuQuery.value.name) > -1) {
// 筛选
choosed2Listbak.value.push(t)
choosedchoosed.value.push(t.id)
}
}
}
function getChoosed(list) {
console.log(list)
choosedList.value = list
choosedListBak.value = list
if(list.length>0){
if (list.length > 0) {
// openTour.value = false
tourCurrent.value = 1
}
......@@ -420,12 +421,12 @@ function addCoach() {
}).then(res => {
if (res.msg.indexOf('Exception:') > -1) {
const msg = res.msg.slice(10)
ElMessageBox.confirm(msg, '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
ElMessageBox.confirm(msg, language.value == 0 ? '提示' : 'Tips', {
confirmButtonText: language.value == 0 ? '确定' : 'Confirm',
cancelButtonText: language.value == 0 ? '取消' : 'Cancel',
type: 'warning'
}).then(() => {
console.log('用户点击确定')
console.log('Confirm')
})
return
}
......@@ -433,26 +434,13 @@ function addCoach() {
})
}
const params = {
title: '新增运动员',
title: language.value == 0 ? '提新增运动员' : 'Add',
id: 0,
groupId: groupId.value
}
proxy.$refs['dialogAddCoachRef'].open(params)
}
function emptyChoosed() {
choosedList.value = []
choosedListBak.value = []
}
function emptyChangechoosed() {
choosedchoosed.value = []
choosed2List.value = []
choosed2Listbak.value = []
projectList.value = []
projectIds.value = []
}
function signUp() {
if (projectIds.value.length == 0) {
return
......@@ -468,7 +456,6 @@ function signUp() {
match.sportsmanDone(obj).then(res => {
choosedchoosed.value = []
choosed2List.value = []
choosed2Listbak.value = []
projectList.value = []
projectIds.value = []
getSignInfoList()
......@@ -476,14 +463,15 @@ function signUp() {
}
function removeThis(id) {
ElMessageBox.confirm('确定移除这条报项吗?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
ElMessageBox.confirm(language.value == 0 ? '确定移除这条报项吗?' : 'Are you sure to remove this report item',
language.value == 0 ? '提示' : 'Tips', {
confirmButtonText: language.value == 0 ? '确定' : 'Confirm',
cancelButtonText: language.value == 0 ? '取消' : 'Cancel',
type: 'warning'
}).then(() => {
match.deleteSign(id).then(res => {
// 重新获取已报名信息
ElMessage.success('已移除该报项')
ElMessage.success(language.value == 0 ? '已移除该报项' : 'success')
getSignInfoList()
})
})
......@@ -527,7 +515,7 @@ const goPersonInfo = (row) => {
console.log(row)
// debugger
const params = {
matchId:matchId.value,
matchId: matchId.value,
title: language.value == 0 ? '完善补充信息' : 'Complete the supplementary information',
participantsInfoArr: extraform.value,
personId: row.personInfo.id,
......@@ -559,45 +547,69 @@ function switchTabletype() {
}
}
watch(projectIds, (newVal, oldVal) => {
console.log(projectIds.value)
if (newVal.length > oldVal.length) {
currProjectId.value = _.last(newVal)
} else {
currProjectId.value = ''
}
})
function changeProject(e) {
console.log(projectIds.value,e)
var obj
console.log(projectIds.value, e)
var obj = {}
obj = _.find(projectList.value, (c) => {
return e.indexOf(c.id)>-1
return e.indexOf(c.id) > -1
})
// if(obj.majorFlag==1){
//需要填wdsf
// const params = {
// title: '验证WDSF',
// list:choosed2Listbak.value
// }
// proxy.$refs['popWdsf'].open(_.cloneDeep(params))
// }
//循环choosed2List 检查是否存在WDSF号
let n = 0
for(var cc of choosed2List.value){
if(!cc.wdsf){
n++
}
}
//obj需要wdsf 且 currProjectId非空
if (obj.checkMemberFlag == '1'&&currProjectId.value != ''&& n>0) {
const params = {
title: '验证WDSF',
groupId: groupId.value,
matchId: matchId.value,
list: choosed2List.value
}
proxy.$refs['popWdsf'].open(_.cloneDeep(params))
}
}
function removeCurproject() {
// projectIds.value
projectIds.value = _.without(projectIds.value, currProjectId.value)
}
watch(choosedchoosed, (newVal, oldVal) => {
// console.log(choosedchoosed.value)
if(newVal.length>oldVal.length){
if (newVal.length > oldVal.length) {
match.signgetSignInfoConflict({
cptId: matchId.value,
perId: _.last(newVal),
groupId: groupId.value
}).then(res => {
if(!res.data){
ElMessage.warning(language.value==0?'该人员已在其他团队中报名,请重新选择':'This person has already registered in another team, please select again')
choosedchoosed.value = _.without(choosedchoosed.value,_.last(newVal))
if (!res.data) {
ElMessage.warning(language.value == 0 ? '该人员已在其他团队中报名,请重新选择' : 'This person has already registered in another team, please select again')
choosedchoosed.value = _.without(choosedchoosed.value, _.last(newVal))
for(var c of choosed2List.value){
if(c.id == _.last(newVal)){
choosed2List.value = _.without(choosed2List.value,c)
for (var c of choosed2List.value) {
if (c.id == _.last(newVal)) {
choosed2List.value = _.without(choosed2List.value, c)
}
}
for(var c of choosed2Listbak.value){
if(c.id == _.last(newVal)){
choosed2Listbak.value = _.without(choosed2Listbak.value,c)
for (var c of choosed2Listbak.value) {
if (c.id == _.last(newVal)) {
choosed2Listbak.value = _.without(choosed2Listbak.value, c)
}
}
projectList.value = []
console.log(choosedchoosed.value,choosed2List.value,choosed2Listbak.value)
console.log(choosedchoosed.value, choosed2List.value, choosed2Listbak.value)
return
} else {
getProjectList()
......@@ -616,7 +628,8 @@ watch(choosedchoosed, (newVal, oldVal) => {
.flexBetweenBox {
width: 100%;
height: auto;margin-right: 0;
height: auto;
margin: 0;
border-bottom: 1px solid #eee;
padding: 0 10px;
}
......@@ -625,7 +638,7 @@ watch(choosedchoosed, (newVal, oldVal) => {
background: #FAFBFD;
}
.flexBetween {white-space: normal;
.flexBetween {
padding: 10px;
border-left: 1px solid #eee;
......@@ -799,4 +812,13 @@ watch(choosedchoosed, (newVal, oldVal) => {
margin-left: 4px;
}
}
.flexOption {
display: flex;
align-items: center;
img {
height: 18px;
}
}
</style>
......
......@@ -7,26 +7,22 @@
<el-card :body-style="{'padding-top': '0'}">
<el-row class="mt20" :gutter="20">
<el-col :lg="12">
<el-col :lg="8">
<div class="panel border">
<div class="panel-header ">
<h3 class="panel-title" v-if="language==0">选择参赛运动员清单</h3>
<h3 class="panel-title" v-else>Select list of participating athletes</h3>
<!-- <a class="fr" @click="emptyChoosed">{{ language == 0 ? '清空' : 'Empty' }}</a>-->
<el-button type="primary" style="color: #fff" class="fr" @click="chooseSportman">选手管理</el-button>
<a class="fr" @click="emptyChoosed">{{ language == 0 ? '清空' : 'Empty' }}</a>
</div>
<div class="panel-body" style="padding: 10px">
<div style="margin: 0 4px 10px">
<el-select multiple v-model="choosedchoosed" collapse-tags-tooltip filterable
@change="getProjectList">
<el-option v-for="c in athletesList" :key="c.id" :label="c.realName" :value="c.id" >
{{c.realName}}({{c.sexStr}})-{{c.age}}
</el-option>
</el-select>
<el-button type="primary" @change="emptychoosedchoosed">重选</el-button>
<el-input size="small" v-model="athletesQuery.name" :prefix-icon="Search"
@change="queryAthletes"
clearable/>
</div>
<div class="noPicChooseForm" id="chooseArr">
<el-checkbox-group v-model="choosedchoosed" @change="changechoosed">
<el-button id="addRef" plain @click="chooseSportman">+{{ language == 0 ? '选择' : 'add' }}</el-button>
<el-checkbox v-for="c in choosedListBak" :value="c.id" border>
<p class="name">{{ c.realName }}
<!-- ({{ c.sexStr }})-->
......@@ -39,7 +35,39 @@
</div>
</div>
</el-col>
<el-col :lg="12">
<el-col :lg="8">
<div class="panel border">
<div class="panel-header ">
<h3 class="panel-title" v-if="language==0">选择一个参赛组合</h3>
<h3 class="panel-title" v-else>Select a Participating team</h3>
<a class="fr" @click="emptyChangechoosed">{{ language == 0 ? '清空' : 'Empty' }}</a>
</div>
<div class="panel-body" style="padding: 10px">
<div class="mb20">
<el-input size="small" v-model="zuQuery.name" :prefix-icon="Search"
@change="queryTeam" clearable/>
</div>
<div class="chooseForm">
<el-checkbox-group v-model="choosedchoosed" @change="changechoosed">
<!-- v-show="choosedchoosed.indexOf(c.id) !== -1"-->
<el-checkbox v-for="c in choosed2Listbak" :value="c.id" checked>
<el-avatar fit="cover" v-if="c.picUrl" :size="60" :src="fillImgUrl(c.picUrl)"/>
<el-avatar fit="cover" v-else-if="c.sex == 0" :size="60" src="/img/head1.png"/>
<el-avatar fit="cover" v-else-if="c.sex == 1" :size="60" src="/img/head0.png"/>
<p class="name">{{ c.realName }}
<img v-if="c.sex=='0'" src="@/assets/img/female.png"/>
<img v-if="c.sex=='1'" src="@/assets/img/male.png"/>
<!-- <el-icon @click.stop="editPerson(c.id)">-->
<!-- <Edit/>-->
<!-- </el-icon>-->
</p>
</el-checkbox>
</el-checkbox-group>
</div>
</div>
</div>
</el-col>
<el-col :lg="8">
<div class="panel border">
<div class="panel-header ">
<h3 class="panel-title" v-if="language==0">可参与报名的项目</h3>
......@@ -170,7 +198,6 @@ const data = reactive({
signInfoList: [],
zuTableList: [],
choosedList: [],
athletesList: [],
choosedListBak: [],
athletesQuery: {
name: ''
......@@ -199,7 +226,7 @@ const data = reactive({
openTour:false
})
const {
activeTeam, names, tableData, signInfoList, zuTableList, choosedList,choosedListBak,athletesList,
activeTeam, names, tableData, signInfoList, zuTableList, choosedList,choosedListBak,
extraform, groupId, signType, coachOrLeaderFlag, showResult, noPhotoCanSign, projectIds, choosedchoosed, activeStep, projectList, choosed2List,choosed2Listbak, loadingProject,
projectQuery, tableType, athletesQuery, zuQuery,openTour,tourCurrent
} = toRefs(data)
......@@ -211,18 +238,11 @@ onMounted(() => {
getSignInfoList()
getMatch(matchId.value)
getMySignInfo()
getAthletesList()
// openTour.value = true
})
let chargeFlag
function getAthletesList() {
// athletesList.value
match.getGroupPersonList({}, groupId.value).then(res => {
athletesList.value = res.rows
})
}
function getMatch(id) {
match.getMatchById({
id: id
......@@ -307,9 +327,7 @@ function goPrev() {
}
})
}
function emptychoosedchoosed() {
choosedchoosed.value = []
}
function chooseSportman() {
const params = {
title: language.value == 0 ? '选择运动员' : 'Participating athletes',
......@@ -345,11 +363,9 @@ function getProjectList() {
}
loadingProject.value = true
//根据已选人员id 获取项目列表
var obj = {
cptId: matchId.value,
perIds: choosedchoosed.value.toString()
}
match.getProjectPageByPerIds(obj).then(res => {
projectQuery.value.cptId = matchId.value
projectQuery.value.perIds = choosedchoosed.value.toString()
match.getProjectPageByPerIds(projectQuery.value).then(res => {
projectList.value = res.rows
loadingProject.value = false
if(choosed2Listbak.value.length>0 && projectList.value.length>0){
......@@ -361,6 +377,15 @@ function getProjectList() {
})
}
function queryAthletes() {
choosedListBak.value = []
for (var t of choosedList.value) {
if (t.realName.indexOf(athletesQuery.value.name) > -1) {
// 筛选
choosedListBak.value.push(t)
}
}
}
function queryTeam() {
choosed2Listbak.value = []
......@@ -413,6 +438,19 @@ function addCoach() {
proxy.$refs['dialogAddCoachRef'].open(params)
}
function emptyChoosed() {
choosedList.value = []
choosedListBak.value = []
}
function emptyChangechoosed() {
choosedchoosed.value = []
choosed2List.value = []
choosed2Listbak.value = []
projectList.value = []
projectIds.value = []
}
function signUp() {
if (projectIds.value.length == 0) {
return
......@@ -443,7 +481,7 @@ function removeThis(id) {
}).then(() => {
match.deleteSign(id).then(res => {
// 重新获取已报名信息
ElMessage.success('已移除该报项')
ElMessage.success(language.value == 0 ? '已移除该报项' : 'success')
getSignInfoList()
})
})
......@@ -526,12 +564,12 @@ function changeProject(e) {
return e.indexOf(c.id)>-1
})
// if(obj.majorFlag==1){
//需要填wdsf
// const params = {
// title: '验证WDSF',
// list:choosed2Listbak.value
// }
// proxy.$refs['popWdsf'].open(_.cloneDeep(params))
// 需要填wdsf
const params = {
title: '验证WDSF',
list:choosed2Listbak.value
}
proxy.$refs['popWdsf'].open(_.cloneDeep(params))
// }
}
watch(choosedchoosed, (newVal, oldVal) => {
......@@ -576,7 +614,7 @@ watch(choosedchoosed, (newVal, oldVal) => {
.flexBetweenBox {
width: 100%;
height: auto;margin: 0;
height: auto;margin-right: 0;
border-bottom: 1px solid #eee;
padding: 0 10px;
}
......@@ -585,7 +623,7 @@ watch(choosedchoosed, (newVal, oldVal) => {
background: #FAFBFD;
}
.flexBetween {
.flexBetween {white-space: normal;
padding: 10px;
border-left: 1px solid #eee;
......
......@@ -24,7 +24,7 @@
<el-input v-model="form.ming"/>
</el-form-item>
<el-form-item :label="language==0?'证件类型':'ID type'" prop="idcType" required>
<el-select v-model="form.idcType" style="width: 100%;">
<el-select v-model="form.idcType" style="width: 100%;" :disabled="editgay">
<el-option
v-for="item in certificates"
:key="item.value"
......@@ -34,10 +34,10 @@
</el-select>
</el-form-item>
<el-form-item :label="language==0?'证件号码':'ID NO'" prop="idcCode" required>
<el-input v-model="form.idcCode" @blur="checkCode"/>
<el-input v-model="form.idcCode" @blur="checkCode" :disabled="editgay"/>
</el-form-item>
<el-form-item :label="language==0?'性别':'sex'" prop="sex">
<el-radio-group v-model="form.sex">
<el-radio-group v-model="form.sex" :disabled="form.idcType=='0'">
<el-radio value="0">{{ language==0?'女':'female' }}</el-radio>
<el-radio value="1">{{ language==0?'男':'male' }}</el-radio>
</el-radio-group>
......@@ -46,7 +46,7 @@
<el-col :lg="12">
<el-form-item :label="language==0?'出生日期':'birth'" prop="birth" required>
<el-date-picker
v-model="form.birth"
v-model="form.birth" :disabled="form.idcType=='0'"
style="width: 100%;"
type="date" format="YYYY-MM-DD" value-format="YYYY-MM-DD"
/>
......@@ -178,7 +178,7 @@ onMounted(() => {
getRegionsList()
})
let editgay = false
const editgay = ref(false)
const open = (params) => {
console.log(params.label)
show.value = true
......@@ -206,7 +206,7 @@ const open = (params) => {
})
} else {
if (params.id != 0) { // 编辑
editgay = true
editgay.value = true
match.getPersonInfoById(params.id).then(res => {
form.value = res.data
form.value.id = params.id
......@@ -215,6 +215,8 @@ const open = (params) => {
form.value.labelArr = form.value.label.split(',')
}
})
} else {
editgay.value = false
}
}
}
......@@ -332,7 +334,7 @@ function submitForm() {
emit('submitForm')
})
} else {
if (editgay) {
if (editgay.value) {
// id不是0
match.editPersonInfo(form.value).then(res => {
ElMessage.success(language.value == 0 ?'保存成功':'Save successful')
......
......@@ -14,7 +14,7 @@
<el-input v-model="query.realName" style="width: 120px;" clearable/>
</el-form-item>
<el-form-item :label="language==0?'证件类型':'ID Type'">
<el-select v-model="query.idcType" style="width: 100px;" clearable>
<el-select v-model="query.idcType" style="width: 100px;" clearable @change="getList">
<el-option
v-for="item in certificates"
:key="item.value"
......@@ -37,8 +37,8 @@
<p v-if="noPhotoCanSign == 0" class="text-danger">{{ language==0?'*需上传照片才可报名':'*Please upload photo before sign up' }}</p>
<el-table ref="allSportmenTable" v-loading="loading" :data="tableData" height="60vh"
@selection-change="handleSelectionChange">
<el-table-column type="selection" :label="language==0?'选择':'Selection'" :selectable="selectable"/>
<!-- <el-table-column type="index" :label="language==0?'序号':'Index'" :selectable="selectable"/>-->
<!-- <el-table-column type="selection" :label="language==0?'选择':'Selection'" :selectable="selectable"/>-->
<el-table-column type="index" :label="language==0?'序号':'Index'" width="50" :selectable="selectable"/>
<el-table-column :label="language==0?'姓氏':'Last Name'" prop="xing" min-width="100"/>
<el-table-column :label="language==0?'名':'First Name'" prop="ming" min-width="100"/>
<el-table-column :label="language==0?'所属国家':'Nationality'" prop="countryName" min-width="100"/>
......@@ -72,19 +72,19 @@
</template>
</el-table-column>
</el-table>
<!-- <paginationPc-->
<!-- v-show="total>0"-->
<!-- v-model:page="query.pageNum"-->
<!-- v-model:limit="query.pageSize"-->
<!-- :total="total"-->
<!-- @pagination="getList"-->
<!-- />-->
<template #footer>
<div class="dialog-footer text-center">
<el-button type="primary" @click="submit">{{language==0?'确定':'Confirm'}}</el-button>
<el-button @click="cancel">{{language==0?'取消':'Cancel'}}</el-button>
</div>
</template>
<paginationPc
v-show="total>0"
v-model:page="query.pageNum"
v-model:limit="query.pageSize"
:total="total"
@pagination="getList"
/>
<!-- <template #footer>-->
<!-- <div class="dialog-footer text-center">-->
<!-- <el-button type="primary" @click="submit">{{language==0?'确定':'Confirm'}}</el-button>-->
<!-- <el-button @click="cancel">{{language==0?'取消':'Cancel'}}</el-button>-->
<!-- </div>-->
<!-- </template>-->
</el-dialog>
<addCoach ref="dialogAddCoach" @submitForm="getList"/>
......@@ -104,7 +104,9 @@ const {proxy} = getCurrentInstance()
const emit = defineEmits([ 'transfer'])
const data = reactive({
query: {
label:'0'
label:'0',
pageSize: 10,
pageNum:1
},
tableData: [],
show: false,
......
<template>
<el-dialog
v-model="show" destroy-on-close :title="title" width="800px" append-to-body
draggable
:close-on-click-modal="false" @close="mateClose"
>
<div class="mb20">
<span v-if="mateConfig.minCount!=mateConfig.maxCount">请选择{{ mateConfig.minCount }}~{{
mateConfig.maxCount
}}个队友</span>
<span v-else-if="mateConfig.minCount=='-1'&&mateConfig.maxCount=='-1'">请至少选择1个队友</span>
<span v-else>请选择{{ mateConfig.minCount }}个队友</span>
<span v-if="mateConfig.minMaleCount!=-1||mateConfig.maxMaleCount!=-1" style="margin:0 20px;">男子:
<span v-show="mateConfig.minMaleCount!=mateConfig.maxMaleCount&&mateConfig.minMaleCount!=-1"> 最少{{ mateConfig.minMaleCount }}</span>
<span v-show="mateConfig.minMaleCount!=mateConfig.maxMaleCount&&mateConfig.maxMaleCount!=-1"> 最多{{ mateConfig.maxMaleCount }}</span>
<span v-show="mateConfig.minMaleCount==mateConfig.maxMaleCount&&mateConfig.maxMaleCount!=-1">{{ mateConfig.maxMaleCount }}</span>
</span>
<span v-if="mateConfig.minFemaleCount!=-1||mateConfig.maxFemaleCount!=-1" style="margin:0 20px;">女子:
<span v-show="mateConfig.minFemaleCount!=mateConfig.maxFemaleCount&&mateConfig.minFemaleCount>0"> 最少{{ mateConfig.minFemaleCount }}</span>
<span v-show="mateConfig.minFemaleCount!=mateConfig.maxFemaleCount&&mateConfig.maxFemaleCount>0"> 最多{{ mateConfig.maxFemaleCount }}</span>
<span v-show="mateConfig.minFemaleCount==mateConfig.maxFemaleCount&&mateConfig.minFemaleCount>0">{{ mateConfig.minFemaleCount }}</span>
</span>
</div>
<!-- <el-button v-if="teammateList.length<minCount" type="text" @click="addTeamMate">新增队友</el-button>-->
<el-empty v-if="teammateList.length==0" description="暂无可选队友" />
<div class="teammateList" style="max-height:60vh;overflow: auto;">
<el-checkbox-group v-model="form.mates" class="ml-4" @change="changeTeammates">
<el-checkbox disabled checked :label="personal.sex+'_'+personal.id" size="large">
<div class="optionFlex" style="width: auto;">
<el-avatar v-show="personal.picUrl" :size="40" :src="personal.picUrl" />
<p class="name" style="width: 200px">{{ personal.realName }}
<span v-show="personal.sex=='0'">(女)</span>
<span v-show="personal.sex=='1'">(男)</span>
</p>
<el-select v-show="sonLevelList.length>0" v-model="personal.sonlevel" clearable>
<el-option v-for="son in sonLevelList" :value="son.id" :label="son.name">{{ son.name }}</el-option>
</el-select>
</div>
</el-checkbox>
<div v-for="item in teammateList" :key="item.id" class="mb20">
<el-checkbox :label="item.sex+'_'+item.id" size="large" :disabled="item.cantchosemate">
<div class="optionFlex" style="width: auto;">
<el-avatar v-show="item.picUrl" :size="40" :src="item.picUrl" />
<p class="name" style="width: 200px">{{ item.realName }}
<span v-if="item.sex=='0'">(女)</span>
<span v-else>(男)</span>
</p>
<el-select v-show="sonLevelList.length>0" v-model="item.sonlevel" clearable>
<el-option v-for="son in sonLevelList" :value="son.id" :label="son.name">{{ son.name }}</el-option>
</el-select>
</div>
</el-checkbox>
<el-button v-if="noPhotoCanSign=='0'&&(!item.picUrl)" class="ml20" type="text" @click="editPersonInfo(item.id,nowMan.groupId)">
上传照片
</el-button>
</div>
</el-checkbox-group>
</div>
<template #footer>
<div class="dialog-footer text-center">
<el-button type="primary" @click="chooseMateDone">确定</el-button>
</div>
</template>
</el-dialog>
</template>
<script setup>
import { reactive, ref, toRefs, watch } from 'vue'
import { getCurrentInstance, nextTick, onMounted } from '@vue/runtime-core'
import * as match from '@/apiPc/match'
import { ElMessage } from 'element-plus'
const { proxy } = getCurrentInstance()
const emit = defineEmits(['submitForm'])
import dialogPersonInfo from '../components/addCoach'
import _ from 'lodash'
const data = reactive({
show: false,
title: '选择队友',
signType: '',
form: {
levelId: [],
mates: []
},
athletesList: [],
signProjectList: [],
signGroupList: [],
showMateList: false,
showBtn: false,
teammateList: [],
rankId: '0',
treeData: [],
loading: false,
mateConfig: {},
noPhotoCanSign: null,
coachOrLeaderFlag: null,
personal: {},
activeNames: [0]
})
const {
signType,
form,
rules,
loading,
activeNames,
athletesList,
show,
title,
personal,
rankId,
showMateList,
showBtn,
teammateList,
mateConfig,
noPhotoCanSign,
coachOrLeaderFlag
} = toRefs(data)
let matchId
let groupId
let levelId
let noLevelId
const open = (params) => {
show.value = true
matchId = params.matchId
levelId = params.levelId
groupId = params.groupId
signType.value = params.signType
title.value = params.title
rankId.value = params.rankId || ''
noPhotoCanSign.value = params.noPhotoCanSign
coachOrLeaderFlag.value = params.coachOrLeaderFlag
if (params.personal) {
form.value.manId = params.personal.id
personal.value = params.personal
}
if (groupId !== 0) {
}
getTeammate(levelId)
}
defineExpose({
open
})
const nowMan = ref({})
const sonLevelList = ref([])
let sonLevelIds = []
function editPersonInfo(id, groupId) {
const params = {
id: id,
groupId: groupId
}
proxy.$refs['editPersonInfoRef'].open(params)
}
function addTeamMate() {
const params = {
id: 0,
groupId: groupId
}
proxy.$refs['editPersonInfoRef'].open(params)
}
const getTeammate = (levelId) => {
const obj = {
levelId: levelId,
groupId: groupId,
personId: form.value.manId
}
match.getCanSignLevelPerson(obj).then(res => {
mateConfig.value = res.data
teammateList.value = res.data.personList
for (const p of teammateList.value) {
p.cantchosemate = false
if (mateConfig.value.maxMaleCount == 0 && p.sex == '1') {
p.cantchosemate = true
}
if (mateConfig.value.maxFemaleCount == 0 && p.sex == '0') {
p.cantchosemate = true
}
}
getSonLevels(levelId)
showMateList.value = true
form.value.mates = []
sonLevelIds = []
personal.value.sonlevel = ''
}).catch(error => {
})
}
function getSonLevels(level) {
sonLevelList.value = []
match.querySonLevel(level).then(res => {
sonLevelList.value = res.data
})
}
let manNum = 0
let femaleNum = 0
let mates = []
const changeTeammates = (e) => {
mates = []
manNum = 0
femaleNum = 0
for (const m of e) {
const arr = m.split('_')
mates.push(arr[1])
if (personal.value.id == arr[1]) {
continue
}
if (arr[0] == '1') {
manNum++
} else {
femaleNum++
}
}
// console.log(mates, mateConfig.value)
for (const p of teammateList.value) {
if (mateConfig.value.maxMaleCount != -1 && manNum == mateConfig.value.maxMaleCount && p.sex == '1' && mates.indexOf(p.id) == -1) {
p.cantchosemate = true
} else if (mateConfig.value.maxFemaleCount != -1 && femaleNum == mateConfig.value.maxFemaleCount && p.sex == '0' && mates.indexOf(p.id) == -1) {
p.cantchosemate = true
} else if (mates.indexOf(p.id) == -1 && mateConfig.value.maxCount != -1 && (mates.length - 1) == mateConfig.value.maxCount) {
p.cantchosemate = true
} else {
p.cantchosemate = false
}
}
}
const mateClose = () => {
mates = []
form.value.mates = []
sonLevelIds = []
teammateList.value = []
}
function chooseMateDone() {
if (mateConfig.value.minMaleCount != '-1' && manNum < mateConfig.value.minMaleCount) {
ElMessage.warning(`至少选择${mateConfig.value.minMaleCount}个男队友`)
return
}
if (mateConfig.value.maxMaleCount != '-1' && manNum > mateConfig.value.maxMaleCount) {
ElMessage.warning(`最多选择${mateConfig.value.maxMaleCount}个男队友`)
return
}
if (mateConfig.value.minFemaleCount != '-1' && femaleNum < mateConfig.value.minFemaleCount) {
ElMessage.warning(`至少选择${mateConfig.value.minFemaleCount}个女队友`)
return
}
if (mateConfig.value.maxFemaleCount != '-1' && femaleNum > mateConfig.value.maxFemaleCount) {
ElMessage.warning(`最多选择${mateConfig.value.maxFemaleCount}个女队友`)
return
}
if ((mates.length < mateConfig.value.minCount) && mateConfig.value.minCount > 0) {
ElMessage.warning(`至少选择${mateConfig.value.minCount}个队友`)
return
}
const athleteIds = []
console.log('mates', mates)
for (const p of teammateList.value) {
if (mates.indexOf(p.id) != -1) {
if (sonLevelList.value.length > 0 && !p.sonlevel) {
ElMessage.warning(`请分配级别`)
return
}
sonLevelIds.push(p.sonlevel)
athleteIds.push(p.id)
}
}
if (sonLevelList.value.length > 0 && !personal.value.sonlevel) {
ElMessage.warning(`请分配级别`)
return
}
sonLevelIds.push(personal.value.sonlevel)
athleteIds.push(personal.value.id)
if (sonLevelList.value.length == 0) {
sonLevelIds = []
}
const obj = {
levelId: noLevelId,
athleteIds: athleteIds.toString(),
sonLevelIds: sonLevelIds.toString() || '',
groupId: groupId,
teamId: rankId.value || ''
}
// 半提交
saveOne(obj)
}
const saveOne = (obj) => {
loading.value = true
match.sportsmanDone(obj).then(res => {
if (res.msg.indexOf('Exception:') > -1) {
const msg = res.msg.slice(10)
ElMessage({
type: 'warning',
message: msg
})
// form.value.mates = []
sonLevelIds = []
return
}
sonLevelIds = []
// form.value.mates = []
showMateList.value = false
sonLevelList.value = []
emit('submitForm')
}).catch(err => {
// 取消这个勾
sonLevelIds = []
})
}
</script>
<style lang="scss" scoped>
.optiontitle {
font-size: 14px;
padding: 0 10px;
line-height: 1;
margin: 10px 0;
border-left: 2px solid #1ab394;
}
.optionFlex {
display: flex;
align-items: center;
padding: 10px 0;
width: 200px;
.name {
margin: 0 20px;
font-size: 16px;
}
}
.el-radio-group {
width: 100%;
display: block;
}
.athleteBox {
height: 80px;
display: flex;
align-items: center;
:deep(.el-radio__label) {
display: flex;
align-items: center;
margin: 0 20px;
}
.el-radio__inner {
scale: 1.5;
}
.name {
margin: 0 20px;
font-size: 16px;
}
}
.athleteBox:hover {
background: #efefef;
}
.tip {
font-size: 13px;
color: #999;
margin: 10px 0;
i {
color: red;
margin: 0 4px 0 0;
}
}
p.title {
font-size: 16px;
margin: 0 0 15px;
}
:deep(.el-collapse-item) {
background: #FBFCFD;
margin: 0 0 16px;
padding: 0 15px;
}
:deep(.el-collapse-item__wrap) {
background: #FBFCFD;
border: none;
padding: 0 10px;
}
:deep(.el-collapse) {
border: none;
}
:deep(.el-collapse-item__header) {
border: none;
background: #ececec;
padding: 0 0 0 10px; font-size: 15px;
}
:deep(.el-collapse-item__content) {
padding-bottom: 0;
}
:deep(.el-checkbox__input.is-disabled+span.el-checkbox__label) {
color: #4C5359;
}
.fake-collapse-item {
background: #FBFCFD;
margin: 0 0 16px;
padding: 0 15px;
}
:deep(.el-checkbox.el-checkbox--large .el-checkbox__label){
font-size: 16px;
}
.teammateList :deep(.el-checkbox.el-checkbox--large) {
height: auto;
}
</style>
......@@ -62,6 +62,12 @@ function submit(res) {
proxy.$modal.msgError(`${res.data.repeatInFileColumn}${language.value == 0? '文件内重复' : 'Repeat In File'}`)
}
if(res.data.errIdcTypeColumn.length==0&&res.data.errSexColumn.length==0&&
res.data.incompleteColumn.length==0&&res.data.repeatInFileColumn.length==0&&
res.data.repeatInSystemColumn.length==0
){
proxy.$modal.msgSuccess(res.msg)
}
}
proxy.$refs['upload'].handleClear()
emit('submitForm')
......
<template>
<el-dialog
v-model="show" :title="title" width="500px" append-to-body :close-on-click-modal="false"
destroy-on-close
destroy-on-close @close="cancel"
>
<el-form label-width="120">
<el-form-item required :label="item.realName" v-for="item in list">
......@@ -35,7 +35,7 @@ import { ElMessage } from 'element-plus'
import { useRoute } from 'vue-router'
const { proxy } = getCurrentInstance()
const emit = defineEmits(['submitForm'])
const emit = defineEmits(['submitForm', 'cancel'])
const uploadUrl = ref('/upload/upLoadToFileServer')
const route = useRoute()
import {useStorage} from "@vueuse/core/index";
......@@ -58,6 +58,7 @@ const open = (params) => {
show.value = true
title.value = params.title
matchId = params.matchId
groupId.value= params.groupId
list.value = params.list
init()
}
......@@ -88,7 +89,7 @@ function checkCode(item) {
return
}
match.checkWdsf({card: item.wdsfMin}).then(res => {
match.checkNoRepeat({card: item.wdsfMin,groupId: groupId.value}).then(res => {
if(res.data.wdsfFlag=='0'){
if (language.value == 0) {
ElMessage.warning('验证失败,卡号不存在')
......@@ -103,13 +104,23 @@ function checkCode(item) {
})
}
function submitForm() {
//list.value
show.value = false
emit('submitForm')
var arr = []
for(var n of list.value){
arr.push({
id: n.id,
wdsfMin: n.wdsfMin
})
}
// match.saveWdsfMin(arr).then(res=>{
// show.value = false
// })
// emit('submitForm')
}
function cancel() {
show.value = false
emit('cancel')
}
</script>
......
......@@ -159,10 +159,10 @@ function getSignList() {
signInfoList.value = res.data.singleData
zuTableList.value = res.data.zuData
for(var s of signInfoList.value){
signTotal.value = signTotal.value + Number(s.insuranceFee)
signTotal.value = (Number(signTotal.value) + Number(s.insuranceFee)).toFixed(2)
}
for(var z of zuTableList.value){
zuTotal.value = zuTotal.value + Number(z.project.serviceFee)
zuTotal.value = (Number(zuTotal.value) + Number(z.project.serviceFee)).toFixed(2)
}
})
}
......
......@@ -21,25 +21,13 @@
</el-col>
<el-col :sm="24" :lg="12">
<div class="calendarList">
<ul>
<li>
<label>08:00~10:30</label> 无锡公开赛
</li>
<li>
<label>11:00</label> 2024年WDSF公开赛 A组
</li>
<li>
<label>12:00</label> 2024年WDSF公开赛 B组
</li>
<li>
<label>13:00</label> 2024年WDSF公开赛 C组
</li>
<li>
<label>15:00</label> 2024年WDSF公开赛 D组
</li>
</ul>
<!-- <ul>-->
<!-- <li v-for="n in schList">-->
<!-- <label>08:00~10:30</label> 无锡公开赛-->
<!-- </li>-->
<!-- </ul>-->
</div>
<el-empty :image="`/img/order_no.png`" :image-size="200"/>
</el-col>
</el-row>
......@@ -95,6 +83,7 @@ const years = ref([])
const currYear = ref(null)
const ztxPlanList = ref([])
const planList = ref([])
const schList = ref([])
const loading = ref(false)
const calendarValue = ref('2024-07-22')
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!