更新
This commit is contained in:
@@ -75,12 +75,37 @@
|
||||
</el-row>
|
||||
</div>
|
||||
|
||||
<div class="info-section">
|
||||
<div class="section-title">
|
||||
中药处方 (RP)
|
||||
<el-button type="primary" size="small" @click="handleAddHerb">添加中药</el-button>
|
||||
<el-button type="success" size="small" @click="showLibraryDialog = true">从处方库导入</el-button>
|
||||
<el-button type="warning" size="small" @click="openPasteRecipeDialog">导入药方</el-button>
|
||||
<div class="info-section info-section--rp">
|
||||
<div class="rp-toolbar" role="region" aria-label="中药处方">
|
||||
<div class="rp-toolbar__lead">
|
||||
<span class="rp-toolbar__marker" aria-hidden="true" />
|
||||
<div class="rp-toolbar__text">
|
||||
<h3 class="rp-toolbar__heading">
|
||||
中药处方
|
||||
<span class="rp-toolbar__abbr">(RP)</span>
|
||||
</h3>
|
||||
<p class="rp-toolbar__meta">
|
||||
共 <strong>{{ formData.herbs.length }}</strong> 味药材 · 可手动添加、从处方库或粘贴药方批量录入(药品库同名匹配)
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="rp-toolbar__actions" role="toolbar" aria-label="处方药材快捷操作">
|
||||
<el-button type="primary" size="small" :icon="CirclePlus" @click="handleAddHerb">
|
||||
添加中药
|
||||
</el-button>
|
||||
<el-button
|
||||
type="primary"
|
||||
plain
|
||||
size="small"
|
||||
:icon="CollectionTag"
|
||||
@click="showLibraryDialog = true"
|
||||
>
|
||||
从处方库导入
|
||||
</el-button>
|
||||
<el-button type="primary" plain size="small" :icon="EditPen" @click="openPasteRecipeDialog">
|
||||
导入药方
|
||||
</el-button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="mb-3">
|
||||
<el-form-item label="处方价格" prop="amount" class="!mb-0">
|
||||
@@ -135,11 +160,11 @@
|
||||
<el-select v-model="formData.prescription_type" placeholder="请选择处方类型" class="!w-full">
|
||||
<el-option label="浓缩水丸" value="浓缩水丸" />
|
||||
<el-option label="饮片" value="饮片" />
|
||||
<el-option label="颗粒" value="颗粒" />
|
||||
<!-- <el-option label="颗粒" value="颗粒" />
|
||||
<el-option label="丸剂" value="丸剂" />
|
||||
<el-option label="散剂" value="散剂" />
|
||||
<el-option label="膏方" value="膏方" />
|
||||
<el-option label="汤剂" value="汤剂" />
|
||||
<el-option label="汤剂" value="汤剂" /> -->
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
@@ -709,7 +734,7 @@ import html2canvas from 'html2canvas'
|
||||
import { jsPDF } from 'jspdf'
|
||||
import useUserStore from '@/stores/modules/user'
|
||||
import useAppStore from '@/stores/modules/app'
|
||||
import { Download, Document } from '@element-plus/icons-vue'
|
||||
import { CirclePlus, CollectionTag, Download, Document, EditPen } from '@element-plus/icons-vue'
|
||||
import { Search } from '@element-plus/icons-vue'
|
||||
|
||||
interface Herb {
|
||||
@@ -1761,6 +1786,107 @@ defineExpose({
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
&.info-section--rp {
|
||||
padding-top: 14px;
|
||||
}
|
||||
|
||||
.rp-toolbar {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
align-items: flex-start;
|
||||
justify-content: space-between;
|
||||
gap: 12px 20px;
|
||||
margin-bottom: 14px;
|
||||
padding: 14px 16px;
|
||||
background: linear-gradient(
|
||||
145deg,
|
||||
var(--el-bg-color) 0%,
|
||||
var(--el-fill-color-extra-light) 100%
|
||||
);
|
||||
border: 1px solid var(--el-border-color-lighter);
|
||||
border-radius: 10px;
|
||||
box-shadow: 0 1px 3px rgba(15, 23, 42, 0.06);
|
||||
transition:
|
||||
border-color 0.2s ease,
|
||||
box-shadow 0.2s ease;
|
||||
}
|
||||
|
||||
.rp-toolbar:hover {
|
||||
border-color: var(--el-border-color);
|
||||
box-shadow: 0 2px 8px rgba(15, 23, 42, 0.07);
|
||||
}
|
||||
|
||||
.rp-toolbar__lead {
|
||||
display: flex;
|
||||
align-items: stretch;
|
||||
gap: 12px;
|
||||
min-width: 0;
|
||||
flex: 1;
|
||||
}
|
||||
|
||||
.rp-toolbar__marker {
|
||||
width: 4px;
|
||||
min-height: 44px;
|
||||
border-radius: 4px;
|
||||
background: linear-gradient(
|
||||
180deg,
|
||||
var(--el-color-primary) 0%,
|
||||
var(--el-color-primary-light-5) 100%
|
||||
);
|
||||
flex-shrink: 0;
|
||||
}
|
||||
|
||||
.rp-toolbar__text {
|
||||
min-width: 0;
|
||||
}
|
||||
|
||||
.rp-toolbar__heading {
|
||||
margin: 0;
|
||||
font-size: 16px;
|
||||
font-weight: 600;
|
||||
color: var(--el-text-color-primary);
|
||||
letter-spacing: 0.02em;
|
||||
line-height: 1.35;
|
||||
}
|
||||
|
||||
.rp-toolbar__abbr {
|
||||
margin-left: 4px;
|
||||
font-weight: 500;
|
||||
font-size: 13px;
|
||||
color: var(--el-text-color-secondary);
|
||||
}
|
||||
|
||||
.rp-toolbar__meta {
|
||||
margin: 6px 0 0;
|
||||
font-size: 12px;
|
||||
line-height: 1.55;
|
||||
color: var(--el-text-color-secondary);
|
||||
}
|
||||
|
||||
.rp-toolbar__meta strong {
|
||||
font-weight: 600;
|
||||
color: var(--el-text-color-regular);
|
||||
}
|
||||
|
||||
.rp-toolbar__actions {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
align-items: center;
|
||||
gap: 8px;
|
||||
flex-shrink: 0;
|
||||
}
|
||||
|
||||
.rp-toolbar__actions :deep(.el-button + .el-button) {
|
||||
margin-left: 0;
|
||||
}
|
||||
|
||||
@media (max-width: 960px) {
|
||||
.rp-toolbar__actions {
|
||||
width: 100%;
|
||||
justify-content: flex-start;
|
||||
}
|
||||
}
|
||||
|
||||
.herbs-editor-grid {
|
||||
display: grid;
|
||||
grid-template-columns: repeat(4, minmax(0, 1fr));
|
||||
|
||||
Reference in New Issue
Block a user