Browse Source

门诊病例默认一天只能添加一个

360view
bianyaqi 2 years ago
parent
commit
fe6d0d375a
  1. 12
      src/components/360View/medicalRecord/callMedical/index.vue
  2. 27
      src/components/360View/medicalRecord/index.vue
  3. 29
      src/page-subspecialty/router/index.js

12
src/components/360View/medicalRecord/callMedical/index.vue

@ -8,7 +8,7 @@
<p :class="[index === curIndex ? 'activeFont' : 'curFont']">{{ item.createTime }}</p>
<p>{{ item.name }}</p>
</div>
<i style="margin-top: 28px;color: rgb(199,5,5)" class="el-icon-delete" v-if="index === curIndex && !onlyRead" @click="deleteForm(item.id)"></i>
<i v-if="index === curIndex && !onlyRead" style="margin-top: 28px;color: rgb(199,5,5)" class="el-icon-delete" @click="deleteForm(item.id)" />
</div>
<img v-if="!formList" src="@/assets/img/nodata.png" alt="" class="nodata">
</div>
@ -28,7 +28,7 @@
<!-- <el-radio-button label="手术" name="2" style=""></el-radio-button>-->
<el-radio-button label="其他" name="其他" style="" />
</el-radio-group>
<div v-if="formType === '门诊'" class="record" @click="addRecord">
<div v-if="formType === '门诊'" class="record">
<p>门急诊电子病历</p>
<img v-if="!onlyRead" :src="require('@/assets/img/add.png')" alt="" @click="addRecord('门急诊电子病历')">
</div>
@ -92,6 +92,14 @@ export default {
},
async saveTableData(name) {
const date = this.$moment().format('YYYY-MM-DD HH:mm:ss')
const isToday = this.formList.some(item => item.createTime.includes(date.split(' ')[0]))
if (name === '门急诊电子病历' && isToday) {
this.$message({
message: '已有今日病例,请勿重复添加!',
type: 'warning'
})
return
}
const params = {
flag: 8,
name: name,

27
src/components/360View/medicalRecord/index.vue

@ -17,16 +17,17 @@
@addRecord="addRecord"
/>
<div class="content-right">
<div v-if="isSearch === '1' || isSearch === '3'" style="height: 100%">
<div v-if="name === '门急诊电子病历'" style="height: 100%">
<ourPatientRecord v-if="name === '门急诊电子病历'" :patient-id="patientId" :only-read="onlyRead" :is-search="isSearch" :case-id="caseId" />
</div>
<div v-if="formList.length && isSearch === '2'" style="height: 100%">
<ourPatientRecord v-if="name === '门急诊电子病历'" :patient-id="patientId" :only-read="onlyRead" :is-search="isSearch" :case-id="caseId" />
<InformedConsent v-if="name==='眼科激光手术患者知情同意书'" :patient-detail="patientData" :json-text="jsonText" @handleSaveTable="updateForm" @formDelete="formDelete" />
<mra-form v-if="name==='眼底血管造影知情同意书'" :patient-detail="patientData" :json-text="jsonText" @handleSaveTable="updateForm" @formDelete="formDelete" />
<laser-surgery v-if="name==='眼科激光手术治疗'" :patient-detail="patientData" :json-text="jsonText" @handleSaveTable="updateForm" @formDelete="formDelete" />
<report-form v-if="name==='报告'" :patient-detail="patientData" :json-text="jsonText" @handleSaveTable="updateForm" @formDelete="formDelete" />
</div>
<template v-else>
<div v-if="formList.length && isSearch === '2'" style="height: 100%">
<InformedConsent v-if="name==='眼科激光手术患者知情同意书'" :patient-detail="patientData" :json-text="jsonText" @handleSaveTable="updateForm" @formDelete="formDelete" />
<mra-form v-if="name==='眼底血管造影知情同意书'" :patient-detail="patientData" :json-text="jsonText" @handleSaveTable="updateForm" @formDelete="formDelete" />
<laser-surgery v-if="name==='眼科激光手术治疗'" :patient-detail="patientData" :json-text="jsonText" @handleSaveTable="updateForm" @formDelete="formDelete" />
<report-form v-if="name==='报告'" :patient-detail="patientData" :json-text="jsonText" @handleSaveTable="updateForm" @formDelete="formDelete" />
</div>
</template>
</div>
</div>
</div>
@ -84,7 +85,7 @@ export default {
},
created() {
if (this.isSearch === '2') {
this.getFormList()
this.getFormList()
}
},
methods: {
@ -122,6 +123,14 @@ export default {
addRecord(name) {
this.name = name
const date = this.$moment().format('YYYY-MM-DD HH:mm:ss')
const isToday = this.formList.some(item => item.createTime.includes(date.split(' ')[0]))
if (name === '门急诊电子病历' && isToday) {
this.$message({
message: '已有今日病例,请勿重复添加!',
type: 'warning'
})
return
}
const params = {
flag: 8,
name: name,

29
src/page-subspecialty/router/index.js

@ -104,13 +104,23 @@ export function addDynamicRoute(routeParams, router) {
title: `${routeParams.title}`
}
}
router.addRoutes([
const dynamicRoutes = [
{
...moduleRoutes,
name: `main-dynamic__${dynamicRoute.name}`,
children: [dynamicRoute]
}
])
]
dynamicRoutes.forEach(res => {
router.addRoute(res)
})
// router.addRoutes([
// {
// ...moduleRoutes,
// name: `main-dynamic__${dynamicRoute.name}`,
// children: [dynamicRoute]
// }
// ])
window.SITE_CONFIG['dynamicRoutes'].push(dynamicRoute)
router.push({ name: dynamicRoute.name, params: routeParams.params })
}
@ -305,14 +315,25 @@ function fnAddDynamicMenuRoutes(menuList = [], menuListChildLength, routes = [])
routes = menuList
// PH:底层调用一次
// 添加路由
router.addRoutes([
const dynamicRoutes = [
{
...moduleRoutes,
name: 'main-dynamic-menu',
children: [...routes]
},
{ path: '*', redirect: { name: '404' }}
])
]
dynamicRoutes.forEach(res => {
router.addRoute(res)
})
// router.addRoutes([
// {
// ...moduleRoutes,
// name: 'main-dynamic-menu',
// children: [...routes]
// },
// { path: '*', redirect: { name: '404' }}
// ])
// console.log('----------------------')
window.SITE_CONFIG['dynamicMenuRoutes'] = routes
window.SITE_CONFIG['dynamicMenuRoutesHasAdded'] = true

Loading…
Cancel
Save