-
-
体检日期
-
+
+ 体检日期
+
-
-
+
-
+
-
+
-
-
+
+
-
+
-
+
-
+
-
-
+
+
-
+
-
+
@@ -320,16 +648,19 @@ import moment from "moment";
import { mapState, mapActions } from "vuex";
import { getapi, postapi, putapi, deletapi } from "@/api/api";
import Sortable from "sortablejs";
-import FileSaver from 'file-saver';
-import html2canvas from 'html2canvas';
+import FileSaver from "file-saver";
+import html2canvas from "html2canvas";
+import JsonExcel from "vue-json-excel";
import {
- getPagePriv, checkPagePriv,
+ getPagePriv,
+ checkPagePriv,
dddw,
objCopy,
arrayReduce,
arrayExistObj,
- deepCopy, setPrStatusColor
+ deepCopy,
+ setPrStatusColor,
} from "../../utlis/proFunc";
import { savePeoplePhoto } from "../../utlis/proApi";
@@ -357,12 +688,13 @@ export default {
LocalConfig,
ImportOrgData,
Queue,
+ DownloadExcel: JsonExcel,
},
data() {
return {
pagePriv: {
- routeUrlorPageName: 'patientRegister', //当前页面归属路由或归属页面权限名称
- privs: [] // 页面权限
+ routeUrlorPageName: "patientRegister", //当前页面归属路由或归属页面权限名称
+ privs: [], // 页面权限
},
peisid: null,
startPoint: -1, // 多选起点 -1 表示选择
@@ -381,41 +713,111 @@ export default {
rClickRow: null, //右击的行
rClickColumn: null, //右击的列(预留)
- dragColDesign: [], // 待调整的排序的序
+ dragColDesign: [], // 待调整的排序的序
//拖动列
dragCol: [
{ label: "序号", prop: "sn", minWidth: 40, align: "center" },
- { label: "体检进度", prop: "completeFlag", minWidth: 80, align: "center" },
- { label: "打印", prop: "guidePrintTimes", minWidth: 55, align: "center" },
+ {
+ label: "体检进度",
+ prop: "completeFlag",
+ minWidth: 80,
+ align: "center",
+ },
+ {
+ label: "打印",
+ prop: "guidePrintTimes",
+ minWidth: 55,
+ align: "center",
+ },
{ label: "锁住", prop: "isLock", minWidth: 55, align: "center" },
- { label: "单位", prop: "customerOrgParentName", minWidth: 180, align: "center" },
- { label: "部门", prop: "customerOrgName", minWidth: 120, align: "center" },
+ {
+ label: "单位",
+ prop: "customerOrgParentName",
+ minWidth: 180,
+ align: "center",
+ },
+ {
+ label: "部门",
+ prop: "customerOrgName",
+ minWidth: 120,
+ align: "center",
+ },
{ label: "姓名", prop: "patientName", minWidth: 80, align: "center" },
{ label: "性别", prop: "sexId", minWidth: 55, align: "center" },
{ label: "年龄", prop: "age", minWidth: 55, align: "center" },
- { label: "条码号", prop: "patientRegisterNo", minWidth: 150, align: "center" },
+ {
+ label: "条码号",
+ prop: "patientRegisterNo",
+ minWidth: 150,
+ align: "center",
+ },
{ label: "档案号", prop: "patientNo", minWidth: 100, align: "center" },
- { label: "体检次数", prop: "medicalTimes", minWidth: 80, align: "center" },
- { label: "分组/套餐", prop: "groupPack", minWidth: 150, align: "center" },
+ {
+ label: "体检次数",
+ prop: "medicalTimes",
+ minWidth: 80,
+ align: "center",
+ },
+ {
+ label: "分组/套餐",
+ prop: "groupPack",
+ minWidth: 150,
+ align: "center",
+ },
{ label: "民族", prop: "nationId", minWidth: 55, align: "center" },
{ label: "身份证", prop: "idNo", minWidth: 160, align: "center" },
{ label: "出生日期", prop: "birthDate", minWidth: 80, align: "center" },
{ label: "邮箱", prop: "email", minWidth: 150, align: "center" },
- { label: "手机", prop: "mobileTelephone", minWidth: 130, align: "center" },
+ {
+ label: "手机",
+ prop: "mobileTelephone",
+ minWidth: 130,
+ align: "center",
+ },
{ label: "电话", prop: "telephone", minWidth: 130, align: "center" },
{ label: "地址", prop: "address", minWidth: 400, align: "" },
- { label: "体检卡号", prop: "medicalCardNo", minWidth: 80, align: "center" },
+ {
+ label: "体检卡号",
+ prop: "medicalCardNo",
+ minWidth: 80,
+ align: "center",
+ },
{ label: "工卡号", prop: "jobCardNo", minWidth: 80, align: "center" },
- { label: "婚姻状况", prop: "maritalStatusId", minWidth: 80, align: "center" },
- { label: "体检类别", prop: "medicalTypeId", minWidth: 80, align: "center" },
- { label: "人员类别", prop: "personnelTypeId", minWidth: 80, align: "center" },
+ {
+ label: "婚姻状况",
+ prop: "maritalStatusId",
+ minWidth: 80,
+ align: "center",
+ },
+ {
+ label: "体检类别",
+ prop: "medicalTypeId",
+ minWidth: 80,
+ align: "center",
+ },
+ {
+ label: "人员类别",
+ prop: "personnelTypeId",
+ minWidth: 80,
+ align: "center",
+ },
{ label: "职务", prop: "jobPost", minWidth: 200, align: "center" },
{ label: "职称", prop: "jobTitle", minWidth: 80, align: "center" },
{ label: "介绍人", prop: "salesman", minWidth: 80, align: "center" },
{ label: "是否VIP", prop: "isVip", minWidth: 80, align: "center" },
{ label: "登记人", prop: "creatorName", minWidth: 80, align: "center" },
- { label: "登记日期", prop: "creationTime", minWidth: 140, align: "center" },
- { label: "体检日期", prop: "medicalStartDate", minWidth: 140, align: "center" },
+ {
+ label: "登记日期",
+ prop: "creationTime",
+ minWidth: 140,
+ align: "center",
+ },
+ {
+ label: "体检日期",
+ prop: "medicalStartDate",
+ minWidth: 140,
+ align: "center",
+ },
{ label: "是否上传", prop: "isUpload", minWidth: 80, align: "center" },
{ label: "高原/健康", prop: "qztlType", minWidth: 90, align: "center" },
{ label: "行车", prop: "qztlIsMain", minWidth: 50, align: "center" },
@@ -426,8 +828,8 @@ export default {
{ label: "复检", prop: "qztlIsFj", minWidth: 50, align: "center" },
],
dialogColSort: false,
-
- dom: null, //用于滚动加载数据
+ jsonFields: {},
+ dom: null, //用于滚动加载数据
// lazyLoading: false, //是否懒加载中
loadOpts: {
totalCount: 0,
@@ -442,44 +844,53 @@ export default {
value: "",
colName: "patientName",
patientRegisterId: "",
- medicalStartDate: '', // 体检日期
+ medicalStartDate: "", // 体检日期
},
dialogEditMedicalStartDate: false, // 修改体检日期
queueParams: {}, // 分诊排队参数
LocalConfig: {
normal: {
- maxResultCount: 100, //分页时单页记录数
+ maxResultCount: 100, //分页时单页记录数
},
},
LocalConfigInit: {},
+ tableName:""//导出人员列表表名
};
},
created() {
//获取用户当前页面的权限
- let userPriv = window.sessionStorage.getItem('userPriv')
- if (userPriv) this.pagePriv.privs = deepCopy(getPagePriv(this.pagePriv.routeUrlorPageName))
-
- this.LocalConfigInit = deepCopy(this.LocalConfig)
- let LocalConfig = window.localStorage.getItem("LocalConfig") || null
+ let userPriv = window.sessionStorage.getItem("userPriv");
+ if (userPriv)
+ this.pagePriv.privs = deepCopy(
+ getPagePriv(this.pagePriv.routeUrlorPageName)
+ );
+
+ this.LocalConfigInit = deepCopy(this.LocalConfig);
+ let LocalConfig = window.localStorage.getItem("LocalConfig") || null;
// console.log('LocalConfig',LocalConfig)
try {
- this.LocalConfig = Object.assign({}, deepCopy(this.LocalConfigInit), JSON.parse(LocalConfig) || {})
+ this.LocalConfig = Object.assign(
+ {},
+ deepCopy(this.LocalConfigInit),
+ JSON.parse(LocalConfig) || {}
+ );
} catch (error) {
- console.log('window.localStorage.getItem("LocalConfig")', error)
+ console.log('window.localStorage.getItem("LocalConfig")', error);
}
// console.log('this.LocalConfig',this.LocalConfig)
- this.loadOpts.maxResultCount = Number(this.LocalConfig.normal.maxResultCount || 100)
-
- this.loadOptsInit = Object.assign({}, this.loadOpts)
+ this.loadOpts.maxResultCount = Number(
+ this.LocalConfig.normal.maxResultCount || 100
+ );
+ this.loadOptsInit = Object.assign({}, this.loadOpts);
},
//挂载完成
mounted() {
this.quickAsb = this.dict.asbItemAll;
- this.peisid = window.sessionStorage.getItem('peisid');
+ this.peisid = window.sessionStorage.getItem("peisid");
// if(this.$refs.info){
// this.$nextTick(() => {
// this.scrollFull()
@@ -500,7 +911,11 @@ export default {
},
methods: {
...mapActions(["getCustomerOrgGroup", "getPatientRegisterAbs"]),
- moment, dddw, deepCopy, checkPagePriv, setPrStatusColor,
+ moment,
+ dddw,
+ deepCopy,
+ checkPagePriv,
+ setPrStatusColor,
// 扩展定义表格行样式
handleRowClassName({ row, rowIndex }) {
@@ -521,18 +936,17 @@ export default {
});
},
-
-
-
refFuncSetData(item, v) {
- setData(this, item, v)
+ setData(this, item, v);
},
// 打印指引单(isPreview)
async guidePrint(ReportCode, isPreview) {
-
if (!this.$peisAPI) {
- this.$message.info({ showClose: true, message: "此功能,需要在壳客户端才可运行!" });
+ this.$message.info({
+ showClose: true,
+ message: "此功能,需要在壳客户端才可运行!",
+ });
return;
}
let token = window.sessionStorage.getItem("token");
@@ -540,13 +954,13 @@ export default {
let toOutShell = {
ReportCode,
token,
- isBuildImage: 'N',
- IsUploadPdf: 'N',
+ isBuildImage: "N",
+ IsUploadPdf: "N",
preViewCanPrint: "N",
Parameters: [
{ Name: "printer", Value: user },
{ Name: "hisLog", Value: "pic/hisLog.jpg" },
- { Name: 'pageFooter', Value: 'pic/peisQrCode.jpg' },
+ { Name: "pageFooter", Value: "pic/peisQrCode.jpg" },
],
};
let lfind = -1;
@@ -561,7 +975,10 @@ export default {
//选中(取消勾选) end -------------------------
if (this.multipleSelection.length < 1) {
- this.$message.info({ showClose: true, message: "请勾选要打印指引单的人员记录!" });
+ this.$message.info({
+ showClose: true,
+ message: "请勾选要打印指引单的人员记录!",
+ });
return;
}
@@ -592,50 +1009,62 @@ export default {
this.$message.warning({ showClose: true, message: err });
});
*/
- toOutShell.BusinessCode = this.multipleSelection[0].id
- if (this.multipleSelection[0].completeFlag == '0') {
- this.$message.warning({ showClose: true, message: '预登记人员,不可执行此操作!' })
- return
+ toOutShell.BusinessCode = this.multipleSelection[0].id;
+ if (this.multipleSelection[0].completeFlag == "0") {
+ this.$message.warning({
+ showClose: true,
+ message: "预登记人员,不可执行此操作!",
+ });
+ return;
}
- this.$peisAPI.printPre(JSON.stringify(toOutShell))
- .then(res => {
+ this.$peisAPI
+ .printPre(JSON.stringify(toOutShell))
+ .then((res) => {
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) => {
// console.log('打印指引单', err)
this.$message.warning({ showClose: true, message: `${err}` });
});
-
} else {
-
this.elProgress.display = true;
this.elProgress.percentage = 0;
for (let i = 0; i < this.multipleSelection.length; i++) {
try {
-
- let patientregisterId = this.multipleSelection[i].id
- if (this.multipleSelection[i].completeFlag == '0') {
- this.$message.warning({ showClose: true, message: `${this.multipleSelection[i].patientName} 为预登记人员,不可打印指引单` });
- continue
+ let patientregisterId = this.multipleSelection[i].id;
+ if (this.multipleSelection[i].completeFlag == "0") {
+ this.$message.warning({
+ showClose: true,
+ message: `${this.multipleSelection[i].patientName} 为预登记人员,不可打印指引单`,
+ });
+ continue;
}
- toOutShell.BusinessCode = patientregisterId
- let resPeisAPI = await this.$peisAPI.print(JSON.stringify(toOutShell));
- if (JSON.parse(resPeisAPI).code < 0) continue
- let resPrintTimes = await postapi("/api/app/patientregister/updatepatientregisterguideprinttimesmany", [patientregisterId]);
- if (resPrintTimes.code == -1) continue
+ toOutShell.BusinessCode = patientregisterId;
+ let resPeisAPI = await this.$peisAPI.print(
+ JSON.stringify(toOutShell)
+ );
+ if (JSON.parse(resPeisAPI).code < 0) continue;
+ let resPrintTimes = await postapi(
+ "/api/app/patientregister/updatepatientregisterguideprinttimesmany",
+ [patientregisterId]
+ );
+ if (resPrintTimes.code == -1) continue;
lfind = arrayExistObj(this.tableData, "id", patientregisterId);
if (lfind > -1) {
if (this.tableData[lfind].guidePrintTimes) {
- this.tableData[lfind].guidePrintTimes = Number(this.tableData[lfind].guidePrintTimes) + 1;
+ this.tableData[lfind].guidePrintTimes =
+ Number(this.tableData[lfind].guidePrintTimes) + 1;
} else {
this.tableData[lfind].guidePrintTimes = 1;
}
}
-
} catch (error) {
// console.log('打印指引单', error)
this.$message.warning({ showClose: true, message: `${error}` });
@@ -649,98 +1078,103 @@ export default {
}
},
- // 指引单新打印方式,promise
+ // 指引单新打印方式,promise
guidePrintPromise(ReportCode, isPreview, row) {
return new Promise((resolve, reject) => {
- if (!this.$peisAPI) reject("此功能,需要在壳客户端才可运行!")
-
+ if (!this.$peisAPI) reject("此功能,需要在壳客户端才可运行!");
let token = window.sessionStorage.getItem("token");
let user = window.sessionStorage.getItem("user");
let toOutShell = {
ReportCode,
token,
- isBuildImage: 'N',
- IsUploadPdf: 'N',
+ isBuildImage: "N",
+ IsUploadPdf: "N",
preViewCanPrint: "N",
Parameters: [
{ Name: "printer", Value: user },
{ Name: "hisLog", Value: "pic/hisLog.jpg" },
- { Name: 'pageFooter', Value: 'pic/peisQrCode.jpg' },
+ { Name: "pageFooter", Value: "pic/peisQrCode.jpg" },
],
};
- if (!row.completeFlag || row.completeFlag == '0') reject('预登记人员,不可执行此操作!')
- toOutShell.BusinessCode = row.id
- console.log(JSON.stringify(toOutShell))
+ if (!row.completeFlag || row.completeFlag == "0")
+ reject("预登记人员,不可执行此操作!");
+ toOutShell.BusinessCode = row.id;
+ console.log(JSON.stringify(toOutShell));
if (isPreview) {
- this.$peisAPI.printPre(JSON.stringify(toOutShell))
- .then(res => {
- let lres = JSON.parse(res)
+ this.$peisAPI
+ .printPre(JSON.stringify(toOutShell))
+ .then((res) => {
+ let lres = JSON.parse(res);
if (lres.code > -1) {
- resolve(lres)
+ resolve(lres);
} else {
- reject(lres.message)
+ reject(lres.message);
}
})
.catch((err) => {
- reject(err)
+ reject(err);
});
} else {
- this.$peisAPI.print(JSON.stringify(toOutShell))
- .then(res => {
- let lres = JSON.parse(res)
+ this.$peisAPI
+ .print(JSON.stringify(toOutShell))
+ .then((res) => {
+ let lres = JSON.parse(res);
if (lres.code > -1) {
- return postapi("/api/app/patientregister/updatepatientregisterguideprinttimesmany", [row.id]);
+ return postapi(
+ "/api/app/patientregister/updatepatientregisterguideprinttimesmany",
+ [row.id]
+ );
} else {
- reject(lres.message)
+ reject(lres.message);
}
})
- .then(res => {
+ .then((res) => {
if (res && res.code > -1) {
let lfind = arrayExistObj(this.tableData, "id", row.id);
if (lfind > -1) {
if (this.tableData[lfind].guidePrintTimes) {
- this.tableData[lfind].guidePrintTimes = Number(this.tableData[lfind].guidePrintTimes) + 1;
+ this.tableData[lfind].guidePrintTimes =
+ Number(this.tableData[lfind].guidePrintTimes) + 1;
} else {
this.tableData[lfind].guidePrintTimes = 1;
}
}
}
- resolve(res)
+ resolve(res);
})
.catch((err) => {
- reject(err)
+ reject(err);
});
}
- })
+ });
},
-
-
printGuideLisPacs(row) {
return new Promise((resolve, reject) => {
this.guidePrintPromise("0008", false, row)
- .then(res => {
- return this.lisPrint(row, "0002", false)
- })
- .then(res => {
- return this.pacsPrint(row, "0004", false)
+ .then((res) => {
+ return this.lisPrint(row, "0002", false);
})
- .then(res => {
- resolve(res)
+ .then((res) => {
+ return this.pacsPrint(row, "0004", false);
})
- .catch(err => {
- reject(err)
+ .then((res) => {
+ resolve(res);
})
- })
+ .catch((err) => {
+ reject(err);
+ });
+ });
},
-
async printPromise() {
-
if (this.multipleSelection.length < 1) {
- this.$message.info({ showClose: true, message: "请勾选要打印人员检验检查条码的记录!" });
+ this.$message.info({
+ showClose: true,
+ message: "请勾选要打印人员检验检查条码的记录!",
+ });
return;
}
@@ -748,11 +1182,11 @@ export default {
this.elProgress.percentage = 0;
for (let i = 0; i < this.multipleSelection.length; i++) {
- let row = this.multipleSelection[i]
+ let row = this.multipleSelection[i];
try {
- await this.printGuideLisPacs(row)
+ await this.printGuideLisPacs(row);
} catch (error) {
- console.log('printPromise', error)
+ console.log("printPromise", error);
}
this.elProgress.percentage = Math.floor(
@@ -762,8 +1196,6 @@ export default {
this.elProgress.display = false;
},
-
-
handleSelectionChange(rows) {
//this.multipleSelection = rows;
//// console.log('this.multipleSelection',this.multipleSelection)
@@ -781,9 +1213,10 @@ export default {
//设置新增/编辑的form数据
setForm(formData) {
- this.patientRegister.patientRegisterRd = deepCopy(formData)
+ this.patientRegister.patientRegisterRd = deepCopy(formData);
if (!this.patientRegister.patientRegisterRd.id) {
- this.patientRegister.patientRegisterRd.customerOrgId = this.patientRegister.query.customerOrgId
+ this.patientRegister.patientRegisterRd.customerOrgId =
+ this.patientRegister.query.customerOrgId;
}
},
@@ -843,26 +1276,27 @@ export default {
// if (lfind > -1) {
// 弹出编辑框,只有在编辑框显示时,才去触发获取数据
- this.dataTransOpts.tableS.patient_register = deepCopy(row)
- this.tableDataCurrentRow = deepCopy(row)
- this.dataTransOpts.refresh.register_check_asbitem.M++ //触发所选组合项目刷新
+ this.dataTransOpts.tableS.patient_register = deepCopy(row);
+ this.tableDataCurrentRow = deepCopy(row);
+ this.dataTransOpts.refresh.register_check_asbitem.M++; //触发所选组合项目刷新
// }
},
// 导入企业(青藏公司)数据
btnImportOrgData() {
-
//
- this.dataTransOpts.plus.ImportOrgData++
- this.dialogWin.ImportOrgData = true
-
+ this.dataTransOpts.plus.ImportOrgData++;
+ this.dialogWin.ImportOrgData = true;
},
//体检次数 相关操作
btnAdd() {
- if (!this.peisid || this.peisid == 'null') {
- this.$message.warning({ showClose: true, message: "该用户未选归属体检中心,不能执行此操作!" });
- return
+ if (!this.peisid || this.peisid == "null") {
+ this.$message.warning({
+ showClose: true,
+ message: "该用户未选归属体检中心,不能执行此操作!",
+ });
+ return;
}
let customerOrgId = this.patientRegister.query.customerOrgId;
@@ -872,25 +1306,24 @@ export default {
}
// this.patientRegister.patientRegisterRdInit.customerOrgId = customerOrgId
- // this.setForm(this.patientRegister.patientRegisterRdInit)
+ // this.setForm(this.patientRegister.patientRegisterRdInit)
// this.patientRegister.patientRegisterAbs = [];
// this.patientRegister.patientRegisterRd.id = ''
// this.dialogWin.PatientRegisterEdit = true;
// this.editTimes++; //触发表单窗口,数据更新
// this.getPatientRegisterAbs();
- this.dataTransOpts.tableS.patient_register.id = ''
+ this.dataTransOpts.tableS.patient_register.id = "";
this.dialogWin.PatientRegisterEdit = true;
- this.dataTransOpts.plus.clearPatientRegisterQuery++ //触发清空人员登记界面的查询条件
+ this.dataTransOpts.plus.clearPatientRegisterQuery++; //触发清空人员登记界面的查询条件
setTimeout(() => {
- this.dataTransOpts.refresh.patient_register.S++ //触发人员信息刷新
+ this.dataTransOpts.refresh.patient_register.S++; //触发人员信息刷新
}, 10);
-
},
//批量正式登记
btnAddBatch(completeFlag) {
- let patientRegisterIds = []
+ let patientRegisterIds = [];
//取消勾选,换成选择的方式 start
// this.multipleSelection = [];
// this.tableData.forEach((e) => {
@@ -901,19 +1334,20 @@ export default {
// });
//取消勾选,换成选择的方式 end
-
if (this.multipleSelection.length < 1) {
- this.$message.info({ showClose: true, message: "请勾选要操作的记录!" });
+ this.$message.info({
+ showClose: true,
+ message: "请勾选要操作的记录!",
+ });
return;
}
-
- this.multipleSelection.forEach(e => {
+ this.multipleSelection.forEach((e) => {
switch (completeFlag) {
- case '0':
- if (e.completeFlag == '1') patientRegisterIds.push(e.id)
+ case "0":
+ if (e.completeFlag == "1") patientRegisterIds.push(e.id);
break;
- case '1':
- if (e.completeFlag == '0') patientRegisterIds.push(e.id)
+ case "1":
+ if (e.completeFlag == "0") patientRegisterIds.push(e.id);
break;
}
});
@@ -922,18 +1356,21 @@ export default {
this.$message.info({ showClose: true, message: "没有可操作的数据!" });
return;
}
- let body = { completeFlag, patientRegisterIds }
- postapi('/api/app/patientregister/updatepatientregistercompleteflagormedicalstartdate', body)
- .then(res => {
+ let body = { completeFlag, patientRegisterIds };
+ postapi(
+ "/api/app/patientregister/updatepatientregistercompleteflagormedicalstartdate",
+ body
+ )
+ .then((res) => {
if (res.code != -1) {
// console.log('操作成功!')
- patientRegisterIds.forEach(e => {
- let lfind = arrayExistObj(this.tableData, 'id', e)
- if (lfind > -1) this.tableData[lfind].completeFlag = completeFlag
+ patientRegisterIds.forEach((e) => {
+ let lfind = arrayExistObj(this.tableData, "id", e);
+ if (lfind > -1) this.tableData[lfind].completeFlag = completeFlag;
});
}
})
- .catch(err => {
+ .catch((err) => {
this.$message.error({ showClose: true, message: `操作失败 ${err}` });
});
},
@@ -942,56 +1379,68 @@ export default {
btnEdit() {
// if (!this.patientRegister.patientRegisterRd.id) {
if (!this.dataTransOpts.tableS.patient_register.id) {
- this.$message.warning({ showClose: true, message: "请选择要操作的记录" });
+ this.$message.warning({
+ showClose: true,
+ message: "请选择要操作的记录",
+ });
return;
}
//// console.log(this.patientRegister.patientRegisterRd,this.tableData)
// 触发数据刷新
- this.dataTransOpts.refresh.patient_register.S++ //触发人员信息刷新(会同时刷新组合项目)
- this.dataTransOpts.plus.clearPatientRegisterQuery++ //触发清空人员登记界面的查询条件
+ this.dataTransOpts.refresh.patient_register.S++; //触发人员信息刷新(会同时刷新组合项目)
+ this.dataTransOpts.plus.clearPatientRegisterQuery++; //触发清空人员登记界面的查询条件
this.dialogWin.PatientRegisterEdit = true;
-
},
//新增或编辑后选中记录
async close_dialogWin_PatientRegisterEdit() {
// 如果 dataTransOpts.tableS.patient_register.id 为空(未增加),则不做处理
- let id = this.dataTransOpts.tableS.patient_register.id
+ let id = this.dataTransOpts.tableS.patient_register.id;
if (!id) {
- id = this.tableDataCurrentRow.id
+ id = this.tableDataCurrentRow.id;
}
- if (!id) return
- this.dataTransOpts.tableS.patient_register.id = id
+ if (!id) return;
+ this.dataTransOpts.tableS.patient_register.id = id;
- let res = await postapi('/api/app/patientregister/getlistinfilter', { patientRegisterNo: this.dataTransOpts.tableS.patient_register.patientRegisterNo })
- if (res.code != 1) return
- let currentRow = res.data.items[0]
+ let res = await postapi("/api/app/patientregister/getlistinfilter", {
+ patientRegisterNo:
+ this.dataTransOpts.tableS.patient_register.patientRegisterNo,
+ });
+ if (res.code != 1) return;
+ let currentRow = res.data.items[0];
// this.tableData.forEach(e => {
// e.choosed = false
- // });
- let lfind = arrayExistObj(this.tableData, 'id', this.dataTransOpts.tableS.patient_register.id)
+ // });
+ let lfind = arrayExistObj(
+ this.tableData,
+ "id",
+ this.dataTransOpts.tableS.patient_register.id
+ );
if (lfind > -1) {
- objCopy(currentRow, this.tableData[lfind])
+ objCopy(currentRow, this.tableData[lfind]);
} else {
- lfind = this.tableData.length
- currentRow.index = lfind
- currentRow.choosed = true
- this.tableData.push(currentRow)
+ lfind = this.tableData.length;
+ currentRow.index = lfind;
+ currentRow.choosed = true;
+ this.tableData.push(currentRow);
}
// 刷新 register_check_asbitem 表记录
if (lfind > -1) {
- this.dataTransOpts.refresh.register_check_asbitem.M++
+ this.dataTransOpts.refresh.register_check_asbitem.M++;
}
},
//拍照
openCamera() {
if (!this.patientRegister.patientRegisterId) {
- this.$message.warning({ showClose: true, message: "请选择要操作的记录" });
+ this.$message.warning({
+ showClose: true,
+ message: "请选择要操作的记录",
+ });
return;
}
this.patientRegister.cameraVisble = true;
@@ -1000,7 +1449,6 @@ export default {
//删除(可批量删除)
// /api/app/patient-register/many?PatientRegisterIds=3a0c2cac-f44c-f407-9504-c1fc5e80a159&PatientRegisterIds=3a0c2cb3-d10c-ed70-db6a-b835e75ce641
btnDel() {
-
//选中(取消勾选)start -------------------------
// this.multipleSelection = []
// this.tableData.forEach(e => {
@@ -1011,7 +1459,10 @@ export default {
//选中(取消勾选) end -------------------------
if (this.multipleSelection.length < 1) {
- this.$message.warning({ showClose: true, message: "请先勾选要操作的记录" });
+ this.$message.warning({
+ showClose: true,
+ message: "请先勾选要操作的记录",
+ });
return;
}
@@ -1027,18 +1478,18 @@ export default {
})
.then(() => {
//// console.log('{patientRegisterIds}',{patientRegisterIds})
- return postapi('/api/app/patient-register/delete-many', {
+ return postapi("/api/app/patient-register/delete-many", {
patientRegisterIds,
});
})
.then((res) => {
if (res.code != -1) {
// console.log("操作成功");
- this.dataTransOpts.tableS.patient_register.id = ''
+ this.dataTransOpts.tableS.patient_register.id = "";
setTimeout(() => {
- this.dataTransOpts.refresh.register_check_asbitem.M++
+ this.dataTransOpts.refresh.register_check_asbitem.M++;
}, 10);
- arrayReduce(this.tableData, this.multipleSelection, 'id=id') //清除列表记录
+ arrayReduce(this.tableData, this.multipleSelection, "id=id"); //清除列表记录
// this.setForm(this.patientRegister.patientRegisterRdInit)
// this.getPatientRegisterAbs();
}
@@ -1050,39 +1501,47 @@ export default {
});
},
-
//查询
async Query() {
// 查询时,清掉明细数据 (滚动时不清)
- this.dataTransOpts.tableS.patient_register.id = ''
- this.tableDataCurrentRow = {} // 清除选择
- if(!(this.patientRegister.query.isSeries == 'Y' && this.patientRegister.query.patientRegisterNo)){
- this.tableData = []
+ this.dataTransOpts.tableS.patient_register.id = "";
+ this.tableDataCurrentRow = {}; // 清除选择
+ if (
+ !(
+ this.patientRegister.query.isSeries == "Y" &&
+ this.patientRegister.query.patientRegisterNo
+ )
+ ) {
+ this.tableData = [];
}
setTimeout(() => {
- this.dataTransOpts.refresh.register_check_asbitem.M++ //触发所选组合项目刷新
+ this.dataTransOpts.refresh.register_check_asbitem.M++; //触发所选组合项目刷新
}, 10);
- this.loadOpts = Object.assign(this.loadOpts, this.loadOptsInit)
- await this.getPrList()
+ this.loadOpts = Object.assign(this.loadOpts, this.loadOptsInit);
+ await this.getPrList();
},
//数据量多时,滚动加载
async load() {
- this.loadOpts.skipCount++
- await this.getPrList()
+ this.loadOpts.skipCount++;
+ await this.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)
let body = {
skipCount: this.loadOpts.skipCount,
- maxResultCount: this.loadOpts.maxResultCount
+ maxResultCount: this.loadOpts.maxResultCount,
};
// console.log(`this.patientRegister.query`, this.patientRegister.query);
@@ -1093,14 +1552,18 @@ export default {
// if (this.patientRegister.query.customerOrgId)
// body.customerOrgId = this.patientRegister.query.customerOrgId;
// }
- if (this.patientRegister.query.customerOrgId) body.customerOrgId = this.patientRegister.query.customerOrgId;
- if (this.patientRegister.query.customerOrgId
- && this.patientRegister.query.customerOrgId != this.dict.personOrgId
- && this.patientRegister.query.customerOrgRegister.id) {
- body.customerOrgRegisterId = this.patientRegister.query.customerOrgRegister.id
- body.customerOrgGroupIds = this.patientRegister.query.customerOrgGroupIds
+ if (this.patientRegister.query.customerOrgId)
+ body.customerOrgId = this.patientRegister.query.customerOrgId;
+ if (
+ this.patientRegister.query.customerOrgId &&
+ this.patientRegister.query.customerOrgId != this.dict.personOrgId &&
+ this.patientRegister.query.customerOrgRegister.id
+ ) {
+ body.customerOrgRegisterId =
+ this.patientRegister.query.customerOrgRegister.id;
+ body.customerOrgGroupIds =
+ this.patientRegister.query.customerOrgGroupIds;
}
-
}
if (this.patientRegister.query.sex)
@@ -1109,10 +1572,16 @@ export default {
if (this.patientRegister.query.patientName)
body.patientName = this.patientRegister.query.patientName;
- if (this.patientRegister.query.medicalTypeIds && this.patientRegister.query.medicalTypeIds.length > 0)
+ if (
+ this.patientRegister.query.medicalTypeIds &&
+ this.patientRegister.query.medicalTypeIds.length > 0
+ )
body.medicalTypeIds = this.patientRegister.query.medicalTypeIds;
- if (this.patientRegister.query.completeFlags && this.patientRegister.query.completeFlags.length > 0)
+ if (
+ this.patientRegister.query.completeFlags &&
+ this.patientRegister.query.completeFlags.length > 0
+ )
body.completeFlags = this.patientRegister.query.completeFlags;
//StartDate EndDate
@@ -1120,7 +1589,7 @@ export default {
this.patientRegister.query.startDate &&
this.patientRegister.query.endDate
) {
- body.dateType = this.patientRegister.query.dateType
+ body.dateType = this.patientRegister.query.dateType;
body.startDate = moment(this.patientRegister.query.startDate).format(
"yyyy-MM-DD"
);
@@ -1128,7 +1597,10 @@ export default {
"yyyy-MM-DD"
);
if (body.startDate > body.endDate) {
- this.$message.warning({ showClose: true, message: "起始日期不能大于截止日期,数据校验不通过!" });
+ this.$message.warning({
+ showClose: true,
+ message: "起始日期不能大于截止日期,数据校验不通过!",
+ });
return;
}
}
@@ -1140,18 +1612,21 @@ export default {
body.idNo = this.patientRegister.query.idCardNo;
try {
- let sysParmId = "patient_register_query_idno"
- let sysParam = await postapi('/api/app/SysParmValue/GetSysParmValueBySysParmId', { sysParmId })
+ let sysParmId = "patient_register_query_idno";
+ let sysParam = await postapi(
+ "/api/app/SysParmValue/GetSysParmValueBySysParmId",
+ { sysParmId }
+ );
// console.log('sysParam', sysParam)
- if (sysParam.data != 'N') {
+ if (sysParam.data != "N") {
body = {
idNo: this.patientRegister.query.idCardNo,
skipCount: this.loadOpts.skipCount,
- maxResultCount: this.loadOpts.maxResultCount
+ maxResultCount: this.loadOpts.maxResultCount,
};
}
} catch (error) {
- console.log(error)
+ console.log(error);
}
}
@@ -1159,58 +1634,71 @@ export default {
body = {
patientNo: this.patientRegister.query.patientNo,
skipCount: this.loadOpts.skipCount,
- maxResultCount: this.loadOpts.maxResultCount
+ maxResultCount: this.loadOpts.maxResultCount,
};
if (this.patientRegister.query.patientRegisterNo)
body = {
patientRegisterNo: this.patientRegister.query.patientRegisterNo,
skipCount: this.loadOpts.skipCount,
- maxResultCount: this.loadOpts.maxResultCount
+ maxResultCount: this.loadOpts.maxResultCount,
};
// console.log("/api/app/patientregister/getlistinfilter", body);
- let upPhoto = "patient_register_read_idno_upPhoto" // 是否读身份证查询更新照片
- let upPhotoParam = await postapi('/api/app/SysParmValue/GetSysParmValueBySysParmId', { sysParmId: upPhoto })
- let photo = this.patientRegister.photo
- this.patientRegister.photo = ''
-
- postapi("/api/app/patientregister/getlistinfilter", body)
- .then(async (res) => {
+ let upPhoto = "patient_register_read_idno_upPhoto"; // 是否读身份证查询更新照片
+ let upPhotoParam = await postapi(
+ "/api/app/SysParmValue/GetSysParmValueBySysParmId",
+ { sysParmId: upPhoto }
+ );
+ let photo = this.patientRegister.photo;
+ this.patientRegister.photo = "";
+
+ postapi("/api/app/patientregister/getlistinfilter", body).then(
+ async (res) => {
if (res.code > -1) {
// 刷新最大记录数
- this.loadOpts.totalCount = res.data.totalCount
- let curLoad = res.data.items
+ this.loadOpts.totalCount = res.data.totalCount;
+ let curLoad = res.data.items;
// let oldCount = 0
// 处理:
// 1、分组/套餐 排序混乱的问题
// 2、扫身份证查询时,无照片自动更新照片(参数控制)
- curLoad.forEach(e => {
+ curLoad.forEach((e) => {
// 1、分组/套餐 排序混乱的问题
if (e.customerOrgId == this.dict.personOrgId) {
- e.groupPack = e.medicalPackageId
+ e.groupPack = e.medicalPackageId;
} else {
- e.groupPack = e.customerOrgGroupId
+ e.groupPack = e.customerOrgGroupId;
}
// 2、扫身份证查询时,无照片自动更新照片(参数控制)
- if (upPhotoParam != 'N' && photo) {
+ if (upPhotoParam != "N" && photo) {
if (!e.photo) {
- savePeoplePhoto(e.id, photo)
+ savePeoplePhoto(e.id, photo);
}
}
});
// 不是连续扫码时,需要判断是否分页查询(连续扫码不清原来的数据)
- console.log('this.patientRegister.query',this.patientRegister.query.isSeries,this.patientRegister.query.patientRegisterNo)
- if(!(this.patientRegister.query.isSeries == 'Y' && this.patientRegister.query.patientRegisterNo)){
- if (body.skipCount == 0) { //查询
+ console.log(
+ "this.patientRegister.query",
+ this.patientRegister.query.isSeries,
+ this.patientRegister.query.patientRegisterNo
+ );
+ if (
+ !(
+ this.patientRegister.query.isSeries == "Y" &&
+ this.patientRegister.query.patientRegisterNo
+ )
+ ) {
+ if (body.skipCount == 0) {
+ //查询
this.tableData = [];
}
- }
+ }
- this.tableData = this.tableData.concat(curLoad)
+ this.tableData = this.tableData.concat(curLoad);
// else {
// // 懒加载 ,原数据集不用清空
// oldCount = this.tableData.length
@@ -1221,21 +1709,25 @@ export default {
//如果 有选中 记录,则刷新其对应的组合项目
if (this.dataTransOpts.tableS.patient_register.id) {
- this.dataTransOpts.refresh.register_check_asbitem.M++
+ this.dataTransOpts.refresh.register_check_asbitem.M++;
}
}
- })
+ }
+ );
},
- //滚动加载数据
- async scrollFull(scroll,event) {
- console.log(scroll)
- if(scroll.judgeFlse){
- if ((Number(this.loadOpts.skipCount) + 1) * Number(this.loadOpts.maxResultCount) >= Number(this.loadOpts.totalCount)) {
- return
- } else {
- await this.load()
- }
+ //滚动加载数据
+ async scrollFull(scroll, event) {
+ if (scroll.judgeFlse) {
+ if (
+ (Number(this.loadOpts.skipCount) + 1) *
+ Number(this.loadOpts.maxResultCount) >=
+ Number(this.loadOpts.totalCount)
+ ) {
+ return;
+ } else {
+ await this.load();
+ }
}
// this.dom = this.$refs.info.bodyWrapper
// console.log('this.dom', this.dom)
@@ -1243,7 +1735,7 @@ export default {
// this.dom.addEventListener('scroll', async () => {
// // // 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) {
- // // 获取到的不是全部数据 当滚动到底部
+ // // 获取到的不是全部数据 当滚动到底部
// // 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)) {
// this.lazyLoading = false
@@ -1257,10 +1749,9 @@ export default {
// })
},
-
close_dialogWin_upBaseInfo() {
- this.upBaseInfo.visble = false
- this.close_dialogWin_PatientRegisterEdit()
+ this.upBaseInfo.visble = false;
+ this.close_dialogWin_PatientRegisterEdit();
},
btnUpBaseInfo() {
let body = {
@@ -1268,44 +1759,50 @@ export default {
// "patientName": "string",
// "mobileTelephone": "string",
// "idNo": "string"
- }
- body[this.upBaseInfo.colName] = this.upBaseInfo.value
+ };
+ body[this.upBaseInfo.colName] = this.upBaseInfo.value;
- postapi('/api/app/PatientRegister/UpdatePatientRegisterBaseInfoByPatientRegisterId', body).then(res => {
+ postapi(
+ "/api/app/PatientRegister/UpdatePatientRegisterBaseInfoByPatientRegisterId",
+ body
+ ).then((res) => {
if (res.code > -1) {
- this.close_dialogWin_upBaseInfo()
+ this.close_dialogWin_upBaseInfo();
}
- })
+ });
},
// 修改基本信息
fnUpBaseInfo(row, baseInfoType) {
- this.dataTransOpts.tableS.patient_register.id = row.id
- this.upBaseInfo.visble = true
- this.upBaseInfo.patientRegisterId = row.id
- this.upBaseInfo.colName = baseInfoType
+ this.dataTransOpts.tableS.patient_register.id = row.id;
+ this.upBaseInfo.visble = true;
+ this.upBaseInfo.patientRegisterId = row.id;
+ this.upBaseInfo.colName = baseInfoType;
switch (baseInfoType) {
case "idNo":
- this.upBaseInfo.label = "新身份证号"
+ this.upBaseInfo.label = "新身份证号";
break;
case "mobileTelephone":
- this.upBaseInfo.label = "新手机号"
+ this.upBaseInfo.label = "新手机号";
break;
default:
- this.upBaseInfo.label = "新姓名"
+ this.upBaseInfo.label = "新姓名";
break;
}
- this.upBaseInfo.value = row[baseInfoType]
-
+ this.upBaseInfo.value = row[baseInfoType];
},
-
editMedicalStartDate() {
if (this.multipleSelection.length < 1) {
- this.$message.warning({ showClose: true, message: '请勾选要操作的人员记录!' })
- return
+ this.$message.warning({
+ showClose: true,
+ message: "请勾选要操作的人员记录!",
+ });
+ return;
}
- this.upBaseInfo.medicalStartDate = moment(this.multipleSelection[0].medicalStartDate).format("yyyy-MM-DD")
- this.dialogEditMedicalStartDate = true
+ this.upBaseInfo.medicalStartDate = moment(
+ this.multipleSelection[0].medicalStartDate
+ ).format("yyyy-MM-DD");
+ this.dialogEditMedicalStartDate = true;
},
// 批量修改体检日期
@@ -1313,45 +1810,50 @@ export default {
let body = {
//"completeFlag": "string",
medicalStartDate: this.upBaseInfo.medicalStartDate,
- patientRegisterIds: []
- }
- this.multipleSelection.forEach(e => {
- body.patientRegisterIds.push(e.id)
+ patientRegisterIds: [],
+ };
+ this.multipleSelection.forEach((e) => {
+ body.patientRegisterIds.push(e.id);
});
- postapi('/api/app/PatientRegister/UpdatePatientRegisterMedicalStartDate',body)
- .then(res => {
- if(res.code > -1){
- let lfind = 0
- this.multipleSelection.forEach(e => {
- e.medicalStartDate = body.medicalStartDate
- lfind = arrayExistObj(this.tableData,'id',e.id)
- if(lfind > -1) this.tableData.medicalStartDate = body.medicalStartDate
+ postapi(
+ "/api/app/PatientRegister/UpdatePatientRegisterMedicalStartDate",
+ body
+ ).then((res) => {
+ if (res.code > -1) {
+ let lfind = 0;
+ this.multipleSelection.forEach((e) => {
+ e.medicalStartDate = body.medicalStartDate;
+ lfind = arrayExistObj(this.tableData, "id", e.id);
+ if (lfind > -1)
+ this.tableData.medicalStartDate = body.medicalStartDate;
});
- this.dialogEditMedicalStartDate = false
+ this.dialogEditMedicalStartDate = false;
}
- })
+ });
},
// 分诊排队
fnQueue(row) {
this.queueParams = {
- patientRegisterId: row.id
- }
- this.dialogWin.queue = true
- this.dataTransOpts.plus.queue++
+ patientRegisterId: row.id,
+ };
+ this.dialogWin.queue = true;
+ this.dataTransOpts.plus.queue++;
},
//右击菜单
onCellRightClick(row, column) {
+ // console.log(row)
this.rClickRow = { ...row }; //右击的行记录
this.rClickColumn = { ...column }; //右击的列(预留)
// console.log(row, column.property);
+ // this.onContextmenu()
},
onContextmenu(event) {
- //// console.log('onContextmenu',event);
+ // console.log('onContextmenu',event);
if (!this.rClickRow) return false;
let row = { ...this.rClickRow };
- let items = [] //菜单项
+ let items = []; //菜单项
// items.push({
// label: "一级菜单",
@@ -1359,141 +1861,189 @@ export default {
// { label: "修改姓名", onClick: () => { this.fnUpBaseInfo(row, 'patientName'); } }
// ]
// })
- let subMenumedical = []
- if (checkPagePriv(this.pagePriv.privs, '修改体检日期'))
+ let subMenumedical = [];
+ if (checkPagePriv(this.pagePriv.privs, "修改体检日期"))
subMenumedical.push({
label: "修改体检日期",
onClick: () => {
this.editMedicalStartDate();
},
- })
- if (checkPagePriv(this.pagePriv.privs, '修改姓名') && row.completeFlag != '0')
+ });
+ if (
+ checkPagePriv(this.pagePriv.privs, "修改姓名") &&
+ row.completeFlag != "0"
+ )
subMenumedical.push({
label: "修改姓名",
onClick: () => {
- this.fnUpBaseInfo(row, 'patientName');
+ this.fnUpBaseInfo(row, "patientName");
},
- })
- if (checkPagePriv(this.pagePriv.privs, '修改手机号') && row.completeFlag != '0')
+ });
+ if (
+ checkPagePriv(this.pagePriv.privs, "修改手机号") &&
+ row.completeFlag != "0"
+ )
subMenumedical.push({
label: "修改手机号",
onClick: () => {
- this.fnUpBaseInfo(row, 'mobileTelephone');
+ this.fnUpBaseInfo(row, "mobileTelephone");
},
- })
- if (checkPagePriv(this.pagePriv.privs, '修改身份证号') && row.completeFlag != '0')
+ });
+ if (
+ checkPagePriv(this.pagePriv.privs, "修改身份证号") &&
+ row.completeFlag != "0"
+ )
subMenumedical.push({
label: "修改身份证号",
onClick: () => {
- this.fnUpBaseInfo(row, 'idNo');
+ this.fnUpBaseInfo(row, "idNo");
},
- })
+ });
- if (subMenumedical.length > 0) items.push({ label: "修改体检信息", children: subMenumedical })
+ if (subMenumedical.length > 0)
+ items.push({ label: "修改体检信息", children: subMenumedical });
- if (checkPagePriv(this.pagePriv.privs, '分诊排队') && row.completeFlag != '0')
+ if (
+ checkPagePriv(this.pagePriv.privs, "分诊排队") &&
+ row.completeFlag != "0"
+ )
items.push({
label: "分诊排队",
onClick: () => {
this.fnQueue(row);
},
- })
- if (checkPagePriv(this.pagePriv.privs, '发送检验申请') && row.completeFlag != '0')
+ });
+ if (
+ checkPagePriv(this.pagePriv.privs, "发送检验申请") &&
+ row.completeFlag != "0"
+ )
items.push({
label: "发送检验申请",
onClick: () => {
this.lisRequest(row);
},
- })
+ });
// 预览条码
- let subMenuPre = []
- if (checkPagePriv(this.pagePriv.privs, '预览人员条码') && row.completeFlag != '0')
+ let subMenuPre = [];
+ if (
+ checkPagePriv(this.pagePriv.privs, "预览人员条码") &&
+ row.completeFlag != "0"
+ )
subMenuPre.push({
label: "预览人员条码",
onClick: () => {
this.guidePrintPromise("0008", true, row);
},
- })
- if (checkPagePriv(this.pagePriv.privs, '预览检验条码') && row.completeFlag != '0')
+ });
+ if (
+ checkPagePriv(this.pagePriv.privs, "预览检验条码") &&
+ row.completeFlag != "0"
+ )
subMenuPre.push({
label: "预览检验条码",
onClick: () => {
this.lisPrint(row, "0002", true);
},
- })
- if (checkPagePriv(this.pagePriv.privs, '预览Pacs条码') && row.completeFlag != '0')
+ });
+ if (
+ checkPagePriv(this.pagePriv.privs, "预览Pacs条码") &&
+ row.completeFlag != "0"
+ )
subMenuPre.push({
label: "预览Pacs条码",
onClick: () => {
// console.log('预览Pacs条码 row',row)
this.pacsPrint(row, "0004", true);
},
- })
- if (subMenuPre.length > 0) items.push({ label: "预览条码", children: subMenuPre })
-
+ });
+ if (subMenuPre.length > 0)
+ items.push({ label: "预览条码", children: subMenuPre });
- let subMenuPrint = []
- if (checkPagePriv(this.pagePriv.privs, '打印人员条码') && row.completeFlag != '0')
+ let subMenuPrint = [];
+ if (
+ checkPagePriv(this.pagePriv.privs, "打印人员条码") &&
+ row.completeFlag != "0"
+ )
subMenuPrint.push({
label: "打印人员条码",
onClick: () => {
this.guidePrintPromise("0008", false, row);
},
- })
- if (checkPagePriv(this.pagePriv.privs, '打印检验条码') && row.completeFlag != '0')
+ });
+ if (
+ checkPagePriv(this.pagePriv.privs, "打印检验条码") &&
+ row.completeFlag != "0"
+ )
subMenuPrint.push({
label: "打印检验条码",
onClick: () => {
this.lisPrint(row, "0002", false);
},
- })
- if (checkPagePriv(this.pagePriv.privs, '打印Pacs条码') && row.completeFlag != '0')
+ });
+ if (
+ checkPagePriv(this.pagePriv.privs, "打印Pacs条码") &&
+ row.completeFlag != "0"
+ )
subMenuPrint.push({
label: "打印Pacs条码",
onClick: () => {
this.pacsPrint(row, "0004", false);
},
- })
- if (subMenuPrint.length > 0) items.push({ label: "打印条码", children: subMenuPrint })
+ });
+ if (subMenuPrint.length > 0)
+ items.push({ label: "打印条码", children: subMenuPrint });
- let subMenuImp = []
- if (checkPagePriv(this.pagePriv.privs, '导入检查结果') && row.completeFlag != '0')
+ let subMenuImp = [];
+ if (
+ checkPagePriv(this.pagePriv.privs, "导入检查结果") &&
+ row.completeFlag != "0"
+ )
subMenuImp.push({
label: "导入检查结果",
onClick: () => {
- this.importResult('pacs', row);
+ this.importResult("pacs", row);
},
- })
- if (checkPagePriv(this.pagePriv.privs, '导入检验结果') && row.completeFlag != '0')
+ });
+ if (
+ checkPagePriv(this.pagePriv.privs, "导入检验结果") &&
+ row.completeFlag != "0"
+ )
subMenuImp.push({
label: "导入检验结果",
onClick: () => {
- this.importResult('lis', row);
+ this.importResult("lis", row);
},
- })
- if (subMenuImp.length > 0) items.push({ label: "导入结果", children: subMenuImp })
+ });
+ if (subMenuImp.length > 0)
+ items.push({ label: "导入结果", children: subMenuImp });
- if (checkPagePriv(this.pagePriv.privs, '批量更新组合项目明细') && this.multipleSelection.length > 0)
+ if (
+ checkPagePriv(this.pagePriv.privs, "批量更新组合项目明细") &&
+ this.multipleSelection.length > 0
+ )
items.push({
label: "批量更新组合项目明细",
onClick: () => {
this.btnItemBatch();
},
- })
- if (checkPagePriv(this.pagePriv.privs, '调整检查项目医生') && this.multipleSelection.length > 0)
+ });
+ if (
+ checkPagePriv(this.pagePriv.privs, "调整检查项目医生") &&
+ this.multipleSelection.length > 0
+ )
items.push({
label: "调整检查项目医生",
onClick: () => {
- this.dataTransOpts.plus.PatientRegisterEditDoctorBatch++ //如果放在弹窗显示后面,在首次加载子组件时,会触发两次数据处理
+ this.dataTransOpts.plus.PatientRegisterEditDoctorBatch++; //如果放在弹窗显示后面,在首次加载子组件时,会触发两次数据处理
this.dialogWin.PatientRegisterEditDoctorBatch = true;
},
- })
- items.push({ label: "----------------", })
+ });
+ items.push({ label: "----------------" });
this.$contextmenu({
items,
event,
- //x: event.clientX,
- //y: event.clientY,
+ x: event.clientX,
+ y: event.clientY,
customClass: "custom-class",
zIndex: 3,
minWidth: 80,
@@ -1516,14 +2066,15 @@ export default {
// if (e.choosed) this.multipleSelection.push(e);
// });
//取消勾选,换成选择的方式 end
-
if (this.multipleSelection.length < 1) {
- this.$message.info({ showClose: true, message: "请选择要操作的记录!" });
+ this.$message.info({
+ showClose: true,
+ message: "请选择要操作的记录!",
+ });
return;
}
- this.dataTransOpts.plus.PatientRegisterEditGroupBatch++
+ this.dataTransOpts.plus.PatientRegisterEditGroupBatch++;
this.dialogWin.PatientRegisterEditGroupBatch = true;
-
},
//批量更新组合项目
@@ -1541,31 +2092,38 @@ export default {
//取消勾选,换成选择的方式 end
if (this.multipleSelection.length < 1) {
- this.$message.warning({ showClose: true, message: "请选择要操作的记录" })
- return
+ this.$message.warning({
+ showClose: true,
+ message: "请选择要操作的记录",
+ });
+ return;
}
- this.dataTransOpts.plus.PatientRegisterEditItemBatch++ //如果放在弹窗显示后面,在首次加载子组件时,会触发两次数据处理
+ this.dataTransOpts.plus.PatientRegisterEditItemBatch++; //如果放在弹窗显示后面,在首次加载子组件时,会触发两次数据处理
this.dialogWin.PatientRegisterEditItemBatch = true;
-
},
//批量更新组合项目
async btnItemBatch() {
if (this.multipleSelection.length < 1) {
- this.$message.warning({ showClose: true, message: "请选择要操作的记录" })
- return
+ this.$message.warning({
+ showClose: true,
+ message: "请选择要操作的记录",
+ });
+ return;
}
this.elProgress.display = true;
this.elProgress.percentage = 0;
for (let i = 0; i < this.multipleSelection.length; i++) {
- let patientRegisterId = this.multipleSelection[i].id
+ let patientRegisterId = this.multipleSelection[i].id;
try {
- await postapi('/api/app/RegisterCheckItem/SyncRegisterCheckItem', { patientRegisterId })
+ await postapi("/api/app/RegisterCheckItem/SyncRegisterCheckItem", {
+ patientRegisterId,
+ });
} catch (error) {
- console.log('printPromise', error)
+ console.log("printPromise", error);
}
this.elProgress.percentage = Math.floor(
@@ -1573,22 +2131,24 @@ export default {
);
}
this.elProgress.display = false;
-
-
-
},
//检验申请
async lisRequest(row) {
let isPrintLisRequest = false;
let res = null;
- if (row.completeFlag == '0') {
- this.$message.info({ showClose: true, message: "预登记人员,不可执行此操作!" });
+ if (row.completeFlag == "0") {
+ this.$message.info({
+ showClose: true,
+ message: "预登记人员,不可执行此操作!",
+ });
return;
}
try {
- res = await postapi(`/api/app/lisrequest/setlisrequest?PatientRegisterId=${row.id}`);
+ res = await postapi(
+ `/api/app/lisrequest/setlisrequest?PatientRegisterId=${row.id}`
+ );
// console.log(`/ api / app / lisrequest / setlisrequest ? PatientRegisterId = ${ prId }`,res);
} catch (error) {
return;
@@ -1624,33 +2184,33 @@ export default {
lisPrint(row, ReportCode, isPreview) {
return new Promise((resolve, reject) => {
if (!this.$peisAPI) reject("此功能,需要在壳客户端才可运行!");
- if (!row.completeFlag || row.completeFlag == '0') reject("预登记人员,不可执行此操作!")
-
-
+ if (!row.completeFlag || row.completeFlag == "0")
+ reject("预登记人员,不可执行此操作!");
let token = window.sessionStorage.getItem("token");
let user = window.sessionStorage.getItem("user");
let toOutShell = {
ReportCode,
token,
- IsMoreLabel: 'Y',
- isBuildImage: 'N',
- IsUploadPdf: 'N',
+ IsMoreLabel: "Y",
+ isBuildImage: "N",
+ IsUploadPdf: "N",
preViewCanPrint: "N",
Parameters: [
{ Name: "printer", Value: user },
{ Name: "hisLog", Value: "pic/hisLog.jpg" },
],
- BusinessCode: row.id
+ BusinessCode: row.id,
};
- console.log('this.$peisAPI.toOutShell', toOutShell)
+ console.log("this.$peisAPI.toOutShell", toOutShell);
if (isPreview) {
- this.$peisAPI.printPre(JSON.stringify(toOutShell))
- .then(res => {
- console.log('this.$peisAPI.printPre', res)
- let lres = JSON.parse(res)
+ this.$peisAPI
+ .printPre(JSON.stringify(toOutShell))
+ .then((res) => {
+ console.log("this.$peisAPI.printPre", res);
+ let lres = JSON.parse(res);
if (lres.code > -1) {
- resolve(lres)
+ resolve(lres);
} else {
reject(lres.message);
}
@@ -1659,10 +2219,11 @@ export default {
reject(err);
});
} else {
- this.$peisAPI.print(JSON.stringify(toOutShell))
- .then(res => {
- console.log('this.$peisAPI.print', res)
- let lres = JSON.parse(res)
+ this.$peisAPI
+ .print(JSON.stringify(toOutShell))
+ .then((res) => {
+ console.log("this.$peisAPI.print", res);
+ let lres = JSON.parse(res);
if (lres.code < 0) {
reject(lres.message);
} else {
@@ -1672,49 +2233,51 @@ export default {
});
}
})
- .then(res => {
+ .then((res) => {
if (res && res.code < 0) {
reject(res.message);
} else {
- resolve(res)
+ resolve(res);
}
})
.catch((err) => {
reject(err);
});
}
- })
+ });
},
//pacs条码打印
pacsPrint(row, ReportCode, isPreview) {
return new Promise((resolve, reject) => {
if (!this.$peisAPI) reject("此功能,需要在壳客户端才可运行!");
- if (!row.completeFlag || row.completeFlag == '0') reject("预登记人员,不可执行此操作!")
+ if (!row.completeFlag || row.completeFlag == "0")
+ reject("预登记人员,不可执行此操作!");
let token = window.sessionStorage.getItem("token");
let user = window.sessionStorage.getItem("user");
let toOutShell = {
ReportCode,
token,
- IsMoreLabel: 'Y',
- isBuildImage: 'N',
- IsUploadPdf: 'N',
+ IsMoreLabel: "Y",
+ isBuildImage: "N",
+ IsUploadPdf: "N",
preViewCanPrint: "N",
Parameters: [
{ Name: "printer", Value: user },
{ Name: "hisLog", Value: "pic/hisLog.jpg" },
],
- BusinessCode: row.id
+ BusinessCode: row.id,
};
- console.log('this.$peisAPI.print', toOutShell)
+ console.log("this.$peisAPI.print", toOutShell);
if (isPreview) {
- this.$peisAPI.printPre(JSON.stringify(toOutShell))
- .then(res => {
- console.log('this.$peisAPI.printPre', res)
- let lres = JSON.parse(res)
+ this.$peisAPI
+ .printPre(JSON.stringify(toOutShell))
+ .then((res) => {
+ console.log("this.$peisAPI.printPre", res);
+ let lres = JSON.parse(res);
if (lres.code > -1) {
- resolve(lres)
+ resolve(lres);
} else {
reject(lres.message);
}
@@ -1723,12 +2286,13 @@ export default {
reject(err);
});
} else {
- this.$peisAPI.print(JSON.stringify(toOutShell))
- .then(res => {
- console.log('this.$peisAPI.print', res)
- let lres = JSON.parse(res)
+ this.$peisAPI
+ .print(JSON.stringify(toOutShell))
+ .then((res) => {
+ console.log("this.$peisAPI.print", res);
+ let lres = JSON.parse(res);
if (lres.code > -1) {
- resolve(lres)
+ resolve(lres);
} else {
reject(lres.message);
}
@@ -1737,90 +2301,136 @@ export default {
reject(err);
});
}
- })
+ });
},
// 导入检查检验结果
importResult(checkType, row) {
- let url = '/api/app/ImportLisResult/ImportResultByPatientRegisterId'
+ let url = "/api/app/ImportLisResult/ImportResultByPatientRegisterId";
switch (checkType) {
- case 'pacs':
- url = '/api/app/ImportPacsResult/ImportResultByPatientRegisterId'
+ case "pacs":
+ url = "/api/app/ImportPacsResult/ImportResultByPatientRegisterId";
postapi(url, { patientRegisterId: row.id })
- .then(res => {
+ .then((res) => {
if (res.code > -1) {
- return postapi('/api/app/ImportElectrocardiogramResult/ImportElectrocardiogramResultByPatientRegisterId', { patientRegisterId: row.id })
+ return postapi(
+ "/api/app/ImportElectrocardiogramResult/ImportElectrocardiogramResultByPatientRegisterId",
+ { patientRegisterId: row.id }
+ );
}
})
- .then(res => {
+ .then((res) => {
if (res && res.code > -1) {
- this.$message.success({ showClose: true, message: '导入成功!' })
- this.rowClick(row)
+ this.$message.success({
+ showClose: true,
+ message: "导入成功!",
+ });
+ this.rowClick(row);
}
- })
+ });
break;
default:
- postapi(url, { patientRegisterId: row.id }).then(res => {
+ postapi(url, { patientRegisterId: row.id }).then((res) => {
if (res.code > -1) {
- this.$message.success({ showClose: true, message: '导入成功!' })
- this.rowClick(row)
+ this.$message.success({ showClose: true, message: "导入成功!" });
+ this.rowClick(row);
}
- })
+ });
break;
}
},
//通用导出
btnExport(elId) {
- // 获取HTML元素(表格)
- // let table = document.getElementById(elId); //.cloneNode(true)
- this.$nextTick(() => {
- // let refsTable = this.$refs[elId] //.cloneNode(true) true
- let table = document.getElementById(elId)
- // console.log('table,refsTable', table, refsTable)
-
- let tableData = table.innerHTML
- let fileName = moment(new Date()).format('yyyyMMDDHHmmss')
-
- let blob = new Blob([tableData], { type: "text/plain;charset=utf-8" });
-
- FileSaver.saveAs(blob, fileName + '.xls');
-
- // 导出图片
- // 使用html2canvas将HTML元素转换为画布
- // let cloneTable = table.cloneNode(true) //[elId]
- /*
- html2canvas(table).then(canvas => {
-
- // 创建一个a元素用于下载
- const link = document.createElement('a');
- link.href = canvas.toDataURL('image/jpeg');
- link.download = fileName + '.jpg';
- document.body.appendChild(link);
- link.click();
- //document.body.removeChild(link);
-
- // // 创建一个PDF对象
- // var pdf = new jsPDF();
- // // 设置PDF的尺寸
- // pdf.addImage(canvas.toDataURL('image/png'), 'PNG', 0, 0, canvas.width, canvas.height);
- // // 导出PDF
- // pdf.save('员工信息表.pdf');
-
- });
- */
+ this.dragCol.forEach((e) => {
+ this.jsonFields[e.label] = e.prop;
+ });
+ let tableDatas=deepCopy(this.tableData)
+ tableDatas.forEach(e=>{
+ if(e.completeFlag)e.completeFlag=e.isAudit == "Y"? "已审核": dddw(this.dict.completeFlag,"id",e.completeFlag,"displayName")
+ if(e.guidePrintTimes)e.guidePrintTimes=e.guidePrintTimes > 0?'打印':''
+ if(e.isLock)e.isLock=e.isLock=='Y'?'锁住':''
+ if(e.sexId)e.sexId=dddw(this.dict.sex,"id",e.sexId,"displayName")
+ if(e.medicalPackageId !== this.dict.personOrgId &&e.customerOrgId === this.dict.personOrgId){
+ e.groupPack=dddw(this.dict.medicalPackage,"id",e.medicalPackageId,"displayName")
+ }else if(e.medicalPackageId !== this.dict.personOrgId &&e.customerOrgId !== this.dict.personOrgId){
+ e.groupPack=dddw(this.dict.customerOrgGroupAll,"id",e.customerOrgGroupId,"displayName")
+ }
+ if(e.nationId)e.nationId=dddw(this.dict.nation,"id",e.nationId,"displayName")
+ if(e.idNo)e.idNo=e.idNo+'&'
+ if(e.birthDate)e.birthDate=moment(e.birthDate).format("yyyy-MM-DD")
+ if(e.maritalStatusId)e.maritalStatusId=dddw(this.dict.maritalStatus,"id",e.maritalStatusId,"displayName")
+ if(e.medicalTypeId)e.medicalTypeId=dddw(this.dict.medicalType,"id",e.medicalTypeId,"displayName")
+ if(e.personnelTypeId)e.personnelTypeId=dddw(this.dict.personnelType,"id",e.personnelTypeId,"displayName")
+ if(e.isVip)e.isVip=e.isVip == "Y" ? "是" : "否"
+ if(e.isUpload)e.isUpload=e.isUpload == "Y" ? "是" : "否"
+ if(e.qztlType)e.qztlType=dddw(this.dict.qztlType,"id",e.qztlType,"displayName")
+ if(e.qztlIsMain)e.qztlIsMain=e.qztlIsMain == "Y" ? "是" : "否"
+ if(e.qztlIsCy)e.qztlIsCy=e.qztlIsCy == "Y" ? "是" : "否"
+ if(e.qztlIsCw)e.qztlIsCw=e.qztlIsCw == "Y" ? "是" : "否"
+ if(e.qztlIsGt)e.qztlIsGt=e.qztlIsGt == "Y" ? "是" : "否"
+ if(e.qztlIsWh)e.qztlIsWh=e.qztlIsWh == "Y" ? "是" : "否"
+ if(e.qztlIsFj)e.qztlIsFj=e.qztlIsFj == "Y" ? "是" : "否"
})
+ this.tableName='人员登记列表'+moment(new Date()).format('yyyyMMDDHHmmss')+'.xls'
+ return tableDatas;
+ // const columns = this.$refs.info.getColumns(); // 获取列信息
+ // const data = this.$refs.info.getData(); // 获取数据
+ // console.log(columns)
+ // console.log(columns)
+ // const exportConf = { columns, data }; // 构建导出配置对象
+ // const filename = 'my_data.xlsx'; // 设置文件名
+ // const blob = exportTable(exportConf); // 导出数据为 Blob 对象
+ // saveAs(blob, filename); // 使用 file-saver 保存文件
+ // // 获取HTML元素(表格)
+ // // let table = document.getElementById(elId); //.cloneNode(true)
+ // this.$nextTick(() => {
+ // // let refsTable = this.$refs[elId] //.cloneNode(true) true
+ // let table = document.getElementById(elId)
+ // // console.log('table,refsTable', table, refsTable)
+
+ // let tableData = table.innerHTML
+ // let fileName = moment(new Date()).format('yyyyMMDDHHmmss')
+
+ // let blob = new Blob([tableData], { type: "text/plain;charset=utf-8" });
+
+ // FileSaver.saveAs(blob, fileName + '.xls');
+
+ // // 导出图片
+ // // 使用html2canvas将HTML元素转换为画布
+ // // let cloneTable = table.cloneNode(true) //[elId]
+ // /*
+ // html2canvas(table).then(canvas => {
+
+ // // 创建一个a元素用于下载
+ // const link = document.createElement('a');
+ // link.href = canvas.toDataURL('image/jpeg');
+ // link.download = fileName + '.jpg';
+ // document.body.appendChild(link);
+ // link.click();
+ // //document.body.removeChild(link);
+
+ // // // 创建一个PDF对象
+ // // var pdf = new jsPDF();
+ // // // 设置PDF的尺寸
+ // // pdf.addImage(canvas.toDataURL('image/png'), 'PNG', 0, 0, canvas.width, canvas.height);
+ // // // 导出PDF
+ // // pdf.save('员工信息表.pdf');
+
+ // });
+ // */
+ // })
},
btnDragColDesign() {
- this.dragColDesign = deepCopy(this.dragCol)
- this.dialogColSort = true
- this.rowDrag()
+ this.dragColDesign = deepCopy(this.dragCol);
+ this.dialogColSort = true;
+ this.rowDrag();
},
btnDragColDesignOk() {
- this.dragCol = deepCopy(this.dragColDesign)
- this.dialogColSort = false
+ this.dragCol = deepCopy(this.dragColDesign);
+ this.dialogColSort = false;
},
//拖拽
rowDrag() {
@@ -1840,7 +2450,6 @@ export default {
});
});
},
-
},
//监听事件
@@ -1852,10 +2461,10 @@ export default {
//// console.log('watch:patientRegister.query.customerOrgId:',newVal,oldVal)
// 单位变化时,清除当前列表信息
if (newVal && newVal != oldVal) {
- this.tableData = []
- this.dataTransOpts.tableM.register_check_asbitem = []
+ this.tableData = [];
+ this.dataTransOpts.tableM.register_check_asbitem = [];
}
- }
+ },
},
//触发查询事件
@@ -1881,7 +2490,6 @@ export default {
@import "../../assets/css/global_table.css";
@import "../../assets/css/global.css";
-
.box {
display: flex;
}