Browse Source

报告单导出修噶,每次点就查询报告单列表

master-dev
lzp 3 days ago
parent
commit
b53572961a
  1. 10
      web_client/src/api/ams.js
  2. 385
      web_client/src/views/history/components/scaleInfor.vue
  3. 376
      web_client/src/views/history/components/scaleInforCopy.vue

10
web_client/src/api/ams.js

@ -46,9 +46,7 @@ export const doctorExport = (params) =>
// 导出报告单(阳性版)
export const positiveExport = (params) =>
axios.post(`${proxyUrl}/report/exportYx`, params);
// 导出报告单(整)
export const reportExportAll = (params) =>
axios.post(`${proxyUrl}/report/exportAll`, params);
// 导出指定量表
export const exportWorkingScore = (params) =>
axios.post(`${rms}/exportWorkingScore`, params);
@ -225,3 +223,9 @@ export const deletePatient = (params) =>
axios.post(`${proxyUrl}/ems/delete`, params);
// 撤回评估
export const revok = (params) => axios.post(`${proxyUrl}/ems/revoke`, params);
// 查询报告单模版
export const reportTemplateAllQuery = (params) =>
axios.post(`${proxyUrl}/reportTemplateAll/query`, params);
// 导出报告单(整)
export const reportExportAll = (params) =>
axios.post(`${proxyUrl}/report/exportAll`, params);

385
web_client/src/views/history/components/scaleInfor.vue

@ -6,7 +6,7 @@
<div style="height: 100%" class="div-box">
<div v-if="reportDetail1">
<!-- 患者信息 -->
<el-card class="box-card" style="">
<el-card class="box-card" style="padding-top: 0">
<div slot="header">
<div class="clearfix">
<h1 class="box-card-header">患者信息</h1>
@ -19,65 +19,29 @@
<i class="el-icon-document-checked"></i>
保存修改
</div>
<!-- <div
class="div-derive cardRig-but"
style="width: 130px; margin-right: 10px"
@click="handleExport('合并版', true)"
>
<i class="el-icon-upload2"></i>导出合并版
</div>
<div
v-if="!isAPP"
class="div-print cardRig-but"
@click="handlePrinting('合并版')"
style="width: 130px; margin-right: 10px"
>
<i class="el-icon-printer"></i>打印合并版
</div> -->
<div
class="div-derive cardRig-but"
style="width: 130px; margin-right: 10px"
@click="handleExport('医生版', true)"
>
<i class="el-icon-upload2"></i>导出医生版
</div>
<div
v-if="!isAPP"
style="width: 130px; margin-right: 10px"
class="div-print cardRig-but"
@click="handlePrinting('医生版', true)"
>
<i class="el-icon-printer"></i>打印医生版
</div>
<div
class="div-derive cardRig-but"
style="width: 130px; margin-right: 10px"
@click="handleExport('阳性版', true)"
>
<i class="el-icon-upload2"></i>导出阳性版
</div>
<div
v-if="!isAPP"
style="width: 130px; margin-right: 10px"
class="div-print cardRig-but"
@click="handlePrinting('阳性版')"
>
<i class="el-icon-printer"></i>打印阳性版
</div>
<div
class="div-derive cardRig-but"
style="width: 130px; margin-right: 10px"
@click="handleExport('个人版', true)"
>
<i class="el-icon-upload2"></i>导出个人版
</div>
<div
v-if="!isAPP"
class="div-print cardRig-but"
@click="handlePrinting('个人版')"
style="width: 130px"
>
<i class="el-icon-printer"></i>打印个人版
<div v-for="(r, rin) in reportButList" :key="rin">
<el-popover placement="bottom" trigger="click">
<div
slot="reference"
class="div-derive cardRig-but"
@click="handleReportQuery(r.code, r.type)"
>
<i
:class="r.type ? 'el-icon-printer' : 'el-icon-upload2'"
></i>
{{ r.type ? "打印" : "导出" }}{{ r.lable }}
</div>
<div v-loading="loading">
<div
v-for="(item, index) in reportTemplateList"
:key="index"
@click="handleReportTemplate(item.id, item.type)"
class="cardRig-but cardRig-but1"
>
{{ item.name }}{{ item.type ? "pdf" : "word" }}
</div>
</div>
</el-popover>
</div>
</div>
</div>
@ -252,39 +216,6 @@
:index="index"
:leftShow="leftShow"
/>
<!-- 初步印象 -->
<!-- <div style="margin-top: 20px">
<div class="card-header" style="margin-bottom: 10px">
<div class="card-header-left">
<h1 style="line-height: 44px">初步印象</h1>
</div>
<div
class="div-edit"
@click="handleEdit(item)"
v-if="item.isEdit && !leftShow"
>
<a-icon type="edit" style="color: #10b77f; font-size: 22px" />
</div>
<div v-if="!item.isEdit">
<a-icon
type="check-circle"
style="font-size: 40px; color: #5cc0be"
@click="handleSubmit(item)"
/>
</div>
</div>
<a-textarea
:disabled="item.isEdit"
style="
background: #f6f6f6 !important;
font-size: 16px;
padding: 10px !important;
line-height: 30px;
"
v-model="item.impression"
:auto-size="{ minRows: 3, maxRows: 5 }"
/>
</div> -->
</el-card>
<patientMark :reportDetail1="reportDetail1" :disab="true"></patientMark>
<div style="height: 1px"></div>
@ -307,21 +238,6 @@
:id="'reportPartIframe' + timestamp"
style="display: none"
></iframe>
<el-dialog
title="医生签名"
:visible.sync="open"
width="50%"
append-to-body
class="popup"
>
<signatureVue
v-if="open"
ref="closeDialog1"
@close="closeDialog1"
@handleSing="handleSing"
>
</signatureVue>
</el-dialog>
</div>
</switchingSlip>
</template>
@ -343,6 +259,7 @@ import {
positiveExport,
icdQuery,
reportExportAll,
reportTemplateAllQuery,
} from "api/ams";
import {
pasis as pasisConfig,
@ -363,11 +280,11 @@ export default {
props: [],
data() {
return {
loading: false,
timestamp: "",
type: "",
apiUrl: apiUrl,
open: false,
value: "",
pasisConfig: pasisConfig,
careers: careers,
clinical: clinical,
@ -375,21 +292,45 @@ export default {
isEdit: true,
reportDetail1: null,
leftShow: false,
signData: {},
reportPath: "",
icdList: [],
isAPP: JSON.parse(localStorage.getItem("isAndroid")),
reportButList: [
{
lable: "个人版",
type: 0, //
code: "PERSION",
},
{
lable: "个人版",
type: 1, //
code: "PERSION",
},
{
lable: "医生版",
type: 0,
code: "DOCTOR",
},
{
lable: "医生版",
type: 1,
code: "DOCTOR",
},
{
lable: "阳性版",
type: 0,
code: "POSITIVE",
},
{
lable: "医生版",
type: 1,
code: "POSITIVE",
},
],
reportTemplateList: [],
exportType: "",
};
},
watch: {
// reportDetail(newVal, oldVal) {
// this.reportDetail1 = newVal;
// this.reportDetail1.patient.isEdit = true;
// this.reportDetail1.scores.forEach((item) => {
// item.isEdit = true;
// });
// },
},
computed: {
...mapState("user", ["route", "query"]),
...mapState("ht", ["createId", "patientData"]),
@ -400,21 +341,17 @@ export default {
if (this.$route.query.show) {
this.leftShow = true;
}
console.log("this.isAPP", this.isAPP);
if (this.isAPP) {
this.reportButList = this.reportButList.filter((i) => i.type != 1);
console.log(" this.reportButList ", this.reportButList );
}
},
methods: {
...mapMutations("ht", [
"setReportId",
"setQuestion",
"setInfoAudo",
"setInfoPath",
"setAudioPathCopy",
"setSpecifyJump",
"setEvaluationPath",
]),
...mapMutations("user", ["setReportData", "setReportWriteAble"]),
//
async geticdQuery() {
console.log("icdQuery");
let res = await icdQuery();
const { code, msg, data } = res;
if (code === 200) {
@ -424,72 +361,51 @@ export default {
handleBack() {
this.$router.go(-1);
},
//
async handleExport(_type, _printFlat) {
this.type = _type;
let params = {
//
async handleReportQuery(code, type) {
this.exportType = type;
this.loading = true;
let res = await reportTemplateAllQuery({ code });
if (res.code === 200) {
this.reportTemplateList = res.data || [];
}
this.loading = false;
},
//
async handleReportTemplate(templateId, type) {
let res = await reportExportAll({
templateId,
evaluationId: this.reportDetail1.patient.evaluationId,
reportId: this.reportDetail1.patient.id,
signId: this.signData.signId,
};
let res = "";
if (_type === "医生版") {
res = await doctorExport(params);
} else if (_type === "个人版") {
res = await personalExport(params);
} else if (_type === "阳性版") {
res = await positiveExport(params);
} else if (_type === "合并版") {
res = await reportExportAll(params);
}
const { code, msg, data } = res;
if (code === 200) {
// true
if (_printFlat) {
//
// window.open(this.apiUrl + data.path);
//
this.$download(this.apiUrl + data.path);
});
if (res.code === 200) {
let path = type ? res.data.path : res.data.word;
//
if (!this.exportType) {
this.$download(this.apiUrl + path);
} else {
this.open = false;
this.handleInvoke(
`${this.apiUrl}${data.path}?time${new Date().getTime()}`,
);
this.timestamp = new Date().getTime();
setTimeout(() => {
this.handleInvoke(
`${this.apiUrl}${path}?time${new Date().getTime()}`,
);
}, 500);
}
this.$forceUpdate();
} else {
this.$message.error(msg);
}
},
//
handleSing(_singData) {
this.signData = _singData;
this.handleExport(this.type);
},
//
closeDialog1(params) {
const file = params;
var form = new FormData();
form.append("file", file);
uploadfile(form).then(async (res) => {
if (res.code === 200) {
let params = {
signUrl: res.url,
};
const signRes = await addSign(params);
const { code, msg, data } = signRes;
if (code === 200) {
this.signData = data;
this.handleExport(this.type);
} else {
this.$message.error(msg);
}
} else {
console.log(res);
this.$message.error("签名保存失败");
}
});
//
handleInvoke(_path) {
try {
this.reportPath = _path;
var iframe = document.getElementById(
"reportPartIframe" + this.timestamp,
);
iframe.onload = () => {
iframe.contentWindow.print();
};
} catch (error) {
console.log("error: ", error);
}
},
//
async handleInputBlur() {
@ -514,63 +430,6 @@ export default {
this.$message.error(msg);
}
},
//
handlePrinting(_type) {
this.type = _type;
this.timestamp = new Date().getTime();
// this.open = true;
this.handleExport(this.type);
},
//
handleInvoke(_path) {
try {
// if (JSON.parse(localStorage.getItem("isAndroid"))) {
// this.$message({
// message: "wps",
// type: "success",
// center: true,
// duration: 6000,
// });
// // window.open(_path);
// //
// this.$download(_path);
// return;
// }
this.reportPath = _path;
var iframe = document.getElementById(
"reportPartIframe" + this.timestamp,
);
iframe.onload = () => {
iframe.contentWindow.print();
};
} catch (error) {
console.log("error: ", error);
}
},
//
async handleSubmit(item) {
console.log("item: ", item, this.reportDetail1.patient.id);
let params = {
initialImpression: item.impression,
reportId: this.reportDetail1.patient.id,
scaleCode: item.code,
};
const res = await updateScaleInitialImpression(params);
const { code, msg, data } = res;
if (code === 200) {
item.isEdit = true;
this.$message.success("编辑成功");
this.$forceUpdate();
} else {
this.$message.error(msg);
}
},
//
handleReporEdit() {
this.reportDetail1.patient.isEdit = false;
this.$forceUpdate();
},
//
async getQueryReportDetail() {
const params = {
@ -590,11 +449,6 @@ export default {
this.$message.error(msg);
}
},
// code
handleEdit(item) {
item.isEdit = false;
this.$forceUpdate();
},
},
};
</script>
@ -724,22 +578,27 @@ export default {
border: 1px solid #888888;
margin-left: 20px;
}
.cardRig-but {
width: 90px;
height: 40px;
line-height: 40px;
border-radius: 4px 4px 4px 4px;
opacity: 1;
border: 1px solid #5cc0be;
text-align: center;
color: #5cc0be;
}
.div-derive {
// margin-right: 20px;
}
.div-prin {
}
}
.cardRig-but {
padding: 0 10px;
height: 40px;
line-height: 40px;
border-radius: 4px 4px 4px 4px;
opacity: 1;
border: 1px solid #5cc0be;
text-align: center;
color: #5cc0be;
margin-left: 10px;
}
.cardRig-but1 {
margin: 10px 0 10px 0;
}
.info-col {
border-right: 1px solid #e1e1e1;
&:last-child {
@ -827,7 +686,7 @@ p {
font-size: 24px;
font-weight: bold;
color: #222222;
line-height: 50px;
line-height: 60px;
margin-left: 10px;
}
.box-card {

376
web_client/src/views/history/components/scaleInforCopy.vue

@ -3,7 +3,7 @@
<div style="height: 100%" class="div-box">
<div v-if="reportDetail1">
<!-- 患者信息 -->
<el-card class="box-card" style="">
<el-card class="box-card" style="padding-top: 0">
<div slot="header">
<div class="clearfix">
<h1 class="box-card-header">患者信息</h1>
@ -17,65 +17,29 @@
<i class="el-icon-document-checked"></i>
保存修改
</div>
<!-- <div
class="div-derive cardRig-but"
style="width: 130px; margin-right: 10px"
@click="handleExport('合并版', true)"
>
<i class="el-icon-upload2"></i>导出合并版
</div>
<div
v-if="!isAPP"
class="div-print cardRig-but"
@click="handlePrinting('合并版')"
style="width: 130px; margin-right: 10px"
>
<i class="el-icon-printer"></i>打印合并版
</div> -->
<div
class="div-derive cardRig-but"
style="width: 130px; margin-right: 10px"
@click="handleExport('医生版', true)"
>
<i class="el-icon-upload2"></i>导出医生版
</div>
<div
v-if="!isAPP"
style="width: 130px; margin-right: 10px"
class="div-print cardRig-but"
@click="handlePrinting('医生版', true)"
>
<i class="el-icon-printer"></i>打印医生版
</div>
<div
class="div-derive cardRig-but"
style="width: 130px; margin-right: 10px"
@click="handleExport('阳性版', true)"
>
<i class="el-icon-upload2"></i>导出阳性版
</div>
<div
v-if="!isAPP"
style="width: 130px; margin-right: 10px"
class="div-print cardRig-but"
@click="handlePrinting('阳性版')"
>
<i class="el-icon-printer"></i>打印阳性版
</div>
<div
class="div-derive cardRig-but"
style="width: 130px; margin-right: 10px"
@click="handleExport('个人版', true)"
>
<i class="el-icon-upload2"></i>导出个人版
</div>
<div
v-if="!isAPP"
class="div-print cardRig-but"
@click="handlePrinting('个人版')"
style="width: 130px"
>
<i class="el-icon-printer"></i>打印个人版
<div v-for="(r, rin) in reportButList" :key="rin">
<el-popover placement="bottom" trigger="click">
<div
slot="reference"
class="div-derive cardRig-but"
@click="handleReportQuery(r.code, r.type)"
>
<i
:class="r.type ? 'el-icon-printer' : 'el-icon-upload2'"
></i>
{{ r.type ? "打印" : "导出" }}{{ r.lable }}
</div>
<div v-loading="loading">
<div
v-for="(item, index) in reportTemplateList"
:key="index"
@click="handleReportTemplate(item.id, item.type)"
class="cardRig-but cardRig-but1"
>
{{ item.name }}{{ item.type ? "pdf" : "word" }}
</div>
</div>
</el-popover>
</div>
</div>
</div>
@ -250,39 +214,6 @@
:index="index"
:leftShow="leftShow"
/>
<!-- 初步印象 -->
<!-- <div style="margin-top: 20px">
<div class="card-header" style="margin-bottom: 10px">
<div class="card-header-left">
<h1 style="line-height: 44px">初步印象</h1>
</div>
<div
class="div-edit"
@click="handleEdit(item)"
v-if="item.isEdit && !leftShow"
>
<a-icon type="edit" style="color: #10b77f; font-size: 22px" />
</div>
<div v-if="!item.isEdit">
<a-icon
type="check-circle"
style="font-size: 40px; color: #5cc0be"
@click="handleSubmit(item)"
/>
</div>
</div>
<a-textarea
:disabled="item.isEdit"
style="
background: #f6f6f6 !important;
font-size: 16px;
padding: 10px !important;
line-height: 30px;
"
v-model="item.impression"
:auto-size="{ minRows: 3, maxRows: 5 }"
/>
</div> -->
</el-card>
<patientMark :reportDetail1="reportDetail1" :disab="true"></patientMark>
<div style="height: 1px"></div>
@ -305,21 +236,6 @@
:id="'reportPartIframe' + timestamp"
style="display: none"
></iframe>
<el-dialog
title="医生签名"
:visible.sync="open"
width="50%"
append-to-body
class="popup"
>
<signatureVue
v-if="open"
ref="closeDialog1"
@close="closeDialog1"
@handleSing="handleSing"
>
</signatureVue>
</el-dialog>
</div>
</switchingSlip>
</template>
@ -339,8 +255,9 @@ import {
queryReport,
queryReportInfo,
positiveExport,
reportExportAll,
icdQuery,
reportExportAll,
reportTemplateAllQuery,
} from "api/ams";
import {
pasis as pasisConfig,
@ -361,11 +278,11 @@ export default {
props: [],
data() {
return {
loading: false,
timestamp: "",
type: "",
apiUrl: apiUrl,
open: false,
value: "",
pasisConfig: pasisConfig,
careers: careers,
clinical: clinical,
@ -373,22 +290,45 @@ export default {
isEdit: true,
reportDetail1: null,
leftShow: false,
codeItme: {},
signData: {},
reportPath: "",
icdList: [],
isAPP: JSON.parse(localStorage.getItem("isAndroid")),
reportButList: [
{
lable: "个人版",
type: 0, //
code: "PERSION",
},
{
lable: "个人版",
type: 1, //
code: "PERSION",
},
{
lable: "医生版",
type: 0,
code: "DOCTOR",
},
{
lable: "医生版",
type: 1,
code: "DOCTOR",
},
{
lable: "阳性版",
type: 0,
code: "POSITIVE",
},
{
lable: "医生版",
type: 1,
code: "POSITIVE",
},
],
reportTemplateList: [],
exportType: "",
};
},
watch: {
// reportDetail(newVal, oldVal) {
// this.reportDetail1 = newVal;
// this.reportDetail1.patient.isEdit = true;
// this.reportDetail1.scores.forEach((item) => {
// item.isEdit = true;
// });
// },
},
computed: {
...mapState("user", ["route", "query"]),
...mapState("ht", ["createId", "patientData"]),
@ -402,6 +342,10 @@ export default {
this.setEvaluationPath(null);
sessionStorage.clear();
this.setIsRecord(false);
if (this.isAPP) {
this.reportButList = this.reportButList.filter((i) => i.type != 1);
console.log(" this.reportButList ", this.reportButList);
}
},
methods: {
...mapMutations("ht", [
@ -417,7 +361,6 @@ export default {
...mapMutations("user", ["setReportData", "setReportWriteAble"]),
//
async geticdQuery() {
console.log("icdQuery");
let res = await icdQuery();
const { code, msg, data } = res;
if (code === 200) {
@ -427,71 +370,51 @@ export default {
handleBack() {
this.$router.go(-1);
},
//
async handleExport(_type, _printFlat) {
this.type = _type;
let params = {
//
async handleReportQuery(code, type) {
this.exportType = type;
this.loading = true;
let res = await reportTemplateAllQuery({ code });
if (res.code === 200) {
this.reportTemplateList = res.data || [];
}
this.loading = false;
},
//
async handleReportTemplate(templateId, type) {
let res = await reportExportAll({
templateId,
evaluationId: this.reportDetail1.patient.evaluationId,
reportId: this.reportDetail1.patient.id,
signId: this.signData.signId,
};
let res = "";
if (_type === "医生版") {
res = await doctorExport(params);
} else if (_type === "个人版") {
res = await personalExport(params);
} else if (_type === "阳性版") {
res = await positiveExport(params);
}else if (_type === "合并版") {
res = await reportExportAll(params);
}
const { code, msg, data } = res;
if (code === 200) {
// true
if (_printFlat) {
//
// window.open(this.apiUrl + data.path);
this.$download(this.apiUrl + data.path);
});
if (res.code === 200) {
let path = type ? res.data.path : res.data.word;
//
if (!this.exportType) {
this.$download(this.apiUrl + path);
} else {
this.open = false;
this.handleInvoke(
`${this.apiUrl}${data.path}?time${new Date().getTime()}`,
);
this.timestamp = new Date().getTime();
setTimeout(() => {
this.handleInvoke(
`${this.apiUrl}${path}?time${new Date().getTime()}`,
);
}, 500);
}
this.$forceUpdate();
} else {
this.$message.error(msg);
}
},
//
handleSing(_singData) {
this.signData = _singData;
this.handleExport(this.type);
},
//
closeDialog1(params) {
const file = params;
var form = new FormData();
form.append("file", file);
uploadfile(form).then(async (res) => {
if (res.code === 200) {
let params = {
signUrl: res.url,
};
const signRes = await addSign(params);
const { code, msg, data } = signRes;
if (code === 200) {
this.signData = data;
this.handleExport(this.type);
} else {
this.$message.error(msg);
}
} else {
console.log(res);
this.$message.error("签名保存失败");
}
});
//
handleInvoke(_path) {
try {
this.reportPath = _path;
var iframe = document.getElementById(
"reportPartIframe" + this.timestamp,
);
iframe.onload = () => {
iframe.contentWindow.print();
};
} catch (error) {
console.log("error: ", error);
}
},
//
async handleInputBlur() {
@ -516,62 +439,6 @@ export default {
this.$message.error(msg);
}
},
//
handlePrinting(_type) {
this.type = _type;
this.timestamp = new Date().getTime();
// this.open = true;
this.handleExport(this.type);
},
//
handleInvoke(_path) {
try {
// if (JSON.parse(localStorage.getItem("isAndroid"))) {
// this.$message({
// message: "wps",
// type: "success",
// center: true,
// duration: 6000,
// });
// // window.open(_path);
// this.$download(_path);
// return;
// }
this.reportPath = _path;
var iframe = document.getElementById(
"reportPartIframe" + this.timestamp,
);
iframe.onload = () => {
iframe.contentWindow.print();
};
} catch (error) {
console.log("error: ", error);
}
},
//
async handleSubmit(item) {
console.log("item: ", item, this.reportDetail1.patient.id);
let params = {
initialImpression: item.impression,
reportId: this.reportDetail1.patient.id,
scaleCode: item.code,
};
const res = await updateScaleInitialImpression(params);
const { code, msg, data } = res;
if (code === 200) {
item.isEdit = true;
this.$message.success("编辑成功");
this.$forceUpdate();
} else {
this.$message.error(msg);
}
},
//
handleReporEdit() {
this.reportDetail1.patient.isEdit = false;
this.$forceUpdate();
},
//
async getQueryReportDetail() {
const params = {
@ -591,11 +458,6 @@ export default {
this.$message.error(msg);
}
},
// code
handleEdit(item) {
item.isEdit = false;
this.$forceUpdate();
},
},
};
</script>
@ -653,6 +515,9 @@ export default {
}
/deep/.ant-input {
}
.div-box {
margin: 16px 0px 0px 0px;
}
.div-box /deep/ .el-card {
margin-bottom: 20px;
padding: 16px;
@ -722,22 +587,27 @@ export default {
border: 1px solid #888888;
margin-left: 20px;
}
.cardRig-but {
width: 90px;
height: 40px;
line-height: 40px;
border-radius: 4px 4px 4px 4px;
opacity: 1;
border: 1px solid #5cc0be;
text-align: center;
color: #5cc0be;
}
.div-derive {
// margin-right: 20px;
}
.div-prin {
}
}
.cardRig-but {
padding: 0 10px;
height: 40px;
line-height: 40px;
border-radius: 4px 4px 4px 4px;
opacity: 1;
border: 1px solid #5cc0be;
text-align: center;
color: #5cc0be;
margin-left: 10px;
}
.cardRig-but1 {
margin: 10px 0 10px 0;
}
.info-col {
border-right: 1px solid #e1e1e1;
&:last-child {
@ -825,7 +695,7 @@ p {
font-size: 24px;
font-weight: bold;
color: #222222;
line-height: 50px;
line-height: 60px;
margin-left: 10px;
}
.box-card {

Loading…
Cancel
Save