Browse Source

表单默认值

360view
bianyaqi 2 years ago
parent
commit
3012a73487
  1. 21
      src/page-subspecialty/views/modules/formList/InformedConsent.vue
  2. 51
      src/page-subspecialty/views/modules/formList/mraOrder.vue
  3. 14
      src/page-subspecialty/views/modules/outpatientManagement/treat/index.vue

21
src/page-subspecialty/views/modules/formList/InformedConsent.vue

@ -18,7 +18,16 @@
<div class="flex a-c item">姓名<el-input v-model="confirmData.patientName" style="flex: 1" placeholder="" /></div> <div class="flex a-c item">姓名<el-input v-model="confirmData.patientName" style="flex: 1" placeholder="" /></div>
<div class="flex a-c item">年龄<el-input v-model="confirmData.patientAge" style="flex: 1" placeholder="" /></div> <div class="flex a-c item">年龄<el-input v-model="confirmData.patientAge" style="flex: 1" placeholder="" /></div>
<div class="flex a-c item">性别<el-input v-model="confirmData.patientGender" style="flex: 1" placeholder="" /></div> <div class="flex a-c item">性别<el-input v-model="confirmData.patientGender" style="flex: 1" placeholder="" /></div>
<div class="flex a-c item">眼别<el-input v-model="confirmData.eyeType" style="flex: 1" placeholder="" /></div>
<div class="flex a-c item">眼别
<el-select v-model="confirmData.eyeType" style="flex: 1" placeholder="请选择">
<el-option
v-for="item in options"
:key="item.value"
:label="item.label"
:value="item.value"
/>
</el-select>
</div>
</div> </div>
<!--术前判断--> <!--术前判断-->
<div> <div>
@ -177,6 +186,16 @@ export default {
ydb: '', ydb: '',
swmxgxbb: '' swmxgxbb: ''
}, },
options: [{
value: 'OD',
label: 'OD'
}, {
value: 'OS',
label: 'OS'
}, {
value: 'OU',
label: 'OU'
}],
// //
judgement: [ judgement: [
{ {

51
src/page-subspecialty/views/modules/formList/mraOrder.vue

@ -58,7 +58,21 @@
科室<el-input v-model="formData.department" style="flex: 1" /> 科室<el-input v-model="formData.department" style="flex: 1" />
</div> </div>
<div class="flex"> <div class="flex">
医生<el-input v-model="formData.doctor" style="flex: 1" />
医生
<el-select
v-model="formData.doctor"
style="flex: 1"
filterable
allow-create
placeholder=""
>
<el-option
v-for="item in doctorList"
:key="item.id"
:label="item.realName"
:value="item.realName"
/>
</el-select>
</div> </div>
</div> </div>
</td> </td>
@ -77,7 +91,15 @@
</td> </td>
<td> <td>
<div class="flex"> <div class="flex">
主照眼<el-input v-model="formData.lightEye" style="flex: 1" />
主照眼
<el-select v-model="formData.lightEye" style="flex: 1" placeholder="请选择">
<el-option
v-for="item in options"
:key="item.value"
:label="item.label"
:value="item.value"
/>
</el-select>
</div> </div>
</td> </td>
</tr> </tr>
@ -180,6 +202,14 @@ export default {
data() { data() {
return { return {
origin: '', origin: '',
options: [{
value: 'OD',
label: 'OD'
}, {
value: 'OS',
label: 'OS'
}],
doctorList: [],
formData: { formData: {
idList: [], idList: [],
patientName: '', patientName: '',
@ -188,7 +218,7 @@ export default {
patientId: '', patientId: '',
patientBirthday: '', patientBirthday: '',
project: '', project: '',
department: '',
department: '眼科',
doctor: '', doctor: '',
eyeVOD: '', eyeVOD: '',
eyeVOS: '', eyeVOS: '',
@ -238,10 +268,20 @@ export default {
} }
}, },
created() { created() {
this.origin = JSON.parse(JSON.stringify(this.formData))
this.getDoctorList()
this.getOrderDetail() this.getOrderDetail()
this.queryProject() this.queryProject()
}, },
methods: { methods: {
//
getDoctorList() {
this.$http.get('/sys/user', { params: { position: '门诊医师' }}).then(data => {
this.doctorList = data.data.data
}).catch(err => {
this.$message.error(err.msg)
})
},
handleSaveTable() { handleSaveTable() {
this.formData.jzNumber = window.localStorage.getItem('jzNumber') this.formData.jzNumber = window.localStorage.getItem('jzNumber')
this.$http.post('/mzbl/saveMzblYdxgzy', { this.$http.post('/mzbl/saveMzblYdxgzy', {
@ -256,7 +296,12 @@ export default {
caseId: this.caseId, caseId: this.caseId,
patientId: this.patientDetail.patientId patientId: this.patientDetail.patientId
}}).then(data => { }}).then(data => {
const detail = data.data.data
if (detail.jzNumber) {
this.formData = { ...data.data.data } this.formData = { ...data.data.data }
} else {
this.formData = this.origin
}
// //
this.formData.patientName = this.patientDetail.patientName this.formData.patientName = this.patientDetail.patientName
this.formData.patientAge = this.patientDetail.patientAge this.formData.patientAge = this.patientDetail.patientAge

14
src/page-subspecialty/views/modules/outpatientManagement/treat/index.vue

@ -100,7 +100,7 @@
<span <span
style="color: #1890ff; padding-right: 8px" style="color: #1890ff; padding-right: 8px"
class="operation-details" class="operation-details"
@click="showDetail(scope.row, 1)"
@click="finishTreat(scope.row, 1)"
>结束</span> >结束</span>
<span <span
style="color: #1890ff; padding-right: 8px" style="color: #1890ff; padding-right: 8px"
@ -205,7 +205,7 @@ export default {
}, { }, {
value: '300', value: '300',
label: '未诊' label: '未诊'
},{
}, {
value: '400', value: '400',
label: '已诊' label: '已诊'
}], }],
@ -274,6 +274,16 @@ export default {
this.$message.error(res.msg) this.$message.error(res.msg)
} }
}, },
finishTreat(scope) {
const idList = scope.zlProjectList.map(item => item.id)
if (!idList.length) {
this.$message.error('项目状态更新失败')
return
}
this.$http.post('/patient/updateProjectStatus', idList).then((res) => {
this.$message.success(res.data.data)
})
},
// //
showDetail(scopeRow, index) { showDetail(scopeRow, index) {
if (index === 1) { if (index === 1) {

Loading…
Cancel
Save