fix(签署任务): 固定选择文档区高度并调整患者输入聚焦行为
This commit is contained in:
@@ -161,6 +161,10 @@ watch(
|
|||||||
resetForm()
|
resetForm()
|
||||||
await loadTemplates()
|
await loadTemplates()
|
||||||
await nextTick()
|
await nextTick()
|
||||||
|
// 自动聚焦只是让人可以直接开始打字;**下拉不跟着弹**。
|
||||||
|
// 展开入口挂在 @click / @input 上,不挂 @focus —— 原型是 onfocus 即展开
|
||||||
|
// (openM 里还会 ntPid.focus()),这里按使用要求有意偏离:
|
||||||
|
// 打开弹窗就盖住 B/C/D 三区,什么还没做就得先把它关掉。
|
||||||
patientInput.value?.focus()
|
patientInput.value?.focus()
|
||||||
},
|
},
|
||||||
)
|
)
|
||||||
@@ -197,7 +201,7 @@ watch(
|
|||||||
v-model="patientId"
|
v-model="patientId"
|
||||||
placeholder="如:P202610001 或 患者姓名"
|
placeholder="如:P202610001 或 患者姓名"
|
||||||
aria-label="患者 ID"
|
aria-label="患者 ID"
|
||||||
@focus="openSuggestions"
|
@click="openSuggestions"
|
||||||
@input="handlePatientInput"
|
@input="handlePatientInput"
|
||||||
@blur="handlePatientBlur"
|
@blur="handlePatientBlur"
|
||||||
@keydown.enter.prevent="locatePatient"
|
@keydown.enter.prevent="locatePatient"
|
||||||
@@ -908,9 +912,24 @@ watch(
|
|||||||
align-items: stretch;
|
align-items: stretch;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* C 区(选择文档)高度**固定为最大值**,不随树内容伸缩。
|
||||||
|
*
|
||||||
|
* 树原来是 `max-height: 340px` 的自适应:科室下只有一个分类、或右栏只命中一份文档时,
|
||||||
|
* 整块会缩到一百多像素;展开内容多了再长回去 —— 于是整个弹窗一会儿高一会儿低,
|
||||||
|
* 点一下分类就跳一次。这里把树的可用高度钉死在「满高」340px。
|
||||||
|
*
|
||||||
|
* 固定的是 **section-body 的内容区**(356 = 树 340 + 上下内边距 16),不是整块 C 区:
|
||||||
|
* C 区表头里有一个搜索框,比其他分区的表头高一截,写死整块高度会把树压矮
|
||||||
|
* (第一版写 `height: 388px` 就压成了 330,因为算漏了这个搜索框)。
|
||||||
|
*
|
||||||
|
* 校验错误出现时是**挤掉树的高度**,而不是把 C 区顶高 —— 否则提交失败那一下弹窗仍然会跳。
|
||||||
|
*/
|
||||||
.document-section {
|
.document-section {
|
||||||
|
display: flex;
|
||||||
min-width: 0;
|
min-width: 0;
|
||||||
flex: 1;
|
flex: 1;
|
||||||
|
flex-direction: column;
|
||||||
}
|
}
|
||||||
|
|
||||||
.method-section {
|
.method-section {
|
||||||
@@ -924,10 +943,20 @@ watch(
|
|||||||
margin-bottom: 0;
|
margin-bottom: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.document-section .section-body {
|
||||||
|
display: flex;
|
||||||
|
height: 356px;
|
||||||
|
flex: none;
|
||||||
|
flex-direction: column;
|
||||||
|
min-height: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* D 区靠 .document-method-grid 的 align-items:stretch 与 C 区等高;内容少就留白 */
|
||||||
.method-section .section-body {
|
.method-section .section-body {
|
||||||
display: flex;
|
display: flex;
|
||||||
flex: 1;
|
flex: 1;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
|
min-height: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
.nt-search {
|
.nt-search {
|
||||||
@@ -941,24 +970,27 @@ watch(
|
|||||||
border-radius: 6px;
|
border-radius: 6px;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* 两栏:左 196px 科室→分类,右 1fr 文档标题 */
|
/* 两栏:左 196px 科室→分类,右 1fr 文档标题。
|
||||||
|
树撑满 C 区剩余高度(不再自己定高),两栏各自滚动 —— 高度由 .document-section 钉住 */
|
||||||
|
|
||||||
.template-tree {
|
.template-tree {
|
||||||
display: grid;
|
display: grid;
|
||||||
|
flex: 1;
|
||||||
|
min-height: 0;
|
||||||
grid-template-columns: 196px minmax(0, 1fr);
|
grid-template-columns: 196px minmax(0, 1fr);
|
||||||
border: 1px solid var(--line);
|
border: 1px solid var(--line);
|
||||||
border-radius: 8px;
|
border-radius: 8px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.nt-tree-left {
|
.nt-tree-left {
|
||||||
max-height: 340px;
|
min-height: 0;
|
||||||
padding: 2px 6px 2px 2px;
|
padding: 2px 6px 2px 2px;
|
||||||
overflow-y: auto;
|
overflow-y: auto;
|
||||||
border-right: 1px solid var(--line);
|
border-right: 1px solid var(--line);
|
||||||
}
|
}
|
||||||
|
|
||||||
.nt-tree-right {
|
.nt-tree-right {
|
||||||
max-height: 340px;
|
min-height: 0;
|
||||||
padding: 6px 4px 6px 10px;
|
padding: 6px 4px 6px 10px;
|
||||||
overflow-y: auto;
|
overflow-y: auto;
|
||||||
}
|
}
|
||||||
@@ -1384,6 +1416,8 @@ watch(
|
|||||||
|
|
||||||
.template-tree {
|
.template-tree {
|
||||||
grid-template-columns: 1fr;
|
grid-template-columns: 1fr;
|
||||||
|
/* 单栏后两行要显式分高:左栏按内容(上限 200px),右栏吃掉剩余并自己滚动 */
|
||||||
|
grid-template-rows: auto minmax(0, 1fr);
|
||||||
}
|
}
|
||||||
|
|
||||||
.nt-tree-left {
|
.nt-tree-left {
|
||||||
|
|||||||
Reference in New Issue
Block a user