no message

This commit is contained in:
wangdongbo 2026-02-12 15:06:26 +08:00
parent 0683f8e510
commit 8a4357614f
2 changed files with 68 additions and 90 deletions

View File

@ -1,63 +1,65 @@
<template> <template>
<view class="medical-case-form"> <full-page :customScroll="empty">
<view class="form-container"> <view class="medical-case-form">
<!-- 动态渲染表单字段 --> <view class="form-container">
<view <!-- 动态渲染表单字段 -->
v-for="field in currentFields" <view
:key="field.key" v-for="field in currentFields"
class="form-item" :key="field.key"
:class="{ required: field.required }" class="form-item"
> :class="{ required: field.required }"
<view class="item-label">{{ field.label }}</view>
<!-- 日期选择器 -->
<picker
v-if="field.type === 'date'"
mode="date"
:value="formData[field.key]"
@change="onDateChange(field.key, $event)"
:disabled="!isEditing"
> >
<view class="picker-value"> <view class="item-label">{{ field.label }}</view>
{{ formData[field.key] || "暂无" }} <!-- 日期选择器 -->
</view> <picker
</picker> v-if="field.type === 'date'"
mode="date"
:value="formData[field.key]"
@change="onDateChange(field.key, $event)"
:disabled="!isEditing"
>
<view class="picker-value">
{{ formData[field.key] || "暂无" }}
</view>
</picker>
<!-- 多行文本 --> <!-- 多行文本 -->
<textarea <textarea
v-else-if="field.type === 'textarea'" v-else-if="field.type === 'textarea'"
class="item-textarea" class="item-textarea"
v-model="formData[field.key]" v-model="formData[field.key]"
placeholder="请输入" placeholder="请输入"
:disabled="!isEditing" :disabled="!isEditing"
/> />
<!-- 单行文本 --> <!-- 单行文本 -->
<input <input
v-else v-else
class="item-input" class="item-input"
v-model="formData[field.key]" v-model="formData[field.key]"
placeholder="暂无" placeholder="暂无"
:disabled="!isEditing" :disabled="!isEditing"
/> />
</view>
</view>
<view class="footer-buttons">
<view class="btn-regenerate" @click="handleRegenerate">
<text class="btn-text">重新生成</text>
</view>
<view class="btn-save" @click="handleSave">
<text class="btn-text">保存至档案</text>
</view>
</view> </view>
</view> </view>
</full-page>
<view class="footer-buttons">
<view class="btn-regenerate" @click="handleRegenerate">
<text class="btn-text">重新生成</text>
</view>
<view class="btn-save" @click="handleSave">
<text class="btn-text">保存至档案</text>
</view>
</view>
</view>
</template> </template>
<script setup> <script setup>
import { ref, computed, onMounted } from "vue"; import { ref, computed, onMounted } from "vue";
import { storeToRefs } from "pinia"; import { storeToRefs } from "pinia";
import useAccountStore from "@/store/account"; import useAccountStore from "@/store/account";
import FullPage from "@/components/full-page.vue";
import api from "@/utils/api.js"; import api from "@/utils/api.js";
const caseType = ref(""); const caseType = ref("");
const formData = ref({}); const formData = ref({});
@ -185,7 +187,7 @@ const FIELD_CONFIG = {
label: FIELD_LABELS.examination, label: FIELD_LABELS.examination,
type: "textarea", type: "textarea",
required: false, required: false,
} },
], ],
physicalExaminationTemplate: [ physicalExaminationTemplate: [
{ {
@ -198,7 +200,7 @@ const FIELD_CONFIG = {
key: "inspectSummary", key: "inspectSummary",
label: FIELD_LABELS.inspectSummary, label: FIELD_LABELS.inspectSummary,
type: "textarea", type: "textarea",
required: false, required: true,
}, },
{ {
key: "positiveFind", key: "positiveFind",
@ -212,7 +214,7 @@ const FIELD_CONFIG = {
key: "consultationDate", key: "consultationDate",
label: FIELD_LABELS.consultationDate, label: FIELD_LABELS.consultationDate,
type: "date", type: "date",
required: false, required: true,
}, },
{ {
key: "chiefComplaint", key: "chiefComplaint",
@ -230,7 +232,7 @@ const FIELD_CONFIG = {
key: "pastMedicalHistory", key: "pastMedicalHistory",
label: FIELD_LABELS.pastMedicalHistory, label: FIELD_LABELS.pastMedicalHistory,
type: "textarea", type: "textarea",
required: true, required: false,
}, },
], ],
}; };

View File

@ -6,28 +6,21 @@ $text-color-sub: #999;
$primary-color: #0877F1; $primary-color: #0877F1;
.chat-page { .chat-page {
position: fixed;
top: 0;
left: 0;
right: 0;
bottom: 0;
display: flex; display: flex;
flex-direction: column; flex-direction: column;
height: 100vh;
background-color: #f5f5f5; background-color: #f5f5f5;
overflow: hidden; overflow: hidden;
} }
/* 患者信息栏样式 - 固定在顶部 */ /* 患者信息栏样式 */
.patient-info-bar { .patient-info-bar {
position: fixed; position: relative;
top: 0;
left: 0;
right: 0;
background: #fff; background: #fff;
border-bottom: 1rpx solid #f0f0f0; border-bottom: 1rpx solid #f0f0f0;
padding: 20rpx 32rpx; padding: 20rpx 32rpx;
z-index: 10; z-index: 10;
flex-shrink: 0; flex-shrink: 0; /* 防止被压缩 */
} }
.patient-info-content { .patient-info-content {
@ -91,14 +84,10 @@ $primary-color: #0877F1;
} }
.chat-content { .chat-content {
position: fixed; flex: 1;
top: 100rpx; /* 患者信息栏高度,根据实际调整 */
left: 0;
right: 0;
bottom: 200rpx; /* 输入框高度,根据实际调整 */
box-sizing: border-box; box-sizing: border-box;
overflow-x: hidden; overflow-x: hidden;
overflow-y: auto; min-height: 0;
} }
.chat-content-compressed { .chat-content-compressed {
@ -363,31 +352,19 @@ $primary-color: #0877F1;
} }
.input-section { .input-section {
position: fixed;
bottom: 0;
left: 0;
right: 0;
background: #fff; background: #fff;
border-top: 1rpx solid #e0e0e0;
position: relative;
z-index: 200; z-index: 200;
padding-bottom: 40rpx;
flex-shrink: 0; flex-shrink: 0;
transform: translateZ(0); /* 开启硬件加速,提升性能 */
display: flex;
flex-direction: column;
}
.ai-assistant-slot {
width: 100%;
background: #fff;
} }
.input-toolbar { .input-toolbar {
display: flex; display: flex;
align-items: center; align-items: center;
padding: 12rpx 20rpx; padding: 16rpx 20rpx;
padding-bottom: 60rpx;
gap: 12rpx; gap: 12rpx;
border-top: 1rpx solid #e0e0e0;
background: #fff;
} }
.voice-toggle-btn { .voice-toggle-btn {
@ -510,8 +487,7 @@ $primary-color: #0877F1;
justify-content: flex-start; justify-content: flex-start;
background: #fff; background: #fff;
border-top: 1rpx solid #eee; border-top: 1rpx solid #eee;
padding: 20rpx 0 20rpx 60rpx; padding: 20rpx 0 40rpx 60rpx;
padding-bottom: 60rpx;
gap: 40rpx 50rpx; gap: 40rpx 50rpx;
flex-wrap: wrap; flex-wrap: wrap;
background-color: #f5f5f5; background-color: #f5f5f5;
@ -541,7 +517,7 @@ $primary-color: #0877F1;
background-color: white; background-color: white;
border-top: 1rpx solid #e0e0e0; border-top: 1rpx solid #e0e0e0;
padding: 16rpx; padding: 16rpx;
margin-bottom: 60rpx; margin-bottom: 40rpx;
display: flex; display: flex;
align-items: center; align-items: center;
justify-content: space-between; justify-content: space-between;
@ -686,7 +662,7 @@ $primary-color: #0877F1;
width: 100%; width: 100%;
max-height: 80vh; max-height: 80vh;
padding: 20rpx; padding: 20rpx;
padding-bottom: 80rpx; padding-bottom: calc(20rpx + 40rpx);
position: relative; position: relative;
box-sizing: border-box; box-sizing: border-box;
margin: 0; margin: 0;
@ -818,7 +794,7 @@ $primary-color: #0877F1;
background-color: white; background-color: white;
width: auto; width: auto;
padding: 32rpx 20rpx 48rpx 20rpx; padding: 32rpx 20rpx 48rpx 20rpx;
padding-bottom: 108rpx; padding-bottom: calc(48rpx + 40rpx);
text-align: center; text-align: center;
margin: 0 auto; margin: 0 auto;
position: relative; position: relative;