From 6ad7dbad6efc6a53f69e4f0ebbdec3943ba7b1eb Mon Sep 17 00:00:00 2001
From: ysn <2126564605@qq.com>
Date: Mon, 15 Jun 2026 16:50:21 +0800
Subject: [PATCH] =?UTF-8?q?=E7=97=85=E4=BE=8B=E5=BA=93-=E9=97=AE=E9=A2=98?=
=?UTF-8?q?=E4=BF=AE=E5=A4=8D?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
public/report-template.html | 97 +++
src/api/cases/index.js | 17 +
src/views/cases/components/CaseFormDialog.vue | 14 +-
.../components/UltrasoundReportPrint.vue | 390 ++++-----
src/views/cases/detail.vue | 784 ++++++++++++------
src/views/cases/index.vue | 31 +-
6 files changed, 866 insertions(+), 467 deletions(-)
create mode 100644 public/report-template.html
diff --git a/public/report-template.html b/public/report-template.html
new file mode 100644
index 0000000..7e72130
--- /dev/null
+++ b/public/report-template.html
@@ -0,0 +1,97 @@
+
+
+
+
+
+
+
+ $$logo$$
+
青岛海信医疗设备股份有限公司
+ 彩色多普勒超声检查报告单
+
+
+
+
+
+ | 超声部位: $$checkbody$$ |
+ 检查号: $$checknumber$$ |
+
+
+
+
+
+
+
+
+
+ | 姓名: $$name$$ |
+ 性别: $$sex$$ 年龄: $$age$$ |
+ 科别: $$examroom$$ |
+ 申请医师: $$requestdoctor$$ |
+
+ |
+
+ | 病历号: $$pid$$ |
+ 住院号: $$hospitalnumber$$ |
+ 病区号: $$areanumber$$ |
+ 床位号: $$bednumber$$ |
+
+
+
+
+
+
+ $$ctimgtable$$
+
+
+
+
+
+
+ | 超声所见 |
+
+
+ $$checkview$$ |
+
+
+
+
+
+
+
+
+ | 超声提示 |
+
+
+ $$checkconclusion$$ |
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/api/cases/index.js b/src/api/cases/index.js
index d5b74f4..e57f24f 100644
--- a/src/api/cases/index.js
+++ b/src/api/cases/index.js
@@ -121,6 +121,15 @@ export function postReportViewers(data) {
data
})
}
+// 审批操作(通过/驳回)
+export function postReportReview(data) {
+ return request({
+ url: '/report/review',
+ method: 'post',
+ data
+ })
+}
+
// �病例库-修改
export function postReportEdit(data) {
return request({
@@ -129,6 +138,14 @@ export function postReportEdit(data) {
data
})
}
+// 打印
+export function postReportPrint(data) {
+ return request({
+ url: '/report/print',
+ method: 'post',
+ data
+ })
+}
// 修改预约时间
export function postReportTimeSectionEdit(data) {
return request({
diff --git a/src/views/cases/components/CaseFormDialog.vue b/src/views/cases/components/CaseFormDialog.vue
index 19f50c0..2ffe0e7 100644
--- a/src/views/cases/components/CaseFormDialog.vue
+++ b/src/views/cases/components/CaseFormDialog.vue
@@ -392,10 +392,16 @@ export default {
},
],
patient_age: [
- { required: true, message: "年龄不能为空", trigger: "change" },
+ { required: true, message: "年龄不能为空", trigger: "blur" },
+ {
+ type: "number",
+ min: 0,
+ message: "年龄不能为负数",
+ trigger: "blur",
+ },
],
patient_age_type: [
- { required: true, message: "年龄类型不能为空", trigger: "change" },
+ { required: true, message: "年龄类型不能为空", trigger: "blur" },
],
patient_sex: [
{ required: true, message: "性别不能为空", trigger: "change" },
@@ -495,9 +501,11 @@ export default {
postReportTimeSections({ exam_room_id: exam_rooms_id }).then(
(response) => {
this.timeSectionList = response.data || [];
- if (this.timeSectionList.length > 0) {
+ if (this.form.id == undefined && this.timeSectionList.length > 0) {
this.form.time_section = this.timeSectionList[0];
+ console.log(this.form.time_section);
}
+ console.log(this.form.time_section);
}
);
},
diff --git a/src/views/cases/components/UltrasoundReportPrint.vue b/src/views/cases/components/UltrasoundReportPrint.vue
index e23eabb..73a3ec9 100644
--- a/src/views/cases/components/UltrasoundReportPrint.vue
+++ b/src/views/cases/components/UltrasoundReportPrint.vue
@@ -5,189 +5,14 @@
width="800px"
:close-on-click-modal="false"
>
-
-
-
-
-
-
-
- 海伦普济医院
-
- 彩色多普勒超声检查报告单
-
-
-
-
-
-
- {{
- report.positions.length
- ? report.positions.map((item) => item.level2.name).join("|") +
- (report.position_text ? "|" + report.position_text : "")
- : report.position_text
- }}
-
-
-
-
- {{ report.id }}
-
-
-
-
-
-
- {{ report.patient_name }}
-
-
-
-
- {{
- report.patient_sex
- ? patientSexList.find((i) => i.value == report.patient_sex)
- .label || ""
- : ""
- }}
-
-
-
-
- {{ report.patient_age }}
- {{
- report.patient_age_type
- ? patientAgeTypeList.find(
- (i) => i.value == report.patient_age_type
- ).label || ""
- : ""
- }}
-
-
-
-
- {{ report.exam_rooms.map((i) => i.name).join("|") }}
-
-
-
-
- {{ report.request_doctor }}
-
-
-
-
-
-
- {{ report.outpatient_number }}
-
-
-
-
- {{ report.hospitalization_number }}
-
-
-
-
- {{ report.area_number }}
-
-
-
-
- {{ report.bed_number }}
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 仅供临床参考,不作证明材料!
-
-
-
-
- {{ report.reporter_name }}
-
-
-
-
- {{ report.create_time }}
-
-
-
-
+
+
-
-
-
-
- 远程超声检查报告
-
-
-
-
- {{ form.id }}
-
-
-
-
-
-
- {{ form.patient_name }}
-
-
-
-
- {{
- form.patient_sex
- ? patientSexList.find((i) => i.value == form.patient_sex)
- .label || ""
- : ""
- }}
-
-
-
-
- {{ form.patient_age }}
- {{
- form.patient_age_type
- ? patientAgeTypeList.find(
- (i) => i.value == form.patient_age_type
- ).label || ""
- : ""
- }}
-
-
-
-
- {{ form.request_doctor }}
-
-
-
-
- {{ form.patient_id }}
-
-
-
-
- {{ form.outpatient_number }}
-
-
-
-
- {{ form.hospitalization_number }}
-
-
-
-
- {{ form.area_number }}
-
-
-
-
- {{ form.bed_number }}
-
-
-
-
- {{ form.equipments.map((i) => i.name).join("|") }}
-
-
-
-
- {{
- form.positions.length
- ? form.positions
- .map((item) => item.level2.name)
- .join("|") +
- (form.position_text ? "|" + form.position_text : "")
- : form.position_text
- }}
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 全部复制
-
-
+
+
+
+
+ 顶
+
+
+ 述
+
+
+ 诊
+
+
+ 专
+
+
+ 底
+
+
+
@@ -366,7 +472,9 @@
type="text"
icon="el-icon-plus"
@click="openTemplateDialog({})"
- :disabled="form.status != 1 && form.status != 5"
+ :disabled="
+ form.status != 1 && form.status != 5 && form.status != 15
+ "
>
新增
@@ -405,7 +513,9 @@
v-model="templateForm.id"
style="width: 100%"
@change="changeTemplate"
- :disabled="form.status != 1 && form.status != 5"
+ :disabled="
+ form.status != 1 && form.status != 5 && form.status != 15
+ "
>
应用
@@ -446,7 +558,9 @@
icon="el-icon-check"
@click="handleCnclusion"
style="float: right"
- :disabled="form.status != 1 && form.status != 5"
+ :disabled="
+ form.status != 1 && form.status != 5 && form.status != 15
+ "
>
应用
@@ -465,7 +579,9 @@
phrase: '',
})
"
- :disabled="form.status != 1 && form.status != 5"
+ :disabled="
+ form.status != 1 && form.status != 5 && form.status != 15
+ "
>
新增
@@ -484,7 +600,11 @@
handlePhraseCommand(command, scope.row)
"
@@ -608,6 +728,28 @@
:min-select-count="1"
@confirm="handleShareToContacts"
/>
+
+
+
+
+
+
+
+
+
@@ -635,6 +777,7 @@ import {
postReportPhraseCount,
postReportTemplateTree,
postReportPrint,
+ postReportReview,
} from "@/api/cases/index.js";
import { postMessagePushToUser } from "@/api/knowledge";
import { mapGetters } from "vuex";
@@ -662,6 +805,8 @@ export default {
positions: [],
experts: [],
},
+ // 原始表单数据副本,用于检测是否有修改
+ originalForm: null,
// 字典
// 性别
patientSexList: patientSexList(),
@@ -710,6 +855,14 @@ export default {
// ====================== ✅ 片语核心(新增) ======================
phraseTitle: "新增片语",
phraseOpen: false,
+ // ====================== 审批驳回 ======================
+ rejectDialogOpen: false,
+ rejectReason: { comment: "" },
+ rejectRules: {
+ comment: [
+ { required: true, message: "请输入审核拒绝理由", trigger: "blur" },
+ ],
+ },
phraseList: [],
phraseForm: {
id: 0,
@@ -727,6 +880,13 @@ export default {
this.getReportInfo(id);
},
methods: {
+ // 锚点滚动
+ scrollToAnchor(anchorId) {
+ const element = document.getElementById(anchorId);
+ if (element) {
+ element.scrollIntoView({ behavior: "smooth", block: "start" });
+ }
+ },
// 图片操作
handleOpenFile() {
this.$refs.fileInput.click();
@@ -805,6 +965,44 @@ export default {
})
.catch(() => {});
},
+ // 审批通过
+ handlePass() {
+ this.$modal
+ .confirm("点击确定,病例将审核通过")
+ .then(() => {
+ return postReportReview({
+ report_id: this.form.id,
+ status: 1,
+ comment: "",
+ });
+ })
+ .then(() => {
+ this.$modal.msgSuccess("审核通过成功");
+ this.getReportInfo(this.form.id);
+ })
+ .catch(() => {});
+ },
+ // 审批驳回 - 打开驳回原因弹窗
+ handleReject() {
+ this.rejectReason.comment = "";
+ this.rejectDialogOpen = true;
+ },
+ // 确认驳回
+ confirmReject() {
+ this.$refs.rejectFormRef.validate((valid) => {
+ if (valid) {
+ postReportReview({
+ report_id: this.form.id,
+ status: 0,
+ comment: this.rejectReason.comment,
+ }).then(() => {
+ this.$modal.msgSuccess("审核拒绝成功");
+ this.rejectDialogOpen = false;
+ this.getReportInfo(this.form.id);
+ });
+ }
+ });
+ },
// 根据路由参数获取病例数据
getReportInfo(id) {
if (id) {
@@ -817,6 +1015,8 @@ export default {
this.form.attachment = Array.isArray(res.data.attachment)
? res.data.attachment
: [];
+ // 保存原始数据副本,用于检测是否有修改
+ this.originalForm = JSON.parse(JSON.stringify(this.form));
this.getReviewers();
this.loadTemplateList();
this.loadPhraseList();
@@ -855,7 +1055,7 @@ export default {
patient_type: form.patient_type || 0,
request_doctor: form.request_doctor || "",
reviewer_id: form.reviewer_id || 0,
- negative: form.negative || 1,
+ negative: form.negative ? 0 : 1,
position_text: form.position_text || "",
text_comment: form.text_comment || "",
text_conclusion: form.text_conclusion || "",
@@ -888,7 +1088,8 @@ export default {
});
})
.then(() => {
- this.handleClose();
+ // 保存成功后直接关闭页面,不再弹出确认框
+ this.getReportInfo(form.id);
this.$modal.msgSuccess(msg);
})
.catch(() => {});
@@ -897,13 +1098,46 @@ export default {
handlePrint() {
this.$refs.UltrasoundReportPrintRef.print(this.form);
},
+ // 检测表单是否有修改
+ isFormModified() {
+ if (!this.originalForm) return false;
+ // 需要比较的关键字段
+ const compareKeys = [
+ "text_comment",
+ "text_conclusion",
+ "reviewer_id",
+ "isPositive",
+ "attachment",
+ "experts",
+ ];
+ for (const key of compareKeys) {
+ const current = this.form[key];
+ const original = this.originalForm[key];
+ // 对于数组类型,比较JSON字符串
+ if (Array.isArray(current) || Array.isArray(original)) {
+ const currentStr = JSON.stringify(current || []);
+ const originalStr = JSON.stringify(original || []);
+ if (currentStr !== originalStr) {
+ return true;
+ }
+ } else if (current !== original) {
+ return true;
+ }
+ }
+ return false;
+ },
handleClose() {
- this.$modal
- .confirm("尚有修改未提交,是否确定退出")
- .then(() => {
- this.$router.back();
- })
- .catch(() => {});
+ // 只有在表单有修改时才弹出确认框
+ if (this.isFormModified()) {
+ this.$modal
+ .confirm("尚有修改未提交,是否确定退出")
+ .then(() => {
+ this.$router.back();
+ })
+ .catch(() => {});
+ } else {
+ this.$router.back();
+ }
},
handleShare() {
this.$refs.createGroupDialogRef.show();
@@ -1005,6 +1239,12 @@ export default {
.then((response) => {
if (response.code === 200 && response.data) {
this.partIdList = response.data;
+ if (
+ this.partIdList.length > 0 &&
+ this.newTemplateForm.id == undefined
+ ) {
+ this.newTemplateForm.part_id = this.partIdList[0].child[0].id;
+ }
}
})
.catch((error) => {
@@ -1132,6 +1372,15 @@ export default {
\ No newline at end of file
diff --git a/src/views/cases/index.vue b/src/views/cases/index.vue
index 721f534..553efb2 100644
--- a/src/views/cases/index.vue
+++ b/src/views/cases/index.vue
@@ -276,7 +276,9 @@
{{ scope.row.date_time }} {{ scope.row.time_section }}
@@ -327,7 +329,7 @@
show-overflow-tooltip
>
- {{ scope.row.exam_rooms.map((item) => item.name).join(", ") || "-" }}
+ {{ scope.row.exam_rooms.map((item) => item.name).join(", ") }}
{
- const end = new Date();
+ const end = new Date(
+ new Date().getFullYear(),
+ new Date().getMonth() + 1,
+ 0,
+ 23,
+ 59,
+ 59,
+ 999
+ );
const start = new Date(
new Date().getFullYear(),
new Date().getMonth(),
@@ -531,7 +544,15 @@ export default {
{
text: "今年",
onClick: (picker) => {
- const end = new Date();
+ const end = new Date(
+ new Date().getFullYear(),
+ 11,
+ 31,
+ 23,
+ 59,
+ 59,
+ 999
+ );
const start = new Date(new Date().getFullYear(), 0, 1);
picker.$emit("pick", [start, end]);
},