This commit is contained in:
2025-07-29 16:40:38 +08:00
parent b67daf0370
commit 4536c59126
2 changed files with 452 additions and 380 deletions

View File

@@ -23,9 +23,43 @@
v-if="dialogVisible"
style="padding: 0 20px;box-sizing: border-box;height: calc(100% - 40px);overflow-y: auto;"
:style="
addCertificateForm.state == 2 || !showMessages ? 'height:100%' : ''
`
${
addCertificateForm.state == 2 || !showMessages ? 'height:100%;' : ''
}
`
"
>
<div style="width:300px !important;float:right;background:#fafafa" v-if="markList.length>0">
<el-timeline style="padding-left:10px;margin-top:14px" :reverse="true">
<el-timeline-item
v-for="(activity, index) in markList"
:key="index"
:timestamp="activity.time"
>
{{ activity.mark }}
<span style="color:#f56c6c" v-if="activity.state == 2"
>( 已拒绝 )</span
>
<span style="color:#17b3a3;" v-if="activity.state == 3"
>( 已通过 )</span
>
</el-timeline-item>
</el-timeline>
</div>
<div class="medical_box" :style="
`
${
markList.length>0? 'width:calc(100% - 320px);' : ''
}
`
">
<!-- 触发按钮 -->
<p
style="cursor: pointer;margin: 0;margin-bottom: 10px;"
@@ -82,7 +116,9 @@
>解析医案</el-button
>
<el-button
@click.stop="insertMessage(v.text, v.images ? v.images : [])"
@click.stop="
insertMessage(v.text, v.images ? v.images : [])
"
size="mini"
type=""
plain
@@ -186,7 +222,7 @@
>
</el-alert>
<template v-if="!loading">
<div
<!-- <div
v-if="
addCertificateForm.mark &&
(addCertificateForm.mark.state == 2 ||
@@ -199,7 +235,7 @@
"
>
审核备注:{{ addCertificateForm.mark }}
</div>
</div> -->
<el-form
:rules="dataRule"
:model="addCertificateForm"
@@ -240,7 +276,9 @@
</div>
</template>
</el-autocomplete>
<span v-if="!isEdit">{{ addCertificateForm.userKey }}</span>
<span v-if="!isEdit">{{
addCertificateForm.userKey
}}</span>
</div>
</el-form-item>
<el-form-item
@@ -384,7 +422,9 @@
<div
class="detail_info_medical"
v-else
v-html="editableMap[key] ? editableMap[key] : '<p>无</p>'"
v-html="
editableMap[key] ? editableMap[key] : '<p>无</p>'
"
></div>
</div>
@@ -506,6 +546,7 @@
<div v-else v-loading="loading" style="height: 95%;"></div>
</template>
</div>
</div>
<div
class="demo-drawer__footer"
@@ -578,10 +619,13 @@
<span slot="footer" class="dialog-footer">
<el-button @click="dialogMarkVisible = false" size="mini"
>取消审核</el-button
>取消</el-button
>
<el-button type="primary" @click="handleReviewSave" size="mini"
>保存</el-button
<el-button
:type="`${reviewType == 'approved' ? 'primary' : 'danger'}`"
@click="handleReviewSave"
size="mini"
>{{ reviewType == "approved" ? "通过" : "拒绝" }}</el-button
>
</span>
</el-dialog>
@@ -712,7 +756,8 @@ export default {
detailContent: "",
medicalId: "",
medicalRecords: {},
content: ""
content: "",
markList: []
};
},
components: {
@@ -804,7 +849,7 @@ export default {
},
async analyzingMessage(data, images) {
await this.insertMessage(data, images);
await this.submit()
await this.submit();
},
// 点击按钮触发上传
triggerUpload() {
@@ -817,19 +862,20 @@ export default {
handleUpload(event) {
const loading = this.$loading({
lock: true,
text: 'word文件识别中',
spinner: 'el-icon-loading',
background: 'rgba(0, 0, 0, 0.7)'
text: "word文件识别中",
spinner: "el-icon-loading",
background: "rgba(0, 0, 0, 0.7)"
});
this.$commonJS.handleUpload(event, arr => {
this.$commonJS
.handleUpload(event, arr => {
console.log("content at line 618:", arr);
this.messageList = arr;
loading.close();
}).catch(()=>{
})
.catch(() => {
loading.close();
});
},
@@ -948,6 +994,7 @@ export default {
},
init(type, data) {
this.showMessages = false;
this.markList = [];
this.messageList = [];
this.currentMedicalWordImageList = [];
this.currentMedicalWordImageStr = "";
@@ -1027,6 +1074,9 @@ export default {
","
);
}
if (this.addCertificateForm.mark) {
this.markList = JSON.parse(this.addCertificateForm.mark);
}
} else {
this.addCertificateForm = {};
}
@@ -1062,7 +1112,29 @@ export default {
// }
const label = this.addCertificateForm.labelId;
const value = Array.isArray(label) ? label[label.length - 1] : label;
const formatFullTime = date => {
const pad = (n, len = 2) => n.toString().padStart(len, "0");
return (
`${date.getFullYear()}-${pad(date.getMonth() + 1)}-${pad(
date.getDate()
)} ` +
`${pad(date.getHours())}:${pad(date.getMinutes())}:${pad(
date.getSeconds()
)}.${pad(date.getMilliseconds(), 3)}`
);
};
const now = new Date();
const timeStamp = now.getTime(); // 毫秒级时间戳
const timeStr = formatFullTime(now); // 格式化字符串
var markList = [
...this.markList,
{
mark: this.addCertificateForm.mark,
time: timeStr,
state: this.reviewType == "approved" ? 3 : 2
}
];
var data = {
labelId: value,
img:
@@ -1072,7 +1144,7 @@ export default {
title: this.addCertificateForm.title,
userId: this.addCertificateForm.userId,
train: this.addCertificateForm.train, //是否加入ai训练库0否1是
mark: this.addCertificateForm.mark, //备注
mark: JSON.stringify(markList), //备注
state: this.reviewType == "approved" ? 3 : 2, //备注
...recordData
};
@@ -1157,9 +1229,9 @@ export default {
if (this.currentMedicalWordImageList.length > 0) {
const loading = this.$loading({
lock: true,
text: 'loading',
spinner: 'el-icon-loading',
background: 'rgba(0, 0, 0, 0.7)'
text: "loading",
spinner: "el-icon-loading",
background: "rgba(0, 0, 0, 0.7)"
});
this.currentMedicalWordImageStr = await this.uploadImage(
this.currentMedicalWordImageList

View File

@@ -264,7 +264,7 @@
<div
style="overflow: hidden;
font-size: 13px;
padding: 10px 10px 0px;
box-sizing: border-box;
display: -webkit-box;
-webkit-box-orient: vertical;