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.

245 lines
8.2 KiB

3 years ago
<template>
<div class="examineBox">
<div style="display: flex;margin-top: 32px">
<el-table
max-height="450"
:data="tableData"
style="width:100%;margin: 8px 8px 0 0"
>
<el-table-column
align="center"
type="index"
label="序号"
/>
<el-table-column
align="center"
prop="name"
label="项目"
/>
<el-table-column
align="center"
label="OD"
>
<template slot-scope="scope">
<div>
<span v-if="scope.row.sort === 1">
<span style="margin-right: 16px">结膜充血</span>{{ scope.row.odValue }}
</span>
<span v-else-if="scope.row.sort === 2">
<span style="margin-right: 16px">结膜分泌物</span>{{ scope.row.odValue }}
</span>
<span v-else-if="scope.row.sort === 3">
<span style="margin-right: 16px">视盘视神经</span>{{ scope.row.odValue }}
</span>
<span v-else-if="scope.row.sort === 4">
<span style="margin-right: 16px">视盘CDR</span>{{ scope.row.odValue }}
</span>
<span v-else-if="scope.row.sort === 5">
<div v-if="scope.row.eyeType === 'OD'">
<p style="margin-right: 16px">球镜 DS{{ scope.row.odSph }}</p>
<p style="margin-right: 16px">柱镜 DC{{ scope.row.odCyl }}</p>
<p style="margin-right: 16px">轴位 Axis{{ scope.row.odAx }}</p>
<p style="margin-right: 16px">等效球镜{{ scope.row.odSe }}</p>
</div>
</span>
<span v-else-if="scope.row.sort === 6">
<div v-if="scope.row.eyeType === 'OD'">
<p style="margin-right: 16px">球镜 DS{{ scope.row.odSph }}</p>
<p style="margin-right: 16px">柱镜 DC{{ scope.row.odCyl }}</p>
<p style="margin-right: 16px">轴位 Axis{{ scope.row.odAx }}</p>
<p style="margin-right: 16px">矫正视力VA{{ scope.row.odVa }}</p>
</div>
</span>
<span v-else>
{{ scope.row.odValue }}
</span>
</div>
</template>
</el-table-column>
<el-table-column
align="center"
label="OS"
>
<template slot-scope="scope">
<div>
<span v-if="scope.row.sort === 1">
<span style="margin-right: 16px">结膜充血</span>{{ scope.row.osValue }}
</span>
<span v-else-if="scope.row.sort === 2">
<span style="margin-right: 16px">结膜分泌物</span>{{ scope.row.osValue }}
</span>
<span v-else-if="scope.row.sort === 3">
<span style="margin-right: 16px">视盘视神经</span>{{ scope.row.osValue }}
</span>
<span v-else-if="scope.row.sort === 4">
<span style="margin-right: 16px">视盘CDR</span>{{ scope.row.osValue }}
</span>
<span v-else-if="scope.row.sort === 5">
<div v-if="scope.row.eyeType === 'OS'">
<p style="margin-right: 16px">球镜 DS{{ scope.row.odSph }}</p>
<p style="margin-right: 16px">柱镜 DC{{ scope.row.odCyl }}</p>
<p style="margin-right: 16px">轴位 Axis{{ scope.row.odAx }}</p>
<p style="margin-right: 16px">等效球镜{{ scope.row.odSe }}</p>
</div>
</span>
<span v-else-if="scope.row.sort === 6">
<div v-if="scope.row.eyeType === 'OS'">
<p style="margin-right: 16px">球镜 DS{{ scope.row.odSph }}</p>
<p style="margin-right: 16px">柱镜 DC{{ scope.row.odCyl }}</p>
<p style="margin-right: 16px">轴位 Axis{{ scope.row.odAx }}</p>
<p style="margin-right: 16px">矫正视力VA{{ scope.row.odVa }}</p>
</div>
</span>
<span v-else>
{{ scope.row.osValue }}
</span>
</div>
</template>
</el-table-column>
<el-table-column
align="center"
label="OU"
>
<template slot-scope="scope">
<div>
<span v-if="scope.row.sort === 1">
<span style="margin-right: 16px" />{{ scope.row.ouValue }}
</span>
<span v-else-if="scope.row.sort === 5">
<div v-if="scope.row.eyeType === 'OU'">
<p style="margin-right: 16px">球镜 DS{{ scope.row.odSph }}</p>
<p style="margin-right: 16px">柱镜 DC{{ scope.row.odCyl }}</p>
<p style="margin-right: 16px">轴位 Axis{{ scope.row.odAx }}</p>
<p style="margin-right: 16px">等效球镜{{ scope.row.odSe }}</p>
</div>
</span>
<span v-else-if="scope.row.sort === 6">
<div v-if="scope.row.eyeType === 'OU'">
<p style="margin-right: 16px">球镜 DS{{ scope.row.odSph }}</p>
<p style="margin-right: 16px">柱镜 DC{{ scope.row.odCyl }}</p>
<p style="margin-right: 16px">轴位 Axis{{ scope.row.odAx }}</p>
<p style="margin-right: 16px">矫正视力VA{{ scope.row.odVa }}</p>
</div>
</span>
<span v-else>
{{ scope.row.ouValue }}
</span>
</div>
</template>
</el-table-column>
</el-table>
</div>
</div>
</template>
<script>
import eventBus from '@/page-subspecialty/utils/eventBus'
import treeSelect from '@/components/360View/itemSelect'
const Base64 = require('js-base64').Base64
export default {
name: 'SpecialExamine',
3 years ago
components: {
treeSelect
},
mixins: [],
props: {
patientIdNumber: {
type: String,
default: ''
},
patientId: {
type: String,
default: ''
}
},
inject: ['refresh'],
data() {
return {
userData: {},
collectId: '',
tableData: []
}
},
created() {
},
mounted() {
this.getOutPatientList()
eventBus.$on('sendDataToExamine', data => {
this.tableData = data
})
},
methods: {
// 获取表单数据
async getOutPatientList() {
const { data: res } = await this.$http.get('/case/getCase', {
params: {
patientId: this.patientId,
platform: 1,
flag: 4
}
})
if (res.code === 0) {
this.tableData = res.data ? JSON.parse(res.data.jsonText) : []
this.collectId = res.data ? res.data.id : ''
} else {
this.$message.error(res.msg)
}
},
// 保存
async saveExamine() {
const params = {
flag: 4,
jsonText: JSON.stringify(this.tableData),
name: '专科检查',
patientId: this.patientId,
platform: 1
}
let url = ''
if (this.collectId) {
url = '/case/update'
params.id = this.collectId
} else {
url = '/case/save'
}
const { data: res } = await this.$http.post(url, params)
if (res.code === 0) {
this.$message.success('保存成功')
await this.getOutPatientList()
} else {
this.$message.error(res.msg)
}
}
}
}
</script>
<style lang="scss" scoped>
.examineBox{
width: 100%;
height: 100%;
box-sizing: border-box;
overflow-y: auto;
position: relative;
.btnBox{
position: fixed;
right: 84px;
text-align: right;
margin-right: 16px;
background-color: white;
z-index: 999;
}
.moveIcon{
position: absolute;
left: calc(50% + 120px);
top: 40px;
z-index: 9;
}
}
</style>
<style lang="scss">
.examineBox{
.el-form-item__content{
text-align: left;
}
}
</style>