Browse Source

peter

360view
newPeter7 2 years ago
parent
commit
673072d65a
  1. 2
      src/page-subspecialty/views/modules/optometryManagement/outFocusEye/HIS-add.vue
  2. 211
      src/page-subspecialty/views/modules/optometryManagement/outFocusEye/eyeAxis.vue
  3. 121
      src/page-subspecialty/views/modules/optometryManagement/outFocusEye/index.vue
  4. 275
      src/page-subspecialty/views/modules/optometryManagement/outFocusEye/outDetail.vue
  5. 407
      src/page-subspecialty/views/modules/optometryManagement/outFocusEye/reviewForm.vue
  6. 211
      src/page-subspecialty/views/modules/optometryManagement/outFocusEye/sunAxis.vue

2
src/page-subspecialty/views/modules/optometryManagement/outFocusEye/HIS-add.vue

@ -115,7 +115,7 @@ export default {
},
async doLeadIn() {
this.loading = true
const { data: res } = await this.$http.get('/lenses/doLeadIn', {
const { data: res } = await this.$http.get('/defocused/doLeadIn', {
params: this.dataFormHis
})
if (res.code === 0) {

211
src/page-subspecialty/views/modules/optometryManagement/outFocusEye/eyeAxis.vue

@ -0,0 +1,211 @@
<template>
<div v-loading="loading">
<div :id="idName" ref="yanyaRef" :style="{ height: height, width: width }" />
</div>
</template>
<script>
import moment from 'moment/moment'
export default {
name: 'EyeAxis',
props: {
idName: { type: String, default: 'chart' },
width: { type: String, default: '100%' },
height: { type: String, default: '200px' },
desc: { type: String, default: '眼轴' },
patientId: {
type: String
}
},
data() {
return {
loading: false,
date: [],
typeList: {
OD: [],
OS: [],
typeNull: []
},
chartData: [],
legendData: [],
seriesData: [],
disabled: false
}
},
mounted() {
this.queryAxisData()
},
methods: {
queryAxisData() {
this.loading = true
this.$http.get('/defocused/getSecDefocusedLine', { params: {
patientId: this.patientId
}}).then(res => {
this.loading = false
console.log(res)
this.chartData = res.data.data
this.initFun()
})
},
initFun() {
this.date = []
this.typeList = {
OD: [],
OS: [],
typeNull: []
}
this.legendData = []
this.seriesData = []
if (this.chartData && this.chartData.length > 0) {
this.disabled = false
this.chartData.forEach(item => {
this.date.push(moment(item.checkDate).format('l'))
this.typeList.OD.push([item.checkDate, item.iolOd])
this.legendData[0] = 'OD'
this.typeList.OS.push([item.checkDate, item.iolOs])
this.legendData[1] = 'OS'
})
} else {
this.disabled = true
}
this.$nextTick(() => {
this.visionFun()
})
},
visionFun() {
// domecharts
const yanya = this.$echarts.init(document.getElementById(this.idName))
var colors = ['#4462FF', '#0DB760', '#000000']
Object.keys(this.typeList).forEach((item, index) => {
if (this.typeList[item].length > 0) {
this.seriesData.push({
name: item,
type: 'line',
// stack: index,
data: this.typeList[item],
label: {
show: true,
position: item === 'OD' ? [-25, -30] : [10, -5],
backgroundColor: item === 'OD' ? '#4a6bff' : '#0db760',
padding: [6, 6],
color: '#ffffff',
// color: 'rgba(24, 24, 24, 0.1)',
borderRadius: 10
},
smooth: true,
itemStyle: {
color: colors[index]
},
symbolSize: 10
})
}
})
// domecharts
yanya.setOption({
title: {
text: this.desc,
textStyle: {
'color': '#000000'
},
left: 10
},
tooltip: {
// trigger: 'axis'
backgroundColor: '#ece6e6',
textStyle: {
color: '#000000' //
},
formatter(params) {
return params.seriesName + '<br/>' + params.data[0] + '&nbsp&nbsp&nbsp' + params.data[1]
}
},
legend: {
data: this.legendData,
icon: 'pin',
textStyle: {
color: '#000000'
},
right: 30
},
dataZoom: [
{
type: 'inside',
disabled: this.disabled,
start: 0,
end: 100
}
],
grid: {
top: 55,
left: 50,
right: 50,
bottom: 30,
containLabel: false
},
xAxis: {
type: 'time',
boundaryGap: false,
axisLabel: {
show: true,
showMaxLabel: true,
textStyle: {
color: '#000000'
},
formatter: function(value, index) {
const showD = moment(value).format('YYYY/M/D')
return showD
}
},
axisLine: {
lineStyle: {
color: 'rgba(24, 24, 24, 0.1)'
}
},
// 线
splitLine: {
show: true
}
},
yAxis: {
type: 'value',
min: function(value) { //
return Math.floor(value.min)
},
max: function(value) { //
return Math.ceil(value.max)
},
splitNumber: 1, //
axisLabel: {
show: true,
textStyle: {
color: '#000000'
}
},
axisLine: {
lineStyle: {
color: 'rgba(24, 24, 24, 0.1)'
}
}
},
series: [
...this.seriesData
]
})
//
window.addEventListener('resize', () => { yanya.resize() })
// div
this.$erd.listenTo(this.$refs.yanyaRef, () => {
this.$nextTick(() => {
yanya.resize()
})
})
}
}
}
</script>
<style scoped>
</style>

121
src/page-subspecialty/views/modules/optometryManagement/outFocusEye/index.vue

@ -30,7 +30,10 @@
</el-form-item>
</el-form>
</div>
<div style="display: flex;justify-content: flex-end;background-color: white;padding: 16px 16px 0">
<div style="display: flex;justify-content: space-between;background-color: white;padding: 16px 16px 0">
<div>
<el-button v-for="(item,index) in typeList" :key="index" :class="[curIndex === index ? 'active' : '']" style="margin-left: 0" size="small" color="white" @click="handleType(item.value, index)">{{ item.label }}</el-button>
</div>
<div>
<el-button type="primary" size="small" @click="HISHandle">
<svg-icon icon-class="icon-HIS-up" style="font-size:12px;" />
@ -38,7 +41,7 @@
</el-button>
</div>
</div>
<div class="patient-info-content">
<div v-loading="dataListLoading" class="patient-info-content">
<el-table
ref="multipleTable"
:data="dataList"
@ -48,12 +51,52 @@
>
<el-table-column prop="patientId" label="登记号 " header-align="center" align="center" />
<el-table-column prop="patientName" label="患者姓名" header-align="center" align="center" />
<el-table-column prop="brand" label="品牌" header-align="center" align="center">
<template slot-scope="scope">
<div v-if="scope.row.brandEyeTypeList && scope.row.brandEyeTypeList.length">
<span class="odType">{{ scope.row.brandEyeTypeList[0]. brand }}</span>/
<span class="osType">{{ scope.row.brandEyeTypeList[1].brand }}</span>
</div>
</template>
</el-table-column>
<el-table-column prop="eyeType" label="眼别" header-align="center" align="center">
<template slot-scope="scope">
<div v-if="scope.row.brandEyeTypeList && scope.row.brandEyeTypeList.length">
<span class="odType">{{ scope.row.brandEyeTypeList[0].eyeType }}</span>/
<span class="osType">{{ scope.row.brandEyeTypeList[1].eyeType }}</span>
</div>
</template>
</el-table-column>
<el-table-column prop="patientSex" label="患者性别" header-align="center" align="center" />
<el-table-column label="出生日期" header-align="center" align="center">
<template slot-scope="scope">
{{ scope.row.patientBirthday ? $options.filters.dateFilterTwo( scope.row.patientBirthday): '- ' }}
</template>
</el-table-column>
<el-table-column prop="doctor" label="负责医生" header-align="center" align="center">
<template slot-scope="scope">
<el-select v-model="scope.row.doctorName" class="eyeType" placeholder="" size="small" @change="value=>changeDoctor(value,scope.row,1)">
<el-option
v-for="item in doctorList"
:key="item.employeeId"
:label="item.realName"
:value="item.employeeId"
/>
</el-select>
</template>
</el-table-column>
<el-table-column prop="opDoctor" label="验配师" header-align="center" align="center">
<template slot-scope="scope">
<el-select v-model="scope.row.ypName" class="eyeType" placeholder="" size="small" @change="value=>changeDoctor(value,scope.row)">
<el-option
v-for="item in doctorList"
:key="item.employeeId"
:label="item.realName"
:value="item.employeeId"
/>
</el-select>
</template>
</el-table-column>
<el-table-column prop="operation" label="操作" header-align="center" align="center">
<template slot-scope="scope">
<span
@ -71,7 +114,7 @@
<add-or-update v-if="addOrUpdateVisible" ref="addOrUpdate" @refreshDataList="getDataListInitial" />
<!-- HIS引入弹框 -->
<his-add v-if="HisAddVisible" ref="HisAddRef" />
<out-detail v-if="detailViewVisible" :is-search="'3'" :patient-id="patientId"></out-detail>
<out-detail v-if="detailViewVisible" :is-search="'3'" :patient-id="patientId" />
</template>
</div>
</template>
@ -93,8 +136,7 @@ export default {
data() {
return {
mixinViewModuleOptions: {
getDataListURL: '/lenses/page',
// getDataListURL: '/patient/page',
getDataListURL: '/defocused/page',
getDataListIsPage: true
},
nextVisitTime: [],
@ -108,15 +150,32 @@ export default {
// searchType: '0',
patientName: '',
patientStatus: '',
patientIdNumber: ''
patientIdNumber: '',
nextCheckFlag: ''
},
doctorList: [],
typeList: [
{
value: '',
label: '全部'
}, {
value: '1',
label: '待查'
}, {
value: '3',
label: '今日已诊'
}, {
value: '2',
label: '超时'
}],
curIndex: 0,
addGroupVisible: false,
patientId: '',
patientIdNumber: '',
detailId: ''
patientIdNumber: ''
}
},
created() {
this.getDoctorList()
},
methods: {
reFresh() {
@ -137,6 +196,26 @@ export default {
// }
// })
},
handleType(value, index) {
this.curIndex = index
this.dataForm.nextCheckFlag = value
this.getDataListInitial()
},
//
changeDoctor(value, scopeRow, type) {
const params = {}
params.id = scopeRow.id
// let ypCode = ''
// let doctorCode = ''
if (type) {
params.doctorCode = value
} else {
params.ypCode = value
}
this.$http.post('/defocused/updateDoctorInfo', params).then(res => {
this.getDataList()
})
},
//
dateChange(e) {
this.dataForm.beginDate = e ? e[0] : ''
@ -149,6 +228,12 @@ export default {
this.$nextTick(() => {
this.$refs.HisAddRef.init()
})
},
//
getDoctorList(val) {
this.$http.get('/sys/user').then(res => {
this.doctorList = res.data.data
})
}
}
}
@ -167,6 +252,15 @@ export default {
.patient-info-content {
padding: 16px;
margin-bottom: 45px;
::v-deep .el-input__suffix{
display: none;
}
::v-deep .el-input__inner{
border: 0;
font-size: 16px;
text-align: center;
padding: 0;
}
}
.patient-info-head {
margin-bottom: 16px;
@ -176,6 +270,12 @@ export default {
.operation-details {
cursor: pointer;
}
.odType{
color: #409EFF;
}
.osType{
color: #67C23A;
}
}
</style>
<style lang="scss">
@ -229,5 +329,10 @@ export default {
background: #0c1016;
padding: 0;
}
.active{
color: #3ea3f6;
background-color: #e0f2fd;
border-color: #3ea3f6;
}
}
</style>

275
src/page-subspecialty/views/modules/optometryManagement/outFocusEye/outDetail.vue

@ -22,119 +22,132 @@
<div class="see-docto-right">
<el-tabs v-model="activeName" type="card" @tab-click="TabClick">
<el-tab-pane label="初诊" name="1">
<div style="display: flex;justify-content: flex-end;margin-bottom: 16px">
<el-button type="primary" size="small" @click="saveFirstForm()">保存</el-button>
</div>
<el-table
:data="tableData5"
:default-expand-all="true"
:data="tableData"
:span-method="objectSpanMethod"
style="width: 100%"
>
<el-table-column
label="初诊信息"
width="180"
prop="id"
/>
width="220"
align="center"
>
<template slot-scope="scope">
日期
<el-date-picker
style="width: 140px"
v-model="firstForm.checkDate"
value-format="yyyy-MM-dd"
type="date"
placeholder="选择日期"
/>
</template>
</el-table-column>
<el-table-column
width="100"
align="center"
label="眼别"
prop="name"
/>
<el-table-column
align="center"
label="球镜"
prop="desc"
/>
>
<template slot-scope="scope">
<el-input v-if="scope.row.ds === '右眼'" v-model="firstForm.dsOd" placeholder="" />
<el-input v-if="scope.row.ds === '左眼'" v-model="firstForm.dsOs" placeholder="" />
</template>
</el-table-column>
<el-table-column
label="柱镜"
prop="desc"
/>
align="center"
>
<template slot-scope="scope">
<el-input v-if="scope.row.dc === '右眼'" v-model="firstForm.dcOd" placeholder="" />
<el-input v-if="scope.row.dc === '左眼'" v-model="firstForm.dcOs" placeholder="" />
</template>
</el-table-column>
<el-table-column
label="轴向"
prop="desc"
/>
align="center"
>
<template slot-scope="scope">
<el-input v-if="scope.row.a === '右眼'" v-model="firstForm.aod" placeholder="" />
<el-input v-if="scope.row.a === '左眼'" v-model="firstForm.aos" placeholder="" />
</template>
</el-table-column>
<el-table-column
label="矫正视力"
prop="desc"
/>
align="center"
>
<template slot-scope="scope">
<el-input v-if="scope.row.va === '右眼'" v-model="firstForm.vaOd" placeholder=""/>
<el-input v-if="scope.row.va === '左眼'" v-model="firstForm.vaOs" placeholder=""/>
</template>
</el-table-column>
<el-table-column
label="瞳距"
prop="desc"
/>
align="center"
>
<template slot-scope="scope">
<el-input v-if="scope.row.pd === '右眼'" v-model="firstForm.pdOd" placeholder="" />
<el-input v-if="scope.row.pd === '左眼'" v-model="firstForm.pdOs" placeholder="" />
</template>
</el-table-column>
<el-table-column
label="瞳高"
prop="desc"
/>
align="center"
>
<template slot-scope="scope">
<el-input v-if="scope.row.ph === '右眼'" v-model="firstForm.phOd" placeholder="" />
<el-input v-if="scope.row.ph === '左眼'" v-model="firstForm.phOs" placeholder="" />
</template>
</el-table-column>
<el-table-column
label="眼轴"
prop="desc"
/>
align="center"
>
<template slot-scope="scope">
<el-input v-if="scope.row.iol === '右眼'" v-model="firstForm.iolOd" placeholder="" />
<el-input v-if="scope.row.iol === '左眼'" v-model="firstForm.iolOs" placeholder="" />
</template>
</el-table-column>
<el-table-column
label="备注"
prop="desc"
/>
width="160"
align="center"
>
<template slot-scope="scope">
<el-input type="textarea" :rows="3" v-model="firstForm.remark" placeholder="" />
</template>
</el-table-column>
</el-table>
</el-tab-pane>
<el-tab-pane label="复诊" name="2">
<el-table
:data="tableData5"
:default-expand-all="true"
:span-method="objectSecondMethod"
style="width: 100%"
>
<el-table-column
label="复诊信息"
width="180"
prop="id"
/>
<el-table-column
label="眼别"
prop="name"
/>
<el-table-column
label="球镜"
prop="desc"
/>
<el-table-column
label="柱镜"
prop="desc"
/>
<el-table-column
label="轴向"
prop="desc"
/>
<el-table-column
label="矫正视力"
prop="desc"
/>
<el-table-column
label="瞳距"
prop="desc"
/>
<el-table-column
label="瞳高"
prop="desc"
/>
<el-table-column
label="眼轴"
prop="desc"
/>
<el-table-column
label="联合光度"
prop="desc"
/>
<el-table-column
label="备注"
prop="desc"
/>
</el-table>
<reviewForm v-if="activeName==='2'" :patient-id="patientId"></reviewForm>
</el-tab-pane>
<el-tab-pane label="眼轴折线图" name="3">
<eye-axis v-if="activeName==='3'" :patient-id="patientId" :id-name="'eyeAxis'" />
<div style="margin-top: 32px">
<sun-axis v-if="activeName==='3'" :patient-id="patientId" :id-name="'sunAxis'" />
</div>
</el-tab-pane>
</el-tabs>
</div>
</div>
</template>
<script>
import eyeAxis from './eyeAxis'
import sunAxis from './sunAxis'
import reviewForm from './reviewForm'
export default {
components: {
eyeAxis,
sunAxis,
reviewForm
},
props: {
patientId: {
@ -152,33 +165,59 @@ export default {
},
data() {
return {
tableData5: [{
id: '日期:2023.07.03',
name: '左眼',
category: '江浙小吃',
desc: '1.2',
address: '上海市',
shop: '王小虎',
shopId: '10333'
tableData: [
{
checkDate: '',
name: '右眼',
ds: '右眼',
dc: '右眼',
iol: '右眼',
pd: '右眼',
ph: '右眼',
va: '右眼',
a: '右眼',
remark: ''
},
{
checkDate: '',
name: '左眼',
ds: '左眼',
dc: '左眼',
iol: '左眼',
pd: '左眼',
ph: '左眼',
va: '左眼',
a: '左眼',
remark: ''
}
],
firstForm: {
patientId: '',
checkDate: '',
dcOd: '',
dcOs: '',
dsOd: '',
dsOs: '',
iolOd: '',
iolOs: '',
pdOd: '',
pdOs: '',
phOd: '',
phOs: '',
remark: '',
vaOd: '',
vaOs: '',
aod: '',
aos: ''
},
{
id: '日期',
name: '右眼',
category: '江浙小吃',
desc: '1.5',
address: '上海市路',
shop: '王小虎',
shopId: '10333'
}],
patientInfo: [],
patientInfoObj: {},
activeName: '1',
pageParams: {}
activeName: '1'
}
},
mounted() {
},
created() {
this.getFirstForm()
this.getPatientInfo()
},
methods: {
@ -201,21 +240,6 @@ export default {
}
}
},
objectSecondMethod({ row, column, rowIndex, columnIndex }) {
if (columnIndex === 0 || columnIndex === 10) {
if (rowIndex % 2 === 0) {
return {
rowspan: 2,
colspan: 1
}
} else {
return {
rowspan: 0,
colspan: 0
}
}
}
},
//
async getPatientInfo() {
this.$http.get('/patient/getPatientInfo', {
@ -230,10 +254,37 @@ export default {
}
}).catch(() => {})
},
async getFirstForm() {
this.firstForm.patientId = this.patientId
this.$http.get('/defocused/getFirstDefocused', {
params: {
patientId: this.patientId
}
}).then(({ data: res }) => {
if (res.code !== 0) {
return this.$message.error(res.msg)
} else {
this.firstForm = res.data
}
}).catch(() => {})
},
saveFirstForm() {
this.$http.post('/defocused/saveOrUpdateFirstDefocused', this.firstForm).then(({ data: res }) => {
if (res.code !== 0) {
return this.$message.error(res.msg)
}
this.$message({
message: this.$t('prompt.success'),
type: 'success',
duration: 500,
onClose: () => {
this.getFirstForm()
}
})
}).catch(() => {})
},
TabClick(tab, event) {
if (tab.name === 'okLensRgp') {
this.$refs.okLensRgp.init()
}
}
}
}

407
src/page-subspecialty/views/modules/optometryManagement/outFocusEye/reviewForm.vue

@ -0,0 +1,407 @@
<template>
<div class="reviewContain">
<div class="reviewLeft">
<div class="content-top">
<div v-for="(item, index) in formList" :key="index" class="formBox" :class="[index === curIndex ? 'active' : '']" @click="handleForm(index, item)">
<div style="display: flex;padding: 2px 0">
<p :class="[index === curIndex ? 'activeFont' : 'curFont']">{{ item.checkDate }}</p>
<i v-if="index === curIndex" style="margin-top: 5px;color: rgb(199,5,5);margin-left: 12px" class="el-icon-delete" @click="deleteForm(item.id)" />
</div>
</div>
<img v-if="!formList.length" src="@/assets/img/nodata.png" alt="" class="nodata">
</div>
<div class="content-bottom">
<div class="commonForm-text">
<span>常用表单</span>
<span class="line" />
</div>
<div class="record">
<p>离焦眼镜复查单</p>
<img :src="require('@/assets/img/add.png')" alt="" @click="addRecord()">
</div>
</div>
</div>
<div class="reviewRight">
<div v-if="formList.length">
<div style="display: flex;justify-content: flex-end;margin-bottom: 16px">
<el-button type="primary" size="small" @click="saveSecondForm()">保存</el-button>
</div>
<el-table
:data="tableData"
:span-method="objectSecondMethod"
style="width: 100%"
>
<el-table-column
label="复诊记录"
width="220"
align="center"
>
<template slot-scope="scope">
日期
<el-date-picker
v-model="secondForm.checkDate"
style="width: 140px"
value-format="yyyy-MM-dd"
type="date"
placeholder="选择日期"
/>
<!-- <el-input v-model="secondForm.checkDate" placeholder="" style="width: 100px" />-->
</template>
</el-table-column>
<el-table-column
width="100"
align="center"
label="眼别"
prop="name"
/>
<el-table-column
align="center"
label="球镜"
>
<template slot-scope="scope">
<el-input v-if="scope.row.ds === '右眼'" v-model="secondForm.dsOd" placeholder="" />
<el-input v-if="scope.row.ds === '左眼'" v-model="secondForm.dsOs" placeholder="" />
</template>
</el-table-column>
<el-table-column
label="柱镜"
align="center"
>
<template slot-scope="scope">
<el-input v-if="scope.row.dc === '右眼'" v-model="secondForm.dcOd" placeholder="" />
<el-input v-if="scope.row.dc === '左眼'" v-model="secondForm.dcOs" placeholder="" />
</template>
</el-table-column>
<el-table-column
label="轴向"
align="center"
>
<template slot-scope="scope">
<el-input v-if="scope.row.a === '右眼'" v-model="secondForm.aod" placeholder="" />
<el-input v-if="scope.row.a === '左眼'" v-model="secondForm.aos" placeholder="" />
</template>
</el-table-column>
<el-table-column
label="矫正视力"
align="center"
>
<template slot-scope="scope">
<el-input v-if="scope.row.va === '右眼'" v-model="secondForm.vaOd" placeholder="" />
<el-input v-if="scope.row.va === '左眼'" v-model="secondForm.vaOs" placeholder="" />
</template>
</el-table-column>
<el-table-column
label="戴镜视力"
align="center"
>
<template slot-scope="scope">
<el-input v-if="scope.row.vag === '右眼'" v-model="secondForm.vagOd" placeholder="" />
<el-input v-if="scope.row.vag === '左眼'" v-model="secondForm.vagOs" placeholder="" />
</template>
</el-table-column>
<el-table-column
label="眼轴"
align="center"
>
<template slot-scope="scope">
<el-input v-if="scope.row.iol === '右眼'" v-model="secondForm.iolOd" placeholder="" />
<el-input v-if="scope.row.iol === '左眼'" v-model="secondForm.iolOs" placeholder="" />
</template>
</el-table-column>
<el-table-column
label="联合光度"
align="center"
>
<template slot-scope="scope">
<el-input v-if="scope.row.lhgd === '右眼'" v-model="secondForm.lhgdOd" placeholder="" />
<el-input v-if="scope.row.lhgd === '左眼'" v-model="secondForm.lhgdOs" placeholder="" />
</template>
</el-table-column>
<el-table-column
label="下次复诊时间"
align="center"
width="150"
>
<template slot-scope="scope">
<el-date-picker
v-model="secondForm.nextCheckDate"
style="width: 140px"
value-format="yyyy-MM-dd"
type="date"
placeholder="选择日期"
/>
</template>
</el-table-column>
<el-table-column
label="备注"
width="130"
align="center"
>
<template slot-scope="scope">
<el-input v-model="secondForm.remark" type="textarea" :rows="3" placeholder="" />
</template>
</el-table-column>
</el-table>
</div>
</div>
</div>
</template>
<script>
export default {
props: {
patientId: {
type: String,
default: ''
}
},
data() {
return {
tableData: [
{
checkDate: '',
nextCheckDate: '',
name: '右眼',
ds: '右眼',
dc: '右眼',
iol: '右眼',
lhgd: '右眼',
vag: '右眼',
va: '右眼',
a: '右眼',
remark: ''
},
{
checkDate: '',
nextCheckDate: '',
name: '左眼',
ds: '左眼',
dc: '左眼',
iol: '左眼',
lhgd: '左眼',
vag: '左眼',
va: '左眼',
a: '左眼',
remark: ''
}
],
secondForm: {
patientId: '',
checkDate: '',
nextCheckDate: '',
dcOd: '',
dcOs: '',
dsOd: '',
dsOs: '',
iolOd: '',
iolOs: '',
lhgdOd: '',
lhgdOs: '',
vagOd: '',
vagOs: '',
remark: '',
vaOd: '',
vaOs: '',
aod: '',
aos: ''
},
id: '',
curIndex: 0,
formList: []
}
},
mounted() {
this.getFormList()
},
methods: {
objectSecondMethod({ row, column, rowIndex, columnIndex }) {
if (columnIndex === 0 || columnIndex === 9 || columnIndex === 10) {
if (rowIndex % 2 === 0) {
return {
rowspan: 2,
colspan: 1
}
} else {
return {
rowspan: 0,
colspan: 0
}
}
}
},
saveSecondForm() {
this.secondForm.patientId = this.patientId
this.$http.post('/defocused/saveOrUpdateSecondDefocused', this.secondForm).then(({ data: res }) => {
if (res.code !== 0) {
return this.$message.error(res.msg)
}
this.$message({
message: this.$t('prompt.success'),
type: 'success',
duration: 500,
onClose: () => {
this.getSecondForm()
}
})
}).catch(() => {})
},
async getSecondForm() {
this.$http.get('/defocused/getSecondDefocused', {
params: {
id: this.id
}
}).then(({ data: res }) => {
if (res.code !== 0) {
return this.$message.error(res.msg)
} else {
this.secondForm = res.data
}
}).catch(() => {})
},
async getFormList() {
const { data: res } = await this.$http.get('/defocused/getAllSecDefocusedByPid', {
params: {
patientId: this.patientId
}
})
if (res.code === 0) {
this.formList = res.data || []
if (this.formList.length) {
this.id = this.formList[0].id
this.secondForm = this.formList[0]
}
} else {
this.$message.error(res.msg)
}
},
handleForm(index, item) {
this.curIndex = index
this.id = item.id
this.secondForm = item
},
async addRecord() {
const params = {
patientId: this.patientId
}
const { data: res } = await this.$http.post('/defocused/saveOrUpdateSecondDefocused', params)
if (res.code === 0) {
await this.getFormList()
this.$message.success('新增成功')
} else {
this.$message.error(res.msg)
}
},
deleteForm(id) {
const params = {
id: id
}
this.$confirmFun('你确定要删除吗?').then(async() => {
const { data: res } = await this.$http.post('/defocused/delSecDefocusedById', params)
if (res.code === 0) {
this.$message.success('删除成功')
await this.getFormList()
} else {
this.$message.error(res.msg)
}
})
}
}
}
</script>
<style lang="scss" scoped>
.reviewContain {
width: 100%;
height: 100%;
display: flex;
.reviewLeft{
width: 180px;
height: 100%;
margin-right: 16px;
.content-top, .content-bottom{
height: 50%;
overflow-y: auto;
}
.content-bottom {
.commonForm-text {
display: flex;
align-items: center;
font-size: 14px;
font-weight: 700;
}
.line {
border-bottom: 1px solid #e5e6eb;
flex: 1;
display: inline-block;
margin: 0 10px;
}
.record{
display: flex;
justify-content: space-between;
padding-top: 12px;
cursor: pointer;
p {
display: inline-block;
font-size: 14px;
color: rgba(0, 0, 0, 0.85);
letter-spacing: 1px;
}
img {
width: 16px;
height: 16px;
margin-top: 3px;
}
}
}
.formBox{
display: flex;
justify-content: space-between;
cursor: pointer;
padding: 2px 8px;
border-radius: 2px;
margin-top: 12px;
}
.active {
color: white;
background-color: #1C76FD;
}
.curFont {
color: #A6A4A4;
}
.activeFont {
color: #D9D9D9;
}
.nodata {
width: 200px;
margin-top: 50px;
}
}
.reviewRight{
flex: 1;
//background-color: #ececf1;
}
.review-head {
display: flex;
justify-content: space-between;
padding-bottom: 16px;
}
.review-content {
width: 100%;
height: calc( 100vh - 50px - 32px - 42px - 48px - 15px);
padding: 16px;
background: #ffffff;
overflow-x: auto;
}
.vision{
display: inline-block;
width: 24px;
height: 24px;
line-height: 24px;
border-radius: 50%;
text-align: center;
color: #1E79FF;
font-weight: 600;
margin-right: 8px;
background-color: #EBF6FF;
}
}
</style>

211
src/page-subspecialty/views/modules/optometryManagement/outFocusEye/sunAxis.vue

@ -0,0 +1,211 @@
<template>
<div v-loading="loading">
<div :id="idName" ref="yanyaRef" :style="{ height: height, width: width }" />
</div>
</template>
<script>
import moment from 'moment/moment'
export default {
name: 'sunAxis',
props: {
idName: { type: String, default: 'chart' },
width: { type: String, default: '100%' },
height: { type: String, default: '200px' },
desc: { type: String, default: '联合光度' },
patientId: {
type: String
}
},
data() {
return {
loading: false,
date: [],
typeList: {
OD: [],
OS: [],
typeNull: []
},
chartData: [],
legendData: [],
seriesData: [],
disabled: false
}
},
mounted() {
this.queryAxisData()
},
methods: {
queryAxisData() {
this.loading = true
this.$http.get('/defocused/getSecDefocusedLine', { params: {
patientId: this.patientId
}}).then(res => {
this.loading = false
console.log(res)
this.chartData = res.data.data
this.initFun()
})
},
initFun() {
this.date = []
this.typeList = {
OD: [],
OS: [],
typeNull: []
}
this.legendData = []
this.seriesData = []
if (this.chartData && this.chartData.length > 0) {
this.disabled = false
this.chartData.forEach(item => {
this.date.push(moment(item.checkDate).format('l'))
this.typeList.OD.push([item.checkDate, item.lhgdOd])
this.legendData[0] = 'OD'
this.typeList.OS.push([item.checkDate, item.lhgdOs])
this.legendData[1] = 'OS'
})
} else {
this.disabled = true
}
this.$nextTick(() => {
this.visionFun()
})
},
visionFun() {
// domecharts
const yanya = this.$echarts.init(document.getElementById(this.idName))
var colors = ['#4462FF', '#0DB760', '#000000']
Object.keys(this.typeList).forEach((item, index) => {
if (this.typeList[item].length > 0) {
this.seriesData.push({
name: item,
type: 'line',
// stack: index,
data: this.typeList[item],
label: {
show: true,
position: item === 'OD' ? [-25, -30] : [10, -5],
backgroundColor: item === 'OD' ? '#4a6bff' : '#0db760',
padding: [6, 6],
color: '#ffffff',
// color: 'rgba(24, 24, 24, 0.1)',
borderRadius: 10
},
smooth: true,
itemStyle: {
color: colors[index]
},
symbolSize: 10
})
}
})
// domecharts
yanya.setOption({
title: {
text: this.desc,
textStyle: {
'color': '#000000'
},
left: 10
},
tooltip: {
// trigger: 'axis'
backgroundColor: '#ece6e6',
textStyle: {
color: '#000000' //
},
formatter(params) {
return params.seriesName + '<br/>' + params.data[0] + '&nbsp&nbsp&nbsp' + params.data[1]
}
},
legend: {
data: this.legendData,
icon: 'pin',
textStyle: {
color: '#000000'
},
right: 30
},
dataZoom: [
{
type: 'inside',
disabled: this.disabled,
start: 0,
end: 100
}
],
grid: {
top: 55,
left: 50,
right: 50,
bottom: 30,
containLabel: false
},
xAxis: {
type: 'time',
boundaryGap: false,
axisLabel: {
show: true,
showMaxLabel: true,
textStyle: {
color: '#000000'
},
formatter: function(value, index) {
const showD = moment(value).format('YYYY/M/D')
return showD
}
},
axisLine: {
lineStyle: {
color: 'rgba(24, 24, 24, 0.1)'
}
},
// 线
splitLine: {
show: true
}
},
yAxis: {
type: 'value',
min: function(value) { //
return Math.floor(value.min)
},
max: function(value) { //
return Math.ceil(value.max)
},
splitNumber: 1, //
axisLabel: {
show: true,
textStyle: {
color: '#000000'
}
},
axisLine: {
lineStyle: {
color: 'rgba(24, 24, 24, 0.1)'
}
}
},
series: [
...this.seriesData
]
})
//
window.addEventListener('resize', () => { yanya.resize() })
// div
this.$erd.listenTo(this.$refs.yanyaRef, () => {
this.$nextTick(() => {
yanya.resize()
})
})
}
}
}
</script>
<style scoped>
</style>
Loading…
Cancel
Save