<template>
|
<div class="medical-panel">
|
<div class="panel-header">
|
<h3>尿常规记录表</h3>
|
<div class="panel-actions">
|
<el-button
|
v-if="isEditing"
|
type="primary"
|
size="small"
|
@click="addColumn"
|
icon="el-icon-plus"
|
>
|
新增记录列
|
</el-button>
|
<el-tooltip content="刷新表格布局" placement="top">
|
<el-button
|
size="small"
|
@click="forceTableLayout"
|
icon="el-icon-refresh"
|
>
|
刷新布局
|
</el-button>
|
</el-tooltip>
|
</div>
|
</div>
|
|
<el-table
|
:data="tableData"
|
border
|
style="width: 100%"
|
class="medical-table"
|
v-fit-columns
|
:key="tableKey"
|
@header-dragend="handleHeaderDragEnd"
|
v-loading="tableLoading"
|
>
|
<el-table-column
|
prop="itemName"
|
label="检测项目"
|
width="220"
|
fixed
|
class-name="leave-alone"
|
>
|
<template #default="scope">
|
<div class="item-name-cell">
|
<span :class="{ 'required-item': scope.row.required }">
|
{{ scope.row.itemName }}
|
</span>
|
<el-tooltip
|
v-if="scope.row.reference"
|
:content="`参考范围: ${scope.row.reference}`"
|
placement="top"
|
>
|
<i class="el-icon-info reference-icon"></i>
|
</el-tooltip>
|
</div>
|
</template>
|
</el-table-column>
|
|
<el-table-column
|
v-for="(col, index) in dynamicColumns"
|
:key="col.key"
|
:label="col.label"
|
:min-width="160"
|
:resizable="isEditing"
|
header-align="center"
|
align="center"
|
>
|
<template #default="scope">
|
<div class="cell-content-wrapper">
|
<template v-if="scope.row.type === 'select'">
|
<el-select
|
v-if="isEditing"
|
v-model="scope.row.values[index]"
|
placeholder="请选择"
|
size="small"
|
style="width: 100%"
|
@change="handleValueChange(scope.row, index)"
|
:title="getSelectLabel(scope.row, index)"
|
>
|
<el-option
|
v-for="option in scope.row.options"
|
:key="option.value"
|
:label="option.label"
|
:value="option.value"
|
/>
|
</el-select>
|
<span
|
v-else
|
class="value-text"
|
:title="getSelectLabel(scope.row, index)"
|
>
|
{{ getSelectLabel(scope.row, index) || "-" }}
|
</span>
|
</template>
|
|
<template v-else>
|
<el-input
|
v-if="isEditing"
|
v-model="scope.row.values[index]"
|
size="small"
|
:placeholder="scope.row.placeholder || '请输入'"
|
@blur="handleValueChange(scope.row, index)"
|
class="value-input"
|
:title="scope.row.values[index]"
|
/>
|
<div v-else class="value-display-container">
|
<span class="value-text" :title="scope.row.values[index]">
|
{{ scope.row.values[index] || "-" }}
|
</span>
|
<span
|
v-if="scope.row.values[index] && scope.row.unit"
|
class="unit-text"
|
>
|
{{ scope.row.unit }}
|
</span>
|
</div>
|
</template>
|
</div>
|
</template>
|
</el-table-column>
|
</el-table>
|
|
<!-- 统计信息 -->
|
<div v-if="showStatistics" class="statistics-section">
|
<el-card shadow="never">
|
<div class="stats-content">
|
<span class="stats-title">数据统计:</span>
|
<span class="stats-item"
|
>总记录数: {{ dynamicColumns.length }} 个时间点</span
|
>
|
<span class="stats-item">已填写: {{ filledCount }} 项</span>
|
<span class="stats-item">完成度: {{ completionRate }}%</span>
|
</div>
|
</el-card>
|
</div>
|
|
<!-- 附件上传区域 -->
|
<div class="attachment-section">
|
<div class="attachment-header">
|
<i class="el-icon-paperclip"></i>
|
<span class="attachment-title">附件上传</span>
|
<span class="attachment-tip"
|
>支持上传尿常规检验报告单等文件 (最多10个)</span
|
>
|
</div>
|
|
<!-- 使用 UploadAttachment 组件 -->
|
<UploadAttachment
|
ref="uploadAttachment"
|
:file-list="attachmentFileList"
|
:limit="attachmentLimit"
|
:accept="attachmentAccept"
|
:multiple="true"
|
@change="handleAttachmentChange"
|
@upload-success="handleUploadSuccess"
|
@upload-error="handleUploadError"
|
@remove="handleAttachmentRemove"
|
/>
|
|
<!-- 附件列表展示 -->
|
<div class="attachment-list" v-if="attachments && attachments.length > 0">
|
<div class="list-title">已上传附件 ({{ attachments.length }})</div>
|
<el-table :data="attachments" style="width: 100%" size="small">
|
<el-table-column label="文件名" min-width="200">
|
<template slot-scope="scope">
|
<i
|
class="el-icon-document"
|
:style="{ color: getFileIconColor(scope.row.fileName) }"
|
></i>
|
<span class="file-name">{{ scope.row.fileName }}</span>
|
</template>
|
</el-table-column>
|
<el-table-column label="文件类型" width="100">
|
<template slot-scope="scope">
|
<el-tag :type="getFileTagType(scope.row.fileName)" size="small">
|
{{ getFileTypeText(scope.row.fileName) }}
|
</el-tag>
|
</template>
|
</el-table-column>
|
<el-table-column label="上传时间" width="160">
|
<template slot-scope="scope">
|
<span>{{ formatDateTime(scope.row.uploadTime) }}</span>
|
</template>
|
</el-table-column>
|
<el-table-column label="文件大小" width="100">
|
<template slot-scope="scope">
|
<span>{{ formatFileSize(scope.row.fileSize) }}</span>
|
</template>
|
</el-table-column>
|
<el-table-column label="操作" width="266" fixed="right">
|
<template slot-scope="scope">
|
<el-button
|
size="mini"
|
type="primary"
|
@click="handlePreview(scope.row)"
|
:disabled="!isPreviewable(scope.row.fileName)"
|
>
|
预览
|
</el-button>
|
<el-button
|
v-if="isEditing"
|
size="mini"
|
type="success"
|
@click="handleDownload(scope.row)"
|
>
|
下载
|
</el-button>
|
<el-button
|
v-if="isEditing"
|
size="mini"
|
type="danger"
|
@click="handleRemoveAttachment(scope.$index)"
|
>
|
删除
|
</el-button>
|
</template>
|
</el-table-column>
|
</el-table>
|
</div>
|
</div>
|
|
<!-- 列编辑对话框 -->
|
<el-dialog
|
:title="`${editingColumnIndex !== null ? '编辑' : '新增'}时间点`"
|
:visible.sync="columnDialogVisible"
|
width="450px"
|
@closed="handleDialogClosed"
|
>
|
<el-form
|
:model="columnForm"
|
label-width="80px"
|
ref="columnFormU"
|
:rules="columnRules"
|
>
|
<el-form-item label="日期" prop="date">
|
<el-date-picker
|
v-model="columnForm.date"
|
type="date"
|
placeholder="选择日期"
|
value-format="yyyy-MM-dd"
|
style="width: 100%"
|
:disabled-date="disableFutureDates"
|
/>
|
</el-form-item>
|
<el-form-item label="时间" prop="time">
|
<el-time-picker
|
v-model="columnForm.time"
|
placeholder="选择时间"
|
value-format="HH:mm"
|
style="width: 100%"
|
/>
|
</el-form-item>
|
<el-form-item label="备注" prop="remark">
|
<el-input
|
v-model="columnForm.remark"
|
type="textarea"
|
:rows="2"
|
placeholder="可选填写时间点备注信息"
|
maxlength="100"
|
show-word-limit
|
/>
|
</el-form-item>
|
</el-form>
|
<span slot="footer" class="dialog-footer">
|
<el-button @click="columnDialogVisible = false">取消</el-button>
|
<el-button
|
v-if="editingColumnIndex !== null"
|
type="danger"
|
@click="handleDeleteColumn"
|
>
|
删除
|
</el-button>
|
<el-button
|
type="primary"
|
@click="confirmAddColumn"
|
:loading="saveLoading"
|
>
|
确定
|
</el-button>
|
</span>
|
</el-dialog>
|
|
<!-- 文件预览弹窗 -->
|
<FilePreviewDialog
|
:visible="previewVisible"
|
:file="currentPreviewFile"
|
@close="previewVisible = false"
|
@download="handleDownload"
|
/>
|
</div>
|
</template>
|
|
<script>
|
import UploadAttachment from "@/components/UploadAttachment";
|
import FilePreviewDialog from "@/components/FilePreviewDialog";
|
import dayjs from "dayjs";
|
|
export default {
|
name: "UrineRoutinePanel",
|
components: {
|
UploadAttachment,
|
FilePreviewDialog
|
},
|
props: {
|
isEditing: {
|
type: Boolean,
|
default: false
|
},
|
initialData: {
|
type: Object,
|
default: () => ({})
|
},
|
showStatistics: {
|
type: Boolean,
|
default: true
|
}
|
},
|
data() {
|
return {
|
tableData: [],
|
dynamicColumns: [],
|
attachments: [],
|
columnDialogVisible: false,
|
columnForm: {
|
date: "",
|
time: "",
|
remark: ""
|
},
|
editingColumnIndex: null,
|
tableKey: 0,
|
tableLoading: false,
|
saveLoading: false,
|
internalData: {},
|
columnRules: {
|
date: [{ required: true, message: "请选择日期", trigger: "change" }],
|
time: [{ required: true, message: "请选择时间", trigger: "change" }]
|
},
|
|
// 预览相关
|
previewVisible: false,
|
currentPreviewFile: null,
|
|
// 附件相关配置
|
attachmentLimit: 10,
|
attachmentAccept:
|
".pdf,.jpg,.jpeg,.png,.doc,.docx,.xls,.xlsx,.ppt,.pptx,.txt",
|
attachmentFileList: []
|
};
|
},
|
computed: {
|
filledCount() {
|
let count = 0;
|
this.tableData.forEach(row => {
|
row.values.forEach(value => {
|
if (value && value.toString().trim() !== "") {
|
count++;
|
}
|
});
|
});
|
return count;
|
},
|
completionRate() {
|
const total = this.tableData.length * this.dynamicColumns.length;
|
return total > 0 ? Math.round((this.filledCount / total) * 100) : 0;
|
}
|
},
|
watch: {
|
initialData: {
|
handler(newData) {
|
console.log(newData);
|
if (newData && Object.keys(newData).length > 0) {
|
this.internalData = { ...newData };
|
this.initFromExternalData();
|
}
|
},
|
immediate: true,
|
deep: true
|
},
|
isEditing(newVal) {
|
if (!newVal) {
|
this.saveData();
|
}
|
this.$nextTick(() => {
|
this.forceTableLayout();
|
});
|
},
|
dynamicColumns: {
|
handler() {
|
this.$nextTick(() => {
|
this.forceTableLayout();
|
});
|
},
|
deep: true,
|
immediate: true
|
},
|
// 监听附件数据变化
|
attachments: {
|
handler(newAttachments) {
|
this.attachmentFileList = newAttachments.map(item => ({
|
uid: item.id || Math.random(),
|
name: item.fileName,
|
fileSize: item.fileSize,
|
url: item.path || item.fileUrl,
|
uploadTime: item.uploadTime,
|
status: "success"
|
}));
|
},
|
deep: true
|
}
|
},
|
methods: {
|
// 从外部数据初始化组件
|
initFromExternalData() {
|
console.log(this.internalData, "this.internalData");
|
|
if (this.internalData.data && this.internalData.columns) {
|
this.tableData = this.internalData.data.map(item => ({
|
...item,
|
values:
|
item.values || new Array(this.internalData.columns.length).fill("")
|
}));
|
this.dynamicColumns = [...this.internalData.columns];
|
} else {
|
this.initTableData();
|
}
|
|
// 初始化附件
|
if (this.internalData.attachments) {
|
this.attachments = [...this.internalData.attachments];
|
}
|
},
|
|
// 初始化默认表格数据
|
initTableData() {
|
const medicalItems = this.getMedicalItems();
|
|
if (this.dynamicColumns.length === 0) {
|
this.dynamicColumns = [
|
{
|
label: `${new Date().toISOString().split("T")[0]}\n08:00`,
|
key: "time1",
|
date: new Date().toISOString().split("T")[0],
|
time: "08:00",
|
remark: "晨尿检测"
|
}
|
];
|
}
|
|
this.tableData = medicalItems.map(item => ({
|
...item,
|
values: new Array(this.dynamicColumns.length).fill("")
|
}));
|
},
|
|
// 尿常规检测项目定义
|
getMedicalItems() {
|
return [
|
{
|
itemName: "尿量",
|
type: "number",
|
required: true,
|
unit: "ml/h",
|
reference: "正常范围视情况而定"
|
},
|
{
|
itemName: "颜色",
|
type: "select",
|
required: true,
|
options: [
|
{ value: "淡黄色", label: "淡黄色" },
|
{ value: "黄色", label: "黄色" },
|
{ value: "深黄色", label: "深黄色" },
|
{ value: "红色", label: "红色" },
|
{ value: "白色", label: "白色" },
|
{ value: "其他", label: "其他" }
|
]
|
},
|
{
|
itemName: "外观",
|
type: "select",
|
required: false,
|
options: [
|
{ value: "清亮", label: "清亮" },
|
{ value: "微浊", label: "微浊" },
|
{ value: "浑浊", label: "浑浊" },
|
{ value: "沉淀", label: "沉淀" },
|
{ value: "其他", label: "其他" }
|
]
|
},
|
{
|
itemName: "尿蛋白",
|
type: "select",
|
required: true,
|
options: [
|
{ value: "-", label: "阴性(-)" },
|
{ value: "±", label: "微量(±)" },
|
{ value: "+", label: "阳性(+)" },
|
{ value: "++", label: "阳性(++)" },
|
{ value: "+++", label: "阳性(+++)" }
|
],
|
reference: "正常为阴性(-)"
|
},
|
{
|
itemName: "pH值",
|
type: "number",
|
required: true,
|
placeholder: "4.5-8.0",
|
unit: "",
|
reference: "4.5-8.0",
|
min: 4.5,
|
max: 8.0
|
},
|
{
|
itemName: "白细胞",
|
type: "select",
|
required: true,
|
options: [
|
{ value: "-", label: "阴性(-)" },
|
{ value: "+", label: "阳性(+)" },
|
{ value: "++", label: "阳性(++)" },
|
{ value: "+++", label: "阳性(+++)" }
|
],
|
reference: "正常为阴性(-)"
|
},
|
{
|
itemName: "红细胞",
|
type: "number",
|
required: true,
|
unit: "/μL",
|
reference: "0-9.2",
|
min: 0,
|
max: 9.2
|
},
|
{
|
itemName: "细菌",
|
type: "number",
|
required: true,
|
unit: "/μL",
|
reference: "0-385",
|
min: 0,
|
max: 385
|
}
|
];
|
},
|
|
// 保存数据到父组件
|
saveData() {
|
const dataToEmit = {
|
type: "urine_routine",
|
data: this.tableData,
|
columns: this.dynamicColumns,
|
attachments: this.attachments
|
};
|
this.$emit("data-change", dataToEmit);
|
},
|
|
getSelectLabel(row, columnIndex) {
|
if (!row.options || !row.values[columnIndex])
|
return row.values[columnIndex];
|
const option = row.options.find(
|
opt => opt.value === row.values[columnIndex]
|
);
|
return option ? option.label : row.values[columnIndex];
|
},
|
|
addColumn() {
|
this.editingColumnIndex = null;
|
this.columnForm = {
|
date: new Date().toISOString().split("T")[0],
|
time: "08:00",
|
remark: ""
|
};
|
this.columnDialogVisible = true;
|
this.$nextTick(() => {
|
this.$refs.columnFormU && this.$refs.columnFormU.clearValidate();
|
});
|
},
|
|
editColumn(index) {
|
this.editingColumnIndex = index;
|
const column = this.dynamicColumns[index];
|
this.columnForm = {
|
date: column.date,
|
time: column.time,
|
remark: column.remark || ""
|
};
|
this.columnDialogVisible = true;
|
},
|
|
confirmAddColumn() {
|
this.$refs.columnFormU.validate(valid => {
|
if (!valid) {
|
this.$message.warning("请完善时间点信息");
|
return;
|
}
|
|
this.saveLoading = true;
|
|
if (this.editingColumnIndex !== null) {
|
const column = this.dynamicColumns[this.editingColumnIndex];
|
column.label = `${this.columnForm.date}\n${this.columnForm.time}`;
|
column.date = this.columnForm.date;
|
column.time = this.columnForm.time;
|
column.remark = this.columnForm.remark;
|
this.$message.success("时间点修改成功");
|
} else {
|
const newColumn = {
|
label: `${this.columnForm.date}\n${this.columnForm.time}`,
|
key: `time${Date.now()}`,
|
date: this.columnForm.date,
|
time: this.columnForm.time,
|
remark: this.columnForm.remark
|
};
|
this.internalData.columns.push(newColumn);
|
|
this.dynamicColumns.push(newColumn);
|
this.tableData.forEach(row => {
|
if (!row.values) row.values = [];
|
row.values.push("");
|
});
|
this.$message.success("时间点添加成功");
|
}
|
|
this.columnDialogVisible = false;
|
this.saveLoading = false;
|
this.tableKey += 1;
|
this.saveData();
|
});
|
},
|
|
handleDeleteColumn() {
|
if (this.editingColumnIndex !== null) {
|
this.$confirm("确定要删除这个时间点吗?", "提示", {
|
confirmButtonText: "确定",
|
cancelButtonText: "取消",
|
type: "warning"
|
}).then(() => {
|
this.dynamicColumns.splice(this.editingColumnIndex, 1);
|
this.tableData.forEach(row => {
|
row.values.splice(this.editingColumnIndex, 1);
|
});
|
this.columnDialogVisible = false;
|
this.tableKey += 1;
|
this.saveData();
|
this.$message.success("时间点删除成功");
|
});
|
}
|
},
|
|
handleDialogClosed() {
|
this.editingColumnIndex = null;
|
this.columnForm = {
|
date: "",
|
time: "",
|
remark: ""
|
};
|
this.$refs.columnFormU && this.$refs.columnFormU.clearValidate();
|
},
|
|
disableFutureDates(time) {
|
return time.getTime() > Date.now();
|
},
|
|
handleValueChange(row, columnIndex) {
|
this.saveData();
|
},
|
|
/** 附件变化处理 */
|
handleAttachmentChange(fileList) {
|
this.attachmentFileList = fileList;
|
},
|
|
/** 附件移除处理 */
|
handleAttachmentRemove(file) {
|
if (file.url) {
|
const index = this.attachments.findIndex(
|
item => item.path === file.url || item.fileUrl === file.url
|
);
|
if (index > -1) {
|
this.attachments.splice(index, 1);
|
this.saveData();
|
this.$message.success("附件删除成功");
|
}
|
}
|
},
|
|
/** 上传成功处理 */
|
handleUploadSuccess({ file, fileList, response }) {
|
if (response.code === 200) {
|
const attachmentObj = {
|
fileName: file.name,
|
path: response.fileUrl || file.url,
|
fileUrl: response.fileUrl || file.url,
|
fileType: this.getFileExtension(file.name),
|
fileSize: file.size,
|
uploadTime: dayjs().format("YYYY-MM-DD HH:mm:ss")
|
};
|
|
if (!Array.isArray(this.attachments)) {
|
this.attachments = [];
|
}
|
|
this.attachments.push(attachmentObj);
|
this.attachmentFileList = fileList;
|
this.saveData();
|
this.$message.success("文件上传成功");
|
}
|
},
|
|
/** 上传错误处理 */
|
handleUploadError({ file, fileList, error }) {
|
console.error("附件上传失败:", error);
|
this.$message.error("文件上传失败,请重试");
|
},
|
|
/** 手动删除附件 */
|
handleRemoveAttachment(index) {
|
this.attachments.splice(index, 1);
|
this.attachmentFileList.splice(index, 1);
|
this.saveData();
|
this.$message.success("附件删除成功");
|
},
|
|
/** 文件预览 */
|
handlePreview(file) {
|
this.currentPreviewFile = {
|
fileName: file.fileName,
|
fileUrl: file.path || file.fileUrl,
|
fileType: this.getFileType(file.fileName)
|
};
|
this.previewVisible = true;
|
},
|
|
/** 文件下载 */
|
handleDownload(file) {
|
const fileUrl = file.path || file.fileUrl;
|
const fileName = file.fileName;
|
|
if (fileUrl) {
|
const link = document.createElement("a");
|
link.href = fileUrl;
|
link.download = fileName;
|
link.style.display = "none";
|
document.body.appendChild(link);
|
link.click();
|
document.body.removeChild(link);
|
this.$message.success("开始下载文件");
|
} else {
|
this.$message.warning("文件路径不存在,无法下载");
|
}
|
},
|
|
/** 获取文件类型 */
|
getFileType(fileName) {
|
if (!fileName) return "other";
|
const extension = fileName
|
.split(".")
|
.pop()
|
.toLowerCase();
|
const imageTypes = ["jpg", "jpeg", "png", "gif", "bmp", "webp"];
|
const pdfTypes = ["pdf"];
|
const officeTypes = ["doc", "docx", "xls", "xlsx", "ppt", "pptx"];
|
if (imageTypes.includes(extension)) return "image";
|
if (pdfTypes.includes(extension)) return "pdf";
|
if (officeTypes.includes(extension)) return "office";
|
return "other";
|
},
|
|
/** 获取文件图标颜色 */
|
getFileIconColor(fileName) {
|
const type = this.getFileType(fileName);
|
const colorMap = {
|
image: "#67C23A",
|
pdf: "#F56C6C",
|
office: "#409EFF",
|
other: "#909399"
|
};
|
return colorMap[type] || "#909399";
|
},
|
|
/** 获取文件标签类型 */
|
getFileTagType(fileName) {
|
const type = this.getFileType(fileName);
|
const typeMap = {
|
image: "success",
|
pdf: "danger",
|
office: "primary",
|
other: "info"
|
};
|
return typeMap[type] || "info";
|
},
|
|
/** 获取文件类型文本 */
|
getFileTypeText(fileName) {
|
const type = this.getFileType(fileName);
|
const textMap = {
|
image: "图片",
|
pdf: "PDF",
|
office: "文档",
|
other: "其他"
|
};
|
return textMap[type] || "未知";
|
},
|
|
/** 检查是否可预览 */
|
isPreviewable(fileName) {
|
const type = this.getFileType(fileName);
|
return ["image", "pdf"].includes(type);
|
},
|
|
/** 获取文件扩展名 */
|
getFileExtension(filename) {
|
return filename
|
.split(".")
|
.pop()
|
.toLowerCase();
|
},
|
|
/** 格式化文件大小 */
|
formatFileSize(bytes) {
|
if (!bytes || bytes === 0) return "0 B";
|
const k = 1024;
|
const sizes = ["B", "KB", "MB", "GB"];
|
const i = Math.floor(Math.log(bytes) / Math.log(k));
|
return parseFloat((bytes / Math.pow(k, i)).toFixed(2)) + " " + sizes[i];
|
},
|
|
/** 日期时间格式化 */
|
formatDateTime(dateTime) {
|
if (!dateTime) return "";
|
try {
|
const date = new Date(dateTime);
|
if (isNaN(date.getTime())) return dateTime;
|
const year = date.getFullYear();
|
const month = String(date.getMonth() + 1).padStart(2, "0");
|
const day = String(date.getDate()).padStart(2, "0");
|
const hours = String(date.getHours()).padStart(2, "0");
|
const minutes = String(date.getMinutes()).padStart(2, "0");
|
return `${year}-${month}-${day} ${hours}:${minutes}`;
|
} catch (error) {
|
return dateTime;
|
}
|
},
|
|
forceTableLayout() {
|
this.$nextTick(() => {
|
const table = this.$el.querySelector(".el-table");
|
if (table) {
|
window.dispatchEvent(new Event("resize"));
|
}
|
});
|
},
|
|
handleHeaderDragEnd() {
|
this.forceTableLayout();
|
},
|
|
exportData() {
|
return {
|
tableData: this.tableData,
|
columns: this.dynamicColumns,
|
statistics: {
|
filledCount: this.filledCount,
|
completionRate: this.completionRate,
|
totalColumns: this.dynamicColumns.length
|
},
|
exportTime: new Date().toISOString(),
|
attachments: this.attachments
|
};
|
}
|
},
|
mounted() {
|
this.$nextTick(() => {
|
if (Object.keys(this.internalData).length === 0) {
|
this.initTableData();
|
}
|
this.forceTableLayout();
|
});
|
}
|
};
|
</script>
|
|
<style scoped>
|
.medical-panel {
|
padding: 20px;
|
background: #fff;
|
border-radius: 8px;
|
box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.1);
|
}
|
|
.panel-header {
|
display: flex;
|
justify-content: space-between;
|
align-items: center;
|
margin-bottom: 24px;
|
padding-bottom: 16px;
|
border-bottom: 1px solid #ebeef5;
|
}
|
|
.panel-header h3 {
|
margin: 0;
|
color: #303133;
|
font-size: 20px;
|
font-weight: 600;
|
}
|
|
.panel-actions {
|
display: flex;
|
gap: 12px;
|
align-items: center;
|
}
|
|
.medical-table {
|
margin-bottom: 24px;
|
border-radius: 4px;
|
overflow: hidden;
|
}
|
|
.medical-table ::v-deep .el-table__body-wrapper {
|
overflow-x: auto;
|
}
|
|
.item-name-cell {
|
display: flex;
|
align-items: center;
|
justify-content: space-between;
|
}
|
|
.reference-icon {
|
color: #909399;
|
font-size: 14px;
|
cursor: help;
|
margin-left: 8px;
|
}
|
|
.required-item::before {
|
content: "*";
|
color: #f56c6c;
|
margin-right: 4px;
|
}
|
|
.cell-content-wrapper {
|
display: flex;
|
align-items: center;
|
justify-content: center;
|
gap: 8px;
|
min-height: 32px;
|
}
|
|
.value-input {
|
flex: 1;
|
min-width: 80px;
|
}
|
|
.value-display-container {
|
display: flex;
|
align-items: center;
|
gap: 4px;
|
}
|
|
.value-text {
|
font-weight: 500;
|
color: #303133;
|
max-width: 80px;
|
overflow: hidden;
|
text-overflow: ellipsis;
|
white-space: nowrap;
|
}
|
|
.unit-text {
|
color: #909399;
|
font-size: 12px;
|
flex-shrink: 0;
|
}
|
|
.validation-indicator {
|
flex-shrink: 0;
|
}
|
|
.valid-icon {
|
color: #67c23a;
|
font-size: 14px;
|
}
|
|
.invalid-icon {
|
color: #e6a23c;
|
font-size: 14px;
|
}
|
|
.statistics-section {
|
margin-bottom: 20px;
|
}
|
|
.stats-content {
|
display: flex;
|
gap: 20px;
|
align-items: center;
|
flex-wrap: wrap;
|
}
|
|
.stats-title {
|
font-weight: 600;
|
color: #303133;
|
}
|
|
.stats-item {
|
color: #606266;
|
font-size: 14px;
|
}
|
|
/* 附件上传区域样式优化 */
|
.attachment-section {
|
margin-top: 24px;
|
padding: 20px;
|
border: 1px solid #ebeef5;
|
border-radius: 4px;
|
background: #fafafa;
|
}
|
|
.attachment-header {
|
display: flex;
|
align-items: center;
|
gap: 8px;
|
margin-bottom: 16px;
|
}
|
|
.attachment-title {
|
font-weight: 600;
|
color: #409eff;
|
}
|
|
.attachment-tip {
|
font-size: 12px;
|
color: #909399;
|
}
|
|
.attachment-list {
|
margin-top: 16px;
|
}
|
|
.list-title {
|
font-weight: bold;
|
margin-bottom: 12px;
|
color: #303133;
|
font-size: 14px;
|
}
|
|
.file-name {
|
font-size: 13px;
|
margin-left: 8px;
|
}
|
|
/* 响应式设计 */
|
@media (max-width: 768px) {
|
.medical-panel {
|
padding: 12px;
|
}
|
|
.panel-header {
|
flex-direction: column;
|
align-items: flex-start;
|
gap: 12px;
|
}
|
|
.panel-actions {
|
width: 100%;
|
justify-content: flex-end;
|
}
|
|
.stats-content {
|
flex-direction: column;
|
align-items: flex-start;
|
gap: 8px;
|
}
|
|
.cell-content-wrapper {
|
flex-direction: column;
|
gap: 4px;
|
}
|
}
|
</style>
|