|
|
@ -8,6 +8,7 @@ |
|
|
|
<div v-for="(item, index) in list" :key="index"> |
|
|
|
<a-form-item :label-col="formItemLayout.labelCol" :wrapper-col="formItemLayout.wrapperCol"> |
|
|
|
<!-- 一级大标题 --> |
|
|
|
<!-- <h2>病史相关</h2> --> |
|
|
|
<h2>{{ item.name }}:</h2> |
|
|
|
</a-form-item> |
|
|
|
<!-- 一级标题下的各种问题(questionVos),判断类型1-12,展示不同需要填写的内容 --> |
|
|
@ -23,7 +24,11 @@ |
|
|
|
<a-radio-group v-model="a.answer" v-else-if="a.type === 3" @change="onChange($event, a.type, a.id, a.recordId)"> |
|
|
|
<a-radio v-for="(b, c) in a.optionVos" :key="c" :style="radioStyle" :value="b.showValue"> {{ b.showValue }} </a-radio> |
|
|
|
</a-radio-group> |
|
|
|
<a-checkbox-group v-else-if="a.type === 4" @change="onChange($event, a.type, a.id, a.recordId)"> |
|
|
|
<a-checkbox-group |
|
|
|
:default-value="getList(a.optionVos)" |
|
|
|
v-else-if="a.type === 4" |
|
|
|
@change="onChange($event, a.type, a.id, a.recordId)" |
|
|
|
> |
|
|
|
<a-row> |
|
|
|
<a-col :span="24" v-for="(ques, indexNum) in a.optionVos" :key="indexNum"> |
|
|
|
<a-checkbox :value="ques.submitValue"> {{ ques.showValue }} </a-checkbox> |
|
|
@ -51,44 +56,55 @@ |
|
|
|
> |
|
|
|
<a-button v-show="fileList.length === 0"> <a-icon type="upload" /> 点击上传 </a-button> |
|
|
|
</a-upload> |
|
|
|
<a-radio-group v-model="a.answer" v-else-if="a.type === 8" @change="onChange($event, a.type, a.id, a.recordId)"> |
|
|
|
<a-radio-group |
|
|
|
:default-value="getAnswer(a.answer)" |
|
|
|
v-else-if="a.type === 8" |
|
|
|
@change="onChange($event, a.type, a.id, a.recordId)" |
|
|
|
> |
|
|
|
<!-- <a-radio-group @change="onChange($event, a.type, a.id, a.recordId)"> --> |
|
|
|
<div> |
|
|
|
<a-radio v-for="(f, g) in a.optionVos" :key="g" :style="radioStyle" :value="f.showValue"> |
|
|
|
{{ f.showValue }} |
|
|
|
</a-radio> |
|
|
|
</div> |
|
|
|
<!-- </a-radio-group> --> |
|
|
|
<div v-for="(j, k) in a.optionVos" :key="k"> |
|
|
|
<div |
|
|
|
v-if=" |
|
|
|
contentList.find(item => { |
|
|
|
(contentList.find(item => { |
|
|
|
return item.testQuestionsId === a.id && item.contents === `${j.showValue}`; |
|
|
|
}) && j.afterOperation === 1 |
|
|
|
}) && |
|
|
|
j.afterOperation === 1) || |
|
|
|
(j.afterOperation === 1 && |
|
|
|
!contentList.find(item => { |
|
|
|
return item.testQuestionsId === a.id; |
|
|
|
})) |
|
|
|
" |
|
|
|
> |
|
|
|
<a-form-item :label-col="formItemLayout.labelCol" :wrapper-col="formItemLayout.wrapperCol"> |
|
|
|
<a-input style="width: 200px" @change="inputChange(a.id, $event, j.showValue)"></a-input> |
|
|
|
<a-input v-model="j.otherInformation" style="width: 200px" @change="inputChange(a.id, $event, j.showValue)"></a-input> |
|
|
|
</a-form-item> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<!-- </a-radio-group> --> |
|
|
|
</a-radio-group> |
|
|
|
<a-checkbox-group v-else-if="a.type === 9" @change="onChange($event, a.type, a.id, a.recordId)"> |
|
|
|
<a-checkbox-group |
|
|
|
:default-value="getList(a.optionVos)" |
|
|
|
v-else-if="a.type === 9" |
|
|
|
@change="onChange($event, a.type, a.id, a.recordId)" |
|
|
|
> |
|
|
|
<a-row> |
|
|
|
<a-col :span="24" v-for="(ques, indexNum) in a.optionVos" :key="indexNum"> |
|
|
|
<a-checkbox :value="ques.submitValue"> {{ ques.showValue }} </a-checkbox> |
|
|
|
</a-col> |
|
|
|
<a-col :span="100"> |
|
|
|
<div v-for="(j, k) in a.optionVos" :key="k"> |
|
|
|
<div |
|
|
|
v-if=" |
|
|
|
contentList.find(item => { |
|
|
|
return item.testQuestionsId === a.id && item.contents === `${j.showValue}`; |
|
|
|
}) && j.afterOperation === 1 |
|
|
|
" |
|
|
|
> |
|
|
|
<div v-if="j.afterOperation === 1"> |
|
|
|
<a-form-item :label-col="formItemLayout.labelCol" :wrapper-col="formItemLayout.wrapperCol"> |
|
|
|
<a-input style="width: 200px" @change="inputChange(a.id, $event, j.showValue)"></a-input> |
|
|
|
<a-input |
|
|
|
v-model="j.otherInformation" |
|
|
|
style="width: 200px" |
|
|
|
@change="inputChange1(a.id, $event, j.showValue, a.recordId, a.optionVos)" |
|
|
|
></a-input> |
|
|
|
</a-form-item> |
|
|
|
</div> |
|
|
|
</div> |
|
|
@ -96,49 +112,52 @@ |
|
|
|
</a-row> |
|
|
|
</a-checkbox-group> |
|
|
|
<div v-else-if="a.type === 10"> |
|
|
|
<a-select style="width: 120px" @change="onChange($event, a.type, a.id, a.recordId)"> |
|
|
|
<a-select :default-value="getAnswer(a.answer)" style="width: 120px" @change="onChange($event, a.type, a.id, a.recordId)"> |
|
|
|
<a-select-option v-for="(b, c) in a.optionVos" :key="c" :value="b.showValue"> {{ b.showValue }} </a-select-option> |
|
|
|
</a-select> |
|
|
|
<div v-for="(b, c) in a.optionVos" :key="c"> |
|
|
|
<div |
|
|
|
v-if=" |
|
|
|
contentList.find(item => { |
|
|
|
(contentList.find(item => { |
|
|
|
return item.testQuestionsId === a.id && item.contents === `${b.showValue}`; |
|
|
|
}) && b.afterOperation === 1 |
|
|
|
}) && |
|
|
|
b.afterOperation === 1) || |
|
|
|
(b.afterOperation === 1 && |
|
|
|
!contentList.find(item => { |
|
|
|
return item.testQuestionsId === a.id; |
|
|
|
})) |
|
|
|
" |
|
|
|
> |
|
|
|
<a-form-item :label-col="formItemLayout.labelCol" :wrapper-col="formItemLayout.wrapperCol"> |
|
|
|
<a-input style="width: 200px" @change="inputChange(a.id, $event, b.showValue)"></a-input> |
|
|
|
<a-input v-model="b.otherInformation" style="width: 200px" @change="inputChange(a.id, $event, b.showValue)"></a-input> |
|
|
|
</a-form-item> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<div v-else-if="a.type === 11"> |
|
|
|
<a-checkbox-group @change="onChange($event, a.type, a.id, a.recordId)"> |
|
|
|
<a-checkbox-group :default-value="getList(a.optionVos)" @change="onChange($event, a.type, a.id, a.recordId)"> |
|
|
|
<a-row> |
|
|
|
<a-col :span="24" v-for="(ques, indexNum) in a.optionVos" :key="indexNum"> |
|
|
|
<a-checkbox :value="ques.submitValue"> {{ ques.showValue }} </a-checkbox> |
|
|
|
</a-col> |
|
|
|
<a-col :span="100"> |
|
|
|
<div v-for="(b, c) in a.optionVos" :key="c"> |
|
|
|
<div |
|
|
|
v-if=" |
|
|
|
contentList.find(item => { |
|
|
|
return item.testQuestionsId === a.id && item.contents.find(content => content === `${b.showValue}`); |
|
|
|
}) && b.afterOperation > 0 |
|
|
|
" |
|
|
|
> |
|
|
|
<a-input style="width: 200px" @change="inputChange(a.id, $event, b.showValue)"></a-input> |
|
|
|
<div v-if="b.afterOperation > 0"> |
|
|
|
<a-input |
|
|
|
v-model="b.otherInformation" |
|
|
|
style="width: 200px" |
|
|
|
@change="inputChange1(a.id, $event, j.showValue, a.recordId, a.optionVos)" |
|
|
|
/> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</a-col> |
|
|
|
</a-row> |
|
|
|
说明: <a-input style="width: 200px" @change="explainChange(a.id, $event)" /> |
|
|
|
说明: <a-textarea style="width: 200px" @change="explainChange(a.id, $event)" /> |
|
|
|
</a-checkbox-group> |
|
|
|
</div> |
|
|
|
<!-- 当类型为12时,为单选+关联 --> |
|
|
|
<div v-else-if="a.type === 12"> |
|
|
|
<a-radio-group @change="onChange($event, a.type, a.id, a.recordId)"> |
|
|
|
<a-radio-group v-model="a.answer" @change="onChange($event, a.type, a.id, a.recordId)"> |
|
|
|
<a-radio v-for="(f, g) in a.optionVos" :key="g" :style="radioStyle" :value="f.showValue"> |
|
|
|
{{ f.showValue }} |
|
|
|
</a-radio> |
|
|
@ -146,13 +165,15 @@ |
|
|
|
<div v-for="(j, k) in a.optionVos" :key="k"> |
|
|
|
<div |
|
|
|
v-if=" |
|
|
|
contentList.find(item => { |
|
|
|
(contentList.find(item => { |
|
|
|
return item.testQuestionsId === a.id && item.contents === `${j.showValue}`; |
|
|
|
}) && j.afterOperation > 0 |
|
|
|
}) && |
|
|
|
j.afterOperation > 0) || |
|
|
|
(j.afterOperation > 0 && j.showValue === a.answer) |
|
|
|
" |
|
|
|
> |
|
|
|
<div v-for="(h, i) in j.questionVos" :key="i"> |
|
|
|
<a-form-item :label-col="formItemLayout.labelCol" :wrapper-col="formItemLayout.wrapperCol" :label="h.question"> |
|
|
|
<a-form-item :label-col="formItemLayout.labelCol" :wrapper-col="formItemLayout.wrapperCol"> |
|
|
|
<a-input |
|
|
|
v-if="j.afterOperation === 1" |
|
|
|
style="width: 200px" |
|
|
@ -160,156 +181,183 @@ |
|
|
|
></a-input> |
|
|
|
<a-textarea v-else-if="j.afterOperation === 2" @change="inputChange(a.id, $event, j.showValue)"></a-textarea> |
|
|
|
<div v-else-if="j.afterOperation === 3"> |
|
|
|
<div v-for="ohter in j.questionVos" :key="ohter.id"> |
|
|
|
<a-form-item |
|
|
|
:label-col="formItemLayout.labelCol" |
|
|
|
:wrapper-col="formItemLayout.wrapperCol" |
|
|
|
:label="ohter.question" |
|
|
|
> |
|
|
|
<a-input v-if="ohter.type === 1" @change="onChange($event, ohter.type, ohter.id, ohter.recordId)" /> |
|
|
|
<a-form-item :label-col="formItemLayout.labelCol" :wrapper-col="formItemLayout.wrapperCol" :label="h.question"> |
|
|
|
<a-input v-model="h.answer" v-if="h.type === 1" @change="onChange($event, h.type, h.id, h.recordId)" /> |
|
|
|
<a-textarea |
|
|
|
v-else-if="ohter.type === 2" |
|
|
|
v-model="h.answer" |
|
|
|
v-else-if="h.type === 2" |
|
|
|
style="height: 100px" |
|
|
|
@change="onChange($event, ohter.type, ohter.id)" |
|
|
|
@change="onChange($event, h.type, h.id)" |
|
|
|
/> |
|
|
|
<a-radio-group v-else-if="ohter.type === 3" @change="onChange($event, ohter.type, ohter.id, ohter.recordId)"> |
|
|
|
<a-radio v-for="(b, c) in ohter.optionVos" :key="c" :style="radioStyle" :value="b.showValue"> |
|
|
|
<a-radio-group v-model="h.answer" v-else-if="h.type === 3" @change="onChange($event, h.type, h.id, h.recordId)"> |
|
|
|
<a-radio v-for="(b, c) in h.optionVos" :key="c" :style="radioStyle" :value="b.showValue"> |
|
|
|
{{ b.showValue }} |
|
|
|
</a-radio> |
|
|
|
</a-radio-group> |
|
|
|
<a-checkbox-group v-else-if="ohter.type === 4" @change="onChange($event, ohter.type, ohter.id, ohter.recordId)"> |
|
|
|
<a-checkbox-group |
|
|
|
:default-value="getList(h.optionVos)" |
|
|
|
v-else-if="h.type === 4" |
|
|
|
@change="onChange($event, h.type, h.id, h.recordId)" |
|
|
|
> |
|
|
|
<a-row> |
|
|
|
<a-col :span="24" v-for="(ques, indexNum) in ohter.optionVos" :key="indexNum"> |
|
|
|
<a-col :span="24" v-for="(ques, indexNum) in h.optionVos" :key="indexNum"> |
|
|
|
<a-checkbox :value="ques.submitValue"> {{ ques.showValue }} </a-checkbox> |
|
|
|
</a-col> |
|
|
|
</a-row> |
|
|
|
</a-checkbox-group> |
|
|
|
<a-select |
|
|
|
v-else-if="ohter.type === 5" |
|
|
|
v-model="h.answer" |
|
|
|
v-else-if="h.type === 5" |
|
|
|
style="width: 120px" |
|
|
|
@change="onChange($event, ohter.type, ohter.id, ohter.recordId)" |
|
|
|
@change="onChange($event, h.type, h.id, h.recordId)" |
|
|
|
> |
|
|
|
<a-select-option v-for="(b, c) in ohter.optionVos" :key="c" :value="b.showValue"> |
|
|
|
<a-select-option v-for="(b, c) in h.optionVos" :key="c" :value="b.showValue"> |
|
|
|
{{ b.showValue }} |
|
|
|
</a-select-option> |
|
|
|
</a-select> |
|
|
|
<a-date-picker |
|
|
|
show-time |
|
|
|
placeholder="日期时间选择" |
|
|
|
v-else-if="ohter.type === 6" |
|
|
|
@change="onChange($event, ohter.type, ohter.id, ohter.recordId)" |
|
|
|
v-else-if="h.type === 6" |
|
|
|
:default-value="h.answer ? $moment(h.answer, dateFormat) : ''" |
|
|
|
@change="onChange($event, h.type, h.id, h.recordId)" |
|
|
|
/> |
|
|
|
<a-upload |
|
|
|
v-else-if="ohter.type === 7" |
|
|
|
v-else-if="h.type === 7" |
|
|
|
:action="action" |
|
|
|
:headers="headers" |
|
|
|
:default-file-list="fileList" |
|
|
|
list-type="picture" |
|
|
|
@change="fileChange($event, ohter.id)" |
|
|
|
@change="fileChange($event, h.id)" |
|
|
|
name="files" |
|
|
|
> |
|
|
|
<a-button v-show="fileList.length === 0"> <a-icon type="upload" /> 点击上传 </a-button> |
|
|
|
</a-upload> |
|
|
|
<a-radio-group v-else-if="ohter.type === 8" @change="onChange($event, ohter.type, ohter.id, ohter.recordId)"> |
|
|
|
<a-radio-group @change="onChange($event, ohter.type, ohter.id)"> |
|
|
|
<a-radio v-for="(f, g) in ohter.optionVos" :key="g" :style="radioStyle" :value="f.showValue"> |
|
|
|
<a-radio-group |
|
|
|
:default-value="getAnswer(h.answer)" |
|
|
|
v-else-if="h.type === 8" |
|
|
|
@change="onChange($event, h.type, h.id, h.recordId)" |
|
|
|
> |
|
|
|
<!-- <a-radio-group @change="onChange($event, h.type, h.id)"> --> |
|
|
|
<div> |
|
|
|
<a-radio v-for="(f, g) in h.optionVos" :key="g" :style="radioStyle" :value="f.showValue"> |
|
|
|
{{ f.showValue }} |
|
|
|
</a-radio> |
|
|
|
</a-radio-group> |
|
|
|
<div v-for="(m, n) in ohter.optionVos" :key="n"> |
|
|
|
</div> |
|
|
|
<!-- </a-radio-group> --> |
|
|
|
<div v-for="(m, n) in h.optionVos" :key="n"> |
|
|
|
<div |
|
|
|
v-if=" |
|
|
|
contentList.find(item => { |
|
|
|
return item.testQuestionsId === ohter.id && item.contents === `${m.showValue}`; |
|
|
|
}) && m.afterOperation === 1 |
|
|
|
(contentList.find(item => { |
|
|
|
return item.testQuestionsId === h.id && item.contents === `${m.showValue}`; |
|
|
|
}) && |
|
|
|
m.afterOperation === 1) || |
|
|
|
(m.afterOperation === 1 && |
|
|
|
!contentList.find(item => { |
|
|
|
return item.testQuestionsId === h.id; |
|
|
|
})) |
|
|
|
" |
|
|
|
> |
|
|
|
<a-form-item :label-col="formItemLayout.labelCol" :wrapper-col="formItemLayout.wrapperCol"> |
|
|
|
<a-input style="width: 200px" @change="inputChange(ohter.id, $event, m.showValue)"></a-input> |
|
|
|
<a-input |
|
|
|
v-model="m.otherInformation" |
|
|
|
style="width: 200px" |
|
|
|
@change="inputChange(h.id, $event, m.showValue)" |
|
|
|
></a-input> |
|
|
|
</a-form-item> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</a-radio-group> |
|
|
|
<a-checkbox-group v-else-if="ohter.type === 9" @change="onChange($event, ohter.type, ohter.id, ohter.recordId)"> |
|
|
|
<a-checkbox-group |
|
|
|
:default-value="getList(h.optionVos)" |
|
|
|
v-else-if="h.type === 9" |
|
|
|
@change="onChange($event, h.type, h.id, h.recordId)" |
|
|
|
> |
|
|
|
<a-row> |
|
|
|
<a-col :span="24" v-for="(ques, indexNum) in ohter.optionVos" :key="indexNum"> |
|
|
|
<a-col :span="24" v-for="(ques, indexNum) in h.optionVos" :key="indexNum"> |
|
|
|
<a-checkbox :value="ques.submitValue"> {{ ques.showValue }} </a-checkbox> |
|
|
|
</a-col> |
|
|
|
<a-col :span="100"> |
|
|
|
<div v-for="(m, n) in ohter.optionVos" :key="n"> |
|
|
|
<div |
|
|
|
v-if=" |
|
|
|
contentList.find(item => { |
|
|
|
return item.testQuestionsId === ohter.id && item.contents === `${m.showValue}`; |
|
|
|
}) && m.afterOperation === 1 |
|
|
|
" |
|
|
|
> |
|
|
|
<div v-for="(m, n) in h.optionVos" :key="n"> |
|
|
|
<div v-if="m.afterOperation === 1"> |
|
|
|
<a-form-item :label-col="formItemLayout.labelCol" :wrapper-col="formItemLayout.wrapperCol"> |
|
|
|
<a-input style="width: 200px" @change="inputChange(ohter.id, $event, m.showValue)"></a-input> |
|
|
|
<a-input |
|
|
|
v-model="m.otherInformation" |
|
|
|
style="width: 200px" |
|
|
|
@change="inputChange1(h.id, $event, m.showValue, h.recordId, h.optionVos)" |
|
|
|
></a-input> |
|
|
|
</a-form-item> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</a-col> |
|
|
|
</a-row> |
|
|
|
</a-checkbox-group> |
|
|
|
<div v-else-if="ohter.type === 10"> |
|
|
|
<a-select style="width: 120px" @change="onChange($event, ohter.type, ohter.id, ohter.recordId)"> |
|
|
|
<a-select-option v-for="(b, c) in ohter.optionVos" :key="c" :value="b.showValue"> |
|
|
|
<div v-else-if="h.type === 10"> |
|
|
|
<a-select |
|
|
|
:default-value="getAnswer(h.answer)" |
|
|
|
style="width: 120px" |
|
|
|
@change="onChange($event, h.type, h.id, h.recordId)" |
|
|
|
> |
|
|
|
<a-select-option v-for="(b, c) in h.optionVos" :key="c" :value="b.showValue"> |
|
|
|
{{ b.showValue }} |
|
|
|
</a-select-option> |
|
|
|
</a-select> |
|
|
|
<div v-for="(b, c) in ohter.optionVos" :key="c"> |
|
|
|
<div v-for="(b, c) in h.optionVos" :key="c"> |
|
|
|
<div |
|
|
|
v-if=" |
|
|
|
contentList.find(item => { |
|
|
|
return item.testQuestionsId === ohter.id && item.contents === `${b.showValue}`; |
|
|
|
}) && b.afterOperation === 1 |
|
|
|
(contentList.find(item => { |
|
|
|
return item.testQuestionsId === h.id && item.contents === `${b.showValue}`; |
|
|
|
}) && |
|
|
|
b.afterOperation === 1) || |
|
|
|
(b.afterOperation === 1 && |
|
|
|
!contentList.find(item => { |
|
|
|
return item.testQuestionsId === h.id; |
|
|
|
})) |
|
|
|
" |
|
|
|
> |
|
|
|
<a-form-item :label-col="formItemLayout.labelCol" :wrapper-col="formItemLayout.wrapperCol"> |
|
|
|
<a-input style="width: 200px" @change="inputChange(ohter.id, $event, b.showValue)"></a-input> |
|
|
|
<a-input |
|
|
|
v-model="b.otherInformation" |
|
|
|
style="width: 200px" |
|
|
|
@change="inputChange(h.id, $event, b.showValue)" |
|
|
|
></a-input> |
|
|
|
</a-form-item> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<div v-else-if="ohter.type === 11"> |
|
|
|
<a-checkbox-group @change="onChange($event, ohter.type, ohter.id, ohter.recordId)"> |
|
|
|
<div v-else-if="h.type === 11"> |
|
|
|
<a-checkbox-group :default-value="getList(h.optionVos)" @change="onChange($event, h.type, h.id, h.recordId)"> |
|
|
|
<a-row> |
|
|
|
<a-col :span="24" v-for="(ques, indexNum) in ohter.optionVos" :key="indexNum"> |
|
|
|
<a-col :span="24" v-for="(ques, indexNum) in h.optionVos" :key="indexNum"> |
|
|
|
<a-checkbox :value="ques.submitValue"> {{ ques.showValue }} </a-checkbox> |
|
|
|
</a-col> |
|
|
|
<a-col :span="100"> |
|
|
|
<div v-for="(b, c) in ohter.optionVos" :key="c"> |
|
|
|
<div |
|
|
|
v-if=" |
|
|
|
contentList.find(item => { |
|
|
|
return ( |
|
|
|
item.testQuestionsId === ohter.id && |
|
|
|
item.contents.find(content => content === `${b.showValue}`) |
|
|
|
); |
|
|
|
}) && b.afterOperation > 0 |
|
|
|
" |
|
|
|
> |
|
|
|
<a-input style="width: 200px" @change="inputChange(ohter.id, $event, b.showValue)"></a-input> |
|
|
|
<div v-for="(b, c) in h.optionVos" :key="c"> |
|
|
|
<div v-if="b.afterOperation > 0"> |
|
|
|
<a-input |
|
|
|
v-model="b.otherInformation" |
|
|
|
style="width: 200px" |
|
|
|
@change="inputChange1(h.id, $event, b.showValue, h.recordId, h.optionVos)" |
|
|
|
></a-input> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</a-col> |
|
|
|
</a-row> |
|
|
|
说明: <a-input style="width: 200px" @change="explainChange(ohter.id, $event)" /> |
|
|
|
说明: <a-input style="width: 200px" @change="explainChange(h.id, $event)" /> |
|
|
|
</a-checkbox-group> |
|
|
|
</div> |
|
|
|
<!-- 当类型为12时,为单选+关联 --> |
|
|
|
<div v-else-if="ohter.type === 12"> |
|
|
|
<a-radio-group @change="onChange($event, ohter.type, ohter.id, ohter.recordId)"> |
|
|
|
<a-radio v-for="(f, g) in ohter.optionVos" :key="g" :style="radioStyle" :value="f.showValue"> |
|
|
|
<div v-else-if="h.type === 12"> |
|
|
|
<a-radio-group v-model="h.answer" @change="onChange($event, h.type, h.id, h.recordId)"> |
|
|
|
<a-radio v-for="(f, g) in h.optionVos" :key="g" :style="radioStyle" :value="f.showValue"> |
|
|
|
{{ f.showValue }} |
|
|
|
</a-radio> |
|
|
|
</a-radio-group> |
|
|
|
<div v-for="(m, n) in ohter.optionVos" :key="n"> |
|
|
|
<div v-for="(m, n) in h.optionVos" :key="n"> |
|
|
|
<div |
|
|
|
v-if=" |
|
|
|
contentList.find(item => { |
|
|
|
return item.testQuestionsId === ohter.id && item.contents === `${m.showValue}`; |
|
|
|
return item.testQuestionsId === h.id && item.contents === `${m.showValue}`; |
|
|
|
}) && m.afterOperation > 0 |
|
|
|
" |
|
|
|
> |
|
|
@ -322,11 +370,11 @@ |
|
|
|
<a-input |
|
|
|
v-if="m.afterOperation === 1" |
|
|
|
style="width: 200px" |
|
|
|
@change="inputChange(ohter.id, $event, m.showValue)" |
|
|
|
@change="inputChange(h.id, $event, m.showValue)" |
|
|
|
></a-input> |
|
|
|
<a-textarea |
|
|
|
v-else-if="m.afterOperation === 2" |
|
|
|
@change="inputChange(ohter.id, $event, m.showValue)" |
|
|
|
@change="inputChange(h.id, $event, m.showValue)" |
|
|
|
></a-textarea> |
|
|
|
<div v-else-if="m.afterOperation === 3">qwe</div> |
|
|
|
</a-form-item> |
|
|
@ -334,13 +382,12 @@ |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<div v-else-if="ohter.type === 13"> |
|
|
|
<a-input-number @change="onChange($event, ohter.type, ohter.id, ohter.recordId)" /> |
|
|
|
<div v-else-if="h.type === 13"> |
|
|
|
<a-input-number v-model="h.answer" @change="onChange($event, h.type, h.id, h.recordId)" /> |
|
|
|
</div> |
|
|
|
<div v-else-if="ohter.type === 14">图片识别</div> |
|
|
|
<div v-else-if="h.type === 14">图片识别</div> |
|
|
|
</a-form-item> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</a-form-item> |
|
|
|
</div> |
|
|
|
</div> |
|
|
@ -356,30 +403,45 @@ |
|
|
|
<div v-for="w in item.subReportCodes" :key="w.name"> |
|
|
|
<a-form-item :label-col="formItemLayout.labelCol" :wrapper-col="formItemLayout.wrapperCol"> |
|
|
|
<!-- 二级大标题 --> |
|
|
|
<h3>{{ w.name }}:</h3> |
|
|
|
<span class="hhh2"> {{ w.name }}:</span> |
|
|
|
</a-form-item> |
|
|
|
<!-- 二级标题下的各种类型 --> |
|
|
|
<div v-for="e in w.questionVos" :key="e.name"> |
|
|
|
<a-form-item :label-col="formItemLayout.labelCol" :wrapper-col="formItemLayout.wrapperCol" :label="e.question"> |
|
|
|
<a-input v-if="e.type === 1" @change="onChange($event, e.type, e.id, e.recordId)" /> |
|
|
|
<a-textarea v-else-if="e.type === 2" style="height: 100px" @change="onChange($event, e.type, e.id, e.recordId)" /> |
|
|
|
<a-radio-group v-else-if="e.type === 3" @change="onChange($event, e.type, e.id, e.recordId)"> |
|
|
|
<a-input v-model="e.answer" v-if="e.type === 1" @change="onChange($event, e.type, e.id, e.recordId)" /> |
|
|
|
<a-textarea |
|
|
|
v-model="e.answer" |
|
|
|
v-else-if="e.type === 2" |
|
|
|
style="height: 100px" |
|
|
|
@change="onChange($event, e.type, e.id, e.recordId)" |
|
|
|
/> |
|
|
|
<a-radio-group v-model="e.answer" v-else-if="e.type === 3" @change="onChange($event, e.type, e.id, e.recordId)"> |
|
|
|
<a-radio v-for="(b, c) in e.optionVos" :key="c" :style="radioStyle" :value="b.showValue"> {{ b.showValue }} </a-radio> |
|
|
|
</a-radio-group> |
|
|
|
<a-checkbox-group v-else-if="e.type === 4" @change="onChange($event, e.type, e.id, e.recordId)"> |
|
|
|
<a-checkbox-group |
|
|
|
:default-value="getList(e.optionVos)" |
|
|
|
v-else-if="e.type === 4" |
|
|
|
@change="onChange($event, e.type, e.id, e.recordId)" |
|
|
|
> |
|
|
|
<a-row> |
|
|
|
<a-col :span="24" v-for="(ques, indexNum) in e.optionVos" :key="indexNum"> |
|
|
|
<a-checkbox :value="ques.submitValue"> {{ ques.showValue }} </a-checkbox> |
|
|
|
</a-col> |
|
|
|
</a-row> |
|
|
|
</a-checkbox-group> |
|
|
|
<a-select v-else-if="e.type === 5" style="width: 120px" @change="onChange($event, e.type, e.id, e.recordId)"> |
|
|
|
<a-select |
|
|
|
v-model="e.answer" |
|
|
|
v-else-if="e.type === 5" |
|
|
|
style="width: 120px" |
|
|
|
@change="onChange($event, e.type, e.id, e.recordId)" |
|
|
|
> |
|
|
|
<a-select-option v-for="(b, c) in e.optionVos" :key="c" :value="b.showValue"> {{ b.showValue }} </a-select-option> |
|
|
|
</a-select> |
|
|
|
<a-date-picker |
|
|
|
show-time |
|
|
|
placeholder="日期时间选择" |
|
|
|
v-else-if="e.type === 6" |
|
|
|
:default-value="e.answer ? $moment(e.answer, dateFormat) : ''" |
|
|
|
@change="onChange($event, e.type, e.id, e.recordId)" |
|
|
|
/> |
|
|
|
<a-upload |
|
|
@ -393,7 +455,11 @@ |
|
|
|
> |
|
|
|
<a-button v-show="fileList.length === 0"> <a-icon type="upload" /> 点击上传 </a-button> |
|
|
|
</a-upload> |
|
|
|
<a-radio-group v-else-if="e.type === 8" @change="onChange($event, e.type, e.id, e.recordId)"> |
|
|
|
<a-radio-group |
|
|
|
:default-value="getAnswer(e.answer)" |
|
|
|
v-else-if="e.type === 8" |
|
|
|
@change="onChange($event, e.type, e.id, e.recordId)" |
|
|
|
> |
|
|
|
<a-radio-group @change="onChange($event, e.type, e.id)"> |
|
|
|
<a-radio v-for="(f, g) in e.optionVos" :key="g" :style="radioStyle" :value="f.showValue"> |
|
|
|
{{ f.showValue }} |
|
|
@ -402,33 +468,40 @@ |
|
|
|
<div v-for="(j, k) in e.optionVos" :key="k"> |
|
|
|
<div |
|
|
|
v-if=" |
|
|
|
contentList.find(item => { |
|
|
|
(contentList.find(item => { |
|
|
|
return item.testQuestionsId === e.id && item.contents === `${j.showValue}`; |
|
|
|
}) && j.afterOperation === 1 |
|
|
|
}) && |
|
|
|
j.afterOperation === 1) || |
|
|
|
(j.afterOperation === 1 && |
|
|
|
!contentList.find(item => { |
|
|
|
return item.testQuestionsId === e.id; |
|
|
|
})) |
|
|
|
" |
|
|
|
> |
|
|
|
<a-form-item :label-col="formItemLayout.labelCol" :wrapper-col="formItemLayout.wrapperCol"> |
|
|
|
<a-input style="width: 200px" @change="inputChange(e.id, $event, j.showValue)"></a-input> |
|
|
|
<a-input v-model="j.otherInformation" style="width: 200px" @change="inputChange(e.id, $event, j.showValue)"></a-input> |
|
|
|
</a-form-item> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</a-radio-group> |
|
|
|
<a-checkbox-group v-else-if="e.type === 9" @change="onChange($event, e.type, e.id, e.recordId)"> |
|
|
|
<a-checkbox-group |
|
|
|
:default-value="getList(e.optionVos)" |
|
|
|
v-else-if="e.type === 9" |
|
|
|
@change="onChange($event, e.type, e.id, e.recordId)" |
|
|
|
> |
|
|
|
<a-row> |
|
|
|
<a-col :span="24" v-for="(ques, indexNum) in e.optionVos" :key="indexNum"> |
|
|
|
<a-checkbox :value="ques.submitValue"> {{ ques.showValue }} </a-checkbox> |
|
|
|
</a-col> |
|
|
|
<a-col :span="100"> |
|
|
|
<div v-for="(j, k) in e.optionVos" :key="k"> |
|
|
|
<div |
|
|
|
v-if=" |
|
|
|
contentList.find(item => { |
|
|
|
return item.testQuestionsId === e.id && item.contents === `${j.showValue}`; |
|
|
|
}) && j.afterOperation === 1 |
|
|
|
" |
|
|
|
> |
|
|
|
<div v-if="j.afterOperation === 1"> |
|
|
|
<a-form-item :label-col="formItemLayout.labelCol" :wrapper-col="formItemLayout.wrapperCol"> |
|
|
|
<a-input style="width: 200px" @change="inputChange(e.id, $event, j.showValue)"></a-input> |
|
|
|
<a-input |
|
|
|
v-model="j.otherInformation" |
|
|
|
style="width: 200px" |
|
|
|
@change="inputChange1(e.id, $event, j.showValue, e.recordId, e.optionVos)" |
|
|
|
></a-input> |
|
|
|
</a-form-item> |
|
|
|
</div> |
|
|
|
</div> |
|
|
@ -436,39 +509,42 @@ |
|
|
|
</a-row> |
|
|
|
</a-checkbox-group> |
|
|
|
<div v-else-if="e.type === 10"> |
|
|
|
<a-select style="width: 120px" @change="onChange($event, e.type, e.id, e.recordId)"> |
|
|
|
<a-select :default-value="getAnswer(e.answer)" style="width: 120px" @change="onChange($event, e.type, e.id, e.recordId)"> |
|
|
|
<a-select-option v-for="(b, c) in e.optionVos" :key="c" :value="b.showValue"> {{ b.showValue }} </a-select-option> |
|
|
|
</a-select> |
|
|
|
<div v-for="(b, c) in e.optionVos" :key="c"> |
|
|
|
<div |
|
|
|
v-if=" |
|
|
|
contentList.find(item => { |
|
|
|
(contentList.find(item => { |
|
|
|
return item.testQuestionsId === e.id && item.contents === `${b.showValue}`; |
|
|
|
}) && b.afterOperation === 1 |
|
|
|
}) && |
|
|
|
b.afterOperation === 1) || |
|
|
|
(b.afterOperation === 1 && |
|
|
|
!contentList.find(item => { |
|
|
|
return item.testQuestionsId === e.id; |
|
|
|
})) |
|
|
|
" |
|
|
|
> |
|
|
|
<a-form-item :label-col="formItemLayout.labelCol" :wrapper-col="formItemLayout.wrapperCol"> |
|
|
|
<a-input style="width: 200px" @change="inputChange(e.id, $event, b.showValue)"></a-input> |
|
|
|
<a-input v-model="b.otherInformation" style="width: 200px" @change="inputChange(e.id, $event, b.showValue)"></a-input> |
|
|
|
</a-form-item> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<div v-else-if="e.type === 11"> |
|
|
|
<a-checkbox-group @change="onChange($event, e.type, e.id, e.recordId)"> |
|
|
|
<a-checkbox-group :default-value="getList(e.optionVos)" @change="onChange($event, e.type, e.id, e.recordId)"> |
|
|
|
<a-row> |
|
|
|
<a-col :span="24" v-for="(ques, indexNum) in e.optionVos" :key="indexNum"> |
|
|
|
<a-checkbox :value="ques.submitValue"> {{ ques.showValue }} </a-checkbox> |
|
|
|
</a-col> |
|
|
|
<a-col :span="100"> |
|
|
|
<div v-for="(b, c) in e.optionVos" :key="c"> |
|
|
|
<div |
|
|
|
v-if=" |
|
|
|
contentList.find(item => { |
|
|
|
return item.testQuestionsId === e.id && item.contents.find(content => content === `${b.showValue}`); |
|
|
|
}) && b.afterOperation > 0 |
|
|
|
" |
|
|
|
> |
|
|
|
<a-input style="width: 200px" @change="inputChange(e.id, $event, b.showValue)"></a-input> |
|
|
|
<div v-if="b.afterOperation > 0"> |
|
|
|
<a-input |
|
|
|
v-model="b.otherInformation" |
|
|
|
style="width: 200px" |
|
|
|
@change="inputChange1(e.id, $event, b.showValue, e.recordId, e.optionVos)" |
|
|
|
></a-input> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</a-col> |
|
|
@ -478,7 +554,7 @@ |
|
|
|
</div> |
|
|
|
<!-- 当类型为12时,为单选+关联 --> |
|
|
|
<div v-else-if="e.type === 12"> |
|
|
|
<a-radio-group @change="onChange($event, e.type, e.id, e.recordId)"> |
|
|
|
<a-radio-group v-model="e.answer" @change="onChange($event, e.type, e.id, e.recordId)"> |
|
|
|
<a-radio v-for="(f, g) in e.optionVos" :key="g" :style="radioStyle" :value="f.showValue"> |
|
|
|
{{ f.showValue }} |
|
|
|
</a-radio> |
|
|
@ -486,9 +562,11 @@ |
|
|
|
<div v-for="(j, k) in e.optionVos" :key="k"> |
|
|
|
<div |
|
|
|
v-if=" |
|
|
|
contentList.find(item => { |
|
|
|
(contentList.find(item => { |
|
|
|
return item.testQuestionsId === e.id && item.contents === `${j.showValue}`; |
|
|
|
}) && j.afterOperation > 0 |
|
|
|
}) && |
|
|
|
j.afterOperation > 0) || |
|
|
|
(j.afterOperation > 0 && j.showValue === e.answer) |
|
|
|
" |
|
|
|
> |
|
|
|
<div v-for="(h, i) in j.questionVos" :key="i"> |
|
|
@ -501,25 +579,35 @@ |
|
|
|
<a-textarea v-else-if="j.afterOperation === 2" @change="inputChange(e.id, $event, j.showValue)"></a-textarea> |
|
|
|
<div v-else-if="j.afterOperation === 3"> |
|
|
|
<a-form-item> |
|
|
|
<a-input v-if="h.type === 1" @change="onChange($event, h.type, h.id, h.h.recordId)" /> |
|
|
|
<a-input v-model="h.answer" v-if="h.type === 1" @change="onChange($event, h.type, h.id, h.h.recordId)" /> |
|
|
|
<a-textarea |
|
|
|
v-model="h.answer" |
|
|
|
v-else-if="h.type === 2" |
|
|
|
style="height: 100px" |
|
|
|
@change="onChange($event, h.type, h.id, h.recordId)" |
|
|
|
/> |
|
|
|
<a-radio-group v-else-if="h.type === 3" @change="onChange($event, h.type, h.id, h.recordId)"> |
|
|
|
<a-radio-group v-model="h.answer" v-else-if="h.type === 3" @change="onChange($event, h.type, h.id, h.recordId)"> |
|
|
|
<a-radio v-for="(b, c) in h.optionVos" :key="c" :style="radioStyle" :value="b.showValue"> |
|
|
|
{{ b.showValue }} |
|
|
|
</a-radio> |
|
|
|
</a-radio-group> |
|
|
|
<a-checkbox-group v-else-if="h.type === 4" @change="onChange($event, h.type, h.id, h.recordId)"> |
|
|
|
<a-checkbox-group |
|
|
|
:default-value="getList(h.optionVos)" |
|
|
|
v-else-if="h.type === 4" |
|
|
|
@change="onChange($event, h.type, h.id, h.recordId)" |
|
|
|
> |
|
|
|
<a-row> |
|
|
|
<a-col :span="24" v-for="(ques, indexNum) in h.optionVos" :key="indexNum"> |
|
|
|
<a-checkbox :value="ques.submitValue"> {{ ques.showValue }} </a-checkbox> |
|
|
|
</a-col> |
|
|
|
</a-row> |
|
|
|
</a-checkbox-group> |
|
|
|
<a-select v-else-if="h.type === 5" style="width: 120px" @change="onChange($event, h.type, h.id, h.recordId)"> |
|
|
|
<a-select |
|
|
|
v-model="h.answer" |
|
|
|
v-else-if="h.type === 5" |
|
|
|
style="width: 120px" |
|
|
|
@change="onChange($event, h.type, h.id, h.recordId)" |
|
|
|
> |
|
|
|
<a-select-option v-for="(b, c) in h.optionVos" :key="c" :value="b.showValue"> |
|
|
|
{{ b.showValue }} |
|
|
|
</a-select-option> |
|
|
@ -528,6 +616,7 @@ |
|
|
|
show-time |
|
|
|
placeholder="日期时间选择" |
|
|
|
v-else-if="h.type === 6" |
|
|
|
:default-value="h.answer ? $moment(h.answer, dateFormat) : ''" |
|
|
|
@change="onChange($event, h.type, h.id, h.recordId)" |
|
|
|
/> |
|
|
|
<a-upload |
|
|
@ -541,42 +630,59 @@ |
|
|
|
> |
|
|
|
<a-button v-show="fileList.length === 0"> <a-icon type="upload" /> 点击上传 </a-button> |
|
|
|
</a-upload> |
|
|
|
<a-radio-group v-else-if="h.type === 8" @change="onChange($event, h.type, h.id, h.recordId)"> |
|
|
|
<a-radio-group @change="onChange($event, h.type, h.id, h.recordId)"> |
|
|
|
<a-radio-group |
|
|
|
:default-value="getAnswer(h.answer)" |
|
|
|
v-else-if="h.type === 8" |
|
|
|
@change="onChange($event, h.type, h.id, h.recordId)" |
|
|
|
> |
|
|
|
<!-- <a-radio-group @change="onChange($event, h.type, h.id, h.recordId)"> --> |
|
|
|
<div> |
|
|
|
<a-radio v-for="(f, g) in h.optionVos" :key="g" :style="radioStyle" :value="f.showValue"> |
|
|
|
{{ f.showValue }} |
|
|
|
</a-radio> |
|
|
|
</a-radio-group> |
|
|
|
</div> |
|
|
|
<!-- </a-radio-group> --> |
|
|
|
<div v-for="(m, n) in h.optionVos" :key="n"> |
|
|
|
<div |
|
|
|
v-if=" |
|
|
|
contentList.find(item => { |
|
|
|
(contentList.find(item => { |
|
|
|
return item.testQuestionsId === h.id && item.contents === `${m.showValue}`; |
|
|
|
}) && m.afterOperation === 1 |
|
|
|
}) && |
|
|
|
m.afterOperation === 1) || |
|
|
|
(m.afterOperation === 1 && |
|
|
|
!contentList.find(item => { |
|
|
|
return item.testQuestionsId === h.id; |
|
|
|
})) |
|
|
|
" |
|
|
|
> |
|
|
|
<a-form-item :label-col="formItemLayout.labelCol" :wrapper-col="formItemLayout.wrapperCol"> |
|
|
|
<a-input style="width: 200px" @change="inputChange(h.id, $event, m.showValue)"></a-input> |
|
|
|
<a-input |
|
|
|
v-model="m.otherInformation" |
|
|
|
style="width: 200px" |
|
|
|
@change="inputChange(h.id, $event, m.showValue)" |
|
|
|
></a-input> |
|
|
|
</a-form-item> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</a-radio-group> |
|
|
|
<a-checkbox-group v-else-if="h.type === 9" @change="onChange($event, h.type, h.id, h.recordId)"> |
|
|
|
<a-checkbox-group |
|
|
|
:default-value="getList(h.optionVos)" |
|
|
|
v-else-if="h.type === 9" |
|
|
|
@change="onChange($event, h.type, h.id, h.recordId)" |
|
|
|
> |
|
|
|
<a-row> |
|
|
|
<a-col :span="24" v-for="(ques, indexNum) in h.optionVos" :key="indexNum"> |
|
|
|
<a-checkbox :value="ques.submitValue"> {{ ques.showValue }} </a-checkbox> |
|
|
|
</a-col> |
|
|
|
<a-col :span="100"> |
|
|
|
<div v-for="(m, n) in h.optionVos" :key="n"> |
|
|
|
<div |
|
|
|
v-if=" |
|
|
|
contentList.find(item => { |
|
|
|
return item.testQuestionsId === h.id && item.contents === `${m.showValue}`; |
|
|
|
}) && m.afterOperation === 1 |
|
|
|
" |
|
|
|
> |
|
|
|
<div v-if="m.afterOperation === 1"> |
|
|
|
<a-form-item :label-col="formItemLayout.labelCol" :wrapper-col="formItemLayout.wrapperCol"> |
|
|
|
<a-input style="width: 200px" @change="inputChange(h.id, $event, m.showValue)"></a-input> |
|
|
|
<a-input |
|
|
|
v-model="m.otherInformation" |
|
|
|
style="width: 200px" |
|
|
|
@change="inputChange1(h.id, $event, m.showValue, h.recordId, h.optionVos)" |
|
|
|
></a-input> |
|
|
|
</a-form-item> |
|
|
|
</div> |
|
|
|
</div> |
|
|
@ -584,7 +690,11 @@ |
|
|
|
</a-row> |
|
|
|
</a-checkbox-group> |
|
|
|
<div v-else-if="h.type === 10"> |
|
|
|
<a-select style="width: 120px" @change="onChange($event, h.type, h.id, h.recordId)"> |
|
|
|
<a-select |
|
|
|
:default-value="getAnswer(h.answer)" |
|
|
|
style="width: 120px" |
|
|
|
@change="onChange($event, h.type, h.id, h.recordId)" |
|
|
|
> |
|
|
|
<a-select-option v-for="(b, c) in h.optionVos" :key="c" :value="b.showValue"> |
|
|
|
{{ b.showValue }} |
|
|
|
</a-select-option> |
|
|
@ -592,35 +702,40 @@ |
|
|
|
<div v-for="(b, c) in h.optionVos" :key="c"> |
|
|
|
<div |
|
|
|
v-if=" |
|
|
|
contentList.find(item => { |
|
|
|
(contentList.find(item => { |
|
|
|
return item.testQuestionsId === h.id && item.contents === `${b.showValue}`; |
|
|
|
}) && b.afterOperation === 1 |
|
|
|
}) && |
|
|
|
b.afterOperation === 1) || |
|
|
|
(b.afterOperation === 1 && |
|
|
|
!contentList.find(item => { |
|
|
|
return item.testQuestionsId === h.id; |
|
|
|
})) |
|
|
|
" |
|
|
|
> |
|
|
|
<a-form-item :label-col="formItemLayout.labelCol" :wrapper-col="formItemLayout.wrapperCol"> |
|
|
|
<a-input style="width: 200px" @change="inputChange(h.id, $event, b.showValue)"></a-input> |
|
|
|
<a-input |
|
|
|
v-model="b.otherInformation" |
|
|
|
style="width: 200px" |
|
|
|
@change="inputChange(h.id, $event, b.showValue)" |
|
|
|
></a-input> |
|
|
|
</a-form-item> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<div v-else-if="h.type === 11"> |
|
|
|
<a-checkbox-group @change="onChange($event, h.type, h.id, h.recordId)"> |
|
|
|
<a-checkbox-group :default-value="getList(h.optionVos)" @change="onChange($event, h.type, h.id, h.recordId)"> |
|
|
|
<a-row> |
|
|
|
<a-col :span="24" v-for="(ques, indexNum) in h.optionVos" :key="indexNum"> |
|
|
|
<a-checkbox :value="ques.submitValue"> {{ ques.showValue }} </a-checkbox> |
|
|
|
</a-col> |
|
|
|
<a-col :span="100"> |
|
|
|
<div v-for="(b, c) in h.optionVos" :key="c"> |
|
|
|
<div |
|
|
|
v-if=" |
|
|
|
contentList.find(item => { |
|
|
|
return ( |
|
|
|
item.testQuestionsId === h.id && item.contents.find(content => content === `${b.showValue}`) |
|
|
|
); |
|
|
|
}) && b.afterOperation > 0 |
|
|
|
" |
|
|
|
> |
|
|
|
<a-input style="width: 200px" @change="inputChange(h.id, $event, b.showValue)"></a-input> |
|
|
|
<div v-if="b.afterOperation > 0"> |
|
|
|
<a-input |
|
|
|
v-model="b.otherInformation" |
|
|
|
style="width: 200px" |
|
|
|
@change="inputChange1(h.id, $event, b.showValue, h.recordId, h.optionVos)" |
|
|
|
></a-input> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</a-col> |
|
|
@ -630,7 +745,7 @@ |
|
|
|
</div> |
|
|
|
<!-- 当类型为12时,为单选+关联 --> |
|
|
|
<div v-else-if="h.type === 12"> |
|
|
|
<a-radio-group @change="onChange($event, h.type, h.id, h.recordId)"> |
|
|
|
<a-radio-group v-model="h.answer" @change="onChange($event, h.type, h.id, h.recordId)"> |
|
|
|
<a-radio v-for="(f, g) in h.optionVos" :key="g" :style="radioStyle" :value="f.showValue"> |
|
|
|
{{ f.showValue }} |
|
|
|
</a-radio> |
|
|
@ -665,7 +780,7 @@ |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<div v-else-if="h.type === 13"> |
|
|
|
<a-input-number @change="onChange($event, h.type, h.id, h.recordId)" /> |
|
|
|
<a-input-number v-model="h.answer" @change="onChange($event, h.type, h.id, h.recordId)" /> |
|
|
|
</div> |
|
|
|
<div v-else-if="h.type === 14">图片识别</div> |
|
|
|
</a-form-item> |
|
|
@ -676,7 +791,7 @@ |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<div v-else-if="e.type === 13"> |
|
|
|
<a-input-number @change="onChange($event, e.type, e.id, e.recordId)" /> |
|
|
|
<a-input-number v-model="e.answer" @change="onChange($event, e.type, e.id, e.recordId)" /> |
|
|
|
</div> |
|
|
|
<div v-else-if="e.type === 14">图片识别</div> |
|
|
|
</a-form-item> |
|
|
@ -691,7 +806,9 @@ |
|
|
|
class="white--text" |
|
|
|
@change="changeDate" |
|
|
|
/> |
|
|
|
<a-button class="white--text px-10" type="primary" @click="setData()" v-if="list.length > 0" style="margin-top: 40px">提交</a-button> |
|
|
|
<a-button class="white--text px-10" type="primary" @click="setData()" v-if="list.length > 0 && getCode" style="margin-top: 40px"> |
|
|
|
提交 |
|
|
|
</a-button> |
|
|
|
</div> |
|
|
|
</template> |
|
|
|
|
|
|
@ -700,7 +817,7 @@ import { mapState } from 'vuex'; |
|
|
|
import { queryAll, saveCaseMes, upload } from 'config/api'; |
|
|
|
const formItemLayout = { |
|
|
|
labelCol: { span: 6 }, |
|
|
|
wrapperCol: { span: 9 }, |
|
|
|
wrapperCol: { span: 12 }, |
|
|
|
}; |
|
|
|
const tailItemLayout = { wrapperCol: { span: 18, offset: 4 } }; |
|
|
|
export default { |
|
|
@ -711,6 +828,7 @@ export default { |
|
|
|
tailItemLayout, |
|
|
|
form: this.$form.createForm(this, { name: 'page-add' }), |
|
|
|
value: 1, |
|
|
|
checked: true, |
|
|
|
radioStyle: { |
|
|
|
display: 'block', |
|
|
|
height: '30px', |
|
|
@ -754,8 +872,26 @@ export default { |
|
|
|
this.getQuery(); |
|
|
|
}, |
|
|
|
methods: { |
|
|
|
getList(obj) { |
|
|
|
let arr = []; |
|
|
|
for (let i = 0; i < obj.length; i++) { |
|
|
|
if (obj[i].choose - 0 === 1) { |
|
|
|
arr.push(obj[i].showValue); |
|
|
|
} |
|
|
|
} |
|
|
|
return arr; |
|
|
|
}, |
|
|
|
getAnswer(str) { |
|
|
|
if (str) { |
|
|
|
let strArr = str.split(':'); |
|
|
|
console.log(strArr[0]); |
|
|
|
return strArr[0]; |
|
|
|
} else { |
|
|
|
return ''; |
|
|
|
} |
|
|
|
}, |
|
|
|
callback(key) { |
|
|
|
console.log(key); |
|
|
|
this.contentList = []; |
|
|
|
this.tabNums = key; |
|
|
|
}, |
|
|
|
async getQuery() { |
|
|
@ -780,8 +916,6 @@ export default { |
|
|
|
} else { |
|
|
|
this.tabList = [180, 360]; |
|
|
|
} |
|
|
|
} else { |
|
|
|
this.tabList = [0, 14, 90]; |
|
|
|
} |
|
|
|
} else { |
|
|
|
console.log(msg); |
|
|
@ -827,7 +961,7 @@ export default { |
|
|
|
// 多选 + 其他 |
|
|
|
// 如果type === 9 : 删除所有选项,重新添加,文本框继续存在,可以存给后台 |
|
|
|
for (let i = 0; i < this.contentList.length; i++) { |
|
|
|
if (id === this.contentList[i].testQuestionsId && !this.contentList[i].type) { |
|
|
|
if (id === this.contentList[i].testQuestionsId && !this.contentList[i].contentsType) { |
|
|
|
this.contentList.splice(i, 1); |
|
|
|
i -= 1; |
|
|
|
} |
|
|
@ -942,7 +1076,7 @@ export default { |
|
|
|
// 遍历数组,删除本题已经答过的所有答案 |
|
|
|
ergodicList(id) { |
|
|
|
for (let i = 0; i < this.contentList.length; i++) { |
|
|
|
if (this.contentList[i].testQuestionsId === id) { |
|
|
|
if (this.contentList[i].testQuestionsId === id && !this.contentList[i].contentsType) { |
|
|
|
this.contentList.splice(i, 1); |
|
|
|
i -= 1; |
|
|
|
} |
|
|
@ -966,6 +1100,45 @@ export default { |
|
|
|
this.contentList.push(obj); |
|
|
|
} |
|
|
|
}, |
|
|
|
// 多选其他输入框发生改变时 |
|
|
|
inputChange1(id, e, value, recordId, list) { |
|
|
|
let listArr = this.getList(list); |
|
|
|
console.log(listArr); |
|
|
|
console.log(id); |
|
|
|
let numkg = 0; |
|
|
|
for (let i = 0; i < this.contentList.length; i++) { |
|
|
|
if (this.contentList[i].testQuestionsId === id) { |
|
|
|
numkg = 1; |
|
|
|
} |
|
|
|
} |
|
|
|
if (numkg === 0) { |
|
|
|
for (let i = 0; i < listArr.length; i++) { |
|
|
|
let obj11 = { |
|
|
|
testQuestionsId: id, |
|
|
|
contents: listArr[i], |
|
|
|
patientRecordId: recordId ? recordId : '', |
|
|
|
contentsType: 0, |
|
|
|
}; |
|
|
|
this.contentList.push(obj11); |
|
|
|
} |
|
|
|
} |
|
|
|
for (let i = 0; i < this.contentList.length; i++) { |
|
|
|
if (this.contentList[i].testQuestionsId === id && this.contentList[i].contentsType === 1) { |
|
|
|
this.contentList.splice(i, 1); |
|
|
|
i -= 1; |
|
|
|
} |
|
|
|
} |
|
|
|
if (e.target.value !== '') { |
|
|
|
let obj = { |
|
|
|
testQuestionsId: id, |
|
|
|
contents: value + ':' + e.target.value, |
|
|
|
patientRecordId: recordId ? recordId : '', |
|
|
|
contentsType: 1, |
|
|
|
}; |
|
|
|
this.contentList.push(obj); |
|
|
|
} |
|
|
|
console.log(this.contentList); |
|
|
|
}, |
|
|
|
// 说明输入框发生改变时 |
|
|
|
explainChange(id, e, recordId) { |
|
|
|
for (let i = 0; i < this.contentList.length; i++) { |
|
|
@ -1042,4 +1215,11 @@ export default { |
|
|
|
}; |
|
|
|
</script> |
|
|
|
|
|
|
|
<style lang="stylus" scoped></style> |
|
|
|
<style lang="stylus" scoped> |
|
|
|
.hhh2 { |
|
|
|
font-size: 20px; |
|
|
|
font-weight: bold; |
|
|
|
margin-left: 24px; |
|
|
|
color: rgba(0, 0, 0, 0.75); |
|
|
|
} |
|
|
|
</style> |
|
|
|