|
|
|
@ -1,9 +1,8 @@ |
|
|
|
<template> |
|
|
|
<div style="display: flex"> |
|
|
|
<div :style="'width:' + (window.pageWidth - 200 - 120 - 70) + 'px;'"> |
|
|
|
<el-table :data="patientRegister.prList" border |
|
|
|
:height="patientRegister.prListHeight" highlight-current-row |
|
|
|
@row-click="rowick" size="small" @selection-change="handleSelectionChange"> |
|
|
|
<div :style="'width:' + (window.pageWidth - 200 - 120 - 70) + 'px;'" @contextmenu.prevent="onContextmenu"> |
|
|
|
<el-table :data="patientRegister.prList" border :height="patientRegister.prListHeight" highlight-current-row |
|
|
|
@row-click="rowick" size="small" @selection-change="handleSelectionChange" @cell-contextmenu="onCellRightClick"> |
|
|
|
<el-table-column type="selection" width="40"> |
|
|
|
|
|
|
|
</el-table-column> |
|
|
|
@ -14,8 +13,8 @@ |
|
|
|
</el-table-column> |
|
|
|
<el-table-column prop="guidePrintTimes" label="打印" width="50"> |
|
|
|
<template slot-scope="scope"> |
|
|
|
<i class="el-icon-printer" v-if="scope.row.guidePrintTimes > 0" style="font-size: 24px;color: green;" ></i> |
|
|
|
</template> |
|
|
|
<i class="el-icon-printer" v-if="scope.row.guidePrintTimes > 0" style="font-size: 24px;color: green;"></i> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column prop="isLock" label="锁住"> |
|
|
|
<template slot-scope="scope"> |
|
|
|
@ -177,15 +176,6 @@ |
|
|
|
<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="lisPrint('0003', false)">检验申请</el-button> |
|
|
|
</div> |
|
|
|
<div class="listBtn"> |
|
|
|
<el-button type="primary" class="btnClass" @click="lisPrint('0002', true)">检验条码</el-button> |
|
|
|
</div> |
|
|
|
<div class="listBtn"> |
|
|
|
<el-button type="primary" class="btnClass" @click="">补打条码</el-button> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
|
|
|
|
<!-- 体检人员登记 --> |
|
|
|
@ -233,7 +223,10 @@ export default { |
|
|
|
guideMsg: 'guideMsg', |
|
|
|
tabChoosed: "1", |
|
|
|
formInitData: {}, //体检登记初始表单数据 |
|
|
|
editTimes: 0, |
|
|
|
editTimes: 0, |
|
|
|
|
|
|
|
rClickRow: null, //右击的行 |
|
|
|
rClickColumn: null, //右击的列(预留) |
|
|
|
}; |
|
|
|
}, |
|
|
|
|
|
|
|
@ -251,11 +244,12 @@ export default { |
|
|
|
async guidePrint(ReportCode, isPreview) { |
|
|
|
let token = localStorage.getItem('token'); |
|
|
|
let user = localStorage.getItem('user'); |
|
|
|
let toOutShell = { ReportCode, token, |
|
|
|
let toOutShell = { |
|
|
|
ReportCode, token, |
|
|
|
Parameters: [ |
|
|
|
{ Name: 'printer', Value: user }, |
|
|
|
{ Name: 'hisLog', Value: 'pic/hisLog.jpg' }, |
|
|
|
], |
|
|
|
{ Name: 'hisLog', Value: 'pic/hisLog.jpg' }, |
|
|
|
], |
|
|
|
}; |
|
|
|
let lfind = -1; |
|
|
|
|
|
|
|
@ -464,11 +458,11 @@ export default { |
|
|
|
async query() { |
|
|
|
this.patientRegister.prList = []; |
|
|
|
const loading = this.$loading({ |
|
|
|
lock: true, |
|
|
|
text: 'Loading', |
|
|
|
spinner: 'el-icon-loading', |
|
|
|
background: 'rgba(0, 0, 0, 0.7)' |
|
|
|
}); |
|
|
|
lock: true, |
|
|
|
text: 'Loading', |
|
|
|
spinner: 'el-icon-loading', |
|
|
|
background: 'rgba(0, 0, 0, 0.7)' |
|
|
|
}); |
|
|
|
|
|
|
|
let body = {} |
|
|
|
|
|
|
|
@ -504,12 +498,12 @@ export default { |
|
|
|
console.log('/api/app/patientregister/getlistinfilter', body) |
|
|
|
postapi('/api/app/patientregister/getlistinfilter', body) |
|
|
|
.then((res) => { |
|
|
|
if(res.code != -1 ){ |
|
|
|
if (res.code != -1) { |
|
|
|
this.patientRegister.prList = res.data.items; |
|
|
|
} |
|
|
|
} |
|
|
|
loading.close(); |
|
|
|
}) |
|
|
|
.catch((err) =>{ |
|
|
|
.catch((err) => { |
|
|
|
loading.close(); |
|
|
|
}); |
|
|
|
// try { |
|
|
|
@ -520,6 +514,218 @@ export default { |
|
|
|
// } |
|
|
|
}, |
|
|
|
|
|
|
|
//右击菜单 |
|
|
|
onCellRightClick(row, column) { |
|
|
|
this.rClickRow = { ...row }; //右击的行 |
|
|
|
this.rClickColumn = { ...column }; //右击的列(预留) |
|
|
|
console.log(row, column.property); |
|
|
|
}, |
|
|
|
onContextmenu(event) { |
|
|
|
//console.log('onContextmenu',event); |
|
|
|
if (!this.rClickRow) return false; |
|
|
|
let row = { ...this.rClickRow }; |
|
|
|
this.$contextmenu({ |
|
|
|
items: [ |
|
|
|
{ |
|
|
|
label: "发送检验申请", |
|
|
|
onClick: () => { |
|
|
|
this.lisRequest(row.id); |
|
|
|
} |
|
|
|
}, |
|
|
|
{ |
|
|
|
label: "预览检验条码", |
|
|
|
onClick: () => { |
|
|
|
this.lisPrint(row.id, '0002', true); |
|
|
|
} |
|
|
|
}, |
|
|
|
{ |
|
|
|
label: "打印检验条码", |
|
|
|
onClick: () => { |
|
|
|
this.lisPrint(row.id, '0002', false); |
|
|
|
} |
|
|
|
}, |
|
|
|
{ |
|
|
|
label: "预览Pacs条码", |
|
|
|
onClick: () => { |
|
|
|
this.pacsPrint(row.id, '0004', true); |
|
|
|
} |
|
|
|
}, |
|
|
|
{ |
|
|
|
label: "打印Pacs条码", |
|
|
|
onClick: () => { |
|
|
|
this.pacsPrint(row.id, '0004', false); |
|
|
|
} |
|
|
|
}, |
|
|
|
], |
|
|
|
event, |
|
|
|
//x: event.clientX, |
|
|
|
//y: event.clientY, |
|
|
|
customClass: "custom-class", |
|
|
|
zIndex: 3, |
|
|
|
minWidth: 80, |
|
|
|
}); |
|
|
|
|
|
|
|
this.rClickRow = null; |
|
|
|
return false; |
|
|
|
}, |
|
|
|
|
|
|
|
//检验申请 |
|
|
|
async lisRequest(prId) { |
|
|
|
let isPrintLisRequest = false |
|
|
|
let res = null |
|
|
|
if (prId.length < 1) { |
|
|
|
this.$message.info("人员信息尚未保存,不可执行此操作!"); |
|
|
|
return; |
|
|
|
} |
|
|
|
|
|
|
|
try { |
|
|
|
res = await postapi(`/api/app/lisrequest/setlisrequest?PatientRegisterId=${prId}`); |
|
|
|
console.log(`/api/app/lisrequest/setlisrequest?PatientRegisterId=${prId}`, res) |
|
|
|
} catch (error) { |
|
|
|
return; |
|
|
|
} |
|
|
|
if (res.Code != -1) { |
|
|
|
this.$message.info("发送检验申请成功!"); |
|
|
|
isPrintLisRequest = true; |
|
|
|
} |
|
|
|
|
|
|
|
//重复申请,重打 |
|
|
|
if (res.Code == -1 && res.Message.indexOf('已申请') > -1) { |
|
|
|
isPrintLisRequest = true; |
|
|
|
} |
|
|
|
|
|
|
|
if (!isPrintLisRequest) return; |
|
|
|
|
|
|
|
try { |
|
|
|
await this.$confirm("是否打印检验申请单?", "提示", { |
|
|
|
confirmButtonText: "是", |
|
|
|
cancelButtonText: "否", |
|
|
|
type: "info", |
|
|
|
showClose: false, |
|
|
|
closeOnClickModal: false, |
|
|
|
closeOnPressEscape: false, |
|
|
|
}); |
|
|
|
} catch (error) { |
|
|
|
return; |
|
|
|
} |
|
|
|
//打印检验申请单 |
|
|
|
this.lisPrint(prId, '0003', false); |
|
|
|
}, |
|
|
|
|
|
|
|
//检验条码打印 |
|
|
|
lisPrint(prId, ReportCode, isPreview) { |
|
|
|
|
|
|
|
let token = localStorage.getItem('token'); |
|
|
|
let user = localStorage.getItem('user'); |
|
|
|
let toOutShell = { |
|
|
|
ReportCode, token, |
|
|
|
Parameters: [ |
|
|
|
{ Name: 'printer', Value: user }, |
|
|
|
{ Name: 'hisLog', Value: 'pic/hisLog.jpg' }, |
|
|
|
], |
|
|
|
}; |
|
|
|
|
|
|
|
|
|
|
|
if (isPreview) { |
|
|
|
//http://140.143.162.39:9529/api/app/printreport/getlisrequestreport?PatientRegisterId=3a0d2e90-da68-3746-6775-bf17e5f9b295 |
|
|
|
//this.multipleSelection.forEach((item,index) =>{ |
|
|
|
postapi(`/api/app/printreport/getlisrequestreport?PatientRegisterId=${prId}`) |
|
|
|
.then((res) => { |
|
|
|
if (res.code != -1) { |
|
|
|
toOutShell.ReportTable = { lisRequest: res.data }; |
|
|
|
console.log('JSON.stringify(toOutShell)', JSON.stringify(toOutShell)); |
|
|
|
return this.$peisAPI.printPre(JSON.stringify(toOutShell)); |
|
|
|
} |
|
|
|
}) |
|
|
|
.catch(err => { |
|
|
|
this.$message.warning(err); |
|
|
|
}); |
|
|
|
// }); |
|
|
|
} else { |
|
|
|
|
|
|
|
postapi(`/api/app/printreport/getlisrequestreport?PatientRegisterId=${prId}`) |
|
|
|
.then((res) => { |
|
|
|
if (res.code != -1) { |
|
|
|
toOutShell.ReportTable = { lisRequest: res.data }; |
|
|
|
console.log('JSON.stringify(toOutShell)', JSON.stringify(toOutShell)); |
|
|
|
return this.$peisAPI.print(JSON.stringify(toOutShell)); |
|
|
|
} |
|
|
|
}) |
|
|
|
.then(res => { |
|
|
|
if (res.toLowerCase() == 'success') { |
|
|
|
//更新打印状态 /api/app/lisrequest/updatelisrequestisprint |
|
|
|
// { |
|
|
|
// "operateType": 0, 操作类型(1.按PatientRegisterId 2.按LisRequestId) |
|
|
|
// "patientRegisterId": "3fa85f64-5717-4562-b3fc-2c963f66afa6", |
|
|
|
// "lisRequestId": "3fa85f64-5717-4562-b3fc-2c963f66afa6" |
|
|
|
// } |
|
|
|
return postapi('/api/app/lisrequest/updatelisrequestisprint', { operateType: 1, patientRegisterId: prId }) |
|
|
|
} |
|
|
|
}) |
|
|
|
.catch(err => { |
|
|
|
this.$message.warning(err); |
|
|
|
}); |
|
|
|
|
|
|
|
} |
|
|
|
}, |
|
|
|
|
|
|
|
//pacs条码打印 |
|
|
|
pacsPrint(prId, ReportCode, isPreview) { |
|
|
|
|
|
|
|
let token = localStorage.getItem('token'); |
|
|
|
let user = localStorage.getItem('user'); |
|
|
|
let toOutShell = { |
|
|
|
ReportCode, token, |
|
|
|
Parameters: [ |
|
|
|
{ Name: 'printer', Value: user }, |
|
|
|
{ Name: 'hisLog', Value: 'pic/hisLog.jpg' }, |
|
|
|
], |
|
|
|
}; |
|
|
|
|
|
|
|
|
|
|
|
if (isPreview) { |
|
|
|
//http://140.143.162.39:9529/api/app/printreport/getlisrequestreport?PatientRegisterId=3a0d2e90-da68-3746-6775-bf17e5f9b295 |
|
|
|
//this.multipleSelection.forEach((item,index) =>{ |
|
|
|
postapi(`/api/app/printreport/getlisrequestreport?PatientRegisterId=${prId}`) |
|
|
|
.then((res) => { |
|
|
|
if (res.code != -1) { |
|
|
|
toOutShell.ReportTable = { lisRequest: res.data }; |
|
|
|
console.log('JSON.stringify(toOutShell)', JSON.stringify(toOutShell)); |
|
|
|
return this.$peisAPI.printPre(JSON.stringify(toOutShell)); |
|
|
|
} |
|
|
|
}) |
|
|
|
.catch(err => { |
|
|
|
this.$message.warning(err); |
|
|
|
}); |
|
|
|
// }); |
|
|
|
} else { |
|
|
|
|
|
|
|
postapi(`/api/app/printreport/getlisrequestreport?PatientRegisterId=${prId}`) |
|
|
|
.then((res) => { |
|
|
|
if (res.code != -1) { |
|
|
|
toOutShell.ReportTable = { lisRequest: res.data }; |
|
|
|
console.log('JSON.stringify(toOutShell)', JSON.stringify(toOutShell)); |
|
|
|
return this.$peisAPI.print(JSON.stringify(toOutShell)); |
|
|
|
} |
|
|
|
}) |
|
|
|
.then(res => { |
|
|
|
if (res.toLowerCase() == 'success') { |
|
|
|
//更新打印状态 /api/app/lisrequest/updatelisrequestisprint |
|
|
|
// { |
|
|
|
// "operateType": 0, 操作类型(1.按PatientRegisterId 2.按LisRequestId) |
|
|
|
// "patientRegisterId": "3fa85f64-5717-4562-b3fc-2c963f66afa6", |
|
|
|
// "lisRequestId": "3fa85f64-5717-4562-b3fc-2c963f66afa6" |
|
|
|
// } |
|
|
|
return postapi('/api/app/lisrequest/updatelisrequestisprint', { operateType: 1, patientRegisterId: prId }) |
|
|
|
} |
|
|
|
}) |
|
|
|
.catch(err => { |
|
|
|
this.$message.warning(err); |
|
|
|
}); |
|
|
|
|
|
|
|
} |
|
|
|
}, |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
//监听事件 |
|
|
|
|