Commit 7821a959 authored by gengchunlei's avatar gengchunlei

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

 Conflicts:
	src/doctor/Doctor.vue
parents f2053694 65827e46
...@@ -39,3 +39,8 @@ export function addDiagnose(params) { ...@@ -39,3 +39,8 @@ export function addDiagnose(params) {
export function updateDiagnose(params) { export function updateDiagnose(params) {
return fetchBase({ url: `/chronic-admin/v1/chronic-diagnose-record/update`, body: params, loading: true }) return fetchBase({ url: `/chronic-admin/v1/chronic-diagnose-record/update`, body: params, loading: true })
} }
//删除诊断
export function delDiagnose(params) {
return fetchBase({ url: `/chronic-admin/v1/chronic-diagnose-record/delete`, body: params, loading: true })
}
\ No newline at end of file
...@@ -66,7 +66,7 @@ export default { ...@@ -66,7 +66,7 @@ export default {
if (!token) { if (!token) {
token = sessionStorage.getItem('token') token = sessionStorage.getItem('token')
if (process.env.NODE_ENV !== 'production') { if (process.env.NODE_ENV !== 'production') {
token = 'ce71f4f0-5464-4b22-9cad-5f53e66a8875' token = '779099b2-3d34-41ef-b14a-4a435fb48adb'
} }
} }
if (token) { if (token) {
...@@ -263,4 +263,40 @@ export default { ...@@ -263,4 +263,40 @@ export default {
flex-grow: 1; flex-grow: 1;
} }
} }
// 折叠面板
.doc-collapse {
margin-top: .1rem;
&::after {
display: none;
}
.van-cell {
padding: .1rem 0;
color: #8C8C8C;
font-weight: 600;
background: transparent;
&::after {
display: none;
}
.svg-icon {
font-size: .12rem;
transition: all .2s;
}
}
.van-collapse-item {
.van-collapse-item__content {
padding: 0;
color: #262626;
}
&::after {
display: none;
}
}
// 展开
.van-collapse-item__title--expanded {
.svg-icon {
transform: rotate(-180deg);
}
}
}
</style> </style>
...@@ -374,7 +374,12 @@ export default { ...@@ -374,7 +374,12 @@ export default {
this.$refs.form.validate().then(() => { this.$refs.form.validate().then(() => {
resolve(this.form) resolve(this.form)
}).catch((e) => { }).catch((e) => {
console.warn('ArchiveCommon error', e) reject('档案信息校验失败')
console.warn('档案信息校验失败', e)
const array = e || []
if (array.length) {
this.$refs.form.scrollToField(array[0].name)
}
}) })
}) })
} }
......
...@@ -105,8 +105,9 @@ export default { ...@@ -105,8 +105,9 @@ export default {
width: 100%; width: 100%;
height: 100%; height: 100%;
min-height: 90px; min-height: 90px;
border: 1px dashed #d9d9d9; // border: 1px dashed #d9d9d9;
background: #fafafa; // background: #fafafa;
background: #EFF2F7;
img { img {
width: 100%; width: 100%;
height: 90px; height: 90px;
......
<template> <template>
<div> <div>
<div class='list gap-x-2.5 gap-y-1 flex items-center flex-wrap'> <div class='list gap-x-2.5 gap-y-1 flex items-center flex-wrap'>
<div v-for="(url, index) in imgList" :key="index" @click='toPreview(index)'> <div v-for="(url, index) in imgList" :key="index" @click='toPreview(index)'
<img style='width: 1.47rem;height: 2.04rem' :src="url.trueDownloadUrl" /> class="flex gap-x-2.5">
<!-- <img :style="{width: imgSize.width, height: imgSize.height}" :src="url.trueDownloadUrl" /> -->
<DocImage :style="{width: imgSize.width, height: imgSize.height}" :src="url.trueDownloadUrl"/>
</div> </div>
</div> </div>
<van-overlay :show='imgShow' @click='imgShow = false'> <van-overlay :show='imgShow' @click='imgShow = false'>
...@@ -18,10 +20,22 @@ ...@@ -18,10 +20,22 @@
</template> </template>
<script> <script>
import DocImage from '../docImageUpload/DocImage.vue'
export default { export default {
name: 'imagePreview', name: 'imagePreview',
components: {
DocImage
},
props: { props: {
imgList: Array, imgList: Array,
imgSize: {
default: () => {
return {
width: '.97rem',
height: '.97rem'
}
}}
}, },
data() { data() {
return { return {
......
...@@ -106,6 +106,7 @@ export default { ...@@ -106,6 +106,7 @@ export default {
if (this.info.check) { if (this.info.check) {
let check = this.info.check let check = this.info.check
this.check = typeof check === 'string' ? check.split(',') : check this.check = typeof check === 'string' ? check.split(',') : check
this.checkName = this.store.getDictValue('CP00111', this.check)
} }
getInspectCode(2).then(res => { getInspectCode(2).then(res => {
console.log(res) console.log(res)
...@@ -152,7 +153,12 @@ export default { ...@@ -152,7 +153,12 @@ export default {
console.log(data, check) console.log(data, check)
resolve({ check, data }) resolve({ check, data })
}).catch((e) => { }).catch((e) => {
reject(e) reject('检查表单校验失败')
console.warn('检查表单校验失败', e)
const array = e || []
if (array.length) {
this.$refs.form.scrollToField(array[0].name)
}
}) })
}) })
}, },
......
...@@ -174,6 +174,7 @@ export default { ...@@ -174,6 +174,7 @@ export default {
if (this.info.inspect) { if (this.info.inspect) {
let inspect = this.info.inspect let inspect = this.info.inspect
this.inspect = typeof inspect === 'string' ? inspect.split(',') : inspect this.inspect = typeof inspect === 'string' ? inspect.split(',') : inspect
this.inspectName = this.store.getDictValue('CP00100', this.inspect)
} }
this.image = this.info.image this.image = this.info.image
this.imageData = this.info.imageData || [] this.imageData = this.info.imageData || []
...@@ -210,7 +211,12 @@ export default { ...@@ -210,7 +211,12 @@ export default {
console.log(data, inspect, image) console.log(data, inspect, image)
resolve({ inspect, data, image }) resolve({ inspect, data, image })
}).catch((e) => { }).catch((e) => {
reject(e) reject('检验表单校验失败')
console.warn('检验表单校验失败', e)
const array = e || []
if (array.length) {
this.$refs.form.scrollToField(array[0].name)
}
}) })
}) })
}, },
......
<template> <template>
<div class="h-full flex flex-col diagnose-dtail"> <div class="h-full flex flex-col diagnose-dtail">
<DocNavBar title="诊断详情" class="shrink-0"></DocNavBar> <DocNavBar title="诊断详情" class="shrink-0"></DocNavBar>
<div class="px-4 py-3 shrink-0 base-info">
<div class="name">{{ baseInfo.residentName }}</div>
<div class="flex flex-wrap mt-1 w-full base-info-inner" style="line-height: .22rem;" >
<div>
<span>证件类型:</span>
<span>{{ baseInfo.certificateTypeName }}</span>
</div>
<div>
<span>证件号码:</span>
<span>{{ baseInfo.idCard }}</span>
</div>
<div>
<span>出生日期:</span>
<span>{{ baseInfo.dataBirth }}</span>
</div>
<div>
<span>民族:</span>
<span>{{ baseInfo.nationalName }}</span>
</div>
<div>
<span>其他联系人:</span>
<span>{{ baseInfo.contactName }}</span>
</div>
<div>
<span>联系人关系:</span>
<span>
{{ baseInfo.relationName }}
<span v-if="baseInfo.relationOther"> {{ baseInfo.relationOther }}</span>
</span>
</div>
<div class="w-full">
<span>现住址:</span>
<span>{{ baseInfo.fullNowAddress }}</span>
</div>
<div class="w-full">
<span>户籍地址:</span>
<span>{{ baseInfo.fullPermanentAddress }}</span>
</div>
</div>
</div>
<div class="p-3 grow cont-box">
<div class="p-3 h-full cont-inner">
<div class="flex justify-between collapse-head mt-2">
<span class="text-16 font-semibold">全部内容</span>
<span @click="toggleAll">
<span v-if="!collapseAll">展开全部</span>
<span v-else>展开收起</span>
<span :class="['ml-2 icon-down', { 'icon-down-expanded': collapseAll }]">
<doc-icon type="doc-down" />
</span>
</span>
</div>
<van-collapse :model-value="activeCollapse" ref="collapse" class="doc-collapse"
@change="collapseChange">
<van-collapse-item v-for="collapse in collapseList" :key="collapse.name"
:title="collapse.title" :name="collapse.name">
<template #right-icon>
<doc-icon type="doc-down" />
</template>
<div v-if="collapse.name === '1'">
<div v-for="item in collapse.columns" :key="item.key" >
<div class="flex justify-between py-1 border-bottom item">
<span class="shrink-0 mr-2 label">{{ item.title }}</span>
<span class="text-end">{{ info[item.key] || '-' }}</span>
</div>
</div>
<div class="py-1">诊断评估</div>
<div class="py-1 px-3 block">
{{ info.diagnoseResultValue }}
</div>
</div>
<div v-else-if="collapse.name === '2'">
<div v-for="inspect in inspectInfo" :key="inspect.id" >
<div>{{ inspect.diagnoseName }}</div>
<div v-for="item in inspect.inspectDetailedObj" :key="item.itemCode"
class="flex justify-between py-1 border-bottom item">
<span class="shrink-0 mr-2 label">{{ item.itemName }}</span>
<span class="text-end">
{{ item.itemValue }}
<span v-if="item.unit" class="ml-1">{{ item.unit }}</span>
</span>
</div>
</div>
<imagePreview :imgList="inspectFileList" class="mt-1"
v-if="inspectFileList.length"/>
<span class="py-1" v-if="!inspectFileList.length && !inspectInfo.length">-</span>
</div>
<div v-else-if="collapse.name === '3'">
<div v-for="check in checkInfo" :key="check.id" >
<div class="py-1" >{{ check.diagnoseName }}</div>
<div class="py-1 px-3 block" >
<div v-if="check.inspectDetailedObj.length">
<span>{{ check.inspectDetailedObj[0].itemValue }}</span>
</div>
<imagePreview :imgList="check.inspectFileList" class="mt-1"
v-if="check.inspectFileList?.length"/>
</div>
</div>
</div>
</van-collapse-item>
</van-collapse>
</div>
</div>
</div> </div>
</template> </template>
<script> <script>
import { showNotify } from 'vant'
import { getDiagnoseDetail } from '@/api/doctor/disease.js'
import { useStore } from '@/doctor/store'
import DocNavBar from '@/doctor/components/docNavBar/DocNavBar.vue' import DocNavBar from '@/doctor/components/docNavBar/DocNavBar.vue'
import imagePreview from '@/doctor/components/imagePreview/imagePreview.vue'
export default { export default {
components: { components: {
DocNavBar DocNavBar,
imagePreview
},
data() {
return {
store: useStore(),
activeCollapse: [],
collapseList: [
{ title: '诊断评估', name: '1', columns: [
{ title: '诊断名称', key: 'diseaseName' },
{ title: '诊断日期', key: 'diseaseDate' },
{ title: '诊断单位', key: 'diseaseUnitName' },
{ title: '诊断科室', key: 'diseaseOfficeName' },
{ title: '诊断医生', key: 'diseaseDoctorName' },
]},
{ title: '检验信息', name: '2'},
{ title: '检查信息', name: '3'}
],
// 全部展开、收起
collapseAll: false,
info: {}
}
},
computed: {
id() {
return this.$route.query.id
},
baseInfo() {
return this.info.residentsRecord || {}
},
inspectInfo() {
const temp = this.info.diagnoseInspectList || []
return temp.filter(e => e.projectType == 0)
},
checkInfo() {
const temp = this.info.diagnoseInspectList || []
return temp.filter(e => e.projectType == 1)
},
inspectFileList() {
return this.info.inspectFileList || []
}
},
created() {
document.title = '诊断详情'
if (!this.id) {
showNotify({ type: 'warning', message: '未获取到查询信息'})
return
}
this.init()
},
methods: {
init() {
getDiagnoseDetail(this.id).then(res => {
this.info = res.data || {}
for(let item of this.info.diagnoseInspectList) {
if (item.inspectDetailed !== void 0 && item.inspectDetailed !== ''){
item.inspectDetailedObj = JSON.parse(item.inspectDetailed)
} else {
item.inspectDetailedObj = []
}
}
// this.collapseList[0].info = this.info?.residentsRecord
// this.collapseList[1].info = this.info
// this.collapseList[2].info = this.info
})
},
// 折叠面板切换
collapseChange(val) {
// console.log(val, this.activeCollapse)
if (val && val.length <= 2) {
this.activeCollapse = val.slice(val.length - 1)
} else {
if (this.activeCollapse.length > val.length) {
this.activeCollapse = val
}
if (this.activeCollapse.length < val.length) {
this.activeCollapse = val.slice(val.length - 1)
}
}
if (val && val.length === this.collapseList.length) {
this.collapseAll = true
} else {
this.collapseAll = false
}
},
// 全部展开、收起
toggleAll() {
if (this.collapseAll) {
this.activeCollapse = []
} else {
this.activeCollapse = this.collapseList.map(e => e.name)
}
this.collapseAll = !this.collapseAll
}
} }
} }
</script> </script>
<style lang="less" scoped> <style lang="less" scoped>
.base-info {
background: linear-gradient(to bottom, #D2E4FF , #fff 50%);
color: #8c8c8c;
.name {
font-weight: 600;
color: #000;
font-size: 18px;
}
.base-info-inner {
column-gap: 18px;
>div {
>span:last-child {
color: #262626;
}
}
}
}
.cont-box {
background-color: #f9f9f9;
.cont-inner {
background: linear-gradient(to bottom, #D2E4FF , #fff .6rem);
border-top-left-radius: .08rem;
border-top-right-radius: .08rem;
}
.block {
background-color: #F8FAFC;
color: #4D5665;
border-radius: 4px;
}
}
.collapse-head {
.icon-down {
vertical-align: middle;
font-size: .12rem;
.svg-icon {
transition: all .2s;
}
}
.icon-down-expanded {
.svg-icon {
transform: rotate(-180deg);
}
}
}
</style> </style>
...@@ -7,8 +7,8 @@ ...@@ -7,8 +7,8 @@
:excludeType="excludeType" :excludeType="excludeType"
:value="diseaseType" :value="diseaseType"
ref="DiseaseSelect"/> ref="DiseaseSelect"/>
<archiveCommon :info="baseInfo" v-else-if="step == 2"></archiveCommon> <archiveCommon :info="baseInfo" v-else-if="step == 2" ref="archiveCommon"></archiveCommon>
<FormCont :info="diagnoseInfo" v-else-if="step == 3"/> <FormCont :info="diagnoseInfo" v-else-if="step == 3" ref="FormCont"/>
</div> </div>
<div class="shrink-0"> <div class="shrink-0">
<div class='bottom-small-line'></div> <div class='bottom-small-line'></div>
...@@ -39,6 +39,7 @@ import DocNavBar from '@/doctor/components/docNavBar/DocNavBar.vue' ...@@ -39,6 +39,7 @@ import DocNavBar from '@/doctor/components/docNavBar/DocNavBar.vue'
import archiveCommon from '@/doctor/components/archiveCommon/archiveCommon.vue' import archiveCommon from '@/doctor/components/archiveCommon/archiveCommon.vue'
import DiseaseSelect from './DiseaseSelect.vue' import DiseaseSelect from './DiseaseSelect.vue'
import FormCont from './FormCont.vue' import FormCont from './FormCont.vue'
import { useStore } from '@/doctor/store/index.js'
import { fetchDataHandle } from '@/utils/common.js' import { fetchDataHandle } from '@/utils/common.js'
import { getChronicResidentsId } from '@/api/doctor/generalFU' import { getChronicResidentsId } from '@/api/doctor/generalFU'
import { showSuccessToast } from 'vant' import { showSuccessToast } from 'vant'
...@@ -53,6 +54,7 @@ export default { ...@@ -53,6 +54,7 @@ export default {
}, },
data() { data() {
return { return {
store: useStore(),
step: 1, step: 1,
// 患者基础信息 // 患者基础信息
baseInfo: {}, baseInfo: {},
...@@ -114,12 +116,24 @@ export default { ...@@ -114,12 +116,24 @@ export default {
} }
}, },
submit() { submit() {
this.$refs.FormCont.submit().then(res => {
if (!res) return
console.log('FormCont.submit', res)
const query = {
...res,
residentsRecord: this.baseInfo
}
const func = query.id ? updateDiagnose : addDiagnose
func(query).then(() => {
this.store.onRefreshMark()
showSuccessToast('提交成功') showSuccessToast('提交成功')
setTimeout(() => { setTimeout(() => {
this.$router.replace({ this.$router.replace({
path: '/doctor/workbench' path: '/doctor/workbench'
}) })
}, 600) }, 600)
})
})
}, },
// 上一步 // 上一步
toPrev() { toPrev() {
...@@ -131,6 +145,10 @@ export default { ...@@ -131,6 +145,10 @@ export default {
const diseaseType = await this.$refs.DiseaseSelect.submit() const diseaseType = await this.$refs.DiseaseSelect.submit()
console.log(diseaseType) console.log(diseaseType)
this.diagnoseInfo.diseaseType = diseaseType this.diagnoseInfo.diseaseType = diseaseType
} else if (this.step == 2) {
const baseInfo = await this.$refs.archiveCommon.onSubmit()
console.log(baseInfo)
this.baseInfo = baseInfo
} }
this.onStep(this.step + 1) this.onStep(this.step + 1)
} catch (e) { } catch (e) {
......
...@@ -22,7 +22,7 @@ export default { ...@@ -22,7 +22,7 @@ export default {
props: { props: {
// 排除已选择的疾病 // 排除已选择的疾病
excludeType: { default: () => [] }, excludeType: { default: () => [] },
value: { default: () => [] } value: Number
}, },
data() { data() {
return { return {
......
...@@ -139,7 +139,12 @@ export default { ...@@ -139,7 +139,12 @@ export default {
this.$refs.form.validate().then(() => { this.$refs.form.validate().then(() => {
resolve(this.form) resolve(this.form)
}).catch((e) => { }).catch((e) => {
reject(e) reject('医生信息校验失败')
console.warn('医生信息校验失败', e)
const array = e || []
if (array.length) {
this.$refs.form.scrollToField(array[0].name)
}
}) })
}) })
} }
......
...@@ -79,7 +79,6 @@ ...@@ -79,7 +79,6 @@
name="diagnoseResult" name="diagnoseResult"
placeholder="请选择" placeholder="请选择"
@click="showOptions('diagnoseResult', 'CP00103', 'checkbox')" @click="showOptions('diagnoseResult', 'CP00103', 'checkbox')"
:rules="rules.requiredSelect"
/> />
<div class='doc-form-label' required>出血性脑卒中</div> <div class='doc-form-label' required>出血性脑卒中</div>
<van-field <van-field
...@@ -89,7 +88,6 @@ ...@@ -89,7 +88,6 @@
name="diagnoseLevel" name="diagnoseLevel"
placeholder="请选择" placeholder="请选择"
@click="showOptions('diagnoseLevel', 'CP00104')" @click="showOptions('diagnoseLevel', 'CP00104')"
:rules="rules.requiredSelect"
/> />
</template> </template>
<template v-else-if="[2,3].includes(diseaseType)"> <template v-else-if="[2,3].includes(diseaseType)">
...@@ -184,12 +182,13 @@ ...@@ -184,12 +182,13 @@
:disease="diseaseType" :disease="diseaseType"
:info="checkInfo" :info="checkInfo"
ref="check"/> ref="check"/>
<DoctorInfo :info="info"/> <DoctorInfo :info="info" ref="DoctorInfo"/>
</div> </div>
</template> </template>
<script> <script>
import { useStore } from '@/doctor/store' import { useStore } from '@/doctor/store'
import { fetchDataHandle } from '@/utils/common.js'
import InstpectCommon from '../common/Instpect.vue' import InstpectCommon from '../common/Instpect.vue'
import CheckCommon from '../common/Check.vue' import CheckCommon from '../common/Check.vue'
import DiagnosePicker from './DiagnosePicker.vue' import DiagnosePicker from './DiagnosePicker.vue'
...@@ -222,7 +221,12 @@ const defaultForm = (info = {}) => { ...@@ -222,7 +221,12 @@ const defaultForm = (info = {}) => {
isInspect: 2, isInspect: 2,
// 是否需要检查 // 是否需要检查
isCheck: 2, isCheck: 2,
diseaseType: undefined diseaseType: undefined,
checkItem: undefined,
checkItemName: undefined,
inspectItem: undefined,
inspectItemName: undefined,
source: undefined,
} }
Reflect.ownKeys(form).forEach(key => { Reflect.ownKeys(form).forEach(key => {
if (info[key] != undefined) { if (info[key] != undefined) {
...@@ -360,8 +364,98 @@ export default { ...@@ -360,8 +364,98 @@ export default {
this.dateRange.min = new Date(date.year() - 20, date.month(), date.date()) this.dateRange.min = new Date(date.year() - 20, date.month(), date.date())
}, },
submit() { async submit() {
this.form.diseaseType = this.diseaseType try {
this.$refs.form.validate()
if (this.form.diseaseType === 4) {
const diagnoseResult = this.form.diagnoseResult || []
if (!diagnoseResult.length && !this.form.diagnoseLevel) {
this.$message.info('请在 缺血性脑卒中 和 出血性脑卒中 中选择一项填写')
this.$refs.form.scrollToField('diagnoseResult')
return
}
}
this.form.diagnoseInspectList = []
if (this.form.isInspect === 1) {
let { inspect: inspectItems, data, image} = await this.$refs.inspect.submit()
let inspectObj = {}
for (let item of data) {
if (inspectObj[item.insType] === void 0) {
inspectObj[item.insType] = []
}
const insItem = {
insType: item.insType,
insName: item.insName,
itemCode: item.itemCode,
itemName: item.itemName,
itemType: item.itemType,
itemValue: item.itemValue,
unit: item.unit
}
inspectObj[item.insType].push(insItem)
}
for (let diagType in inspectObj) {
let diagInspect = {
projectType: 0,
diagnoseType: diagType,
diagnoseName: inspectObj[diagType][0].insName,
inspectDetailed: JSON.stringify(inspectObj[diagType])
}
// inspectItems.push(inspectObj[diagType][0].insType)
this.form.diagnoseInspectList.push(diagInspect)
}
this.form.inspectItem = inspectItems
this.form.inspectFile = image
}
if (this.form.isCheck === 1) {
let { check: checkItems, data } = await this.$refs.check.submit()
let checkObj = {}, fileObj = {}
for (let item of data) {
if (item.itemType === 5 && item.itemValue !== void 0 && item.itemValue !== '') {
fileObj[item.insType] = item.itemValue
} else {
if (checkObj[item.insType] === void 0) {
checkObj[item.insType] = []
}
let checkItem = {
insType: item.insType,
insName: item.insName,
itemCode: item.itemCode,
itemName: item.itemName,
itemType: item.itemType,
itemValue: item.itemValue
}
checkObj[item.insType].push(checkItem)
}
}
for (let diagType in checkObj) {
let diagCheck = {
projectType: 1,
diagnoseType: diagType,
diagnoseName: checkObj[diagType][0].insName,
inspectDetailed: JSON.stringify(checkObj[diagType]),
inspectFile: fileObj[diagType]
}
// checkItems.push(checkObj[diagType][0].insType);
this.form.diagnoseInspectList.push(diagCheck)
}
this.form.checkItem = checkItems
}
const doctorInfo = await this.$refs.DoctorInfo.submit()
let query = fetchDataHandle(this.form, {
diagnoseResult: 'arrToStr'
})
return {
...query,
...doctorInfo
}
} catch(err) {
this.$message.info('表单校验不通过')
const array = err || []
if (array.length) {
this.$refs.form.scrollToField(array[0].name)
}
}
}, },
// 日期确定 // 日期确定
dateConfirm({ selectedValues }) { dateConfirm({ selectedValues }) {
......
...@@ -92,6 +92,7 @@ ...@@ -92,6 +92,7 @@
</template> </template>
<script> <script>
import { useStore } from '@/doctor/store'
import { queryResidentInfo } from '@/api/doctor/resident.js' import { queryResidentInfo } from '@/api/doctor/resident.js'
import { showNotify } from 'vant' import { showNotify } from 'vant'
import DocNavBar from '@/doctor/components/docNavBar/DocNavBar.vue' import DocNavBar from '@/doctor/components/docNavBar/DocNavBar.vue'
...@@ -118,6 +119,7 @@ export default { ...@@ -118,6 +119,7 @@ export default {
}, },
data() { data() {
return { return {
store: useStore(),
residentInfoId: null, residentInfoId: null,
residentInfo: {}, residentInfo: {},
// 折叠 // 折叠
...@@ -190,6 +192,9 @@ export default { ...@@ -190,6 +192,9 @@ export default {
} }
queryResidentInfo({ residentInfoId: this.residentInfoId }).then(res => { queryResidentInfo({ residentInfoId: this.residentInfoId }).then(res => {
this.residentInfo = res.data || {} this.residentInfo = res.data || {}
if (!this.activeTabItem.value) {
this.activeTab = 0
}
}) })
}, },
onAddChange(val, option) { onAddChange(val, option) {
...@@ -221,6 +226,9 @@ export default { ...@@ -221,6 +226,9 @@ export default {
if (!val) return if (!val) return
this.residentInfo = {} this.residentInfo = {}
this.load() this.load()
},
'store.refreshMark'() {
this.load()
} }
} }
} }
......
...@@ -136,8 +136,9 @@ ...@@ -136,8 +136,9 @@
</template> </template>
<script> <script>
import { fetchDiseaseTypeList } from '@/api/doctor/disease.js' import { fetchDiseaseTypeList, delDiagnose } from '@/api/doctor/disease.js'
import { useStore } from '@/doctor/store' import { useStore } from '@/doctor/store'
import { showConfirmDialog } from 'vant'
export default { export default {
inject: ['residentInfo'], inject: ['residentInfo'],
...@@ -210,8 +211,20 @@ export default { ...@@ -210,8 +211,20 @@ export default {
} }
}) })
}, },
delBtn() { delBtn(record) {
showConfirmDialog({
message: '确定要删除吗?'
}).then(() => {
delDiagnose({ id: record.id }).then(res => {
setTimeout(() => {
this.$message.info('删除成功')
}, 600)
this.diagnoseRecord = this.diagnoseRecord.filter(e => e.id !== record.id)
if (!this.diagnoseRecord.length) {
this.store.onRefreshMark()
}
})
}).catch((err) => { console.warn('delDiagnoseBtn', err) })
} }
}, },
watch: { watch: {
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
<DocNavBar :title="`${id ? '修改' : '新增'}主要慢病高危筛查`" class="shrink-0" <DocNavBar :title="`${id ? '修改' : '新增'}主要慢病高危筛查`" class="shrink-0"
:backFunc="onBack" :hideBack="step == 3"></DocNavBar> :backFunc="onBack" :hideBack="step == 3"></DocNavBar>
<div class="p-4 overflow-y-auto grow" ref="all"> <div class="p-4 overflow-y-auto grow" ref="all">
<archiveCommon :info="baseInfo" v-if="step == 1"></archiveCommon> <archiveCommon :info="baseInfo" v-if="step == 1" ref="archiveCommon"></archiveCommon>
<FormCont :resident-info="baseInfo" :info="screenInfo" v-else-if="step == 2" ref="FormCont"/> <FormCont :resident-info="baseInfo" :info="screenInfo" v-else-if="step == 2" ref="FormCont"/>
<Result v-else-if="step == 3" :info="resultInfo"/> <Result v-else-if="step == 3" :info="resultInfo"/>
</div> </div>
...@@ -91,7 +91,15 @@ export default { ...@@ -91,7 +91,15 @@ export default {
} }
}, },
toNext(val) { toNext(val) {
if (val == 3) { if (val == 2) {
// 基础信息
this.$refs.archiveCommon.onSubmit().then(res => {
this.baseInfo = res
this.step = val
this.$refs.all.scrollTo(0, 0)
})
} else if (val == 3) {
// 筛查信息
this.$refs.FormCont.submit().then(res => { this.$refs.FormCont.submit().then(res => {
if (!res) return if (!res) return
console.log('FormCont.submit', res) console.log('FormCont.submit', res)
...@@ -108,10 +116,10 @@ export default { ...@@ -108,10 +116,10 @@ export default {
this.step = val this.step = val
}) })
}) })
return } else {
}
this.step = val this.step = val
this.$refs.all.scrollTo(0, 0) this.$refs.all.scrollTo(0, 0)
}
}, },
onBack() { onBack() {
if (this.step == 1) { if (this.step == 1) {
......
...@@ -350,7 +350,7 @@ ...@@ -350,7 +350,7 @@
<script> <script>
import { useStore } from '@/doctor/store' import { useStore } from '@/doctor/store'
import { checkboxReject, fetchDataHandle } from '@/utils/common.js' import { checkboxReject } from '@/utils/common.js'
import dayjs from 'dayjs' import dayjs from 'dayjs'
import DoctorInfo from './DoctorInfo.vue' import DoctorInfo from './DoctorInfo.vue'
import CheckBtn from '@/doctor/components/checkBtn/CheckBtn.vue' import CheckBtn from '@/doctor/components/checkBtn/CheckBtn.vue'
......
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