You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

394 lines
11 KiB

3 years ago
<template>
<div class="routineBox">
<div class="header">
<div>
<el-checkbox v-model="checked" class="mr30">色盲</el-checkbox>
<el-radio-group v-model="radio2" class="mr30" style="margin-bottom: 2px">
<el-radio :label="3"></el-radio>
<el-radio :label="6"></el-radio>
</el-radio-group>
<span>类型</span>
<el-select v-model="value" placeholder="请选择" style="display: inline-block;width: 150px" size="small">
<el-option
v-for="item in options"
:key="item.value"
:label="item.label"
:value="item.value"
/>
</el-select>
</div>
3 years ago
<div v-if="onlyRead">
<el-button type="primary" size="small" @click="saveRoutine">保存</el-button>
<div size="small" style="display:inline-block;margin-left:10px;width: 32px;height: 32px;line-height:32px;text-align:center;background-color: #1e79ff;border-radius: 4px;vertical-align: middle" @click="addDataList">
3 years ago
<img :src="require('@/assets/img/data.png')" alt="" style="width: 17px;height: 16px;margin-bottom: 2px">
</div>
</div>
</div>
<div class="content">
<div class="lineBox">
3 years ago
<el-checkbox v-model="checkedShiLi">视力</el-checkbox>
3 years ago
<div style="display: flex">
<echarts-yanya
3 years ago
:id-name="'indicators-shili'"
:chart-data="routineData.shili"
3 years ago
class="scroll-echearts"
/>
<div class="eyeBox">
<div class="eye el">
<div>最近一次</div>
<div>眼别</div>
<div>裸眼视力</div>
<div>矫正视力</div>
</div>
<div class="eye">
3 years ago
<div>{{ shiliLast.length ? shiliLast[0].examTime : '' }}</div>
3 years ago
<div class="info">
3 years ago
<span class="eye_w">OD</span>
<span class="eye_w">OS</span>
3 years ago
</div>
<div class="info">
3 years ago
<span class="eye_w">{{ shiliLast.length ? shiliLast[0].odVan : '' }}</span>
<span class="eye_w">{{ shiliLast.length ? shiliLast[0].osVan : '' }}</span>
3 years ago
</div>
<div class="info">
3 years ago
<span class="eye_w">{{ shiliLast.length ? shiliLast[0].odVag : '' }}</span>
<span class="eye_w">{{ shiliLast.length ? shiliLast[0].osVag : '' }}</span>
3 years ago
</div>
</div>
</div>
</div>
</div>
<div class="lineBox">
3 years ago
<el-checkbox v-model="checkedYanYa">眼压</el-checkbox>
3 years ago
<div style="display: flex">
<echarts-yanya
3 years ago
:id-name="'indicators-yanya'"
:chart-data="routineData.yanya"
3 years ago
class="scroll-echearts"
/>
3 years ago
<div class="eyeBox" style="height: 135px">
3 years ago
<div class="eye el">
<div>最近一次</div>
<div>眼别</div>
<div>眼压</div>
</div>
<div class="eye">
3 years ago
<div>{{ yanyaLast.length ? yanyaLast[0].examTime : '' }}</div>
3 years ago
<div class="info">
3 years ago
<span class="eye_w">OD</span>
<span class="eye_w">OS</span>
3 years ago
</div>
<div class="info">
3 years ago
<span class="eye_w">{{ yanyaLast.length ? yanyaLast[0].odIop : '' }}</span>
<span class="eye_w">{{ yanyaLast.length ? yanyaLast[0].osIop : '' }}</span>
3 years ago
</div>
</div>
</div>
</div>
</div>
<div class="lineBox">
3 years ago
<el-checkbox v-model="checkedDL">电脑验光</el-checkbox>
3 years ago
<el-table
3 years ago
:data="routineData.dNyanguang"
3 years ago
style="width: 100%;margin-top: 32px"
>
<el-table-column
3 years ago
prop="examTime"
3 years ago
label="时间"
width="180"
/>
<el-table-column
3 years ago
prop="eyeType"
3 years ago
label="眼别"
width="180"
/>
<el-table-column
3 years ago
prop="odSph"
3 years ago
label="球镜 DS"
/>
<el-table-column
3 years ago
prop="odCyl"
3 years ago
label="柱镜 DC"
/>
<el-table-column
3 years ago
prop="odAx"
3 years ago
label="轴位 Axis"
/>
<el-table-column
3 years ago
prop="odSe"
3 years ago
label="等效球镜"
/>
</el-table>
</div>
<div class="lineBox">
3 years ago
<el-checkbox v-model="checkedZJ">主觉验光</el-checkbox>
3 years ago
<el-table
3 years ago
:data="routineData.zJyanguang"
3 years ago
style="width: 100%;margin-top: 32px"
>
<el-table-column
3 years ago
prop="examTime"
3 years ago
label="时间"
width="180"
/>
<el-table-column
3 years ago
prop="eyeType"
3 years ago
label="眼别"
width="180"
/>
<el-table-column
3 years ago
prop="odSph"
3 years ago
label="球镜 DS"
/>
<el-table-column
3 years ago
prop="odCyl"
3 years ago
label="柱镜 DC"
/>
<el-table-column
3 years ago
prop="odAx"
3 years ago
label="轴位 Axis"
/>
<el-table-column
3 years ago
prop="odVa"
3 years ago
label="矫正视力VA"
/>
</el-table>
</div>
</div>
</div>
</template>
<script>
3 years ago
import eventBus from '@/page-subspecialty/utils/eventBus'
3 years ago
import echartsYanya from '@/components/echarts/yanya'
const Base64 = require('js-base64').Base64
export default {
components: {
echartsYanya
},
mixins: [],
props: {
patientIdNumber: {
type: String,
default: ''
},
patientId: {
type: String,
default: ''
},
3 years ago
onlyRead: {
type: Boolean,
default: false
},
date: {
type: String,
default: ''
3 years ago
}
},
inject: ['refresh'],
data() {
return {
3 years ago
checkedShiLi: false,
checkedYanYa: false,
checkedDL: false,
checkedZJ: false,
3 years ago
checked: '',
radio2: '',
value: '',
3 years ago
options: [],
routineData: {},
shiliLast: [],
yanyaLast: []
3 years ago
}
},
watch: {
},
created() {
},
mounted() {
3 years ago
this.getroutineDataData()
3 years ago
},
methods: {
3 years ago
async getroutineDataData() {
const { data: res } = await this.$http.get('/patient/view/getVaAndIopAndRefAndLast', {
3 years ago
params: {
3 years ago
patientId: '797064',
date: '2011-05-21'
// date: this.date
3 years ago
// patientId: this.patientId
}
})
if (res.code === 0) {
3 years ago
this.routineData = res.data
this.shiliLast = res.data.shiliLast || []
this.yanyaLast = res.data.yanyaLast || []
3 years ago
} else {
3 years ago
this.routineData = {}
3 years ago
this.$message.error(res.msg)
}
},
objectSpanMethod({ row, column, rowIndex, columnIndex }) {
if (columnIndex === 0) {
if (rowIndex % 2 === 0) {
return {
rowspan: 2,
colspan: 1
3 years ago
}
3 years ago
} else {
return {
rowspan: 0,
colspan: 0
3 years ago
}
3 years ago
}
}
},
3 years ago
// 添加数据集
addDataList() {
let data = [{
name: '',
odValue: '',
osValue: ''
}]
if (this.checkedShiLi) {
console.log(this.shiliLast[0])
const shili = this.shiliLast[0]
shili.name = '裸眼视力'
shili.odValue = shili.odVan
shili.osValue = shili.osVan
shili.id = 'LY001'
data[0].name = '矫正视力'
data[0].odValue = shili.odVag
data[0].osValue = shili.osVag
data[0].id = 'JZ001'
data = data.concat(this.shiliLast)
}
if (this.checkedYanYa) {
const yanya = this.yanyaLast[0]
yanya.name = '眼压'
yanya.odValue = yanya.odIop
yanya.osValue = yanya.osIop
yanya.id = 'YY001'
data = data.concat(this.yanyaLast)
}
if (this.checkedDL) {
this.routineData.dNyanguang.forEach((item, index) => {
item.name = '电脑验光',
item.id = 'dl' + index,
item.sort = 5
})
data = data.concat(this.routineData.dNyanguang)
}
if (this.checkedZJ) {
this.routineData.zJyanguang.forEach((item, index) => {
item.name = '主觉验光',
item.id = 'zj' + index,
item.sort = 6
})
data = data.concat(this.routineData.zJyanguang)
}
eventBus.$emit('sendForData', data)
3 years ago
},
3 years ago
// 保存常规检查
async saveRoutine() {
const { data: res } = await this.$http.post('/medical/record', {
archiveId: this.currentArchiveList.id,
patientCentreId: this.currentArchiveList.patientCentreId,
patientIdNumber: this.currentArchiveList.patientIdNumber
})
if (res.code === 0) {
} else {
this.$message.error(res.msg)
}
3 years ago
}
}
}
</script>
<style lang="scss" scoped>
.routineBox{
width: 100%;
height: 100%;
padding: 16px;
box-sizing: border-box;
overflow-y: auto;
.header{
width: 100%;
display: flex;
justify-content: space-between;
height: 49px;
line-height: 49px;
padding: 0px 16px;
box-sizing: border-box;
margin-bottom: 32px;
border: 1px solid rgba(0, 0, 0, 0.06);
}
.content{
width: 100%;
//display: flex;
//justify-content: space-between;
box-sizing: border-box;
}
.lineBox{
//width: 48%;
width: 100%;
height: 260px;
padding: 16px;
box-sizing: border-box;
border: 1px solid rgba(0, 0, 0, 0.06);
margin-bottom: 32px;
}
.scroll-echearts {
padding: 5px 0;
flex: 1;
margin-bottom: 16px;
//background: #171515;
border-radius: 4px;
}
.eyeBox{
width: 480px;
height: 180px;
display: flex;
margin-left: 32px;
border: 1px solid rgba(0, 0, 0, 0.06);
.eye{
width: 50%;
display: flex;
flex-direction: column;
div{
height: 45px;
line-height: 45px;
text-align: center;
}
.info{
display: flex;
justify-content: space-between;
padding: 0 14px;
border-top: 1px solid rgba(0, 0, 0, 0.06);
}
3 years ago
.eye_w{
display: inline-block;
width: 80px;
text-align: center;
}
3 years ago
}
.el{
background: rgba(0, 0, 0, 0.04);
}
}
.mr30{
margin-right: 30px;
}
}
</style>
<style lang="scss">
.routineBox{
.el-radio {
margin-right: 15px;
}
}
</style>