确认报名(团队)删除图标

main
significative 8 months ago
parent e16e5f4cc5
commit 4298d0b84c
  1. 2
      src/views/projectName/index.vue
  2. 13
      src/views/registrationGroup/components/stuDialog.vue
  3. 2
      src/views/registrationGroup/components/stuList.vue
  4. 11
      src/views/registrationGroup/components/teaDialog.vue
  5. 4
      src/views/registrationGroup/components/teaList.vue

@ -30,7 +30,7 @@
</div>
<div class="btn-box">
<el-btutton class="btn" @click="handleSub">立刻报名</el-btutton>
<el-button class="btn" @click="handleSub">立刻报名</el-button>
</div>
</div>
</template>

@ -2,12 +2,11 @@
<el-dialog :modelValue="modelValue" @update:modelValue="(newValue: boolean) => $emit('update:modelValue', newValue)"
title="用户信息" width="800" draggable overflow>
<div class="table-box">
<el-table ref="multipleTableRef" border :data="tableData" @row-click="(row: any) => selectedRow = row"
append-to-body
class="table" v-loading="loading">
<el-table ref="multipleTableRef" border :data="tableData" @row-click="(row: any) => selectedRowId = row.id"
append-to-body class="table" v-loading="loading">
<el-table-column label="选择" width="55">
<template #default="scope">
<el-radio v-model="selectedRow" :value="scope.row" />
<el-radio v-model="selectedRowId" :value="scope.row.id" />
</template>
</el-table-column>
<el-table-column label="序号">
@ -29,7 +28,7 @@
<div class="dialog-footer">
<el-button @click="$emit('update:modelValue', false)">关闭</el-button>
<el-button type="primary"
@click="() => { $emit('update:modelValue', false); $emit('selected', selectedRow); }">确认</el-button>
@click="() => { $emit('update:modelValue', false); $emit('selected', tableData.find(o => o.id === selectedRowId) || {}); }">确认</el-button>
</div>
</template>
</el-dialog>
@ -41,7 +40,7 @@ import { getMembersList } from '@/api/person';
import { useRoute } from 'vue-router';
import { ElMessage } from 'element-plus';
const props = defineProps(['modelValue', 'type']);
const props = defineProps(['modelValue']);
const $emit = defineEmits(['update:modelValue', 'selected']);
const route = useRoute();
@ -49,7 +48,7 @@ watch(() => props.modelValue, () => getList());
//
const tableData = reactive<any[]>([]);
const selectedRow = ref();
const selectedRowId = ref();
//
const total = ref(0);

@ -1,7 +1,7 @@
<template>
<div>
<el-button type="primary" icon="Plus" @click="add" class="btn">新增</el-button>
<el-button type="primary" icon="Plus" @click="del" class="btn" v-show="isSele">删除</el-button>
<el-button type="danger" icon="Delete" @click="del" class="btn" v-show="isSele">删除</el-button>
<div class="table-box">
<el-table ref="multipleTableRef" @select="(selection: any[]) => isSele = !!selection.length" border
:data="tableData" class="table" height="276px">

@ -1,13 +1,12 @@
<template>
<el-dialog :modelValue="modelValue" @update:modelValue="(newValue: boolean) => $emit('update:modelValue', newValue)"
append-to-body
title="用户信息" width="1000" draggable overflow>
append-to-body title="用户信息" width="1000" draggable overflow>
<div class="table-box">
<el-table ref="multipleTableRef" border :data="tableData" @row-click="(row: any) => selectedRow = row"
<el-table ref="multipleTableRef" border :data="tableData" @row-click="(row: any) => selectedRowId = row.user_id"
class="table" v-loading="loading">
<el-table-column label="选择" width="55">
<template #default="scope">
<el-radio v-model="selectedRow" :value="scope.row" />
<el-radio v-model="selectedRowId" :value="scope.row.user_id" />
</template>
</el-table-column>
<el-table-column label="序号">
@ -33,7 +32,7 @@
<div class="dialog-footer">
<el-button @click="$emit('update:modelValue', false)">关闭</el-button>
<el-button type="primary"
@click="() => { $emit('update:modelValue', false); $emit('selected', selectedRow); }">确认</el-button>
@click="() => { $emit('update:modelValue', false); $emit('selected', tableData.find(o => o.user_id === selectedRowId) || {}); }">确认</el-button>
</div>
</template>
</el-dialog>
@ -53,7 +52,7 @@ watch(() => props.modelValue, () => getList());
//
const tableData = reactive<any[]>([]);
const selectedRow = ref();
const selectedRowId = ref();
//
const total = ref(0);

@ -1,7 +1,7 @@
<template>
<div>
<el-button type="primary" icon="Plus" @click="add" class="btn">新增</el-button>
<el-button type="primary" icon="Plus" @click="del" class="btn" v-show="isSele">删除</el-button>
<el-button type="danger" icon="Delete" @click="del" class="btn" v-show="isSele">删除</el-button>
<div class="table-box">
<el-table ref="multipleTableRef" border :data="tableData"
@select="(selection: any[]) => isSele = !!selection.length" height="276px">
@ -140,7 +140,7 @@ const visible = ref(false);
//
const handleSelected = (row: any = {}) => {
if (tableData.some(o => o.id === row.id)) {
if (tableData.some(o => o.teacherid === row.user_id)) {
ElMessage({
message: '用户不能多选!',
type: 'error'

Loading…
Cancel
Save