This commit is contained in:
2025-07-25 09:18:39 +08:00
parent 0c917e988a
commit a0d35b96a7

View File

@@ -3,7 +3,13 @@
<el-drawer
:title="
`${
type == 'edit' ? '编辑医案' : type == 'add' ? '新增医案' : `医案详情${addCertificateForm.state==1?' ( 待审核 ) ':' ( 已拒绝 ) '}`
type == 'edit'
? '编辑医案'
: type == 'add'
? '新增医案'
: `医案详情${
addCertificateForm.state == 1 ? ' ( 待审核 ) ' : ' ( 已拒绝 ) '
}`
}`
"
:visible.sync="dialogVisible"
@@ -14,12 +20,74 @@
<div
v-if="dialogVisible"
style="padding: 0 20px;box-sizing: border-box;height: calc(100% - 40px);overflow-y: auto;"
:style="addCertificateForm.state==2?'height:100%':''"
:style="addCertificateForm.state == 2 ? 'height:100%' : ''"
>
<template v-if="!showMessages">
<div v-if="addCertificateForm.mark" style="padding:4px 10px;border-radius: 4px;white-space: wrap;"
:style="`color:${currentNode.data.color?currentNode.data.color:''};
`">审核备注{{ addCertificateForm.mark }}</div>
<div class="home_wrap home_wrap_analysis" >
<div class="home_form" style="position: relative">
<div
class="form_item"
style="
display: flex;
align-items: flex-start;
justify-content: space-between;
"
>
<!-- <text>医案信息</text> -->
<!-- 固定标题和输入框部分 -->
<div class="analysis_box">
<div class="analysis_title">
智能分析医案
</div>
<!-- 固定的输入框部分 -->
<div style="height: calc(100% - 120px)">
<quill-editor
placeholder="请输入医案到此处,将自动解析医案信息"
v-model="message"
ref="myQuillEditor"
:options="editorOption"
class="shangpin_editor"
>
</quill-editor>
</div>
</div>
<div class="submit_btn" @click="submit">解析医案</div>
</div>
</div>
<!-- 搜索结果列表 -->
<scroll-div
scroll-y
class="result-list"
v-if="searchResultStatus && searchResults.length > 0"
>
<div
v-for="item in searchResults"
:key="item.id"
@click="selectItem(item)"
class="result-item"
>
{{ item.name }}
</div>
</scroll-div>
</div>
</template>
<template v-else> <div
v-if="addCertificateForm.mark&&(addCertificateForm.mark.state==2||addCertificateForm.state==3)"
style="padding:4px 10px;border-radius: 4px;white-space: wrap;"
:style="
`color:${currentNode.data.color ? currentNode.data.color : ''};
`
"
>
审核备注{{ addCertificateForm.mark }}
</div>
<el-form
:rules="dataRule"
:model="addCertificateForm"
@@ -148,7 +216,7 @@
</div>
</el-form-item>
</div>
<!-- <el-form-item label="课程名称:" prop="course" class="form_item">
<el-button plain type="primary" @click="selectCourse('addCertificateForm')"
size="mini">选择</el-button>
@@ -198,7 +266,7 @@
<div
class="detail_info_medical"
v-else
v-html="editableMap[key]"
v-html="editableMap[key] ? editableMap[key] : '<p>无</p>'"
></div>
</div>
@@ -227,10 +295,16 @@
alt=""
/>
</template>
<div v-if="fileList.length==0&&type == 'detail'" style="line-height: 60px;">暂无图片</div>
<div
v-if="fileList.length == 0 && type == 'detail'"
style="line-height: 60px;"
>
暂无图片
</div>
<el-upload
v-if="type != 'detail'"
class="custom-upload"
multiple
action="https://api.nuttyreading.com/oss/fileoss"
list-type="picture-card"
accept="image/png, image/jpeg"
@@ -293,7 +367,8 @@
</div> -->
</el-form-item>
</el-form>
</el-form></template>
</div>
<div class="demo-drawer__footer" v-if="type == 'edit' || type == 'add'">
<el-button
@@ -311,8 +386,11 @@
> </el-button
>
</div>
<div class="demo-drawer__footer" v-if="type == 'detail'&&addCertificateForm.state==1">
<div
class="demo-drawer__footer"
v-if="type == 'detail' && addCertificateForm.state == 1"
>
<!-- <el-checkbox v-model="addCertificateForm.train" true-label="1" false-label="0">是否加入Ai训练库</el-checkbox> -->
<el-button
style="float: right;margin:0 10px;"
@@ -346,7 +424,8 @@
></el-input>
<el-checkbox
:true-label="1" :false-label="0"
:true-label="1"
:false-label="0"
v-model="addCertificateForm.train"
style="margin-top: 20px;"
v-if="reviewType == 'approved'"
@@ -406,11 +485,12 @@ const toolbarOptions = [
];
// import dialogComponent from './seckillprodrelation'
export default {
props: ["data", "pageType", "dataInfo", "labelId",'currentNode'],
props: ["data", "pageType", "dataInfo", "labelId", "currentNode"],
data() {
return {
record: {},
message: "",
showMessages:false,
editableMap: {}, // 存储每个字段的内部可编辑内容
editorOption: {
modules: {
@@ -613,30 +693,48 @@ export default {
console.log("data at line 372:", data);
this.addCertificateForm = {};
this.fileList = [];
this.isEdit = type == "edit" ||type == "add" ? true : false;
var recordData = {
information: "<h1>一般信息</h1>",
chiefComplaint: "<h1>主诉</h1>",
historyOfPresentIllness: "<h1>现病史</h1>",
pastHistory: "<h1>既往史</h1>",
personalAndFamilyHistory: "<h1>家族史</h1>",
physicaExamination: "<h1>体格检查</h1>",
diagnosis: "<h1>诊断</h1>",
treatmentPlan: "<h1>治疗和后续治疗</h1>"
};
this.isEdit = type == "edit" || type == "add" ? true : false;
if (type == "add") {
this.record = {
information: "<h1>1. 一般信息</h1>",
chiefComplaint: "<h1>2. 主诉</h1>",
historyOfPresentIllness: "<h1>3. 现病史</h1>",
pastHistory: "<h1>4. 既往史</h1>",
personalAndFamilyHistory: "<h1>5. 家族史</h1>",
physicaExamination: "<h1>6. 体格检查</h1>",
diagnosis: "<h1>7. 诊断</h1>",
treatmentPlan: "<h1>8. 治疗和后续治疗</h1>"
...recordData
};
}
if (data) {
if (type == "edit" || type == "detail") {
this.record = {
information: data.information,
chiefComplaint: data.chiefComplaint,
historyOfPresentIllness: data.historyOfPresentIllness,
pastHistory: data.pastHistory,
personalAndFamilyHistory: data.personalAndFamilyHistory,
physicaExamination: data.physicaExamination,
diagnosis: data.diagnosis,
information: data.information
? data.information
: recordData.information,
chiefComplaint: data.chiefComplaint
? data.chiefComplaint
: recordData.chiefComplaint,
historyOfPresentIllness: data.historyOfPresentIllness
? data.historyOfPresentIllness
: recordData.historyOfPresentIllness,
pastHistory: data.pastHistory
? data.pastHistory
: recordData.pastHistory,
personalAndFamilyHistory: data.personalAndFamilyHistory
? data.personalAndFamilyHistory
: recordData.personalAndFamilyHistory,
physicaExamination: data.physicaExamination
? data.physicaExamination
: recordData.physicaExamination,
diagnosis: data.diagnosis ? data.diagnosis : recordData.diagnosis,
treatmentPlan: data.treatmentPlan
? data.treatmentPlan
: recordData.treatmentPlan
};
}
@@ -692,17 +790,18 @@ export default {
// recordData[key] = titleHtml + this.editableMap[key];
// }
var data = {
// labelId: this.labelId,
// img:
// this.fileList.length > 0
// ? this.addCertificateForm.imageList.toString()
// : "",
// title: this.addCertificateForm.title,
// userId: this.addCertificateForm.userId,
labelId: this.addCertificateForm.labelId,
img:
this.fileList.length > 0
? this.addCertificateForm.imageList.toString()
: "",
title: this.addCertificateForm.title,
userId: this.addCertificateForm.userId,
train: this.addCertificateForm.train, //是否加入ai训练库0否1是
mark: this.addCertificateForm.mark, //备注
state: this.reviewType=='approved'?3:2, //备注
// ...recordData
state: this.reviewType == "approved" ? 3 : 2 ,//备注
...recordData,
};
// if(this.record.)
@@ -711,6 +810,7 @@ export default {
method: "post",
data: this.$http.adornData({
...data,
data: this.addCertificateForm.data?this.addCertificateForm.data:'',
id: this.addCertificateForm.id
})
}).then(({ data }) => {
@@ -780,7 +880,6 @@ export default {
recordData[key] = titleHtml + this.editableMap[key];
}
var data = {
img:
this.fileList.length > 0
? this.addCertificateForm.imageList.toString()
@@ -793,21 +892,21 @@ export default {
// if(this.record.)
this.$http({
url: this.$http.adornUrl(
this.type=='edit'
this.type == "edit"
? "/master/medicalRecords/editMedicalRecords"
: "/master/medicalRecords/addMedicalRecords"
),
method: "post",
data: this.$http.adornData(
this.type=='edit'
this.type == "edit"
? {
...data,
data:this.addCertificateForm.data?this.addCertificateForm.data:'',
id: this.addCertificateForm.id
}
: {
...data,
labelId: this.labelId,
labelId: this.labelId
}
)
}).then(({ data }) => {
@@ -934,4 +1033,64 @@ export default {
margin: 0 !important;
}
}
.analysis_box {
padding-bottom: 40px;
width: 100%;
background-color: #fff;
border: 1px solid #188bff !important;
border-radius: 20px;
height: 84vh;
border-radius: 10px;
box-sizing: border-box !important;
uni-textarea {
border: none !important;
}
.analysis_title {
display: flex;
align-items: center;
padding: 18px 32px 0 16px;
color: #1781ff;
font-size: 18px;
font-weight: 700;
}
}
/deep/.home_wrap_analysis {
height: 89vh;
.home_form {
padding-bottom: 0px;
}
.form_item {
margin-bottom: 0 !important;
textarea {
// padding-top: 20px;
// height: 80vh !important;
}
.uni-textarea-wrapper {
// height: 100% !important;
}
}
.submit_btn {
padding: 0 20px;
position: absolute;
right: 24px;
bottom: 24px;
background-color: #1985fd;
margin: auto auto;
margin-top: 10px;
border-radius: 4px;
line-height: 30px;
height: 30px;
text-align: center;
color: #fff;
// font-weight: bold;
}
}
.content_detail {
background: #fff;
}
.message_wrap_detail {
padding: 0;
}
</style>