feat: 会议ID应用赋值 + 会议表单/详情优化 + admin工作台统计与用户管理
- meetingId 由 DB 自增改为应用赋值 10 位数字 (yyMMdd + 4 位序列, Redis 按日期计数) - 会议开始时间不能晚于结束时间校验; 参会人表单身份证附件/角色单独一行 - 会议详情左右列比例 7:3 -> 8:2 (材料审核列收窄) - admin/workbench 用户总数/角色类型数/各角色分布统计修复 (改用 listByRole 按 role_type 过滤) - 新增 admin 用户管理接口 + 门户页脚 + H5 签到/上传优化
This commit is contained in:
@@ -54,6 +54,7 @@ import { uploadToOss } from '@/utils/oss'
|
||||
|
||||
const props = defineProps({
|
||||
modelValue: { type: String, default: '' },
|
||||
name: { type: String, default: '' }, // 原文件名 (v-model:name 回传, 用于显示而非 OSS key)
|
||||
dir: { type: String, default: 'ry8080/file/' },
|
||||
placeholder: { type: String, default: '点击上传文件' },
|
||||
hint: { type: String, default: '' },
|
||||
@@ -64,16 +65,23 @@ const props = defineProps({
|
||||
showPreview: { type: Boolean, default: true } // 右侧预览框 (图片/PDF/其他)
|
||||
})
|
||||
|
||||
const emit = defineEmits(['update:modelValue'])
|
||||
const emit = defineEmits(['update:modelValue', 'update:name'])
|
||||
|
||||
const fileInput = ref(null)
|
||||
const uploading = ref(false)
|
||||
|
||||
const fileName = computed(() => {
|
||||
// 优先用调用方回传的原文件名 (v-model:name); 没有则从 OSS key 还原原名
|
||||
if (props.name) return props.name
|
||||
if (!props.modelValue) return ''
|
||||
// 取 URL 最后一段, 去 query 参数
|
||||
// 取 URL 最后一段, 去 query 参数; 上传时已对路径做了 encodeURIComponent, 这里先还原
|
||||
const url = props.modelValue.split('?')[0]
|
||||
return url.substring(url.lastIndexOf('/') + 1)
|
||||
let last = url.substring(url.lastIndexOf('/') + 1)
|
||||
try { last = decodeURIComponent(last) } catch (e) { /* 已解码/旧 key, 原样用 */ }
|
||||
// 新 key 格式: 原名_时间戳_随机串.扩展名 → 还原 原名.扩展名; 旧 key (无原名) 原样返回
|
||||
const m = last.match(/^(.+)_\d{13}_[a-z0-9]{6}(\.[^.]+)?$/)
|
||||
if (m) return m[1] + (m[2] || '')
|
||||
return last
|
||||
})
|
||||
const ext = computed(() => {
|
||||
const n = fileName.value
|
||||
@@ -127,6 +135,7 @@ async function onFileChange(e) {
|
||||
try {
|
||||
const url = await uploadToOss(file, props.dir)
|
||||
emit('update:modelValue', url)
|
||||
emit('update:name', file.name)
|
||||
ElMessage.success('上传成功')
|
||||
} catch (err) {
|
||||
ElMessage.error(err.message || '上传失败')
|
||||
@@ -137,6 +146,7 @@ async function onFileChange(e) {
|
||||
|
||||
function onRemove() {
|
||||
emit('update:modelValue', '')
|
||||
emit('update:name', '')
|
||||
}
|
||||
</script>
|
||||
|
||||
|
||||
@@ -0,0 +1,112 @@
|
||||
<template>
|
||||
<footer class="footer">
|
||||
<div class="container">
|
||||
<div class="footer-main">
|
||||
<div class="footer-brand">
|
||||
<div class="brand-row">
|
||||
<div class="footer-logo-icon"><img src="/logo.png" alt="logo" /></div>
|
||||
<div>
|
||||
<div class="footer-brand-name">北京整合医学学会</div>
|
||||
<div class="footer-brand-en">Beijing Association of Holistic Integrative Medicine</div>
|
||||
</div>
|
||||
</div>
|
||||
<p class="footer-desc">依托"健康中国2030"战略,整合医学资源,推动健康科普与公益事业,助力全民健康素养提升,共建共享健康中国。</p>
|
||||
</div>
|
||||
<div class="footer-col">
|
||||
<h4>快速导航</h4>
|
||||
<a @click.prevent="goHome">年度项目规划</a>
|
||||
<a @click.prevent="goPublicity">项目公示</a>
|
||||
<a href="https://v2.bahim.org.cn/computer/#/home" target="_blank" rel="noopener">北京整合医学学会首页</a>
|
||||
</div>
|
||||
<div class="footer-col">
|
||||
<h4>学会项目</h4>
|
||||
<a href="https://bxxcx.bahim.org.cn/#/" target="_blank" rel="noopener">百姓巡常行</a>
|
||||
<a href="https://v2.bahim.org.cn/computer/#/project/home/title=%E5%81%A5%E5%BA%B7%E4%B8%AD%E5%9B%BD%E8%A1%8C%E5%8A%A8%E7%B3%BB%E5%88%97%E9%87%8D%E7%82%B9%E9%A1%B9%E7%9B%AE?columnId=59&projectId=5" target="_blank" rel="noopener">健康中国行动</a>
|
||||
<a href="https://v2.bahim.org.cn/computer/#/project/home/title=%E4%B9%A1%E6%9D%91%E5%B9%B8%E7%A6%8F%E5%AE%89%E5%BA%B7%E5%B7%A5%E7%A8%8B?columnId=25&projectId=2" target="_blank" rel="noopener">乡村幸福安康工程</a>
|
||||
<a href="https://v2.bahim.org.cn/computer/#/project/home/title=%E4%B8%B4%E5%BA%8A%E7%A7%91%E7%A0%94%E8%B5%84%E5%8A%A9%E8%AE%A1%E5%88%92?columnId=27&projectId=4" target="_blank" rel="noopener">临床科研资助计划</a>
|
||||
</div>
|
||||
<div class="footer-col">
|
||||
<h4>联系方式</h4>
|
||||
<p>电话: 010-82089470</p>
|
||||
<p>邮箱: contactus@bahim.org.cn</p>
|
||||
<p>地址: 北京市海淀区知春路1号学院国际大厦908-2室</p>
|
||||
<p>邮编: 100083</p>
|
||||
</div>
|
||||
<div class="footer-qr">
|
||||
<div class="qr-image">
|
||||
<img src="/qrcode_1.png" alt="公众号二维码" style="width:100%;height:100%;object-fit:contain;" />
|
||||
</div>
|
||||
<div class="qr-label">公众号二维码</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="footer-bottom">
|
||||
<span>© 北京整合医学学会 BAHIM</span>
|
||||
<span>京ICP备2020035479号-1 京公网安备11010802034820</span>
|
||||
</div>
|
||||
</div>
|
||||
</footer>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { useRouter } from 'vue-router'
|
||||
|
||||
const router = useRouter()
|
||||
|
||||
function goHome() {
|
||||
if (router.currentRoute.value.path === '/') {
|
||||
window.scrollTo({ top: 0, behavior: 'smooth' })
|
||||
} else {
|
||||
router.push('/')
|
||||
}
|
||||
}
|
||||
function goPublicity() { router.push('/publicity') }
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.container { max-width: 1354px; margin: 0 auto; padding: 0 60px; }
|
||||
.footer { background: var(--brand-primary-darker); color: rgba(255, 255, 255, 0.65); padding: 48px 0 0; }
|
||||
.footer-main { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.2fr auto; gap: 48px; padding-bottom: 36px; }
|
||||
.footer-brand .brand-row { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; }
|
||||
.footer-logo-icon {
|
||||
width: 36px; height: 36px;
|
||||
display: flex; align-items: center; justify-content: center;
|
||||
overflow: hidden; flex-shrink: 0;
|
||||
}
|
||||
.footer-logo-icon img { width: 100%; height: 100%; object-fit: contain; display: block; }
|
||||
.footer-brand-name { font-size: 16px; font-weight: 600; color: #fff; letter-spacing: 1px; }
|
||||
.footer-brand-en { font-size: 10px; color: rgba(255, 255, 255, 0.4); letter-spacing: 0.5px; margin-top: 2px; }
|
||||
.footer-desc { font-size: 13px; line-height: 1.9; color: rgba(255, 255, 255, 0.55); }
|
||||
.footer-col h4 {
|
||||
font-size: 14px; font-weight: 600; color: #fff;
|
||||
letter-spacing: 1px; margin-bottom: 16px; padding-bottom: 10px;
|
||||
position: relative;
|
||||
}
|
||||
.footer-col h4::after {
|
||||
content: ''; position: absolute; left: 0; bottom: 0;
|
||||
width: 24px; height: 2px; background: #93c5fd;
|
||||
}
|
||||
.footer-col a, .footer-col p {
|
||||
display: block; font-size: 13px; color: rgba(255, 255, 255, 0.6);
|
||||
line-height: 2.1; transition: color 0.2s;
|
||||
}
|
||||
.footer-col a { cursor: pointer; }
|
||||
.footer-col a:hover { color: #fff; }
|
||||
.footer-qr { text-align: center; }
|
||||
.qr-image {
|
||||
width: 100px; height: 100px;
|
||||
background: #fff;
|
||||
display: flex; align-items: center; justify-content: center;
|
||||
color: #1f2937;
|
||||
}
|
||||
.qr-label { font-size: 12px; color: rgba(255, 255, 255, 0.5); margin-top: 10px; }
|
||||
.footer-bottom {
|
||||
border-top: 1px solid rgba(255, 255, 255, 0.12);
|
||||
padding: 18px 0;
|
||||
display: flex; justify-content: space-between;
|
||||
font-size: 12px; color: rgba(255, 255, 255, 0.4);
|
||||
}
|
||||
|
||||
@media (max-width: 900px) {
|
||||
.container { padding: 0 24px; }
|
||||
}
|
||||
</style>
|
||||
@@ -43,52 +43,7 @@
|
||||
</main>
|
||||
|
||||
<!-- ========== 底部 ========== -->
|
||||
<footer class="footer">
|
||||
<div class="container">
|
||||
<div class="footer-main">
|
||||
<div class="footer-brand">
|
||||
<div class="brand-row">
|
||||
<div class="footer-logo-icon"><img src="/logo.png" alt="logo" /></div>
|
||||
<div>
|
||||
<div class="footer-brand-name">北京整合医学学会</div>
|
||||
<div class="footer-brand-en">Beijing Association of Holistic Integrative Medicine</div>
|
||||
</div>
|
||||
</div>
|
||||
<p class="footer-desc">依托"健康中国2030"战略,整合医学资源,推动健康科普与公益事业,助力全民健康素养提升,共建共享健康中国。</p>
|
||||
</div>
|
||||
<div class="footer-col">
|
||||
<h4>快速导航</h4>
|
||||
<a @click.prevent="goHome">首页</a>
|
||||
<a @click.prevent="goHome">年度项目规划</a>
|
||||
<a @click.prevent="goPublicity">项目公示</a>
|
||||
</div>
|
||||
<div class="footer-col">
|
||||
<h4>学会项目</h4>
|
||||
<a>百姓巡常行</a>
|
||||
<a>专病联盟暨全国专家智库</a>
|
||||
<a>乡村幸福安康</a>
|
||||
<a>临床科研资助计划</a>
|
||||
</div>
|
||||
<div class="footer-col">
|
||||
<h4>联系方式</h4>
|
||||
<p>电话: 010-82089470</p>
|
||||
<p>邮箱: contactus@bahim.org.cn</p>
|
||||
<p>地址: 北京市海淀区知春路1号学院国际大厦908-2室</p>
|
||||
<p>邮编: 100083</p>
|
||||
</div>
|
||||
<div class="footer-qr">
|
||||
<div class="qr-image">
|
||||
<img src="/qrcode_1.png" alt="公众号二维码" style="width:100%;height:100%;object-fit:contain;" />
|
||||
</div>
|
||||
<div class="qr-label">公众号二维码</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="footer-bottom">
|
||||
<span>© 北京整合医学学会 BAHIM</span>
|
||||
<span>京ICP备2020035479号-1 京公网安备11010802034820</span>
|
||||
</div>
|
||||
</div>
|
||||
</footer>
|
||||
<PortalFooter />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@@ -97,6 +52,7 @@ import { ref, computed, onMounted, onBeforeUnmount } from 'vue'
|
||||
import { useRouter } from 'vue-router'
|
||||
import { useUserStore } from '@/store/user'
|
||||
import { logout as logoutApi } from '@/api/auth'
|
||||
import PortalFooter from '@/components/PortalFooter.vue'
|
||||
|
||||
defineProps({
|
||||
activeNav: { type: String, default: '' } // 'home' | 'publicity' | ''
|
||||
@@ -112,7 +68,7 @@ const userName = computed(() => userStore.user?.userName || '用户')
|
||||
|
||||
function handleScroll() { isScrolled.value = window.scrollY > 10 }
|
||||
|
||||
function goHome() { isScrolled.value = false; router.push('/portal/home') }
|
||||
function goHome() { isScrolled.value = false; router.push('/') }
|
||||
function goPublicity() { router.push('/publicity') }
|
||||
function goLogin() { router.push('/login') }
|
||||
async function goLogout() {
|
||||
@@ -203,53 +159,8 @@ a { color: inherit; text-decoration: none; }
|
||||
|
||||
/* ========== 主体容器 ========== */
|
||||
.portal-main { min-height: calc(100vh - 72px - 350px); } /* 给 footer 留位 */
|
||||
.container { max-width: 1354px; margin: 0 auto; padding: 0 60px; }
|
||||
|
||||
/* ========== 底部 ========== */
|
||||
.footer { background: var(--brand-primary-darker); color: rgba(255, 255, 255, 0.65); padding: 48px 0 0; }
|
||||
.footer-main { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.2fr auto; gap: 48px; padding-bottom: 36px; }
|
||||
.footer-brand .brand-row { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; }
|
||||
.footer-logo-icon {
|
||||
width: 36px; height: 36px;
|
||||
display: flex; align-items: center; justify-content: center;
|
||||
overflow: hidden; flex-shrink: 0;
|
||||
}
|
||||
.footer-logo-icon img { width: 100%; height: 100%; object-fit: contain; display: block; }
|
||||
.footer-brand-name { font-size: 16px; font-weight: 600; color: #fff; letter-spacing: 1px; }
|
||||
.footer-brand-en { font-size: 10px; color: rgba(255, 255, 255, 0.4); letter-spacing: 0.5px; margin-top: 2px; }
|
||||
.footer-desc { font-size: 13px; line-height: 1.9; color: rgba(255, 255, 255, 0.55); }
|
||||
.footer-col h4 {
|
||||
font-size: 14px; font-weight: 600; color: #fff;
|
||||
letter-spacing: 1px; margin-bottom: 16px; padding-bottom: 10px;
|
||||
position: relative;
|
||||
}
|
||||
.footer-col h4::after {
|
||||
content: ''; position: absolute; left: 0; bottom: 0;
|
||||
width: 24px; height: 2px; background: #93c5fd;
|
||||
}
|
||||
.footer-col a, .footer-col p {
|
||||
display: block; font-size: 13px; color: rgba(255, 255, 255, 0.6);
|
||||
line-height: 2.1; transition: color 0.2s;
|
||||
}
|
||||
.footer-col a { cursor: pointer; }
|
||||
.footer-col a:hover { color: #fff; }
|
||||
.footer-qr { text-align: center; }
|
||||
.qr-image {
|
||||
width: 100px; height: 100px;
|
||||
background: #fff;
|
||||
display: flex; align-items: center; justify-content: center;
|
||||
color: #1f2937;
|
||||
}
|
||||
.qr-label { font-size: 12px; color: rgba(255, 255, 255, 0.5); margin-top: 10px; }
|
||||
.footer-bottom {
|
||||
border-top: 1px solid rgba(255, 255, 255, 0.12);
|
||||
padding: 18px 0;
|
||||
display: flex; justify-content: space-between;
|
||||
font-size: 12px; color: rgba(255, 255, 255, 0.4);
|
||||
}
|
||||
|
||||
@media (max-width: 900px) {
|
||||
.top-nav { padding: 0 24px; }
|
||||
.container { padding: 0 24px; }
|
||||
}
|
||||
</style>
|
||||
@@ -1,10 +1,22 @@
|
||||
<template>
|
||||
<el-dialog v-model="open" :title="title" width="780" top="6vh" :close-on-click-modal="false" destroy-on-close>
|
||||
<div v-if="fileUrl" class="preview-box">
|
||||
<!-- 多图 (身份证正反面等): 并排缩略图, 点开走 el-image 全屏轮播 -->
|
||||
<div v-if="isMulti" class="preview-gallery">
|
||||
<el-image
|
||||
v-for="(f, i) in files"
|
||||
:key="i"
|
||||
:src="f"
|
||||
:preview-src-list="files"
|
||||
:initial-index="i"
|
||||
fit="contain"
|
||||
class="preview-gallery-item"
|
||||
/>
|
||||
</div>
|
||||
<div v-else-if="primary" class="preview-box">
|
||||
<!-- 图片 -->
|
||||
<img v-if="kind === 'image'" :src="fileUrl" class="preview-img" :alt="title" />
|
||||
<img v-if="kind === 'image'" :src="primary" class="preview-img" :alt="title" />
|
||||
<!-- PDF:iframe 预览,浏览器内置 viewer -->
|
||||
<iframe v-else-if="kind === 'pdf'" :src="proxyUrl(fileUrl)" class="preview-iframe" />
|
||||
<iframe v-else-if="kind === 'pdf'" :src="proxyUrl(primary)" class="preview-iframe" />
|
||||
<!-- 其它(doc/xls/zip 等):给下载链接 -->
|
||||
<div v-else class="preview-fallback">
|
||||
<el-icon class="fallback-icon"><Document /></el-icon>
|
||||
@@ -16,7 +28,7 @@
|
||||
<el-empty v-else description="暂无附件" />
|
||||
<template #footer>
|
||||
<el-button @click="open = false">关闭</el-button>
|
||||
<el-button v-if="fileUrl" type="primary" @click="openNew">在新窗口打开</el-button>
|
||||
<el-button v-if="primary && !isMulti" type="primary" @click="openNew">在新窗口打开</el-button>
|
||||
</template>
|
||||
</el-dialog>
|
||||
</template>
|
||||
@@ -29,6 +41,8 @@ import { ElMessage } from 'element-plus'
|
||||
const props = defineProps({
|
||||
modelValue: Boolean,
|
||||
url: { type: String, default: '' },
|
||||
// 多文件列表 (身份证正反面等): 传入后优先于 url, 走多图画廊预览
|
||||
urls: { type: Array, default: () => [] },
|
||||
title: { type: String, default: '附件预览' }
|
||||
})
|
||||
const emit = defineEmits(['update:modelValue'])
|
||||
@@ -38,14 +52,21 @@ const open = computed({
|
||||
set: v => emit('update:modelValue', v)
|
||||
})
|
||||
|
||||
const fileUrl = computed(() => props.url || '')
|
||||
|
||||
const kind = computed(() => {
|
||||
const u = fileUrl.value.split('?')[0].toLowerCase()
|
||||
if (/\.(png|jpe?g|gif|webp|bmp|svg)(\?.*)?$/.test(u)) return 'image'
|
||||
if (/\.pdf(\?.*)?$/.test(u)) return 'pdf'
|
||||
return 'other'
|
||||
/** 统一文件列表: urls 优先, 否则 url 单条; 空段过滤 */
|
||||
const files = computed(() => {
|
||||
if (Array.isArray(props.urls) && props.urls.length) return props.urls.filter(Boolean)
|
||||
return props.url ? [props.url] : []
|
||||
})
|
||||
const primary = computed(() => files.value[0] || '')
|
||||
const isMulti = computed(() => files.value.length > 1)
|
||||
|
||||
function kindOf(u) {
|
||||
const x = (u || '').split('?')[0].toLowerCase()
|
||||
if (/\.(png|jpe?g|gif|webp|bmp|svg)(\?.*)?$/.test(x)) return 'image'
|
||||
if (/\.pdf(\?.*)?$/.test(x)) return 'pdf'
|
||||
return 'other'
|
||||
}
|
||||
const kind = computed(() => kindOf(primary.value))
|
||||
|
||||
// OSS bucket 设置了 Content-Disposition: attachment, iframe 直接访问会被强制下载 (空白+下载)
|
||||
// PDF 走 /common/oss/proxy 后端代理重写为 inline (与 publicity/{id} / doctor/Meetings / manager/Plans 同技术)
|
||||
@@ -59,13 +80,13 @@ function proxyUrl(url) {
|
||||
}
|
||||
|
||||
function openNew() {
|
||||
if (!fileUrl.value) return
|
||||
window.open(proxyUrl(fileUrl.value), '_blank', 'noopener')
|
||||
if (!primary.value) return
|
||||
window.open(proxyUrl(primary.value), '_blank', 'noopener')
|
||||
}
|
||||
async function copyUrl() {
|
||||
if (!fileUrl.value) return
|
||||
if (!primary.value) return
|
||||
try {
|
||||
await navigator.clipboard.writeText(fileUrl.value)
|
||||
await navigator.clipboard.writeText(primary.value)
|
||||
ElMessage.success('链接已复制')
|
||||
} catch {
|
||||
ElMessage.error('复制失败,请手动复制')
|
||||
@@ -80,4 +101,6 @@ async function copyUrl() {
|
||||
.preview-fallback { text-align: center; padding: 48px 24px; color: #606266; }
|
||||
.fallback-icon { font-size: 48px; color: #909399; margin-bottom: 12px; }
|
||||
.preview-fallback p { margin: 12px 0 24px; }
|
||||
</style>
|
||||
.preview-gallery { display: flex; flex-wrap: wrap; gap: 16px; justify-content: center; align-items: flex-start; min-height: 320px; padding: 8px 0; }
|
||||
.preview-gallery-item { width: 320px; max-width: 48%; max-height: 60vh; border: 1px solid #ebeef5; border-radius: 4px; }
|
||||
</style>
|
||||
|
||||
Reference in New Issue
Block a user