diff --git a/src/components/doctorCheck/CheckPicture.vue b/src/components/doctorCheck/CheckPicture.vue index dc53860..358c378 100644 --- a/src/components/doctorCheck/CheckPicture.vue +++ b/src/components/doctorCheck/CheckPicture.vue @@ -28,7 +28,8 @@ -
+
@@ -46,7 +47,7 @@
+ :data-imageSeq="index" :preview-src-list="previewSrcList(checkPictures, item)">
@@ -913,6 +914,141 @@ export default { }); }, + // 右击剪切图片 + rCutPic(start, count) { + this.dataTransOpts.doctorCutPics = this.checkPictures.splice(start, count) + }, + + // 右击粘贴图片 + rCopyPic(imageSeq) { + let body = { + registerCheckPictureIds: [], + registerCheckId: this.dataTransOpts.tableS.register_check.id + } + this.dataTransOpts.doctorCutPics.forEach(e => { + body.registerCheckPictureIds.push(e.id) + e.registerCheckId = this.dataTransOpts.tableS.register_check.id + }); + + postapi('/api/app/RegisterCheckPicture/BatchUpdateRegisterCheckIdByRegisterCheckPictureId', body) + .then(res => { + if (res.code > -1) { + this.$message.success({showClose:true,message:'操作成功!'}) + if (imageSeq == -1) { + this.checkPictures = deepCopy(this.dataTransOpts.doctorCutPics) + }else{ + this.checkPictures.splice(imageSeq,0,deepCopy(this.dataTransOpts.doctorCutPics)) + } + this.dataTransOpts.doctorCutPics = [] //清除剪切的缓存 + } + }) + + }, + + // 右击菜单 + onContextmenu(event) { + if (this.doctorBtnDisabled('btnSavePic')) { + return false + } + //console.log('event',event.target,event.target.getAttribute('data-imageSeq')) + let imageSeqStr = '-1' + try { + imageSeqStr = event.target.getAttribute('data-imageSeq').toString() + } catch (error) { + + } + //console.log('imageSeqStr',imageSeqStr) + let imageSeq = Number(imageSeqStr) + //console.log('imageSeq',imageSeq) + //菜单项 + let items = []; + let picNum = this.checkPictures.length + if (imageSeq >= 0 && picNum > 1) { + items.push({ + label: "剪切当前图片", + onClick: () => { + this.rCutPic(imageSeq, 1) + }, + }) + if (imageSeq == 0) { + items.push({ + label: "剪切当前图片后面的图片", + onClick: () => { + this.rCutPic(imageSeq + 1, picNum - 1 - imageSeq) + }, + }) + } else if (imageSeq == picNum - 1) { + items.push({ + label: "剪切当前图片前面的图片", + onClick: () => { + this.rCutPic(0, imageSeq) + }, + }) + } else { + items.push({ + label: "剪切当前图片后面的图片", + onClick: () => { + this.rCutPic(imageSeq + 1, picNum - 1 - imageSeq) + }, + }) + items.push({ + label: "剪切当前图片前面的图片", + onClick: () => { + this.rCutPic(0, imageSeq) + }, + }) + } + } + if (picNum > 0) { + items.push({ + label: "剪切所有图片", + onClick: () => { + this.rCutPic(0, this.checkPictures.length) + }, + }) + } + + if (this.dataTransOpts.doctorCutPics.length > 0) { + items.splice(0, 0, { + label: "粘贴图片", + onClick: () => { + this.rCopyPic(imageSeq) + }, + }) + if (items.length > 1) { + items.splice(1, 0, { + label: "----------------" + }) + } + } + + + + // items.push({ + // label: "一级菜单", + // children: [ + // { label: "修改姓名", onClick: () => { this.fnUpBaseInfo(row, 'patientName'); } } + // ], + // onClick: () => { //菜单事件 } + // }) + + // 显示明细历次结果 + + + this.$contextmenu({ + items, + event, + x: event.clientX, + y: event.clientY, + customClass: "custom-class", + zIndex: 3, + minWidth: 80, + }); + + return false; + + }, + validateInteger(e, index) { var regex = /^[0-9]*$/; console.log(e, index); diff --git a/src/components/patientRegister/PatientRegisterEdit.vue b/src/components/patientRegister/PatientRegisterEdit.vue index aae9aa4..f362cf4 100644 --- a/src/components/patientRegister/PatientRegisterEdit.vue +++ b/src/components/patientRegister/PatientRegisterEdit.vue @@ -82,7 +82,7 @@ - + @@ -1664,8 +1664,8 @@ export default { this.form.address = idNos.Address this.peoplePhoto = 'data:image/bmp;base64,' + idNos.Photo // this.patientRegister.photo = 'data:image/bmp;base64,' + idNos.Photo - - this.changeIdNo() // 触发身份证查询档案号 + // isNameContinue 身份证号查重后是否姓名查重 + this.changeIdNo('Y') // 触发身份证查询档案号 } else { this.$message.error({ showClose: true, message: `${lres.message}` }) } @@ -1787,9 +1787,10 @@ export default { }, //修改身份证,生成年龄、出生、性别 - changeIdNo() { + // isNameContinue 身份证号查重后是否姓名查重 + changeIdNo(isNameContinue) { if (!this.form.idNo) return - this.Query(this.form.idNo) + this.Query(this.form.idNo,isNameContinue) let ret = parseID(this.form.idNo) // console.log('changeIdNo',ret) if (ret.age != -1) { @@ -1817,11 +1818,13 @@ export default { }, //根据姓名,身份证号 查询档案信息,用于判断人员多次体检 - Query(param) { + // isNameContinue 身份证号查重后是否姓名查重 + Query(param,isNameContinue) { this.patientChoosed = { id: '' } // 清空之前的选择 + //编辑的时候不查重 if (this.form.id || !param) return; - + //// console.log(`/api/app/patient/in-filter?Filter=${param}`) let body = { filter: param, @@ -1836,6 +1839,11 @@ export default { if (res.data && res.data.length > 0) { this.patientList = res.data; this.dialogVisible = true; + }else{ + // 读身份证没 + if(isNameContinue == 'Y' && this.LocalConfig.patientRegister.findPatientByName){ + this.Query(this.form.patientName) + } } } }); diff --git a/src/store/index.js b/src/store/index.js index efa65a4..70a1e46 100644 --- a/src/store/index.js +++ b/src/store/index.js @@ -547,7 +547,9 @@ export default new Vuex.Store({ itemTypeIds: '', //被选中的项目类别ID asbItem: [], //左侧显示的未选组合项目 asbItemAll: [], //所有未选组合项目 - } + }, + + doctorCutPics:[], // 医生诊台剪切图片用 },