Browse Source

表单默认值

360view
bianyaqi 2 years ago
parent
commit
3012a73487
  1. 21
      src/page-subspecialty/views/modules/formList/InformedConsent.vue
  2. 53
      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.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.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>
@ -177,6 +186,16 @@ export default {
ydb: '',
swmxgxbb: ''
},
options: [{
value: 'OD',
label: 'OD'
}, {
value: 'OS',
label: 'OS'
}, {
value: 'OU',
label: 'OU'
}],
//
judgement: [
{

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

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

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

@ -100,7 +100,7 @@
<span
style="color: #1890ff; padding-right: 8px"
class="operation-details"
@click="showDetail(scope.row, 1)"
@click="finishTreat(scope.row, 1)"
>结束</span>
<span
style="color: #1890ff; padding-right: 8px"
@ -205,7 +205,7 @@ export default {
}, {
value: '300',
label: '未诊'
},{
}, {
value: '400',
label: '已诊'
}],
@ -274,6 +274,16 @@ export default {
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) {
if (index === 1) {

Loading…
Cancel
Save