82c964d1 by zhangmeng

背号查询

1 parent edf10d93
...@@ -172,7 +172,7 @@ export function getquerySchedule2Pre(qy) { ...@@ -172,7 +172,7 @@ export function getquerySchedule2Pre(qy) {
172 172
173 export function queryScheduleSingle(qy) { 173 export function queryScheduleSingle(qy) {
174 return request({ 174 return request({
175 url: `/league/schedule/queryScheduleSingle`, 175 url: `/league/schedule/queryScheduleSingle/${qy.cptId}`,
176 method: 'get', 176 method: 'get',
177 params: qy 177 params: qy
178 }) 178 })
......
1 <template> 1 <template>
2 <el-dialog 2 <el-dialog
3 v-model="show" :close-on-click-modal="false" :title="language==0?'日程查询':'Schedule inquiry'" append-to-body 3 v-model="show" :close-on-click-modal="false" :title="language==0?'日程查询':'Schedule inquiry'" append-to-body
4 center class="pcloginpop" 4 center class="pcloginpop"
5 close-icon="CircleClose" destroy-on-close 5 close-icon="CircleClose" destroy-on-close
6 width="460px" 6 width="460px"
7 > 7 >
8 <div style="min-height: 300px" v-loading="loading"> 8 <div v-loading="loading" style="min-height: 300px">
9 9
10 <div v-if="!type||type==''"> 10 <div v-if="!type||type==''">
11 <div @click="type='0'" class="rItem">{{ language==0?'按项目查询':'Query by project' }}</div> 11 <div class="rItem" @click="type='0'">{{ language == 0 ? '按项目查询' : 'Query by project' }}</div>
12 <div @click="type='1'" class="rItem">{{ language==0?'按团队查询':'Query by team' }}</div> 12 <div class="rItem" @click="type='1'">{{ language == 0 ? '按团队查询' : 'Query by team' }}</div>
13 <div @click="type='2'" class="rItem">{{ language==0?'按姓名查询':'Query by name' }}</div> 13 <div class="rItem" @click="type='2'">{{ language == 0 ? '按姓名查询' : 'Query by name' }}</div>
14 </div> 14 </div>
15 15
16 <div v-if="type=='0'"> 16 <div v-if="type=='0'">
17 <div class="flex mt30"> 17 <div class="flex mt30">
18 <el-input :placeholder="language==0?'输入项目/ 项目编号查询':'Enter project name or code to Query'" v-model="query" clearable 18 <el-input
19 @enter="search" @blur="search" @empty="search"/> 19 v-model="query"
20 <el-button @click="search" class="btn-lineG" style="color: #fff">{{ 20 :placeholder="language==0?'输入项目/ 项目编号查询':'Enter project name or code to Query'" clearable
21 language == 0 ? '查询' : 'Search' 21 @blur="search" @empty="search" @enter="search"
22 }} 22 />
23 <el-button class="btn-lineG" style="color: #fff" @click="search">{{
24 language == 0 ? '查询' : 'Search'
25 }}
23 </el-button> 26 </el-button>
24 </div> 27 </div>
25 28
26 <div v-if="list.length>0" class="mt30"> 29 <div v-if="list.length>0" class="mt30">
27 <el-timeline> 30 <el-timeline>
28 <el-timeline-item placement="top" 31 <el-timeline-item
29 v-for="(form, index) in list" :key="index" 32 v-for="(form, index) in list"
30 :timestamp="form.date + ' ' + form.timeStr" 33 :key="index" :timestamp="form.date + ' ' + form.timeStr"
34 placement="top"
31 > 35 >
32 <div class="text-primary"> 36 <div class="text-primary">
33 <span v-if="language==1&&form.projectNameEn">{{ form.projectNameEn }}</span> 37 <span v-if="language==1&&form.projectNameEn">{{ form.projectNameEn }}</span>
34 <span v-else-if="form.projectName">{{ form.projectName }}</span> 38 <span v-else-if="form.projectName">{{ form.projectName }}</span>
35 <span class="fr">{{form.changCi}} <i v-if="form.changCi">/ </i> {{language==0?form.lun:form.lunEn}} </span> 39 <span class="fr">{{ form.changCi }} <i
40 v-if="form.changCi"
41 >/ </i> {{ language == 0 ? form.lun : form.lunEn }} </span>
36 </div> 42 </div>
37 <div>{{form.danceType}}</div> 43 <div>{{ form.danceType }}</div>
38 <div>{{form.address}}</div> 44 <div>{{ form.address }}</div>
39 </el-timeline-item> 45 </el-timeline-item>
40 </el-timeline> 46 </el-timeline>
41 </div> 47 </div>
42 <div v-else> 48 <div v-else>
43 <el-empty/> 49 <el-empty />
44 </div> 50 </div>
45 </div> 51 </div>
46 <div v-if="type=='1'"> 52 <div v-if="type=='1'">
47 <div class="flex mt20"> 53 <div class="flex mt20">
48 <el-input :placeholder="language==0?'请输入代表队名称至少两字符':'Enter the representing team name,At least two characters'" 54 <el-input
49 v-model="query2" clearable 55 v-model="query2"
50 @enter="searchTeam" @blur="searchTeam" @empty="searchTeam"/> 56 :placeholder="language==0?'请输入代表队名称至少两字符':'Enter the representing team name,At least two characters'"
51 <el-button @click="searchTeam" class="btn-lineG" style="color: #fff"> 57 clearable
52 {{language == 0 ? '查询' : 'Search' }} 58 @blur="searchTeam" @empty="searchTeam" @enter="searchTeam"
59 />
60 <el-button class="btn-lineG" style="color: #fff" @click="searchTeam">
61 {{ language == 0 ? '查询' : 'Search' }}
53 </el-button> 62 </el-button>
54 </div> 63 </div>
55 <span class="tip">*{{ language == 0 ?'模糊查询':'Fuzzy query' }}</span> 64 <span class="tip">*{{ language == 0 ? '模糊查询' : 'Fuzzy query' }}</span>
56 <div class="text-danger text-center" v-if="showGroupList">{{ language == 0 ?'找到多个团体':'Found multiple teams' }}</div> 65 <div v-if="showGroupList" class="text-danger text-center">
57 <div class="groupList" v-if="showGroupList"> 66 {{ language == 0 ? '找到多个团体' : 'Found multiple teams' }}
67 </div>
68 <div v-if="showGroupList" class="groupList">
58 <ul> 69 <ul>
59 <li v-for="(item, index) in groupList" @click="showDetail(item)" :key="index">{{item}} 70 <li v-for="(item, index) in groupList" :key="index" @click="showDetail(item)">{{ item }}
60 <el-icon class="fr"><ArrowRight /></el-icon> 71 <el-icon class="fr">
72 <ArrowRight />
73 </el-icon>
61 </li> 74 </li>
62 </ul> 75 </ul>
63 </div> 76 </div>
64 <div v-if="teamlist.length>0" class="temell mt20"> 77 <div v-if="teamlist.length>0" class="temell mt20">
65 <el-collapse accordion> 78 <el-collapse accordion>
66 <el-collapse-item :name="index" :title="team[0].title" v-for="(team,index) in teamlist" :key="index"> 79 <el-collapse-item v-for="(team,index) in teamlist" :key="index" :name="index" :title="team[0].title">
67 <el-timeline> 80 <el-timeline>
68 <el-timeline-item placement="top" v-for="(form, index) in team" :key="index"> 81 <el-timeline-item v-for="(form, index) in team" :key="index" placement="top">
69 82
70 <div class="text-primary" style="position: relative;top:-15px"> 83 <div class="text-primary" style="position: relative;top:-15px">
71 {{ form.date + ' ' + form.timeStr + ' / '+form.address }} 84 {{ form.date + ' ' + form.timeStr + ' / ' + form.address }}
72 <span v-if="form.lunEn"> / {{ form.lunEn }}</span> 85 <span v-if="form.lunEn"> / {{ form.lunEn }}</span>
73 <span v-else-if="form.lun"> / {{ form.lun }}</span> 86 <span v-else-if="form.lun"> / {{ form.lun }}</span>
74 <span v-if="form.changCi "> / {{ language==0?'场次':'Session' }}{{ form.changCi }}</span> 87 <span v-if="form.changCi "> / {{ language == 0 ? '场次' : 'Session' }}{{ form.changCi }}</span>
75 </div> 88 </div>
76 <div class="tname" v-if="form.projectNameEn">{{ form.projectNameEn}}</div> 89 <div v-if="form.projectNameEn" class="tname">{{ form.projectNameEn }}</div>
77 <div class="tname" v-if="form.projectName">{{ form.projectName }}</div> 90 <div v-if="form.projectName" class="tname">{{ form.projectName }}</div>
78 <div>{{form.danceType}}</div> 91 <div>{{ form.danceType }}</div>
79 </el-timeline-item> 92 </el-timeline-item>
80 </el-timeline> 93 </el-timeline>
81 </el-collapse-item> 94 </el-collapse-item>
82 </el-collapse> 95 </el-collapse>
83 </div> 96 </div>
84 </div> 97 </div>
85 98
86 <div v-if="type=='2'"> 99 <div v-if="type=='2'">
87 <div class="flex mt30"> 100 <div class="flex mt30">
88 <el-input :placeholder="language==0?'输入选手姓名查询':'Enter the name of the player to Query'" 101 <el-input
89 v-model="query3" clearable 102 v-model="query3"
90 @enter="personalSearch" @blur="personalSearch" @empty="personalSearch"/> 103 :placeholder="language==0?'输入选手姓名查询':'Enter the name of the player to Query'" clearable
91 <el-button @click="personalSearch" class="btn-lineG" style="color: #fff">{{ 104 @blur="personalSearch" @empty="personalSearch" @enter="personalSearch"
92 language == 0 ? '查询' : 'Search' 105 />
93 }} 106 <el-button class="btn-lineG" style="color: #fff" @click="personalSearch">{{
107 language == 0 ? '查询' : 'Search'
108 }}
94 </el-button> 109 </el-button>
95 </div> 110 </div>
96 <div v-if="list.length>0" class="temell mt20"> 111 <div v-if="list.length>0" class="temell mt20">
97 <el-timeline> 112 <el-timeline>
98 <el-timeline-item placement="top" v-for="(team,j) in list" :key="j"> 113 <el-timeline-item v-for="(team,j) in list" :key="j" placement="top">
99 <div v-for="(form, index) in team" :key="index" v-show="index==0"> 114 <div v-for="(form, index) in team" v-show="index==0" :key="index">
100 <div class="text-primary" style="position: relative;top:-15px"> 115 <div class="text-primary" style="position: relative;top:-15px">
101 {{ form.date + ' ' + form.timeStr + ' / '+form.address }} 116 {{ form.date + ' ' + form.timeStr + ' / ' + form.address }}
102 <span v-if="form.lunEn"> / {{ form.lunEn }}</span> 117 <span v-if="form.lunEn"> / {{ form.lunEn }}</span>
103 <span v-else-if="form.lun"> / {{ form.lun }}</span> 118 <span v-else-if="form.lun"> / {{ form.lun }}</span>
104 <span v-if="form.changCi "> / {{ language==0?'场次':'Session' }}{{ form.changCi }}</span> 119 <span v-if="form.changCi "> / {{ language == 0 ? '场次' : 'Session' }}{{ form.changCi }}</span>
105 </div> 120 </div>
106 <div class="tname" v-if="form.projectNameEn">{{ form.projectNameEn}}</div> 121 <div v-if="form.projectNameEn" class="tname">{{ form.projectNameEn }}</div>
107 <div class="tname" v-if="form.projectName">{{ form.projectName }}</div> 122 <div v-if="form.projectName" class="tname">{{ form.projectName }}</div>
108 <div>{{form.danceType}}</div> 123 <div>{{ form.danceType }}</div>
109 </div> 124 </div>
110 <div v-for="(form, index) in team" :key="index" v-show="index>0" style="margin: 8px 0 0"> 125 <div v-for="(form, index) in team" v-show="index>0" :key="index" style="margin: 8px 0 0">
111 {{ form.date + ' ' + form.timeStr + ' / '+form.address }} 126 {{ form.date + ' ' + form.timeStr + ' / ' + form.address }}
112 <span v-if="form.lunEn"> / {{ form.lunEn }}</span> 127 <span v-if="form.lunEn"> / {{ form.lunEn }}</span>
113 <span v-else-if="form.lun"> / {{ form.lun }}</span> 128 <span v-else-if="form.lun"> / {{ form.lun }}</span>
114 <span v-if="form.changCi "> / {{ language==0?'场次':'Session' }}{{ form.changCi }}</span> 129 <span v-if="form.changCi "> / {{ language == 0 ? '场次' : 'Session' }}{{ form.changCi }}</span>
115 </div> 130 </div>
116 </el-timeline-item> 131 </el-timeline-item>
117 </el-timeline> 132 </el-timeline>
118 </div> 133 </div>
119 </div> 134 </div>
120 135
121 </div> 136 </div>
122 </el-dialog> 137 </el-dialog>
123 </template> 138 </template>
124 139
125 <script setup> 140 <script setup>
126 import {ref} from "vue"; 141 import { ref } from 'vue'
127 import {ElMessage} from "element-plus"; 142 import { ElMessage } from 'element-plus'
128 import { 143 import {
129 getquerySchedule2Pre, 144 getquerySchedule2Pre,
130 getqySchedule, 145 getqySchedule,
131 getqySchedule2, 146 getqySchedule2,
132 getTeamBackNumber, 147 getTeamBackNumber,
133 getTeamBackNumberPre, queryScheduleSingle 148 getTeamBackNumberPre, queryScheduleSingle
134 } from "@/apiPc/common"; 149 } from '@/apiPc/common'
135 import {useStorage} from "@vueuse/core/index"; 150 import { useStorage } from '@vueuse/core/index'
136 151
137 const language = useStorage('language', 0) 152 const language = useStorage('language', 0)
138 const show = ref(false) 153 const show = ref(false)
...@@ -146,45 +161,49 @@ const query2 = ref('') ...@@ -146,45 +161,49 @@ const query2 = ref('')
146 const query3 = ref('') 161 const query3 = ref('')
147 const type = ref('') 162 const type = ref('')
148 const showGroupList = ref(false) 163 const showGroupList = ref(false)
164 const cptId = ref()
165
149 const search = () => { 166 const search = () => {
150 if (!query.value) { 167 if (!query.value) {
151 ElMessage.warning(language.value == 0 ? '请输入搜索关键词' : 'Enter project name or code to Query') 168 ElMessage.warning(language.value == 0 ? '请输入搜索关键词' : 'Enter project name or code to Query')
152 return 169 return
153 } 170 }
154 getqySchedule({projectName: query.value}).then(res => { 171 getqySchedule({ projectName: query.value, cptId: cptId.value }).then(res => {
155 if (!res.data||res.data.length==0) { 172 if (!res.data || res.data.length == 0) {
156 list.value = [] 173 list.value = []
157 //提示 '未找到结果,请重新查询' 174 // 提示 '未找到结果,请重新查询'
158 ElMessage.warning(language.value == 0 ? '未找到结果,请重新查询' : 'No result') 175 ElMessage.warning(language.value == 0 ? '未找到结果,请重新查询' : 'No result')
159 return 176 return
160 } 177 }
161 list.value = res.data 178 list.value = res.data
179 }).catch(e => {
180 loading.value = false
162 }) 181 })
163
164 } 182 }
165 const searchTeam = () => { 183 const searchTeam = () => {
166 teamlist.value = [] 184 teamlist.value = []
167 if (!query2.value||query2.value.length < 2) { 185 if (!query2.value || query2.value.length < 2) {
168 ElMessage.warning(language.value == 0 ? '请输入代表队名称至少两字符' : 'Enter the representing team name,At least two characters') 186 ElMessage.warning(language.value == 0 ? '请输入代表队名称至少两字符' : 'Enter the representing team name,At least two characters')
169 return 187 return
170 } 188 }
171 loading.value = true 189 loading.value = true
172 getquerySchedule2Pre({groupName: query2.value}).then(res => { 190 getquerySchedule2Pre({ groupName: query2.value, cptId: cptId.value }).then(res => {
173 loading.value = false 191 loading.value = false
174 if (!res.data||res.data.length==0) { 192 if (!res.data || res.data.length == 0) {
175 groupList.value = [] 193 groupList.value = []
176 //提示 '未找到结果,请重新查询' 194 // 提示 '未找到结果,请重新查询'
177 ElMessage.warning(language.value == 0 ? '未找到结果,请重新查询' : 'No result') 195 ElMessage.warning(language.value == 0 ? '未找到结果,请重新查询' : 'No result')
178 return 196 return
179 } 197 }
180 groupList.value = res.data 198 groupList.value = res.data
181 if(groupList.value.length==1){ 199 if (groupList.value.length == 1) {
182 showDetail(groupList.value[0]) 200 showDetail(groupList.value[0])
183 } 201 }
184 if(groupList.value.length>1){ 202 if (groupList.value.length > 1) {
185 showGroupList.value = true 203 showGroupList.value = true
186 } 204 }
187 205 }).catch(e => {
206 loading.value = false
188 }) 207 })
189 } 208 }
190 const personalSearch = () => { 209 const personalSearch = () => {
...@@ -193,19 +212,20 @@ const personalSearch = () => { ...@@ -193,19 +212,20 @@ const personalSearch = () => {
193 return 212 return
194 } 213 }
195 loading.value = true 214 loading.value = true
196 queryScheduleSingle({query: query3.value}).then(res => { 215 queryScheduleSingle({ query: query3.value, cptId: cptId.value }).then(res => {
197 loading.value = false 216 loading.value = false
198 if (!res.data||res.data.length==0) { 217 if (!res.data || res.data.length == 0) {
199 list.value = [] 218 list.value = []
200 //提示 '未找到结果,请重新查询' 219 // 提示 '未找到结果,请重新查询'
201 ElMessage.warning(language.value == 0 ? '未找到结果,请重新查询' : 'No result') 220 ElMessage.warning(language.value == 0 ? '未找到结果,请重新查询' : 'No result')
202 return 221 return
203 } 222 }
204 list.value = res.data 223 list.value = res.data
205 }) 224 })
206
207 } 225 }
208 const open = (param) => { 226 const open = (param) => {
227 console.log(param)
228 cptId.value = param.cptId
209 show.value = true 229 show.value = true
210 list.value = [] 230 list.value = []
211 teamlist.value = [] 231 teamlist.value = []
...@@ -217,37 +237,65 @@ const open = (param) => { ...@@ -217,37 +237,65 @@ const open = (param) => {
217 defineExpose({ 237 defineExpose({
218 open 238 open
219 }) 239 })
240
220 function showDetail(name) { 241 function showDetail(name) {
221 query2.value = name 242 query2.value = name
222 showGroupList.value = false 243 showGroupList.value = false
223 loading.value = true 244 loading.value = true
224 getqySchedule2({groupName: name}).then(res => { 245 getqySchedule2({ groupName: name, cptId: cptId.value }).then(res => {
225 loading.value = false 246 loading.value = false
226 teamlist.value = res.data 247 teamlist.value = res.data
248 }).catch(e => {
249 loading.value = false
227 }) 250 })
228 } 251 }
229 </script> 252 </script>
230 253
231 <style scoped lang="scss"> 254 <style lang="scss" scoped>
232 .tname{font-size: 14px;font-weight: bold;position: relative;top: -8px} 255 .tname {
233 .tip{font-size: 12px;margin: 4px 0 0;display: inline-block;} 256 font-size: 14px;
234 .rItem{ 257 font-weight: bold;
258 position: relative;
259 top: -8px
260 }
261
262 .tip {
263 font-size: 12px;
264 margin: 4px 0 0;
265 display: inline-block;
266 }
267
268 .rItem {
235 height: 130px; 269 height: 130px;
236 cursor: pointer;border: 1px solid #e1e1e1;border-radius: 4px; 270 cursor: pointer;
237 width: 350px;text-align: center;line-height: 130px; 271 border: 1px solid #e1e1e1;
238 padding: 1px; font-size: 30px;color: #fff; 272 border-radius: 4px;
239 margin: 20px auto;background:linear-gradient(90deg, #8623FC, #453DEA); 273 width: 350px;
240 &:hover{ 274 text-align: center;
241 background:linear-gradient(90deg, #453DEA, #8623FC); 275 line-height: 130px;
242 box-shadow: 0 4px 10px #453DEA;border: none; 276 padding: 1px;
277 font-size: 30px;
278 color: #fff;
279 margin: 20px auto;
280 background: linear-gradient(90deg, #8623FC, #453DEA);
281
282 &:hover {
283 background: linear-gradient(90deg, #453DEA, #8623FC);
284 box-shadow: 0 4px 10px #453DEA;
285 border: none;
243 } 286 }
244 } 287 }
288
245 .nowteamItem { 289 .nowteamItem {
246 width: 100%;border: 1px solid #c8c5ff; margin-top: 20px; 290 width: 100%;
247 position: relative;border-radius: 4px;padding: 0 0 20px; 291 border: 1px solid #c8c5ff;
292 margin-top: 20px;
293 position: relative;
294 border-radius: 4px;
295 padding: 0 0 20px;
248 background: #FFFFFF; 296 background: #FFFFFF;
249 box-sizing: border-box; 297 box-sizing: border-box;
250 298
251 .info { 299 .info {
252 .nowName { 300 .nowName {
253 font-family: "DIN Alternate"; 301 font-family: "DIN Alternate";
...@@ -257,13 +305,13 @@ function showDetail(name) { ...@@ -257,13 +305,13 @@ function showDetail(name) {
257 display: block; 305 display: block;
258 margin: 10px; 306 margin: 10px;
259 } 307 }
260 308
261 label { 309 label {
262 text-align: right; 310 text-align: right;
263 font-size: 14px; 311 font-size: 14px;
264 padding-left: 7% 312 padding-left: 7%
265 } 313 }
266 314
267 div { 315 div {
268 font-size: 14px; 316 font-size: 14px;
269 color: #333; 317 color: #333;
...@@ -271,14 +319,38 @@ function showDetail(name) { ...@@ -271,14 +319,38 @@ function showDetail(name) {
271 } 319 }
272 } 320 }
273 } 321 }
322
274 .temell { 323 .temell {
275 .nowteamItem{padding: 10px;margin: 0 0 10px; 324 .nowteamItem {
276 .nowName{font-size: 15px;font-weight: bold;margin-right: 10px} 325 padding: 10px;
277 .text-bold{font-weight: bold;} 326 margin: 0 0 10px;
278 .fontsize14{font-size: 14px;} 327
328 .nowName {
329 font-size: 15px;
330 font-weight: bold;
331 margin-right: 10px
332 }
333
334 .text-bold {
335 font-weight: bold;
336 }
337
338 .fontsize14 {
339 font-size: 14px;
340 }
279 } 341 }
280 } 342 }
281 .groupList{max-height: 70vh;overflow: auto;border: 1px solid #e1e1e1;margin-top: 10px; 343
282 li{padding: 10px;border-bottom: 1px solid #e1e1e1;cursor: pointer;} 344 .groupList {
345 max-height: 70vh;
346 overflow: auto;
347 border: 1px solid #e1e1e1;
348 margin-top: 10px;
349
350 li {
351 padding: 10px;
352 border-bottom: 1px solid #e1e1e1;
353 cursor: pointer;
354 }
283 } 355 }
284 </style> 356 </style>
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!