82c964d1 by zhangmeng

背号查询

1 parent edf10d93
......@@ -172,7 +172,7 @@ export function getquerySchedule2Pre(qy) {
export function queryScheduleSingle(qy) {
return request({
url: `/league/schedule/queryScheduleSingle`,
url: `/league/schedule/queryScheduleSingle/${qy.cptId}`,
method: 'get',
params: qy
})
......
......@@ -5,19 +5,22 @@
close-icon="CircleClose" destroy-on-close
width="460px"
>
<div style="min-height: 300px" v-loading="loading">
<div v-loading="loading" style="min-height: 300px">
<div v-if="!type||type==''">
<div @click="type='0'" class="rItem">{{ language==0?'按项目查询':'Query by project' }}</div>
<div @click="type='1'" class="rItem">{{ language==0?'按团队查询':'Query by team' }}</div>
<div @click="type='2'" class="rItem">{{ language==0?'按姓名查询':'Query by name' }}</div>
<div class="rItem" @click="type='0'">{{ language == 0 ? '按项目查询' : 'Query by project' }}</div>
<div class="rItem" @click="type='1'">{{ language == 0 ? '按团队查询' : 'Query by team' }}</div>
<div class="rItem" @click="type='2'">{{ language == 0 ? '按姓名查询' : 'Query by name' }}</div>
</div>
<div v-if="type=='0'">
<div class="flex mt30">
<el-input :placeholder="language==0?'输入项目/ 项目编号查询':'Enter project name or code to Query'" v-model="query" clearable
@enter="search" @blur="search" @empty="search"/>
<el-button @click="search" class="btn-lineG" style="color: #fff">{{
<el-input
v-model="query"
:placeholder="language==0?'输入项目/ 项目编号查询':'Enter project name or code to Query'" clearable
@blur="search" @empty="search" @enter="search"
/>
<el-button class="btn-lineG" style="color: #fff" @click="search">{{
language == 0 ? '查询' : 'Search'
}}
</el-button>
......@@ -25,57 +28,67 @@
<div v-if="list.length>0" class="mt30">
<el-timeline>
<el-timeline-item placement="top"
v-for="(form, index) in list" :key="index"
:timestamp="form.date + ' ' + form.timeStr"
<el-timeline-item
v-for="(form, index) in list"
:key="index" :timestamp="form.date + ' ' + form.timeStr"
placement="top"
>
<div class="text-primary">
<span v-if="language==1&&form.projectNameEn">{{ form.projectNameEn }}</span>
<span v-else-if="form.projectName">{{ form.projectName }}</span>
<span class="fr">{{form.changCi}} <i v-if="form.changCi">/ </i> {{language==0?form.lun:form.lunEn}} </span>
<span class="fr">{{ form.changCi }} <i
v-if="form.changCi"
>/ </i> {{ language == 0 ? form.lun : form.lunEn }} </span>
</div>
<div>{{form.danceType}}</div>
<div>{{form.address}}</div>
<div>{{ form.danceType }}</div>
<div>{{ form.address }}</div>
</el-timeline-item>
</el-timeline>
</div>
<div v-else>
<el-empty/>
<el-empty />
</div>
</div>
<div v-if="type=='1'">
<div class="flex mt20">
<el-input :placeholder="language==0?'请输入代表队名称至少两字符':'Enter the representing team name,At least two characters'"
v-model="query2" clearable
@enter="searchTeam" @blur="searchTeam" @empty="searchTeam"/>
<el-button @click="searchTeam" class="btn-lineG" style="color: #fff">
{{language == 0 ? '查询' : 'Search' }}
<el-input
v-model="query2"
:placeholder="language==0?'请输入代表队名称至少两字符':'Enter the representing team name,At least two characters'"
clearable
@blur="searchTeam" @empty="searchTeam" @enter="searchTeam"
/>
<el-button class="btn-lineG" style="color: #fff" @click="searchTeam">
{{ language == 0 ? '查询' : 'Search' }}
</el-button>
</div>
<span class="tip">*{{ language == 0 ?'模糊查询':'Fuzzy query' }}</span>
<div class="text-danger text-center" v-if="showGroupList">{{ language == 0 ?'找到多个团体':'Found multiple teams' }}</div>
<div class="groupList" v-if="showGroupList">
<span class="tip">*{{ language == 0 ? '模糊查询' : 'Fuzzy query' }}</span>
<div v-if="showGroupList" class="text-danger text-center">
{{ language == 0 ? '找到多个团体' : 'Found multiple teams' }}
</div>
<div v-if="showGroupList" class="groupList">
<ul>
<li v-for="(item, index) in groupList" @click="showDetail(item)" :key="index">{{item}}
<el-icon class="fr"><ArrowRight /></el-icon>
<li v-for="(item, index) in groupList" :key="index" @click="showDetail(item)">{{ item }}
<el-icon class="fr">
<ArrowRight />
</el-icon>
</li>
</ul>
</div>
<div v-if="teamlist.length>0" class="temell mt20">
<el-collapse accordion>
<el-collapse-item :name="index" :title="team[0].title" v-for="(team,index) in teamlist" :key="index">
<el-collapse-item v-for="(team,index) in teamlist" :key="index" :name="index" :title="team[0].title">
<el-timeline>
<el-timeline-item placement="top" v-for="(form, index) in team" :key="index">
<el-timeline-item v-for="(form, index) in team" :key="index" placement="top">
<div class="text-primary" style="position: relative;top:-15px">
{{ form.date + ' ' + form.timeStr + ' / '+form.address }}
{{ form.date + ' ' + form.timeStr + ' / ' + form.address }}
<span v-if="form.lunEn"> / {{ form.lunEn }}</span>
<span v-else-if="form.lun"> / {{ form.lun }}</span>
<span v-if="form.changCi "> / {{ language==0?'场次':'Session' }}{{ form.changCi }}</span>
<span v-if="form.changCi "> / {{ language == 0 ? '场次' : 'Session' }}{{ form.changCi }}</span>
</div>
<div class="tname" v-if="form.projectNameEn">{{ form.projectNameEn}}</div>
<div class="tname" v-if="form.projectName">{{ form.projectName }}</div>
<div>{{form.danceType}}</div>
<div v-if="form.projectNameEn" class="tname">{{ form.projectNameEn }}</div>
<div v-if="form.projectName" class="tname">{{ form.projectName }}</div>
<div>{{ form.danceType }}</div>
</el-timeline-item>
</el-timeline>
</el-collapse-item>
......@@ -85,33 +98,35 @@
<div v-if="type=='2'">
<div class="flex mt30">
<el-input :placeholder="language==0?'输入选手姓名查询':'Enter the name of the player to Query'"
v-model="query3" clearable
@enter="personalSearch" @blur="personalSearch" @empty="personalSearch"/>
<el-button @click="personalSearch" class="btn-lineG" style="color: #fff">{{
<el-input
v-model="query3"
:placeholder="language==0?'输入选手姓名查询':'Enter the name of the player to Query'" clearable
@blur="personalSearch" @empty="personalSearch" @enter="personalSearch"
/>
<el-button class="btn-lineG" style="color: #fff" @click="personalSearch">{{
language == 0 ? '查询' : 'Search'
}}
</el-button>
</div>
<div v-if="list.length>0" class="temell mt20">
<el-timeline>
<el-timeline-item placement="top" v-for="(team,j) in list" :key="j">
<div v-for="(form, index) in team" :key="index" v-show="index==0">
<el-timeline-item v-for="(team,j) in list" :key="j" placement="top">
<div v-for="(form, index) in team" v-show="index==0" :key="index">
<div class="text-primary" style="position: relative;top:-15px">
{{ form.date + ' ' + form.timeStr + ' / '+form.address }}
{{ form.date + ' ' + form.timeStr + ' / ' + form.address }}
<span v-if="form.lunEn"> / {{ form.lunEn }}</span>
<span v-else-if="form.lun"> / {{ form.lun }}</span>
<span v-if="form.changCi "> / {{ language==0?'场次':'Session' }}{{ form.changCi }}</span>
<span v-if="form.changCi "> / {{ language == 0 ? '场次' : 'Session' }}{{ form.changCi }}</span>
</div>
<div class="tname" v-if="form.projectNameEn">{{ form.projectNameEn}}</div>
<div class="tname" v-if="form.projectName">{{ form.projectName }}</div>
<div>{{form.danceType}}</div>
<div v-if="form.projectNameEn" class="tname">{{ form.projectNameEn }}</div>
<div v-if="form.projectName" class="tname">{{ form.projectName }}</div>
<div>{{ form.danceType }}</div>
</div>
<div v-for="(form, index) in team" :key="index" v-show="index>0" style="margin: 8px 0 0">
{{ form.date + ' ' + form.timeStr + ' / '+form.address }}
<div v-for="(form, index) in team" v-show="index>0" :key="index" style="margin: 8px 0 0">
{{ form.date + ' ' + form.timeStr + ' / ' + form.address }}
<span v-if="form.lunEn"> / {{ form.lunEn }}</span>
<span v-else-if="form.lun"> / {{ form.lun }}</span>
<span v-if="form.changCi "> / {{ language==0?'场次':'Session' }}{{ form.changCi }}</span>
<span v-if="form.changCi "> / {{ language == 0 ? '场次' : 'Session' }}{{ form.changCi }}</span>
</div>
</el-timeline-item>
</el-timeline>
......@@ -123,16 +138,16 @@
</template>
<script setup>
import {ref} from "vue";
import {ElMessage} from "element-plus";
import { ref } from 'vue'
import { ElMessage } from 'element-plus'
import {
getquerySchedule2Pre,
getqySchedule,
getqySchedule2,
getTeamBackNumber,
getTeamBackNumberPre, queryScheduleSingle
} from "@/apiPc/common";
import {useStorage} from "@vueuse/core/index";
} from '@/apiPc/common'
import { useStorage } from '@vueuse/core/index'
const language = useStorage('language', 0)
const show = ref(false)
......@@ -146,45 +161,49 @@ const query2 = ref('')
const query3 = ref('')
const type = ref('')
const showGroupList = ref(false)
const cptId = ref()
const search = () => {
if (!query.value) {
ElMessage.warning(language.value == 0 ? '请输入搜索关键词' : 'Enter project name or code to Query')
return
}
getqySchedule({projectName: query.value}).then(res => {
if (!res.data||res.data.length==0) {
getqySchedule({ projectName: query.value, cptId: cptId.value }).then(res => {
if (!res.data || res.data.length == 0) {
list.value = []
//提示 '未找到结果,请重新查询'
// 提示 '未找到结果,请重新查询'
ElMessage.warning(language.value == 0 ? '未找到结果,请重新查询' : 'No result')
return
}
list.value = res.data
}).catch(e => {
loading.value = false
})
}
const searchTeam = () => {
teamlist.value = []
if (!query2.value||query2.value.length < 2) {
if (!query2.value || query2.value.length < 2) {
ElMessage.warning(language.value == 0 ? '请输入代表队名称至少两字符' : 'Enter the representing team name,At least two characters')
return
}
loading.value = true
getquerySchedule2Pre({groupName: query2.value}).then(res => {
getquerySchedule2Pre({ groupName: query2.value, cptId: cptId.value }).then(res => {
loading.value = false
if (!res.data||res.data.length==0) {
if (!res.data || res.data.length == 0) {
groupList.value = []
//提示 '未找到结果,请重新查询'
// 提示 '未找到结果,请重新查询'
ElMessage.warning(language.value == 0 ? '未找到结果,请重新查询' : 'No result')
return
}
groupList.value = res.data
if(groupList.value.length==1){
if (groupList.value.length == 1) {
showDetail(groupList.value[0])
}
if(groupList.value.length>1){
if (groupList.value.length > 1) {
showGroupList.value = true
}
}).catch(e => {
loading.value = false
})
}
const personalSearch = () => {
......@@ -193,19 +212,20 @@ const personalSearch = () => {
return
}
loading.value = true
queryScheduleSingle({query: query3.value}).then(res => {
queryScheduleSingle({ query: query3.value, cptId: cptId.value }).then(res => {
loading.value = false
if (!res.data||res.data.length==0) {
if (!res.data || res.data.length == 0) {
list.value = []
//提示 '未找到结果,请重新查询'
// 提示 '未找到结果,请重新查询'
ElMessage.warning(language.value == 0 ? '未找到结果,请重新查询' : 'No result')
return
}
list.value = res.data
})
}
const open = (param) => {
console.log(param)
cptId.value = param.cptId
show.value = true
list.value = []
teamlist.value = []
......@@ -217,34 +237,62 @@ const open = (param) => {
defineExpose({
open
})
function showDetail(name) {
query2.value = name
showGroupList.value = false
loading.value = true
getqySchedule2({groupName: name}).then(res => {
getqySchedule2({ groupName: name, cptId: cptId.value }).then(res => {
loading.value = false
teamlist.value = res.data
}).catch(e => {
loading.value = false
})
}
</script>
<style scoped lang="scss">
.tname{font-size: 14px;font-weight: bold;position: relative;top: -8px}
.tip{font-size: 12px;margin: 4px 0 0;display: inline-block;}
.rItem{
<style lang="scss" scoped>
.tname {
font-size: 14px;
font-weight: bold;
position: relative;
top: -8px
}
.tip {
font-size: 12px;
margin: 4px 0 0;
display: inline-block;
}
.rItem {
height: 130px;
cursor: pointer;border: 1px solid #e1e1e1;border-radius: 4px;
width: 350px;text-align: center;line-height: 130px;
padding: 1px; font-size: 30px;color: #fff;
margin: 20px auto;background:linear-gradient(90deg, #8623FC, #453DEA);
&:hover{
background:linear-gradient(90deg, #453DEA, #8623FC);
box-shadow: 0 4px 10px #453DEA;border: none;
cursor: pointer;
border: 1px solid #e1e1e1;
border-radius: 4px;
width: 350px;
text-align: center;
line-height: 130px;
padding: 1px;
font-size: 30px;
color: #fff;
margin: 20px auto;
background: linear-gradient(90deg, #8623FC, #453DEA);
&:hover {
background: linear-gradient(90deg, #453DEA, #8623FC);
box-shadow: 0 4px 10px #453DEA;
border: none;
}
}
.nowteamItem {
width: 100%;border: 1px solid #c8c5ff; margin-top: 20px;
position: relative;border-radius: 4px;padding: 0 0 20px;
width: 100%;
border: 1px solid #c8c5ff;
margin-top: 20px;
position: relative;
border-radius: 4px;
padding: 0 0 20px;
background: #FFFFFF;
box-sizing: border-box;
......@@ -271,14 +319,38 @@ function showDetail(name) {
}
}
}
.temell {
.nowteamItem{padding: 10px;margin: 0 0 10px;
.nowName{font-size: 15px;font-weight: bold;margin-right: 10px}
.text-bold{font-weight: bold;}
.fontsize14{font-size: 14px;}
.nowteamItem {
padding: 10px;
margin: 0 0 10px;
.nowName {
font-size: 15px;
font-weight: bold;
margin-right: 10px
}
.text-bold {
font-weight: bold;
}
.fontsize14 {
font-size: 14px;
}
}
}
.groupList{max-height: 70vh;overflow: auto;border: 1px solid #e1e1e1;margin-top: 10px;
li{padding: 10px;border-bottom: 1px solid #e1e1e1;cursor: pointer;}
.groupList {
max-height: 70vh;
overflow: auto;
border: 1px solid #e1e1e1;
margin-top: 10px;
li {
padding: 10px;
border-bottom: 1px solid #e1e1e1;
cursor: pointer;
}
}
</style>
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!