|
|
@ -1,11 +1,13 @@ |
|
|
|
<template> |
|
|
|
<div class="flex-column"> |
|
|
|
<a-tabs @change="callback" type="card"> |
|
|
|
<a-tab-pane :key="item" :tab="typeof item === 'number' ? item + '天' : item" v-for="item in tabList" width="100" /> |
|
|
|
</a-tabs> |
|
|
|
<div :style="{ width: width }"> |
|
|
|
<a-tabs @change="callback" tab-position="top"> |
|
|
|
<a-tab-pane :key="item" :tab="typeof item === 'number' ? item + '天' : item" v-for="item in tabList" width="100" /> |
|
|
|
</a-tabs> |
|
|
|
</div> |
|
|
|
<a-form :form="form" v-if="typeof tabNums === 'number'"> |
|
|
|
<a-spin :spinning="spinning"> |
|
|
|
<a-collapse v-model="activeKey" style="boeder-bottom: none !important"> |
|
|
|
<a-collapse v-model="activeKey" style="boeder-bottom: none !important" accordion> |
|
|
|
<!-- 首先遍历整个data大数组 --> |
|
|
|
<!-- <div v-for="(item, index) in list" :key="index"> --> |
|
|
|
<a-collapse-panel :header="item.name" :key="index.toString()" v-for="(item, index) in list"> |
|
|
@ -84,7 +86,7 @@ |
|
|
|
style="width: 100%" |
|
|
|
> |
|
|
|
<a-row class="flex-1 flex-wrap"> |
|
|
|
<div style="width: 100%" :key="indexNum" :span="24" v-for="(ques, indexNum) in a.optionVos"> |
|
|
|
<div style="width: 60%" :key="indexNum" :span="24" v-for="(ques, indexNum) in a.optionVos"> |
|
|
|
<a-col> |
|
|
|
<a-checkbox :value="ques.submitValue">{{ ques.showValue }}</a-checkbox> |
|
|
|
</a-col> |
|
|
@ -305,7 +307,11 @@ |
|
|
|
/> |
|
|
|
</div> |
|
|
|
<div v-else-if="h.type === 15"> |
|
|
|
<a-time-picker placeholder="时间选择" @change="onChange($event, h.type, h.id, h.recordId)" /> |
|
|
|
<a-time-picker |
|
|
|
placeholder="时间选择" |
|
|
|
:input-read-only="true" |
|
|
|
@change="onChange($event, h.type, h.id, h.recordId)" |
|
|
|
/> |
|
|
|
</div> |
|
|
|
<div v-else-if="h.type === 16"> |
|
|
|
<a-date-picker |
|
|
@ -367,7 +373,11 @@ |
|
|
|
return item.testQuestionsId === a.id && item.contents === `${j.showValue}`; |
|
|
|
}) && |
|
|
|
j.afterOperation > 0) || |
|
|
|
(j.afterOperation > 0 && (j.showValue === a.answer || getRadioAnswer(a.optionVos) === j.showValue)) |
|
|
|
(j.afterOperation > 0 && |
|
|
|
(j.showValue === a.answer || getRadioAnswer(a.optionVos) === j.showValue) && |
|
|
|
!contentList.find(item => { |
|
|
|
return item.testQuestionsId === a.id; |
|
|
|
})) |
|
|
|
" |
|
|
|
> |
|
|
|
<a-input |
|
|
@ -383,222 +393,207 @@ |
|
|
|
@change="inputChange(a.id, $event, j.showValue)" |
|
|
|
></a-textarea> |
|
|
|
<div v-else-if="j.afterOperation === 3" :key="i" v-for="(h, i) in j.questionVos" style="position: relative"> |
|
|
|
<a-form-item |
|
|
|
:label-col="formItemLayout1.labelCol" |
|
|
|
:wrapper-col="formItemLayout1.wrapperCol" |
|
|
|
class="d-flex align-center mb-3" |
|
|
|
> |
|
|
|
<a-form-item |
|
|
|
:label="h.question" |
|
|
|
:label-col="formItemLayout.labelCol" |
|
|
|
:wrapper-col="formItemLayout.wrapperCol" |
|
|
|
class="d-flex align-center mb-3" |
|
|
|
<a-form-item :label="h.question" class="d-flex align-center mb-3"> |
|
|
|
<a-input |
|
|
|
:max-length="500" |
|
|
|
@change="onChange($event, h.type, h.id, h.recordId)" |
|
|
|
style="width: 100%" |
|
|
|
v-if="h.type === 1" |
|
|
|
v-model="h.answer" |
|
|
|
/> |
|
|
|
<a-textarea |
|
|
|
@change="onChange($event, h.type, h.id)" |
|
|
|
style="height: 150px; width: 100%" |
|
|
|
v-else-if="h.type === 2" |
|
|
|
v-model="h.answer" |
|
|
|
/> |
|
|
|
<a-select |
|
|
|
@change="onChange($event, h.type, h.id, h.recordId)" |
|
|
|
style="width: 120px" |
|
|
|
v-else-if="h.type === 5" |
|
|
|
v-model="h.answer" |
|
|
|
> |
|
|
|
<a-input |
|
|
|
:max-length="500" |
|
|
|
@change="onChange($event, h.type, h.id, h.recordId)" |
|
|
|
style="width: 100%" |
|
|
|
v-if="h.type === 1" |
|
|
|
v-model="h.answer" |
|
|
|
/> |
|
|
|
<a-textarea |
|
|
|
@change="onChange($event, h.type, h.id)" |
|
|
|
style="height: 150px; width: 100%" |
|
|
|
v-else-if="h.type === 2" |
|
|
|
v-model="h.answer" |
|
|
|
/> |
|
|
|
<a-select-option :key="c" :value="b.showValue" v-for="(b, c) in h.optionVos">{{ b.showValue }}</a-select-option> |
|
|
|
</a-select> |
|
|
|
<a-date-picker |
|
|
|
:default-value="h.answer ? $moment(h.answer, dateFormat) : ''" |
|
|
|
@change="onChange($event, h.type, h.id, h.recordId)" |
|
|
|
placeholder="日期选择" |
|
|
|
:input-read-only="true" |
|
|
|
show-time |
|
|
|
style="width: 100%" |
|
|
|
v-else-if="h.type === 6" |
|
|
|
/> |
|
|
|
<div v-else-if="h.type === 7"> |
|
|
|
<a-upload |
|
|
|
:action="action" |
|
|
|
:headers="headers" |
|
|
|
:default-file-list="getDefultList(h.answer, h.domList)" |
|
|
|
@change="fileChange($event, h.id)" |
|
|
|
:before-upload="beforeUpload1" |
|
|
|
list-type="picture" |
|
|
|
name="files" |
|
|
|
v-if="code || showrzlb" |
|
|
|
> |
|
|
|
<a-button> <a-icon type="upload" />点击上传 </a-button> |
|
|
|
</a-upload> |
|
|
|
<img :src="h.answer" v-if="h.answer && !code" /> |
|
|
|
<template v-if="h.domList && h.domList.length && !code"> |
|
|
|
<img v-for="imgSrc in h.domList" :key="imgSrc" :src="imgSrc" /> |
|
|
|
</template> |
|
|
|
</div> |
|
|
|
<div v-else-if="h.type === 10"> |
|
|
|
<a-select |
|
|
|
:default-value="getAnswer(h.answer)" |
|
|
|
@change="onChange($event, h.type, h.id, h.recordId)" |
|
|
|
style="width: 120px" |
|
|
|
v-else-if="h.type === 5" |
|
|
|
v-model="h.answer" |
|
|
|
style="width: 100%" |
|
|
|
> |
|
|
|
<a-select-option :key="c" :value="b.showValue" v-for="(b, c) in h.optionVos">{{ |
|
|
|
b.showValue |
|
|
|
}}</a-select-option> |
|
|
|
</a-select> |
|
|
|
<a-date-picker |
|
|
|
:default-value="h.answer ? $moment(h.answer, dateFormat) : ''" |
|
|
|
@change="onChange($event, h.type, h.id, h.recordId)" |
|
|
|
placeholder="日期选择" |
|
|
|
:input-read-only="true" |
|
|
|
show-time |
|
|
|
style="width: 100%" |
|
|
|
v-else-if="h.type === 6" |
|
|
|
/> |
|
|
|
<div v-else-if="h.type === 7"> |
|
|
|
<a-upload |
|
|
|
:action="action" |
|
|
|
:headers="headers" |
|
|
|
:default-file-list="getDefultList(h.answer, h.domList)" |
|
|
|
@change="fileChange($event, h.id)" |
|
|
|
:before-upload="beforeUpload1" |
|
|
|
list-type="picture" |
|
|
|
name="files" |
|
|
|
v-if="code || showrzlb" |
|
|
|
> |
|
|
|
<a-button> <a-icon type="upload" />点击上传 </a-button> |
|
|
|
</a-upload> |
|
|
|
<img :src="h.answer" v-if="h.answer && !code" /> |
|
|
|
<template v-if="h.domList && h.domList.length && !code"> |
|
|
|
<img v-for="imgSrc in h.domList" :key="imgSrc" :src="imgSrc" /> |
|
|
|
</template> |
|
|
|
</div> |
|
|
|
<div v-else-if="h.type === 10"> |
|
|
|
<a-select |
|
|
|
:default-value="getAnswer(h.answer)" |
|
|
|
@change="onChange($event, h.type, h.id, h.recordId)" |
|
|
|
style="width: 100%" |
|
|
|
> |
|
|
|
<a-select-option :key="c" :value="b.showValue" v-for="(b, c) in h.optionVos">{{ |
|
|
|
b.showValue |
|
|
|
}}</a-select-option> |
|
|
|
</a-select> |
|
|
|
<div :key="c" v-for="(b, c) in h.optionVos"> |
|
|
|
<div |
|
|
|
v-if=" |
|
|
|
(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 class="d-flex align-center mb-3"> |
|
|
|
<a-input |
|
|
|
:max-length="500" |
|
|
|
@change="inputChange(h.id, $event, b.showValue)" |
|
|
|
style="width: 100%" |
|
|
|
v-model="b.otherInformation" |
|
|
|
></a-input> |
|
|
|
</a-form-item> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<div v-else-if="h.type === 4"> |
|
|
|
<a-checkbox-group |
|
|
|
:default-value="getList(h.optionVos)" |
|
|
|
@change="onChange($event, h.type, h.id, h.recordId)" |
|
|
|
class="d-flex flex-row flex-wrap" |
|
|
|
style="width: 100%" |
|
|
|
> |
|
|
|
<a-row class="flex-1 flex-wrap"> |
|
|
|
<div style="width: 100%" :key="indexNum" :span="24" v-for="(ques, indexNum) in h.optionVos"> |
|
|
|
<a-col> |
|
|
|
<a-checkbox :value="ques.submitValue">{{ ques.showValue }}</a-checkbox> |
|
|
|
</a-col> |
|
|
|
<a-col> |
|
|
|
<div |
|
|
|
v-if=" |
|
|
|
(contentList.find(item => { |
|
|
|
return item.testQuestionsId === h.id && item.contents === `${ques.showValue}`; |
|
|
|
}) && |
|
|
|
ques.afterOperation > 0) || |
|
|
|
(ques.afterOperation > 0 && ques.choose === 1) |
|
|
|
" |
|
|
|
> |
|
|
|
<!-- <div v-if="ques.afterOperation > 0"> --> |
|
|
|
<a-input |
|
|
|
:max-length="500" |
|
|
|
@change="inputChange1(h.id, $event, ques.showValue, h.recordId, h.optionVos, ques.id)" |
|
|
|
style="width: 100%" |
|
|
|
v-model="ques.otherInformation" |
|
|
|
v-if="ques.afterOperation === 1" |
|
|
|
/> |
|
|
|
<a-textarea |
|
|
|
@change="inputChange1(h.id, $event, ques.showValue, h.recordId, h.optionVos, ques.id)" |
|
|
|
style="width: 100%; height: 150px" |
|
|
|
:max-length="500" |
|
|
|
v-else-if="ques.afterOperation === 2" |
|
|
|
/> |
|
|
|
<div v-else-if="ques.afterOperation === 3">当前程序已无法嵌套</div> |
|
|
|
</div> |
|
|
|
</a-col> |
|
|
|
</div> |
|
|
|
</a-row> |
|
|
|
</a-checkbox-group> |
|
|
|
</div> |
|
|
|
<!-- 当类型为12时,为单选+关联 --> |
|
|
|
<div v-else-if="h.type === 3"> |
|
|
|
<a-radio-group |
|
|
|
@change="onChange($event, h.type, h.id, h.recordId)" |
|
|
|
class="d-flex flex-row flex-wrap" |
|
|
|
v-model="h.answer" |
|
|
|
<div :key="c" v-for="(b, c) in h.optionVos"> |
|
|
|
<div |
|
|
|
v-if=" |
|
|
|
(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-radio :key="g" :style="radioStyle" :value="f.showValue" v-for="(f, g) in h.optionVos">{{ |
|
|
|
f.showValue |
|
|
|
}}</a-radio> |
|
|
|
</a-radio-group> |
|
|
|
<div :key="n" v-for="(m, n) in h.optionVos"> |
|
|
|
<div |
|
|
|
v-if=" |
|
|
|
contentList.find(item => { |
|
|
|
return item.testQuestionsId === h.id && item.contents === `${m.showValue}`; |
|
|
|
}) && m.afterOperation > 0 |
|
|
|
" |
|
|
|
> |
|
|
|
<a-form-item class="d-flex align-center mb-3"> |
|
|
|
<a-input |
|
|
|
:max-length="500" |
|
|
|
@change="inputChange(h.id, $event, m.showValue)" |
|
|
|
style="width: 200px" |
|
|
|
v-if="m.afterOperation === 1" |
|
|
|
@change="inputChange(h.id, $event, b.showValue)" |
|
|
|
style="width: 100%" |
|
|
|
v-model="b.otherInformation" |
|
|
|
></a-input> |
|
|
|
<a-textarea |
|
|
|
:max-length="500" |
|
|
|
style="width: 100%; height: 150px" |
|
|
|
@change="inputChange(h.id, $event, m.showValue)" |
|
|
|
v-else-if="m.afterOperation === 2" |
|
|
|
></a-textarea> |
|
|
|
<div v-else-if="m.afterOperation === 3" :key="q" v-for="(p, q) in m.questionVos"> |
|
|
|
<a-form-item |
|
|
|
:label="p.question" |
|
|
|
:label-col="formItemLayout.labelCol" |
|
|
|
:wrapper-col="formItemLayout.wrapperCol" |
|
|
|
class="d-flex align-center mb-3" |
|
|
|
</a-form-item> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<div v-else-if="h.type === 4"> |
|
|
|
<a-checkbox-group |
|
|
|
:default-value="getList(h.optionVos)" |
|
|
|
@change="onChange($event, h.type, h.id, h.recordId)" |
|
|
|
class="d-flex flex-row flex-wrap" |
|
|
|
style="width: 100%" |
|
|
|
> |
|
|
|
<a-row class="flex-1 flex-wrap"> |
|
|
|
<div style="width: 100%" :key="indexNum" :span="24" v-for="(ques, indexNum) in h.optionVos"> |
|
|
|
<a-col> |
|
|
|
<a-checkbox :value="ques.submitValue">{{ ques.showValue }}</a-checkbox> |
|
|
|
</a-col> |
|
|
|
<a-col> |
|
|
|
<div |
|
|
|
v-if=" |
|
|
|
(contentList.find(item => { |
|
|
|
return item.testQuestionsId === h.id && item.contents === `${ques.showValue}`; |
|
|
|
}) && |
|
|
|
ques.afterOperation > 0) || |
|
|
|
(ques.afterOperation > 0 && ques.choose === 1) |
|
|
|
" |
|
|
|
> |
|
|
|
<div>当前程序已无法嵌套</div> |
|
|
|
</a-form-item> |
|
|
|
</div> |
|
|
|
<!-- <div v-if="ques.afterOperation > 0"> --> |
|
|
|
<a-input |
|
|
|
:max-length="500" |
|
|
|
@change="inputChange1(h.id, $event, ques.showValue, h.recordId, h.optionVos, ques.id)" |
|
|
|
style="width: 100%" |
|
|
|
v-model="ques.otherInformation" |
|
|
|
v-if="ques.afterOperation === 1" |
|
|
|
/> |
|
|
|
<a-textarea |
|
|
|
@change="inputChange1(h.id, $event, ques.showValue, h.recordId, h.optionVos, ques.id)" |
|
|
|
style="width: 100%; height: 150px" |
|
|
|
:max-length="500" |
|
|
|
v-else-if="ques.afterOperation === 2" |
|
|
|
/> |
|
|
|
<div v-else-if="ques.afterOperation === 3">当前程序已无法嵌套</div> |
|
|
|
</div> |
|
|
|
</a-col> |
|
|
|
</div> |
|
|
|
</a-row> |
|
|
|
</a-checkbox-group> |
|
|
|
</div> |
|
|
|
<!-- 当类型为12时,为单选+关联 --> |
|
|
|
<div v-else-if="h.type === 3"> |
|
|
|
<a-radio-group |
|
|
|
@change="onChange($event, h.type, h.id, h.recordId)" |
|
|
|
class="d-flex flex-row flex-wrap" |
|
|
|
v-model="h.answer" |
|
|
|
> |
|
|
|
<a-radio :key="g" :style="radioStyle" :value="f.showValue" v-for="(f, g) in h.optionVos">{{ |
|
|
|
f.showValue |
|
|
|
}}</a-radio> |
|
|
|
</a-radio-group> |
|
|
|
<div :key="n" v-for="(m, n) in h.optionVos"> |
|
|
|
<div |
|
|
|
v-if=" |
|
|
|
contentList.find(item => { |
|
|
|
return item.testQuestionsId === h.id && item.contents === `${m.showValue}`; |
|
|
|
}) && m.afterOperation > 0 |
|
|
|
" |
|
|
|
> |
|
|
|
<a-input |
|
|
|
:max-length="500" |
|
|
|
@change="inputChange(h.id, $event, m.showValue)" |
|
|
|
style="width: 200px" |
|
|
|
v-if="m.afterOperation === 1" |
|
|
|
></a-input> |
|
|
|
<a-textarea |
|
|
|
:max-length="500" |
|
|
|
style="width: 100%; height: 150px" |
|
|
|
@change="inputChange(h.id, $event, m.showValue)" |
|
|
|
v-else-if="m.afterOperation === 2" |
|
|
|
></a-textarea> |
|
|
|
<div v-else-if="m.afterOperation === 3" :key="q" v-for="(p, q) in m.questionVos"> |
|
|
|
<a-form-item |
|
|
|
:label="p.question" |
|
|
|
:label-col="formItemLayout.labelCol" |
|
|
|
:wrapper-col="formItemLayout.wrapperCol" |
|
|
|
class="d-flex align-center mb-3" |
|
|
|
> |
|
|
|
<div>当前程序已无法嵌套</div> |
|
|
|
</a-form-item> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<div v-else-if="h.type === 13"> |
|
|
|
<a-input-number |
|
|
|
@change="onChange($event, h.type, h.id, h.recordId)" |
|
|
|
style="width: 200px%" |
|
|
|
v-model="h.answer" |
|
|
|
/> |
|
|
|
</div> |
|
|
|
<div v-else-if="h.type === 15"> |
|
|
|
<a-time-picker placeholder="时间选择" @change="onChange($event, h.type, h.id, h.recordId)" /> |
|
|
|
</div> |
|
|
|
<div v-else-if="h.type === 16"> |
|
|
|
<a-date-picker |
|
|
|
:default-value="h.answer ? $moment(h.answer, dateFormat) : ''" |
|
|
|
placeholder="日期时间选择" |
|
|
|
:input-read-only="true" |
|
|
|
@change="onChange($event, h.type, h.id, h.recordId)" |
|
|
|
show-time |
|
|
|
/> |
|
|
|
</div> |
|
|
|
<div v-for="(dom, domIndex) in h.domList" :key="domIndex"> |
|
|
|
<a-input v-if="h.type === 1" v-model="h.domList[domIndex]"></a-input> |
|
|
|
<a-textarea v-else-if="h.type === 2" v-model="h.domList[domIndex]"></a-textarea> |
|
|
|
</div> |
|
|
|
<div v-if="h.remark && JSON.parse(h.remark).type === 'desc'"> |
|
|
|
说明: |
|
|
|
<a-textarea @change="explainChange(h.id, $event)" v-model="h.explains" /> |
|
|
|
</div> |
|
|
|
<p class="units-position" style="margin-left: 10px"> |
|
|
|
<span v-if="h.units">{{ h.units }}</span> |
|
|
|
<span v-if="typeof h.referenceLower === 'number'"> |
|
|
|
({{ h.referenceLower + '-' }}{{ h.referenceUpper }}) |
|
|
|
</span> |
|
|
|
</p> |
|
|
|
</a-form-item> |
|
|
|
</div> |
|
|
|
<div v-else-if="h.type === 13"> |
|
|
|
<a-input-number @change="onChange($event, h.type, h.id, h.recordId)" style="width: 200px%" v-model="h.answer" /> |
|
|
|
</div> |
|
|
|
<div v-else-if="h.type === 15"> |
|
|
|
<a-time-picker |
|
|
|
placeholder="时间选择" |
|
|
|
:input-read-only="true" |
|
|
|
@change="onChange($event, h.type, h.id, h.recordId)" |
|
|
|
/> |
|
|
|
</div> |
|
|
|
<div v-else-if="h.type === 16"> |
|
|
|
<a-date-picker |
|
|
|
:default-value="h.answer ? $moment(h.answer, dateFormat) : ''" |
|
|
|
placeholder="日期时间选择" |
|
|
|
:input-read-only="true" |
|
|
|
@change="onChange($event, h.type, h.id, h.recordId)" |
|
|
|
show-time |
|
|
|
/> |
|
|
|
</div> |
|
|
|
<div v-for="(dom, domIndex) in h.domList" :key="domIndex"> |
|
|
|
<a-input v-if="h.type === 1" v-model="h.domList[domIndex]"></a-input> |
|
|
|
<a-textarea v-else-if="h.type === 2" v-model="h.domList[domIndex]"></a-textarea> |
|
|
|
</div> |
|
|
|
<div v-if="h.remark && JSON.parse(h.remark).type === 'desc'"> |
|
|
|
说明: |
|
|
|
<a-textarea @change="explainChange(h.id, $event)" v-model="h.explains" /> |
|
|
|
</div> |
|
|
|
<p class="units-position" style="margin-left: 10px"> |
|
|
|
<span v-if="h.units">{{ h.units }}</span> |
|
|
|
<span v-if="typeof h.referenceLower === 'number'"> ({{ h.referenceLower + '-' }}{{ h.referenceUpper }}) </span> |
|
|
|
</p> |
|
|
|
</a-form-item> |
|
|
|
<a-button |
|
|
|
v-if="h.remark && JSON.parse(h.remark).type === 'add'" |
|
|
@ -615,7 +610,7 @@ |
|
|
|
<a-input-number @change="onChange($event, a.type, a.id)" style="width: 200px" v-model="a.answer" /> |
|
|
|
</div> |
|
|
|
<div v-else-if="a.type === 15"> |
|
|
|
<a-time-picker placeholder="时间选择" @change="onChange($event, a.type, a.id)" /> |
|
|
|
<a-time-picker placeholder="时间选择" :input-read-only="true" @change="onChange($event, a.type, a.id)" /> |
|
|
|
</div> |
|
|
|
<div v-else-if="a.type === 16"> |
|
|
|
<a-date-picker |
|
|
@ -985,7 +980,11 @@ |
|
|
|
/> |
|
|
|
</div> |
|
|
|
<div v-else-if="h.type === 15"> |
|
|
|
<a-time-picker placeholder="时间选择" @change="onChange($event, h.type, h.id, h.recordId)" /> |
|
|
|
<a-time-picker |
|
|
|
placeholder="时间选择" |
|
|
|
:input-read-only="true" |
|
|
|
@change="onChange($event, h.type, h.id, h.recordId)" |
|
|
|
/> |
|
|
|
</div> |
|
|
|
<div v-else-if="h.type === 16"> |
|
|
|
<a-date-picker |
|
|
@ -1045,7 +1044,11 @@ |
|
|
|
return item.testQuestionsId === e.id && item.contents === `${j.showValue}`; |
|
|
|
}) && |
|
|
|
j.afterOperation > 0) || |
|
|
|
(j.afterOperation > 0 && (j.showValue === e.answer || getRadioAnswer(e.optionVos) === j.showValue)) |
|
|
|
(j.afterOperation > 0 && |
|
|
|
(j.showValue === e.answer || getRadioAnswer(e.optionVos) === j.showValue) && |
|
|
|
!contentList.find(item => { |
|
|
|
return item.testQuestionsId === e.id && item.contents === `${j.showValue}`; |
|
|
|
})) |
|
|
|
" |
|
|
|
> |
|
|
|
<a-input |
|
|
@ -1249,7 +1252,11 @@ |
|
|
|
/> |
|
|
|
</div> |
|
|
|
<div v-else-if="h.type === 15"> |
|
|
|
<a-time-picker placeholder="时间选择" @change="onChange($event, h.type, h.id, h.recordId)" /> |
|
|
|
<a-time-picker |
|
|
|
placeholder="时间选择" |
|
|
|
:input-read-only="true" |
|
|
|
@change="onChange($event, h.type, h.id, h.recordId)" |
|
|
|
/> |
|
|
|
</div> |
|
|
|
<div v-else-if="h.type === 16"> |
|
|
|
<a-date-picker |
|
|
@ -1294,7 +1301,7 @@ |
|
|
|
<a-input-number @change="onChange($event, e.type, e.id, e.recordId)" style="width: 200px" v-model="e.answer" /> |
|
|
|
</div> |
|
|
|
<div v-else-if="e.type === 15"> |
|
|
|
<a-time-picker placeholder="时间选择" @change="onChange($event, e.type, e.id, e.recordId)" /> |
|
|
|
<a-time-picker placeholder="时间选择" :input-read-only="true" @change="onChange($event, e.type, e.id, e.recordId)" /> |
|
|
|
</div> |
|
|
|
<div v-else-if="e.type === 16"> |
|
|
|
<a-date-picker |
|
|
@ -1346,15 +1353,19 @@ |
|
|
|
class="white--text" |
|
|
|
@change="changeDate" |
|
|
|
/>--> |
|
|
|
<div class="bot-right-tips"> |
|
|
|
<!-- <div class="bot-right-tips"> |
|
|
|
当前选择病例的住院号为: |
|
|
|
<span style="color: green">{{ hospitalization }}</span> |
|
|
|
,研究编号为: |
|
|
|
<span style="color: green">{{ recordCode }}</span> |
|
|
|
</div> |
|
|
|
<a-button @click="choosePatient" class="choose-btn" type="primary"> |
|
|
|
</div> --> |
|
|
|
<a-button @click="choosePatient" id="dragBox" class="choose-btn" type="primary"> |
|
|
|
<!-- @touchstart="touchstartHandle('dragBox', $event)" |
|
|
|
@touchmove="touchmoveHandle('dragBox', $event)" |
|
|
|
@touchend="touchendHandle" --> |
|
|
|
<a-icon type="retweet" /> |
|
|
|
重新选择病例 |
|
|
|
{{ recordCode }} |
|
|
|
<!-- 重新选择 --> |
|
|
|
</a-button> |
|
|
|
<a-button |
|
|
|
v-if="list.length > 0 && typeof tabNums === 'number' && (getCode || code || showrzlb)" |
|
|
@ -1444,8 +1455,9 @@ export default { |
|
|
|
checked: true, |
|
|
|
radioStyle: { |
|
|
|
display: 'block', |
|
|
|
height: '30px', |
|
|
|
lineHeight: '30px', |
|
|
|
textOverflow: 'ellipsis', |
|
|
|
whiteSpace: 'normal', |
|
|
|
}, |
|
|
|
activeKey: [0], |
|
|
|
list: [], |
|
|
@ -1468,7 +1480,12 @@ export default { |
|
|
|
rzlbcpSrc: '', |
|
|
|
lists: {}, |
|
|
|
height: '', |
|
|
|
width: '', |
|
|
|
queryPath: '', |
|
|
|
coordinate: { |
|
|
|
client: {}, |
|
|
|
elePosition: {}, |
|
|
|
}, |
|
|
|
}; |
|
|
|
}, |
|
|
|
|
|
|
@ -1487,11 +1504,17 @@ export default { |
|
|
|
this.getQuery(); |
|
|
|
} |
|
|
|
}, |
|
|
|
activeKey(val) { |
|
|
|
window,scrollTo(0,0) |
|
|
|
} |
|
|
|
}, |
|
|
|
mounted() { |
|
|
|
this.height = document.getElementsByClassName('main')[0].offsetHeight + 'px'; |
|
|
|
this.width = document.getElementsByClassName('main')[0].offsetWidth - 6 + 'px'; |
|
|
|
console.log(this.width); |
|
|
|
this.rzlbSrc = `https://sxzxyzzlm.tall.wiki/ht-common/home/reportHistory?code=LSBGD&userId=${this.ptProps.userId}`; |
|
|
|
this.rzlbcpSrc = `https://sxzxyzzlm.tall.wiki/ht-common?code=KT&userId=${this.ptProps.userId}`; |
|
|
|
window.addEventListener('scroll', this.handleScroll); |
|
|
|
}, |
|
|
|
|
|
|
|
async created() { |
|
|
@ -1510,8 +1533,65 @@ export default { |
|
|
|
await this.getlists(); |
|
|
|
this.setCallback(0); |
|
|
|
}, |
|
|
|
destroyed() { |
|
|
|
document.removeEventListener('scroll', this.handleScroll); |
|
|
|
}, |
|
|
|
methods: { |
|
|
|
...mapMutations('home', ['setCallback']), |
|
|
|
...mapMutations('home', ['setCallback', 'setPatientId', 'setHospitalization', 'setRecordCode', 'setShowTable']), |
|
|
|
handleScroll() { |
|
|
|
//获取滚动时的高度 |
|
|
|
let scrollTop = window.pageYOffset || document.documentElement.scrollTop || document.body.scrollTop; |
|
|
|
// |
|
|
|
// console.log(scrollTop) |
|
|
|
if (scrollTop > 50) { |
|
|
|
//滚动大于50的时候要做的操作 |
|
|
|
let dom = document.getElementById('dragBox'); |
|
|
|
dom.style.top = '8px'; |
|
|
|
} else { |
|
|
|
let dom = document.getElementById('dragBox'); |
|
|
|
dom.style.top = 58 - scrollTop + 'px'; |
|
|
|
} |
|
|
|
}, |
|
|
|
// /** |
|
|
|
// * 重新选择患者按钮拖动事件 |
|
|
|
// */ |
|
|
|
// touchstartHandle(refName, e) { |
|
|
|
// const scrollTop = document.body.scrollTop || document.documentElement.scrollTop; |
|
|
|
// document.body.style.cssText += `position: fixed;top:-${scrollTop}px`; |
|
|
|
// let element = e.targetTouches[0]; |
|
|
|
// let dom = document.getElementById(`${refName}`); |
|
|
|
// // 记录点击的坐标 |
|
|
|
// this.coordinate.client = { |
|
|
|
// x: element.clientX, |
|
|
|
// y: element.clientY, |
|
|
|
// }; |
|
|
|
// // 记录需要移动的元素坐标 |
|
|
|
// this.coordinate.elePosition.left = dom.offsetLeft; |
|
|
|
// this.coordinate.elePosition.top = dom.offsetTop; |
|
|
|
// }, |
|
|
|
// touchmoveHandle(refName, e) { |
|
|
|
// try { |
|
|
|
// let element = e.targetTouches[0]; |
|
|
|
// let dom = document.getElementById(`${refName}`); |
|
|
|
// // 根据初始 client 位置计算移动距离(元素移动位置=元素初始位置+光标移动后的位置-光标点击时的初始位置) |
|
|
|
// let x = this.coordinate.elePosition.left + (element.clientX - this.coordinate.client.x); |
|
|
|
// let y = this.coordinate.elePosition.top + (element.clientY - this.coordinate.client.y); |
|
|
|
// // 限制可移动距离,不超出可视区域 |
|
|
|
// x = x <= 0 ? 0 : x >= innerWidth - dom.offsetWidth ? innerWidth - dom.offsetWidth : x; |
|
|
|
// y = y <= 0 ? 0 : y >= innerHeight - dom.offsetHeight ? innerHeight - dom.offsetHeight : y; |
|
|
|
// // 移动当前元素 |
|
|
|
// dom.style.left = x + 'px'; |
|
|
|
// dom.style.top = y + 'px'; |
|
|
|
// } catch (error) {} |
|
|
|
// }, |
|
|
|
// touchendHandle() { |
|
|
|
// const body = document.body; |
|
|
|
// body.style.position = ''; |
|
|
|
// const top = body.style.top; |
|
|
|
// document.body.scrollTop = document.documentElement.scrollTop = -parseInt(top); |
|
|
|
// body.style.top = ''; |
|
|
|
// }, |
|
|
|
|
|
|
|
/** |
|
|
|
* 获取默认的图片数组 |
|
|
|
*/ |
|
|
@ -1548,7 +1628,20 @@ export default { |
|
|
|
if (this.queryPath) { |
|
|
|
this.$router.push(`${this.queryPath}`); |
|
|
|
} else { |
|
|
|
this.$router.push('/selectPatient'); |
|
|
|
// this.$router.push('/selectPatient'); |
|
|
|
this.setPatientId(''); |
|
|
|
this.setHospitalization(''); |
|
|
|
this.setRecordCode(''); |
|
|
|
if (localStorage.getItem('patientId')) { |
|
|
|
localStorage.removeItem('patientId'); |
|
|
|
} |
|
|
|
if (localStorage.getItem('hospitalization')) { |
|
|
|
localStorage.removeItem('hospitalization'); |
|
|
|
} |
|
|
|
if (localStorage.getItem('recordCode')) { |
|
|
|
localStorage.removeItem('recordCode'); |
|
|
|
} |
|
|
|
this.setShowTable(0); |
|
|
|
} |
|
|
|
}, |
|
|
|
// 'AB',a.id, index,k,h.id |
|
|
@ -2234,7 +2327,31 @@ export default { |
|
|
|
|
|
|
|
.choose-btn { |
|
|
|
position: fixed; |
|
|
|
top: 20px; |
|
|
|
right: 12px; |
|
|
|
top: 10px; |
|
|
|
right: 6px; |
|
|
|
} |
|
|
|
|
|
|
|
@media (max-width: 575px) { |
|
|
|
/deep/.ant-form-item-label, .ant-form-item-control-wrapper { |
|
|
|
display: block; |
|
|
|
width: 50%; |
|
|
|
} |
|
|
|
|
|
|
|
.add-btn { |
|
|
|
position: absolute; |
|
|
|
right: 0; |
|
|
|
top: -3px; |
|
|
|
} |
|
|
|
|
|
|
|
/deep/span.ant-radio + * { |
|
|
|
padding-right: 12px; |
|
|
|
padding-left: 4px; |
|
|
|
} |
|
|
|
|
|
|
|
.choose-btn { |
|
|
|
position: fixed; |
|
|
|
top: 58px; |
|
|
|
right: 6px; |
|
|
|
} |
|
|
|
} |
|
|
|
</style> |
|
|
|