From b337be5073334334962e873c1a980968ad2cf068 Mon Sep 17 00:00:00 2001
From: liu <2021943741@qq.com>
Date: 星期二, 27 十月 2026 18:06:37 +0800
Subject: [PATCH] feat(research): 课题申报成员新增成员类型并调整成员表列
---
src/views/research/application/modules/member-table.vue | 126 ++++++++++++++++++-----------------------
1 files changed, 55 insertions(+), 71 deletions(-)
diff --git a/src/views/research/application/modules/member-table.vue b/src/views/research/application/modules/member-table.vue
index 6b44423..0e21315 100644
--- a/src/views/research/application/modules/member-table.vue
+++ b/src/views/research/application/modules/member-table.vue
@@ -9,7 +9,7 @@
import { ACTION_ICON, TableAction, useVbenVxeGrid } from '#/adapter/vxe-table';
import { $t } from '#/locales';
-import { MEMBER_ROLE_OPTIONS, toSubmitMembers } from '../data';
+import { MEMBER_TYPE_OPTIONS, toSubmitMembers } from '../data';
const props = withDefaults(
defineProps<{
@@ -29,42 +29,35 @@
const [Grid, gridApi] = useVbenVxeGrid({
gridOptions: {
columns: [
- { type: 'seq', title: '搴忓彿', width: 55, fixed: 'left' },
+ {
+ field: 'sortNo',
+ title: '缃插悕椤哄簭',
+ width: 110,
+ slots: { default: 'sortNo' },
+ },
+ {
+ field: 'memberType',
+ title: '鎴愬憳绫诲瀷',
+ width: 130,
+ slots: { default: 'memberType' },
+ },
{
field: 'name',
- title: '濮撳悕',
- minWidth: 110,
+ title: '鎴愬憳濮撳悕',
+ minWidth: 120,
slots: { default: 'name' },
},
{
- field: 'contactPhone',
- title: '鑱旂郴鐢佃瘽',
- minWidth: 140,
- slots: { default: 'contactPhone' },
- },
- {
field: 'workUnit',
- title: '鎵�灞炲崟浣�',
- minWidth: 180,
+ title: '鎵�灞為儴闂�',
+ minWidth: 220,
slots: { default: 'workUnit' },
},
{
field: 'jobTitle',
- title: '鑱岀О/鑱屽姟',
- minWidth: 120,
- slots: { default: 'jobTitle' },
- },
- {
- field: 'memberRole',
- title: '鎴愬憳瑙掕壊',
+ title: '鑱岀О',
minWidth: 130,
- slots: { default: 'memberRole' },
- },
- {
- field: 'sortNo',
- title: '鎺掑簭',
- width: 90,
- slots: { default: 'sortNo' },
+ slots: { default: 'jobTitle' },
},
{
title: '鎿嶄綔',
@@ -113,7 +106,7 @@
async function handleAdd() {
await gridApi.grid.insertAt(
{
- memberRole: '鍙備笌浜�',
+ memberType: '鏁欏笀',
sortNo: collectMembers().length + 1,
} as unknown as ResearchApplicationApi.ApplicationMember,
-1,
@@ -133,7 +126,7 @@
for (let i = 0; i < rows.length; i++) {
const row = rows[i];
if (!row?.name || String(row.name).trim() === '') {
- throw new Error(`绗� ${i + 1} 琛屾垚鍛橈細璇峰~鍐欏鍚峘);
+ throw new Error(`绗� ${i + 1} 琛屾垚鍛橈細璇峰~鍐欐垚鍛樺鍚峘);
}
const phone = row.contactPhone ? String(row.contactPhone).trim() : '';
if (phone !== '' && !/^1[3-9]\d{9}$/.test(phone)) {
@@ -165,49 +158,6 @@
<template>
<Grid class="w-full">
- <template #name="{ row }">
- <Input
- v-model:value="row.name"
- :disabled="disabled"
- placeholder="璇疯緭鍏ュ鍚�"
- @change="() => recalc()"
- />
- </template>
- <template #contactPhone="{ row }">
- <Input
- v-model:value="row.contactPhone"
- :disabled="disabled"
- :maxlength="11"
- placeholder="11 浣嶆墜鏈哄彿锛堥�夊~锛�"
- @change="() => recalc()"
- />
- </template>
- <template #workUnit="{ row }">
- <Input
- v-model:value="row.workUnit"
- :disabled="disabled"
- placeholder="璇疯緭鍏ユ墍灞炲崟浣�"
- @change="() => recalc()"
- />
- </template>
- <template #jobTitle="{ row }">
- <Input
- v-model:value="row.jobTitle"
- :disabled="disabled"
- placeholder="璇疯緭鍏ヨ亴绉�/鑱屽姟"
- @change="() => recalc()"
- />
- </template>
- <template #memberRole="{ row }">
- <Select
- v-model:value="row.memberRole"
- :disabled="disabled"
- :options="MEMBER_ROLE_OPTIONS"
- placeholder="璇烽�夋嫨瑙掕壊"
- allow-clear
- @change="() => recalc()"
- />
- </template>
<template #sortNo="{ row }">
<InputNumber
v-model:value="row.sortNo"
@@ -218,6 +168,40 @@
@change="() => recalc()"
/>
</template>
+ <template #memberType="{ row }">
+ <Select
+ v-model:value="row.memberType"
+ :disabled="disabled"
+ :options="MEMBER_TYPE_OPTIONS"
+ placeholder="璇烽�夋嫨鎴愬憳绫诲瀷"
+ allow-clear
+ @change="() => recalc()"
+ />
+ </template>
+ <template #name="{ row }">
+ <Input
+ v-model:value="row.name"
+ :disabled="disabled"
+ placeholder="璇疯緭鍏ユ垚鍛樺鍚�"
+ @change="() => recalc()"
+ />
+ </template>
+ <template #workUnit="{ row }">
+ <Input
+ v-model:value="row.workUnit"
+ :disabled="disabled"
+ placeholder="璇疯緭鍏ユ墍灞為儴闂�"
+ @change="() => recalc()"
+ />
+ </template>
+ <template #jobTitle="{ row }">
+ <Input
+ v-model:value="row.jobTitle"
+ :disabled="disabled"
+ placeholder="璇疯緭鍏ヨ亴绉�"
+ @change="() => recalc()"
+ />
+ </template>
<template #actions="{ row }">
<TableAction
:actions="[
--
Gitblit v1.9.3