3.12晚上
This commit is contained in:
@@ -18,6 +18,12 @@
|
||||
<view class="label">备注</view>
|
||||
<input class="input" v-model.trim="remark" :placeholder="groupInfo.nickname || '给患者添加备注名'" placeholder-class="ph" maxlength="20"/>
|
||||
</view>
|
||||
<view class="row" v-if="nickname">
|
||||
<view class="left">申请消息为:我是{{ nickname }}</view>
|
||||
<view class="right" @click="fillNickname">
|
||||
填入
|
||||
</view>
|
||||
</view>
|
||||
<view class="form-block" @click="goGroup">
|
||||
<view class="label">分组</view>
|
||||
<view class="iptbox readonly">
|
||||
@@ -35,7 +41,7 @@
|
||||
</view>
|
||||
|
||||
<view class="bottom-bar">
|
||||
<button class="save-btn" @click="updateNicknameNote">完成</button>
|
||||
<button class="save-btn" :class="{ disabled: isRemarkEmpty }" :disabled="isRemarkEmpty" @click="updateNicknameNote">完成</button>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
@@ -52,6 +58,8 @@
|
||||
const patientCardData = ref({})
|
||||
const groupInfo = ref({})
|
||||
const noteLength = computed(() => (note.value || '').length)
|
||||
const isRemarkEmpty = computed(() => !(remark.value || '').trim())
|
||||
const nickname = ref('')
|
||||
|
||||
const goBack = () => {
|
||||
uni.navigateBack()
|
||||
@@ -64,6 +72,9 @@
|
||||
|
||||
onLoad((options) => {
|
||||
patientUuid.value = options.uuid || ''
|
||||
if(options.nickname){
|
||||
nickname.value = options.nickname
|
||||
}
|
||||
})
|
||||
|
||||
onShow(() => {
|
||||
@@ -84,6 +95,7 @@
|
||||
})
|
||||
}
|
||||
const updateNicknameNote = async() => {
|
||||
if (isRemarkEmpty.value) return
|
||||
const res = await api.updateNicknameNote({
|
||||
patient_uuid: patientUuid.value,
|
||||
nickname: remark.value,
|
||||
@@ -104,9 +116,28 @@
|
||||
uni.showToast({ title: '保存成功', icon: 'none' })
|
||||
setTimeout(() => goBack(), 700)
|
||||
}
|
||||
const fillNickname = () => {
|
||||
remark.value = nickname.value
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.row{
|
||||
margin-top: -20rpx;
|
||||
display: flex;
|
||||
background: #fff;
|
||||
padding:0 30rpx;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
.left{
|
||||
font-size: 28rpx;
|
||||
color: #666;
|
||||
}
|
||||
.right{
|
||||
font-size: 32rpx;
|
||||
color: #3ec7c0;
|
||||
}
|
||||
}
|
||||
.contentbox{
|
||||
top: calc(var(--status-bar-height) + 44px);
|
||||
position: fixed;
|
||||
@@ -193,6 +224,10 @@
|
||||
border: none;
|
||||
border-radius: 12rpx;
|
||||
font-size: 32rpx;
|
||||
&.disabled{
|
||||
background: #d9d9d9;
|
||||
color: #ffffff;
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
||||
Reference in New Issue
Block a user