| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991 |
- <template>
- <view class="list-container">
- <!-- 成员过滤 -->
- <view class="member-filter">
- <scroll-view class="filter-scroll" scroll-x="true" :show-scrollbar="false">
- <view class="filter-chips">
- <view class="chip" :class="{ 'chip-active': !selectedMemberId }" @click="selectAllMembers">
- <text class="chip-text">全部</text>
- </view>
- <view
- class="chip"
- v-for="item in members"
- :key="item.id"
- :class="{ 'chip-active': selectedMemberId === item._filterId }"
- @click="selectMember(item)"
- >
- <text class="chip-text">{{ item.nickname || '成员' }}</text>
- </view>
- </view>
- </scroll-view>
- </view>
- <!-- 跨家庭报告转移申请 -->
- <view class="transfer-wrap" v-if="transferIncoming.length > 0 || transferOutgoing.length > 0">
- <text class="transfer-section-title">报告转移申请</text>
- <!-- 待本家庭处理:对方家庭申请将本家庭报告转入其家庭 -->
- <view class="transfer-card" v-for="item in transferIncoming" :key="item.id">
- <view class="transfer-info">
- <text class="transfer-person">{{ item.personName || '健康报告' }}</text>
- <text class="transfer-meta">报告日期:{{ formatDate(item.reportDate) || '--' }}</text>
- <text class="transfer-meta">申请时间:{{ formatDateTime(item.createdAt) }}</text>
- </view>
- <view class="transfer-actions">
- <view class="transfer-btn transfer-deny" @click.stop="denyTransfer(item)">拒绝</view>
- <view class="transfer-btn transfer-approve" @click.stop="approveTransfer(item)">同意</view>
- </view>
- </view>
- <!-- 本家庭发起的申请 -->
- <view class="transfer-card" v-for="item in transferOutgoing" :key="item.id">
- <view class="transfer-info">
- <text class="transfer-person">{{ item.personName || '健康报告' }}</text>
- <text class="transfer-meta">申请时间:{{ formatDateTime(item.createdAt) }}</text>
- <text class="transfer-status" :class="'status-' + item.status">{{ transferStatusText(item.status) }}</text>
- </view>
- </view>
- </view>
- <!-- 采集中草稿 -->
- <view class="collecting-wrap" v-if="collectingReports.length > 0">
- <view class="collecting-card" v-for="item in collectingReports" :key="item.draftId">
- <view class="collecting-icon">
- <view class="spinner"></view>
- </view>
- <view class="collecting-info">
- <text class="collecting-title">数据采集中</text>
- <text class="collecting-file">{{ item.originalFilename || '健康报告' }}</text>
- </view>
- <text class="collecting-status">解析完成后自动入库</text>
- </view>
- </view>
- <!-- 加载状态 -->
- <view class="loading-wrap" v-if="loading">
- <text class="loading-text">加载中...</text>
- </view>
- <!-- 报告列表 -->
- <view class="report-list" v-else-if="reports.length > 0">
- <view class="swipe-row" v-for="item in reports" :key="item.id">
- <!-- 右侧操作按钮(左滑后露出:删除 + 调整归属) -->
- <view class="swipe-actions">
- <view class="swipe-delete" @click.stop="confirmDelete(item)">删除</view>
- <view class="swipe-adjust" @click.stop="adjustBinding(item)">调整归属</view>
- </view>
- <!-- 卡片内容(可左滑) -->
- <view class="swipe-content"
- :class="{ 'swipe-moving': curId === item.id }"
- :style="'transform: translateX(' + (curId === item.id ? moveOffset : (openMap[item.id] ? -160 : 0)) + 'px)'"
- @touchstart="onTouchStart($event, item)"
- @touchmove="onTouchMove"
- @touchend="onTouchEnd"
- @click="onRowClick(item)">
- <view class="report-card">
- <view class="report-card-left">
- <view class="report-type-badge" :class="'badge-' + (item.reportType === 'gut_flora' ? 'gut' : item.reportType === 'tongue' ? 'tongue' : 'exam')">
- <text>{{ item.reportType === 'gut_flora' ? '肠道检测' : item.reportType === 'tongue' ? '舌诊' : '体检报告' }}</text>
- </view>
- <text class="report-person" v-if="item.personName">{{ item.personName }}</text>
- <text class="report-date">报告日期:{{ formatDate(item.reportDate) }}</text>
- <text class="report-upload-date">上传日期:{{ formatDateTime(item.createdAt) }}</text>
- </view>
- <view class="report-card-right">
- <text class="report-score">{{ item.overallScore || '--' }}<text class="score-unit">分</text></text>
- <text class="report-arrow">›</text>
- </view>
- </view>
- </view>
- </view>
- </view>
- <!-- 空状态 -->
- <view class="empty-wrap" v-else>
- <text class="empty-icon">📋</text>
- <text class="empty-title">暂无健康报告</text>
- <text class="empty-desc">上传体检报告或肠道检测报告,获取 解读</text>
- <view class="empty-btn" @click="goToUpload">上传报告</view>
- </view>
- <!-- 成员调整面板 -->
- <view class="adjust-panel" v-if="showAdjustPanel">
- <view class="panel-header">
- <text class="panel-title">调整报告归属</text>
- <view class="panel-close" @click="closeAdjustPanel">×</view>
- </view>
- <view class="panel-content">
- <!-- 取消归属选项 -->
- <view class="cancel-bind-option" @click="cancelBinding" v-if="adjustCurrentMemberId">
- <text class="cancel-bind-text">取消归属</text>
- <text class="cancel-bind-arrow">×</text>
- </view>
- <view class="member-filter">
- <scroll-view class="filter-scroll" scroll-x="true" :show-scrollbar="false">
- <view class="filter-chips">
- <view class="chip" :class="{ 'chip-active': !selectedAdjustMemberId }" @click="selectAllAdjustMembers">
- <text class="chip-text">全部</text>
- </view>
- <view
- class="chip"
- v-for="member in adjustMembers"
- :key="member.id"
- :class="{ 'chip-active': selectedAdjustMemberId === member._filterId }"
- @click="selectMemberAdjust(member)"
- >
- <text class="chip-text">{{ member.nickname || '成员' }}</text>
- </view>
- </view>
- </scroll-view>
- </view>
- <!-- 家庭成员列表 -->
- <view class="member-list" v-if="adjustMembers.length > 0">
- <view
- class="member-item"
- v-for="(member, mIdx) in adjustMembers"
- :key="mIdx"
- @click="selectMemberAdjust(member)"
- >
- <text class="member-avatar">{{ (member.nickname || '?').substring(0, 1) }}</text>
- <text class="member-name">{{ member.nickname || '未知' }}</text>
- </view>
- </view>
- </view>
- </view>
- <!-- 底部占位 -->
- <view class="bottom-spacer"></view>
- </view>
- </template>
- <script>
- import { parseDate } from '../../utils/format.js'
- import { getReportList, deleteReport, getFamilyMemberList, getCollectingReports, reassignReport, getReportTransferList, approveReportTransfer, denyReportTransfer } from '../../utils/api.js'
- export default {
- data() {
- return {
- reports: [],
- members: [],
- selectedMemberId: null,
- loading: false,
- memberId: null,
- // 异步采集中的草稿
- collectingReports: [],
- collectTimer: null,
- // 左滑删除
- openMap: {},
- curId: null,
- moveOffset: 0,
- startX: 0,
- startY: 0,
- touchDidMove: false,
- baseOffset: 0,
- // 调整归属面板状态
- showAdjustPanel: false,
- adjustReportId: null,
- adjustCurrentMemberId: null,
- // 调整面板成员数据
- adjustMembers: [],
- selectedAdjustMemberId: null,
- candidates: [],
- showAutoCreateForm: false,
- newMemberName: '',
- newMemberGender: 'male',
- // 跨家庭报告转移申请
- transferIncoming: [],
- transferOutgoing: []
- }
- },
- onLoad(options) {
- // 默认选中本人(登录用户):
- // - 无显式 memberId 时用登录 userId 过滤,后端 getMemberReports 兼容 users.id / family_members.id;
- // - 不再优先 currentChildId/currentMemberId——切换视角进入时默认也是本人,点成员 chip 才切换
- if (options.memberId) {
- this.memberId = parseInt(options.memberId, 10)
- } else {
- var loginUserId = uni.getStorageSync('userId') || ''
- this.memberId = loginUserId ? parseInt(loginUserId, 10) : null
- // 成员列表返回后把 chip 高亮从 users.id 归一到本人的 family_members.id(_filterId)
- this._selfUserId = loginUserId
- }
- this.selectedMemberId = this.memberId
- this.loadMembers()
- this.loadData()
- this.loadTransferRequests()
- this.startCollectPolling()
- },
- onShow() {
- // 从报告上传页返回时刷新列表,展示后台异步采集完成/失败的报告
- if (this._pageShown) {
- this.loadData()
- this.loadCollectingReports()
- this.loadTransferRequests()
- }
- this._pageShown = true
- },
- onUnload() {
- if (this.collectTimer) {
- clearInterval(this.collectTimer)
- this.collectTimer = null
- }
- },
- methods: {
- adjustBinding(item) {
- var self = this
- // 显示成员选择面板
- self.showAdjustPanel = true
- self.adjustReportId = item.id
- // 记录当前归属成员ID(用于判断是否显示"取消归属"选项)
- self.adjustCurrentMemberId = item.subjectId
- // 使用已加载的成员列表
- self.adjustMembers = self.members
- self.selectedAdjustMemberId = null
- },
- cancelBinding() {
- var self = this
- self.showAdjustPanel = false
- // 调用后端接口取消归属(传入 null)
- reassignReport(self.adjustReportId, null).then(function(res) {
- if (res.code === 200) {
- uni.showToast({ title: '已取消归属', icon: 'success' })
- self.loadData()
- } else {
- uni.showToast({ title: res.message || '操作失败', icon: 'none' })
- }
- }).catch(function(e) {
- console.log('取消归属失败', e)
- uni.showToast({ title: '操作失败', icon: 'none' })
- })
- },
- closeAdjustPanel() {
- this.showAdjustPanel = false
- },
- selectAdjustMember(member) {
- var self = this
- self.showAdjustPanel = false
- // 调用后端接口修改归属
- reassignReport(self.adjustReportId, member.id).then(function(res) {
- if (res.code === 200) {
- uni.showToast({ title: '归属修改成功', icon: 'success' })
- self.loadData()
- } else {
- uni.showToast({ title: res.message || '修改失败', icon: 'none' })
- }
- }).catch(function(e) {
- console.log('修改归属失败', e)
- uni.showToast({ title: '修改失败', icon: 'none' })
- })
- },
- startCollectPolling() {
- var self = this
- if (self.collectTimer) {
- clearInterval(self.collectTimer)
- }
- self.loadCollectingReports()
- self.collectTimer = setInterval(function() {
- self.loadCollectingReports()
- }, 6000)
- },
- loadCollectingReports() {
- var self = this
- var prevCount = self.collectingReports.length
- getCollectingReports().then(function(res) {
- if (res.code === 200) {
- var list = res.data || []
- self.collectingReports = list
- // 采集卡片消失后刷新列表,让刚入库的报告立刻出现
- if (prevCount > 0 && list.length < prevCount) {
- self.loadData()
- }
- }
- }).catch(function() {
- // 采集进度轮询失败静默,下一轮重试
- })
- },
- loadMembers() {
- var self = this
- getFamilyMemberList({}).then(function(res) {
- if (res.code === 200 && Array.isArray(res.data)) {
- // _filterId 预计算,供 :class 内联比较使用(小程序 :class 禁止方法调用)
- var list = []
- for (var i = 0; i < res.data.length; i++) {
- var m = res.data[i]
- list.push({
- id: m.id,
- userId: m.userId,
- nickname: m.nickname,
- avatar: m.avatar,
- _filterId: m.id || m.userId
- })
- }
- self.members = list
- // 默认选中本人时,把 chip 高亮从 users.id 归一到本人的 family_members.id(_filterId):
- // 两个 id 后端返回同一份报告,数据已在 onLoad 拉取过,这里只修高亮、不重复请求
- if (self._selfUserId && self.selectedMemberId != null &&
- Number(self.selectedMemberId) === Number(self._selfUserId)) {
- for (var j = 0; j < list.length; j++) {
- if (list[j].userId != null && Number(list[j].userId) === Number(self._selfUserId)) {
- self.selectedMemberId = list[j]._filterId
- break
- }
- }
- }
- }
- }).catch(function(e) {
- console.log('获取家庭成员失败', e)
- })
- },
- selectAllMembers() {
- if (this.selectedMemberId === null) return
- this.selectedMemberId = null
- this.loadData()
- },
- selectAllAdjustMembers() {
- if (this.selectedAdjustMemberId === null) return
- this.selectedAdjustMemberId = null
- },
- selectMember(item) {
- var filterId = item._filterId
- if (this.selectedMemberId === filterId) return
- this.selectedMemberId = filterId
- this.loadData()
- },
- selectMemberAdjust(member) {
- var self = this
- self.showAdjustPanel = false
- // 调用后端接口修改归属
- reassignReport(self.adjustReportId, member.id).then(function(res) {
- if (res.code === 200) {
- uni.showToast({ title: '归属修改成功', icon: 'success' })
- self.loadData()
- } else {
- uni.showToast({ title: res.message || '修改失败', icon: 'none' })
- }
- }).catch(function(e) {
- console.log('修改归属失败', e)
- uni.showToast({ title: '修改失败', icon: 'none' })
- })
- },
- loadData() {
- var self = this
- self.loading = true
- getReportList(self.selectedMemberId).then(function(res) {
- self.reports = res.data || []
- }).catch(function(e) {
- console.log('获取报告列表失败', e)
- uni.showToast({ title: '加载失败', icon: 'none' })
- }).finally(function() {
- self.loading = false
- })
- },
- // 跨家庭报告转移申请列表(incoming=待本家庭处理 / outgoing=本家庭发起)
- loadTransferRequests() {
- var self = this
- getReportTransferList().then(function(res) {
- if (res && res.code === 200) {
- var data = res.data || {}
- self.transferIncoming = data.incoming instanceof Array ? data.incoming : []
- self.transferOutgoing = data.outgoing instanceof Array ? data.outgoing : []
- }
- }).catch(function(e) {
- console.log('获取转移申请失败', e)
- })
- },
- transferStatusText(status) {
- if (status === 'approved') return '对方已同意,报告已转入'
- if (status === 'denied') return '对方已拒绝'
- return '等待对方同意'
- },
- approveTransfer(item) {
- var self = this
- uni.showModal({
- title: '同意转移',
- content: '同意后该报告将转入对方家庭,您的家庭将不再显示此报告。是否同意?',
- confirmColor: '#F56C6C',
- success: function(res) {
- if (!res.confirm) return
- approveReportTransfer(item.id).then(function(r) {
- if (r && r.code === 200) {
- uni.showToast({ title: '已同意,报告已转入对方家庭', icon: 'none' })
- self.loadTransferRequests()
- self.loadData()
- } else {
- uni.showToast({ title: (r && r.message) || '操作失败', icon: 'none' })
- }
- }).catch(function() {
- uni.showToast({ title: '操作失败', icon: 'none' })
- })
- }
- })
- },
- denyTransfer(item) {
- var self = this
- uni.showModal({
- title: '拒绝转移',
- content: '拒绝后该报告继续留在您的家庭。',
- success: function(res) {
- if (!res.confirm) return
- denyReportTransfer(item.id, '').then(function(r) {
- if (r && r.code === 200) {
- uni.showToast({ title: '已拒绝', icon: 'none' })
- self.loadTransferRequests()
- } else {
- uni.showToast({ title: (r && r.message) || '操作失败', icon: 'none' })
- }
- }).catch(function() {
- uni.showToast({ title: '操作失败', icon: 'none' })
- })
- }
- })
- },
- genderText(gender) {
- if (gender === 'male') return '男'
- if (gender === 'female') return '女'
- return ''
- },
- toggleAutoCreate() {
- var self = this
- self.showAutoCreateForm = !self.showAutoCreateForm
- },
- confirmCreateMember() {
- var self = this
- // 简单的创建逻辑 - 这里需要后端支持创建成员
- uni.showToast({ title: '创建功能待开发', icon: 'none' })
- self.showAutoCreateForm = false
- },
- goToDetail(reportId, reportType) {
- var url
- if (reportType === 'gut_flora') {
- url = '/pages/health/gut-flora-detail?reportId=' + reportId
- } else if (reportType === 'dan') {
- url = '/pages/dan-assessment/report-result?reportId=' + reportId
- } else {
- url = '/pages/health/report-detail?reportType=' + (reportType || 'gut_flora') + '&reportId=' + reportId
- }
- uni.navigateTo({ url: url })
- },
- onRowClick(item) {
- // 刚滑动过,忽略本次点击
- if (this.touchDidMove) {
- this.touchDidMove = false
- return
- }
- // 行处于打开态,点击先收起
- if (this.openMap[item.id]) {
- this.$set(this.openMap, item.id, false)
- return
- }
- this.goToDetail(item.id, item.reportType)
- },
- onTouchStart(e, item) {
- // 先收起其它已打开行
- if (this.curId !== null && this.curId !== item.id && this.openMap[this.curId]) {
- this.$set(this.openMap, this.curId, false)
- }
- var touch = e.touches[0]
- this.curId = item.id
- this.startX = touch.clientX
- this.startY = touch.clientY
- this.touchDidMove = false
- this.baseOffset = this.openMap[item.id] ? -160 : 0
- this.moveOffset = this.baseOffset
- },
- onTouchMove(e) {
- if (this.curId === null) return
- var touch = e.touches[0]
- var dx = touch.clientX - this.startX
- var dy = touch.clientY - this.startY
- // 横向滑动(水平分量大于垂直分量)
- if (Math.abs(dx) > Math.abs(dy)) {
- this.touchDidMove = Math.abs(dx) > 10
- var offset = this.baseOffset + dx
- if (offset < -160) offset = -160
- if (offset > 0) offset = 0
- this.moveOffset = offset
- }
- },
- onTouchEnd() {
- if (this.curId === null) return
- // 位移超过阈值则打开,否则收起
- var shouldOpen = this.moveOffset < -20
- this.$set(this.openMap, this.curId, shouldOpen)
- this.moveOffset = shouldOpen ? -160 : 0
- this.curId = null
- },
- goToUpload() {
- uni.navigateTo({ url: '/pages/health/report-upload' })
- },
- confirmDelete(item) {
- var self = this
- uni.showModal({
- title: '删除报告',
- content: '确定删除该健康报告吗?删除后不可恢复。',
- confirmColor: '#F56C6C',
- success: function(res) {
- if (!res.confirm) return
- self.doDelete(item)
- }
- })
- },
- doDelete(item) {
- var self = this
- deleteReport(item.id).then(function(res) {
- if (res.code === 200) {
- uni.showToast({ title: '已删除', icon: 'success' })
- self.loadData()
- } else {
- uni.showToast({ title: res.message || '删除失败', icon: 'none' })
- }
- }).catch(function(e) {
- console.log('删除报告失败', e)
- uni.showToast({ title: '删除失败', icon: 'none' })
- })
- },
- formatDate(dateStr) {
- var d = parseDate(dateStr)
- if (!d) return ''
- var y = d.getFullYear()
- var m = ('0' + (d.getMonth() + 1)).slice(-2)
- var day = ('0' + d.getDate()).slice(-2)
- return y + '-' + m + '-' + day
- },
- formatDateTime(dateStr) {
- var d = parseDate(dateStr)
- if (!d) return ''
- return this.formatDate(dateStr) + ' ' +
- ('0' + d.getHours()).slice(-2) + ':' +
- ('0' + d.getMinutes()).slice(-2) + ':' +
- ('0' + d.getSeconds()).slice(-2)
- },
- },
- }
- </script>
- <style scoped>
- .list-container {
- min-height: 100vh;
- background: #F5F7FA;
- }
- /* ===== 成员过滤 ===== */
- .member-filter {
- background: #F5F7FA;
- padding: 20rpx 30rpx 4rpx;
- }
- .filter-scroll {
- width: 100%;
- white-space: nowrap;
- }
- .filter-chips {
- display: flex;
- flex-direction: row;
- }
- .chip {
- flex-shrink: 0;
- background: #fff;
- border: 1rpx solid #E2E8F0;
- border-radius: 28rpx;
- padding: 10rpx 30rpx;
- margin-right: 16rpx;
- }
- .chip-active {
- background: #5B9BD5;
- border-color: #5B9BD5;
- }
- .chip-text {
- font-size: 26rpx;
- color: #64748B;
- }
- .chip-active .chip-text {
- color: #fff;
- }
- /* ===== 跨家庭报告转移申请 ===== */
- .transfer-wrap {
- margin: 20rpx 30rpx 0;
- }
- .transfer-section-title {
- display: block;
- font-size: 28rpx;
- font-weight: 600;
- color: #1E293B;
- margin-bottom: 12rpx;
- }
- .transfer-card {
- display: flex;
- flex-direction: row;
- align-items: center;
- justify-content: space-between;
- background: #fff;
- border: 1rpx solid #E2E8F0;
- border-radius: 16rpx;
- padding: 20rpx 24rpx;
- margin-bottom: 16rpx;
- }
- .transfer-info {
- flex: 1;
- display: flex;
- flex-direction: column;
- }
- .transfer-person {
- font-size: 28rpx;
- font-weight: 600;
- color: #1E293B;
- }
- .transfer-meta {
- font-size: 24rpx;
- color: #94A3B8;
- margin-top: 6rpx;
- }
- .transfer-actions {
- display: flex;
- flex-direction: row;
- flex-shrink: 0;
- }
- .transfer-btn {
- font-size: 24rpx;
- padding: 10rpx 28rpx;
- border-radius: 24rpx;
- margin-left: 12rpx;
- }
- .transfer-deny {
- background: #F1F5F9;
- color: #64748B;
- }
- .transfer-approve {
- background: #5B9BD5;
- color: #fff;
- }
- .transfer-status {
- font-size: 24rpx;
- margin-top: 6rpx;
- }
- .status-pending {
- color: #F0B429;
- }
- .status-approved {
- color: #34C759;
- }
- .status-denied {
- color: #94A3B8;
- }
- /* ===== 加载状态 ===== */
- .loading-wrap {
- display: flex;
- justify-content: center;
- padding: 80rpx 0;
- }
- .loading-text {
- font-size: 28rpx;
- color: #999;
- }
- /* ===== 采集中草稿 ===== */
- .collecting-wrap {
- margin: 20rpx 30rpx 0;
- }
- .collecting-card {
- display: flex;
- flex-direction: row;
- align-items: center;
- background: #FFF8E6;
- border: 1rpx solid #F5D78E;
- border-radius: 16rpx;
- padding: 20rpx 24rpx;
- margin-bottom: 16rpx;
- }
- .collecting-icon {
- width: 56rpx;
- height: 56rpx;
- border-radius: 50%;
- background: #F0B429;
- display: flex;
- align-items: center;
- justify-content: center;
- margin-right: 20rpx;
- }
- .spinner {
- width: 28rpx;
- height: 28rpx;
- border: 4rpx solid rgba(255,255,255,0.4);
- border-top-color: #fff;
- border-radius: 50%;
- animation: collecting-spin 1s linear infinite;
- }
- @keyframes collecting-spin {
- 0% { transform: rotate(0deg); }
- 100% { transform: rotate(360deg); }
- }
- .collecting-info {
- flex: 1;
- display: flex;
- flex-direction: column;
- min-width: 0;
- }
- .collecting-title {
- font-size: 28rpx;
- font-weight: 600;
- color: #7A5C00;
- }
- .collecting-file {
- font-size: 24rpx;
- color: #A08A45;
- margin-top: 4rpx;
- overflow: hidden;
- text-overflow: ellipsis;
- white-space: nowrap;
- }
- .collecting-status {
- font-size: 22rpx;
- color: #C0A75A;
- flex-shrink: 0;
- }
- /* ===== 报告列表 ===== */
- .report-list {
- margin: 20rpx 30rpx;
- }
- .swipe-row {
- position: relative;
- overflow: hidden;
- border-radius: 16rpx;
- margin-bottom: 16rpx;
- box-shadow: 0 2rpx 8rpx rgba(0,0,0,0.04);
- }
- .swipe-actions {
- position: absolute;
- top: 0;
- right: 0;
- height: 100%;
- display: flex;
- flex-direction: row;
- }
- .swipe-delete {
- width: 80px;
- height: 100%;
- background: #F56C6C;
- color: #fff;
- font-size: 28rpx;
- display: flex;
- align-items: center;
- justify-content: center;
- }
- .swipe-adjust {
- width: 80px;
- height: 100%;
- background: #5B9BD5;
- color: #fff;
- font-size: 28rpx;
- display: flex;
- align-items: center;
- justify-content: center;
- }
- .swipe-content {
- position: relative;
- z-index: 2;
- background: #fff;
- transition: transform 0.25s ease;
- }
- .swipe-moving {
- transition: none;
- }
- .report-card {
- border-radius: 0;
- padding: 28rpx 24rpx;
- display: flex;
- flex-direction: row;
- align-items: center;
- justify-content: space-between;
- }
- .report-card:active {
- opacity: 0.8;
- }
- .report-card-left {
- display: flex;
- flex-direction: column;
- gap: 2rpx;
- flex: 1;
- min-width: 0;
- }
- .report-type-badge {
- display: inline-block;
- font-size: 22rpx;
- padding: 4rpx 18rpx;
- border-radius: 20rpx;
- align-self: flex-start;
- }
- .badge-exam {
- background: #E3F2FD;
- color: #1565C0;
- }
- .badge-gut {
- background: #E8F5E9;
- color: #2E7D32;
- }
- .badge-tongue {
- background: #FFF3E0;
- color: #E65100;
- }
- .report-person {
- font-size: 26rpx;
- color: #333;
- font-weight: 500;
- margin-top: 4rpx;
- }
- .report-date {
- font-size: 22rpx;
- color: #888;
- margin-top: 4rpx;
- }
- .report-upload-date {
- font-size: 22rpx;
- color: #AAA;
- margin-top: 2rpx;
- }
- .report-card-right {
- display: flex;
- flex-direction: row;
- align-items: center;
- gap: 12rpx;
- }
- .report-score {
- font-size: 36rpx;
- font-weight: bold;
- color: #333;
- }
- .score-unit {
- font-size: 22rpx;
- color: #999;
- font-weight: normal;
- }
- .report-arrow {
- font-size: 36rpx;
- color: #CCC;
- }
- /* ===== 空状态 ===== */
- .empty-wrap {
- display: flex;
- flex-direction: column;
- align-items: center;
- padding: 120rpx 60rpx;
- }
- .empty-icon {
- font-size: 80rpx;
- margin-bottom: 24rpx;
- }
- .empty-title {
- font-size: 32rpx;
- font-weight: bold;
- color: #333;
- margin-bottom: 12rpx;
- }
- .empty-desc {
- font-size: 26rpx;
- color: #999;
- text-align: center;
- margin-bottom: 40rpx;
- line-height: 1.5;
- }
- .empty-btn {
- background: #5B9BD5;
- color: #fff;
- font-size: 28rpx;
- padding: 20rpx 60rpx;
- border-radius: 40rpx;
- }
- .empty-btn:active {
- opacity: 0.8;
- }
- /* ===== 底部 ===== */
- .bottom-spacer {
- height: 60rpx;
- }
- /* ===== 调整归属面板 ===== */
- .adjust-panel {
- position: fixed;
- top: 0;
- left: 0;
- right: 0;
- bottom: 0;
- background: rgba(0, 0, 0, 0.5);
- z-index: 999;
- display: flex;
- align-items: flex-end;
- }
- .adjust-panel .panel-content {
- background: #fff;
- border-radius: 32rpx 32rpx 0 0;
- padding: 32rpx 30rpx;
- max-height: 70vh;
- overflow-y: auto;
- width: 100%;
- }
- .adjust-panel .panel-header {
- display: flex;
- align-items: center;
- justify-content: space-between;
- margin-bottom: 24rpx;
- }
- .adjust-panel .panel-title {
- font-size: 32rpx;
- font-weight: 600;
- color: #333;
- }
- .adjust-panel .panel-close {
- font-size: 48rpx;
- color: #999;
- line-height: 1;
- padding: 0 8rpx;
- }
- .adjust-panel .cancel-bind-option {
- display: flex;
- align-items: center;
- justify-content: space-between;
- padding: 24rpx 0;
- border-bottom: 1rpx solid #f0f0f0;
- margin-bottom: 16rpx;
- }
- .adjust-panel .cancel-bind-text {
- font-size: 28rpx;
- color: #F56C6C;
- }
- .adjust-panel .cancel-bind-arrow {
- font-size: 32rpx;
- color: #ccc;
- }
- .adjust-panel .member-list {
- margin-top: 16rpx;
- }
- .adjust-panel .member-item {
- display: flex;
- align-items: center;
- padding: 20rpx 0;
- border-bottom: 1rpx solid #f5f5f5;
- }
- .adjust-panel .member-item:last-child {
- border-bottom: none;
- }
- .adjust-panel .member-avatar {
- width: 64rpx;
- height: 64rpx;
- border-radius: 50%;
- background: #5B9BD5;
- color: #fff;
- display: flex;
- align-items: center;
- justify-content: center;
- font-size: 28rpx;
- font-weight: 500;
- margin-right: 20rpx;
- flex-shrink: 0;
- }
- .adjust-panel .member-name {
- font-size: 28rpx;
- color: #333;
- }
- </style>
|