pengjun 2 years ago
parent
commit
b9961a7c18
  1. 8
      src/components/doctorCheck/CheckItemList.vue
  2. 107
      src/components/patientRegister/PatientRegisterEdit.vue
  3. 41
      src/components/patientRegister/PatientRegisterItem.vue
  4. 120
      src/components/patientRegister/PatientRegisterList.vue
  5. 8
      vue.config.js

8
src/components/doctorCheck/CheckItemList.vue

@ -6,7 +6,7 @@
<el-table-column prop="result" label="结果" min-width="200"> <el-table-column prop="result" label="结果" min-width="200">
<template slot-scope="scope"> <template slot-scope="scope">
<div style="display: flex;"> <div style="display: flex;">
<el-autocomplete style="width: 100%;font: 14px 'Microsoft YaHei';" type="textarea" v-model="scope.row.result" placeholder="请输入结果值"
<el-autocomplete style="width: 100%;" type="textarea" v-model="scope.row.result" placeholder="请输入结果值"
:disabled="rowResultDisabled(scope.row)" :autosize="{ minRows: 1, maxRows: 10 }" :trigger-on-focus="false" :disabled="rowResultDisabled(scope.row)" :autosize="{ minRows: 1, maxRows: 10 }" :trigger-on-focus="false"
:fetch-suggestions="querySearch" :data-lineModeFlag="scope.row.lineModeFlag" :fetch-suggestions="querySearch" :data-lineModeFlag="scope.row.lineModeFlag"
@input="madeTooltips(scope.$index); computeFun(scope.$index)" v-bind:class="scope.row.class"> @input="madeTooltips(scope.$index); computeFun(scope.$index)" v-bind:class="scope.row.class">
@ -47,7 +47,7 @@
</div> </div>
</div> </div>
<div>录入结果</div> <div>录入结果</div>
<el-input id="resultBox" style="width: 100%;" type="textarea" :autosize="{ minRows: 4, maxRows: 4 }"
<el-input id="resultBox" style="width: 100%;" class="commonFont" type="textarea" :autosize="{ minRows: 4, maxRows: 4 }"
v-model="moreResult.result" /> v-model="moreResult.result" />
</div> </div>
<span slot="footer" class="dialog-footer"> <span slot="footer" class="dialog-footer">
@ -661,6 +661,10 @@ export default {
color: v-bind("tipsSuper.color") !important; color: v-bind("tipsSuper.color") !important;
font-family: "Microsoft YaHei"; font-family: "Microsoft YaHei";
} }
::v-deep .commonFont .el-textarea__inner{
font-family: "Microsoft YaHei";
}
</style> </style>

107
src/components/patientRegister/PatientRegisterEdit.vue

@ -21,13 +21,19 @@
<el-form ref="form" :model="form" label-width="80px" :rules="rules" size="medium"> <el-form ref="form" :model="form" label-width="80px" :rules="rules" size="medium">
<el-row> <el-row>
<el-col :span="5"> <el-col :span="5">
<el-form-item label="单位名称" prop="customerOrgId">
<el-form-item label="单位名称" prop="customerOrgName">
<el-input placeholder="请选择单位" v-model="form.customerOrgName" size="small" disabled>
<el-button slot="append" icon="el-icon-search" @click="report.dialogCusOrgOCX = true"
style="font-size: 20px;"></el-button>
</el-input>
<!--
<el-cascader v-model="form.customerOrgId" :options="patientRegister.customerOrgTreeAll" <el-cascader v-model="form.customerOrgId" :options="patientRegister.customerOrgTreeAll"
:style="'width:' + Math.floor((window.pageWidth - 510) / 4.8) + 'px;'" filterable :style="'width:' + Math.floor((window.pageWidth - 510) / 4.8) + 'px;'" filterable
popper-class="example" :show-all-levels="false" @change="changeCustomerOrgId" popper-class="example" :show-all-levels="false" @change="changeCustomerOrgId"
:props="{ checkStrictly: true, expandTrigger: 'hover', ...customerOrg.treeprops, }" :props="{ checkStrictly: true, expandTrigger: 'hover', ...customerOrg.treeprops, }"
:disabled="(form.completeFlag == '3' || isDoctor != '1') ? true : false" size="small"> :disabled="(form.completeFlag == '3' || isDoctor != '1') ? true : false" size="small">
</el-cascader> </el-cascader>
-->
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="5"> <el-col :span="5">
@ -562,6 +568,8 @@ export default {
patientId: "00000000-0000-0000-0000-000000000000", //ID 00000-0000... patientId: "00000000-0000-0000-0000-000000000000", //ID 00000-0000...
patientNo: "", // patientNo: "", //
customerOrgId: ["00000000-0000-0000-0000-000000000001"], // customerOrgId: ["00000000-0000-0000-0000-000000000001"], //
customerOrgParentId: "",
customerOrgName: "",
customerOrgRegisterId: "00000000-0000-0000-0000-000000000001", // customerOrgRegisterId: "00000000-0000-0000-0000-000000000001", //
customerOrgGroupId: null, // customerOrgGroupId: null, //
medicalPackageId: null, // medicalPackageId: null, //
@ -722,7 +730,7 @@ export default {
dddw, moment, checkPagePriv, dddw, moment, checkPagePriv,
btnTest() { btnTest() {
console.log('form', this.form)
// console.log('form', this.form)
}, },
// //
dictInit() { dictInit() {
@ -827,7 +835,7 @@ export default {
// } // }
// }); // });
// console.log("dict", this.dict);
// // console.log("dict", this.dict);
}, },
@ -843,13 +851,14 @@ export default {
} else { } else {
// let res = await getapi(`/api/app/patient-register/${patientRegisterId}`) // let res = await getapi(`/api/app/patient-register/${patientRegisterId}`)
let res = await postapi(`/api/app/patientregister/getinfoorpatient?PatientRegisterId=${patientRegisterId}`)
let res = await postapi('/api/app/patientregister/getinfoorpatient', { patientRegisterId })
// this.form = res.data checkbox // this.form = res.data checkbox
objCopy(res.data, this.form) objCopy(res.data, this.form)
} }
this.initBox(); this.initBox();
this.getPeoplePhoto(this.form.photo) this.getPeoplePhoto(this.form.photo)
this.dataTransOpts.refresh.register_check_asbitem.D++ //
// this.dataTransOpts.refresh.register_check_asbitem.D++ //
// / // /
this.changeCustomerOrgId(this.form.customerOrgId) this.changeCustomerOrgId(this.form.customerOrgId)
@ -859,7 +868,7 @@ export default {
// //
filterMethod(keyWords) { filterMethod(keyWords) {
//console.log('filterMethod',this.asbItemQuick)
//// console.log('filterMethod',this.asbItemQuick)
if (keyWords) { if (keyWords) {
this.nation = []; this.nation = [];
this.dict.nation.forEach(item => { this.dict.nation.forEach(item => {
@ -875,7 +884,7 @@ export default {
// //
async changeCustomerOrgId(v) { async changeCustomerOrgId(v) {
// console.log('changeCustomerOrgId',v)
// // console.log('changeCustomerOrgId',v)
let customerOrgId = "" let customerOrgId = ""
if (Array.isArray(v) && v.length > 0) { if (Array.isArray(v) && v.length > 0) {
customerOrgId = v[v.length - 1] customerOrgId = v[v.length - 1]
@ -928,7 +937,7 @@ export default {
let res = await getapi(`/api/app/customer-org/parent/${customerOrgId}`) let res = await getapi(`/api/app/customer-org/parent/${customerOrgId}`)
if (res.code != -1) customerOrgParentId = res.data if (res.code != -1) customerOrgParentId = res.data
} catch (error) { } catch (error) {
console.log('获取顶级单位ID出错:', error)
// console.log('ID', error)
} }
} else if (customerOrgId.length > 0) { } else if (customerOrgId.length > 0) {
customerOrgParentId = customerOrgId[0] customerOrgParentId = customerOrgId[0]
@ -942,7 +951,7 @@ export default {
getapi(`/api/app/customerorgregister/getlistincustomerorgid?CustomerOrgId=${customerOrgParentId}`) getapi(`/api/app/customerorgregister/getlistincustomerorgid?CustomerOrgId=${customerOrgParentId}`)
.then(res => { .then(res => {
if (res.code > - 1) { if (res.code > - 1) {
console.log('获取单位体检次数', this.form.customerOrgRegisterId, res.data)
// console.log('', this.form.customerOrgRegisterId, res.data)
this.customerOrgRegisterList = res.data this.customerOrgRegisterList = res.data
if (!this.form.customerOrgRegisterId) { if (!this.form.customerOrgRegisterId) {
let customerOrgRegisterList = arrayFilter(res.data, 'isComplete', 'N') // let customerOrgRegisterList = arrayFilter(res.data, 'isComplete', 'N') //
@ -967,7 +976,7 @@ export default {
return return
} }
this.$peisAPI.peopleIcCard().then(res => { this.$peisAPI.peopleIcCard().then(res => {
console.log('peopleIcCard', res)
// console.log('peopleIcCard', res)
let lres = JSON.parse(res) let lres = JSON.parse(res)
if (lres.code >= -1) { if (lres.code >= -1) {
let idNos = parsIcCardtoLocal(lres.data, this.dict.sex, this.dict.nation) let idNos = parsIcCardtoLocal(lres.data, this.dict.sex, this.dict.nation)
@ -1125,7 +1134,7 @@ export default {
// //
if (this.form.id || !param) return; if (this.form.id || !param) return;
//console.log(`/api/app/patient/in-filter?Filter=${param}`)
//// console.log(`/api/app/patient/in-filter?Filter=${param}`)
let body = { let body = {
filter: param, filter: param,
maxResultCount: 500 maxResultCount: 500
@ -1133,7 +1142,7 @@ export default {
postapi('/api/app/patient/getlistinfilter', body).then((res) => { postapi('/api/app/patient/getlistinfilter', body).then((res) => {
if (res.code > -1) { if (res.code > -1) {
console.log("查重 ", res); //
// console.log(" ", res); //
if (res.data && res.data.length > 0) { if (res.data && res.data.length > 0) {
this.patientList = res.data; this.patientList = res.data;
this.dialogVisible = true; this.dialogVisible = true;
@ -1224,7 +1233,7 @@ export default {
} else { } else {
this.form[type] = 'N'; this.form[type] = 'N';
} }
console.log('Box-type', this.form[type + 'Box'], this.form[type])
// console.log('Box-type', this.form[type + 'Box'], this.form[type])
}, },
initBox() { initBox() {
@ -1261,8 +1270,8 @@ export default {
madePrBody() { madePrBody() {
// //
let body = deepCopy(this.form); let body = deepCopy(this.form);
// console.log('this.form',this.form)
// console.log('body',body)
// // console.log('this.form',this.form)
// // console.log('body',body)
if (this.form.birthDate) { if (this.form.birthDate) {
try { try {
body.birthDate = moment(body.birthDate).format("yyyy-MM-DD") body.birthDate = moment(body.birthDate).format("yyyy-MM-DD")
@ -1279,7 +1288,7 @@ export default {
} else { } else {
body.age = Number(body.age) body.age = Number(body.age)
} }
// console.log('body',body)
// // console.log('body',body)
// Invalid date // Invalid date
delete body.registerManType; delete body.registerManType;
@ -1308,7 +1317,7 @@ export default {
} }
// //
// console.log("body.birthDate", body.birthDate);
// // console.log("body.birthDate", body.birthDate);
// if (body.birthDate) { // if (body.birthDate) {
// body.birthDate = moment(new Date(body.birthDate)).format( // body.birthDate = moment(new Date(body.birthDate)).format(
// "yyyy-MM-DD" // "yyyy-MM-DD"
@ -1320,7 +1329,7 @@ export default {
// //
btnSubmit(formName, msgTip) { btnSubmit(formName, msgTip) {
this.$refs[formName].validate((valid, fields) => { this.$refs[formName].validate((valid, fields) => {
console.log('fields', fields)
// console.log('fields', fields)
if (!valid) { if (!valid) {
this.$message.warning({ showClose: true, message: fields[Object.keys(fields)[0]][0].message }); this.$message.warning({ showClose: true, message: fields[Object.keys(fields)[0]][0].message });
return false return false
@ -1347,7 +1356,7 @@ export default {
} else { } else {
delete body.id; delete body.id;
} }
// console.log(`/api/patientregister/createreturninfo`, body);
// // console.log(`/api/patientregister/createreturninfo`, body);
postapi(`/api/PatientRegister/CreatePatientRegister`, body) postapi(`/api/PatientRegister/CreatePatientRegister`, body)
.then(res => { .then(res => {
if (res.code == 1) { if (res.code == 1) {
@ -1419,7 +1428,7 @@ export default {
e.isCharge = 'N' e.isCharge = 'N'
e.isLock = 'N' e.isLock = 'N'
}); });
// console.log('this.patientRegister.patientRegisterAbs',this.patientRegister.patientRegisterAbs)
// // console.log('this.patientRegister.patientRegisterAbs',this.patientRegister.patientRegisterAbs)
this.$message.info({ showClose: true, message: "操作成功,请记得点保存" }); this.$message.info({ showClose: true, message: "操作成功,请记得点保存" });
}, },
@ -1429,7 +1438,7 @@ export default {
deletapi( deletapi(
`/api/app/customer-org/${this.customerOrg.customerOrgRd.id}` `/api/app/customer-org/${this.customerOrg.customerOrgRd.id}`
).then((res) => { ).then((res) => {
console.log("删除 操作成功");
// console.log(" ");
this.setData({ key: "customerOrg.customerOrgRd", value: { id: "" } }); this.setData({ key: "customerOrg.customerOrgRd", value: { id: "" } });
this.getCustomerOrgTree(); this.getCustomerOrgTree();
}); });
@ -1456,7 +1465,7 @@ export default {
} }
this.$peisAPI.photoGrah() this.$peisAPI.photoGrah()
.then(res => { .then(res => {
console.log('this.$peisAPI.photoGrah 原始返回结果', res)
// console.log('this.$peisAPI.photoGrah ', res)
let lres = JSON.parse(res) let lres = JSON.parse(res)
if (lres.code > -1) { if (lres.code > -1) {
let uploadPhoto = { let uploadPhoto = {
@ -1475,17 +1484,17 @@ export default {
patientRegisterId: this.form.id, patientRegisterId: this.form.id,
photo: res.data, photo: res.data,
}; };
console.log(body);
// console.log(body);
return postapi(`/api/app/patient-register/update-photo`, body); return postapi(`/api/app/patient-register/update-photo`, body);
} }
}).then(res => { }).then(res => {
if (res && res.code > -1) { if (res && res.code > -1) {
//console.log('',res.data)
//// console.log('',res.data)
this.patientRegister.patientRegisterRd.photo = res.data.photo this.patientRegister.patientRegisterRd.photo = res.data.photo
console.log("操作成功");
// console.log("");
} }
}).catch(err => { }).catch(err => {
console.log('this.$peisAPI.photoGrah', err)
// console.log('this.$peisAPI.photoGrah', err)
this.$message.error({ showClose: true, message: `照片操作错误 ${err}` }) this.$message.error({ showClose: true, message: `照片操作错误 ${err}` })
}) })
}, },
@ -1526,7 +1535,7 @@ export default {
.then((res) => { .then((res) => {
if (res.code != -1) { if (res.code != -1) {
toOutShell.ReportTable = res.data; toOutShell.ReportTable = res.data;
console.log('JSON.stringify(toOutShell)', JSON.stringify(toOutShell));
// console.log('JSON.stringify(toOutShell)', JSON.stringify(toOutShell));
return this.$peisAPI.printPre(JSON.stringify(toOutShell)); return this.$peisAPI.printPre(JSON.stringify(toOutShell));
} }
}) })
@ -1536,13 +1545,13 @@ export default {
*/ */
this.$peisAPI.printPre(JSON.stringify(toOutShell)) this.$peisAPI.printPre(JSON.stringify(toOutShell))
.then(res => { .then(res => {
console.log('this.$peisAPI.printPre', res)
// console.log('this.$peisAPI.printPre', res)
if (JSON.parse(res).code < 0) { if (JSON.parse(res).code < 0) {
this.$message.warning({ showClose: true, message: JSON.parse(res).message }); this.$message.warning({ showClose: true, message: JSON.parse(res).message });
} }
}) })
.catch((err) => { .catch((err) => {
console.log('打印指引单错误', err)
// console.log('', err)
this.$message.warning({ showClose: true, message: `${err}` }); this.$message.warning({ showClose: true, message: `${err}` });
}); });
} else { } else {
@ -1551,7 +1560,7 @@ export default {
// .then((res) => { // .then((res) => {
// if (res.code != -1) { // if (res.code != -1) {
// toOutShell.ReportTable = res.data; // toOutShell.ReportTable = res.data;
// console.log('JSON.stringify(toOutShell)', JSON.stringify(toOutShell));
// // console.log('JSON.stringify(toOutShell)', JSON.stringify(toOutShell));
// return this.$peisAPI.print(JSON.stringify(toOutShell)); // return this.$peisAPI.print(JSON.stringify(toOutShell));
// } // }
// }) // })
@ -1598,7 +1607,7 @@ export default {
try { try {
res = await postapi(`/api/app/lisrequest/setlisrequest?PatientRegisterId=${this.form.id}`); res = await postapi(`/api/app/lisrequest/setlisrequest?PatientRegisterId=${this.form.id}`);
console.log(`/api/app/lisrequest/setlisrequest?PatientRegisterId=${this.form.id}`, res)
// console.log(`/api/app/lisrequest/setlisrequest?PatientRegisterId=${this.form.id}`, res)
} catch (error) { } catch (error) {
return; return;
} }
@ -1655,26 +1664,26 @@ export default {
{ Name: 'hisLog', Value: 'pic/hisLog.jpg' }, { Name: 'hisLog', Value: 'pic/hisLog.jpg' },
], ],
}; };
console.log('this.$peisAPI.print', toOutShell)
// console.log('this.$peisAPI.print', toOutShell)
if (isPreview) { if (isPreview) {
this.$peisAPI.printPre(JSON.stringify(toOutShell)) this.$peisAPI.printPre(JSON.stringify(toOutShell))
.then(res => { .then(res => {
let lres = JSON.parse(res) let lres = JSON.parse(res)
console.log('this.$peisAPI.printPre', lres)
// console.log('this.$peisAPI.printPre', lres)
if (lres.code < 0) { if (lres.code < 0) {
console.log('打印检验条码错误', lres.message)
// console.log('', lres.message)
this.$message.warning({ showClose: true, message: lres.message }); this.$message.warning({ showClose: true, message: lres.message });
} }
}) })
.catch((err) => { .catch((err) => {
console.log('打印检验条码错误', err)
// console.log('', err)
this.$message.warning({ showClose: true, message: `${err}` }); this.$message.warning({ showClose: true, message: `${err}` });
}); });
} else { } else {
this.$peisAPI.print(JSON.stringify(toOutShell)) this.$peisAPI.print(JSON.stringify(toOutShell))
.then(res => { .then(res => {
let lres = JSON.parse(res) let lres = JSON.parse(res)
console.log('打印检验条码', lres)
// console.log('', lres)
if (res && lres.code > -1) { if (res && lres.code > -1) {
return postapi('/api/app/lisrequest/updatelisrequestisprint', { operateType: 1, patientRegisterId: this.form.id }) return postapi('/api/app/lisrequest/updatelisrequestisprint', { operateType: 1, patientRegisterId: this.form.id })
} else { } else {
@ -1811,10 +1820,10 @@ export default {
triggerHeadSave() { triggerHeadSave() {
//id api/patientregister/updatepatientregister //id api/patientregister/updatepatientregister
let body = this.madePrBody() let body = this.madePrBody()
// console.log(`/api/patientregister/updatepatientregister?PatientRegisterId=${this.form.id}`, body);
// // console.log(`/api/patientregister/updatepatientregister?PatientRegisterId=${this.form.id}`, body);
postapi(`/api/patientregister/updatepatientregister?PatientRegisterId=${this.form.id}`, body).then((res) => { postapi(`/api/patientregister/updatepatientregister?PatientRegisterId=${this.form.id}`, body).then((res) => {
if (res.code != -1) { if (res.code != -1) {
console.log("操作成功");
// console.log("");
// //
if (this.patientRegister.photo && this.patientRegister.photo.indexOf("data:image") > -1) savePeoplePhoto(this.form.id, this.patientRegister.photo); if (this.patientRegister.photo && this.patientRegister.photo.indexOf("data:image") > -1) savePeoplePhoto(this.form.id, this.patientRegister.photo);
objCopy(this.form, this.patientRegister.patientRegisterRd); objCopy(this.form, this.patientRegister.patientRegisterRd);
@ -1827,7 +1836,7 @@ export default {
// IDform.id // IDform.id
refreshFormId() { refreshFormId() {
console.log('refreshFormId', this.prAsbOpraOpts.formId)
// console.log('refreshFormId', this.prAsbOpraOpts.formId)
this.form.id = this.prAsbOpraOpts.formId this.form.id = this.prAsbOpraOpts.formId
this.prAsbOpraOpts.formId = '' // this.prAsbOpraOpts.formId = '' //
@ -1846,14 +1855,14 @@ export default {
enterToTab() { enterToTab() {
this.$nextTick(() => { this.$nextTick(() => {
let inputs = document.querySelectorAll("form input"); // //.inline-input let inputs = document.querySelectorAll("form input"); // //.inline-input
//console.log('inputs',inputs);
//// console.log('inputs',inputs);
// //
inputs.forEach((input, i) => { inputs.forEach((input, i) => {
input.addEventListener('keydown', (event) => { input.addEventListener('keydown', (event) => {
// //
// console.log('data-ismultiline',input.getAttribute('data-ismultiline'));
// // console.log('data-ismultiline',input.getAttribute('data-ismultiline'));
if (event.keyCode === 13) { if (event.keyCode === 13) {
// //
@ -1880,14 +1889,14 @@ export default {
"dataTransOpts.refresh.patient_register.S": { "dataTransOpts.refresh.patient_register.S": {
// immediate: true, // immediate: true,
async handler(newVal, oldVal) { async handler(newVal, oldVal) {
console.log(`watch 人员登记 newVal:${newVal} oldVal:${oldVal} registerCheckId: ${this.dataTransOpts.tableS.patient_register.id}`);
// console.log(`watch newVal:${newVal} oldVal:${oldVal} registerCheckId: ${this.dataTransOpts.tableS.patient_register.id}`);
if (newVal != oldVal) await this.initFormData(this.dataTransOpts.tableS.patient_register.id) if (newVal != oldVal) await this.initFormData(this.dataTransOpts.tableS.patient_register.id)
} }
}, },
// //
// "form.photo"(newVal, oldVal) { // "form.photo"(newVal, oldVal) {
// //console.log('patientRegister.patientRegisterRd.id newVal',newVal,' oldVal',oldVal)
// //// console.log('patientRegister.patientRegisterRd.id newVal',newVal,' oldVal',oldVal)
// if (newVal != oldVal) { // if (newVal != oldVal) {
// this.getPeoplePhoto(newVal) // this.getPeoplePhoto(newVal)
// } // }
@ -1898,7 +1907,7 @@ export default {
// // immediate:true, // // immediate:true,
// // // deep:true, // // // deep:true,
// handler(newVal, oldVal) { // handler(newVal, oldVal) {
// //console.log('patientRegister.patientRegisterRd.id newVal',newVal,' oldVal',oldVal)
// //// console.log('patientRegister.patientRegisterRd.id newVal',newVal,' oldVal',oldVal)
// if (newVal != oldVal) { // if (newVal != oldVal) {
// this.changeCustomerOrgId(newVal) // this.changeCustomerOrgId(newVal)
// } // }
@ -1908,12 +1917,12 @@ export default {
// //
// //
"dataTransOpts.plus.clearPatientRegisterQuery": { "dataTransOpts.plus.clearPatientRegisterQuery": {
immediate: true,
// immediate: true,
handler(newVal, oldVal) { handler(newVal, oldVal) {
console.log('从体检人员登记列表 点登记,触发', newVal, oldVal)
// console.log(' ', newVal, oldVal)
if (newVal != oldVal) { if (newVal != oldVal) {
this.preCustomerOrgId = this.patientRegister.query.customerOrgId this.preCustomerOrgId = this.patientRegister.query.customerOrgId
console.log('this.preCustomerOrgId', this.preCustomerOrgId)
// console.log('this.preCustomerOrgId', this.preCustomerOrgId)
} }
} }
}, },
@ -1922,6 +1931,10 @@ export default {
}; };
</script> </script>
<style scoped> <style scoped>
::v-deep .el-icon-search:before {
color: #00F;
}
.btn { .btn {
margin-top: 5px; margin-top: 5px;
} }

41
src/components/patientRegister/PatientRegisterItem.vue

@ -184,7 +184,7 @@ import moment from 'moment';
import { mapState, mapActions } from "vuex"; import { mapState, mapActions } from "vuex";
import { getapi, postapi, putapi, deletapi } from "@/api/api"; import { getapi, postapi, putapi, deletapi } from "@/api/api";
import { getPagePriv, checkPagePriv, arrayFilter, arrayReduce, arrayExistObj, dddw, deepCopy, tcdate } from "../../utlis/proFunc"; import { getPagePriv, checkPagePriv, arrayFilter, arrayReduce, arrayExistObj, dddw, deepCopy, tcdate } from "../../utlis/proFunc";
import proApi from "../../utlis/proApi";
export default { export default {
props: ["prForm", "prAsbOpraOpts", "triggerHeadSave", "refreshFormId"], props: ["prForm", "prAsbOpraOpts", "triggerHeadSave", "refreshFormId"],
@ -253,7 +253,8 @@ export default {
}) })
}, },
mounted() { mounted() {
// this.getPrAsb(this.dataTransOpts.tableS.patient_register.id)
console.log('getPrAsb mounted')
this.getPrAsb(this.dataTransOpts.tableS.patient_register.id)
}, },
methods: { methods: {
@ -306,7 +307,7 @@ export default {
}, },
// //
async getPrAsb(id) {
getPrAsb(id) {
// debugger // debugger
// //
console.log('getPrAsb(id)', `getPrAsb(${id})`) console.log('getPrAsb(id)', `getPrAsb(${id})`)
@ -315,26 +316,34 @@ export default {
this.packageAsbs = [] this.packageAsbs = []
if (!id) { if (!id) {
this.dataTransOpts.tableM.register_check_asbitem = [] this.dataTransOpts.tableM.register_check_asbitem = []
this.refreshAsbitem()
} else { } else {
let result = await proApi.getPrAsb(id)
this.dataTransOpts.tableM.register_check_asbitem = result.data
getapi(`/api/app/registerasbitem/getlistinpatientregisterid?PatientRegisterId=${id}`).then(res => {
if (res.code > -1) {
this.dataTransOpts.tableM.register_check_asbitem = deepCopy(res.data)
this.refreshAsbitem()
}
})
} }
this.refreshAsbitem()
}, },
// //
async copyNew() {
copyNew() {
if (this.oldFormId) { if (this.oldFormId) {
let result = await proApi.getPrAsb(this.oldFormId)
this.dataTransOpts.tableM.register_check_asbitem = result.data
this.dataTransOpts.tableM.register_check_asbitem.forEach(e => {
e.id = '';
e.patientRegisterId = '';
e.isCharge = 'N';
e.checkCompleteFlag = '0'
e.isLock = 'N'
getapi(`/api/app/registerasbitem/getlistinpatientregisterid?PatientRegisterId=${this.oldFormId}`).then(res => {
if (res.code > -1) {
this.dataTransOpts.tableM.register_check_asbitem = deepCopy(res.data)
this.dataTransOpts.tableM.register_check_asbitem.forEach(e => {
e.id = '';
e.patientRegisterId = '';
e.isCharge = 'N';
e.checkCompleteFlag = '0'
e.isLock = 'N'
})
this.refreshAsbitem()
}
}) })
this.refreshAsbitem()
} }
}, },

120
src/components/patientRegister/PatientRegisterList.vue

@ -22,7 +22,8 @@
</div> </div>
<div v-else-if="dropCol[index].prop == 'completeFlag'" <div v-else-if="dropCol[index].prop == 'completeFlag'"
:style="`color: ${setColor(scope.row.isAudit, scope.row.completeFlag)}`"> :style="`color: ${setColor(scope.row.isAudit, scope.row.completeFlag)}`">
{{ scope.row.isAudit == 'Y' ? "已审核" : dddw(dict.completeFlag, "id", scope.row.completeFlag, "displayName") }}
{{ scope.row.isAudit == 'Y' ? "已审核" : dddw(dict.completeFlag, "id", scope.row.completeFlag,
"displayName") }}
</div> </div>
<div v-else-if="dropCol[index].prop == 'guidePrintTimes'"> <div v-else-if="dropCol[index].prop == 'guidePrintTimes'">
<i class="el-icon-printer" v-if="scope.row.guidePrintTimes > 0" style="font-size: 20px; color: green" /> <i class="el-icon-printer" v-if="scope.row.guidePrintTimes > 0" style="font-size: 20px; color: green" />
@ -366,7 +367,7 @@ export default {
// //
handleRowClassName({ row, rowIndex }) { handleRowClassName({ row, rowIndex }) {
// highLightBg 'selected' // highLightBg 'selected'
//console.log(rowIndex, row)
//// console.log(rowIndex, row)
//return row.highLightBg == 'selected' ? 'high-light-bg' : ''; //return row.highLightBg == 'selected' ? 'high-light-bg' : '';
if (row.choosed) { if (row.choosed) {
return "current-row"; return "current-row";
@ -451,7 +452,7 @@ export default {
.then((res) => { .then((res) => {
if (res.code != -1) { if (res.code != -1) {
toOutShell.ReportTable = res.data; toOutShell.ReportTable = res.data;
console.log(
// console.log(
"JSON.stringify(toOutShell)", "JSON.stringify(toOutShell)",
JSON.stringify(toOutShell) JSON.stringify(toOutShell)
); );
@ -459,13 +460,13 @@ export default {
} }
}) })
.then(res => { .then(res => {
console.log('this.$peisAPI.printPre', res)
// console.log('this.$peisAPI.printPre', res)
if (JSON.parse(res).code < 0) { if (JSON.parse(res).code < 0) {
this.$message.warning(JSON.parse(res).message); this.$message.warning(JSON.parse(res).message);
} }
}) })
.catch((err) => { .catch((err) => {
console.log('打印指引单', err)
// console.log('', err)
this.$message.warning({ showClose: true, message: err }); this.$message.warning({ showClose: true, message: err });
}); });
*/ */
@ -477,7 +478,7 @@ export default {
} }
}) })
.catch((err) => { .catch((err) => {
console.log('打印指引单', err)
// console.log('', err)
this.$message.warning({ showClose: true, message: `${err}` }); this.$message.warning({ showClose: true, message: `${err}` });
}); });
@ -493,7 +494,7 @@ export default {
if (resPrintData.code == -1) continue if (resPrintData.code == -1) continue
toOutShell.ReportTable = resPrintData.data toOutShell.ReportTable = resPrintData.data
resPeisAPI = await this.$peisAPI.print(JSON.stringify(toOutShell)); resPeisAPI = await this.$peisAPI.print(JSON.stringify(toOutShell));
console.log('壳返回结果', resPeisAPI)
// console.log('', resPeisAPI)
if (JSON.parse(resPeisAPI).code < 0) continue if (JSON.parse(resPeisAPI).code < 0) continue
resPrintTimes = await postapi("/api/app/patientregister/updatepatientregisterguideprinttimesmany", [this.multipleSelection[i].id]); resPrintTimes = await postapi("/api/app/patientregister/updatepatientregisterguideprinttimesmany", [this.multipleSelection[i].id]);
if (resPrintTimes.code == -1) continue if (resPrintTimes.code == -1) continue
@ -522,7 +523,7 @@ export default {
} }
} catch (error) { } catch (error) {
console.log('打印指引单', error)
// console.log('', error)
this.$message.warning({ showClose: true, message: `${error}` }); this.$message.warning({ showClose: true, message: `${error}` });
} }
@ -537,7 +538,7 @@ export default {
handleSelectionChange(rows) { handleSelectionChange(rows) {
//this.multipleSelection = rows; //this.multipleSelection = rows;
//console.log('this.multipleSelection',this.multipleSelection)
//// console.log('this.multipleSelection',this.multipleSelection)
rows.forEach((item) => { rows.forEach((item) => {
item.highLightBg = "selected"; item.highLightBg = "selected";
@ -591,20 +592,20 @@ export default {
} else { } else {
// ctrl shift // ctrl shift
// //
console.log("清除所有选择");
// console.log("");
this.tableData.forEach((e, index) => { this.tableData.forEach((e, index) => {
e.choosed = false; e.choosed = false;
e.index = index; e.index = index;
}); });
console.log(this.tableData, row.index);
console.log(this.tableData[row.index].choosed);
// console.log(this.tableData, row.index);
// console.log(this.tableData[row.index].choosed);
this.tableData[row.index].choosed = true; this.tableData[row.index].choosed = true;
this.startPoint = row.index; this.startPoint = row.index;
} }
// //
console.log('row.index <= this.startPoint', row.index, this.startPoint)
// console.log('row.index <= this.startPoint', row.index, this.startPoint)
let lfind = -1 let lfind = -1
for (let i = 0; i < this.tableData.length; i++) { for (let i = 0; i < this.tableData.length; i++) {
if (this.tableData[i].choosed) { if (this.tableData[i].choosed) {
@ -653,7 +654,7 @@ export default {
// //
refreshRegister(patientRegister) { refreshRegister(patientRegister) {
console.log('编辑/新增的 form :', patientRegister)
// console.log('/ form :', patientRegister)
}, },
// //
@ -678,7 +679,7 @@ export default {
postapi('/api/app/patientregister/updatepatientregistercompleteflagormedicalstartdate', body) postapi('/api/app/patientregister/updatepatientregistercompleteflagormedicalstartdate', body)
.then(res => { .then(res => {
if (res.code != -1) { if (res.code != -1) {
console.log('操作成功!')
// console.log('')
patientRegisterIds.forEach(e => { patientRegisterIds.forEach(e => {
let lfind = arrayExistObj(this.tableData, 'id', e) let lfind = arrayExistObj(this.tableData, 'id', e)
if (lfind > -1) this.tableData[lfind].completeFlag = completeFlag if (lfind > -1) this.tableData[lfind].completeFlag = completeFlag
@ -697,7 +698,7 @@ export default {
this.$message.warning({ showClose: true, message: "请选择要操作的记录" }); this.$message.warning({ showClose: true, message: "请选择要操作的记录" });
return; return;
} }
//console.log(this.patientRegister.patientRegisterRd,this.tableData)
//// console.log(this.patientRegister.patientRegisterRd,this.tableData)
// //
this.dataTransOpts.refresh.patient_register.S++ //() this.dataTransOpts.refresh.patient_register.S++ //()
@ -717,7 +718,7 @@ export default {
if (!id) return if (!id) return
this.dataTransOpts.tableS.patient_register.id = id this.dataTransOpts.tableS.patient_register.id = id
let res = await postapi(`/api/app/patientregister/getinfoorpatient?PatientRegisterId=${this.dataTransOpts.tableS.patient_register.id}`)
let res = await postapi('/api/app/patientregister/getinfoorpatient', { patientRegisterId: this.dataTransOpts.tableS.patient_register.id })
if (res.code != 1) return if (res.code != 1) return
let currentRow = res.data let currentRow = res.data
@ -778,14 +779,14 @@ export default {
type: "warning", type: "warning",
}) })
.then(() => { .then(() => {
//console.log('{patientRegisterIds}',{patientRegisterIds})
return postapi(`/api/app/patient-register/delete-many`, {
//// console.log('{patientRegisterIds}',{patientRegisterIds})
return postapi(`/ api / app / patient - register / delete -many`, {
patientRegisterIds, patientRegisterIds,
}); });
}) })
.then((res) => { .then((res) => {
if (res.code != -1) { if (res.code != -1) {
console.log("操作成功");
// console.log("");
this.dataTransOpts.tableS.patient_register.id = '' this.dataTransOpts.tableS.patient_register.id = ''
setTimeout(() => { setTimeout(() => {
this.dataTransOpts.refresh.register_check_asbitem.M++ this.dataTransOpts.refresh.register_check_asbitem.M++
@ -827,14 +828,14 @@ export default {
async getPrList() { async getPrList() {
if (this.loadOpts.skipCount != 0 && this.loadOpts.skipCount * this.loadOpts.maxResultCount >= this.loadOpts.totalCount) return if (this.loadOpts.skipCount != 0 && this.loadOpts.skipCount * this.loadOpts.maxResultCount >= this.loadOpts.totalCount) return
console.log('getPrList', this.loadOpts)
// console.log('getPrList', this.loadOpts)
let body = { let body = {
skipCount: this.loadOpts.skipCount, skipCount: this.loadOpts.skipCount,
maxResultCount: this.loadOpts.maxResultCount maxResultCount: this.loadOpts.maxResultCount
}; };
console.log(`this.patientRegister.query`, this.patientRegister.query);
// console.log(`this.patientRegister.query`, this.patientRegister.query);
if (this.patientRegister.query.customerOrgFlag) { if (this.patientRegister.query.customerOrgFlag) {
// if (this.patientRegister.query.CustomerOrgParentId) { // if (this.patientRegister.query.CustomerOrgParentId) {
// body.customerOrgId = this.patientRegister.query.CustomerOrgParentId; // body.customerOrgId = this.patientRegister.query.CustomerOrgParentId;
@ -891,7 +892,7 @@ export default {
patientRegisterNo: this.patientRegister.query.patientRegisterNo, patientRegisterNo: this.patientRegister.query.patientRegisterNo,
}; };
console.log("/api/app/patientregister/getlistinfilter", body);
// console.log("/api/app/patientregister/getlistinfilter", body);
postapi("/api/app/patientregister/getlistinfilter", body) postapi("/api/app/patientregister/getlistinfilter", body)
.then(res => { .then(res => {
@ -924,13 +925,13 @@ export default {
// //
scrollFull() { scrollFull() {
this.dom = this.$refs['info'].bodyWrapper this.dom = this.$refs['info'].bodyWrapper
console.log('this.dom', this.dom)
// console.log('this.dom', this.dom)
this.dom.addEventListener('scroll', async () => { this.dom.addEventListener('scroll', async () => {
// console.log('scrollTop',this.dom.scrollTop,'clientHeight',this.dom.clientHeight,'scrollHeight',this.dom.scrollHeight);
// // console.log('scrollTop',this.dom.scrollTop,'clientHeight',this.dom.clientHeight,'scrollHeight',this.dom.scrollHeight);
if (this.dom.scrollTop + this.dom.clientHeight + 20 > this.dom.scrollHeight && !this.lazyLoading) { if (this.dom.scrollTop + this.dom.clientHeight + 20 > this.dom.scrollHeight && !this.lazyLoading) {
// //
console.log('scrollTop', this.dom.scrollTop, 'clientHeight', this.dom.clientHeight, 'scrollHeight', this.dom.scrollHeight);
// console.log('scrollTop', this.dom.scrollTop, 'clientHeight', this.dom.clientHeight, 'scrollHeight', this.dom.scrollHeight);
if ((Number(this.loadOpts.skipCount) + 1) * Number(this.loadOpts.maxResultCount) >= Number(this.loadOpts.totalCount)) { if ((Number(this.loadOpts.skipCount) + 1) * Number(this.loadOpts.maxResultCount) >= Number(this.loadOpts.totalCount)) {
this.lazyLoading = false this.lazyLoading = false
} else { } else {
@ -946,10 +947,10 @@ export default {
onCellRightClick(row, column) { onCellRightClick(row, column) {
this.rClickRow = { ...row }; // this.rClickRow = { ...row }; //
this.rClickColumn = { ...column }; // this.rClickColumn = { ...column }; //
console.log(row, column.property);
// console.log(row, column.property);
}, },
onContextmenu(event) { onContextmenu(event) {
//console.log('onContextmenu',event);
//// console.log('onContextmenu',event);
if (!this.rClickRow) return false; if (!this.rClickRow) return false;
let row = { ...this.rClickRow }; let row = { ...this.rClickRow };
let items = [] // let items = [] //
@ -1061,13 +1062,8 @@ export default {
} }
try { try {
res = await postapi(
`/api/app/lisrequest/setlisrequest?PatientRegisterId=${prId}`
);
console.log(
`/api/app/lisrequest/setlisrequest?PatientRegisterId=${prId}`,
res
);
res = await postapi(`/ api / app / lisrequest / setlisrequest ? PatientRegisterId = ${ prId }`);
// console.log(`/ api / app / lisrequest / setlisrequest ? PatientRegisterId = ${ prId }`,res);
} catch (error) { } catch (error) {
return; return;
} }
@ -1121,16 +1117,16 @@ export default {
BusinessCode: prId BusinessCode: prId
}; };
console.log('this.$peisAPI.print', toOutShell)
// console.log('this.$peisAPI.print', toOutShell)
if (isPreview) { if (isPreview) {
/* /*
postapi( postapi(
`/api/app/printreport/getlisrequestreport?PatientRegisterId=${prId}`
`/ api / app / printreport / getlisrequestreport ? PatientRegisterId = ${ prId }`
) )
.then((res) => { .then((res) => {
if (res.code != -1) { if (res.code != -1) {
toOutShell.ReportTable = { lisRequest: res.data }; toOutShell.ReportTable = { lisRequest: res.data };
console.log(
// console.log(
"JSON.stringify(toOutShell)", "JSON.stringify(toOutShell)",
JSON.stringify(toOutShell) JSON.stringify(toOutShell)
); );
@ -1143,25 +1139,25 @@ export default {
*/ */
this.$peisAPI.printPre(JSON.stringify(toOutShell)) this.$peisAPI.printPre(JSON.stringify(toOutShell))
.then(res => { .then(res => {
console.log('this.$peisAPI.printPre', res)
// console.log('this.$peisAPI.printPre', res)
if (JSON.parse(res).code < 0) { if (JSON.parse(res).code < 0) {
this.$message.warning({ showClose: true, message: JSON.parse(res).message }); this.$message.warning({ showClose: true, message: JSON.parse(res).message });
} }
}) })
.catch((err) => { .catch((err) => {
console.log('打印检验条码错误', err)
this.$message.warning({ showClose: true, message: `${err}` });
// console.log('', err)
this.$message.warning({ showClose: true, message: `${ err }` });
}); });
} else { } else {
/* /*
postapi( postapi(
`/api/app/printreport/getlisrequestreport?PatientRegisterId=${prId}`
`/ api / app / printreport / getlisrequestreport ? PatientRegisterId = ${ prId }`
) )
.then((res) => { .then((res) => {
if (res.code != -1) { if (res.code != -1) {
toOutShell.ReportTable = { lisRequest: res.data }; toOutShell.ReportTable = { lisRequest: res.data };
console.log(
// console.log(
"JSON.stringify(toOutShell)", "JSON.stringify(toOutShell)",
JSON.stringify(toOutShell) JSON.stringify(toOutShell)
); );
@ -1169,7 +1165,7 @@ export default {
} }
}) })
.then((res) => { .then((res) => {
//console.log("res", res);
//// console.log("res", res);
if (JSON.parse(res).code >= 0) { if (JSON.parse(res).code >= 0) {
// /api/app/lisrequest/updatelisrequestisprint // /api/app/lisrequest/updatelisrequestisprint
// { // {
@ -1200,12 +1196,12 @@ export default {
}) })
.then(res => { .then(res => {
if (res && res.code < 0) { if (res && res.code < 0) {
this.$message.error({ showClose: true, message: `${res.message}` });
this.$message.error({ showClose: true, message: `${ res.message }` });
} }
}) })
.catch((err) => { .catch((err) => {
console.log('打印检验条码错误', err)
this.$message.error({ showClose: true, message: `${err}` });
// console.log('', err)
this.$message.error({ showClose: true, message: `${ err }` });
}); });
} }
}, },
@ -1234,12 +1230,12 @@ export default {
if (isPreview) { if (isPreview) {
/* /*
postapi( postapi(
`/api/app/printreport/getpacsnoreport?PatientRegisterId=${prId}`
`/ api / app / printreport / getpacsnoreport ? PatientRegisterId = ${ prId }`
) )
.then((res) => { .then((res) => {
if (res.code != -1) { if (res.code != -1) {
toOutShell.ReportTable = { lisRequest: res.data }; toOutShell.ReportTable = { lisRequest: res.data };
console.log(
// console.log(
"JSON.stringify(toOutShell)", "JSON.stringify(toOutShell)",
JSON.stringify(toOutShell) JSON.stringify(toOutShell)
); );
@ -1257,18 +1253,18 @@ export default {
} }
}) })
.catch((err) => { .catch((err) => {
console.log('打印pacs条码错误', err)
this.$message.warning({ showClose: true, message: `${err}` });
// console.log('pacs', err)
this.$message.warning({ showClose: true, message: `${ err }` });
}); });
} else { } else {
/* /*
postapi( postapi(
`/api/app/printreport/getpacsnoreport?PatientRegisterId=${prId}`
`/ api / app / printreport / getpacsnoreport ? PatientRegisterId = ${ prId }`
) )
.then((res) => { .then((res) => {
if (res.code != -1) { if (res.code != -1) {
toOutShell.ReportTable = { lisRequest: res.data }; toOutShell.ReportTable = { lisRequest: res.data };
console.log(
// console.log(
"JSON.stringify(toOutShell)", "JSON.stringify(toOutShell)",
JSON.stringify(toOutShell) JSON.stringify(toOutShell)
); );
@ -1306,12 +1302,12 @@ export default {
}) })
.then(res => { .then(res => {
if (res && res.code < 0) { if (res && res.code < 0) {
this.$message.error({ showClose: true, message: `${res.message}` });
this.$message.error({ showClose: true, message: `${ res.message }` });
} }
}) })
.catch((err) => { .catch((err) => {
console.log('打印pacs条码错误', err)
this.$message.error({ showClose: true, message: `${err}` });
// console.log('pacs', err)
this.$message.error({ showClose: true, message: `${ err }` });
}); });
} }
}, },
@ -1324,7 +1320,7 @@ export default {
delay: 0, delay: 0,
// //
onChoose: function (/**Event*/ evt) { onChoose: function (/**Event*/ evt) {
//console.log('onChoose',evt,evt.oldIndex)
//// console.log('onChoose',evt,evt.oldIndex)
evt.oldIndex; // element index within parent evt.oldIndex; // element index within parent
}, },
@ -1335,7 +1331,7 @@ export default {
// //
onStart: function (/**Event*/ evt) { onStart: function (/**Event*/ evt) {
//console.log('onStart',evt,evt.oldIndex)
//// console.log('onStart',evt,evt.oldIndex)
evt.oldIndex; // element index within parent evt.oldIndex; // element index within parent
}, },
onEnd: (evt) => { onEnd: (evt) => {
@ -1344,7 +1340,7 @@ export default {
dropCol.splice(evt.oldIndex, 1); dropCol.splice(evt.oldIndex, 1);
dropCol.splice(evt.newIndex, 0, oldItem); dropCol.splice(evt.newIndex, 0, oldItem);
} }
//console.log(this.headerCols, oldItem, dropCol);
//// console.log(this.headerCols, oldItem, dropCol);
}, },
}); });
return dropCol; return dropCol;
@ -1357,7 +1353,7 @@ export default {
this.$nextTick(() => { this.$nextTick(() => {
let refsTable = this.$refs[elId] //.cloneNode(true) true let refsTable = this.$refs[elId] //.cloneNode(true) true
let table = document.getElementById(elId) let table = document.getElementById(elId)
console.log('table,refsTable', table, refsTable)
// console.log('table,refsTable', table, refsTable)
let tableData = table.innerHTML let tableData = table.innerHTML
let fileName = moment(new Date()).format('yyyyMMDDHHmmss') let fileName = moment(new Date()).format('yyyyMMDDHHmmss')
@ -1398,7 +1394,7 @@ export default {
// immediate: true, // // immediate: true, //
// deep: true, // // deep: true, //
handler(newVal, oldVal) { handler(newVal, oldVal) {
//console.log('watch:patientRegister.query.customerOrgId:',newVal,oldVal)
//// console.log('watch:patientRegister.query.customerOrgId:',newVal,oldVal)
// //
if (newVal && newVal != oldVal) { if (newVal && newVal != oldVal) {
this.tableData = [] this.tableData = []
@ -1418,7 +1414,7 @@ export default {
// //
// "patientRegister.patientRegisterRd.id"(newVal, oldVal) { // "patientRegister.patientRegisterRd.id"(newVal, oldVal) {
// if (newVal != oldVal) { // if (newVal != oldVal) {
// //console.log('patientRegister.patientRegisterRd.customerOrgId',this.patientRegister.patientRegisterRd.customerOrgId)
// //// console.log('patientRegister.patientRegisterRd.customerOrgId',this.patientRegister.patientRegisterRd.customerOrgId)
// objCopy(this.patientRegister.patientRegisterRd, this.form); // objCopy(this.patientRegister.patientRegisterRd, this.form);
// } // }
// }, // },

8
vue.config.js

@ -29,6 +29,14 @@ module.exports = defineConfig({
// } // }
}, },
}, },
},
terser: {
terserOptions: {
compress: {
drop_console: true,
drop_debugger: true
}
}
} }
// pages: { // pages: {
// index: { // index: {

Loading…
Cancel
Save