pengjun 2 months ago
parent
commit
44fb416aab
  1. 68
      src/components/common/CommonTab.vue
  2. 14
      src/components/doctorCheck/CheckItemList.vue
  3. 2
      src/components/doctorCheck/CheckPicture.vue

68
src/components/common/CommonTab.vue

@ -1,43 +1,20 @@
<template> <template>
<div class="tags-list" ref="totalLists"> <div class="tags-list" ref="totalLists">
<div
class="arrow-icon"
@click="arrowBack"
style="position: fixed; left: 4px"
>
<el-button
size="medium"
icon="el-icon-arrow-left"
:disabled="isLeftDisabled"
></el-button>
<el-button icon="el-icon-delete" size="medium" :disabled="tags.length==0" @click="clearControlLabel"></el-button>
<div class="arrow-icon" @click="arrowBack" style="position: fixed; left: 4px">
<el-button size="medium" icon="el-icon-arrow-left" :disabled="isLeftDisabled"></el-button>
<el-button icon="el-icon-delete" size="medium" :disabled="tags.length == 0" @click="clearControlLabel"></el-button>
</div> </div>
<div class="tag-style" ref="tagBox"> <div class="tag-style" ref="tagBox">
<div class="scrollWrapper" ref="scrollWrapper" id="nav"> <div class="scrollWrapper" ref="scrollWrapper" id="nav">
<el-tag
:key="tag.displayName"
size="medium"
v-for="(tag, index) in tags"
:closable="true"
:disable-transitions="false"
@close="handleClose(tag, index)"
@click="changeMenu(tag)"
:effect="$route.name === tag.displayName ? 'dark' : 'plain'"
>
<el-tag :key="tag.displayName" size="medium" v-for="(tag, index) in tags" :closable="true"
:disable-transitions="false" @close="handleClose(tag, index)" @click="changeMenu(tag)"
:effect="$route.name === tag.displayName ? 'dark' : 'plain'">
{{ tag.displayName }} {{ tag.displayName }}
</el-tag> </el-tag>
</div> </div>
</div> </div>
<div
class="arrow-icon"
@click="arrowForward"
style="position: fixed; right: 4px"
>
<el-button
size="medium"
icon="el-icon-arrow-right"
:disabled="isRightDisabled"
></el-button>
<div class="arrow-icon" @click="arrowForward" style="position: fixed; right: 4px">
<el-button size="medium" icon="el-icon-arrow-right" :disabled="isRightDisabled"></el-button>
</div> </div>
</div> </div>
</template> </template>
@ -170,9 +147,28 @@ export default {
} }
}); });
}, },
handleClose(tag, index) { handleClose(tag, index) {
let length = this.tags.length - 1; let length = this.tags.length - 1;
this.close(tag); this.close(tag);
// add by pengj 2026-02-26
if (tag?.displayName == "体检医生诊台" && this.$peisAPI) {
console.log("CommonTab.handleClose", tag)
try {
//
this.$peisAPI.removeAllListeners("event-from-picture-hot-key-main")
this.$peisAPI.removeAllListeners("event-from-picture-and-print-hot-key-main")
this.$peisAPI.removeAllListeners("event-from-picture-print-hot-key-main")
this.$peisAPI.removeAllListeners("event-from-picture-cancel-print-hot-key-main")
this.$peisAPI.removeAllListeners("event-from-picture-delete-hot-key-main")
//
this.$peisAPI.removeAllListeners("serial:data")
} catch (error) {
console.error(error)
}
}
// //
if (tag.displayName !== this.$route.name) { if (tag.displayName !== this.$route.name) {
this.handleScroll(); this.handleScroll();
@ -238,6 +234,7 @@ export default {
<style scoped lang="scss"> <style scoped lang="scss">
@import '../../assets/css/global_button.css'; @import '../../assets/css/global_button.css';
.tags-list { .tags-list {
display: flex; display: flex;
align-items: center; align-items: center;
@ -250,6 +247,7 @@ export default {
box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.12), 0 0 3px 0 rgba(0, 0, 0, 0.04); box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.12), 0 0 3px 0 rgba(0, 0, 0, 0.04);
padding-bottom: 0; padding-bottom: 0;
} }
.tag-style { .tag-style {
display: flex; display: flex;
align-items: center; align-items: center;
@ -259,36 +257,44 @@ export default {
position: relative; position: relative;
margin: 0 64px 0 138px; margin: 0 64px 0 138px;
} }
.scrollWrapper { .scrollWrapper {
display: flex; display: flex;
align-items: center; align-items: center;
overflow-x: auto; overflow-x: auto;
transition: all 500ms linear; transition: all 500ms linear;
} }
.scrollWrapper::-webkit-scrollbar { .scrollWrapper::-webkit-scrollbar {
height: 0; height: 0;
} }
.el-tag { .el-tag {
margin: 0 5px; margin: 0 5px;
cursor: pointer; cursor: pointer;
padding: 0 0px 0 10px; padding: 0 0px 0 10px;
} }
.el-tag .el-tag--info { .el-tag .el-tag--info {
background: #fff; background: #fff;
} }
::v-deep .el-tag .el-icon-close { ::v-deep .el-tag .el-icon-close {
right: 0px; right: 0px;
} }
.arrow-icon { .arrow-icon {
pointer-events: all; pointer-events: all;
cursor: pointer; cursor: pointer;
} }
.arrow-style { .arrow-style {
font-size: 16px; font-size: 16px;
padding: 0 8px; padding: 0 8px;
position: relative; position: relative;
top: 8px; top: 8px;
} }
.arrow-icon .el-button { .arrow-icon .el-button {
padding: 0px 5px; padding: 0px 5px;
height: 28px; height: 28px;

14
src/components/doctorCheck/CheckItemList.vue

@ -313,7 +313,7 @@ export default {
this.onContextMenuDIY(data) this.onContextMenuDIY(data)
}); });
//
//
this.$peisAPI.onSerialData((data) => { this.$peisAPI.onSerialData((data) => {
this.onSerialData(data) this.onSerialData(data)
}); });
@ -328,6 +328,18 @@ export default {
this.userInfo.user = window.sessionStorage.getItem("user") || null; this.userInfo.user = window.sessionStorage.getItem("user") || null;
}, },
//
beforeDestroy(){
if (this.$peisAPI) {
try {
//
this.$peisAPI.removeAllListeners("serial:data")
} catch (error) {
console.error(error)
}
}
},
computed: { computed: {
...mapState([ ...mapState([
"window", "window",

2
src/components/doctorCheck/CheckPicture.vue

@ -324,7 +324,9 @@ export default {
// //
beforeDestroy(){ beforeDestroy(){
if (this.$peisAPI) { if (this.$peisAPI) {
console.log('采图 beforeDestroy')
try { try {
//
this.$peisAPI.removeAllListeners("event-from-picture-hot-key-main") this.$peisAPI.removeAllListeners("event-from-picture-hot-key-main")
this.$peisAPI.removeAllListeners("event-from-picture-and-print-hot-key-main") this.$peisAPI.removeAllListeners("event-from-picture-and-print-hot-key-main")
this.$peisAPI.removeAllListeners("event-from-picture-print-hot-key-main") this.$peisAPI.removeAllListeners("event-from-picture-print-hot-key-main")

Loading…
Cancel
Save