Commit 2f21280b authored by 芮自成's avatar 芮自成

Merge branch 'chronic-dev' of http://gitlab.yiboshi.com/nightkis1995/frontend-h5 into chronic-dev

parents 50af8eff 914206ca
......@@ -5,6 +5,11 @@ export function queryResidentInfo(params) {
return fetchBase({ url: `/chronic-admin/v1/chronic-residents-record/detailed`, body: params, loading: true })
}
// 居民档案ID查询居民死亡信息
export function getResidentsDeath(params) {
return fetchBase({ url: `/chronic-admin/v1/chronic-residents-death/info-record`,body: params,loading: true})
}
//更新居民基本信息
export function updateResident(params) {
return fetchBase({ url: `/chronic-admin/v1/chronic-residents-record/update`, body: params, loading: true })
......
......@@ -2,8 +2,8 @@
<div class='h-full flex flex-col patient-detail'>
<DocNavBar title='居民详情' class='shrink-0'>
<template #right>
<span class='text-primary' @click='() => addVisible = true' v-if='deathStatus !=9'>新增</span>
<span class='text-primary' @click='toCancelDeath' v-if='deathStatus == 9'>撤销死亡</span>
<span class='text-primary' @click='() => addVisible = true' v-if='deathStatus == 1'>新增</span>
<span class='text-primary' @click='toCancelDeath' v-if='showDeath'>撤销死亡</span>
</template>
</DocNavBar>
<div class='grow flex flex-col' style='background: #f5f5f5;min-height: 0px;'>
......@@ -97,7 +97,7 @@
<script>
import { useStore } from '@/doctor/store'
import { queryResidentInfo } from '@/api/doctor/resident.js'
import { getResidentsDeath, queryResidentInfo } from '@/api/doctor/resident.js'
import { showConfirmDialog, showNotify } from 'vant'
import DocNavBar from '@/doctor/components/docNavBar/DocNavBar.vue'
import ChronicTag from '@/doctor/components/chronicTag/ChronicTag.vue'
......@@ -128,6 +128,7 @@ export default {
store: useStore(),
residentInfoId: null,
residentInfo: {},
showDeath:false,
// 折叠
collapsed: true,
// 标签页index
......@@ -165,6 +166,9 @@ export default {
deathStatus() {
return this.residentInfo.chronicStatus
},
authInfo() {
return this.store.authInfo
},
tabList() {
const result = [
{ name: '筛查管理', id: 'SCREENING' },
......@@ -205,6 +209,25 @@ export default {
if (!this.activeTabItem.value) {
this.activeTab = 0
}
if (this.deathStatus == 9) {
this.queryResidentsDeath()
} else {
this.showDeath = false
}
})
},
//获取死亡信息
queryResidentsDeath() {
let par = {
residentInfoId: this.residentInfoId
}
getResidentsDeath(par).then(res => {
let CdofficeId = res.data.createOfficeId
if (this.authInfo.officeId == CdofficeId) {
this.showDeath = true
} else {
this.showDeath = true
}
})
},
onAddChange(val, option) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment