Browse Source

眼轴折线图完成,表单增加loading

360view
bianyaqi 2 years ago
parent
commit
b91dbbf536
  1. 4
      public/index.html
  2. 4
      src/mixins/view-module.js
  3. 2
      src/page-subspecialty/views/modules/nurseManagement/reservation/subList/index.vue
  4. 2
      src/page-subspecialty/views/modules/optometryManagement/cornea/index.vue
  5. 5
      src/page-subspecialty/views/modules/optometryManagement/dioptric/index.vue
  6. 212
      src/page-subspecialty/views/modules/optometryManagement/seeDoctor/eyeAxis.vue
  7. 8
      src/page-subspecialty/views/modules/optometryManagement/seeDoctor/index.vue
  8. 69
      src/page-subspecialty/views/modules/optometryManagement/seeDoctor/reviewSum.vue
  9. 2
      src/page-subspecialty/views/modules/outpatientManagement/call/index.vue
  10. 2
      src/page-subspecialty/views/modules/outpatientManagement/treat/index.vue

4
public/index.html

@ -39,8 +39,8 @@
<% if (process.env.VUE_APP_NODE_ENV === 'dev') { %> <% if (process.env.VUE_APP_NODE_ENV === 'dev') { %>
<script> <script>
//http://121.36.16.195:9002/huimu-admin/swagger-ui/index.html //http://121.36.16.195:9002/huimu-admin/swagger-ui/index.html
window.SITE_CONFIG['apiURL'] = 'http://47.110.224.240:8036/xiangan-crf';
// window.SITE_CONFIG['apiURL'] = 'http://192.168.0.168:8036/xiangan-crf';
// window.SITE_CONFIG['apiURL'] = 'http://47.110.224.240:8036/xiangan-crf';
window.SITE_CONFIG['apiURL'] = 'http://192.168.0.168:8036/xiangan-crf';
// window.SITE_CONFIG['apiURL'] = 'http://192.168.4.174:8036/xiangan-crf'; // window.SITE_CONFIG['apiURL'] = 'http://192.168.4.174:8036/xiangan-crf';
</script> </script>
<% } %> <% } %>

4
src/mixins/view-module.js

@ -26,6 +26,7 @@ export default {
page: 1, // 当前页码 page: 1, // 当前页码
limit: 10, // 每页数 limit: 10, // 每页数
total: 0, // 总条数 total: 0, // 总条数
buttonDisabled:false,
dataListLoading: false, // 数据列表,loading状态 dataListLoading: false, // 数据列表,loading状态
dataListSelections: [], // 数据列表,多选项 dataListSelections: [], // 数据列表,多选项
addOrUpdateVisible: false, // 新增/更新,弹窗visible状态 addOrUpdateVisible: false, // 新增/更新,弹窗visible状态
@ -47,6 +48,7 @@ export default {
// 获取数据列表 // 获取数据列表
getDataList() { getDataList() {
this.dataListLoading = true this.dataListLoading = true
this.buttonDisabled = true
let params = { let params = {
page: this.mixinViewModuleOptions.getDataListIsPage ? this.page : null, page: this.mixinViewModuleOptions.getDataListIsPage ? this.page : null,
limit: this.mixinViewModuleOptions.getDataListIsPage ? this.limit : null, limit: this.mixinViewModuleOptions.getDataListIsPage ? this.limit : null,
@ -59,6 +61,7 @@ export default {
} }
).then(({ data: res }) => { ).then(({ data: res }) => {
this.dataListLoading = false this.dataListLoading = false
this.buttonDisabled = false
if (res.code !== 0) { if (res.code !== 0) {
this.dataList = [] this.dataList = []
this.total = 0 this.total = 0
@ -69,6 +72,7 @@ export default {
this.total = this.mixinViewModuleOptions.getDataListIsPage ? res.data.total : 0 this.total = this.mixinViewModuleOptions.getDataListIsPage ? res.data.total : 0
}).catch(() => { }).catch(() => {
this.dataListLoading = false this.dataListLoading = false
this.buttonDisabled = false
}) : '' }) : ''
}, },
dealObjectValue(obj) { dealObjectValue(obj) {

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

@ -85,7 +85,7 @@
>{{ item.label }}</el-button> >{{ item.label }}</el-button>
</div> </div>
</div> </div>
<div class="scheduled-patient-content">
<div v-loading="dataListLoading" class="scheduled-patient-content">
<div> <div>
<el-table <el-table
ref="multipleTable" ref="multipleTable"

2
src/page-subspecialty/views/modules/optometryManagement/cornea/index.vue

@ -41,7 +41,7 @@
</el-button> </el-button>
</div> </div>
</div> </div>
<div class="patient-info-content">
<div v-loading="dataListLoading" class="patient-info-content">
<el-table <el-table
ref="multipleTable" ref="multipleTable"
:data="dataList" :data="dataList"

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

@ -40,7 +40,7 @@
:value="item.value" :value="item.value"
/> />
</el-select> </el-select>
<el-button v-for="(item,index) in typeList" :key="index" :class="[curIndex === index ? 'active' : '']" style="margin-left: 0px" size="small" color="white" @click="handleType(item.value, index)">{{ item.label }}</el-button>
<el-button v-for="(item,index) in typeList" :key="index" :disabled="buttonDisabled" :class="[curIndex === index ? 'active' : '']" style="margin-left: 0px" size="small" color="white" @click="handleType(item.value, index)">{{ item.label }}</el-button>
</div> </div>
<div> <div>
<el-button type="primary" size="small" @click="handleCallSort()">顺呼</el-button> <el-button type="primary" size="small" @click="handleCallSort()">顺呼</el-button>
@ -51,7 +51,7 @@
</el-button> </el-button>
</div> </div>
</div> </div>
<div class="patient-info-content">
<div v-loading="dataListLoading" class="patient-info-content">
<el-table <el-table
ref="multipleTable" ref="multipleTable"
:data="dataList" :data="dataList"
@ -211,6 +211,7 @@ export default {
value: '400', value: '400',
label: '已诊' label: '已诊'
}], }],
disabled: false,
nextVisitTime: [], nextVisitTime: [],
patientTypeList: [], patientTypeList: [],
onlyRead: false, onlyRead: false,

212
src/page-subspecialty/views/modules/optometryManagement/seeDoctor/eyeAxis.vue

@ -0,0 +1,212 @@
<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('hospital/notice/getAllSecDiagInfoByPid', { params: {
patientId: this.patientId
}}).then(res => {
this.loading = false
this.chartData = res.data.data.slAndYzList
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 => {
item.osIol = item.osIol.replace('mm', '')
item.odIol = item.odIol.replace('mm', '')
this.date.push(moment(item.examTime).format('l'))
this.typeList.OD.push([item.examTime, item.odIol])
this.legendData[0] = 'OD'
this.typeList.OS.push([item.examTime, item.osIol])
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>

8
src/page-subspecialty/views/modules/optometryManagement/seeDoctor/index.vue

@ -45,8 +45,8 @@
<el-tab-pane label="复查汇总" name="reviewSum"> <el-tab-pane label="复查汇总" name="reviewSum">
<review-sum v-if="activeName==='reviewSum'" :patient-id="patientId" /> <review-sum v-if="activeName==='reviewSum'" :patient-id="patientId" />
</el-tab-pane> </el-tab-pane>
<el-tab-pane label="眼轴变化图" name="眼轴变化图">
<ok-lens-rgp ref="okLensRgp" :patient-id="patientId" :doctor-list="doctorList" tab-title="LJRJ" />
<el-tab-pane label="眼轴变化图" name="eyeAxis">
<eye-axis v-if="activeName==='eyeAxis'" :patient-id="patientId" :id-name="'eyeAxis'" />
</el-tab-pane> </el-tab-pane>
</el-tabs> </el-tabs>
</div> </div>
@ -58,10 +58,12 @@ import noticeBook from './informBook' // 告知书
import review from './review.vue' // import review from './review.vue' //
import historyFile from './historyRecord.vue' // import historyFile from './historyRecord.vue' //
import okLensRgp from './ok-lens-rgp/index.vue' import okLensRgp from './ok-lens-rgp/index.vue'
import ReviewSum from '@/page-subspecialty/views/modules/optometryManagement/seeDoctor/ok-lens-rgp/reviewSum.vue' // ok
import ReviewSum from '@/page-subspecialty/views/modules/optometryManagement/seeDoctor/reviewSum.vue'
import EyeAxis from '@/page-subspecialty/views/modules/optometryManagement/seeDoctor/eyeAxis.vue' // ok
export default { export default {
components: { components: {
EyeAxis,
ReviewSum, ReviewSum,
firstVisit, firstVisit,
okLensRgp, okLensRgp,

69
src/page-subspecialty/views/modules/optometryManagement/seeDoctor/ok-lens-rgp/reviewSum.vue → src/page-subspecialty/views/modules/optometryManagement/seeDoctor/reviewSum.vue

@ -3,10 +3,10 @@
<head-template> <head-template>
<el-button v-print="'cornealPrint'" size="small">打印</el-button> <el-button v-print="'cornealPrint'" size="small">打印</el-button>
</head-template> </head-template>
<div class="notice-content">
<div v-loading="loading" class="notice-content">
<div class="notice-box"> <div class="notice-box">
<div id="cornealPrint" class="notice_tip" style="page-break-after:always"> <div id="cornealPrint" class="notice_tip" style="page-break-after:always">
<table class="cornealTable">
<table v-if="dataList.length" class="cornealTable">
<tr style="font-weight: bold"> <tr style="font-weight: bold">
<td style="width: 20%">日期</td> <td style="width: 20%">日期</td>
<td>眼别</td> <td>眼别</td>
@ -15,18 +15,24 @@
</tr> </tr>
<template v-for="(item,index) in dataList"> <template v-for="(item,index) in dataList">
<tr :key="index" :class="{success:index%2}"> <tr :key="index" :class="{success:index%2}">
<td rowspan="2">{{ item.date }}</td>
<td rowspan="2">{{ item.examTime }}</td>
<td>OD</td> <td>OD</td>
<td>{{ item.visionOd }}</td>
<td>{{ item.eyeAxisOd }}</td>
<td>{{ item.odVan }}</td>
<td>{{ item.odIol }}</td>
</tr> </tr>
<tr :key="`_${index}`" :class="{success:index%2}"> <tr :key="`_${index}`" :class="{success:index%2}">
<td>OS</td> <td>OS</td>
<td>{{ item.visionOs }}</td>
<td>{{ item.eyeAxisOs }}</td>
<td>{{ item.osVan }}</td>
<td>{{ item.osIol }}</td>
</tr> </tr>
</template> </template>
</table> </table>
<div
v-else
style="height: 100%;background: #fff;display: flex;align-items: center;justify-content: center"
>
<img src="@/assets/img/nodata.png" alt="">
</div>
</div> </div>
</div> </div>
</div> </div>
@ -34,7 +40,7 @@
</template> </template>
<script> <script>
import headTemplate from '@/components/head'
import headTemplate from '@/components/head/index.vue'
export default { export default {
name: 'ReviewSum', name: 'ReviewSum',
components: { components: {
@ -43,39 +49,8 @@ export default {
props: ['patientId'], props: ['patientId'],
data() { data() {
return { return {
dataList: [
{
date: '2022-4-10',
visionOd: '2.0',
visionOs: '2.0',
eyeAxisOd: '2.0',
eyeAxisOs: 'asdf'
}, {
date: '2022-4-10',
visionOd: '2.0',
visionOs: '2.0',
eyeAxisOd: '2.0',
eyeAxisOs: 'asdf'
}, {
date: '2022-4-10',
visionOd: '2.0',
visionOs: '2.0',
eyeAxisOd: '2.0',
eyeAxisOs: 'asdf'
}, {
date: '2022-4-10',
visionOd: '2.0',
visionOs: '2.0',
eyeAxisOd: '2.0',
eyeAxisOs: 'asdf'
}, {
date: '2022-4-10',
visionOd: '2.0',
visionOs: '2.0',
eyeAxisOd: '2.0',
eyeAxisOs: 'asdf'
}
]
dataList: [],
loading: false
} }
}, },
created() { created() {
@ -83,10 +58,12 @@ export default {
}, },
methods: { methods: {
queryReviewSum() { queryReviewSum() {
this.loading = true
this.$http.get('hospital/notice/getAllSecDiagInfoByPid', { params: { this.$http.get('hospital/notice/getAllSecDiagInfoByPid', { params: {
patientld: this.patientId
patientId: this.patientId
}}).then(res => { }}).then(res => {
console.log(res)
this.dataList = res.data.data.slAndYzList
this.loading = false
}) })
} }
} }
@ -94,6 +71,12 @@ export default {
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.empty {
color: #000;
width: 100%;
margin-top: 30px;
text-align: center;
}
.reviewSum{ .reviewSum{
height: 100%; height: 100%;
} }

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

@ -50,7 +50,7 @@
</el-button> </el-button>
</div> </div>
</div> </div>
<div class="patient-info-content">
<div v-loading="dataListLoading" class="patient-info-content">
<el-table <el-table
ref="multipleTable" ref="multipleTable"
:data="dataList" :data="dataList"

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

@ -78,7 +78,7 @@
</el-button> </el-button>
</div> </div>
</div> </div>
<div class="patient-info-content">
<div v-loading="dataListLoading" class="patient-info-content">
<el-table <el-table
ref="multipleTable" ref="multipleTable"
:data="dataList" :data="dataList"

Loading…
Cancel
Save