|
|
@@ -4,6 +4,7 @@
|
|
|
<!-- <div class="back-btn flex-center" @click="$router.back()">返回</div> -->
|
|
|
<div>
|
|
|
<el-button size="small" type="primary" @click="$router.back()">返回</el-button>
|
|
|
+ <el-button size="small" v-if="showPrintHTML" type="primary" icon="el-icon-download" :disabled="loading" @click="print()">下载打印</el-button>
|
|
|
</div>
|
|
|
<div class="msg">
|
|
|
<div class="msg-item flex-plane-center-l">
|
|
|
@@ -66,7 +67,38 @@
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
- <div class="recipe-right">
|
|
|
+ <div class="recipe-right print-containers" ref="print">
|
|
|
+ <div class="msg-info">
|
|
|
+ <div class="msg-item flex-plane-center-l">
|
|
|
+ <span>疾病名称:</span>
|
|
|
+ <div>{{info.disname?info.disname:info.westerndisease}}</div>
|
|
|
+ </div>
|
|
|
+ <div class="msg-item flex-plane-center-l">
|
|
|
+ <span>性别:</span>
|
|
|
+ <div>{{info.patientgender=='M'?'男':'女'}}</div>
|
|
|
+ </div>
|
|
|
+ <div class="msg-item flex-plane-center-l">
|
|
|
+ <span>年龄:</span>
|
|
|
+ <div>{{info.patientage}}岁</div>
|
|
|
+ </div>
|
|
|
+ <div class="msg-item flex-plane-center-l">
|
|
|
+ <span>婚姻:</span>
|
|
|
+ <div>{{info.patientmarriage==0?'未婚':'已婚'}}</div>
|
|
|
+ </div>
|
|
|
+
|
|
|
+ <!-- <div class="msg-item flex-plane-center-l">
|
|
|
+ <span>主诉及现病史:</span>
|
|
|
+ <div>胃痛两天</div>
|
|
|
+ </div>-->
|
|
|
+ <div class="msg-item flex-plane-center-l" v-if="info.disname">
|
|
|
+ <span>辩证:</span>
|
|
|
+ <div>{{info.chinesesymptom}}</div>
|
|
|
+ </div>
|
|
|
+ <div class="msg-item flex-plane-center-l" v-if="info.disname">
|
|
|
+ <span>治法:</span>
|
|
|
+ <div>{{info.therapy}}</div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
<div v-for="(item,index) in info.dialist" :key="index">
|
|
|
<div class="title">{{index==0?'初诊':item.diatimes+'诊'}}</div>
|
|
|
|
|
|
@@ -80,7 +112,7 @@
|
|
|
<div class="right" v-for="(item1,index1) in item.fjlist" :key="index1">
|
|
|
<div class="flex-plane-center-l opinion">
|
|
|
<span>{{item1.preusage}}</span>
|
|
|
- <div v-if="showTransitionPr" class="flex-center zhuanfang" @click="turnRecipe(item1)">转方</div>
|
|
|
+ <div v-if="showTransitionPr" class="flex-center zhuanfang no-print" @click="turnRecipe(item1)">转方</div>
|
|
|
</div>
|
|
|
<div class="prescription flex-plane-center-l flex-wrap">
|
|
|
<span
|
|
|
@@ -120,9 +152,12 @@ import { getDCaseDetail } from "@/api/knowledge.js";
|
|
|
import { numberToUpperCase } from "@/utils/format.js";
|
|
|
import { mapState, mapGetters, mapActions, mapMutations } from "vuex";
|
|
|
import { getDataByKey } from '@/api/system';
|
|
|
+import printJS from 'print-js';
|
|
|
export default {
|
|
|
data() {
|
|
|
return {
|
|
|
+ loading: false,
|
|
|
+ showPrintHTML: false,
|
|
|
showTransitionPr: false,
|
|
|
radio: 0,
|
|
|
info: {},
|
|
|
@@ -136,6 +171,10 @@ export default {
|
|
|
key: "transitionPr",
|
|
|
organizationid: this.getuserinfo.organizationid,
|
|
|
}).then(data => { this.showTransitionPr = data.enabled; });
|
|
|
+ getDataByKey({
|
|
|
+ key: "showPrintHTML",
|
|
|
+ organizationid: this.getuserinfo.organizationid,
|
|
|
+ }).then(data => { this.showPrintHTML = data.enabled; });
|
|
|
this.getDCaseDetail();
|
|
|
},
|
|
|
computed: {
|
|
|
@@ -151,6 +190,7 @@ export default {
|
|
|
},
|
|
|
//获取详情
|
|
|
async getDCaseDetail() {
|
|
|
+ this.loading = true;
|
|
|
let res = await getDCaseDetail({
|
|
|
verId: this.$route.query.verifyid
|
|
|
});
|
|
|
@@ -161,8 +201,18 @@ export default {
|
|
|
});
|
|
|
|
|
|
this.info = res.data;
|
|
|
+ this.loading = false;
|
|
|
}
|
|
|
},
|
|
|
+ async print() {
|
|
|
+ printJS({
|
|
|
+ printable: this.$refs.print,
|
|
|
+ type: 'html',
|
|
|
+ documentTitle: `名医名方 - 名医医案`,
|
|
|
+ scanStyles: false,
|
|
|
+ css: ['print/containers.css', 'print/DoctorCaseD.css'],
|
|
|
+ })
|
|
|
+ },
|
|
|
...mapMutations({
|
|
|
setDrugsInfo: "drug/setDrugsInfo"
|
|
|
})
|
|
|
@@ -250,6 +300,10 @@ export default {
|
|
|
margin-bottom: 15px;
|
|
|
}
|
|
|
|
|
|
+ .msg-info {
|
|
|
+ display: none;
|
|
|
+ }
|
|
|
+
|
|
|
.right-msg {
|
|
|
}
|
|
|
|