feat(项目管理): 招标字段/负责人/导出/下拉/登录短信 完整链路
后端 (ruoyi-business) - BizProject: +is_bid_project, +execOrgNames(GROUP_CONCAT派生), +leadUserName - BizProjectMapper.xml: 上述字段全部贯通 selectFields/insert/update, 列表加 exec_org_names 子查询 + lead_user_name JOIN - BizSysUserQueryMapper (新): 干净查 sys_user by role_type, 避开 @DataScope 切面污染, 用于项目负责人下拉 - BizOrgMapper.selectExecutorOrgOptions (新): JOIN sys_user (parent_user_id IS NULL) 限定 MAIN 账号, 排除同公司普通员工子账号 - BizOrgController: +/business/org/executorOptions 端点 - BizExecutionIntentController: +exportSignupExperts 端点 (POST /business/executionIntent/export) - BizSignupExpertExportVo (新): 中文列头 Excel 导出 VO (专家姓名/科室/医院/职称/报名时间/手机号) - BizProjectAssign / SponsorAssign 重命名 + Service 实现调整 - 删除 sql/ 下所有迁移脚本 (按用户要求不再保存 SQL 文件) 前端 (ry-vue3) - api/system.js: +listExecutorOrgs 走新接口, listExecutor/listSupporters/listManagers 保持 listByRole 兼容 - views/manager/Projects.vue: 执行方下拉改 label=u.orgName / value=u.userId, 数据源走 listExecutorOrgs +execOrgNames 列展示 +导出报名专家 dropdown 项 +is_bid_project 表单字段 - views/manager/ProjectsNew.vue + ManagerProjectDetail.vue: +is_bid_project 表单/展示 - views/auth/Login.vue: +手机号验证码登录 tab (复用 SysSmsService, dev 模式 10 开头手机号固定码 1234) - 路由/布局/角色视角多页面整理 (SponsorOrgs/People/SponsorPersonNew 等) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -20,6 +20,24 @@
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row :gutter="12">
|
||||
<el-col :span="12">
|
||||
<el-form-item label="项目负责人">
|
||||
<el-select v-model="form.leadUserId" placeholder="请选择合规管理员" filterable clearable :filter-method="searchManagers" style="width:100%">
|
||||
<el-option v-for="u in managerOptions" :key="u.userId"
|
||||
:label="`${u.userName}${u.nickName ? ' (' + u.nickName + ')' : ''}`" :value="u.userId" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="是否招标项目">
|
||||
<el-select v-model="form.isBidProject" placeholder="请选择" style="width:100%" clearable>
|
||||
<el-option label="是" value="Y" />
|
||||
<el-option label="否" value="N" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row :gutter="12">
|
||||
<el-col :span="12">
|
||||
<el-form-item label="项目形式" prop="projectForm">
|
||||
@@ -61,22 +79,6 @@
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row :gutter="12">
|
||||
<el-col :span="12">
|
||||
<el-form-item label="提交截止(天)">
|
||||
<el-input-number v-model="form.submitDeadlineDays" :min="0" controls-position="right" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="支持单位">
|
||||
<el-select v-model="form.sponsorAdminUserId" placeholder="请选择赞助方负责人" filterable clearable style="width:100%" @change="onSupporterPick">
|
||||
<el-option v-for="u in supporterOptions" :key="u.userId"
|
||||
:label="`${u.userName}${u.nickName ? ' (' + u.nickName + ')' : ''}`"
|
||||
:value="u.userId" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<!-- ========== 第二区块:角色劳务设置 ========== -->
|
||||
<div class="new-card-title">角色劳务设置</div>
|
||||
@@ -134,7 +136,7 @@
|
||||
import { ref, reactive, onMounted } from 'vue'
|
||||
import { useRoute, useRouter } from 'vue-router'
|
||||
import { bizAdd, bizUpdate, bizGet } from '@/api/public'
|
||||
import { listExecutor, listSupporters } from '@/api/system'
|
||||
import { listExecutor, listManagers } from '@/api/system'
|
||||
import { ElMessage, ElMessageBox } from 'element-plus'
|
||||
import request from '@/utils/request'
|
||||
import OssFileUploader from '@/components/OssFileUploader.vue'
|
||||
@@ -150,18 +152,18 @@ const fileInputRef = ref(null)
|
||||
function defaultRoleRow() { return { role: '', customName: '', amount: 0 } }
|
||||
function defaultNotice(key, label) { return { key, label, url: '', name: '' } }
|
||||
|
||||
// 支持方候选 (sponsor 角色)
|
||||
const supporterOptions = ref([])
|
||||
// 项目负责人候选 (合规管理员, sys_user.role_type='manager')
|
||||
const managerOptions = ref([])
|
||||
let _managerTimer = null
|
||||
|
||||
const form = reactive({
|
||||
projectName: '', projectNo: '', projectForm: '',
|
||||
// 项目负责人 (sys_user.role_type='manager' 合规管理员, 名称由后端 JOIN 查, 不缓存)
|
||||
leadUserId: null,
|
||||
// 是否招标项目 Y/N (默认 N)
|
||||
isBidProject: 'N',
|
||||
totalSessions: 0, totalAmount: 0, manageFee: 0,
|
||||
startTime: '', endTime: '',
|
||||
// 赞助方负责人 (sys_user.role_type='sponsor', 原 org_id/org_name 字段已重命名)
|
||||
sponsorAdminUserId: null,
|
||||
sponsorAdminUserName: '',
|
||||
// 提交截止(天)
|
||||
submitDeadlineDays: 30,
|
||||
roleRows: [
|
||||
{ role: '主席', customName: '', amount: 0 },
|
||||
{ role: '主持', customName: '', amount: 0 },
|
||||
@@ -222,9 +224,8 @@ async function loadProject() {
|
||||
form.manageFee = p.manageFee || 0
|
||||
form.startTime = p.startTime || ''
|
||||
form.endTime = p.endTime || ''
|
||||
form.sponsorAdminUserId = p.sponsorAdminUserId || null
|
||||
form.sponsorAdminUserName = p.sponsorAdminUserName || ''
|
||||
form.submitDeadlineDays = p.submitDeadlineDays || 30
|
||||
form.leadUserId = p.leadUserId || null
|
||||
form.isBidProject = p.isBidProject || 'N'
|
||||
// 公告文件反显: 优先 publicityFiles JSON 数组, 否则兼容旧字段
|
||||
const files = []
|
||||
if (Array.isArray(p.publicityFiles)) files.push(...p.publicityFiles)
|
||||
@@ -258,27 +259,29 @@ async function loadProject() {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
async function loadSupporters(query = '') {
|
||||
try {
|
||||
const params = { roleType: 'sponsor', pageNum: 1, pageSize: 50 }
|
||||
if (query) params.userName = query
|
||||
const r = await listSupporters(params)
|
||||
supporterOptions.value = (r.data && r.data.rows) || r.rows || []
|
||||
} catch (e) { supporterOptions.value = [] }
|
||||
// 加载项目负责人 (合规管理员, sys_user.role_type='manager')
|
||||
async function loadManagers(query) {
|
||||
if (_managerTimer) clearTimeout(_managerTimer)
|
||||
_managerTimer = setTimeout(async () => {
|
||||
try {
|
||||
const params = { pageNum: 1, pageSize: 50 }
|
||||
if (query) params.userName = query
|
||||
const r = await listManagers(params)
|
||||
managerOptions.value = (r.data && r.data.rows) || r.rows || []
|
||||
// 已选项不在结果里时按 userId 单独拉取并加首位, 避免 el-select 选中后 label 空白
|
||||
if (form.leadUserId && !managerOptions.value.find(u => u.userId === form.leadUserId)) {
|
||||
const r2 = await listManagers({ userId: form.leadUserId })
|
||||
const sel = (r2.data && r2.data.rows) || r2.rows || []
|
||||
if (sel[0]) managerOptions.value = [sel[0], ...managerOptions.value]
|
||||
}
|
||||
} catch (e) { managerOptions.value = [] }
|
||||
}, 200)
|
||||
}
|
||||
|
||||
function onSupporterPick(userId) {
|
||||
const u = supporterOptions.value.find(x => x.userId === userId)
|
||||
if (u) form.sponsorAdminUserName = u.userName || ''
|
||||
}
|
||||
|
||||
|
||||
|
||||
function searchManagers(q) { loadManagers(q) }
|
||||
|
||||
onMounted(() => {
|
||||
loadProject()
|
||||
loadSupporters('')
|
||||
loadManagers('')
|
||||
})
|
||||
function goBack() {
|
||||
// 带 _t 强制 Projects.vue watch 触发 reload, 即便路由一样也重载
|
||||
@@ -301,9 +304,8 @@ async function submit(mode = 'save') {
|
||||
manageFee: form.manageFee,
|
||||
startTime: form.startTime,
|
||||
endTime: form.endTime,
|
||||
sponsorAdminUserId: form.sponsorAdminUserId,
|
||||
sponsorAdminUserName: form.sponsorAdminUserName,
|
||||
submitDeadlineDays: form.submitDeadlineDays
|
||||
leadUserId: form.leadUserId,
|
||||
isBidProject: form.isBidProject
|
||||
}
|
||||
// 公告文件以 publicityFiles JSON 数组存储 (替代旧 invitationUrl/supportLetterUrl/noticeUrl/scheduleUrl)
|
||||
payload.publicityFiles = JSON.stringify(uploaded.map(n => ({
|
||||
|
||||
Reference in New Issue
Block a user