|
|
@ -1,6 +1,9 @@ |
|
|
|
<template> |
|
|
|
<div class="Overviewbasicr"> |
|
|
|
<div class="first-content"> |
|
|
|
<div style="text-align: right;" v-if="!writeAble"> |
|
|
|
<a-button type="primary" @click="editAuth = !editAuth">{{editAuth ? '取消编辑' : '编辑'}}</a-button> |
|
|
|
</div> |
|
|
|
<!-- 患者急救记录 --> |
|
|
|
<div class="basicr-back basicr-back-info"> |
|
|
|
<a-form class="detail-form" :form="firstForm"> |
|
|
@ -14,22 +17,22 @@ |
|
|
|
</div> |
|
|
|
<div class="content-right"> |
|
|
|
<!-- text --> |
|
|
|
<a-input :disabled="writeAble" v-if="k.type === 'text'" type="text" v-decorator="[v]" |
|
|
|
<a-input :disabled="writeAble || !editAuth" v-if="k.type === 'text'" type="text" v-decorator="[v]" |
|
|
|
readOnly /> |
|
|
|
<!-- input --> |
|
|
|
<a-input :disabled="writeAble" v-if="k.type === 'input'" :type="k.inputType" |
|
|
|
<a-input :disabled="writeAble || !editAuth" v-if="k.type === 'input'" :type="k.inputType" |
|
|
|
v-decorator="[v]" @blur="handleChange($event.target.value, v)" placeholder="请输入" /> |
|
|
|
<!-- datetime --> |
|
|
|
<a-input :disabled="writeAble" v-if="k.type === 'datetime'" readOnly |
|
|
|
<a-input :disabled="writeAble || !editAuth" v-if="k.type === 'datetime'" readOnly |
|
|
|
@click="selectOption(v)" v-decorator="[v]" placeholder="请选择" /> |
|
|
|
<a-select :disabled="writeAble" v-if="k.type === 'select'" v-decorator="[v]" |
|
|
|
<a-select :disabled="writeAble || !editAuth" v-if="k.type === 'select'" v-decorator="[v]" |
|
|
|
@change="handleChange($event, v)" placeholder="请选择" style="display: block;"> |
|
|
|
<a-select-option v-for="(item, val) in k.range" :key="val"> |
|
|
|
{{ val }} |
|
|
|
</a-select-option> |
|
|
|
</a-select> |
|
|
|
<!-- radio --> |
|
|
|
<a-radio-group :disabled="writeAble" v-if="k.type === 'radio'" v-decorator="[v]" |
|
|
|
<a-radio-group :disabled="writeAble || !editAuth" v-if="k.type === 'radio'" v-decorator="[v]" |
|
|
|
@change=" |
|
|
|
handleChange($event.target.value, v) |
|
|
|
"> |
|
|
@ -38,7 +41,7 @@ |
|
|
|
</a-radio> |
|
|
|
</a-radio-group> |
|
|
|
<!-- pageText --> |
|
|
|
<a-input :disabled="writeAble" v-if="k.type === 'pageText'" |
|
|
|
<a-input :disabled="writeAble || !editAuth" v-if="k.type === 'pageText'" |
|
|
|
@blur="handleChange($event.target.value, v)" v-decorator="[v]" placeholder="请输入" /> |
|
|
|
</div> |
|
|
|
</div> |
|
|
@ -68,7 +71,7 @@ |
|
|
|
</div> |
|
|
|
<div class="content-right"> |
|
|
|
<!-- input --> |
|
|
|
<a-input :disabled="writeAble" v-if=" |
|
|
|
<a-input :disabled="writeAble || !editAuth" v-if=" |
|
|
|
JMRS_CODE[item].type === 'input' |
|
|
|
" :type="item.inputType" v-decorator="[item]" @blur=" |
|
|
|
handleChange( |
|
|
@ -77,7 +80,7 @@ |
|
|
|
) |
|
|
|
" placeholder="请输入" /> |
|
|
|
<!-- pageText --> |
|
|
|
<a-input :disabled="writeAble" v-if=" |
|
|
|
<a-input :disabled="writeAble || !editAuth" v-if=" |
|
|
|
JMRS_CODE[item].type === |
|
|
|
'pageText' |
|
|
|
" @blur=" |
|
|
@ -113,13 +116,13 @@ |
|
|
|
</div> |
|
|
|
<div class="content-right"> |
|
|
|
<!-- text --> |
|
|
|
<a-input :disabled="writeAble" v-if="k.type === 'text'" type="text" v-decorator="[v]" |
|
|
|
<a-input :disabled="writeAble || !editAuth" v-if="k.type === 'text'" type="text" v-decorator="[v]" |
|
|
|
readOnly /> |
|
|
|
<!-- modal --> |
|
|
|
<a-input :disabled="writeAble" v-if="k.type === 'modal'" :placeholder="k.rightText" |
|
|
|
<a-input :disabled="writeAble || !editAuth" v-if="k.type === 'modal'" :placeholder="k.rightText" |
|
|
|
@click="toInform" type="text" v-decorator="[v]" readOnly /> |
|
|
|
<!-- radio --> |
|
|
|
<a-radio-group :disabled="writeAble" v-if="k.type === 'radio'" v-decorator="[ |
|
|
|
<a-radio-group :disabled="writeAble || !editAuth" v-if="k.type === 'radio'" v-decorator="[ |
|
|
|
v, |
|
|
|
{ initialValue: k.default }, |
|
|
|
]" @change=" |
|
|
@ -130,7 +133,7 @@ |
|
|
|
</a-radio> |
|
|
|
</a-radio-group> |
|
|
|
<!-- checkbox --> |
|
|
|
<a-checkbox-group :disabled="writeAble" v-if="k.type === 'checkbox'" :options="k.range" |
|
|
|
<a-checkbox-group :disabled="writeAble || !editAuth" v-if="k.type === 'checkbox'" :options="k.range" |
|
|
|
v-decorator="[ |
|
|
|
v, |
|
|
|
{ initialValue: k.default }, |
|
|
@ -138,15 +141,15 @@ |
|
|
|
handleChange($event, v, null, k.type) |
|
|
|
" /> |
|
|
|
<!-- input --> |
|
|
|
<a-input :disabled="writeAble" v-if="k.type === 'input'" :type="k.inputType" |
|
|
|
<a-input :disabled="writeAble || !editAuth" v-if="k.type === 'input'" :type="k.inputType" |
|
|
|
v-decorator="[v]" @blur="handleChange($event.target.value, v)" placeholder="请输入" /> |
|
|
|
<!-- datetime --> |
|
|
|
<a-input :disabled="writeAble" v-if="k.type === 'datetime'" readOnly |
|
|
|
<a-input :disabled="writeAble || !editAuth" v-if="k.type === 'datetime'" readOnly |
|
|
|
@click="selectOption(v)" v-decorator="[ |
|
|
|
v, |
|
|
|
{ initialValue: k.default }, |
|
|
|
]" placeholder="请选择" /> |
|
|
|
<a-select :disabled="writeAble" v-if="k.type === 'select'" v-decorator="[ |
|
|
|
<a-select :disabled="writeAble || !editAuth" v-if="k.type === 'select'" v-decorator="[ |
|
|
|
v, |
|
|
|
{ initialValue: k.default }, |
|
|
|
]" @change="handleChange($event, v)" placeholder="请选择" style="display: block;"> |
|
|
@ -155,7 +158,7 @@ |
|
|
|
</a-select-option> |
|
|
|
</a-select> |
|
|
|
<!-- pageText --> |
|
|
|
<a-input :disabled="writeAble" v-if="k.type === 'pageText'" |
|
|
|
<a-input :disabled="writeAble || !editAuth" v-if="k.type === 'pageText'" |
|
|
|
@blur="handleChange($event.target.value, v)" v-decorator="[ |
|
|
|
v, |
|
|
|
{ initialValue: k.default }, |
|
|
@ -167,7 +170,7 @@ |
|
|
|
<div class="adverse"> |
|
|
|
<a-collapse class="jmrs-form-item-con" :bordered="false" expandIconPosition="right"> |
|
|
|
<a-collapse-panel key="1" header="不良反应"> |
|
|
|
<Adverse source="first" ref="adverse" /> |
|
|
|
<Adverse source="first" :editAuth="editAuth" ref="adverse" /> |
|
|
|
</a-collapse-panel> |
|
|
|
</a-collapse> |
|
|
|
</div> |
|
|
@ -188,10 +191,10 @@ |
|
|
|
</div> |
|
|
|
<div class="content-right"> |
|
|
|
<!-- text --> |
|
|
|
<a-input :disabled="writeAble" v-if="k.type === 'text'" type="text" v-decorator="[v]" |
|
|
|
<a-input :disabled="writeAble || !editAuth" v-if="k.type === 'text'" type="text" v-decorator="[v]" |
|
|
|
readOnly /> |
|
|
|
<!-- radio --> |
|
|
|
<a-radio-group class="radioGroupItem" :disabled="writeAble" v-if="k.type === 'radio'" |
|
|
|
<a-radio-group class="radioGroupItem" :disabled="writeAble || !editAuth" v-if="k.type === 'radio'" |
|
|
|
v-decorator="[v]" @change=" |
|
|
|
handleChange($event.target.value, v) |
|
|
|
"> |
|
|
@ -200,24 +203,24 @@ |
|
|
|
</a-radio> |
|
|
|
</a-radio-group> |
|
|
|
<!-- input --> |
|
|
|
<a-input :disabled="writeAble" v-if="k.type === 'input'" :type="k.inputType" |
|
|
|
<a-input :disabled="writeAble || !editAuth" v-if="k.type === 'input'" :type="k.inputType" |
|
|
|
v-decorator="[v]" @blur="handleChange($event.target.value, v)" placeholder="请输入" /> |
|
|
|
<!-- checkbox --> |
|
|
|
<a-checkbox-group :disabled="writeAble" v-if="k.type === 'checkbox'" :options="k.range" |
|
|
|
<a-checkbox-group :disabled="writeAble || !editAuth" v-if="k.type === 'checkbox'" :options="k.range" |
|
|
|
v-decorator="[v]" @change=" |
|
|
|
handleChange($event, v, null, k.type) |
|
|
|
" /> |
|
|
|
<!-- datetime --> |
|
|
|
<a-input :disabled="writeAble" v-if="k.type === 'datetime'" readOnly |
|
|
|
<a-input :disabled="writeAble || !editAuth" v-if="k.type === 'datetime'" readOnly |
|
|
|
@click="selectOption(v)" v-decorator="[v]" placeholder="请选择" /> |
|
|
|
<a-select :disabled="writeAble" v-if="k.type === 'select'" v-decorator="[v]" |
|
|
|
<a-select :disabled="writeAble || !editAuth" v-if="k.type === 'select'" v-decorator="[v]" |
|
|
|
@change="handleChange($event, v)" placeholder="请选择"> |
|
|
|
<a-select-option v-for="(item, v) in k.range" :key="item"> |
|
|
|
{{ v }} |
|
|
|
</a-select-option> |
|
|
|
</a-select> |
|
|
|
<!-- pageText --> |
|
|
|
<a-input :disabled="writeAble" v-if="k.type === 'pageText'" |
|
|
|
<a-input :disabled="writeAble || !editAuth" v-if="k.type === 'pageText'" |
|
|
|
@blur="handleChange($event.target.value, v)" v-decorator="[v]" placeholder="请输入" /> |
|
|
|
</div> |
|
|
|
</div> |
|
|
@ -234,7 +237,7 @@ |
|
|
|
</a-modal> |
|
|
|
</div> |
|
|
|
<div class="throm-common-button"> |
|
|
|
<a-button :disabled="writeAble" class="" block type="primary" size="large" |
|
|
|
<a-button :disabled="writeAble || !editAuth" class="" block type="primary" size="large" |
|
|
|
@click="onSubmit($event, patientId)">{{patientId? '保存' : '完成'}}</a-button> |
|
|
|
<!-- <a-button :disabled="writeAble" type="link" size="large" @click="onSubmit"> |
|
|
|
保存<a-icon type="check" /> |
|
|
@ -343,7 +346,8 @@ |
|
|
|
}, |
|
|
|
request: 0, |
|
|
|
selectCode: '', // 当前选中code |
|
|
|
form: {} |
|
|
|
form: {}, |
|
|
|
editAuth: false, |
|
|
|
}; |
|
|
|
}, |
|
|
|
props: ['patientId'], |
|
|
@ -364,7 +368,7 @@ |
|
|
|
// }); |
|
|
|
// }, |
|
|
|
async mounted() { |
|
|
|
console.log('patientId', this.patientId) |
|
|
|
// console.log('patientId', this.patientId) |
|
|
|
if (this.patientId) { |
|
|
|
const res = await queryAidRecord(this.patientId) |
|
|
|
|
|
|
@ -506,17 +510,17 @@ |
|
|
|
cancelText: '取消', |
|
|
|
content: '是否确定生成报告单,生成报告单后无法修改内容', |
|
|
|
onOk() { |
|
|
|
_this.handleSubmit(1) |
|
|
|
_this.handleSubmit(e, 1) |
|
|
|
}, |
|
|
|
onCancel() { |
|
|
|
_this.handleSubmit(0) |
|
|
|
_this.handleSubmit(e, 0) |
|
|
|
}, |
|
|
|
}); |
|
|
|
} else { |
|
|
|
this.handleSubmit() |
|
|
|
this.handleSubmit(e) |
|
|
|
} |
|
|
|
}, |
|
|
|
handleSubmit(finishStatus) { |
|
|
|
handleSubmit(e,finishStatus) { |
|
|
|
this.$nextTick(async () => { |
|
|
|
this.firstForm.validateFields(async (err, values) => { |
|
|
|
let codeAndAnswerList = [], |
|
|
@ -524,7 +528,7 @@ |
|
|
|
const { |
|
|
|
firstAidId |
|
|
|
} = this.form |
|
|
|
console.log('firstinfo handleSubmit', firstAidId) |
|
|
|
// console.log('firstinfo handleSubmit', firstAidId) |
|
|
|
let adverseSubmit = this.$refs.adverse; |
|
|
|
if (adverseSubmit) { |
|
|
|
let res = await adverseSubmit.onAdverseSubmit(e, 'first'); |
|
|
@ -810,7 +814,8 @@ |
|
|
|
.basicrItem .ant-form-item:nth-child(10), |
|
|
|
.basicrItem .ant-form-item:nth-child(11), |
|
|
|
.basicrItem .ant-form-item:nth-child(12), |
|
|
|
.basicrItem .ant-form-item:nth-child(13) { |
|
|
|
.basicrItem .ant-form-item:nth-child(13), |
|
|
|
.basicrItem .ant-form-item:nth-child(14) { |
|
|
|
// height:150px !important; |
|
|
|
height: auto !important; |
|
|
|
} |
|
|
@ -836,6 +841,8 @@ |
|
|
|
} |
|
|
|
</style> |
|
|
|
<style scoped> |
|
|
|
|
|
|
|
|
|
|
|
>>>.adverse .ant-form-item:nth-child(2) { |
|
|
|
height: 150px !important; |
|
|
|
display: flex; |
|
|
@ -923,4 +930,14 @@ |
|
|
|
padding: 10px 20px; |
|
|
|
border-radius: 12px; |
|
|
|
} |
|
|
|
</style> |
|
|
|
|
|
|
|
<style lang="less"> |
|
|
|
.Overviewbasicr{ |
|
|
|
.basicr-back .ant-form-item { |
|
|
|
.ant-form-item-label > label::after{ |
|
|
|
content: ':'; |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
</style> |