pengjun 6 days ago
parent
commit
21f9d3f717
  1. 140
      src/components/doctorCheck/CheckPicture.vue
  2. 22
      src/components/patientRegister/PatientRegisterEdit.vue
  3. 4
      src/store/index.js

140
src/components/doctorCheck/CheckPicture.vue

@ -28,7 +28,8 @@
</el-dropdown>
</div>
<!-- -->
<div :style="`overflow-x: scroll;width:${Math.floor((window.pageWidth - 200 - 110 - 15 - 4))}px;`">
<div :style="`overflow-x: scroll;width:${Math.floor((window.pageWidth - 200 - 110 - 15 - 4))}px;`"
@contextmenu.prevent="onContextmenu">
<div style="display: flex;">
<div class="demo-image__preview" v-for="(item, index) in checkPictures" :key="item.id"
style="display: inline-block; padding: 0 0 0 2px">
@ -46,7 +47,7 @@
</div>
<div style="margin-top: -25px">
<el-image style="width: 80px; height: 80px; border-radius: 5px" :src="imageFilePlus(item.pictureFilename)"
:preview-src-list="previewSrcList(checkPictures, item)">
:data-imageSeq="index" :preview-src-list="previewSrcList(checkPictures, item)">
</el-image>
</div>
<div style="display: flex">
@ -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);

22
src/components/patientRegister/PatientRegisterEdit.vue

@ -82,7 +82,7 @@
</el-col>
<el-col :span="5">
<el-form-item label="身份证号" prop="idNo">
<el-input v-model="form.idNo" placeholder="身份证号" @change="changeIdNo" size="small"></el-input>
<el-input v-model="form.idNo" placeholder="身份证号" @change="changeIdNo('N')" size="small"></el-input>
</el-form-item>
</el-col>
<el-col :span="5">
@ -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)
}
}
}
});

4
src/store/index.js

@ -547,7 +547,9 @@ export default new Vuex.Store({
itemTypeIds: '', //被选中的项目类别ID
asbItem: [], //左侧显示的未选组合项目
asbItemAll: [], //所有未选组合项目
}
},
doctorCutPics:[], // 医生诊台剪切图片用
},

Loading…
Cancel
Save