pengjun 2 years ago
parent
commit
2566724a19
  1. 2
      src/api/api.js
  2. 2
      src/api/request.js
  3. 186
      src/components/patientRegister/LisRequest.vue
  4. 222
      src/components/patientRegister/PatientRegisterEdit.vue
  5. 4
      src/components/patientRegister/PatientRegisterItem.vue
  6. 35
      src/components/patientRegister/PatientRegisterList.vue
  7. 1
      src/store/index.js
  8. 24
      src/views/doctorCheck/personnelBatch.vue

2
src/api/api.js

@ -59,3 +59,5 @@ export async function putapi(url, params = {}, config) {
});
});
}

2
src/api/request.js

@ -8,7 +8,7 @@ import { Message } from "element-ui";
const instance = axios.create({
baseURL: mm.apiurl,
timeout: 5000,
timeout: 500000,
});
//请求拦截

186
src/components/patientRegister/LisRequest.vue

@ -0,0 +1,186 @@
<template>
<div>
<div>
<el-table :data="tableData" border style="width: 100%" row-key="id" height="300" highlight-current-row size="small">
<el-table-column label="组合项目" width="120" prop="asbitemName" />
<el-table-column label="操作" width="130" prop="operate">
<template slot-scope="scope">
<el-select v-model="scope.row.operate" placeholder="请操作方式" size="small" :disabled="scope.row.disabled"
@change="changeOperate(scope.row)">
<el-option v-for="(item, index) in options" :key="index" :label="item.label" :value="item.value" />
</el-select>
</template>
</el-table-column>
<el-table-column label="条码分组" width="120" prop="sampleGroupName" />
<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-select>
</template>
</el-table-column>
</el-table>
</div>
<!-- 按钮区域 -->
<div style="display: flex; margin-top: 30px; margin-left: 400px; ">
<div style="margin-left: 10px">
<el-button type="primary" @click="submit">确定</el-button>
</div>
<div style="margin-left: 10px">
<el-button type="danger" @click="patientRegister.lisRequestVisble = false">关闭</el-button>
</div>
</div>
</div>
</template>
<script>
import { mapState } from "vuex";
import { getapi, postapi, putapi, deletapi } from "@/api/api";
import { examinationgender } from "@/request/systemapi";
import { dddw, arrayExistObj } from "../../utlis/proFunc";
// import
export default {
props: ["id","brushTimes"],
data() {
return {
tableData: [], //
options: [{ label: '无', value: 'no' }, { label: '追加到以前条码', value: 'append' }, { label: '申请新的条码', value: 'new' }], //
lisRequestNos: [], //
};
},
created() { },
mounted() {
this.getAsbItemList(this.id);
},
computed: {
...mapState(["patientRegister"]),
},
methods: {
parseData(asbItem) {
// asbitemId": "3a0c5600-ae78-9ed4-e3c1-993ef41d3c51",
// "asbitemName": "",
// "isCharge": "N",
// "completeFlag": "0",
// "sampleGroupId": "3a0c55c2-0f26-71a1-1f1a-ebbcbd77105b",
// "sampleGroupName": "1",
// "lisRequestId": "3a0d2fa9-aaba-4837-0775-20d13937f357",
// "lisRequestNo": "T202308220016"
if (asbItem.length < 1) return;
let lfind = -1;
asbItem.forEach(e => {
if (e.lisRequestNo) {
e['operate'] = 'no';
e['disabled'] = true;
lfind = arrayExistObj(this.lisRequestNos, 'lisRequestNo', e.lisRequestNo);
if (lfind == -1) {
this.lisRequestNos.push({
sampleGroupId: e.sampleGroupId,
lisRequestNo: e.lisRequestNo,
lisRequestId: e.lisRequestId,
})
}
} else {
e['disabled'] = false;
}
return e;
});
},
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}`
).then((res) => {
this.tableData = res.data;
this.parseData(this.tableData);
});
},
//
changeOperate(row) {
if(row.operate == 'append'){
//2 ID lisRequestNos
}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;
});
} else {
putapi(`/api/app/reference-range/${this.id}`, this.form).then(
(res) => {
this.$message.success("修改成功");
this.getlist(this.itemId, this.ReferenceRangeTypeFlag);
}
);
}
}
});
},
},
//
watch: {
//itemId','ReferenceRangeTypeFlag'
// "id"(newVal, oldVal) {
// if (newVal != oldVal && newVal != "") {
// this.getAsbItemList(newVal);
// }
// },
"brushTimes"(newVal, oldVal) {
if (newVal != oldVal && newVal != "") {
this.getAsbItemList(this.id);
}
},
},
};
</script>
<style scoped>
::v-deep .el-input__inner {
text-align: center;
padding-left: 1px;
padding-right: 1px;
}
::v-deep .el-table th.el-table__cell {
text-align: center;
padding-left: 1px;
padding-right: 1px;
}
::v-deep .el-table td.el-table__cell {
padding-left: 1px;
padding-right: 1px;
}
::v-deep .el-table .cell {
padding-left: 1px;
padding-right: 1px;
}
::v-deep input[type="number"]::-webkit-inner-spin-button,
input[type="number"]::-webkit-outer-spin-button {
-webkit-appearance: none !important;
margin: 0 !important;
}
</style>

222
src/components/patientRegister/PatientRegisterEdit.vue

@ -118,7 +118,7 @@
</el-form-item>
</el-col>
<el-col :span="5">
<el-form-item label="籍" prop="birthPlaceId">
<el-form-item label="籍" prop="birthPlaceId">
<el-select v-model="form.birthPlaceId" placeholder="请选择" filterable clearable
:style="'width:' + Math.floor((window.pageWidth - 530) / 4.8) + 'px;'">
<el-option v-for="item in dict.birthPlace" :key="item.id" :label="item.displayName"
@ -312,26 +312,33 @@
<div class="btn">
<el-button @click="readIdCard" class="btnClass">读身份证</el-button>
</div>
<div class="btn">
<el-button type="primary" class="btnClass" @click="rdCopy">复制新增</el-button>
</div>
<div class="btn">
<el-button type="success" class="btnClass" @click="Onsubmit('form', true)">保存</el-button>
</div>
<div class="btn">
<el-button type="primary" class="btnClass">申请单</el-button>
<el-button type="primary" class="btnClass" @click="lisRequest">检验单申请</el-button>
</div>
<div class="btn">
<el-button type="primary" class="btnClass">条码</el-button>
<el-button type="primary" class="btnClass" @click="lisPrint('0002', false)">条码打印</el-button>
</div>
<div class="btn">
<el-button type="primary" class="btnClass">打指引单</el-button>
<el-button type="danger" class="btnClass" @click="reLisRequest">条码补打</el-button>
</div>
<div class="btn">
<el-button type="primary" class="btnClass">复制新增</el-button>
<el-button type="primary" class="btnClass" @click="guidePrint('0001', false)">指引单打印</el-button>
</div>
<div class="btn">
<el-button type="primary" class="btnClass" @click="guidePrint('0001', false)">指引单预览</el-button>
</div>
</div>
</div>
<!-- 人员档案列表 -->
<el-dialog title="人员档案列表" :visible.sync="dialogVisible" width="800" :append-to-body="true">
<el-dialog title="人员档案列表" :visible.sync="dialogVisible" width="800" :show-close="false" :close-on-click-modal="false"
:append-to-body="true">
<el-table :data="patientList" border width="800" height="480" row-key="id" size="small"
class="el-table__body-wrapper tbody" highlight-current-row @row-click="rowick" ref="patientList">
<el-table-column type="index" width="30" />
@ -383,10 +390,17 @@
</span>
</el-dialog>
<!-- 拍照 -->
<el-dialog title="拍照" :visible.sync="patientRegister.cameraVisble" width="400" height="800" :show-close="false"
<el-dialog title="拍照" :visible.sync="patientRegister.cameraVisble" width="400" height="600" :show-close="false"
:close-on-click-modal="false" :append-to-body="true">
<Camera :id="form.id" />
</el-dialog>
<!-- 检验条码补打 -->
<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"/>
</el-dialog>
</div>
</template>
<script>
@ -397,16 +411,19 @@ import mm from "../../utlis/mm";
import { objCopy, setNull, dddw, parseID, birthdayToAge } from "../../utlis/proFunc";
import Camera from "./Camera.vue";
import LisRequest from "./LisRequest.vue";
import PatientRegisterItem from "./PatientRegisterItem.vue";
export default {
components: {
Camera,
LisRequest,
PatientRegisterItem,
},
props: ['formInitData', 'editTimes'],
data() {
return {
apiurl: mm.apiurl,
brushTimes:0,
form: {
id: "", //id
patientId: "00000000-0000-0000-0000-000000000000", //ID 00000-0000...
@ -613,9 +630,14 @@ export default {
//console.log('res',res)
if (msgTip) this.$message.success("创健 操作成功");
objCopy(res.data, this.form);
// this.patientRegister.prList.push(res.data); //
this.patientRegister.patientRegisterId = res.data.id;
this.patientRegister.patientRegisterId = res.data.id;
this.patientRegister.patientRegisterAbs.forEach(e => {
e.patientRegisterId = res.data.id;
return e;
});
this.patientRegister.patientRegisterRd = res.data;
this.patientRegister.query.times++;
this.patientRegister.saveTimes++;
}
@ -639,9 +661,29 @@ export default {
});
},
//
add() {
//
//
rdCopy() {
if (!this.patientRegister.patientRegisterId) {
this.$message.info("该信息尚未保存,不可执行此操作!");
return;
}
this.patientRegister.patientRegisterId = '';
this.form.id = '';
this.form.patientId = '00000000-0000-0000-0000-000000000000';
this.form.patientRegisterNo = '';
this.form.patientNo = '';
this.form.medicalTimes = 1;
this.form.patientName = '';
this.form.photo = '';
this.patientRegister.patientRegisterAbs.forEach(e => {
e.patientRegisterId = '';
e.id = '';
return e;
});
// console.log('this.patientRegister.patientRegisterAbs',this.patientRegister.patientRegisterAbs)
this.$message.info("操作成功,确定请记得点保存");
},
//
@ -663,6 +705,164 @@ export default {
}
this.patientRegister.cameraVisble = true;
},
// (isPreview)
async guidePrint(ReportCode, isPreview) {
if (this.form.id.length < 1) {
this.$message.info("人员信息尚未保存,不可执行此操作!");
return;
}
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) {
//
//this.multipleSelection.forEach((item,index) =>{
getapi(`/api/app/printreport/getpatientregisterguidereport?PatientRegisterId=${this.form.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 {
getapi(`/api/app/printreport/getpatientregisterguidereport?PatientRegisterId=${this.form.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', [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);
});
}
},
//
lisRequest() {
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("发送检验申请成功!");
});
},
//
lisPrint(ReportCode, isPreview) {
if (this.form.id.length < 1) {
this.$message.info("人员信息尚未保存,不可执行此操作!");
return;
}
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/print-report/lis-request-report/3a0c7f6e-3ff1-fef6-c568-6f541aabe87a
//this.multipleSelection.forEach((item,index) =>{
getapi(`/api/app/print-report/lis-request-report/${this.form.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 {
getapi(`/api/app/print-report/lis-request-report/${this.form.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') {
//
return postapi('api/app/patientregister/updatepatientregisterguideprinttimesmany', [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);
});
}
},
reLisRequest() {
if (this.form.id.length < 1) {
this.$message.info("人员信息尚未保存,不可执行此操作!");
return;
}
this.brushTimes++;
this.patientRegister.lisRequestVisble = true;
},
},
//

4
src/components/patientRegister/PatientRegisterItem.vue

@ -280,8 +280,8 @@ export default {
//
async batchAddAsb(body, msg) {
console.log(`/api/app/registerasbitem/createmany?CustomerOrgId=${this.patientRegisterForm.customerOrgId}`, body)
await postapi(`/api/app/registerasbitem/createmany?CustomerOrgId=${this.patientRegisterForm.customerOrgId}`, body)
console.log(`/api/app/registerasbitem/createmany?OrganizationUnitId=${this.patientRegisterForm.organizationUnitId}`, body)
await postapi(`/api/app/registerasbitem/createmany?OrganizationUnitId=${this.patientRegisterForm.organizationUnitId}`, body)
.then((res) => {
console.log("batchAddAsb", res);
if (res.code == 1) {

35
src/components/patientRegister/PatientRegisterList.vue

@ -1,7 +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
<el-table :data="patientRegister.prList" border
:height="patientRegister.prListHeight" highlight-current-row
@row-click="rowick" size="small" @selection-change="handleSelectionChange">
<el-table-column type="selection" width="40">
@ -11,7 +12,11 @@
<div>{{ ldddw(dict.completeFlag, "id", scope.row.completeFlag, "displayName") }}</div>
</template>
</el-table-column>
<el-table-column prop="guidePrintTimes" label="打印" />
<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>
</el-table-column>
<el-table-column prop="isLock" label="锁住">
<template slot-scope="scope">
<div>{{ scope.row.isLock == "Y" ? "是" : "否" }}</div>
@ -350,7 +355,7 @@ export default {
return;
}
//console.log('customerOrgId',customerOrgId)
// this.patientRegister.patientRegisterId = "";
this.patientRegister.patientRegisterId = "";
// this.patientRegister.patientRegisterRd.photo = '';
// this.patientRegister.patientRegisterRdInit.id = "";
// this.patientRegister.patientRegisterRdInit.customerOrgId = this.patientRegister.query.customerOrgId;
@ -456,7 +461,15 @@ export default {
},
//
query() {
async query() {
this.patientRegister.prList = [];
const loading = this.$loading({
lock: true,
text: 'Loading',
spinner: 'el-icon-loading',
background: 'rgba(0, 0, 0, 0.7)'
});
let body = {}
console.log(`this.patientRegister.query`, this.patientRegister.query)
@ -491,8 +504,20 @@ export default {
console.log('/api/app/patientregister/getlistinfilter', body)
postapi('/api/app/patientregister/getlistinfilter', body)
.then((res) => {
this.patientRegister.prList = res.data;
if(res.code != -1 ){
this.patientRegister.prList = res.data.items;
}
loading.close();
})
.catch((err) =>{
loading.close();
});
// try {
// let res =await postapi('/api/app/patientregister/getlistinfilter', body);
// this.patientRegister.prList = res.data;
// } catch (error) {
// console.log("query error",error);
// }
},
},

1
src/store/index.js

@ -56,6 +56,7 @@ export default new Vuex.Store({
saveTimes: 0, //用于体检登记时,触发分组调整保存
photo: "", //单独抽出,拍照时会更新
cameraVisble: false, //拍照控件显示
lisRequestVisble:false, //检验条码补打
patientRegisterRdInit: {
id: "", //id
patientId: "00000000-0000-0000-0000-000000000000", //档案号ID 选择了档案就传档案号,未选就传00000-0000...

24
src/views/doctorCheck/personnelBatch.vue

@ -310,18 +310,18 @@ export default {
console.log(i,res)
if(res.code != -1){
try {
await this.$confirm("导入数据出错, 是否继续导入?", "提示", {
confirmButtonText: "是",
cancelButtonText: "否",
type: "warning",
showClose:false,
});
} catch (error) {
return;
}
}
// if(res.code != -1){
// try {
// await this.$confirm(", ?", "", {
// confirmButtonText: "",
// cancelButtonText: "",
// type: "warning",
// showClose:false,
// });
// } catch (error) {
// return;
// }
// }
}
},

Loading…
Cancel
Save