84b1fef0 by zhangmeng

个人选着

1 parent 1735197c
......@@ -195,6 +195,7 @@ const open = (params) => {
show.value = true
isNational.value = params.isNational
choosedList = params.choosedList
tableData.value = []
getList()
}
defineExpose({
......@@ -226,6 +227,7 @@ const selectable = (row) => {
}
}
const getList = () => {
console.log(user.userId)
loading.value = true
getPerPersonList(query.value, user.userId).then(res => {
total.value = res.total
......@@ -249,7 +251,7 @@ function handleSelectionChange(val) {
if (val.length == 1) {
handelTeammate(val[0].id)
}
if (val.length == 0) getList()
// 判断是否队友
if (val.length == 2) {
if (val[0].sex != val[1].sex) {
......@@ -277,7 +279,16 @@ async function handelTeammate(id) {
id
})
dancing.value = res.data
tableData.value.filter(p => p.id == id || p.id == dancing.value)
const arr = []
for (const v of tableData.value) {
if (v.id == id || v.id == dancing.value) {
arr.push(v)
}
}
tableData.value = arr
nextTick(() => {
reSetChoosed()
})
console.log(res)
console.log(tableData.value)
}
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!