pengjun 2 years ago
parent
commit
ab9dc2c0ab
  1. 21
      src/components/patientRegister/PatientLis.vue
  2. 2
      src/components/patientRegister/PatientLisRequest.vue
  3. 251
      src/components/patientRegister/PatientPacsRequest.vue
  4. 2
      src/components/patientRegister/PatientRegisterList.vue

21
src/components/patientRegister/PatientLis.vue

@ -111,7 +111,10 @@
<el-tab-pane label="检验条码" name="1">
<PatientLisRequest />
</el-tab-pane>
<el-tab-pane label="登记组合项目" name="2">
<el-tab-pane label="检查条码" name="2">
<PatientPacsRequest />
</el-tab-pane>
<el-tab-pane label="登记组合项目" name="3">
<PatientRegisterAsbItem />
</el-tab-pane>
</el-tabs>
@ -135,11 +138,13 @@ import {
import PatientLisRequest from "./PatientLisRequest.vue";
import PatientPacsRequest from "./PatientPacsRequest.vue";
import PatientRegisterAsbItem from "../../components/patientRegister/patientRegisterAsbItem.vue";
export default {
components: {
PatientLisRequest,
PatientPacsRequest,
PatientRegisterAsbItem,
},
data() {
@ -285,8 +290,9 @@ export default {
//
rowClick(row) {
this.dataTransOpts.tableS.patient_register = deepCopy(row)
this.dataTransOpts.refresh.lis_request.M++ //
this.dataTransOpts.refresh.lis_request.M++ //
this.dataTransOpts.refresh.register_check_asbitem.M++ //
this.dataTransOpts.refresh.register_check.M++ //
},
//
@ -316,7 +322,7 @@ export default {
console.log('getPrList', this.loadOpts)
let body = {
isFilterPreRegistration:'Y',
isFilterPreRegistration: 'Y',
skipCount: this.loadOpts.skipCount,
maxResultCount: this.loadOpts.maxResultCount
};
@ -395,11 +401,14 @@ export default {
})
//
if(this.tableData.length == 1){
if (this.tableData.length == 1) {
this.dataTransOpts.tableS.patient_register = deepCopy(this.tableData[0])
this.dataTransOpts.refresh.register_check_asbitem.M++
this.dataTransOpts.refresh.lis_request.M++
} else {
this.dataTransOpts.tableS.patient_register = { id: '' }
}
this.dataTransOpts.refresh.register_check_asbitem.M++
this.dataTransOpts.refresh.register_check.M++
this.dataTransOpts.refresh.lis_request.M++
// if (this.dataTransOpts.tableS.patient_register.id) {
// this.dataTransOpts.refresh.register_check_asbitem.M++
// }

2
src/components/patientRegister/PatientLisRequest.vue

@ -64,7 +64,7 @@ import moment from "moment";
import { mapState } from "vuex";
import { arrayExistObj, dddw, getPagePriv, checkPagePriv, deepCopy, } from "../../utlis/proFunc";
import { getapi, postapi, putapi, deletapi } from "../../api/api";
import LisRequest from "./LisRequest.vue";
export default {
components: {},

251
src/components/patientRegister/PatientPacsRequest.vue

@ -0,0 +1,251 @@
<template>
<div style="display: flex;">
<div :style="'width:' + (window.pageWidth - 200 - 145) + 'px;'">
<el-table :data="pacsRequest" border @row-click="rowClick"
:height="window.pageHeight < 600 ? 140 : Math.floor((window.pageHeight - 250) * 2 / 5)" size="small"
highlight-current-row ref="pacs_request" :row-class-name="handleRowClassName">
<el-table-column type="index" label="序号" width="50" align="center" />
<el-table-column prop="patientName" label="姓名" min-width="80" align="center" />
<el-table-column prop="checkRequestNo" label="条码号" min-width="120" align="center" />
<el-table-column prop="asbitemName" label="检查项目" min-width="120" />
</el-table>
</div>
<div style="margin-left: 10px;width: 110px;">
<div v-show="checkPagePriv(pagePriv.privs, '全选')" class="listBtn">
<el-button type="success" class="commonbutton" @click="btnChoose(true)">全选</el-button>
</div>
<div v-show="checkPagePriv(pagePriv.privs, '取消全选')" class="listBtn">
<el-button type="success" class="deleteButton" @click="btnChoose(false)">取消全选</el-button>
</div>
<div v-show="checkPagePriv(pagePriv.privs, '打印')" class="listBtn">
<el-button type="primary" class="commonbutton" @click="btnPacsPrint(false)">打印条码</el-button>
</div>
<div v-show="checkPagePriv(pagePriv.privs, '预览条码')" class="listBtn">
<el-button type="danger" class="commonbutton" @click="btnPacsPrint(true)">预览条码</el-button>
</div>
<!-- 预留
<div v-show="checkPagePriv(pagePriv.privs, '发送申请')" class="listBtn">
<el-button type="danger" class="commonbutton" @click="LisRequest(true)">发送申请</el-button>
</div>
<div v-show="checkPagePriv(pagePriv.privs, '撤消申请')" class="listBtn">
<el-button type="danger" class="deleteButton" @click="LisRequest(false)">撤消申请</el-button>
</div>
-->
</div>
</div>
</template>
<script>
import moment from "moment";
import { mapState } from "vuex";
import { arrayExistObj, dddw, getPagePriv, checkPagePriv, deepCopy, } from "../../utlis/proFunc";
import { getapi, postapi, putapi, deletapi } from "../../api/api";
export default {
components: {},
data() {
return {
pagePriv: {
routeUrlorPageName: 'patientLis', //
privs: [] //
},
pacsRequest:[], //
chooseRows: [], //
};
},
created() {
//
let userPriv = window.sessionStorage.getItem('userPriv')
if (userPriv) this.pagePriv.privs = deepCopy(getPagePriv(this.pagePriv.routeUrlorPageName))
},
updated() {
},
//
mounted() {
this.retrieve_pacs_request(this.dataTransOpts.tableS.patient_register.id)
},
computed: {
...mapState(["window", "dataTransOpts", "dict", "patientRegister"]),
},
methods: {
dddw, moment, checkPagePriv,
//
handleRowClassName({ row, rowIndex }) {
// highLightBg 'selected'
//console.log(rowIndex, row)
//return row.highLightBg == 'selected' ? 'high-light-bg' : '';
if (row.choosed) {
return "current-row";
} else {
return "";
}
},
//
rowClick(row) {
this.btnChoose(false)
this.chooseRows = [row]
this.$refs['pacs_request'].setCurrentRow(row);
},
// /
btnChoose(isChooseAll) {
if (isChooseAll) {
this.chooseRows = deepCopy(this.pacsRequest)
this.pacsRequest.forEach(e => {
e.choosed = true;
this.$refs['pacs_request'].setCurrentRow(e);
});
} else {
this.chooseRows = []
this.pacsRequest.forEach(e => {
e.choosed = false;
});
this.$refs['pacs_request'].setCurrentRow();
}
this.$nextTick(() => {
this.$refs['pacs_request'].doLayout()
})
},
//
async btnLisRequest(isRequest) {
if (this.chooseRows.length == 0) {
this.$message.warning({ showClose: true, message: "请先选择要操作的条码记录!" })
return
}
console.log('btnLisRequest',isRequest)
},
//
async btnPacsPrint(isPreview) {
if (this.chooseRows.length == 0) {
this.$message.warning({ showClose: true, message: "请先选择要操作的条码记录!" })
return
}
if (!this.$peisAPI) {
this.$message.warning({ showClose: true, message: "此功能需要在壳客户端中方可运行!" })
return
}
if (isPreview) {
this.pacsPrint(this.chooseRows[0].pacsRequestId,"0004",isPreview)
return
}
//
for (let i = 0; i < this.chooseRows.length; i++) {
let e = this.chooseRows[i];
try {
let err = await this.pacsPrint(e.pacsRequestId,"0004",isPreview)
if(!err){
let lfind = arrayExistObj(this.dataTransOpts.tableM.pacs_request,"lisRequestId",e.lisRequestId)
if(lfind > -1) this.dataTransOpts.tableM.pacs_request[lfind].isPrint = "Y"
}
} catch (error) {
console.log(`打印条码或更新条码打印状态失败,原因:${error}`)
this.$message.warning({ showClose: true, message: `打印条码或更新条码打印状态失败,原因:${error}`})
}
}
},
//
async pacsPrint(pacsRequestId, ReportCode, isPreview) {
let err = ""
let token = window.sessionStorage.getItem("token");
let user = window.sessionStorage.getItem("user");
let toOutShell = {
ReportCode,
token,
IsMoreLabel: 'N',
isBuildImage: 'N',
IsUploadPdf: 'N',
preViewCanPrint: "N",
Parameters: [
{ Name: "printer", Value: user },
{ Name: "hisLog", Value: "pic/hisLog.jpg" },
],
BusinessCode: pacsRequestId
};
console.log('this.$peisAPI.print', toOutShell)
if (isPreview) {
this.$peisAPI.printPre(JSON.stringify(toOutShell))
.then(res => {
console.log('this.$peisAPI.printPre', res)
if (JSON.parse(res).code < 0) {
this.$message.warning({ showClose: true, message: JSON.parse(res).message });
}
})
.catch((err) => {
console.log('打印检验条码错误', err)
this.$message.warning({ showClose: true, message: `${err}` });
});
} else {
try {
let lres = await this.$peisAPI.print(JSON.stringify(toOutShell))
let Jres = JSON.parse(lres)
if(Jres.code < 0){
err = Jres.message
console.log('打印检验条码错误', err)
this.$message.error({ showClose: true, message: `打印检验条码错误 ${err}` });
}else{
//
// let res = await postapi('/api/app/lisrequest/updatelisrequestisprint',{});
// if(res.code < 0){
// err = res.message
// this.$message.error({ showClose: true, message: ` ${err}` });
// }
}
} catch (error) {
err = `${error}`
}
}
return err
},
//
retrieve_pacs_request(patientRegisterId) {
this.chooseRows = []
this.pacsRequest = []
if (!patientRegisterId) return
// console.log(`/api/app/registerasbitem/getlistinpatientregisterid?PatientRegisterId=${id}`, res)
postapi(`/api/app/PrintReport/getpacsnoreport?PatientRegisterId=${patientRegisterId}`)
.then(res => {
if (res.code > -1) {
this.pacsRequest = res.data
this.btnChoose(true)
}
})
},
},
//
watch: {
//ID
"dataTransOpts.refresh.register_check.M": {
// immediate:true,
handler(newVal, oldVal) {
console.log(`watch 人员登记 newVal:${newVal} oldVal:${oldVal} registerCheckId: ${this.dataTransOpts.tableS.patient_register.id}`);
if(newVal != oldVal) this.retrieve_pacs_request(this.dataTransOpts.tableS.patient_register.id)
}
},
}
};
</script>
<style scoped>
@import "../../assets/css/global.css";
@import "../../assets/css/global_table.css";
.listBtn {
padding: 2px 0;
}
</style>

2
src/components/patientRegister/PatientRegisterList.vue

@ -1243,7 +1243,7 @@ export default {
{ Name: "printer", Value: user },
{ Name: "hisLog", Value: "pic/hisLog.jpg" },
],
BusinessCode: prId
BusinessCode: row.id
};
if (isPreview) {

Loading…
Cancel
Save