Browse Source

peter

360view
newPeter7 2 years ago
parent
commit
4239ab7abc
  1. 1107
      src/components/360View/commonForm/optometryForm-copy.vue
  2. 40
      src/components/360View/commonForm/threeVision.vue
  3. 255
      src/components/360View/index.vue
  4. 634
      src/components/360View/index1.vue
  5. 2
      src/components/360View/opticalFile/index.vue
  6. 164
      src/components/item-select/index.vue
  7. 10
      src/components/patient-search/index.vue
  8. 2
      src/page-subspecialty/router/index.js
  9. 318
      src/page-subspecialty/router/index.js.bak
  10. 2
      src/page-subspecialty/views/modules/nurseManagement/reservation/subList/index.vue
  11. 6
      src/page-subspecialty/views/modules/optometryManagement/dioptric/index.vue
  12. 2
      src/page-subspecialty/views/modules/outpatientManagement/call/index.vue
  13. 10
      src/page-subspecialty/views/modules/outpatientManagement/treat/index.vue

1107
src/components/360View/commonForm/optometryForm-copy.vue

File diff suppressed because it is too large

40
src/components/360View/commonForm/threeVision.vue

@ -518,7 +518,7 @@
</div>
<div v-else-if="scope.row.name === 'TITMUS()'" class="flex">
<span>TITMUS():</span>
<el-select v-model="dataForm.titmus" placeholder="" clearable style="display: inline-block;width: 95px;margin-left: 8px">
<el-select v-model="dataForm.titmus" placeholder="" filterable allow-create clearable style="display: inline-block;width: 95px;margin-left: 8px">
<el-option
v-for="item in titmusList"
:key="item.id"
@ -608,7 +608,7 @@
</div>
<div v-if="scope.row.name == '检查画片' && scope.row.type == '2'">
<div class="center">
<el-select v-model="dataForm.rhgnjcJchp" placeholder="" clearable style="display: inline-block;width: 180px;margin-left: 8px">
<el-select v-model="dataForm.rhgnjcJchp" placeholder="" filterable allow-create clearable style="display: inline-block;width: 180px;margin-left: 8px">
<el-option
v-for="item in checkTwoList"
:key="item.id"
@ -625,7 +625,7 @@
</div>
<div v-if="scope.row.name == 'Worth-4-dot'">
<div class="center">
<el-select v-model="dataForm.worth1" placeholder="" clearable style="display: inline-block;width: 100px" @change="selectWorth($event, 'od')">
<el-select v-model="dataForm.worth1" placeholder="" filterable allow-create clearable style="display: inline-block;width: 100px" @change="selectWorth($event, 'od')">
<el-option
v-for="item in worthList"
:key="item.id"
@ -641,7 +641,7 @@
<div v-if="scope.row.name == 'TITMUS(近)'">
<div class="center">
<span>TNO():</span>
<el-select v-model="dataForm.tno" placeholder="" clearable style="display: inline-block;width: 120px;margin-left: 8px">
<el-select v-model="dataForm.tno" placeholder="" filterable allow-create clearable style="display: inline-block;width: 120px;margin-left: 8px">
<el-option
v-for="item in tnoList"
:key="item.id"
@ -694,7 +694,7 @@
<div v-if="scope.row.name == '融合点'">
<div class="center">
<span>分开/集合:</span>
<el-select v-model="dataForm.rhgnjcFkjh1" placeholder="" clearable style="display: inline-block;width: 45px;margin-right: 5px">
<el-select v-model="dataForm.rhgnjcFkjh1" placeholder="" filterable allow-create clearable style="display: inline-block;width: 45px;margin-right: 5px">
<el-option
v-for="item in separateList"
:key="item.id"
@ -704,7 +704,7 @@
</el-select>
<el-input v-model="dataForm.rhgnjcFkjh2" placeholder="" style="width: 45px" />
<span>°</span> /
<el-select v-model="dataForm.rhgnjcFkjh3" placeholder="" clearable style="display: inline-block;width: 45px;margin-right: 5px">
<el-select v-model="dataForm.rhgnjcFkjh3" placeholder="" filterable allow-create clearable style="display: inline-block;width: 45px;margin-right: 5px">
<el-option
v-for="item in separateList"
:key="item.id"
@ -718,7 +718,7 @@
</div>
<div v-if="scope.row.name == 'Worth-4-dot'">
<div class="center">
<el-select v-model="dataForm.worth3" placeholder="" clearable style="display: inline-block;width: 100px" @change="selectWorth($event, 'os')">
<el-select v-model="dataForm.worth3" placeholder="" filterable allow-create clearable style="display: inline-block;width: 100px" @change="selectWorth($event, 'os')">
<el-option
v-for="item in worthList"
:key="item.id"
@ -733,8 +733,8 @@
</div>
<div v-if="scope.row.name == 'TITMUS(近)'">
<div class="center">
<span>RDD():</span>
<el-select v-model="dataForm.rdd" placeholder="" clearable style="display: inline-block;width: 120px;margin-left: 8px">
<span>RDD():</span>
<el-select v-model="dataForm.rdd" placeholder="" filterable allow-create clearable style="display: inline-block;width: 120px;margin-left: 8px">
<el-option
v-for="item in rddList"
:key="item.id"
@ -753,8 +753,6 @@
</template>
<script>
import Keyboard from 'vue-keyboard'
// import 'vue-keyboard/dist/vue-keyboard.css'
// import { KEYBOARD_MAP, KEYS } from 'vue-keyboard/lib/keyboard-map';
export default {
components: {
Keyboard
@ -1188,6 +1186,7 @@ export default {
this.dataForm.jzNumber = window.sessionStorage.getItem('jzNumber')
if (!this.dataForm.id) {
await this.queryProject()
await this.getRefractive()
this.dataForm.tssjcJchp = '老虎/笼子(10°)'
this.dataForm.rhgnjcJchp = '三人组(3°)'
this.dataForm.titmus = '60"'
@ -1199,6 +1198,25 @@ export default {
}
}
},
async getRefractive() {
const date = this.$moment().format('YYYY-MM-DD')
const { data: res } = await this.$http.get('/sjsgnjc/getRefractiveInfo', { params: {
formDate: date,
patientId: this.patientId
}})
if (res.code === 0) {
if (res.data) {
this.dataForm.qgztOd1 = res.data.qgztOd1
this.dataForm.qgztOd2 = res.data.qgztOd2
this.dataForm.qgztOd3 = res.data.qgztOd3
this.dataForm.qgztOdVa = res.data.qgztOdVa
this.dataForm.qgztOs1 = res.data.qgztOs1
this.dataForm.qgztOs2 = res.data.qgztOs2
this.dataForm.qgztOs3 = res.data.qgztOs3
this.dataForm.qgztOsVa = res.data.qgztOsVa
}
}
},
handleInput(item, input) {
if (input === 'ᴿ') {
input = 'ᴿ/ʟ'

255
src/components/360View/index.vue

@ -34,79 +34,90 @@
<div class="rightBox">
<el-tabs type="border-card" :value="timeAxisType" style="height: 100%" @tab-click="tabClick">
<el-tab-pane name="病史总览" label="病史总览" style="height: 100%">
<overView :patient-id="patientId" />
<overView :patient-id="patientId||$route.query.patientId" />
</el-tab-pane>
<el-tab-pane name="门诊病历" label="门诊病历" style="height: 100%">
<medicalRecord :patient-id="patientId" :is-search="isSearch" :only-read="onlyRead" />
<medicalRecord :type-name="timeAxisType" :patient-id="patientId || $route.query.patientId" :is-search="isSearch || $route.query.isSearch" :only-read="readOnly" />
</el-tab-pane>
<el-tab-pane name="常规检查" label="常规检查" style="height: 100%">
<routine :patient-id="patientId" :date="date" :only-read="onlyRead" />
<routine :patient-id="patientId||$route.query.patientId" :date="date" :only-read="readOnly" />
</el-tab-pane>
<el-tab-pane name="特殊检查" label="特殊检查" style="height: 100%">
<special :patient-id="patientId" :only-read="onlyRead" />
<special :patient-id="patientId||$route.query.patientId" :only-read="readOnly" />
</el-tab-pane>
<el-tab-pane v-if="isSearch === '3'" name="视光档案" label="视光档案" style="height: 100%">
<opticalFile :patient-id="patientId" :only-read="onlyRead" />
<el-tab-pane name="视光档案" label="视光档案" style="height: 100%">
<opticalFile :patient-id="patientId||$route.query.patientId" :is-search="isSearch || $route.query.isSearch" :only-read="readOnly" />
</el-tab-pane>
<el-tab-pane name="诊断" label="诊断">
<el-tab-pane name="诊断" label="诊断" style="height: 100%">
<el-table
:data="timeAxisNodeInfo"
style="width: 100%"
style="width: 100%;height: 100%;overflow: auto"
>
<el-table-column
type="index"
width="50"
/>
<el-table-column
prop="diagName"
label="诊断内容"
align="center"
/>
<el-table-column
label="主诊断"
align="center"
>
<template slot-scope="scope">
{{ scope.row.isMain === '1' ? '是' : '否' }}
{{ scope.row.isMain === 'Y' ? '是' : '否' }}
</template>
</el-table-column>
<el-table-column
prop="diagIcd"
label="ICD编码"
/>
<el-table-column
prop="memo"
label="备注"
/>
<el-table-column
prop="doctorName"
label="医师"
/>
</el-table>
</el-tab-pane>
<el-tab-pane name="手术" label="手术">
<el-tab-pane name="手术" label="手术" style="height: 100%">
<el-table
:data="timeAxisNodeInfo"
style="width: 100%"
style="width: 100%;height: 100%;overflow: auto"
>
<el-table-column
type="index"
width="50"
/>
<el-table-column
prop="bedNo"
label="床号"
align="center"
/>
<el-table-column
prop="deptName"
label="部门名"
align="center"
/>
<el-table-column
prop="wardName"
label="病区名"
align="center"
/>
<el-table-column
prop="mainDrName"
label="主刀医生姓名"
align="center"
/>
<el-table-column
prop="opName"
label="手术名称"
align="center"
/>
<el-table-column
prop="opPartName"
label="手术部位"
align="center"
/>
<el-table-column
prop="opTime"
label="手术时间"
align="center"
>
<template slot-scope="scope">
{{ scope.row.opTime ? scope.row.opTime.substring(0, 10) : '' }}
@ -114,7 +125,6 @@
</el-table-column>
<el-table-column
label="主手术"
align="center"
>
<template slot-scope="scope">
{{ scope.row.isMain === '1' ? '是' : '否' }}
@ -122,57 +132,64 @@
</el-table-column>
</el-table>
</el-tab-pane>
<el-tab-pane name="用药" label="用药">
<el-tab-pane name="医嘱" label="医嘱" style="height: 100%">
<el-table
:data="timeAxisNodeInfo"
style="width: 100%"
style="width: 100%;height: 100%;overflow: auto"
>
<el-table-column
type="index"
width="50"
/>
<el-table-column
prop="medName"
label="商品名"
align="center"
/>
<el-table-column
prop="socName"
label="通用名"
align="center"
/>
<el-table-column
prop="site"
label="部位"
align="center"
prop="numberUse"
label="数量"
/>
<el-table-column
prop="yzTypeName"
label="类型"
/>
<el-table-column
prop="doctorName"
label="医师"
/>
<el-table-column
prop="itemType"
label="门诊/住院"
align="center"
/>
</el-table>
</el-tab-pane>
<el-tab-pane name="住院" label="住院">
<el-tab-pane name="住院" label="住院" style="height: 100%">
<el-table
:data="timeAxisNodeInfo"
style="width: 100%"
style="width: 100%;height: 100%;overflow: auto"
>
<el-table-column
prop="deptName"
type="index"
width="50"
/>
<el-table-column
prop="profName"
label="部门名称"
align="center"
/>
<el-table-column
prop="wardName"
label="病区名称"
align="center"
/>
<el-table-column
prop="diagName"
label="诊断名称"
align="center"
/>
<el-table-column
label="住院日期"
align="center"
>
<template slot-scope="scope">
{{ scope.row.inDate ? scope.row.inDate.substring(0, 10) : '' }}
@ -180,7 +197,6 @@
</el-table-column>
<el-table-column
label="出院日期"
align="center"
>
<template slot-scope="scope">
{{ scope.row.outDate ? scope.row.outDate.substring(0, 10) : '' }}
@ -189,14 +205,14 @@
</el-table>
</el-tab-pane>
<el-tab-pane name="随访记录" label="随访记录" style="height: 100%">
<followUpRecord :patient-id="patientId" :only-read="onlyRead" />
<followUpRecord :patient-id="patientId||$route.query.patientId" :only-read="readOnly" />
</el-tab-pane>
</el-tabs>
</div>
</div>
</div>
<shrink ref="shrinks" :arrow-type="1" @display="handleDisplay" />
<drawer ref="drawers" :display.sync="display" :width="drawerWidth" :mask="false">
<shrink ref="shrinks" :arrow-type="1" @display="handleDisplay" @changeType="changeType" />
<drawer ref="drawers" :cur-type="dataType" :display.sync="display" :width="drawerWidth" :mask="true" @display="closeDrawer">
<!-- 关键指标-->
<key-indicators
v-if="dataType === 1"
@ -204,23 +220,16 @@
ref="keyIndicatorRef"
class="key-content"
v-bind="$attrs"
:patient-id="patientBaseData.patientId"
:patient-id="patientId"
:patient-id-number="patientBaseData.patientIdNumber"
/>
<!-- 数据集-->
<dataInfo v-if="dataType === 2" :fore-list="foreList" :after-list="afterList" />
<!-- 病历收藏-->
<collection v-if="dataType === 3" :patient-id="patientBaseData.patientId" :platform="isSearch" />
<collection v-if="dataType === 3" :patient-id="patientBaseData.patientId" :platform="isSearch || $route.query.isSearch" />
<!-- 常用业务-->
<business v-if="dataType === 4" />
<business v-if="dataType === 4" :patient-id="patientBaseData.patientId" :platform="isSearch || $route.query.isSearch" :patient-name="patientBaseData.patientName" />
</drawer>
<!-- 图像与报告 -->
<!-- <keep-alive>-->
<!-- <el-dialog title="" class="detail-view" :fullscreen="true" :visible.sync="isActive" append-to-body @close="closePacs">-->
<!--&lt;!&ndash; <imgRecord :patient-info="patientBaseData" />&ndash;&gt;-->
<!-- <pacsList></pacsList>-->
<!-- </el-dialog>-->
<!-- </keep-alive>-->
</div>
</template>
<script>
@ -239,22 +248,11 @@ import imgRecord from './img-reccrd.vue'
import pacsList from '@/components/360View/pacs/patientList'
import medicalRecord from '@/components/360View/medicalRecord' //
import opticalFile from '@/components/360View/opticalFile' //
const Base64 = require('js-base64').Base64
import eventBus from '@/page-subspecialty/utils/eventBus'
export default {
components: { timeLine, drawer, keyIndicators, shrink, business, collection, imgRecord, overView, medicalRecord, dataInfo, routine, special, followUpRecord, opticalFile, pacsList },
directives: {
move(el, bindings) {
el.onmousedown = (e) => {
}
}
},
mixins: [],
props: {
patientIdNumber: {
type: String,
default: ''
},
patientId: {
type: String,
default: ''
@ -274,13 +272,14 @@ export default {
sharkFlag: true,
patientBaseData: {},
timeAxisNodeInfo: [], //
doctorId: '', //
date: '', //
source: '', //
collectList: '', //
drawerWidth: '',
timeAxisData: [], //
timeAxisAll: [], //
timeAxisType: '', // tab
timeAxisType: '病史总览', // tab
foreList: [], //
afterList: [], //
dataType: 1,
@ -293,23 +292,45 @@ export default {
label: 'tagName'
},
jsArr: [],
crfVisible: false,
dataForm: {}
}
},
computed: {
readOnly() {
if (this.$route.query.onlyRead) {
return JSON.parse(this.$route.query.onlyRead)
} else {
return this.onlyRead
}
}
},
watch: {
display(val) {
if (val) {
this.$refs.drawers.$el.style.display = 'inline-block'
}
}
},
created() {
// this.patientIdNumber = '330282200110051983'
this.getPatientData()
this.getTimeAxisData()
// this.getTimeAxisMz()
},
mounted() {
this.computerData()
if (this.isSearch === '3') {
this.timeAxisType = '视光档案'
} else {
this.timeAxisType = '病史总览'
}
if (this.$route.query.patientId && !this.$route.query.doctorId) {
this.timeAxisType = '门诊病历'
}
},
methods: {
//
tabClick(type) {
this.timeAxisType = type.name
this.timeAxisNodeInfo = []
},
selectType(type) {
this.dataType = type
@ -325,14 +346,24 @@ export default {
//
eventBus.$off('sendForData')
eventBus.$on('sendForData', data => {
console.log(data)
const arr = this.foreList.concat(data)
const id = 'id'
this.foreList = arr.reduce((all, next) => all.some((item) => item[id] == next[id]) ? all : [...all, next], [])
console.log(this.foreList)
// const id = 'id'
this.foreList = this.unique(arr)
// this.foreList = arr.reduce((all, next) => all.some((item) => item[id] == next[id]) ? all : [...all, next], [])
this.openDataDrink()
})
},
unique(list) {
for (let i = 0; i < list.length - 1; i++) {
for (let j = i + 1; j < list.length; j++) {
if (list[i].id === list[j].id) {
list.splice(i, 1)
j--
}
}
}
return list
},
openDataDrink() {
this.dataType = 2
this.display = true
@ -346,6 +377,13 @@ export default {
}
})
},
closeDrawer(val) {
this.display = val
},
changeType(val) {
this.dataType = val
this.display = true
},
handleDisplay(val) {
this.dataType = 1
if (val) {
@ -359,17 +397,26 @@ export default {
this.drawerWidth = (this.drawerWidth === '500px') ? '800px' : '500px'
},
backList() {
this.$parent.detailViewVisible = false
if (this.$route.query.patientId && !this.$route.query.doctorId) {
this.$router.go(-1)
} else if (this.$route.query.doctorId) {
this.$router.push('/outpatientManagement-call')
} else {
this.$parent.detailViewVisible = false
this.$parent.getDataListInitial()
}
},
// 360
handlePacs() {
const { href } = this.$router.resolve({
name: 'pacs'
// query: {
// id: 1
// }
})
// const baseUrl = 'http://z1.huimucloud.com:8085'
// const baseUrl = 'http://10.80.5.32:8026'
const baseUrl = 'http://192.168.0.85:8001'
const href = `${baseUrl}/EXAMINE_Report/InterFace?PatID=${this.patientId}&DoctorID=${this.employeeId}&PatIdKey=&ExamNo=`
window.open(href, '_blank')
// const { href } = this.$router.resolve({
// name: 'pacsManage'
// })
// window.open(href, '_blank')
},
// 360
closePacs() {
@ -386,9 +433,7 @@ export default {
'/patient/view/getPatientData',
{
params: {
// patientId: this.patientId
patientId: '797064'
// patientIdNumber: '330282200110051983'
patientId: this.patientId || this.$route.query.patientId
}
}
)
@ -399,59 +444,23 @@ export default {
}
},
// --
async getTimeAxisData(typeScreenCheckArr) {
// const type = ['', '', '', '', '', '', '访']
async getTimeAxisData() {
const { data: res } = await this.$http.get(
'/patient/view/getTimeAxisData',
{
params: {
// patientId: this.patientId
patientId: '797064'
// type: typeScreenCheckArr !== undefined ? typeScreenCheckArr : type
patientId: this.patientId || this.$route.query.patientId
}
}
)
if (res.code === 0) {
if (res.data.length > 0) {
this.timeAxisData = res.data.length > 0 ? res.data : []
const curItem = res.data[0].data[0].itemList.length ? res.data[0].data[0].itemList[0] : ''
if (this.isSearch === '3') {
this.timeAxisType = '视光档案'
} else {
this.timeAxisType = res.data[0].data[0].itemList[0].groupName
if (curItem) {
this.getTimeAxisNodeInfo(curItem)
}
}
}
if (!res.data.length) {
this.timeAxisNodeInfo = []
}
} else {
this.$message.error(res.msg)
}
},
async getTimeAxisMz(typeScreenCheckArr) {
// const type = ['', '', '', '', '', '', '访']
const { data: res } = await this.$http.get(
'/patient/view/getTimeAxisDataMzss',
{
params: {
// patientId: this.patientId
patientId: '797064'
// type: typeScreenCheckArr !== undefined ? typeScreenCheckArr : type
}
}
)
if (res.code === 0) {
if (res.data.length > 0) {
// this.timeAxisData = res.data.length > 0 ? res.data : []
// this.type = res.data[0].data[0].itemList[0].groupName
}
if (!res.data.length) {
// this.timeAxisNodeInfo = []
// this.type = ''
// this.isVisit = ''
const year = this.$moment().format('YYYY')
const date = this.$moment().format('YYYY-MM-DD')
this.timeAxisData = [{ year: year, data: [{ date: date, itemList: [{ groupName: '门诊', opDate: date, year: year }] }] }]
}
} else {
this.$message.error(res.msg)
@ -462,11 +471,9 @@ export default {
this.timeAxisType = item.groupName
const { data: res } = await this.$http.get('/patient/view/getTimeAxisNodeInfo', {
params: {
// date: moment(item.date).format('YYYY-MM-DD'),
date: item.opDate,
groupName: item.groupName,
patientId: '797064'
// patientId: this.patientId
patientId: this.patientId || this.$route.query.patientId
}
})
if (res.code === 0) {

634
src/components/360View/index1.vue

@ -1,634 +0,0 @@
<template>
<div class="container">
<div style="flex: 1">
<div class="header">
<img :src="require('@/assets/img/back-l.png')" alt="" style="margin-right: 8px;cursor: pointer" @click="backList">
<img :src="require('@/assets/img/boy.png')" alt="">
<p class="head-t">
<span class="head-r">{{ patientBaseData.patientName }}</span>
<span class="head-r">{{ patientBaseData.patientSex }}</span>
<span v-if="patientBaseData.patientAge" class="head-r">{{ patientBaseData.patientAge }}</span>
<img v-if="patientBaseData.patientId" class="icon-a" :src="require('@/assets/img/pid.png')" alt="" style="margin-right: 6px;vertical-align: text-top">
<span style="vertical-align: text-bottom">{{ patientBaseData.patientId }}</span>
</p>
<p class="head-b">
<img v-if="patientBaseData.patientIdNumber" :src="require('@/assets/img/id.png')" alt="" style="margin-right: 6px;vertical-align: middle">
<span class="mr16" style="vertical-align: middle">{{ maskId(patientBaseData.patientIdNumber) }}</span>
<img v-if="patientBaseData.patientPhone" :src="require('@/assets/img/phone.png')" alt="" style="margin-right: 6px;vertical-align: middle">
<span class="mr16" style="vertical-align: middle">{{ patientBaseData.patientPhone }}</span>
<img v-if="patientBaseData.patientAddress" :src="require('@/assets/img/position.png')" alt="" style="margin-right: 6px;vertical-align: middle">
<span style="vertical-align: middle">{{ patientBaseData.patientAddress }}</span>
</p>
<img :src="require('@/assets/img/pacs.png')" alt="" style="float: right;cursor: pointer" @click="handlePacs">
</div>
<div class="contentBox">
<div class="leftBox">
<time-line
ref="timeline"
:time-axis-data="timeAxisData"
@getTimeAxisData="getTimeAxisData"
v-on="$listeners"
@getTimeAxisNodeInfo="getTimeAxisNodeInfo"
/>
</div>
<div class="rightBox">
<el-tabs type="border-card" :value="timeAxisType" style="height: 100%" @tab-click="tabClick">
<el-tab-pane name="病史总览" label="病史总览" style="height: 100%">
<overView :patient-id="patientId||$route.query.patientId" />
</el-tab-pane>
<el-tab-pane name="门诊病历" label="门诊病历" style="height: 100%">
<medicalRecord :type-name="timeAxisType" :patient-id="patientId || $route.query.patientId" :is-search="isSearch || $route.query.isSearch" :only-read="readOnly" />
</el-tab-pane>
<el-tab-pane name="常规检查" label="常规检查" style="height: 100%">
<routine :patient-id="patientId||$route.query.patientId" :date="date" :only-read="readOnly" />
</el-tab-pane>
<el-tab-pane name="特殊检查" label="特殊检查" style="height: 100%">
<special :patient-id="patientId||$route.query.patientId" :only-read="readOnly" />
</el-tab-pane>
<el-tab-pane name="视光档案" label="视光档案" style="height: 100%">
<opticalFile :patient-id="patientId||$route.query.patientId" :is-search="isSearch || $route.query.isSearch" :only-read="readOnly" />
</el-tab-pane>
<el-tab-pane name="诊断" label="诊断" style="height: 100%">
<el-table
:data="timeAxisNodeInfo"
style="width: 100%;height: 100%;overflow: auto"
>
<el-table-column
type="index"
width="50"
/>
<el-table-column
prop="diagName"
label="诊断内容"
/>
<el-table-column
label="主诊断"
>
<template slot-scope="scope">
{{ scope.row.isMain === 'Y' ? '是' : '否' }}
</template>
</el-table-column>
<el-table-column
prop="diagIcd"
label="ICD编码"
/>
<el-table-column
prop="memo"
label="备注"
/>
<el-table-column
prop="doctorName"
label="医师"
/>
</el-table>
</el-tab-pane>
<el-tab-pane name="手术" label="手术" style="height: 100%">
<el-table
:data="timeAxisNodeInfo"
style="width: 100%;height: 100%;overflow: auto"
>
<el-table-column
type="index"
width="50"
/>
<el-table-column
prop="bedNo"
label="床号"
/>
<el-table-column
prop="deptName"
label="部门名"
/>
<el-table-column
prop="wardName"
label="病区名"
/>
<el-table-column
prop="mainDrName"
label="主刀医生姓名"
/>
<el-table-column
prop="opName"
label="手术名称"
/>
<el-table-column
prop="opPartName"
label="手术部位"
/>
<el-table-column
prop="opTime"
label="手术时间"
>
<template slot-scope="scope">
{{ scope.row.opTime ? scope.row.opTime.substring(0, 10) : '' }}
</template>
</el-table-column>
<el-table-column
label="主手术"
>
<template slot-scope="scope">
{{ scope.row.isMain === '1' ? '是' : '否' }}
</template>
</el-table-column>
</el-table>
</el-tab-pane>
<el-tab-pane name="医嘱" label="医嘱" style="height: 100%">
<el-table
:data="timeAxisNodeInfo"
style="width: 100%;height: 100%;overflow: auto"
>
<el-table-column
type="index"
width="50"
/>
<el-table-column
prop="medName"
label="商品名"
/>
<el-table-column
prop="socName"
label="通用名"
/>
<el-table-column
prop="numberUse"
label="数量"
/>
<el-table-column
prop="yzTypeName"
label="类型"
/>
<el-table-column
prop="doctorName"
label="医师"
/>
<el-table-column
prop="itemType"
label="门诊/住院"
/>
</el-table>
</el-tab-pane>
<el-tab-pane name="住院" label="住院" style="height: 100%">
<el-table
:data="timeAxisNodeInfo"
style="width: 100%;height: 100%;overflow: auto"
>
<el-table-column
type="index"
width="50"
/>
<el-table-column
prop="profName"
label="部门名称"
/>
<el-table-column
prop="wardName"
label="病区名称"
/>
<el-table-column
prop="diagName"
label="诊断名称"
/>
<el-table-column
label="住院日期"
>
<template slot-scope="scope">
{{ scope.row.inDate ? scope.row.inDate.substring(0, 10) : '' }}
</template>
</el-table-column>
<el-table-column
label="出院日期"
>
<template slot-scope="scope">
{{ scope.row.outDate ? scope.row.outDate.substring(0, 10) : '' }}
</template>
</el-table-column>
</el-table>
</el-tab-pane>
<el-tab-pane name="随访记录" label="随访记录" style="height: 100%">
<followUpRecord :patient-id="patientId||$route.query.patientId" :only-read="readOnly" />
</el-tab-pane>
</el-tabs>
</div>
</div>
</div>
<shrink ref="shrinks" :arrow-type="1" @display="handleDisplay" @changeType="changeType" />
<drawer ref="drawers" :cur-type="dataType" :display.sync="display" :width="drawerWidth" :mask="true" @display="closeDrawer">
<!-- 关键指标-->
<key-indicators
v-if="dataType === 1"
id="drawerKey"
ref="keyIndicatorRef"
class="key-content"
v-bind="$attrs"
:patient-id="patientId"
:patient-id-number="patientBaseData.patientIdNumber"
/>
<!-- 数据集-->
<dataInfo v-if="dataType === 2" :fore-list="foreList" :after-list="afterList" />
<!-- 病历收藏-->
<collection v-if="dataType === 3" :patient-id="patientBaseData.patientId" :platform="isSearch || $route.query.isSearch" />
<!-- 常用业务-->
<business v-if="dataType === 4" :patient-id="patientBaseData.patientId" :platform="isSearch || $route.query.isSearch" :patient-name="patientBaseData.patientName" />
</drawer>
</div>
</template>
<script>
import timeLine from './time-line.vue'
import shrink from '@/components/360View/shrink'
import drawer from '@/components/360View/drawer'
import dataInfo from './dataInfo' //
import collection from './collection' //
import business from './business' //
import overView from '@/components/360View/overView' //
import routine from '@/components/360View/routine' //
import special from '@/components/360View/special' //
import followUpRecord from '@/components/360View/followUpRecord'
import keyIndicators from './key-indicators'
import imgRecord from './img-reccrd.vue'
import pacsList from '@/components/360View/pacs/patientList'
import medicalRecord from '@/components/360View/medicalRecord' //
import opticalFile from '@/components/360View/opticalFile' //
import eventBus from '@/page-subspecialty/utils/eventBus'
export default {
components: { timeLine, drawer, keyIndicators, shrink, business, collection, imgRecord, overView, medicalRecord, dataInfo, routine, special, followUpRecord, opticalFile, pacsList },
mixins: [],
props: {
patientId: {
type: String,
default: ''
},
onlyRead: {
type: Boolean,
default: false
},
isSearch: {
type: String,
default: ''
}
},
data() {
return {
display: false,
sharkFlag: true,
patientBaseData: {},
timeAxisNodeInfo: [], //
doctorId: '', //
date: '', //
source: '', //
collectList: '', //
drawerWidth: '',
timeAxisData: [], //
timeAxisAll: [], //
timeAxisType: '病史总览', // tab
foreList: [], //
afterList: [], //
dataType: 1,
kpilist: [], // kpicheckbox
ShiLiAndYanYaData: {}, //
isActive: false, // tab
type: '', //
defaultProps: {
children: 'children',
label: 'tagName'
},
jsArr: [],
dataForm: {}
}
},
computed: {
readOnly() {
if (this.$route.query.onlyRead) {
return JSON.parse(this.$route.query.onlyRead)
} else {
return this.onlyRead
}
}
},
watch: {
display(val) {
if (val) {
this.$refs.drawers.$el.style.display = 'inline-block'
}
}
},
created() {
this.getPatientData()
this.getTimeAxisData()
},
mounted() {
this.computerData()
if (this.isSearch === '3') {
this.timeAxisType = '视光档案'
} else {
this.timeAxisType = '病史总览'
}
if (this.$route.query.patientId) {
this.timeAxisType = '门诊病历'
}
},
methods: {
//
tabClick(type) {
this.timeAxisType = type.name
this.timeAxisNodeInfo = []
},
selectType(type) {
this.dataType = type
this.display = true
},
maskId(idCard) {
if (idCard) {
const reg = /^(.{6})(?:\d+)(.{4})$/
return idCard.replace(reg, '\$1******\$2')
}
},
computerData() {
//
eventBus.$off('sendForData')
eventBus.$on('sendForData', data => {
const arr = this.foreList.concat(data)
// const id = 'id'
this.foreList = this.unique(arr)
// this.foreList = arr.reduce((all, next) => all.some((item) => item[id] == next[id]) ? all : [...all, next], [])
this.openDataDrink()
})
},
unique(list) {
for (let i = 0; i < list.length - 1; i++) {
for (let j = i + 1; j < list.length; j++) {
if (list[i].id === list[j].id) {
list.splice(i, 1)
j--
}
}
}
return list
},
openDataDrink() {
this.dataType = 2
this.display = true
this.$nextTick(() => {
if (this.$refs.drawers && this.$refs.drawers.$el) {
this.$refs.drawers.$el.style.display = 'inline-block'
}
if (this.$refs.shrinks && this.$refs.shrinks.$el) {
this.$refs.shrinks.$el.style.zIndex = 999
this.$refs.drawers.selectShrink()
}
})
},
closeDrawer(val) {
this.display = val
},
changeType(val) {
this.dataType = val
this.display = true
},
handleDisplay(val) {
this.dataType = 1
if (val) {
this.display = true
this.$refs.drawers.$el.style.display = 'inline-block'
} else {
this.display = false
}
},
changeWidth() {
this.drawerWidth = (this.drawerWidth === '500px') ? '800px' : '500px'
},
backList() {
if (this.$route.query.patientId && !this.$route.query.doctorId) {
this.$router.go(-1)
} else if (this.$route.query.doctorId) {
this.$router.push('/outpatientManagement-call')
} else {
this.$parent.detailViewVisible = false
this.$parent.getDataListInitial()
}
},
// 360
handlePacs() {
// const baseUrl = 'http://z1.huimucloud.com:8085'
const baseUrl = 'http://10.80.5.32:8026'
// const baseUrl = 'http://192.168.0.85:8001'
const href = `${baseUrl}/EXAMINE_Report/InterFace?PatID=${this.patientId}&DoctorID=${this.employeeId}&PatIdKey=&ExamNo=`
window.open(href, '_blank')
// const { href } = this.$router.resolve({
// name: 'pacsManage'
// })
// window.open(href, '_blank')
},
// 360
closePacs() {
this.isActive = false
},
//
shrinkClick() {
this.drawer = !this.drawer
this.display = true
},
// id--
async getPatientData() {
const { data: res } = await this.$http.get(
'/patient/view/getPatientData',
{
params: {
patientId: this.patientId || this.$route.query.patientId
}
}
)
if (res.code === 0) {
this.patientBaseData = res.data ? res.data : {}
} else {
this.$message.error(res.msg)
}
},
// --
async getTimeAxisData() {
const { data: res } = await this.$http.get(
'/patient/view/getTimeAxisData',
{
params: {
patientId: this.patientId || this.$route.query.patientId
}
}
)
if (res.code === 0) {
if (res.data.length > 0) {
this.timeAxisData = res.data.length > 0 ? res.data : []
}
if (!res.data.length) {
const year = this.$moment().format('YYYY')
const date = this.$moment().format('YYYY-MM-DD')
this.timeAxisData = [{ year: year, data: [{ date: date, itemList: [{ groupName: '门诊', opDate: date, year: year }] }] }]
}
} else {
this.$message.error(res.msg)
}
},
// --
async getTimeAxisNodeInfo(item) {
this.timeAxisType = item.groupName
const { data: res } = await this.$http.get('/patient/view/getTimeAxisNodeInfo', {
params: {
date: item.opDate,
groupName: item.groupName,
patientId: this.patientId || this.$route.query.patientId
}
})
if (res.code === 0) {
this.timeAxisNodeInfo = res.data || []
} else {
this.$message.error(res.msg)
}
}
}
}
</script>
<style lang="scss">
.container{
.el-tabs__content {
height: calc(100% - 38px);
}
.el-tabs--border-card {
box-shadow: none;
}
.el-tabs--border-card>.el-tabs__header{
background: #F0F2F5;
}
.el-dialog > .el-dialog__body {
height: calc(100% - 48px);
}
}
.detail-view{
.el-dialog > .el-dialog__body {
height: calc(100% - 50px);
}
}
</style>
<style lang="scss" scoped>
.container{
width: 100%;
height: 100%;
display: flex;
background: #F0F2F5;
.contentBox{
display: flex;
height: calc(100% - 100px);
}
.mr16{
margin-right: 16px;
}
.header{
width: 100%;
height: 88px;
padding: 8px;
position: relative;
margin-bottom: 16px;
box-sizing: border-box;
background: #FFFFFF;
border-radius: 4px;
.head-t{
position: absolute;
left: 155px;
top: 20px;
}
.head-b{
position: absolute;
left: 155px;
bottom: 20px;
font-size: 14px;
}
.head-r{
margin-right: 16px;
font-weight: 500;
font-size: 20px;
color: rgba(0, 0, 0, 0.88);
}
}
.key-indicators-shrink {
width: 32px;
margin-left: 8px;
height: 100%;
position: relative;
background: linear-gradient(90deg, rgba(47, 130, 255, 0.3) 0%, rgba(255, 255, 255, 0) 100%);
.icon-circle {
border-radius: 50%;
width: 24px;
height: 24px;
border: 2px solid rgba(30, 121, 255, 0.4);
display: flex;
justify-content: center;
align-items: center;
margin-top: 18px;
margin-left: 3px;
cursor: pointer;
}
.el-icon-arrow-right,.el-icon-arrow-left {
color: #fff;
font-weight: 700;
}
img {
width: 32px;
height: 142px;
}
.dataBase{
position: absolute;
display: inline-block;
color: #1C76FD;
margin-left: 6px;
writing-mode: vertical-rl;
letter-spacing: 3px;
cursor: pointer;
}
.fontColor{
color: white !important;
}
.dataOne{
top: 80px;
}
.dataTwo{
top: 210px;
}
.dataThree{
top: 328px;
}
.dataFour{
top: 455px;
}
.imgCur{
position: absolute;
left: 0;
top: 43px;
}
.imgOne{
position: absolute;
left: 0;
top: 163px;
}
.imgTwo{
position: absolute;
left: 0;
top: 287px;
}
.imgThree{
position: absolute;
left: 0;
top: 411px;
}
}
.leftBox{
width: 168px;
height: 100%;
margin-right: 16px;
background-color: white;
}
.rightBox{
width: 100%;
height: 100%;
background-color: #F0F2F5;
}
}
</style>

2
src/components/360View/opticalFile/index.vue

@ -75,7 +75,7 @@
import ourPatientRecord from './outPatientRecord'
import eyesVision from '@/components/360View/commonForm/eyesVision' //
import threeVision from '@/components/360View/commonForm/threeVision' //
import optometryForm from '@/components/360View/commonForm/optometryForm-copy' //
import optometryForm from '@/components/360View/commonForm/optometryForm' //
import deveopmentFile from '@/components/360View/commonForm/deveopmentFIle' //
export default {
components: {

164
src/components/item-select/index.vue

@ -6,7 +6,7 @@
:key="index"
class="match-item"
closable
@close="removeItem(item)"
@close="btnRemove(item)"
@click="editItem(item)"
>
<span class="match-item-name">{{ item.itemName }}
@ -48,9 +48,47 @@
</el-form-item>
<!-- 匹配数值 -->
<el-form-item>
<el-input-number v-if="dataForm.kpiType==='number'" v-model="dataForm.queryValue" size="mini" class="item-query-value" placeholder="请输入" />
<el-input v-if="dataForm.kpiType==='string'" v-model="dataForm.queryValue" size="mini" class="item-query-value" placeholder="请输入" />
<el-date-picker v-if="dataForm.kpiType==='date'" v-model="dataForm.queryValue" size="mini" align="right" type="date" placeholder="选择日期" value-format="yyyy/MM/dd" />
<el-input-number
v-if="dataForm.kpiType==='number'"
v-model="dataForm.queryValue"
size="mini"
class="item-query-value"
placeholder="请输入"
/>
<el-input
v-if="dataForm.kpiType==='string'"
v-model="dataForm.queryValue"
size="mini"
class="item-query-value"
placeholder="请输入"
/>
<el-date-picker
v-if="dataForm.kpiType==='date'"
v-model="dataForm.queryValue"
size="mini"
align="right"
type="date"
placeholder="选择日期"
value-format="yyyy/MM/dd"
/>
<!-- 设备选择 -->
<el-select
v-if="dataForm.kpiType==='selectDevice'"
v-model="dataForm.queryValue"
filterable
size="mini"
placeholder="请选择"
>
<el-option
v-for="item in options_device"
:key="item.deviceId"
:label="item.deviceName+(item.location?'('+item.location+')':'')"
:value="item.deviceId"
>
<span style="float: left">{{ item.deviceName }}</span>
<span style="float: right; color: #8492a6; font-size: 13px">{{ item.location?item.location:'' }}</span>
</el-option>
</el-select>
</el-form-item>
<!-- 按钮 -->
<el-form-item>
@ -66,7 +104,22 @@
<script>
import cloneDeep from 'lodash/cloneDeep'
// import { getBirthday, getAge, formatDate } from '@/utils'
import { findItem, findPathArray } from '@/utils/tree'
// const options_matchType = [
// { label: '', value: 'matchQuery' },
// { label: '', value: 'rangeQuery' }
// ]
// const demo = {
// connection: '', //
// id: '', // ID
// queryType: '', //
// queryLogic: 'eq',
// queryValue: ''
// }
const options_matchValue = [
{ label: '匹配', value: 'eq' },
{ label: '大于', value: 'gt' },
@ -85,6 +138,7 @@ export default {
isAdd: false,
dataList: [],
options_kpi: [],
options_device: [],
options_matchValue: options_matchValue,
CascaderValue: [],
dataForm: {
@ -125,18 +179,32 @@ export default {
},
value(val) {
const arrayData = cloneDeep(val)
// dataList
this.dataList = arrayData.map(item => {
if (this.options_kpi.length === 0) { this.getOptionsKPI() }
const valueList = findPathArray(this.options_kpi, item.id, 'value', 'children')
const itemParentInfo = this.getItem(valueList[(valueList.length - 2) || 0])
console.log(1,valueList)
const itemInfo = this.getItem(valueList[(valueList.length - 1) || 0])
// console.log(item, itemInfo, itemParentInfo)
//
if (item.id.indexOf('DEVICE_ID') >= 0) {
const dict = cloneDeep(window.SITE_CONFIG['dict_device_item'])
const itemId = item.id.split('.')[0] || ''
const obj = dict.find(item2 => item2.value === itemId)
this.options_device = obj ? obj.children : []
}
return {
recId: item.recId,
itemName: itemParentInfo.label,
kpiId: item.id,
kpiName: itemInfo.label,
kpiType: itemInfo.type,
kpiName: item.label,
kpiType: item.type,
queryType: item.queryType, //
// queryTypeName: options_matchType.find((item2) => item2.value === item.queryType).label,
queryLogic: item.queryLogic, // queryValue=queryLogic
queryLogicName: options_matchValue.find((item2) => item2.value === item.queryLogic).label,
queryValue: item.queryValue //
@ -144,9 +212,10 @@ export default {
})
}
},
mounted() {
created() {
this.getOptionsKPI()
},
mounted() { },
methods: {
changeHandle_kpi(valueList) {
if (valueList.length > 0) {
@ -158,13 +227,22 @@ export default {
const item = this.getItem(value)
const oldValType = this.dataForm.kpiType
console.log(item)
this.dataForm.itemName = parentItem.label
this.dataForm.kpiId = item.value
this.dataForm.kpiId = item.id
this.dataForm.kpiName = item.label
this.dataForm.kpiType = item.type
this.dataForm.queryType = this.dataForm.kpiType === 'string' ? 'matchQuery' : 'rangeQuery'
this.dataForm.kpiType = item.fieldType
this.dataForm.queryType = (this.dataForm.kpiType === 'number' || this.dataForm.kpiType === 'date') ? 'rangeQuery' : 'matchQuery'
this.dataForm.queryValue = this.dataForm.kpiType === oldValType ? this.dataForm.queryValue : null
//
if (item.value.indexOf('DEVICE_ID') >= 0) {
// this.options_device = cloneDeep(window.SITE_CONFIG['dict_device']).filter(item2 => (item.value.split('.')[1] || '') === item2.datSource)
const dict = cloneDeep(window.SITE_CONFIG['dict_device_item'])
const itemId = item.value.split('.')[0] || ''
const obj = dict.find(item2 => item2.value === itemId)
this.options_device = obj ? obj.children : []
}
}
},
//
@ -173,9 +251,11 @@ export default {
...item,
connection: this.connection,
id: item.kpiId,
// queryType: item.queryType,
// queryValue: {}, // postgetlogic
queryValue: String(item.queryValue)
}
// filterItem.queryValue[item.queryLogic] = String(item.queryValue)
return filterItem
},
@ -187,7 +267,7 @@ export default {
return list
},
//
removeItem(item) {
btnRemove(item) {
const index = this.dataList.findIndex((item2, index) => {
return item2 === item
})
@ -195,7 +275,7 @@ export default {
this.$emit('remove', this.convertItem(item))
this.$emit('input', this.convertItemList(this.dataList))
this.$emit('getDataListInitial')
this.$emit('change', this.convertItemList(this.dataList))
},
//
editItem(item) {
@ -209,13 +289,17 @@ export default {
this.CascaderValue = findPathArray(this.options_kpi, this.dataForm.kpiId, 'value', 'children')
},
btnAdd() {
this.resetDataForm()
this.isAdd = true
},
btnCancel() {
this.isAdd = false
},
btnOk() {
if (!this.dataForm.kpiId ||
this.dataForm.queryValue === null ||
this.dataForm.queryValue === undefined ||
this.dataForm.queryValue === '') {
this.dataForm.queryValue === null ||
this.dataForm.queryValue === undefined ||
this.dataForm.queryValue === '') {
this.$message.error('请明确查询条件!')
return false
}
@ -224,22 +308,41 @@ export default {
this.$emit('add', this.convertItem(item))
this.$emit('input', this.convertItemList(this.dataList))
this.$emit('getDataListInitial')
this.$emit('change', this.convertItemList(this.dataList))
},
btnCancel() {
this.isAdd = false
resetDataForm() {
this.CascaderValue = []
this.dataForm = {
itemName: '',
kpiName: '',
kpiId: '',
kpiType: 'string',
queryType: 'matchQuery',
queryLogic: 'eq',
queryValue: ''
}
},
getItem(value) {
return findItem(this.options_kpi, value, 'value', 'children')
},
getOptionsKPI() {
async getOptionsKPI() {
if (window.SITE_CONFIG['dict_colSearch']) {
this.options_kpi = window.SITE_CONFIG['dict_colSearch']
} else {
//
this.$http.get('/sys/table/dict/getList', { params: { type: 1 }}).then(({ data: res }) => {
this.options_kpi = res.data
})
const { data: res } = await this.$http.get('/sys/table/dict/getList', { params: { type: 1, isSearch: 1 }})
if (res.data.length) {
res.data.forEach(item => {
item.label = item.tableDescription
item.value = item.tableName
item.list.forEach(row => {
row.label = row.fieldDescription
row.value = row.fieldName
})
item.children = JSON.parse(JSON.stringify(item.list))
})
}
this.options_kpi = res.data
}
}
}
@ -248,8 +351,8 @@ export default {
</script>
<style lang="scss">
.kpi-select-filter .el-cascader-menu__wrap{
height: 400px;
.kpi-select-filter .el-cascader-menu__wrap {
height: 400px;
}
</style>
@ -265,7 +368,7 @@ export default {
margin-left: 5px;
margin-right: 5px;
}
.match-item-kpi{
.match-item-kpi {
color: #fa0d35;
margin-left: 3px;
margin-right: 3px;
@ -286,16 +389,15 @@ export default {
cursor: pointer;
}
.form-query{
.item-query-kpi{
.form-query {
.item-query-kpi {
width: 300px;
}
.item-query-type{
.item-query-type {
width: 100px;
}
.item-query-logic{
.item-query-logic {
width: 100px;
}
}
</style>

10
src/components/patient-search/index.vue

@ -81,7 +81,7 @@
</template>
<script>
import detailView from '@/components/360View/index1' // 360
import detailView from '@/components/360View/index' // 360
import checked from '@/mixins/checked'
import checkedFooter from '@/components/checked-footer'
import dataList from './data-list.vue'
@ -105,7 +105,7 @@ export default {
return {
uploadUrl: window.SITE_CONFIG['apiURL'] + '/patient/data/searchByExcel',
headers: {
token: window.sessionStorage.get('xa-token')
token: window.sessionStorage.getItem('xa-token')
},
dataForm: {},
keyWord: '',
@ -121,11 +121,7 @@ export default {
queryItemData_must: [],
queryItemData_should: [],
queryItemData_must_not: [],
dataList: [
{
name: 1
}
],
dataList: [],
currentTableList: []
}
},

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

@ -92,7 +92,7 @@ export const moduleRoutes = {
{
path: '/360view',
name: '360view',
component: () => import('@/components/360View/index1.vue')
component: () => import('@/components/360View/index.vue')
}
]
}

318
src/page-subspecialty/router/index.js.bak

@ -1,318 +0,0 @@
import Vue from 'vue'
import Router from 'vue-router'
import http from '../utils/request'
import { isURL } from '@/utils/validate'
import Cookies from 'js-cookie'
Vue.use(Router)
// 解决Vue-Router升级导致的Uncaught(in promise) navigation guard问题----------
const originalPush = Router.prototype.push
Router.prototype.push = function push(location, onResolve, onReject) {
if (onResolve || onReject) return originalPush.call(this, location, onResolve, onReject)
return originalPush.call(this, location).catch(err => err)
}
// 解决Vue-Router升级导致的Uncaught(in promise) navigation guard问题----------
// 页面路由(独立页面)
export const pageRoutes = [
{
path: '/404',
component: () => import('@/page-subspecialty/views/pages/404'),
name: '404',
meta: { title: '404未找到' },
beforeEnter(to, from, next) {
// 拦截处理特殊业务场景
// 如果, 重定向路由包含__双下划线, 为临时添加路由
if (/__.*/.test(to.redirectedFrom)) {
return next(to.redirectedFrom.replace(/__.*/, ''))
}
next()
}
},
{
path: '/login',
component: () => import('@/page-subspecialty/views/pages/login'),
name: 'login',
meta: { title: '登录' }
},
{
path: '/pacsManage',
component: () => import('@/page-subspecialty/views/pages/pacsManage/index'),
name: 'pacsManage',
meta: { title: 'pacs浏览器', isTab: true }
},
{
path: '/pacs',
component: () => import('@/page-subspecialty/views/pages/pacs/index'),
name: 'pacs',
meta: { title: 'pacs浏览器', isTab: true }
}
]
// 模块路由(基于主入口布局页面)*8
export const moduleRoutes = {
path: '/',
component: () => import('@/page-subspecialty/views/main'),
name: 'main',
redirect: { name: 'outpatientManagement' },
meta: { title: '首页' },
children: [
{
path: '/outpatientManagement',
component: () => import('@/page-subspecialty/views/modules/outpatientManagement/call'),
name: 'outpatientManagement',
meta: { title: '日常出诊', isTab: true }
},
// ok镜
{
path: '/patientInfo',
name: 'patientInfo',
meta: { title: '详情', isTab: true },
component: () => import('@/page-subspecialty/views/modules/optometryManagement/seeDoctor/index')
},
{
path: '/iframe',
component: null,
name: 'iframe',
meta: { title: 'iframe', isTab: true }
},
{
path: '/redirect',
name: 'redirect',
component: () => import('@/page-subspecialty/views/redirect')
},
{
path: '/360view',
name: '360view',
component: () => import('@/components/360View/index1.vue')
}
]
}
export function addDynamicRoute(routeParams, router) {
// 组装路由名称, 并判断是否已添加, 如是: 则直接跳转
var routeName = routeParams.routeName
var dynamicRoute = window.SITE_CONFIG['dynamicRoutes'].filter(item => item.name === routeName)[0]
if (dynamicRoute) {
return router.push({ name: routeName, params: routeParams.params })
}
// 否则: 添加并全局变量保存, 再跳转
dynamicRoute = {
path: routeName,
component: () => Promise.resolve(require(`@/page-subspecialty/views/modules/${routeParams.path}`).default),
// component: () => import(`@/views/modules/${routeParams.path}`),
name: routeName,
meta: {
...window.SITE_CONFIG['contentTabDefault'],
menuId: routeParams.menuId,
title: `${routeParams.title}`
}
}
router.addRoutes([
{
...moduleRoutes,
name: `main-dynamic__${dynamicRoute.name}`,
children: [dynamicRoute]
}
])
window.SITE_CONFIG['dynamicRoutes'].push(dynamicRoute)
router.push({ name: dynamicRoute.name, params: routeParams.params })
}
const createRouter = () => new Router({
mode: 'history',
scrollBehavior: () => ({ y: 0 }),
routes: pageRoutes.concat(moduleRoutes)
})
const router = createRouter()
// [vue-router] Duplicate named routes definition 重复的命名路由定义
// 动态路由退出再登录会出现警告重复路由
// 解决方案:在退出时调用resetRouter()方法
export function resetRouter() {
const newRouter = createRouter()
router.matcher = newRouter.matcher // reset router
}
router.beforeEach((to, from, next) => {
// 添加动态(菜单)路由
// 已添加或者当前路由为页面路由, 可直接访问
if (window.SITE_CONFIG['dynamicMenuRoutesHasAdded'] || fnCurrentRouteIsPageRoute(to, pageRoutes)) {
return next()
}
if (to.path === from.path) {
return
}
if (to.name === 'login' || to.path === '/login' || to.path === 'satusScreen' || to.name === 'satusScreen') {
next()
} else if (to.name === '360view' && to.query.doctorId) {
loginByDocId(to.query.doctorId, next, to.fullPath)
} else {
// 获取字典列表, 添加并全局变量保存
// http.get('/sys/dict/type/all').then(({ data: res }) => {
// if (res.code !== 0) {
// return
// }
// window.SITE_CONFIG['dictList'] = res.data
// }).catch(() => {})
// 获取左侧菜单列表,添加并全局变量保存
http.get('/sys/menu/nav').then(({ data: res }) => {
if (res.code !== 0) {
Vue.prototype.$message.error(res.msg)
return next({ name: 'login' })
}
window.SITE_CONFIG['menuList'] = res.data
}).catch(() => {
return next({ name: 'login' })
})
// 获取菜单管理菜单列表,并添加动态路由
http.get('/sys/menu/list', {
params: {
type: 0
}
}).then(({ data: res }) => {
if (res.code !== 0) {
Vue.prototype.$message.error(res.msg)
return next({ name: 'login' })
}
// window.SITE_CONFIG['menuList'] = res.data
const menuListChild = res.data.filter(item => item.children.length > 0)
fnAddDynamicMenuRoutes(JSON.parse(JSON.stringify(res.data)), menuListChild.length)
next({ ...to, replace: true })
}).catch(() => {
// console.log(123)
return next({ name: 'login' })
})
}
})
function getNavList(next) {
http.get('/sys/menu/nav').then(({ data: res }) => {
if (res.code !== 0) {
Vue.prototype.$message.error(res.msg)
return next()
}
window.SITE_CONFIG['menuList'] = res.data
}).catch(() => {
return next({ name: 'login' })
})
}
function muneList(next) {
http.get('/sys/menu/list', {
params: {
type: 0
}
}).then(({ data: res }) => {
if (res.code !== 0) {
Vue.prototype.$message.error(res.msg)
return next({ name: 'login' })
}
// window.SITE_CONFIG['menuList'] = res.data
const menuListChild = res.data.filter(item => item.children.length > 0)
fnAddDynamicMenuRoutes(JSON.parse(JSON.stringify(res.data)), menuListChild.length)
}).catch(() => {
return next({ name: 'login' })
})
}
function loginByDocId(doctorId, next) {
const params = {
doctorId: doctorId
}
http.post('/loginByDid', params).then(({ data: res }) => {
if (res.code !== 0) {
return this.$message.error(res.msg)
}
console.log(res)
// Cookies.set('xa-token', res.data.token)
window.sessionStorage.setItem('xa-token', res.data.token)
window.sessionStorage.setItem('qg-userData', JSON.stringify(res.data.currentUser))
getNavList(next)
muneList(next)
return next()
}).catch(() => { })
}
/**
* 判断当前路由是否为页面路由
* @param {*} route 当前路由
* @param {*} pageRoutes 页面路由
*/
function fnCurrentRouteIsPageRoute(route, pageRoutes = []) {
let temp = []
for (let i = 0; i < pageRoutes.length; i++) {
if (route.path === pageRoutes[i].path) {
return true
}
if (pageRoutes[i].children && pageRoutes[i].children.length >= 1) {
temp = temp.concat(pageRoutes[i].children)
}
}
return temp.length >= 1 ? fnCurrentRouteIsPageRoute(route, temp) : false
}
/**
* 添加动态(菜单)路由
* PH自上而下遍历累积平铺
* @param {*} menuList 菜单列表
* @param {*} routes 递归创建的动态(菜单)路由
*/
function fnAddDynamicMenuRoutes(menuList = [], menuListChildLength, routes = []) {
let index = 0
menuList.forEach((item, i) => {
// eslint-disable-next-line
let URL = (item.url || '').replace(/{{([^}}]+)?}}/g, (s1, s2) => eval(s2)) // URL支持{{ window.xxx }}占位符变量
item['meta'] = {
...window.SITE_CONFIG['contentTabDefault'],
menuId: item.id,
title: item.name
}
if (isURL(URL)) {
item['path'] = item['name'] = `i-${item.id}`
item['meta'].push({
iframeURL: URL
})
} else {
// console.log(URL)
URL = URL.replace(/^\//, '').replace(/_/g, '-')
item['path'] = '/' + URL.replace(/\//g, '-')
item['name'] = URL.replace(/\//g, '-')
// 坑!!!父级也必须要有component,父级要有自己的vue组件,父级路由必须有<router-view />占位符
// 其孩子children才能展示出来,孩子展示在父级占位符的地方
URL.includes('seeDoctor') ? URL = 'seeDoctor' : '' // 不同父级有相同子级seeDoctor,防止面包屑冲突,动态路由名字区分设置为seeDoctor、seeDoctorOne,在寻找组件时替换回seeDoctor,可以找到对应组件路径
item['component'] = () => Promise.resolve(require(`@/page-subspecialty/views/modules/${URL}`).default)
// 如果是父级给父级添加重定向到子菜单第一项
if (item.children.length > 0 && item.children[0].url) {
// console.log(item)
// isShow:0显示不菜单 1显示菜单
item.children[0].isShow === 0 ? '' : item['redirect'] = '/' + item.children[0].url.replace(/\//g, '-')
}
}
if (item.children.length > 0) {
index++
fnAddDynamicMenuRoutes(item.children)
}
})
// 此处一定要加判断,因为此方法在递归,要等到递归完成后再执行下面的内容
// 坑!!!如果不加此判断,this.$route.matched面包屑的父级就不会展示
if (menuListChildLength === index) {
routes = menuList
// PH:底层调用一次
// 添加路由
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
}
}
export default router

2
src/page-subspecialty/views/modules/nurseManagement/reservation/subList/index.vue

@ -110,7 +110,7 @@
</template>
<script>
import mixinViewModule from '@/mixins/view-module'
import DetailView from '@/components/360View/index1.vue'
import DetailView from '@/components/360View/index.vue'
import ReDialog from '@/page-subspecialty/views/modules/nurseManagement/reservation/subList/reDialog.vue'
import AddProject from '@/page-subspecialty/views/modules/nurseManagement/reservation/subSetting/addProject.vue'
import AddPatientOrder

6
src/page-subspecialty/views/modules/optometryManagement/dioptric/index.vue

@ -84,7 +84,7 @@
</el-table-column>
<el-table-column prop="remark" label="备注" header-align="center" align="center" />
<el-table-column prop="updateDate" label="就诊时间" header-align="center" align="center" width="165" />
<el-table-column prop="callSort" label="排队序号" header-align="center" align="center" width="90" />
<el-table-column prop="callSort" label="排队序号" header-align="center" align="center" width="90"/>
<el-table-column prop="callStatus" label="叫号状态" header-align="center" align="center" width="90">
<template slot-scope="scope">
{{ scope.row.callStatus | callStatus }}
@ -128,7 +128,7 @@ import mixinViewModule from '@/mixins/view-module'
import tableAutoHeight from '@/mixins/tableAutoHeight'
import AddOrUpdate from './patient-add-or-update'
import hisAdd from './HIS-add'
import detailView from '@/components/360View/index1' // 360
import detailView from '@/components/360View/index' // 360
export default {
components: {
hisAdd,
@ -273,7 +273,7 @@ export default {
platform: 3
}
})
if (res.code === 0) {
if (res.code === 0){
} else {
this.$message.error(res.msg)
}

2
src/page-subspecialty/views/modules/outpatientManagement/call/index.vue

@ -126,7 +126,7 @@ import mixinViewModule from '@/mixins/view-module'
import tableAutoHeight from '@/mixins/tableAutoHeight'
import AddOrUpdate from './patient-add-or-update'
import hisAdd from './HIS-add'
import detailView from '@/components/360View/index1' // 360
import detailView from '@/components/360View/index' // 360
export default {
components: {
hisAdd,

10
src/page-subspecialty/views/modules/outpatientManagement/treat/index.vue

@ -79,12 +79,12 @@
>
<el-table-column prop="patientId" label="登记号" header-align="center" align="center" width="120" />
<!-- <el-table-column prop="patientId" label="就诊号" header-align="center" align="center" />-->
<el-table-column label="状态" header-align="center" align="center" width="100">
<el-table-column label="状态" header-align="center" align="center" width="70">
<template slot-scope="scope">
{{ scope.row.patientStatus | patientStatus }}
</template>
</el-table-column>
<el-table-column prop="patientName" label="患者姓名" header-align="center" align="center" width="100" />
<el-table-column prop="patientName" label="患者姓名" header-align="center" align="center" width="95" />
<el-table-column label="出生日期" header-align="center" align="center" width="110">
<template slot-scope="scope">
{{ scope.row.patientBirthday ? $options.filters.dateFilterTwo( scope.row.patientBirthday): '- ' }}
@ -103,8 +103,8 @@
{{ scope.row.zlEye === 'os' ? '左眼' : ( scope.row.zlEye === 'od' ? '右眼' : '') }}
</template>
</el-table-column>
<el-table-column prop="mzDoctorName" label="门诊医师" header-align="center" align="center" width="100" />
<el-table-column label="操作员" header-align="center" align="center" width="100">
<el-table-column prop="mzDoctorName" label="门诊医师" header-align="center" align="center" width="95" />
<el-table-column label="操作员" header-align="center" align="center" width="95">
<template slot-scope="scope">
{{ getOperator(scope.row.zlProjectList) }}
</template>
@ -159,7 +159,7 @@ import mixinViewModule from '@/mixins/view-module'
import tableAutoHeight from '@/mixins/tableAutoHeight'
import AddOrUpdate from './patient-add-or-update'
import hisAdd from './HIS-add'
import detailView from '@/components/360View/index1' // 360
import detailView from '@/components/360View/index' // 360
export default {
components: {
hisAdd,

Loading…
Cancel
Save