diff --git a/src/page-subspecialty/views/modules/optometryManagement/outFocusEye/index.vue b/src/page-subspecialty/views/modules/optometryManagement/outFocusEye/index.vue index ed6b12a..98946a4 100644 --- a/src/page-subspecialty/views/modules/optometryManagement/outFocusEye/index.vue +++ b/src/page-subspecialty/views/modules/optometryManagement/outFocusEye/index.vue @@ -54,16 +54,16 @@ - {{ scope.row.brandEyeTypeList[0]. brand }}/ - {{ scope.row.brandEyeTypeList[1].brand }} + {{ scope.row.brandEyeTypeList[0]. brand }} + {{ scope.row.brandEyeTypeList[1] ? '/' + scope.row.brandEyeTypeList[1].brand : '' }} - {{ scope.row.brandEyeTypeList[0].eyeType }}/ - {{ scope.row.brandEyeTypeList[1].eyeType }} + {{ scope.row.brandEyeTypeList[0].eyeType }} + {{ scope.row.brandEyeTypeList[1] ? '/' + scope.row.brandEyeTypeList[1].eyeType : ''}} @@ -100,10 +100,15 @@ 离焦眼镜 + 删除 @@ -186,21 +191,39 @@ export default { this.detailViewVisible = true this.patientId = scopeRow.patientId this.patientIdNumber = scopeRow.patientIdNumber - // this.$router.push({ - // path: '/patientInfo', - // query: { - // info: this.$Base64.encode(JSON.stringify({ - // patientIdNumber: scopeRow.patientIdNumber, - // patientId: scopeRow.patientId - // })) - // } - // }) }, handleType(value, index) { this.curIndex = index this.dataForm.nextCheckFlag = value this.getDataListInitial() }, + // 删除 + handleDel(row) { + this.$confirm('此操作将永久删除该数据, 是否继续?', '提示', { + confirmButtonText: '确定', + cancelButtonText: '取消', + type: 'warning' + }).then(() => { + this.deletePatient(row.id) + }).catch(() => { + this.$message({ + type: 'info', + message: '已取消删除' + }) + }) + }, + async deletePatient(id) { + const params = { + id: id + } + const { data: res } = await this.$http.post('/defocused/delPatientInfo', params) + if (res.code === 0) { + this.$message.success('删除成功') + await this.pageCurrentChangeHandle(this.page) + } else { + this.$message.error(res.msg) + } + }, // 下拉选择医生 changeDoctor(value, scopeRow, type) { const params = {} diff --git a/src/page-subspecialty/views/modules/optometryManagement/outFocusEye/outDetail.vue b/src/page-subspecialty/views/modules/optometryManagement/outFocusEye/outDetail.vue index 489d6d8..716d41f 100644 --- a/src/page-subspecialty/views/modules/optometryManagement/outFocusEye/outDetail.vue +++ b/src/page-subspecialty/views/modules/optometryManagement/outFocusEye/outDetail.vue @@ -255,7 +255,6 @@ export default { }).catch(() => {}) }, async getFirstForm() { - this.firstForm.patientId = this.patientId this.$http.get('/defocused/getFirstDefocused', { params: { patientId: this.patientId @@ -265,6 +264,7 @@ export default { return this.$message.error(res.msg) } else { this.firstForm = res.data + this.firstForm.patientId = this.patientId } }).catch(() => {}) }, diff --git a/src/page-subspecialty/views/modules/optometryManagement/outFocusEye/reviewForm.vue b/src/page-subspecialty/views/modules/optometryManagement/outFocusEye/reviewForm.vue index ec8b3cc..b154180 100644 --- a/src/page-subspecialty/views/modules/optometryManagement/outFocusEye/reviewForm.vue +++ b/src/page-subspecialty/views/modules/optometryManagement/outFocusEye/reviewForm.vue @@ -266,6 +266,7 @@ export default { if (res.code === 0) { this.formList = res.data || [] if (this.formList.length) { + this.curIndex = 0 this.id = this.formList[0].id this.secondForm = this.formList[0] } @@ -371,7 +372,7 @@ export default { color: #D9D9D9; } .nodata { - width: 200px; + width: 180px; margin-top: 50px; } }