|
|
@ -110,14 +110,25 @@ |
|
|
|
<!-- 当类型为12时,为单选+关联 --> |
|
|
|
<div v-else-if="a.type === 12"> |
|
|
|
<a-radio-group @change="onChange($event, a.type, a.id)"> |
|
|
|
<a-radio :style="radioStyle" :value="1"> 高血压 </a-radio> |
|
|
|
<a-radio :style="radioStyle" :value="2"> 高血脂 </a-radio> |
|
|
|
<a-radio :style="radioStyle" :value="3"> 高血糖 </a-radio> |
|
|
|
<a-radio :style="radioStyle" :value="4"> |
|
|
|
其它 |
|
|
|
<a-input v-if="value === 4" :style="{ width: 100, marginLeft: 10 }" /> |
|
|
|
<a-radio v-for="(f, g) in a.optionVos" :key="g" :style="radioStyle" :value="f.showValue"> |
|
|
|
{{ f.showValue }} |
|
|
|
</a-radio> |
|
|
|
</a-radio-group> |
|
|
|
<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 > 0 |
|
|
|
" |
|
|
|
> |
|
|
|
<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-input></a-input> |
|
|
|
</a-form-item> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<div v-else-if="a.type === 13"> |
|
|
|
<a-input-number @change="onChange($event, a.type, a.id)" /> |
|
|
@ -210,31 +221,50 @@ |
|
|
|
<div v-else-if="e.type === 11"> |
|
|
|
<a-checkbox-group @change="onChange($event, e.type, e.id)"> |
|
|
|
<a-row> |
|
|
|
<a-col :span="12"> |
|
|
|
<a-checkbox value="A"> A </a-checkbox> |
|
|
|
</a-col> |
|
|
|
<a-col :span="12"> |
|
|
|
<a-checkbox value="B"> B </a-checkbox> |
|
|
|
<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="12"> |
|
|
|
<a-checkbox value="C"> 其他 </a-checkbox> |
|
|
|
<a-col :span="100"> |
|
|
|
<a-input |
|
|
|
v-if=" |
|
|
|
contentList.find(item => { |
|
|
|
return ( |
|
|
|
item.testQuestionsId === e.id && |
|
|
|
item.contents.find(a => { |
|
|
|
return a === '其他'; |
|
|
|
}) |
|
|
|
); |
|
|
|
}) |
|
|
|
" |
|
|
|
:style="{ width: 100, marginLeft: 10 }" |
|
|
|
/> |
|
|
|
</a-col> |
|
|
|
</a-row> |
|
|
|
<a-input v-if="value === 4" :style="{ width: 100, marginLeft: 10 }" /> |
|
|
|
说明: <a-input :style="{ width: 100, marginLeft: 10 }" /> |
|
|
|
</a-checkbox-group> |
|
|
|
</div> |
|
|
|
<!-- 当类型为12时,为单选+关联 --> |
|
|
|
<div v-else-if="e.type === 12"> |
|
|
|
<a-radio-group @change="onChange($event, e.type, e.id)"> |
|
|
|
<a-radio :style="radioStyle" :value="1"> 高血压 </a-radio> |
|
|
|
<a-radio :style="radioStyle" :value="2"> 高血脂 </a-radio> |
|
|
|
<a-radio :style="radioStyle" :value="3"> 高血糖 </a-radio> |
|
|
|
<a-radio :style="radioStyle" :value="4"> |
|
|
|
其它 |
|
|
|
<a-input v-if="value === 4" :style="{ width: 100, marginLeft: 10 }" /> |
|
|
|
<a-radio v-for="(f, g) in e.optionVos" :key="g" :style="radioStyle" :value="f.showValue"> |
|
|
|
{{ f.showValue }} |
|
|
|
</a-radio> |
|
|
|
</a-radio-group> |
|
|
|
<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 > 0 |
|
|
|
" |
|
|
|
> |
|
|
|
<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-input></a-input> |
|
|
|
</a-form-item> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<div v-else-if="e.type === 13"> |
|
|
|
<a-input-number @change="onChange($event, e.type, e.id)" /> |
|
|
@ -244,11 +274,8 @@ |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<!-- <a-form-item class="d-flex flex-row-reverse"> |
|
|
|
<a-button class="white--text px-10" html-type="submit" type="primary">提交</a-button> |
|
|
|
</a-form-item> --> |
|
|
|
</a-form> |
|
|
|
<a-button class="white--text px-10" type="primary" @click="setData()">提交</a-button> |
|
|
|
<a-button class="white--text px-10" type="primary" @click="setData()" v-if="list.length > 0">提交</a-button> |
|
|
|
</div> |
|
|
|
</template> |
|
|
|
|
|
|
@ -313,17 +340,17 @@ export default { |
|
|
|
this.forFn(id, e.target.value); |
|
|
|
} else if (type === 4) { |
|
|
|
// 多选 |
|
|
|
alert('多选,没有这类的题,先参考多选+其他类型的题,那个有'); |
|
|
|
// this.forFn(id, e); |
|
|
|
// alert('多选,没有这类的题,先参考多选+其他类型的题,那个有'); |
|
|
|
this.forFn(id, e); |
|
|
|
} else if (type === 5) { |
|
|
|
// 下拉框 |
|
|
|
this.forFn(id, e); |
|
|
|
// this.forFn(id, e); |
|
|
|
} else if (type === 6) { |
|
|
|
// 日期时间选择器,给后台返回的值是 2020-01-01 00:00:00 的格式 |
|
|
|
// console.log(this.$moment(e._d).format('YYYY-MM-DD HH:mm:ss')); |
|
|
|
this.forFn(id, this.$moment(e._d).format('YYYY-MM-DD HH:mm:ss')); |
|
|
|
} else if (type === 7) { |
|
|
|
alert('上传文件,先控下'); |
|
|
|
alert('上传文件,先空下'); |
|
|
|
} else if (type === 8) { |
|
|
|
// 单选 + 其他 |
|
|
|
console.log(e.target.value); |
|
|
@ -338,6 +365,8 @@ export default { |
|
|
|
this.forFn(id, e); |
|
|
|
} else if (type === 12) { |
|
|
|
// 单选 + 关联其他内容 |
|
|
|
// console.log(e.target.value, type, id); |
|
|
|
this.forFn(id, e.target.value); |
|
|
|
} else if (type === 13) { |
|
|
|
// 数字类型 |
|
|
|
} else if (type === 14) { |
|
|
@ -356,18 +385,19 @@ export default { |
|
|
|
} else if (type === 4) { |
|
|
|
// 多选 |
|
|
|
alert('多选,没有这类的题,先参考多选+其他类型的题,那个有'); |
|
|
|
this.failFn(id, e); |
|
|
|
} else if (type === 5) { |
|
|
|
// 下拉框 |
|
|
|
this.failFn(id, e); |
|
|
|
// this.failFn(id, e); |
|
|
|
} else if (type === 6) { |
|
|
|
// 日期时间选择器,给后台返回的值是 2020-01-01 00:00:00 的格式 |
|
|
|
// console.log(this.$moment(e._d).format('YYYY-MM-DD HH:mm:ss')); |
|
|
|
this.failFn(id, this.$moment(e._d).format('YYYY-MM-DD HH:mm:ss')); |
|
|
|
} else if (type === 7) { |
|
|
|
alert('上传文件,先控下'); |
|
|
|
alert('上传文件,先空下'); |
|
|
|
} else if (type === 8) { |
|
|
|
// 单选 + 其他 |
|
|
|
console.log(e.target.value); |
|
|
|
console.log(id, e.target.value); |
|
|
|
// alert('暂时没有单选 + 其他类型的题,等导入题型之后再改'); |
|
|
|
} else if (type === 9) { |
|
|
|
this.failFn(id, e); |
|
|
@ -376,6 +406,8 @@ export default { |
|
|
|
// 下拉 + 其他 |
|
|
|
} else if (type === 11) { |
|
|
|
this.failFn(id, e); |
|
|
|
} else if (type === 12) { |
|
|
|
this.failFn(id, e.target.value); |
|
|
|
} |
|
|
|
} |
|
|
|
}, |
|
|
@ -403,25 +435,26 @@ export default { |
|
|
|
console.log(this.contentList); |
|
|
|
}, |
|
|
|
// 提交表单 |
|
|
|
async setData() { |
|
|
|
try { |
|
|
|
const params = { |
|
|
|
param: { |
|
|
|
list: this.contentList, |
|
|
|
patientId: 1, |
|
|
|
timeSlot: 123, |
|
|
|
}, |
|
|
|
}; |
|
|
|
const res = await saveCaseMes(params); |
|
|
|
const { code, msg, data } = res.data; |
|
|
|
if (code === 200) { |
|
|
|
console.log(data); |
|
|
|
} else { |
|
|
|
console.log(msg); |
|
|
|
} |
|
|
|
} catch (error) { |
|
|
|
this.$message.error('error'); |
|
|
|
} |
|
|
|
setData() { |
|
|
|
console.log(this.contentList); |
|
|
|
// try { |
|
|
|
// const params = { |
|
|
|
// param: { |
|
|
|
// list: this.contentList, |
|
|
|
// patientId: 1, |
|
|
|
// timeSlot: 123, |
|
|
|
// }, |
|
|
|
// }; |
|
|
|
// const res = await saveCaseMes(params); |
|
|
|
// const { code, msg, data } = res.data; |
|
|
|
// if (code === 200) { |
|
|
|
// console.log(data); |
|
|
|
// } else { |
|
|
|
// console.log(msg); |
|
|
|
// } |
|
|
|
// } catch (error) { |
|
|
|
// this.$message.error('error'); |
|
|
|
// } |
|
|
|
}, |
|
|
|
}, |
|
|
|
}; |
|
|
|