|
|
|
@ -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); |
|
|
|
|