增加查找功能

base
JayChou 6 months ago
parent d3d443bcce
commit fa89909fa5
  1. 17
      src/views/registrationGroup/components/stuDialog.vue
  2. 26
      src/views/registrationGroup/components/stuList.vue
  3. 1
      src/views/registrationGroup/components/teaDialog.vue

@ -10,6 +10,13 @@
overflow
>
<div class="table-box">
<div class="search">
<el-row gutter="20">
<el-col :span="8"></el-col>
<el-col :span="12"><el-input v-model="name"></el-input></el-col>
<el-col :span="4"><el-button type="primary" @click="search">搜索</el-button></el-col>
</el-row>
</div>
<el-table
ref="multipleTableRef"
border
@ -18,6 +25,7 @@
append-to-body
class="table"
v-loading="loading"
style="margin-top: 20px"
>
<el-table-column label="选择" width="55">
<template #default="scope">
@ -96,13 +104,20 @@ const params = reactive<any>({
onlRepUrlParamStr: `annualCompid=${route.query.objName}`,
entryFormat: '团队',
id: route.query.id,
name: '',
})
const name = ref('')
//
const search = () => {
params.name=name.value
getList()
}
const loading = ref(false)
const getList = async () => {
if (!props.modelValue) return
loading.value = true
try {
// const data =
const res: any = await getMembersList(params)
tableData.length = 0
tableData.push(...res.result.records)

@ -76,10 +76,13 @@
</template>
<script lang="ts" setup>
import { reactive, ref } from 'vue'
import { reactive, ref, onMounted ,watch} from 'vue'
import stuDialog from './stuDialog.vue'
import { ClusterOutlined } from '@ant-design/icons-vue'
import { ElMessage } from 'element-plus'
import userStore from '@/store/module/user'
const userModel = userStore()
const options = [
{
value: '1',
@ -93,12 +96,29 @@ const options = [
//
const tableData = reactive<any[]>([])
// onMounted(() => {
// setTimeout(() => {
// tableData.push({
// userId: userModel.userInfo.id,
// realname: userModel.userInfo.realname,
// captain: '1',
// teamSeq: 1,
// })
// }, 50)
// })
watch(()=>userModel.userInfo,()=>{
tableData.push({
userId: userModel.userInfo.id,
realname: userModel.userInfo.realname,
captain: '1',
teamSeq: 1,
})
})
const add = () => {
const length = tableData.push({
realname: '', //
captain: '', //
teamSeq: '', //
teamSeq: tableData.length + 1, //
userId: '', // id
})
openDialog(tableData[length - 1])

@ -11,6 +11,7 @@
overflow
>
<div class="table-box">
<el-table
ref="multipleTableRef"
border

Loading…
Cancel
Save