价格
Showing
2 changed files
with
27 additions
and
1 deletions
| ... | @@ -344,6 +344,15 @@ export function getPerPersonList(query, userId) { | ... | @@ -344,6 +344,15 @@ export function getPerPersonList(query, userId) { |
| 344 | }) | 344 | }) |
| 345 | } | 345 | } |
| 346 | 346 | ||
| 347 | // 选择队友 | ||
| 348 | export function getMate(data) { | ||
| 349 | return request({ | ||
| 350 | url: `/systemj/personInfo/getMate`, | ||
| 351 | method: 'post', | ||
| 352 | data | ||
| 353 | }) | ||
| 354 | } | ||
| 355 | |||
| 347 | 356 | ||
| 348 | // 获取团队报名时已选人员 | 357 | // 获取团队报名时已选人员 |
| 349 | export function getChooseDoneGroupCoachs(cptId, groupId) { | 358 | export function getChooseDoneGroupCoachs(cptId, groupId) { | ... | ... |
| ... | @@ -144,11 +144,12 @@ import AddCoach from '../components/addCoach' | ... | @@ -144,11 +144,12 @@ import AddCoach from '../components/addCoach' |
| 144 | import AddWdsf from '../components/addWdsf' | 144 | import AddWdsf from '../components/addWdsf' |
| 145 | import Import from '../components/import' | 145 | import Import from '../components/import' |
| 146 | import { useStorage } from '@vueuse/core/index' | 146 | import { useStorage } from '@vueuse/core/index' |
| 147 | import { delPersonForPersonal, getPerPersonList } from '@/apiPc/match' | 147 | import { delPersonForPersonal, getPerPersonList, getMate } from '@/apiPc/match' |
| 148 | import useUserStore from '@/store/modules/user' | 148 | import useUserStore from '@/store/modules/user' |
| 149 | import { ElMessage, ElMessageBox } from 'element-plus' | 149 | import { ElMessage, ElMessageBox } from 'element-plus' |
| 150 | import _ from 'lodash' | 150 | import _ from 'lodash' |
| 151 | 151 | ||
| 152 | const dancing = ref(null)// 舞伴 | ||
| 152 | const language = useStorage('language', 0) | 153 | const language = useStorage('language', 0) |
| 153 | const user = useUserStore().user | 154 | const user = useUserStore().user |
| 154 | const { proxy } = getCurrentInstance() | 155 | const { proxy } = getCurrentInstance() |
| ... | @@ -245,6 +246,10 @@ function handleSelectionChange(val) { | ... | @@ -245,6 +246,10 @@ function handleSelectionChange(val) { |
| 245 | for (const p of val) { | 246 | for (const p of val) { |
| 246 | choosedIds.push(p.id) | 247 | choosedIds.push(p.id) |
| 247 | } | 248 | } |
| 249 | if (val.length == 1) { | ||
| 250 | handelTeammate(val[0].id) | ||
| 251 | } | ||
| 252 | |||
| 248 | // 判断是否队友 | 253 | // 判断是否队友 |
| 249 | if (val.length == 2) { | 254 | if (val.length == 2) { |
| 250 | if (val[0].sex != val[1].sex) { | 255 | if (val[0].sex != val[1].sex) { |
| ... | @@ -266,6 +271,18 @@ function handleSelectionChange(val) { | ... | @@ -266,6 +271,18 @@ function handleSelectionChange(val) { |
| 266 | } | 271 | } |
| 267 | } | 272 | } |
| 268 | 273 | ||
| 274 | async function handelTeammate(id) { | ||
| 275 | const res = await getMate({ | ||
| 276 | type: '1', | ||
| 277 | id | ||
| 278 | }) | ||
| 279 | dancing.value = res.data | ||
| 280 | tableData.value.filter(p => p.id == id || p.id == dancing.value) | ||
| 281 | console.log(res) | ||
| 282 | console.log(tableData.value) | ||
| 283 | } | ||
| 284 | |||
| 285 | |||
| 269 | function checkTwo(a, b) { | 286 | function checkTwo(a, b) { |
| 270 | match.checkMate({ per1Id: a.id, per2Id: b.id, cptId: matchId }).then(res => { | 287 | match.checkMate({ per1Id: a.id, per2Id: b.id, cptId: matchId }).then(res => { |
| 271 | if (!res.data) { | 288 | if (!res.data) { | ... | ... |
-
Please register or sign in to post a comment