diff --git a/src/components/360View/commonForm/eyesVision.vue b/src/components/360View/commonForm/eyesVision.vue index 7e7d063..46efe44 100644 --- a/src/components/360View/commonForm/eyesVision.vue +++ b/src/components/360View/commonForm/eyesVision.vue @@ -832,7 +832,7 @@ export default { methods: { // 获取签名 setSign() { - const userData = window.sessionStorage.getItem('qg-userData') + const userData = JSON.parse(window.sessionStorage.getItem('qg-userData')) const date = this.$moment().format('YYYY-MM-DD') const mzName = window.sessionStorage.getItem('mzDoctorName') this.formData.ygsSign = userData.signImgBase diff --git a/src/components/360View/commonForm/optometryForm-copy.vue b/src/components/360View/commonForm/optometryForm-copy.vue deleted file mode 100644 index 66d3b9e..0000000 --- a/src/components/360View/commonForm/optometryForm-copy.vue +++ /dev/null @@ -1,1107 +0,0 @@ - - - - - - diff --git a/src/components/360View/commonForm/optometryForm.vue b/src/components/360View/commonForm/optometryForm.vue index 95d25d7..5d8a979 100644 --- a/src/components/360View/commonForm/optometryForm.vue +++ b/src/components/360View/commonForm/optometryForm.vue @@ -1,9 +1,21 @@ @@ -166,22 +178,22 @@
- +
- +
- +
- +
@@ -190,7 +202,7 @@ @@ -248,22 +260,22 @@
- +
- +
- +
- +
@@ -272,7 +284,7 @@ @@ -311,22 +323,22 @@
- +
- +
- +
- +
@@ -335,22 +347,22 @@
视光师: - +
- +
日期: + />
-

说明:1.持本报告但配镜仅供参考。 2.本报告单有效期3个月

+

说明:1.持本报告单配镜仅供参考。 2.本报告单有效期3个月

@@ -366,9 +378,13 @@ export default { type: String, default: '' }, - formContent: { - type: Object, - default: () => { } + caseId: { + type: String, + default: '' + }, + isPlatform: { + type: Boolean, + default: true }, onlyRead: { type: Boolean, @@ -377,6 +393,7 @@ export default { }, data() { return { + connectFlag: false, // 连接 ws: null, // 建立的连接 lockReconnect: false, // 是否真正建立连接 timeout: 28 * 1000, // 30秒一次心跳 @@ -384,14 +401,46 @@ export default { serverTimeoutObj: null, // 心跳倒计时 timeoutnum: null, // 断开 重连倒计时 dataForm: { + id: '', + jzNumber: '', + idList: [], patientId: '', patientName: '', patientSex: '', patientAge: '', - file: '', - optometrist: '', - physician: '', - date: '' + qgFyda: '', // 屈光发育档案 + ygsSign: '', // 视光师 + ysSign: '', // 医师 + riQi: '', // 日期 + slType: '', // 视力类型 + slOs: '', // 左眼视力 + slOd: '', // 右眼视力 + tongk: '', // 瞳孔 + jianchaFangfa: '', + ygjcDsOd: '', + ygjcDsOs: '', + ygjcDcOd: '', + ygjcDcOs: '', + ygjcAOd: '', + ygjcAOs: '', + ygjcVaOd: '', + ygjcVaOs: '', + ygjcAddOd: '', + ygjcAddOs: '', + zzcfAOd: '', + zzcfAOs: '', + zzcfAddOd: '', + zzcfAddOs: '', + zzcfDcOd: '', + zzcfDcOs: '', + zzcfDsOd: '', + zzcfDsOs: '', + zzcfVaOs: '', + zzcfVaOd: '', + zzcfCheck: '', + pjyjCheck: '', // 配镜建议 + pjyjQt: '', // 配镜建议-其他 + beiZhu: '' // 备注 }, fileList: [ { @@ -412,35 +461,28 @@ export default { pupil: [ { name: '正常瞳孔', - id: '1', - isSelect: false + id: '1' }, { name: '复方托吡卡胺', - id: '2', - isSelect: false + id: '2' }, { name: '美多丽', - id: '3', - isSelect: false + id: '3' }, { name: '赛飞杰', - id: '4', - isSelect: false + id: '4' }, { name: '阿托品', - id: '5', - isSelect: false + id: '5' } ], examine: [ { name: '检影', - id: '1', - isSelect: false + id: '1' }, { name: '综合', - id: '2', - isSelect: false + id: '2' } ], remoteUse: [ @@ -484,164 +526,110 @@ export default { originTableData: [], tableData: [ { - name: '基本信息', - vision: '1', - od: '', // 右眼 - os: '' // 左眼 + name: '基本信息' }, { - name: '1', - value: '', // 瞳孔状态 - examValue: '' // 检查方法 + name: '1' }, { name: '验光检查' }, { - name: '3', // 验光检查 右眼 - a: '', // 球镜(DS) - b: '', // 柱镜(DC) - c: '', // 轴位(A) - d: '', // 矫正视力(VA) - e: '' // 下加光(ADD) + name: '3' }, { - name: '4', // 验光检查 左眼 - a: '', - b: '', - c: '', - d: '', - e: '' + name: '4' }, { - name: '最终处方', // 最终处方 右眼 - a: '', - b: '', - c: '', - d: '', - e: '' + name: '最终处方' }, { - name: '5', // 最终处方 右眼 - a: '', - b: '', - c: '', - d: '', - e: '' + name: '5' }, { - name: '配镜建议', - value: '' // 其他 + name: '配镜建议' }, { - name: '备注', - value: '' // 备注 + name: '备注' }], print: { id: 'optomeFunc' } } }, + watch: { + caseId: { + handler: function(newV, oldV) { + this.queryForm() + if (this.isSearch === '3') { + this.initWebSoket() + } + } + } + }, destroyed() { - this.ws.close() + if (this.isSearch === '3') { + this.connectFlag = false + clearTimeout(this.timeoutnum) + clearTimeout(this.timeoutObj) + clearTimeout(this.serverTimeoutObj) + this.ws.close() + } }, mounted() { - this.originTableData = JSON.parse(JSON.stringify(this.tableData)) - this.setSign() - this.initWebSoket() + this.queryForm() this.getPatientData() - this.setVision() + if (this.isSearch === '3') { + this.initWebSoket() + } }, methods: { + // 设置签名 setSign() { - const userData = window.sessionStorage.getItem('qg-userData') + const userData = JSON.parse(window.sessionStorage.getItem('qg-userData')) const date = this.$moment().format('YYYY-MM-DD') const mzName = window.sessionStorage.getItem('mzDoctorName') - this.dataForm.optometrist = userData.signImgBase - this.dataForm.physician = mzName - this.dataForm.date = date - }, - setData() { - this.dataForm = this.formContent.a - this.tableData = this.formContent.b - this.setSign() - this.getPatientData() - }, - reSet() { - this.dataForm = { - patientId: '', - patientName: '', - patientSex: '', - patientAge: '', - file: '', - optometrist: '', - physician: '', - date: '' - } - this.tableData = Object.assign([], this.originTableData) - this.setSign() - this.setVision() - this.getPatientData() + this.dataForm.tongk = '正常瞳孔' + this.dataForm.jianchaFangfa = '综合' + this.dataForm.ygsSign = userData.signImgBase + this.dataForm.ysSign = mzName + this.dataForm.riQi = date }, setVision() { const data = window.sessionStorage.getItem('shili') ? JSON.parse(window.sessionStorage.getItem('shili')) : [] - if (data.length) { - const one = data[0].odVan - const two = data[0].odVag - if (one) { - this.tableData[0].vision = '1' - this.selectVision('1') - } else if (two && !one) { - this.tableData[0].vision = '2' - this.selectVision('2') - } else { - this.tableData[0].vision = '1' - this.selectVision('1') - } + const one = data.length ? data[0].odVan : '' + const two = data.length ? data[0].odVag : '' + if (two && !one) { + this.dataForm.slType = '2' + this.selectVision('2') + } else { + this.dataForm.slType = '1' + this.selectVision('1') } }, selectVision(id) { + const data = window.sessionStorage.getItem('shili') ? JSON.parse(window.sessionStorage.getItem('shili')) : [] if (id === '1') { // 裸眼视力 - const data = window.sessionStorage.getItem('shili') ? JSON.parse(window.sessionStorage.getItem('shili')) : [] - if (data.length) { - this.tableData[0].od = data[0].odVan - this.tableData[0].os = data[0].osVan - } else { - this.tableData[0].od = '' - this.tableData[0].os = '' - } + this.dataForm.slOd = data.length ? data[0].odVan : '' + this.dataForm.slOs = data.length ? data[0].osVan : '' } else { - const data = window.sessionStorage.getItem('shili') ? JSON.parse(window.sessionStorage.getItem('shili')) : [] - if (data.length) { - this.tableData[0].od = data[0].odVag - this.tableData[0].os = data[0].osVag - } else { - this.tableData[0].od = '' - this.tableData[0].os = '' - } + this.dataForm.slOd = data.length ? data[0].odVag : '' + this.dataForm.slOs = data.length ? data[0].osVag : '' } }, copyData() { - const ods = this.tableData.filter(item => item.name === '3') - const oss = this.tableData.filter(item => item.name === '4') - this.tableData.forEach(item => { - if (item.name === '最终处方') { - item.a = ods[0].a - item.b = ods[0].b - item.c = ods[0].c - item.d = ods[0].d - item.e = ods[0].e - } - if (item.name === '5') { - item.a = oss[0].a - item.b = oss[0].b - item.c = oss[0].c - item.d = oss[0].d - item.e = oss[0].e - } - }) + this.dataForm.zzcfDsOd = this.dataForm.ygjcDsOd + this.dataForm.zzcfDcOd = this.dataForm.ygjcDcOd + this.dataForm.zzcfAOd = this.dataForm.ygjcAOd + this.dataForm.zzcfVaOd = this.dataForm.ygjcVaOd + this.dataForm.zzcfAddOd = this.dataForm.ygjcAddOd + this.dataForm.zzcfDsOs = this.dataForm.ygjcDsOs + this.dataForm.zzcfDcOs = this.dataForm.ygjcDcOs + this.dataForm.zzcfAOs = this.dataForm.ygjcAOs + this.dataForm.zzcfVaOs = this.dataForm.ygjcVaOs + this.dataForm.zzcfAddOs = this.dataForm.ygjcAddOs }, async getPatientData() { const { data: res } = await this.$http.get( - '/patient/view/getPatientData', - { - params: { - patientId: this.patientId + '/patient/view/getPatientData', + { + params: { + patientId: this.patientId + } } - } ) if (res.code === 0) { const data = res.data @@ -653,6 +641,58 @@ export default { this.$message.error(res.msg) } }, + async queryForm() { + const { data: res } = await this.$http.get( + '/ygbgd/getYgbgdInfo', + { + params: { + patientId: this.patientId, + caseId: this.caseId + } + } + ) + if (res.code === 0) { + this.dataForm = res.data + if (!this.dataForm.id) { + await this.queryProject() + this.setVision() + this.setSign() + } + this.dataForm.jzNumber = window.sessionStorage.getItem('jzNumber') + this.handleStr(this.dataForm.pjyjCheck, this.suggest) + this.handleStr(this.dataForm.zzcfCheck, this.remoteUse) + } else { + this.$message.error(res.msg) + } + }, + // 获取报告单id + async queryProject() { + const project = window.sessionStorage.getItem('projectItem') ? JSON.parse(window.sessionStorage.getItem('projectItem')) : [] + const { data: res } = await this.$http.get( + '/patient/getZlItemDict', + { + params: { + caseName: '验光报告单' + } + } + ) + if (res.code === 0) { + const data = res.data || [] + const list = [] + if (data.length) { + for (let i = 0; i < data.length; i++) { + for (let j = 0; j < project.length; j++) { + if (data[i].itemId === project[j].porjectCode) { + list.push(project[j].id) + } + } + } + this.dataForm.idList = list + } + } else { + this.$message.error(res.msg) + } + }, reconnect() { // 重新连接 const that = this if (that.lockReconnect) { @@ -696,53 +736,114 @@ export default { // wss://127.0.0.1:8030/data // const url = 'ws://47.110.224.240:8036/xiangan-crf/websocket/0071' // const url = 'ws://192.168.0.167:8036/xiangan-crf/websocket/0071' - const url = 'ws://127.0.0.1:8030/data' - const self = this - this.ws = new WebSocket(url) - this.ws.onopen = function() { - console.log('连接成功') - self.start() - } - this.ws.onclose = function() { - // console.log('连接关闭') - self.reconnect() + try { + const url = 'ws://127.0.0.1:8030/data' + const self = this + this.ws = new WebSocket(url) + this.ws.onopen = function() { + console.log('连接成功') + self.connectFlag = true + self.start() + } + this.ws.onclose = function() { + self.connectFlag = false + self.reconnect() + } + this.ws.onerror = function() { + self.connectFlag = false + self.reconnect() + } + this.ws.onmessage = function(msg) { + const message = JSON.parse(msg.data) + // const data = JSON.parse(msg.data) + // const message = JSON.parse(data.msgTxt) + self.dataForm.ygjcDsOd = message.RData.DS + self.dataForm.ygjcDcOd = message.RData.DC + self.dataForm.ygjcAOd = message.RData.AXIS + self.dataForm.ygjcVaOd = message.RData.VA + self.dataForm.ygjcAddOd = message.RData.ADD + self.dataForm.ygjcDsOs = message.LData.DS + self.dataForm.ygjcDcOs = message.LData.DC + self.dataForm.ygjcAOs = message.LData.AXIS + self.dataForm.ygjcVaOs = message.LData.VA + self.dataForm.ygjcAddOs = message.LData.ADD + self.resetHeart() + } + } catch (e) { + console.log(e) } - this.ws.onerror = function() { - // console.log('连接失败') - self.reconnect() + }, + // 处理字符串 + handleStr(string, array) { + if (string) { + const data = string.split(',') + array.forEach(item => { + data.forEach(row => { + if (item.name === row) { + item.isSelect = true + } + }) + }) + } else { + array.forEach(item => { + item.isSelect = false + }) } - this.ws.onmessage = function(msg) { - const message = JSON.parse(msg.data) - // const data = JSON.parse(msg.data) - // const message = JSON.parse(data.msgTxt) - console.log(message) - self.tableData.forEach(item => { - if (item.name == '3') { - item.a = message.RData.DS - item.b = message.RData.DC - item.c = message.RData.AXIS - item.d = message.RData.VA - item.e = message.RData.ADD - } else if (item.name == '4') { - item.a = message.LData.DS - item.b = message.LData.DC - item.c = message.LData.AXIS - item.d = message.LData.VA - item.e = message.LData.ADD + return array + }, + // 处理数组 + handleCheck(array) { + if (array && array.length) { + const temp = [] + array.forEach(item => { + if (item.isSelect) { + temp.push(item.name) } }) - self.resetHeart() + return temp.join(',') } }, handleSaveTable() { - const data = { - a: this.dataForm, - b: this.tableData - } - this.$emit('save', data) + this.dataForm.pjyjCheck = this.handleCheck(this.suggest) + this.dataForm.zzcfCheck = this.handleCheck(this.remoteUse) + this.$http.post('/ygbgd/saveYgbgd', this.dataForm).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.queryForm() + } + }) + }).catch(() => {}) }, handleDelete() { - this.$emit('del') + const params = { + id: this.caseId + } + this.$confirmFun('你确定要删除吗?').then(async() => { + await this.deleteNewForm() + const { data: res } = await this.$http.post('/case/delete', params) + if (res.code === 0) { + this.$message.success('删除成功') + await this.$parent.getFormList() + } else { + this.$message.error(res.msg) + } + }) + }, + async deleteNewForm() { + const params = { + id: this.caseId + } + const { data: res } = await this.$http.post('/ygbgd/delYgbgdInfo', params) + if (res.code === 0) { + } else { + this.$message.error(res.msg) + } }, objectSpanMethod({ row, column, rowIndex, columnIndex }) { if (columnIndex === 0) { @@ -922,18 +1023,6 @@ export default { .el-date-editor.el-input__inner { width: 140px; } - //.el-checkbox__input.is-checked + .el-checkbox__label { - // color: #606266; - //} - //.el-checkbox__input.is-checked .el-checkbox__inner, - //.el-checkbox__input.is-indeterminate .el-checkbox__inner { - // background: #767676; - // border-color: #767676; - //} - //.el-checkbox__inner:hover, - //.el-checkbox__inner { - // border-color: #767676; - //} .el-table--enable-row-hover .el-table__body tr:hover>td.el-table__cell { background: none !important; } @@ -963,6 +1052,21 @@ export default { margin-right: 5px; } } + .el-input__inner { + padding: 0; + border: none; + text-align: center; + border-radius: 0; + border-bottom: 1px solid #8e8c8c; + } + .operation-record-table{ + .el-input__inner { + padding: 0; + border: none; + text-align: center; + border-radius: 0; + } + } .bold{ font-weight: 700; } @@ -987,6 +1091,9 @@ export default { border: none; } .el-input__suffix-inner{ + //display: none; + } + .el-icon-arrow-up{ display: none; } } diff --git a/src/components/360View/commonForm/threeVision.vue b/src/components/360View/commonForm/threeVision.vue index 15238b7..c45449d 100644 --- a/src/components/360View/commonForm/threeVision.vue +++ b/src/components/360View/commonForm/threeVision.vue @@ -518,7 +518,7 @@
TITMUS(近): - +
- +
- +
TNO(近): - +
分开/集合: - + ° / - +
- +
- RDD(近): - + RDD(远): + - - - diff --git a/src/components/360View/opticalFile/index.vue b/src/components/360View/opticalFile/index.vue index 6ab2cf5..ae62b94 100644 --- a/src/components/360View/opticalFile/index.vue +++ b/src/components/360View/opticalFile/index.vue @@ -75,7 +75,7 @@ import ourPatientRecord from './outPatientRecord' import eyesVision from '@/components/360View/commonForm/eyesVision' // import threeVision from '@/components/360View/commonForm/threeVision' // -import optometryForm from '@/components/360View/commonForm/optometryForm-copy' // +import optometryForm from '@/components/360View/commonForm/optometryForm' // import deveopmentFile from '@/components/360View/commonForm/deveopmentFIle' // export default { components: { diff --git a/src/components/360View/special/index.vue b/src/components/360View/special/index.vue index c9caf10..eecf766 100644 --- a/src/components/360View/special/index.vue +++ b/src/components/360View/special/index.vue @@ -123,7 +123,7 @@ export default { } }, mounted() { - const user = window.sessionStorage.getItem('qg-userData') + const user = JSON.parse(window.sessionStorage.getItem('qg-userData')) this.employeeId = user.employeeId this.getPatientData() this.getSpecialItem() diff --git a/src/components/item-select/index.vue b/src/components/item-select/index.vue index c013aa3..e1c650d 100644 --- a/src/components/item-select/index.vue +++ b/src/components/item-select/index.vue @@ -6,7 +6,7 @@ :key="index" class="match-item" closable - @close="removeItem(item)" + @close="btnRemove(item)" @click="editItem(item)" > {{ item.itemName }} @@ -48,9 +48,47 @@ - - - + + + + + + + {{ item.deviceName }} + {{ item.location?item.location:'' }} + + @@ -66,7 +104,22 @@ @@ -265,7 +368,7 @@ export default { margin-left: 5px; margin-right: 5px; } - .match-item-kpi{ + .match-item-kpi { color: #fa0d35; margin-left: 3px; margin-right: 3px; @@ -286,16 +389,15 @@ export default { cursor: pointer; } -.form-query{ - .item-query-kpi{ +.form-query { + .item-query-kpi { width: 300px; } - .item-query-type{ + .item-query-type { width: 100px; } - .item-query-logic{ + .item-query-logic { width: 100px; } - } diff --git a/src/components/patient-search/index.vue b/src/components/patient-search/index.vue index 7e01e47..63f7826 100644 --- a/src/components/patient-search/index.vue +++ b/src/components/patient-search/index.vue @@ -81,7 +81,7 @@ +