|
@ -470,17 +470,17 @@ |
|
|
</a-form-item> |
|
|
</a-form-item> |
|
|
</div> |
|
|
</div> |
|
|
<!-- 一级标题下的各种二级标题(subReportCodes) --> |
|
|
<!-- 一级标题下的各种二级标题(subReportCodes) --> |
|
|
<div v-for="w in item.subReportCodes" :key="w.name"> |
|
|
<div v-for="(w, indexB) in item.subReportCodes" :key="w.name"> |
|
|
<a-form-item :label-col="formItemLayout.labelCol" :wrapper-col="formItemLayout.wrapperCol"> |
|
|
<a-form-item :label-col="formItemLayout.labelCol" :wrapper-col="formItemLayout.wrapperCol"> |
|
|
<!-- 二级大标题 --> |
|
|
<!-- 二级大标题 --> |
|
|
<span class="hhh2"> {{ w.name }}:</span> |
|
|
<span class="hhh2"> {{ w.name }}:</span> |
|
|
<a-upload |
|
|
<a-upload |
|
|
v-if="w.recordType" |
|
|
v-if="w.recordType && getCode" |
|
|
name="files" |
|
|
name="files" |
|
|
:multiple="true" |
|
|
:multiple="true" |
|
|
:action="action" |
|
|
:action="action" |
|
|
:headers="headers" |
|
|
:headers="headers" |
|
|
@change="handleChange($event, w.code, w.recordId)" |
|
|
@change="handleChange($event, w.code, w.recordId, index, indexB)" |
|
|
> |
|
|
> |
|
|
<!-- <a-upload :multiple="true" :action="action" :headers="headers" @change="handleChange"> --> |
|
|
<!-- <a-upload :multiple="true" :action="action" :headers="headers" @change="handleChange"> --> |
|
|
<a-button> <a-icon type="upload" />上传图片</a-button> |
|
|
<a-button> <a-icon type="upload" />上传图片</a-button> |
|
@ -1044,12 +1044,6 @@ export default { |
|
|
this.getQuery(); |
|
|
this.getQuery(); |
|
|
} |
|
|
} |
|
|
}, |
|
|
}, |
|
|
recordTypeList() { |
|
|
|
|
|
for (let i = 0; i < this.recordTypeList.length; i++) { |
|
|
|
|
|
var dom = document.getElementById(`${this.recordTypeList[i].questionId}`); |
|
|
|
|
|
dom.value = this.recordTypeList[i].content; |
|
|
|
|
|
} |
|
|
|
|
|
}, |
|
|
|
|
|
}, |
|
|
}, |
|
|
async created() { |
|
|
async created() { |
|
|
console.log(this.patientId); |
|
|
console.log(this.patientId); |
|
@ -1122,7 +1116,7 @@ export default { |
|
|
} |
|
|
} |
|
|
}, |
|
|
}, |
|
|
onChange(e, type, id, recordId) { |
|
|
onChange(e, type, id, recordId) { |
|
|
console.log(e); |
|
|
// console.log(e); |
|
|
// 监听所有得题目类型得填写情况(改变事件) |
|
|
// 监听所有得题目类型得填写情况(改变事件) |
|
|
if (this.contentList.find(item => item.testQuestionsId === id)) { |
|
|
if (this.contentList.find(item => item.testQuestionsId === id)) { |
|
|
if (type === 1) { |
|
|
if (type === 1) { |
|
@ -1248,7 +1242,7 @@ export default { |
|
|
// for循环封装函数 |
|
|
// for循环封装函数 |
|
|
forFn(id, value, recordId) { |
|
|
forFn(id, value, recordId) { |
|
|
const { contentList } = this; |
|
|
const { contentList } = this; |
|
|
console.log(value); |
|
|
// console.log(value); |
|
|
for (let i = 0; i < contentList.length; i++) { |
|
|
for (let i = 0; i < contentList.length; i++) { |
|
|
if (contentList[i].testQuestionsId === id) { |
|
|
if (contentList[i].testQuestionsId === id) { |
|
|
contentList[i].contents = value; |
|
|
contentList[i].contents = value; |
|
@ -1256,7 +1250,7 @@ export default { |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
this.contentList = [...contentList]; |
|
|
this.contentList = [...contentList]; |
|
|
console.log(this.contentList); |
|
|
// console.log(this.contentList); |
|
|
}, |
|
|
}, |
|
|
// 第一次填写题目答案得时候(在已经填写好的题目答案数组中没有找到当前所填得题) |
|
|
// 第一次填写题目答案得时候(在已经填写好的题目答案数组中没有找到当前所填得题) |
|
|
failFn(id, value, recordId) { |
|
|
failFn(id, value, recordId) { |
|
@ -1384,9 +1378,10 @@ export default { |
|
|
} |
|
|
} |
|
|
}, |
|
|
}, |
|
|
// 图像识别 |
|
|
// 图像识别 |
|
|
async handleChange(info, title, recordId) { |
|
|
async handleChange(info, title, recordId, indexA, indexB) { |
|
|
if (info.file.status === 'done') { |
|
|
if (info.file.status === 'done') { |
|
|
console.log(info.file.response.data[0].visitUrl); |
|
|
const { list } = this; |
|
|
|
|
|
const objList = list[indexA].subReportCodes[indexB]; |
|
|
const params = { |
|
|
const params = { |
|
|
param: { |
|
|
param: { |
|
|
hospitalId: this.hospitalId, |
|
|
hospitalId: this.hospitalId, |
|
@ -1397,47 +1392,44 @@ export default { |
|
|
const res = await basic(params); |
|
|
const res = await basic(params); |
|
|
const { code, msg, data } = res.data; |
|
|
const { code, msg, data } = res.data; |
|
|
if (code === 200) { |
|
|
if (code === 200) { |
|
|
this.changeType(data, recordId); |
|
|
for (let k = 0; k < data.length; k++) { |
|
|
this.changeType(data, recordId); |
|
|
for (let i = 0; i < objList.questionVos.length; i++) { |
|
|
console.log(this.contentList); |
|
|
if (objList.questionVos[i].id === data[k].questionId) { |
|
|
} else { |
|
|
objList.questionVos[i].answer = data[k].content; |
|
|
console.log(msg); |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
if (this.contentList.length > 0) { |
|
|
}, |
|
|
for (let i = 0; i < this.contentList.length; i++) { |
|
|
|
|
|
// 如果当前题目的答案已经更改过 |
|
|
async changeType(data) { |
|
|
if (data[k].questionId === this.contentList[i].testQuestionsId) { |
|
|
await this.changeTypeList(data); |
|
|
this.contentList[i].contents = data[k].content; |
|
|
// // 获取到答案,重新赋值,并且推到contentList里边 |
|
|
break; |
|
|
for (let i = 0; i < data.length; i++) { |
|
|
// 如果当前题目的答案未更改过 |
|
|
if (this.contentList.length > 0) { |
|
|
} else if (i === this.contentList.length - 1) { |
|
|
for (let k = 0; k < this.contentList.length; k++) { |
|
|
let obj = { |
|
|
// 如果当前题目的答案已经更改过 |
|
|
testQuestionsId: data[k].questionId, |
|
|
if (data[i].questionId === this.contentList[k].testQuestionsId) { |
|
|
contents: data[k].content, |
|
|
this.contentList[k].contents = data[i].content; |
|
|
}; |
|
|
break; |
|
|
this.contentList.push(obj); |
|
|
// 如果当前题目的答案为更改过 |
|
|
break; |
|
|
} else if (k === this.contentList.length - 1) { |
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
} else { |
|
|
let obj = { |
|
|
let obj = { |
|
|
testQuestionsId: data[i].questionId, |
|
|
testQuestionsId: data[k].questionId, |
|
|
contents: data[i].content, |
|
|
contents: data[k].content, |
|
|
}; |
|
|
}; |
|
|
this.contentList.push(obj); |
|
|
this.contentList.push(obj); |
|
|
break; |
|
|
|
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
list[indexA].subReportCodes[indexB] = { ...objList }; |
|
|
|
|
|
this.list = [...list]; |
|
|
} else { |
|
|
} else { |
|
|
let obj = { |
|
|
console.log(msg); |
|
|
testQuestionsId: data[i].questionId, |
|
|
|
|
|
contents: data[i].content, |
|
|
|
|
|
}; |
|
|
|
|
|
this.contentList.push(obj); |
|
|
|
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
}, |
|
|
}, |
|
|
changeTypeList(data) { |
|
|
|
|
|
this.recordTypeList = data; |
|
|
|
|
|
}, |
|
|
|
|
|
// 改变提交时间 |
|
|
// 改变提交时间 |
|
|
// changeDate(date) { |
|
|
// changeDate(date) { |
|
|
// this.subDateTime = this.$moment(date._d).format('YYYY-MM-DD HH:mm:ss'); |
|
|
// this.subDateTime = this.$moment(date._d).format('YYYY-MM-DD HH:mm:ss'); |
|
|