Browse Source

冗余代码删除

360view
bianyaqi 2 years ago
parent
commit
5d72fdffd3
  1. 5
      src/components/360View/commonForm/eyesVision.vue
  2. 5
      src/components/360View/commonForm/threeVision.vue
  3. 22
      src/components/360View/opticalFile/index.vue

5
src/components/360View/commonForm/eyesVision.vue

@ -351,9 +351,6 @@ export default {
caseId: { caseId: {
type: String, type: String,
default: '' default: ''
},
formDate: {
type: String
} }
}, },
data() { data() {
@ -580,7 +577,6 @@ export default {
getSysgnjc() { getSysgnjc() {
this.$http.get('/sysgnjc/getSysgnjc', { params: { this.$http.get('/sysgnjc/getSysgnjc', { params: {
caseId: this.caseId, caseId: this.caseId,
formDate: this.formDate,
patientId: this.patientId patientId: this.patientId
}}).then(data => { }}).then(data => {
const form = data.data.data const form = data.data.data
@ -624,7 +620,6 @@ export default {
const { data: res } = await this.$http.post('/sysgnjc/saveSysgnjc', params) const { data: res } = await this.$http.post('/sysgnjc/saveSysgnjc', params)
if (res.code === 0) { if (res.code === 0) {
this.$message.success('保存成功') this.$message.success('保存成功')
this.$emit('save')
} else { } else {
this.$message.error(res.msg) this.$message.error(res.msg)
} }

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

@ -214,9 +214,6 @@ export default {
caseId: { caseId: {
type: String, type: String,
default: '' default: ''
},
formDate: {
type: String
} }
}, },
data() { data() {
@ -387,7 +384,6 @@ export default {
getSysgnjc() { getSysgnjc() {
this.$http.get('/sjsgnjc/getSysgnjc', { params: { this.$http.get('/sjsgnjc/getSysgnjc', { params: {
caseId: this.caseId, caseId: this.caseId,
formDate: this.formDate,
patientId: this.patientId patientId: this.patientId
}}).then(data => { }}).then(data => {
this.dataForm = data.data.data this.dataForm = data.data.data
@ -430,7 +426,6 @@ export default {
const { data: res } = await this.$http.post('/sjsgnjc/savesjsgnjc', params) const { data: res } = await this.$http.post('/sjsgnjc/savesjsgnjc', params)
if (res.code === 0) { if (res.code === 0) {
this.$message.success('保存成功') this.$message.success('保存成功')
this.$emit('save')
} else { } else {
this.$message.error(res.msg) this.$message.error(res.msg)
} }

22
src/components/360View/opticalFile/index.vue

@ -47,13 +47,11 @@
<eyesVision <eyesVision
v-if="name === '双眼视功能检查报告单'" v-if="name === '双眼视功能检查报告单'"
ref="eyes" ref="eyes"
:form-date="formDate"
:case-id="id" :case-id="id"
:only-read="onlyRead" :only-read="onlyRead"
:patient-id="patientId" :patient-id="patientId"
:is-search="isSearch" :is-search="isSearch"
:form-content="eyesData" :form-content="eyesData"
@save="updateForm"
@del="deleteForm" @del="deleteForm"
/> />
<optometryForm v-if="name === '验光报告单'" ref="optome" :case-id="id" :only-read="onlyRead" :patient-id="patientId" :is-search="isSearch" @del="deleteForm" /> <optometryForm v-if="name === '验光报告单'" ref="optome" :case-id="id" :only-read="onlyRead" :patient-id="patientId" :is-search="isSearch" @del="deleteForm" />
@ -62,14 +60,12 @@
ref="three" ref="three"
:only-read="onlyRead" :only-read="onlyRead"
:case-id="id" :case-id="id"
:form-date="formDate"
:patient-id="patientId" :patient-id="patientId"
:is-search="isSearch" :is-search="isSearch"
:form-content="threeData" :form-content="threeData"
@save="updateForm"
@del="deleteForm" @del="deleteForm"
/> />
<deveopmentFile v-show="name === '屈光发育档案'" ref="deveope" :case-id="id" :only-read="onlyRead" :patient-id="patientId" :is-search="isSearch" :form-content="deveopData" @save="updateForm" @del="deleteForm" />
<deveopmentFile v-show="name === '屈光发育档案'" ref="deveope" :case-id="id" :only-read="onlyRead" :patient-id="patientId" :is-search="isSearch" :form-content="deveopData" @del="deleteForm" />
</div> </div>
</div> </div>
</div> </div>
@ -119,8 +115,7 @@ export default {
threeData: {}, threeData: {},
optomeData: {}, optomeData: {},
eyesData: {}, eyesData: {},
formType: '报告单',
formDate: ''
formType: '报告单'
} }
}, },
mounted() { mounted() {
@ -131,15 +126,14 @@ export default {
this.curIndex = index this.curIndex = index
this.id = item.id this.id = item.id
this.name = item.name this.name = item.name
this.formDate = item.createTime
if (item.name === '验光报告单') { if (item.name === '验光报告单') {
this.$nextTick(() => {
this.$nextTick(() => {
this.$refs.optome.queryForm() this.$refs.optome.queryForm()
})
})
} else if (item.name === '屈光发育档案') { } else if (item.name === '屈光发育档案') {
this.$nextTick(() => {
this.$nextTick(() => {
this.$refs.deveope.queryForm() this.$refs.deveope.queryForm()
})
})
} }
}, },
// //
@ -164,10 +158,6 @@ export default {
this.$message.error(res.msg) this.$message.error(res.msg)
} }
}, },
//
updateForm() {
this.getFormList()
},
async deleteForm() { async deleteForm() {
const params = { const params = {
id: this.id id: this.id

Loading…
Cancel
Save