|
|
@@ -125,11 +125,19 @@
|
|
|
</view>
|
|
|
</view>
|
|
|
|
|
|
+ <view class="feedback-section" @tap="openFeedback">
|
|
|
+ <text class="feedback-icon">💬</text>
|
|
|
+ <text class="feedback-text">对这个报告有疑问或建议?告诉我们</text>
|
|
|
+ <text class="feedback-arrow">›</text>
|
|
|
+ </view>
|
|
|
+
|
|
|
<view class="bottom-spacer"></view>
|
|
|
</scroll-view>
|
|
|
|
|
|
<health-knowledge-popup :visible="knowledgeVisible" :data="knowledgeData" @close="closeKnowledge" />
|
|
|
|
|
|
+ <feedback-popup :visible="feedbackVisible" :report-id="reportId" @close="closeFeedback" />
|
|
|
+
|
|
|
<view class="fab" v-if="!isEditing" @tap="toggleEdit">
|
|
|
<text class="fab-icon">✏️</text>
|
|
|
</view>
|
|
|
@@ -143,6 +151,7 @@
|
|
|
<script>
|
|
|
import { getReportDetail, editHealthReport, queryKnowledgeBase } from '../../utils/api.js'
|
|
|
import HealthKnowledgePopup from '../../components/health-knowledge-popup.vue'
|
|
|
+import FeedbackPopup from '../../components/feedback-popup.vue'
|
|
|
|
|
|
var INDICATOR_TYPE_MAP = {
|
|
|
'维生素': 'vitamin',
|
|
|
@@ -155,7 +164,7 @@ var INDICATOR_TYPE_MAP = {
|
|
|
}
|
|
|
|
|
|
export default {
|
|
|
- components: { HealthKnowledgePopup },
|
|
|
+ components: { HealthKnowledgePopup, FeedbackPopup },
|
|
|
data() {
|
|
|
return {
|
|
|
reportId: null,
|
|
|
@@ -173,6 +182,7 @@ export default {
|
|
|
indicatorCount: 0,
|
|
|
knowledgeVisible: false,
|
|
|
knowledgeData: {},
|
|
|
+ feedbackVisible: false,
|
|
|
indStatuses: ['正常', '偏低', '偏高', '缺乏', '不足', '过多', '异常']
|
|
|
}
|
|
|
},
|
|
|
@@ -275,6 +285,12 @@ export default {
|
|
|
this.knowledgeVisible = false
|
|
|
this.knowledgeData = {}
|
|
|
},
|
|
|
+ openFeedback: function() {
|
|
|
+ this.feedbackVisible = true
|
|
|
+ },
|
|
|
+ closeFeedback: function() {
|
|
|
+ this.feedbackVisible = false
|
|
|
+ },
|
|
|
toggleEdit: function() {
|
|
|
this.isEditing = true
|
|
|
},
|
|
|
@@ -379,5 +395,18 @@ export default {
|
|
|
.bottom-bar { position: fixed; bottom: 0; left: 0; right: 0; display: flex; padding: 20rpx 30rpx; background: #fff; border-top: 1rpx solid #eee; gap: 20rpx; z-index: 100; }
|
|
|
.btn-cancel { flex: 1; padding: 20rpx; border: 1rpx solid #ddd; border-radius: 12rpx; text-align: center; font-size: 28rpx; color: #666; }
|
|
|
.btn-save { flex: 1; padding: 20rpx; background: #4A9BD7; border-radius: 12rpx; text-align: center; font-size: 28rpx; color: #fff; }
|
|
|
+.feedback-section {
|
|
|
+ display: flex;
|
|
|
+ align-items: center;
|
|
|
+ padding: 24rpx 30rpx;
|
|
|
+ background: #fff;
|
|
|
+ margin: 16rpx;
|
|
|
+ border-radius: 12rpx;
|
|
|
+ border: 1rpx solid #f0f0f0;
|
|
|
+}
|
|
|
+.feedback-icon { font-size: 32rpx; margin-right: 12rpx; }
|
|
|
+.feedback-text { flex: 1; font-size: 26rpx; color: #4A9BD7; }
|
|
|
+.feedback-arrow { font-size: 28rpx; color: #ccc; }
|
|
|
+
|
|
|
.bottom-spacer { height: 40rpx; }
|
|
|
</style>
|