Browse Source

peter

360view
newPeter7 2 years ago
parent
commit
bd9b31d1ce
  1. 211
      src/components/360View/commonForm/optometryForm.vue
  2. 2
      src/components/360View/commonForm/threeVision.vue

211
src/components/360View/commonForm/optometryForm.vue

@ -13,12 +13,11 @@
验光报告单 验光报告单
</p> </p>
<div style="display: flex;justify-content: space-around"> <div style="display: flex;justify-content: space-around">
<span>登记号<el-input v-model="dataForm.patientId" style="width: 80px" size="small" clearable placeholder="" /></span>
<span>姓名<el-input v-model="dataForm.patientName" style="width: 80px" size="small" clearable placeholder="" /></span>
<span>性别<el-input v-model="dataForm.patientSex" style="width: 60px" size="small" clearable placeholder="" /></span>
<span>年龄<el-input v-model="dataForm.patientAge" style="width: 60px" size="small" clearable placeholder="" /></span>
<span>屈光发育档案<el-input v-model="dataForm.file" style="width: 60px" size="small" clearable placeholder="" /></span>
<span>档案号<el-input v-model="dataForm.fileNUm" style="width: 80px" size="small" clearable placeholder="" /></span>
<span>登记号<el-input v-model="dataForm.patientId" style="width: 80px" clearable placeholder="" /></span>
<span>姓名<el-input v-model="dataForm.patientName" style="width: 80px" clearable placeholder="" /></span>
<span>性别<el-input v-model="dataForm.patientSex" style="width: 60px" clearable placeholder="" /></span>
<span>年龄<el-input v-model="dataForm.patientAge" style="width: 60px" clearable placeholder="" /></span>
<span>屈光发育档案<el-input v-model="dataForm.file" style="width: 60px" clearable placeholder="" /></span>
</div> </div>
<div class="operation-record-table"> <div class="operation-record-table">
<el-table :data="tableData" :span-method="objectSpanMethod" border style="width: 100%; margin-top: 5px"> <el-table :data="tableData" :span-method="objectSpanMethod" border style="width: 100%; margin-top: 5px">
@ -29,11 +28,6 @@
瞳孔 瞳孔
</div> </div>
</div> </div>
<div v-else-if="scope.row.name == 2">
<div class="width-180 center">
检查方法
</div>
</div>
<div v-else-if="scope.row.name == 3"> <div v-else-if="scope.row.name == 3">
<div class="width-180 center"> <div class="width-180 center">
右眼 右眼
@ -49,11 +43,11 @@
右眼 右眼
</div> </div>
</div> </div>
<div v-else-if="scope.row.name == 6">
<div class="width-180 center">
左眼
</div>
</div>
<!-- <div v-else-if="scope.row.name == 6">-->
<!-- <div class="width-180 center">-->
<!-- 左眼-->
<!-- </div>-->
<!-- </div>-->
<div v-else-if="scope.row.name == 7" style="display: flex;justify-content: space-between"> <div v-else-if="scope.row.name == 7" style="display: flex;justify-content: space-between">
<div class="width-180" style="text-align: left"> <div class="width-180" style="text-align: left">
<span style="display: inline-block;margin-top: 16px">视光师:</span> <span style="display: inline-block;margin-top: 16px">视光师:</span>
@ -75,6 +69,12 @@
<div v-else-if="scope.row.name == '最终处方'"> <div v-else-if="scope.row.name == '最终处方'">
<div class="width-180 center" @click="copyData"> <div class="width-180 center" @click="copyData">
<el-button type="text" plain style="font-size: 14px">最终处方</el-button> <el-button type="text" plain style="font-size: 14px">最终处方</el-button>
<div style="display: flex;flex-wrap: wrap">
<div v-for="(item,index) in scope.row.value" :key="index" class="check" @click="item.isSelect = !item.isSelect" style="margin-left: 8px">
<input type="checkbox" :checked="item.isSelect">
<div>{{ item.name }}</div>
</div>
</div>
</div> </div>
</div> </div>
<p v-else>{{ scope.row.name }}</p> <p v-else>{{ scope.row.name }}</p>
@ -96,24 +96,6 @@
</div> </div>
</div> </div>
</div> </div>
<div v-if="scope.row.name == '2'">
<div class="width-180">
<div style="display: flex;flex-wrap: wrap">
<el-select v-model="scope.row.value" multiple placeholder="请选择">
<el-option
v-for="item in scope.row.examine"
:key="item.id"
:label="item.name"
:value="item.name"
/>
</el-select>
<!-- <div v-for="(item,index) in scope.row.examine" :key="index" class="check" @click="item.isSelect = !item.isSelect">-->
<!-- <input type="checkbox" :checked="item.isSelect">-->
<!-- <div>{{ item.name }}</div>-->
<!-- </div>-->
</div>
</div>
</div>
<div v-if="scope.row.name == '3'"> <div v-if="scope.row.name == '3'">
<div class="width-100 center"> <div class="width-100 center">
<el-input v-model="scope.row.a" placeholder="" /> <el-input v-model="scope.row.a" placeholder="" />
@ -129,28 +111,14 @@
<el-input v-model="scope.row.a" placeholder="" /> <el-input v-model="scope.row.a" placeholder="" />
</div> </div>
</div> </div>
<div v-if="scope.row.name == '6'">
<div class="width-100 center">
<el-input v-model="scope.row.a" placeholder="" />
</div>
</div>
<div v-if="scope.row.name == '基本信息'"> <div v-if="scope.row.name == '基本信息'">
<div class="width-100 center"> <div class="width-100 center">
裸眼视力 裸眼视力
</div> </div>
</div> </div>
<div v-if="scope.row.name == '最终处方'"> <div v-if="scope.row.name == '最终处方'">
<div class="width-100">
<div style="display: flex;flex-wrap: wrap">
<div v-for="(item,index) in scope.row.value" :key="index" class="check" @click="item.isSelect = !item.isSelect">
<input type="checkbox" :checked="item.isSelect">
<div>{{ item.name }}</div>
</div>
</div>
<!-- <el-checkbox-group v-model="scope.row.value">-->
<!-- <el-checkbox label="远用" />-->
<!-- <el-checkbox label="近用" />-->
<!-- </el-checkbox-group>-->
<div class="width-100 center" style="text-align: center">
左眼
</div> </div>
</div> </div>
<div v-if="scope.row.name == '配镜建议'"> <div v-if="scope.row.name == '配镜建议'">
@ -162,14 +130,14 @@
</div> </div>
</div> </div>
<p style="margin-left: 16px"> <p style="margin-left: 16px">
<el-input v-model="scope.row.value" placeholder="" style="width: 180px">
<el-input v-model="scope.row.value" placeholder="" style="width: 280px">
<template slot="prepend">其他:</template> <template slot="prepend">其他:</template>
</el-input> </el-input>
</p> </p>
</div> </div>
</div> </div>
<div v-if="scope.row.name == '备注'"> <div v-if="scope.row.name == '备注'">
<div class="width-180">
<div>
<el-input v-model="scope.row.value" placeholder="" /> <el-input v-model="scope.row.value" placeholder="" />
</div> </div>
</div> </div>
@ -187,6 +155,11 @@
球镜(DS) 球镜(DS)
</div> </div>
</div> </div>
<div v-if="scope.row.name == '1'">
<div class="width-180 center">
检查方法
</div>
</div>
<div v-if="scope.row.name == '3'"> <div v-if="scope.row.name == '3'">
<div class="width-100 center"> <div class="width-100 center">
<el-input v-model="scope.row.b" placeholder="" /> <el-input v-model="scope.row.b" placeholder="" />
@ -202,22 +175,11 @@
<el-input v-model="scope.row.b" placeholder="" /> <el-input v-model="scope.row.b" placeholder="" />
</div> </div>
</div> </div>
<div v-if="scope.row.name == '6'">
<div v-if="scope.row.name == '最终处方'">
<div class="width-100 center"> <div class="width-100 center">
<el-input v-model="scope.row.b" placeholder="" />
<el-input v-model="scope.row.a" placeholder="" />
</div> </div>
</div> </div>
<!-- <div v-if="scope.row.name == '最终处方'">-->
<!-- <div class="width-100 center">-->
<!-- 恢复点<el-input v-model="scope.row.value" placeholder="" />-->
<!-- </div>-->
<!-- </div>-->
<!-- <div v-if="scope.row.name == '立体视(stereo)'">-->
<!-- <div class="width-100 center">-->
<!-- TNO()<el-input v-model="scope.row.value" placeholder="" />-->
<!-- </div>-->
<!-- </div>-->
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="" width="" :resizable="false"> <el-table-column label="" width="" :resizable="false">
@ -232,6 +194,20 @@
柱镜(DC) 柱镜(DC)
</div> </div>
</div> </div>
<div v-if="scope.row.name == '1'">
<div>
<div style="display: flex;flex-wrap: wrap">
<el-select v-model="scope.row.examValue" multiple placeholder="请选择">
<el-option
v-for="item in scope.row.examine"
:key="item.id"
:label="item.name"
:value="item.name"
/>
</el-select>
</div>
</div>
</div>
<div v-if="scope.row.name == '3'"> <div v-if="scope.row.name == '3'">
<div class="width-100 center"> <div class="width-100 center">
<el-input v-model="scope.row.c" placeholder="" /> <el-input v-model="scope.row.c" placeholder="" />
@ -247,9 +223,9 @@
<el-input v-model="scope.row.c" placeholder="" /> <el-input v-model="scope.row.c" placeholder="" />
</div> </div>
</div> </div>
<div v-if="scope.row.name == '6'">
<div v-if="scope.row.name == '最终处方'">
<div class="width-100 center"> <div class="width-100 center">
<el-input v-model="scope.row.c" placeholder="" />
<el-input v-model="scope.row.b" placeholder="" />
</div> </div>
</div> </div>
</template> </template>
@ -281,9 +257,9 @@
<el-input v-model="scope.row.d" placeholder="" /> <el-input v-model="scope.row.d" placeholder="" />
</div> </div>
</div> </div>
<div v-if="scope.row.name == '6'">
<div v-if="scope.row.name == '最终处方'">
<div class="width-100 center"> <div class="width-100 center">
<el-input v-model="scope.row.d" placeholder="" />
<el-input v-model="scope.row.c" placeholder="" />
</div> </div>
</div> </div>
</template> </template>
@ -315,9 +291,9 @@
<el-input v-model="scope.row.e" placeholder="" /> <el-input v-model="scope.row.e" placeholder="" />
</div> </div>
</div> </div>
<div v-if="scope.row.name == '6'">
<div v-if="scope.row.name == '最终处方'">
<div class="width-100 center"> <div class="width-100 center">
<el-input v-model="scope.row.e" placeholder="" />
<el-input v-model="scope.row.d" placeholder="" />
</div> </div>
</div> </div>
</template> </template>
@ -344,9 +320,9 @@
<el-input v-model="scope.row.f" placeholder="" /> <el-input v-model="scope.row.f" placeholder="" />
</div> </div>
</div> </div>
<div v-if="scope.row.name == '6'">
<div v-if="scope.row.name == '最终处方'">
<div class="width-80 center"> <div class="width-80 center">
<el-input v-model="scope.row.f" placeholder="" />
<el-input v-model="scope.row.e" placeholder="" />
</div> </div>
</div> </div>
</template> </template>
@ -373,9 +349,9 @@
<el-input v-model="scope.row.g" placeholder="" /> <el-input v-model="scope.row.g" placeholder="" />
</div> </div>
</div> </div>
<div v-if="scope.row.name == '6'">
<div v-if="scope.row.name == '最终处方'">
<div class="width-80 center"> <div class="width-80 center">
<el-input v-model="scope.row.g" placeholder="" />
<el-input v-model="scope.row.f" placeholder="" />
</div> </div>
</div> </div>
</template> </template>
@ -387,6 +363,11 @@
棱镜 棱镜
</div> </div>
</div> </div>
<div v-if="scope.row.name == '最终处方'">
<div class="width-80 center">
<el-input v-model="scope.row.g" placeholder="" />
</div>
</div>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
@ -428,8 +409,7 @@ export default {
patientName: '', patientName: '',
patientSex: '', patientSex: '',
patientAge: '', patientAge: '',
file: '',
fileNUm: ''
file: ''
}, },
originTableData: [], originTableData: [],
tableData: [ tableData: [
@ -441,6 +421,7 @@ export default {
}, { }, {
name: '1', name: '1',
value: '', value: '',
examValue: '',
pupil: [ pupil: [
{ {
name: '正常瞳孔', name: '正常瞳孔',
@ -464,10 +445,6 @@ export default {
isSelect: false isSelect: false
} }
], ],
type: ''
}, {
name: '2',
value: '',
examine: [ examine: [
{ {
name: '检影', name: '检影',
@ -514,9 +491,6 @@ export default {
isSelect: false isSelect: false
} }
], ],
type: ''
}, {
name: '5',
type: '', type: '',
a: '', a: '',
b: '', b: '',
@ -526,7 +500,7 @@ export default {
f: '', f: '',
g: '' g: ''
}, { }, {
name: '6',
name: '5',
type: '', type: '',
a: '', a: '',
b: '', b: '',
@ -535,7 +509,7 @@ export default {
e: '', e: '',
f: '', f: '',
g: '' g: ''
}, {
},{
name: '配镜建议', name: '配镜建议',
suggest: [ suggest: [
{ {
@ -574,9 +548,9 @@ export default {
this.ws.close() this.ws.close()
}, },
mounted() { mounted() {
this.originTableData = JSON.parse(JSON.stringify(this.tableData))
this.setSign() this.setSign()
this.initWebSoket() this.initWebSoket()
this.originTableData = JSON.parse(JSON.stringify(this.tableData))
this.getPatientData() this.getPatientData()
}, },
methods: { methods: {
@ -604,10 +578,9 @@ export default {
patientName: '', patientName: '',
patientSex: '', patientSex: '',
patientAge: '', patientAge: '',
file: '',
fileNUm: ''
file: ''
} }
this.tableData = this.originTableData
this.tableData = Object.assign([], this.originTableData)
this.setSign() this.setSign()
this.getPatientData() this.getPatientData()
}, },
@ -615,7 +588,7 @@ export default {
const ods = this.tableData.filter(item => item.name === '3') const ods = this.tableData.filter(item => item.name === '3')
const oss = this.tableData.filter(item => item.name === '4') const oss = this.tableData.filter(item => item.name === '4')
this.tableData.forEach(item => { this.tableData.forEach(item => {
if (item.name === '5') {
if (item.name === '最终处方') {
item.a = ods[0].a item.a = ods[0].a
item.b = ods[0].b item.b = ods[0].b
item.c = ods[0].c item.c = ods[0].c
@ -624,7 +597,7 @@ export default {
item.f = ods[0].f item.f = ods[0].f
item.g = ods[0].g item.g = ods[0].g
} }
if (item.name === '6') {
if (item.name === '5') {
item.a = oss[0].a item.a = oss[0].a
item.b = oss[0].b item.b = oss[0].b
item.c = oss[0].c item.c = oss[0].c
@ -673,7 +646,7 @@ export default {
that.lockReconnect = false that.lockReconnect = false
}, 5000) }, 5000)
}, },
reset() { //
resetHeart() { //
const that = this const that = this
// //
clearTimeout(that.timeoutObj) clearTimeout(that.timeoutObj)
@ -719,8 +692,9 @@ export default {
} }
this.ws.onmessage = function(msg) { this.ws.onmessage = function(msg) {
const message = JSON.parse(msg.data) const message = JSON.parse(msg.data)
// const data = JSON.parse(msg.data)
// const message = JSON.parse(data.msgTxt) // const message = JSON.parse(data.msgTxt)
console.log(message)
// console.log(message)
self.tableData.forEach(item => { self.tableData.forEach(item => {
if (item.name == '3') { if (item.name == '3') {
item.a = message.RData.DS item.a = message.RData.DS
@ -736,7 +710,7 @@ export default {
item.e = message.LData.ADD item.e = message.LData.ADD
} }
}) })
self.reset()
self.resetHeart()
} }
}, },
handleSaveTable() { handleSaveTable() {
@ -751,31 +725,37 @@ export default {
}, },
objectSpanMethod({ row, column, rowIndex, columnIndex }) { objectSpanMethod({ row, column, rowIndex, columnIndex }) {
if (columnIndex === 0) { if (columnIndex === 0) {
if (rowIndex === 0 || rowIndex === 3 || rowIndex === 6) {
if (rowIndex === 0 || rowIndex === 5) {
// [0,0][0,3][0,6] 31 // [0,0][0,3][0,6] 31
return {
rowspan: 2,
colspan: 1
}
}
if (rowIndex === 2) {
return { return {
rowspan: 3, rowspan: 3,
colspan: 1 colspan: 1
} }
} }
// [0,11] 91 // [0,11] 91
if (rowIndex === 11) {
if (rowIndex === 9) {
return { return {
rowspan: 1, rowspan: 1,
colspan: 9 colspan: 9
} }
} }
} else if (columnIndex === 1) { } else if (columnIndex === 1) {
if (rowIndex === 6 || rowIndex === 9 || rowIndex === 10) {
if (rowIndex === 7 || rowIndex === 8) {
return { return {
rowspan: 1, rowspan: 1,
colspan: 8 colspan: 8
} }
} }
if (rowIndex === 1 || rowIndex === 2) {
if (rowIndex === 1) {
return { return {
rowspan: 1, rowspan: 1,
colspan: 7
colspan: 3
} }
} }
} else if (columnIndex === 3) { } else if (columnIndex === 3) {
@ -785,6 +765,12 @@ export default {
colspan: 2 colspan: 2
} }
} }
if (rowIndex === 1) {
return {
rowspan: 1,
colspan: 3
}
}
} else if (columnIndex === 5) { } else if (columnIndex === 5) {
if (rowIndex === 0) { if (rowIndex === 0) {
return { return {
@ -792,8 +778,8 @@ export default {
colspan: 3 colspan: 3
} }
} }
} else if (rowIndex === 6 || rowIndex === 9 || rowIndex === 10) {
if (columnIndex === 2 || columnIndex === 3 || columnIndex === 4 || columnIndex === 5 || columnIndex === 3) {
} else if (rowIndex === 7 || rowIndex === 8) {
if (columnIndex === 2 || columnIndex === 3 || columnIndex === 4 || columnIndex === 5 || columnIndex === 6) {
return { return {
rowspan: 0, rowspan: 0,
colspan: 0 colspan: 0
@ -805,7 +791,7 @@ export default {
} }
</script> </script>
<style lang="scss" scoped>
<style lang="scss">
.flex{ .flex{
display: flex; display: flex;
} }
@ -820,19 +806,14 @@ export default {
.printBox{ .printBox{
page-break-inside: avoid !important; page-break-inside: avoid !important;
.el-input__inner { .el-input__inner {
border: none;
font-size: 16px;
border-bottom: 1px solid #ccc; border-bottom: 1px solid #ccc;
border-radius: 0; border-radius: 0;
padding: 0; padding: 0;
} }
} }
//@media print{
// @page {
// size:A5 landscape !important;
// }
//}
#operation-record { #operation-record {
//height: 93%;
// overflow: auto;
.operation-record-table { .operation-record-table {
width: 100%; width: 100%;
.operation-text { .operation-text {
@ -885,14 +866,17 @@ export default {
width: 80px; width: 80px;
} }
} }
.width-180 {
.el-input {
width: 180px;
}
}
.el-input__inner { .el-input__inner {
font-size: 16px !important;
border: none; border: none;
height: 26px !important; height: 26px !important;
line-height: 26px !important; line-height: 26px !important;
text-align: center; text-align: center;
}
.el-input__inner {
border-bottom: 1px solid #ccc; border-bottom: 1px solid #ccc;
border-radius: 0; border-radius: 0;
padding: 0; padding: 0;
@ -953,3 +937,4 @@ export default {
} }
} }
</style> </style>

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

@ -673,8 +673,6 @@ export default {
height: 26px !important; height: 26px !important;
line-height: 26px !important; line-height: 26px !important;
text-align: center; text-align: center;
}
.el-input__inner {
border-bottom: 1px solid #ccc; border-bottom: 1px solid #ccc;
border-radius: 0; border-radius: 0;
padding: 0; padding: 0;

Loading…
Cancel
Save