Browse Source

guide

master
pengjun 2 years ago
parent
commit
86a6e83de7
  1. BIN
      public/pic/hisLog.jpg
  2. BIN
      public/pic/peisReportFirstPage.jpg
  3. BIN
      public/pic/peisReportPageHeader.jpg
  4. 120
      src/components/patientRegister/PatientRegisterList.vue
  5. 6
      src/main.js

BIN
public/pic/hisLog.jpg

After

Width: 837  |  Height: 992  |  Size: 194 KiB

BIN
public/pic/peisReportFirstPage.jpg

After

Width: 2800  |  Height: 2800  |  Size: 671 KiB

BIN
public/pic/peisReportPageHeader.jpg

After

Width: 8564  |  Height: 1596  |  Size: 971 KiB

120
src/components/patientRegister/PatientRegisterList.vue

@ -11,6 +11,7 @@
<div>{{ ldddw(dict.completeFlag, "id", scope.row.completeFlag, "displayName") }}</div>
</template>
</el-table-column>
<el-table-column prop="guidePrintTimes" label="打印" />
<el-table-column prop="isLock" label="锁住">
<template slot-scope="scope">
<div>{{ scope.row.isLock == "Y" ? "是" : "否" }}</div>
@ -166,7 +167,16 @@
<el-button type="primary" class="btnClass">调整项目</el-button>
</div>
<div class="listBtn">
<el-button type="primary" class="btnClass" @click="guidePrint">打指引单</el-button>
<el-button type="primary" class="btnClass" @click="guidePrint('0001', false)">指引单打印</el-button>
</div>
<div class="listBtn">
<el-button type="primary" class="btnClass" @click="guidePrint('0001', true)">指引单预览</el-button>
</div>
<div class="listBtn">
<el-button type="primary" class="btnClass" @click="guidePrint('0001', false)">指引单打印</el-button>
</div>
<div class="listBtn">
<el-button type="primary" class="btnClass" @click="guidePrint('0001', true)">指引单预览</el-button>
</div>
</div>
@ -183,8 +193,8 @@
</el-dialog>
<!-- 指引单 -->
<el-dialog title="指引单" :visible.sync="dialogGuide" width="400" height="800"
:append-to-body="true" :close-on-click-modal="false">
<el-dialog title="指引单" :visible.sync="dialogGuide" width="400" height="800" :append-to-body="true"
:close-on-click-modal="false">
<div>{{ guideMsg }}</div>
</el-dialog>
</div>
@ -194,7 +204,7 @@
import moment from "moment";
import { mapState, mapActions } from "vuex";
import { getapi, postapi, putapi, deletapi } from "@/api/api";
import { dddw, objCopy, arrayReduce } from "@/utlis/proFunc";
import { dddw, objCopy, arrayReduce, arrayExistObj } from "@/utlis/proFunc";
import PatientRegisterEdit from "../../components/patientRegister/PatientRegisterEdit.vue";
import Camera from "../../components/patientRegister/Camera.vue";
@ -211,8 +221,8 @@ export default {
multipleSelection: [], //
dialogVisible: false,
dialogCamera: false,
dialogGuide:false,
guideMsg:'guideMsg',
dialogGuide: false,
guideMsg: 'guideMsg',
tabChoosed: "1",
formInitData: {}, //
editTimes: 0,
@ -227,54 +237,78 @@ export default {
...mapState(["window", "dict", "patientRegister", "customerOrg"]),
},
methods: {
...mapActions(["getCustomerOrgGroup", "getPatientRegisterAbs"]),
...mapActions(["getCustomerOrgGroup", "getPatientRegisterAbs"]),
// (isPreview)
async guidePrint(isPreview){
async guidePrint(ReportCode, isPreview) {
let token = localStorage.getItem('token');
let user = localStorage.getItem('user');
let toOutShell = '';
let toOutShell = { ReportCode, token,
Parameters: [
{ Name: 'printer', Value: user },
{ Name: 'hisLog', Value: 'pic/hisLog.jpg' },
],
};
let lfind = -1;
if(this.multipleSelection.length < 1){
if (this.multipleSelection.length < 1) {
this.$message.info("请勾选要打印指引单的人员记录!");
return;
}
this.multipleSelection.forEach((item,index) =>{
getapi(`/api/app/printreport/getpatientregisterguidereport?PatientRegisterId=${item.id}`)
.then((res) => {
if (res.code != -1) {
res.data;
return this.$electronAPI.printPre('web 传入参数');
}
})
.then(res => {
if(res.toLowerCase() == 'success'){
//
return postapi('api/app/patientregister/updatepatientregisterguideprinttimesmany',[item.id])
}
})
.then(res =>{
if (res.code != -1) {
//
}
if (isPreview) {
//
//this.multipleSelection.forEach((item,index) =>{
getapi(`/api/app/printreport/getpatientregisterguidereport?PatientRegisterId=${this.multipleSelection[0].id}`)
.then((res) => {
if (res.code != -1) {
toOutShell.ReportTable = res.data;
console.log('JSON.stringify(toOutShell)', JSON.stringify(toOutShell));
return this.$peisAPI.printPre(JSON.stringify(toOutShell));
}
})
.catch(err => {
this.$message.warning(err);
});
// });
} else {
this.multipleSelection.forEach((item, index) => {
getapi(`/api/app/printreport/getpatientregisterguidereport?PatientRegisterId=${item.id}`)
.then((res) => {
if (res.code != -1) {
toOutShell.ReportTable = res.data;
console.log('JSON.stringify(toOutShell)', JSON.stringify(toOutShell));
return this.$peisAPI.print(JSON.stringify(toOutShell));
}
})
.then(res => {
if (res.toLowerCase() == 'success') {
//
return postapi('api/app/patientregister/updatepatientregisterguideprinttimesmany', [item.id])
}
})
.then(res => {
if (res.code != -1) {
lfind = arrayExistObj(this.patientRegister.prList, 'id', item.id)
if (lfind > -1) {
if (this.patientRegister.prList[lfind].guidePrintTimes) {
this.patientRegister.prList[lfind].guidePrintTimes = Number(this.patientRegister.prList[lfind].guidePrintTimes) + 1;
} else {
this.patientRegister.prList[lfind].guidePrintTimes = 1;
}
}
}
})
.catch(err => {
this.$message.warning(err);
});
});
});
console.log(msg);
}
},
handleSelectionChange(val) {
this.multipleSelection = val;
//console.log('this.multipleSelection',this.multipleSelection)

6
src/main.js

@ -17,11 +17,11 @@ Vue.use(ElementUI);
console.log('vue',Vue.prototype)
Vue.prototype.$axios = axios;
//全局注册 electronAPI 对象
//全局注册外壳的 peisAPI 对象
try {
Vue.prototype.$electronAPI = window.electronAPI;
Vue.prototype.$peisAPI = window.peisAPI;
} catch (error) {
Vue.prototype.$electronAPI = null;
Vue.prototype.$peisAPI = null;
}

Loading…
Cancel
Save