pengjun 2 years ago
parent
commit
53f499684e
  1. 6
      package-lock.json
  2. 1
      package.json
  3. 8
      public/electron/latest.yml
  4. 151
      src/components/patientRegister/LisRequest.vue
  5. 77
      src/components/patientRegister/PatientRegisterEdit.vue
  6. 260
      src/components/patientRegister/PatientRegisterList.vue
  7. 2
      src/main.js

6
package-lock.json

@ -15,6 +15,7 @@
"moment": "^2.29.4",
"sortablejs": "^1.15.0",
"vue": "^2.6.14",
"vue-contextmenujs": "^1.4.9",
"vue-json-excel": "^0.3.0",
"vue-meta": "^2.4.0",
"vue-print-nb": "^1.7.5",
@ -10780,6 +10781,11 @@
"csstype": "^3.1.0"
}
},
"node_modules/vue-contextmenujs": {
"version": "1.4.9",
"resolved": "https://registry.npmmirror.com/vue-contextmenujs/-/vue-contextmenujs-1.4.9.tgz",
"integrity": "sha512-Z3x3VBrwTwz7ow4YhbjMBPl4zz3uiwhyRIffQ/ZJl+A1Vg8B7e9bVOe2FNGqro+Opyhdf84enx4EgZNsCoPWZA=="
},
"node_modules/vue-eslint-parser": {
"version": "8.3.0",
"resolved": "https://registry.npmmirror.com/vue-eslint-parser/-/vue-eslint-parser-8.3.0.tgz",

1
package.json

@ -18,6 +18,7 @@
"moment": "^2.29.4",
"sortablejs": "^1.15.0",
"vue": "^2.6.14",
"vue-contextmenujs": "^1.4.9",
"vue-json-excel": "^0.3.0",
"vue-meta": "^2.4.0",
"vue-print-nb": "^1.7.5",

8
public/electron/latest.yml

@ -0,0 +1,8 @@
version: 1.0.6
files:
- url: example-001 Setup 1.0.6.exe
sha512: PfambE0KJ9BKAPuXEDNGZz6z6Tbz2/BY66SyhvvZa9DJwhKYzQbgo0x/580pMJzyMv/hwYM9eWpdkOiZ71IgQQ==
size: 124064042
path: example-001 Setup 1.0.6.exe
sha512: PfambE0KJ9BKAPuXEDNGZz6z6Tbz2/BY66SyhvvZa9DJwhKYzQbgo0x/580pMJzyMv/hwYM9eWpdkOiZ71IgQQ==
releaseDate: '2023-07-08T09:33:10.244Z'

151
src/components/patientRegister/LisRequest.vue

@ -15,17 +15,21 @@
<el-table-column label="检验申请号" width="180" prop="lisRequestNo">
<template slot-scope="scope">
<el-select v-model="scope.row.lisRequestNo" size="small" :disabled="scope.row.disabled">
<el-option v-for="(item, index) in lisRequestNos" :key="index" :label="item.lisRequestNo" :value="item.lisRequestId" />
<el-option v-for="(item, index) in lisRequestNos" :key="index" :label="item.lisRequestNo"
:value="item.lisRequestId" />
</el-select>
</template>
</el-table-column>
</el-table>
</div>
<!-- 按钮区域 -->
<div style="display: flex; margin-top: 30px; margin-left: 400px; ">
<div style="display: flex; margin-top: 30px; margin-left: 280px; ">
<div style="margin-left: 10px">
<el-button type="primary" @click="submit">确定</el-button>
</div>
<div style="margin-left: 10px">
<el-button type="success" @click="lisPrint('0002',false)">条码打印</el-button>
</div>
<div style="margin-left: 10px">
<el-button type="danger" @click="patientRegister.lisRequestVisble = false">关闭</el-button>
</div>
@ -40,7 +44,7 @@ import { examinationgender } from "@/request/systemapi";
import { dddw, arrayExistObj } from "../../utlis/proFunc";
// import
export default {
props: ["id","brushTimes"],
props: ["id", "brushTimes"],
data() {
return {
tableData: [], //
@ -60,6 +64,7 @@ export default {
methods: {
parseData(asbItem) {
// "registerAsbitemId": "3a0d2e90-db36-09fe-4210-53fadb4f7d02",
// asbitemId": "3a0c5600-ae78-9ed4-e3c1-993ef41d3c51",
// "asbitemName": "",
// "isCharge": "N",
@ -70,6 +75,8 @@ export default {
// "lisRequestNo": "T202308220016"
if (asbItem.length < 1) return;
let lfind = -1;
this.lisRequestNos = [];
asbItem.forEach(e => {
if (e.lisRequestNo) {
e['operate'] = 'no';
@ -94,9 +101,8 @@ export default {
getAsbItemList(id) {
this.tableData = [];
//http://140.143.162.39:9529/api/app/lis-request/register-asbitem-lis-request/3a0d2e90-da68-3746-6775-bf17e5f9b295
getapi(
`/api/app/lis-request/register-asbitem-lis-request/${id}`
postapi(
`/api/app/lisrequest/getregisterasbitemlisrequest?PatientRegisterId=${id}`
).then((res) => {
this.tableData = res.data;
this.parseData(this.tableData);
@ -105,35 +111,128 @@ export default {
//
changeOperate(row) {
if(row.operate == 'append'){
//2 ID lisRequestNos
}else{
let lfind = -1
if (row.operate == 'append') {
if (row.sampleGroupId) {
lfind = arrayExistObj(this.lisRequestNos, 'sampleGroupId', row.sampleGroupId);
if (lfind > -1) {
row.lisRequestNo = this.lisRequestNos[lfind].lisRequestNo;
row.lisRequestId = this.lisRequestNos[lfind].lisRequestId;
}
}
} else {
row.lisRequestNo = '';
row.lisRequestId = '';
}
}
},
//
submit() {
this.$refs["form"].validate((v) => {
if (v) {
if (!this.id) {
postapi("/api/app/reference-range", this.form).then((res) => {
this.$message.success("新增成功");
this.getlist(this.itemId, this.ReferenceRangeTypeFlag);
console.log("res", res);
this.id = res.data.id;
});
let append = [], news = [];
let validMsg = '', lfind = -1;
this.tableData.forEach(item => {
if (item.operate == 'append') {
if (item.lisRequestId) {
lfind = arrayExistObj(append, 'lisRequestId', item.lisRequestId);
if (lfind = -1) {
append.push(
{
lisRequestId: item.lisRequestId,
registerAsbitemIds: [item.registerAsbitemId],
}
)
} else {
append[lfind]['registerAsbitemIds'].push(item.registerAsbitemId);
}
} else {
putapi(`/api/app/reference-range/${this.id}`, this.form).then(
(res) => {
this.$message.success("修改成功");
this.getlist(this.itemId, this.ReferenceRangeTypeFlag);
}
);
validMsg = row.asbitemName + '项目,未选择追加到哪个检验申请单号!'
}
} else if (item.operate == 'new') {
news.push(item.registerAsbitemId);
}
});
if (validMsg) {
this.$message.warning(validMsg);
return;
}
if (append.length > 0) {
postapi('/api/app/lisrequest/appendlisrequestmany', append)
.then(res => {
if (res.code != -1) {
this.$message.success('项目追加到检验申请单成功!');
this.getAsbItemList(this.id);
}
});
}
if (news.length > 0) {
postapi('/api/app/lisrequest/addlisrequest', news)
.then(res => {
if (res.code != -1) {
this.$message.success('项目创建检验申请单成功!');
this.getAsbItemList(this.id);
}
});
}
},
//
lisPrint(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=${this.id}`)
.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=${this.id}`)
.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: this.id })
}
})
.catch(err => {
this.$message.warning(err);
});
}
},
},
@ -145,7 +244,7 @@ export default {
// this.getAsbItemList(newVal);
// }
// },
"brushTimes"(newVal, oldVal) {
if (newVal != oldVal && newVal != "") {
this.getAsbItemList(this.id);

77
src/components/patientRegister/PatientRegisterEdit.vue

@ -397,7 +397,7 @@
<!-- 检验条码补打 -->
<el-dialog title="检验条码补打" :visible.sync="patientRegister.lisRequestVisble" width="600px" height="400"
:show-close="false" :close-on-click-modal="false" :append-to-body="true">
<LisRequest :id="form.id" :brushTimes="brushTimes"/>
<LisRequest :id="form.id" :brushTimes="brushTimes" />
</el-dialog>
@ -423,7 +423,7 @@ export default {
data() {
return {
apiurl: mm.apiurl,
brushTimes:0,
brushTimes: 0,
form: {
id: "", //id
patientId: "00000000-0000-0000-0000-000000000000", //ID 00000-0000...
@ -753,7 +753,7 @@ export default {
.then(res => {
if (res.toLowerCase() == 'success') {
//
return postapi('api/app/patientregister/updatepatientregisterguideprinttimesmany', [this.form.id])
return postapi('/api/app/patientregister/updatepatientregisterguideprinttimesmany', [this.form.id])
}
})
.then(res => {
@ -776,15 +776,46 @@ export default {
},
//
lisRequest() {
async lisRequest() {
let isPrintLisRequest = false
let res = null
if (this.form.id.length < 1) {
this.$message.info("人员信息尚未保存,不可执行此操作!");
return;
}
getapi(`/api/app/lisrequest/setlisrequest?PatientRegisterId=${this.form.id}`)
.then(res => {
if (res.code != -1) this.$message.info("发送检验申请成功!");
try {
res = await postapi(`/api/app/lisrequest/setlisrequest?PatientRegisterId=${this.form.id}`);
console.log(`/api/app/lisrequest/setlisrequest?PatientRegisterId=${this.form.id}`, 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('0003', false);
},
//
@ -806,9 +837,9 @@ export default {
if (isPreview) {
//http://140.143.162.39:9529/api/app/print-report/lis-request-report/3a0c7f6e-3ff1-fef6-c568-6f541aabe87a
//http://140.143.162.39:9529/api/app/printreport/getlisrequestreport?PatientRegisterId=3a0d2e90-da68-3746-6775-bf17e5f9b295
//this.multipleSelection.forEach((item,index) =>{
getapi(`/api/app/print-report/lis-request-report/${this.form.id}`)
postapi(`/api/app/printreport/getlisrequestreport?PatientRegisterId=${this.form.id}`)
.then((res) => {
if (res.code != -1) {
toOutShell.ReportTable = { lisRequest: res.data };
@ -822,7 +853,7 @@ export default {
// });
} else {
getapi(`/api/app/print-report/lis-request-report/${this.form.id}`)
postapi(`/api/app/printreport/getlisrequestreport?PatientRegisterId=${this.form.id}`)
.then((res) => {
if (res.code != -1) {
toOutShell.ReportTable = { lisRequest: res.data };
@ -832,22 +863,15 @@ export default {
})
.then(res => {
if (res.toLowerCase() == 'success') {
//
return postapi('api/app/patientregister/updatepatientregisterguideprinttimesmany', [this.form.id])
// /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: this.form.id })
}
})
.then(res => {
if (res.code != -1) {
lfind = arrayExistObj(this.patientRegister.prList, 'id', this.form.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);
});
@ -920,4 +944,5 @@ export default {
text-align: left;
padding-left: 5px;
padding-right: 15px;
}</style>
}
</style>

260
src/components/patientRegister/PatientRegisterList.vue

@ -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);
});
}
},
},
//

2
src/main.js

@ -8,8 +8,10 @@ import axios from "axios";
import JsonExcel from "vue-json-excel"; //vue全局导入导出excel
import Print from "vue-print-nb";
import Meta from 'vue-meta'
import Contextmenu from 'vue-contextmenujs' //'vue-contextmenu'
Vue.use(Contextmenu);
Vue.use(Meta);
Vue.use(ElementUI);

Loading…
Cancel
Save