diff --git a/src/components/report/PatientRegisterListNobtn.vue b/src/components/report/PatientRegisterListNobtn.vue index a6cca5d..cfcaaee 100644 --- a/src/components/report/PatientRegisterListNobtn.vue +++ b/src/components/report/PatientRegisterListNobtn.vue @@ -4,99 +4,48 @@ - - - - - + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + - - - - - - - - - - - - - - - - - - - - - - - + +
@@ -112,6 +61,7 @@ import moment from "moment"; import { mapState, mapActions } from "vuex"; +import Sortable from "sortablejs"; import { getapi, postapi, putapi, deletapi } from "@/api/api"; import { dddw, deepCopy, objCopy, arrayReduce, arrayExistObj, setPrStatusColor } from "@/utlis/proFunc"; @@ -150,28 +100,49 @@ export default { loadOptsInit: {}, summary_check_doctor_alias: ["总检", "审核"], - //拖动列 + //拖动列 + selectionCol:0, dragCol: [ - { label: "序号", prop: "sn", minWidth: 50, align: "center" }, - { label: "姓名", prop: "patientName", minWidth: 65, align: "center"}, - { label: "档案号", prop: "oldPatientNo", minWidth: 90, align: "center"}, - { label: "检查条码", prop: "checkRequestNo", minWidth: 90, align: "center"}, - { label: "检查项目", prop: "asbitemName", minWidth: 110, align: "left"}, - { label: "性别", prop: "sexName", minWidth: 50, align: "center"}, - { label: "年龄", prop: "age", minWidth: 50, align: "center"}, - { label: "单位名称", prop: "customerOrgParentName", minWidth: 110, align: "left"}, - { label: "部门名称", prop: "customerOrgName", minWidth: 110, align: "left"}, - { label: "电话", prop: "mobileTelephone", minWidth: 110, align: "center"}, - { label: "身份证号", prop: "idNo", minWidth: 160, align: "center"}, - { label: "上传日期", prop: "pacsUploadDate", minWidth: 140, align: "center"}, - { label: "检查日期", prop: "pacsCheckDate", minWidth: 140, align: "center"}, - { label: "检查医生", prop: "checkDoctorName", minWidth: 80, align: "center"}, - { label: "体检类别", prop: "medicalTypeName", minWidth: 120, align: "center"}, - { label: "发送状态", prop: "isSend", minWidth: 80, align: "center"}, - { label: "审核日期", prop: "auditTime", minWidth: 140, align: "center"}, - { label: "审核医生", prop: "auditorUserName", minWidth: 80, align: "center"} + { label: "勾选", type: "selection", minWidth: 40, align: "center" }, + { label: "体检进度", prop: "completeFlag", minWidth: 90, align: "center" }, + { label: "体检日期", prop: "medicalStartDate", minWidth: 100, align: "center" }, + { label: "打印", prop: "isReportPrint", minWidth: 60, align: "center" }, + { label: "打印人", prop: "reportPrintName", minWidth: 70, align: "center" }, + { label: "预约备单", prop: "isUploadAppoint", minWidth: 90, align: "center" }, + { label: "上传", prop: "isUpload", minWidth: 60, align: "center" }, + { label: "条码号", prop: "patientRegisterNo", minWidth: 150, align: "center" }, + { label: "姓名", prop: "patientName", minWidth: 60, align: "center" }, + { label: "性别", prop: "sexName", minWidth: 60, align: "center" }, + { label: "年龄", prop: "age", minWidth: 60, align: "center" }, + { label: "分组/套餐", prop: "packGroup", minWidth: 150, align: "center" }, + { label: "体检次数", prop: "medicalTimes", minWidth: 90, align: "center" }, + { label: "单位名称", prop: "customerOrgName", minWidth: 180, align: "left" }, + { label: "部门名称", prop: "departmentName", minWidth: 180, align: "left" }, + { label: "手机", prop: "mobileTelephone", minWidth: 130, align: "center" }, + { label: "电话", prop: "telephone", minWidth: 130, align: "center" }, + { label: "档案号", prop: "patientNo", minWidth: 80, align: "center" }, + { label: "身份证号", prop: "idNo", minWidth: 160, align: "center" }, + { label: "出生日期", prop: "birthDate", minWidth: 90, align: "center" }, + { label: "婚姻", prop: "maritalStatusName", minWidth: 70, align: "center" }, + { label: "民族", prop: "nationName", minWidth: 70, align: "center" }, + { label: "地址", prop: "address", minWidth: 400, align: "left" }, + { label: "体检卡号", prop: "medicalCardNo", minWidth: 90, align: "center" }, + { label: "工卡号", prop: "jobCardNo", minWidth: 90, align: "center" }, + { label: "体检类别", prop: "medicalTypeName", minWidth: 100, align: "center" }, + { label: "人员类别", prop: "personnelTypeName", minWidth: 100, align: "center" }, + { label: "职务", prop: "jobPost", minWidth: 70, align: "center" }, + { label: "职称", prop: "jobTitle", minWidth: 70, align: "center" }, + { label: "介绍人", prop: "salesman", minWidth: 80, align: "center" }, + { label: "VIP", prop: "isVip", minWidth: 80, align: "center" }, + { label: "总检医生", prop: "summaryDoctorName", minWidth: 90, align: "center" }, + { label: "总检日期", prop: "summaryDate", minWidth: 140, align: "center" }, + { label: "审核医生", prop: "auditDoctorName", minWidth: 90, align: "center" }, + { label: "审核日期", prop: "auditDate", minWidth: 140, align: "center" }, + { label: "登记人", prop: "registerName", minWidth: 80, align: "center" }, + { label: "登记时间", prop: "registerDate", minWidth: 140, align: "center" }, + { label: "锁住", prop: "isLock", minWidth: 60, align: "center" }, ], - + }; }, @@ -194,7 +165,11 @@ export default { mounted() { this.$nextTick(() => { this.scrollFull() + + // 监听列拖拽 + this.initColDrag() }) + }, computed: { ...mapState(["window", "dict", 'dataTransOpts', "patientRegister", "customerOrg", "report"]), @@ -257,6 +232,37 @@ export default { }) }, + //监听拖拽 + initColDrag() { + // 1. 获取表格的表头元素 + const table = document.querySelector('.el-table__header-wrapper tr'); + + // 2. 创建 Sortable 实例 + Sortable.create(table, { + animation: 150, // 拖拽动画时长 + + // 开始拖拽的时候 + onStart: (event) => { + if(event.oldIndex == 0){ + this.$alert('第1列不可以拖动', '提示') + } + //evt.oldIndex; // element index within parent + }, + // 3. 监听拖拽结束事件 + onEnd: (event) => { + const { oldIndex, newIndex } = event; + + // 4. 更新列定义数组的顺序 + let movedColumn = this.dragCol.splice(oldIndex, 1)[0]; + this.dragCol.splice(newIndex, 0, movedColumn); + //this.selectionCol = arrayExistObj(this.dragCol,'type','selection') + + // 5. 强制表格重新渲染以更新视图 + //this.tableBrush += 1; + } + }); + }, + lmoment(date, forMat) { return moment(new Date(date)).format(forMat); }, @@ -332,10 +338,10 @@ export default { let customerOrgs = []; if (this.report.dataCusOrgOCX.length > 0) { - + this.report.dataCusOrgOCX.forEach(e => { let dateType = '1' - switch (e.dateType) { + switch (e.dateType) { case 'medicalStartDate': dateType = '2' break; @@ -415,7 +421,7 @@ export default { // 选中 this.$nextTick(function () { this.patientRegister.prList.forEach(row => { - if(arrayExistObj(this.dataTransOpts.tableM.patient_register, 'patientRegisterId', row.patientRegisterId) == -1) this.$refs['info'].toggleRowSelection(row) + if (arrayExistObj(this.dataTransOpts.tableM.patient_register, 'patientRegisterId', row.patientRegisterId) == -1) this.$refs['info'].toggleRowSelection(row) }) });