a75e40cc by zhangmeng

价格

1 parent 40888057
......@@ -344,6 +344,15 @@ export function getPerPersonList(query, userId) {
})
}
// 选择队友
export function getMate(data) {
return request({
url: `/systemj/personInfo/getMate`,
method: 'post',
data
})
}
// 获取团队报名时已选人员
export function getChooseDoneGroupCoachs(cptId, groupId) {
......
......@@ -144,11 +144,12 @@ import AddCoach from '../components/addCoach'
import AddWdsf from '../components/addWdsf'
import Import from '../components/import'
import { useStorage } from '@vueuse/core/index'
import { delPersonForPersonal, getPerPersonList } from '@/apiPc/match'
import { delPersonForPersonal, getPerPersonList, getMate } from '@/apiPc/match'
import useUserStore from '@/store/modules/user'
import { ElMessage, ElMessageBox } from 'element-plus'
import _ from 'lodash'
const dancing = ref(null)// 舞伴
const language = useStorage('language', 0)
const user = useUserStore().user
const { proxy } = getCurrentInstance()
......@@ -245,6 +246,10 @@ function handleSelectionChange(val) {
for (const p of val) {
choosedIds.push(p.id)
}
if (val.length == 1) {
handelTeammate(val[0].id)
}
// 判断是否队友
if (val.length == 2) {
if (val[0].sex != val[1].sex) {
......@@ -266,6 +271,18 @@ function handleSelectionChange(val) {
}
}
async function handelTeammate(id) {
const res = await getMate({
type: '1',
id
})
dancing.value = res.data
tableData.value.filter(p => p.id == id || p.id == dancing.value)
console.log(res)
console.log(tableData.value)
}
function checkTwo(a, b) {
match.checkMate({ per1Id: a.id, per2Id: b.id, cptId: matchId }).then(res => {
if (!res.data) {
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!