Compare commits
1
Commits
a132ce3da7
...
6238f01346
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
6238f01346 |
@@ -60,7 +60,7 @@ Component({
|
|||||||
methods: {
|
methods: {
|
||||||
refreshFiltered(options = this.data.options, keyword = this.data.keyword) {
|
refreshFiltered(options = this.data.options, keyword = this.data.keyword) {
|
||||||
const filtered = filterHospitals(options, keyword)
|
const filtered = filterHospitals(options, keyword)
|
||||||
const visibleRows = Math.min(filtered.length, 4)
|
const visibleRows = Math.min(filtered.length, 6)
|
||||||
this.setData({
|
this.setData({
|
||||||
filtered,
|
filtered,
|
||||||
optionsHeight: visibleRows * OPTION_HEIGHT,
|
optionsHeight: visibleRows * OPTION_HEIGHT,
|
||||||
@@ -112,6 +112,9 @@ Component({
|
|||||||
this.setData({ open: false, keyword: '', optionsHeight: 0, manualEntry: false })
|
this.setData({ open: false, keyword: '', optionsHeight: 0, manualEntry: false })
|
||||||
},
|
},
|
||||||
|
|
||||||
|
// 遮罩占位:catchtouchmove 阻止穿透滚动页面
|
||||||
|
noop() {},
|
||||||
|
|
||||||
onKeywordInput(e) {
|
onKeywordInput(e) {
|
||||||
const keyword = e.detail.value
|
const keyword = e.detail.value
|
||||||
this.setData({ keyword })
|
this.setData({ keyword })
|
||||||
|
|||||||
@@ -1,4 +1,6 @@
|
|||||||
<view class="hospital-select {{compact ? 'is-compact' : ''}} {{disabled ? 'is-disabled' : ''}}">
|
<view class="hospital-select {{compact ? 'is-compact' : ''}} {{disabled ? 'is-disabled' : ''}} {{open ? 'is-open' : ''}}">
|
||||||
|
<!-- 展开时的全屏遮罩:点击任意空白处收起,强化「可开可收」的下拉感知 -->
|
||||||
|
<view class="hospital-mask" wx:if="{{open}}" bindtap="onClose" catchtouchmove="noop"></view>
|
||||||
<view class="hospital-row">
|
<view class="hospital-row">
|
||||||
<text class="hospital-label">{{label}}</text>
|
<text class="hospital-label">{{label}}</text>
|
||||||
<view class="hospital-value" bindtap="onOpen">
|
<view class="hospital-value" bindtap="onOpen">
|
||||||
@@ -17,7 +19,9 @@
|
|||||||
confirm-type="search"
|
confirm-type="search"
|
||||||
bindinput="onKeywordInput"
|
bindinput="onKeywordInput"
|
||||||
/>
|
/>
|
||||||
<text class="hospital-search-close" bindtap="onClose">收起</text>
|
<view class="hospital-search-close" bindtap="onClose" aria-role="button" aria-label="收起医院列表">
|
||||||
|
<view class="hospital-collapse-arrow"></view>
|
||||||
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<!-- 填写其他医院:列表里没有的医院走这里 -->
|
<!-- 填写其他医院:列表里没有的医院走这里 -->
|
||||||
|
|||||||
@@ -1,10 +1,34 @@
|
|||||||
/* 医院选择:行结构与页面表单保持一致,展开面板作为行内下拉 */
|
/* 医院选择:行结构与页面表单保持一致,展开面板作为行内下拉 */
|
||||||
|
/* 展开时整组件抬到遮罩之上:遮罩盖住页面其余内容(含底部栏 100),面板仍可点 */
|
||||||
|
.hospital-select.is-open {
|
||||||
|
position: relative;
|
||||||
|
z-index: 151;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* 展开遮罩:浅墨半透明,点击任意空白处收起;层级低于页面支付弹窗(200/201) */
|
||||||
|
.hospital-mask {
|
||||||
|
position: fixed;
|
||||||
|
top: 0;
|
||||||
|
right: 0;
|
||||||
|
bottom: 0;
|
||||||
|
left: 0;
|
||||||
|
z-index: 1;
|
||||||
|
background: rgba(43, 37, 33, 0.3);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* 展开时行与面板抬到遮罩之上(同属 .is-open 层叠上下文,仅内部比较) */
|
||||||
|
.hospital-select.is-open .hospital-row,
|
||||||
|
.hospital-select.is-open .hospital-panel {
|
||||||
|
position: relative;
|
||||||
|
z-index: 2;
|
||||||
|
}
|
||||||
|
|
||||||
.hospital-row {
|
.hospital-row {
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
padding: 24rpx 0;
|
padding: 24rpx 0;
|
||||||
border-bottom: 2rpx solid var(--line, #ECE3D6);
|
border-bottom: 2rpx dotted var(--line-soft, #E9DECB);
|
||||||
}
|
}
|
||||||
|
|
||||||
.is-compact .hospital-row {
|
.is-compact .hospital-row {
|
||||||
@@ -37,6 +61,16 @@
|
|||||||
margin-left: 24rpx;
|
margin-left: 24rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* 行标题:浅橙底 tag,与页面表单 .order-label 同款(同宽对齐) */
|
||||||
|
.hospital-label {
|
||||||
|
box-sizing: border-box;
|
||||||
|
min-width: 190rpx;
|
||||||
|
padding: 8rpx 20rpx;
|
||||||
|
text-align: center;
|
||||||
|
background: var(--brand-soft, #FFF4E8);
|
||||||
|
border-radius: 12rpx;
|
||||||
|
}
|
||||||
|
|
||||||
.hospital-value-text {
|
.hospital-value-text {
|
||||||
min-width: 0;
|
min-width: 0;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
@@ -124,13 +158,13 @@
|
|||||||
transform: rotate(-135deg);
|
transform: rotate(-135deg);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* 展开面板:浅橙衬底 + 2rpx 浅橙描边托形,与白卡拉开边界(不用阴影) */
|
/* 展开面板:白底 + 2rpx 浅橙描边托形,与白卡靠橙边区分(不用阴影) */
|
||||||
.hospital-panel {
|
.hospital-panel {
|
||||||
margin: 12rpx 0 24rpx;
|
margin: 12rpx 0 24rpx;
|
||||||
padding: 0 20rpx 20rpx;
|
padding: 0 20rpx 20rpx;
|
||||||
border: 2rpx solid var(--brand-line, #FFE0C2);
|
border: 2rpx solid var(--brand-line, #FFE0C2);
|
||||||
border-radius: 20rpx;
|
border-radius: 20rpx;
|
||||||
background: var(--brand-soft, #FFF4E8);
|
background: var(--white, #FFFFFF);
|
||||||
}
|
}
|
||||||
|
|
||||||
.hospital-search {
|
.hospital-search {
|
||||||
@@ -150,11 +184,22 @@
|
|||||||
border-radius: 12rpx;
|
border-radius: 12rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* 收起按钮:上箭头图标(CSS 边框三角,不依赖字体图标),留足点击热区 */
|
||||||
.hospital-search-close {
|
.hospital-search-close {
|
||||||
|
display: flex;
|
||||||
flex-shrink: 0;
|
flex-shrink: 0;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
margin-left: 16rpx;
|
margin-left: 16rpx;
|
||||||
color: var(--muted, #6F655C);
|
padding: 12rpx;
|
||||||
font-size: var(--fs-28, 28rpx);
|
}
|
||||||
|
|
||||||
|
.hospital-collapse-arrow {
|
||||||
|
width: 20rpx;
|
||||||
|
height: 20rpx;
|
||||||
|
border-top: 4rpx solid var(--brand-ink, #9B4508);
|
||||||
|
border-right: 4rpx solid var(--brand-ink, #9B4508);
|
||||||
|
transform: rotate(-45deg);
|
||||||
}
|
}
|
||||||
|
|
||||||
.hospital-search-close:active {
|
.hospital-search-close:active {
|
||||||
@@ -178,7 +223,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
.hospital-option:active {
|
.hospital-option:active {
|
||||||
background: var(--white, #FFFFFF);
|
background: var(--brand-soft, #FFF4E8);
|
||||||
}
|
}
|
||||||
|
|
||||||
.hospital-option-main {
|
.hospital-option-main {
|
||||||
|
|||||||
@@ -80,7 +80,10 @@
|
|||||||
<view class="order-row">
|
<view class="order-row">
|
||||||
<text class="order-label">就诊省份</text>
|
<text class="order-label">就诊省份</text>
|
||||||
<picker class="order-picker" mode="selector" range="{{provinces}}" value="{{provinceIndex}}" bindchange="onProvinceChange">
|
<picker class="order-picker" mode="selector" range="{{provinces}}" value="{{provinceIndex}}" bindchange="onProvinceChange">
|
||||||
<view class="picker-value {{province ? '' : 'placeholder'}}">{{province || '请选择省份'}}</view>
|
<view class="picker-value-wrap">
|
||||||
|
<text class="picker-value {{province ? '' : 'placeholder'}}">{{province || '请选择省份'}}</text>
|
||||||
|
<view class="picker-chevron"></view>
|
||||||
|
</view>
|
||||||
</picker>
|
</picker>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
@@ -97,14 +100,20 @@
|
|||||||
<view class="order-row">
|
<view class="order-row">
|
||||||
<text class="order-label">陪诊师性别</text>
|
<text class="order-label">陪诊师性别</text>
|
||||||
<picker class="order-picker" mode="selector" range="{{genderOptions}}" value="{{genderIndex}}" bindchange="onGenderChange">
|
<picker class="order-picker" mode="selector" range="{{genderOptions}}" value="{{genderIndex}}" bindchange="onGenderChange">
|
||||||
<view class="picker-value {{gender ? '' : 'placeholder'}}">{{gender || '请选择性别要求'}}</view>
|
<view class="picker-value-wrap">
|
||||||
|
<text class="picker-value {{gender ? '' : 'placeholder'}}">{{gender || '请选择性别要求'}}</text>
|
||||||
|
<view class="picker-chevron"></view>
|
||||||
|
</view>
|
||||||
</picker>
|
</picker>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<view class="order-row">
|
<view class="order-row">
|
||||||
<text class="order-label">预约日期</text>
|
<text class="order-label">预约日期</text>
|
||||||
<picker class="order-picker" mode="date" value="{{appointmentDate}}" start="{{minAppointmentDate}}" bindchange="onDateChange">
|
<picker class="order-picker" mode="date" value="{{appointmentDate}}" start="{{minAppointmentDate}}" bindchange="onDateChange">
|
||||||
<view class="picker-value {{appointmentDate ? '' : 'placeholder'}}">{{appointmentDate || '请选择预约日期'}}</view>
|
<view class="picker-value-wrap">
|
||||||
|
<text class="picker-value {{appointmentDate ? '' : 'placeholder'}}">{{appointmentDate || '请选择预约日期'}}</text>
|
||||||
|
<view class="picker-chevron"></view>
|
||||||
|
</view>
|
||||||
</picker>
|
</picker>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
@@ -112,7 +121,10 @@
|
|||||||
<view class="order-row">
|
<view class="order-row">
|
||||||
<text class="order-label">预约时间</text>
|
<text class="order-label">预约时间</text>
|
||||||
<picker class="order-picker" mode="selector" range="{{timeSlots}}" value="{{timeSlotIndex}}" bindchange="onTimeChange">
|
<picker class="order-picker" mode="selector" range="{{timeSlots}}" value="{{timeSlotIndex}}" bindchange="onTimeChange">
|
||||||
<view class="picker-value {{appointmentTime ? '' : 'placeholder'}}">{{appointmentTime || '请选择预约时间'}}</view>
|
<view class="picker-value-wrap">
|
||||||
|
<text class="picker-value {{appointmentTime ? '' : 'placeholder'}}">{{appointmentTime || '请选择预约时间'}}</text>
|
||||||
|
<view class="picker-chevron"></view>
|
||||||
|
</view>
|
||||||
</picker>
|
</picker>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
|
|||||||
@@ -55,7 +55,7 @@ page {
|
|||||||
/* 陪诊项目:展示沿用原项目卡片,点击卡片展开下拉列表 */
|
/* 陪诊项目:展示沿用原项目卡片,点击卡片展开下拉列表 */
|
||||||
.service-picker-row {
|
.service-picker-row {
|
||||||
padding: 24rpx 0;
|
padding: 24rpx 0;
|
||||||
border-bottom: 2rpx solid var(--line);
|
border-bottom: 2rpx dotted var(--line-soft, #E9DECB);
|
||||||
}
|
}
|
||||||
|
|
||||||
.service-picker {
|
.service-picker {
|
||||||
@@ -225,12 +225,13 @@ page {
|
|||||||
font-size: var(--fs-30);
|
font-size: var(--fs-30);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* 行间分隔:点分线(2rpx 才在真机可见,1rpx 会碎成像素噪点) */
|
||||||
.order-row {
|
.order-row {
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
padding: 24rpx 0;
|
padding: 24rpx 0;
|
||||||
border-bottom: 2rpx solid var(--line);
|
border-bottom: 2rpx dotted var(--line-soft, #E9DECB);
|
||||||
}
|
}
|
||||||
|
|
||||||
.order-row:last-child {
|
.order-row:last-child {
|
||||||
@@ -245,9 +246,21 @@ page {
|
|||||||
|
|
||||||
.order-label {
|
.order-label {
|
||||||
flex-shrink: 0;
|
flex-shrink: 0;
|
||||||
|
box-sizing: border-box;
|
||||||
|
/* 统一宽度:容纳 5 字标题(5×30 + 40 内边距),短标题居中补齐 */
|
||||||
|
min-width: 190rpx;
|
||||||
|
padding: 8rpx 20rpx;
|
||||||
color: var(--muted);
|
color: var(--muted);
|
||||||
font-size: var(--fs-30);
|
font-size: var(--fs-30);
|
||||||
letter-spacing: 1rpx;
|
letter-spacing: 1rpx;
|
||||||
|
text-align: center;
|
||||||
|
background: var(--brand-soft, #FFF4E8);
|
||||||
|
border-radius: 12rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* 竖排行标题不随 stretch 撑满整行,保持 tag 宽度 */
|
||||||
|
.order-row.column .order-label {
|
||||||
|
align-self: flex-start;
|
||||||
}
|
}
|
||||||
|
|
||||||
.order-input,
|
.order-input,
|
||||||
@@ -282,6 +295,23 @@ page {
|
|||||||
text-align: right;
|
text-align: right;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* picker 取值 + 下拉箭头:右对齐成一列,与医院选择行的箭头对齐 */
|
||||||
|
.picker-value-wrap {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: flex-end;
|
||||||
|
gap: 12rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.picker-chevron {
|
||||||
|
flex-shrink: 0;
|
||||||
|
width: 16rpx;
|
||||||
|
height: 16rpx;
|
||||||
|
border-right: 2rpx solid var(--muted, #6F655C);
|
||||||
|
border-bottom: 2rpx solid var(--muted, #6F655C);
|
||||||
|
transform: rotate(45deg);
|
||||||
|
}
|
||||||
|
|
||||||
.order-textarea {
|
.order-textarea {
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
@@ -392,7 +422,7 @@ page {
|
|||||||
}
|
}
|
||||||
|
|
||||||
.bottom-placeholder {
|
.bottom-placeholder {
|
||||||
height: 152rpx;
|
height: 200rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
.bottom-bar {
|
.bottom-bar {
|
||||||
|
|||||||
Reference in New Issue
Block a user