9.4上午提交

This commit is contained in:
zoujiandong
2025-09-04 10:22:51 +08:00
parent b068fb00cc
commit e86f8e77a7
17 changed files with 1364 additions and 155 deletions
+59 -19
View File
@@ -17,15 +17,15 @@
<view class="cell" @click="goRemark">
<text class="cell-left">设置备注</text>
<view class="cell-right">
<text class="cell-desc">给患者添加备注名</text>
<text class="cell-desc">{{ groupInfo.nickname || '给患者添加备注名' }}</text>
<uni-icons type="right" size="20" color="#999"></uni-icons>
</view>
</view>
<view class="cell" @click="goRemark">
<view class="cell" @click="goGroup">
<text class="cell-left">设置分组</text>
<view class="cell-right">
<text class="cell-desc">通过分组给患者分类</text>
<text class="cell-desc">{{ groupInfo.name || '通过分组给患者分类' }}</text>
<uni-icons type="right" size="20" color="#999"></uni-icons>
</view>
</view>
@@ -33,7 +33,7 @@
<view class="cell" @click="goRemark">
<text class="cell-left">患者描述</text>
<view class="cell-right">
<text class="cell-desc">补充患者关键信息,方便随访患者</text>
<text class="cell-desc">{{ groupInfo.note || '补充患者关键信息,方便随访患者' }}</text>
<uni-icons type="right" size="20" color="#999"></uni-icons>
</view>
</view>
@@ -41,7 +41,7 @@
<view class="cell" @click="setNextFollow">
<text class="cell-left">下次随访时间</text>
<view class="cell-right">
<text class="cell-desc">添加随访提醒</text>
<text class="cell-desc">{{patientCardData.FollowUpDate? patientCardData.FollowUpDate : '添加随访提醒' }}</text>
<uni-icons type="right" size="20" color="#999"></uni-icons>
</view>
</view>
@@ -55,40 +55,80 @@
</view>
<view class="danger-block">
<text class="danger-text" @click="unbindPatient">解除随访</text>
<text class="danger-text" @click="visible=true">解除随访</text>
</view>
</view>
<unidialog :visible="visible" :content="message" @close="visible=false" @confirm="deleteFollowUp" ></unidialog>
</template>
<script setup>
import { ref } from 'vue'
import navTo from '@/utils/navTo.js'
import { onLoad } from '@dcloudio/uni-app'
import { onLoad, onShow } from '@dcloudio/uni-app'
import api from '@/api/api.js'
import unidialog from '@/components/dialog/dialog.vue'
const patientUuid = ref('')
const patientName = ref('')
const patientCardData = ref({})
const groupInfo = ref({})
const visible = ref(false)
const message = ref('')
const goBack = () => {
uni.navigateBack();
}
const goRemark = () => {
navTo({ url: '/pages_app/patientRemark/patientRemark' })
navTo({ url: '/pages_app/patientRemark/patientRemark?uuid=' + patientUuid.value })
}
const goGroup = () => {
navTo({ url: '/pages_app/groupManage/groupManage?uuid=' + patientUuid.value })
}
onLoad((options) => {
patientUuid.value = options.uuid;
console.log(patientUuid.value)
})
onShow(() => {
patientCard();
})
const setNextFollow = () => {
navTo({ url: '/pages_app/visit/visit' })
if(patientCardData.value.FollowUpUuid){
navTo({ url: '/pages_app/followDetail/followDetail?followUpUuid=' +patientCardData.value.FollowUpUuid+'&patient_name=' + patientName.value })
}else{
navTo({ url: '/pages_app/visit/visit?uuid=' + patientUuid.value+'&patient_name=' + patientName.value })
}
}
const goFeedback = () => {
navTo({ url: '/pages_app/feedback/feedback' })
}
const unbindPatient = () => {
uni.showModal({
title: '确认解除',
content: '确定要解除随访关系吗?',
success: (res) => {
if (res.confirm) {
uni.showToast({ title: '已提交解除', icon: 'success' })
// TODO: 调用解除随访接口
}
const patientCard = () =>{
api.patientCard({
patient_uuid: patientUuid.value
}).then(res => {
if(res.code == 200){
patientName.value = res.group.nickname || res.patient.realName
message.value = `解除[${patientName.value}]的随访关系?`
patientCardData.value = res
groupInfo.value = res.group || {}
}
})
}
const deleteFollowUp = () => {
api.cancelRes({
patientUuid: patientUuid.value
}).then(res => {
if(res.code == 1){
uni.showToast({
title: '解除成功',
icon: 'none'
})
uni.redirectTo({
url: '/pages_app/patientMsg/patientMsg'
})
}
visible.value = false
})
}
</script>
<style lang="scss" scoped>