提交 9e5fc861 编写于 作者: 张磊's avatar 张磊

save

......@@ -1308,7 +1308,6 @@
"resolved": "http://192.168.110.93:4873/boom/-/boom-2.10.1.tgz",
"integrity": "sha1-OciRjO/1eZ+D+UkqhI9iWt0Mdm8=",
"dev": true,
"optional": true,
"requires": {
"hoek": "2.x.x"
}
......@@ -2832,8 +2831,7 @@
"ansi-regex": {
"version": "2.1.1",
"bundled": true,
"dev": true,
"optional": true
"dev": true
},
"aproba": {
"version": "1.2.0",
......@@ -2854,14 +2852,12 @@
"balanced-match": {
"version": "1.0.0",
"bundled": true,
"dev": true,
"optional": true
"dev": true
},
"brace-expansion": {
"version": "1.1.11",
"bundled": true,
"dev": true,
"optional": true,
"requires": {
"balanced-match": "^1.0.0",
"concat-map": "0.0.1"
......@@ -2876,20 +2872,17 @@
"code-point-at": {
"version": "1.1.0",
"bundled": true,
"dev": true,
"optional": true
"dev": true
},
"concat-map": {
"version": "0.0.1",
"bundled": true,
"dev": true,
"optional": true
"dev": true
},
"console-control-strings": {
"version": "1.1.0",
"bundled": true,
"dev": true,
"optional": true
"dev": true
},
"core-util-is": {
"version": "1.0.2",
......@@ -3006,8 +2999,7 @@
"inherits": {
"version": "2.0.4",
"bundled": true,
"dev": true,
"optional": true
"dev": true
},
"ini": {
"version": "1.3.5",
......@@ -3019,7 +3011,6 @@
"version": "1.0.0",
"bundled": true,
"dev": true,
"optional": true,
"requires": {
"number-is-nan": "^1.0.0"
}
......@@ -3034,7 +3025,6 @@
"version": "3.0.4",
"bundled": true,
"dev": true,
"optional": true,
"requires": {
"brace-expansion": "^1.1.7"
}
......@@ -3042,14 +3032,12 @@
"minimist": {
"version": "1.2.5",
"bundled": true,
"dev": true,
"optional": true
"dev": true
},
"minipass": {
"version": "2.9.0",
"bundled": true,
"dev": true,
"optional": true,
"requires": {
"safe-buffer": "^5.1.2",
"yallist": "^3.0.0"
......@@ -3068,7 +3056,6 @@
"version": "0.5.3",
"bundled": true,
"dev": true,
"optional": true,
"requires": {
"minimist": "^1.2.5"
}
......@@ -3130,8 +3117,7 @@
"npm-normalize-package-bin": {
"version": "1.0.1",
"bundled": true,
"dev": true,
"optional": true
"dev": true
},
"npm-packlist": {
"version": "1.4.8",
......@@ -3159,8 +3145,7 @@
"number-is-nan": {
"version": "1.0.1",
"bundled": true,
"dev": true,
"optional": true
"dev": true
},
"object-assign": {
"version": "4.1.1",
......@@ -3172,7 +3157,6 @@
"version": "1.4.0",
"bundled": true,
"dev": true,
"optional": true,
"requires": {
"wrappy": "1"
}
......@@ -3250,8 +3234,7 @@
"safe-buffer": {
"version": "5.1.2",
"bundled": true,
"dev": true,
"optional": true
"dev": true
},
"safer-buffer": {
"version": "2.1.2",
......@@ -3287,7 +3270,6 @@
"version": "1.0.2",
"bundled": true,
"dev": true,
"optional": true,
"requires": {
"code-point-at": "^1.0.0",
"is-fullwidth-code-point": "^1.0.0",
......@@ -3307,7 +3289,6 @@
"version": "3.0.1",
"bundled": true,
"dev": true,
"optional": true,
"requires": {
"ansi-regex": "^2.0.0"
}
......@@ -3351,14 +3332,12 @@
"wrappy": {
"version": "1.0.2",
"bundled": true,
"dev": true,
"optional": true
"dev": true
},
"yallist": {
"version": "3.1.1",
"bundled": true,
"dev": true,
"optional": true
"dev": true
}
}
},
......@@ -3739,8 +3718,7 @@
"version": "2.16.3",
"resolved": "http://192.168.110.93:4873/hoek/-/hoek-2.16.3.tgz",
"integrity": "sha1-ILt0A9POo5jpHcRxCo/xuCdKJe0=",
"dev": true,
"optional": true
"dev": true
},
"home-or-tmp": {
"version": "2.0.0",
......
......@@ -66,7 +66,7 @@ export default {
},
mounted() {
setTimeout( function () {
bindDragHeader('.c-header', '.chat-wrap');
bindDragHeader('.c-header', '.chat-wrap','.wenzenbox');
}, 1000)
},
......
......@@ -4,463 +4,499 @@
right: 20px;
z-index: 1000;
width: 640px;
height: 733px;
min-height: 700px;
background: #ffffff;
box-shadow: 10px 10px 50px 0px #D9D9D9;
box-shadow: 10px 10px 50px 0px #d9d9d9;
overflow: hidden;
border-radius: 18px;
.component-content {
.center {
//margin-left: 10%;
//margin-right: 10%;
flex: 1;
background: #fff;
.c-header {
//height: 40px;
padding: 15px 24px;
.header-line {
display: flex;
flex-direction: row;
justify-content: space-between;
align-items: center;
.component-content {
.center {
//margin-left: 10%;
//margin-right: 10%;
flex: 1;
background: #fff;
.c-header {
//height: 40px;
padding: 15px 24px;
.header-line {
display: flex;
flex-direction: row;
justify-content: space-between;
align-items: center;
}
.c-header-l {
color: #063948;
.num {
font-size: 28px;
}
.c-header-l {
color: #063948;
.num{
font-size: 28px;
}
.dep{
font-size: 20px;
}
.dep {
font-size: 20px;
}
.c-header-edit{
display: flex;
min-width: 140px;
justify-content: space-around;
.edit-img{
width: 24px;
height: 24px;
img{
width: 100%;
height: 100%;
}
}
.edit-imgclose{
width: 70px;
height: 24px;
background: #FF5E57;
border-radius: 12px;
font-size: 13px;
font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400;
color: #FFFFFF;
line-height: 24px;
user-select:none;
}
.c-header-edit {
display: flex;
min-width: 140px;
justify-content: space-around;
.edit-img {
width: 24px;
height: 24px;
img {
width: 100%;
height: 100%;
}
}
.edit-imgclose {
width: 70px;
height: 24px;
background: #ff5e57;
border-radius: 12px;
font-size: 13px;
font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400;
color: #ffffff;
line-height: 24px;
user-select: none;
}
}
.msg-content {
height: 400px;
background: #F0F2F5;
word-break: break-all;
overflow: scroll;
}
.msg-content {
height: 400px;
background: #f0f2f5;
word-break: break-all;
overflow: scroll;
display: flex;
flex-direction: column;
margin-top: 10px;
.msg-item {
display: flex;
flex-direction: column;
margin-top: 10px;
.msg-item {
flex-direction: row;
margin: 12px 0;
.msg-item-img {
width: 36px;
height: 36px;
margin-right: 12px;
& > img {
width: 100%;
height: 100%;
border-radius: 22px;
}
}
.msg-item-detail {
display: flex;
flex-direction: row;
margin: 12px 0;
.msg-item-img {
width: 36px;
height: 36px;
margin-right: 12px;
& > img {
width: 100%;
height: 100%;
border-radius: 22px;
}
flex-direction: column;
text-align: left;
font-size: 13px;
& > :first-child {
color: #999999;
margin-bottom: 8px;
}
.msg-item-detail {
display: flex;
flex-direction: column;
text-align: left;
font-size: 13px;
& > :first-child {
color: #999999;
margin-bottom: 8px;
.send-warpper {
// display: flex;
// flex-direction: row;
// align-items: center;
& > .icon {
float: left;
width: 20px;
height: 20px;
margin-right: 10px;
margin-top: 10px;
}
.send-warpper {
.mid-text-wrapper {
display: inline-block;
// display: flex;
// flex-direction: row;
// align-items: center;
& > .icon {
float: left;
width: 20px;
height: 20px;
margin-right: 10px;
margin-top: 10px;
}
.mid-text-wrapper {
display: inline-block;
// display: flex;
// flex-direction: row;
// align-items: center;
// & > img {
// width: 18px;
// height: 18px;
// margin-right: 8px;
// cursor: pointer;
// }
}
.mid-text {
padding: 12px 16px;
display: inline-block;
max-width: 520px;
border-radius: 8px;
text-align: justify;
&.no-support {
display: flex;
align-items: center;
& > img {
width: 14px;
height: 14px;
margin-right: 3px;
}
}
}
.link {
color: #ffffff;
}
& > .mid-pdf {
width: 260px;
display: flex;
flex-direction: row;
justify-content: space-between;
text-align: left;
padding: 10px 15px;
//background: #f0f1f2;
border-radius: 8px;
min-height: 80px;
cursor: pointer;
.midp-left {
display: flex;
flex-direction: column;
justify-content: space-around;
margin-right: 10px;
.name {
font-size: 13px;
color: #333333;
word-break: break-word;
}
.size {
font-size: 12px;
color: #999999;
}
}
.midp-icon {
width: 36px;
height: 44px;
& > img {
width: 36px;
height: 100%;
border-radius: 3px;
}
}
}
& > .mid-img {
// & > img {
// width: 18px;
// height: 18px;
// margin-right: 8px;
// cursor: pointer;
// }
}
.mid-text {
padding: 12px 16px;
display: inline-block;
max-width: 520px;
border-radius: 8px;
text-align: justify;
&.no-support {
display: flex;
flex-direction: row;
align-items: center;
cursor: pointer;
// & > .icon {
// width: 20px;
// height: 20px;
// }
// & > .img {
// width: 170px;
// height: 108px;
// border-radius: 8px;
// }
.img-box {
max-width: 192px;
max-height: 320px;
overflow: hidden;
& > img {
width: 14px;
height: 14px;
margin-right: 3px;
}
}
& > .diagnosis-box {
width: 260px;
text-align: left;
padding: 10px 15px;
//background: #ffffff;
border-radius: 8px;
min-height: 80px;
.title {
padding-bottom: 10px;
font-size: 14px;
font-weight: 700;
}
.link {
color: #ffffff;
}
& > .mid-pdf {
width: 260px;
display: flex;
flex-direction: row;
justify-content: space-between;
text-align: left;
padding: 10px 15px;
//background: #f0f1f2;
border-radius: 8px;
min-height: 80px;
cursor: pointer;
.midp-left {
display: flex;
flex-direction: column;
justify-content: space-around;
margin-right: 10px;
.name {
font-size: 13px;
color: #333333;
word-break: break-word;
}
.dia-text {
.size {
font-size: 12px;
.label {
color: #ffffff;
}
color: #999999;
}
}
& > .time-box {
width: 260px;
text-align: left;
padding: 10px 15px;
//background: #ffffff;
border-radius: 8px;
min-height: 80px;
.title {
padding-bottom: 10px;
font-size: 14px;
font-weight: 700;
}
.time {
padding-bottom: 10px;
font-size:12px;
font-weight: 700;
}
.time-text {
font-size: 12px;
.midp-icon {
width: 36px;
height: 44px;
& > img {
width: 36px;
height: 100%;
border-radius: 3px;
}
}
& > .suggession-box {
width: 260px;
text-align: left;
padding: 10px 15px;
//background: #f0f1f2;
border-radius: 8px;
min-height: 80px;
.title {
padding-bottom: 10px;
font-size: 14px;
font-weight: 700;
}
.suggession-text {
font-size: 12px;
.label {
}
}
& > .mid-img {
display: flex;
flex-direction: row;
align-items: center;
cursor: pointer;
// & > .icon {
// width: 20px;
// height: 20px;
// }
// & > .img {
// width: 170px;
// height: 108px;
// border-radius: 8px;
// }
.img-box {
max-width: 192px;
max-height: 320px;
overflow: hidden;
}
}
& > .diagnosis-box {
width: 260px;
text-align: left;
padding: 10px 15px;
//background: #ffffff;
border-radius: 8px;
min-height: 80px;
.title {
padding-bottom: 10px;
font-size: 14px;
font-weight: 700;
}
.dia-text {
font-size: 12px;
.label {
color: #ffffff;
}
}
}
& > .time-box {
width: 260px;
text-align: left;
padding: 10px 15px;
//background: #ffffff;
border-radius: 8px;
min-height: 80px;
.title {
padding-bottom: 10px;
font-size: 14px;
font-weight: 700;
}
& > .audio-box audio {
width: 242px;
height: 44px;
//background: #EBF5FC;
border-radius: 20px;
.time {
padding-bottom: 10px;
font-size: 12px;
font-weight: 700;
}
& > .live-box {
width: 202px;
height: 44px;
line-height: 44px;
background: #ffffff;
border-radius: 8px;
text-align: center;
.time-text {
font-size: 12px;
}
& > .diagnosis-end {
width: 100%;
.split-line {
width: 100%;
display: flex;
flex-direction: row;
align-items: center;
margin: 15px 0;
font-size: 14px;
&::before {
flex: 1;
content: '';
height: 1px;
margin-right: 18px;
//background: #f0f1f2;
}
&::after {
flex: 1;
content: '';
height: 1px;
margin-left: 18px;
//background: #f0f1f2;
}
}
& > .suggession-box {
width: 260px;
text-align: left;
padding: 10px 15px;
//background: #f0f1f2;
border-radius: 8px;
min-height: 80px;
.title {
padding-bottom: 10px;
font-size: 14px;
font-weight: 700;
}
.suggession-text {
font-size: 12px;
.label {
}
}
}
}
.msg-item-detail.line {
width: 100%;
}
&.cr {
flex-direction: row-reverse;
//justify-content: flex-end;
.msg-item-img {
margin-right: 0;
margin-left: 8px;
& > .audio-box audio {
width: 242px;
height: 44px;
//background: #EBF5FC;
border-radius: 20px;
}
& > .live-box {
width: 202px;
height: 44px;
line-height: 44px;
background: #ffffff;
border-radius: 8px;
text-align: center;
}
.msg-item-detail {
text-align: right;
& > .mid-text {
background: #449284;
& > .diagnosis-end {
width: 100%;
.split-line {
width: 100%;
display: flex;
flex-direction: row;
align-items: center;
margin: 15px 0;
font-size: 14px;
&::before {
flex: 1;
content: "";
height: 1px;
margin-right: 18px;
//background: #f0f1f2;
}
&::after {
flex: 1;
content: "";
height: 1px;
margin-left: 18px;
//background: #f0f1f2;
}
}
}
}
}
.msg-item{
color: #063948;
.mid-text{
background: #ffffff;
}
.msg-item-detail.line {
width: 100%;
}
.cr{
color: #ffffff;
.mid-text, .live-notice, .time-box, .diagnosis-box, .suggession-box{
background: #449284;
.time{
color: #ffffff;
&.cr {
flex-direction: row-reverse;
//justify-content: flex-end;
.msg-item-img {
margin-right: 0;
margin-left: 8px;
}
.msg-item-detail {
text-align: right;
& > .mid-text {
background: #449284;
}
}
}
.split-line {
width: 100%;
display: flex;
flex-direction: row;
align-items: center;
margin: 15px 0;
font-size: 14px;
color: #999999;
&::before {
flex: 1;
content: '';
height: 1px;
margin-right: 18px;
background: #f0f1f2;
}
&::after {
flex: 1;
content: '';
height: 1px;
margin-left: 18px;
background: #f0f1f2;
}
}
.msg-item {
color: #063948;
.mid-text {
background: #ffffff;
}
.error-mg {
display: inline-block;
max-width: 520px;
// height: 24px;
max-width: 520px;
line-height: 16px;
text-align: left;
border-radius: 20px;
opacity: 0.45;
margin: -2px 0 10px;
padding: 4px 12px;
color: #FFFFFF;
background: #000000;
margin-left: 50px;
&.mr {
margin-left: 0;
margin-right: 50px;
}
.cr {
color: #ffffff;
.mid-text,
.live-notice,
.time-box,
.diagnosis-box,
.suggession-box {
background: #449284;
.time {
color: #ffffff;
}
}
}
.msg-content::-webkit-scrollbar
{
width: 0px;
height: 0px;
background-color: #fff;
}
.c-bottom {
position: relative;
top: -8px;
left: 0;
.split-line {
width: 100%;
display: flex;
align-items: center;
flex-direction: row;
margin: 16px 12px 16px 25px;
.cb-icon-wrapper {
display: flex;
align-items: center;
height: 44px;
img {
width: 20px;
height: 20px;
margin-right: 16px;
cursor: pointer;
}
}
.send-btn {
width: 86px;
height: 33px;
background: #449284;
border-radius: 23px;
color: #ffffff;
border: none;
font-size: 14px;
font-weight: bold;
align-items: center;
margin: 15px 0;
font-size: 14px;
color: #999999;
&::before {
flex: 1;
content: "";
height: 1px;
margin-right: 18px;
background: #f0f1f2;
}
::v-deep.el-textarea{
.el-textarea__inner{
border: none;
}
&::after {
flex: 1;
content: "";
height: 1px;
margin-left: 18px;
background: #f0f1f2;
}
::v-deep.c-bottom-input{
//border: 4px solid #0d9078 !important;
::v-deep textarea{
border: none!important ;
}
}
.error-mg {
display: inline-block;
max-width: 520px;
// height: 24px;
max-width: 520px;
line-height: 16px;
text-align: left;
border-radius: 20px;
opacity: 0.45;
margin: -2px 0 10px;
padding: 4px 12px;
color: #ffffff;
background: #000000;
margin-left: 50px;
&.mr {
margin-left: 0;
margin-right: 50px;
}
}
&.no-content {
}
.msg-content::-webkit-scrollbar {
width: 0px;
height: 0px;
background-color: #fff;
}
.c-bottom {
position: relative;
top: -8px;
left: 0;
display: flex;
align-items: center;
flex-direction: row;
margin: 16px 12px 16px 25px;
.cb-icon-wrapper {
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
height: 44px;
img {
display: block;
width: 120px;
height: 100px;
width: 20px;
height: 20px;
margin-right: 16px;
cursor: pointer;
}
p {
margin-top: 10px;
font-size: 14px;
color: rgba(0, 0, 0, 0.65);
}
.send-btn {
width: 86px;
height: 33px;
background: #449284;
border-radius: 23px;
color: #ffffff;
border: none;
font-size: 14px;
font-weight: bold;
}
::v-deep.el-textarea {
.el-textarea__inner {
border: none;
}
}
::v-deep.c-bottom-input {
//border: 4px solid #0d9078 !important;
::v-deep textarea {
border: none !important ;
}
}
}
background: #fff;
.time {
color: #999999;
&.no-content {
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
img {
display: block;
width: 120px;
height: 100px;
}
p {
margin-top: 10px;
font-size: 14px;
color: rgba(0, 0, 0, 0.65);
}
}
}
background: #fff;
.time {
color: #999999;
}
.small {
font-size: 12px;
}
.ld {
-webkit-transition-property: -webkit-transform;
-webkit-transition-duration: 1s;
-moz-transition-property: -moz-transform;
-moz-transition-duration: 1s;
-webkit-animation: rotate 3s linear infinite;
-moz-animation: rotate 3s linear infinite;
-o-animation: rotate 3s linear infinite;
animation: rotate 3s linear infinite;
}
@-webkit-keyframes rotate {
from {
-webkit-transform: rotate(0deg);
}
to {
-webkit-transform: rotate(360deg);
}
.small {
font-size: 12px;
}
@-moz-keyframes rotate {
from {
-moz-transform: rotate(0deg);
}
.ld{
-webkit-transition-property: -webkit-transform;
-webkit-transition-duration: 1s;
-moz-transition-property: -moz-transform;
-moz-transition-duration: 1s;
-webkit-animation: rotate 3s linear infinite;
-moz-animation: rotate 3s linear infinite;
-o-animation: rotate 3s linear infinite;
animation: rotate 3s linear infinite;
to {
-moz-transform: rotate(359deg);
}
@-webkit-keyframes rotate{from{-webkit-transform: rotate(0deg)}
to{-webkit-transform: rotate(360deg)}
}
@-o-keyframes rotate {
from {
-o-transform: rotate(0deg);
}
@-moz-keyframes rotate{from{-moz-transform: rotate(0deg)}
to{-moz-transform: rotate(359deg)}
to {
-o-transform: rotate(359deg);
}
@-o-keyframes rotate{from{-o-transform: rotate(0deg)}
to{-o-transform: rotate(359deg)}
}
@keyframes rotate {
from {
transform: rotate(0deg);
}
@keyframes rotate{from{transform: rotate(0deg)}
to{transform: rotate(359deg)}
to {
transform: rotate(359deg);
}
}
}
.shrink64{
height: 64px;
}
.wenzenbox {
width: 120px;
height: 120px;
img{
width: 120px;
height: 120px;
}
}
.shrink64 {
height: 120px;
width: 120px;
background-color: transparent;
box-shadow:none;
overflow: hidden;
border-radius: 18px;
}
<template>
<div class="chat-wrap" :class="toggleChatSize ? 'shrink64' : ''" v-show="showChat">
<section class="component-content" id="screenSet">
<article
class="center"
v-loadmore="getOldMSGHistory"
>
<div
class="chat-wrap"
:class="!toggleChatSize ? 'shrink64' : ''"
v-show="showChat"
>
<section v-show="toggleChatSize" class="component-content" id="screenSet">
<article class="center" v-loadmore="getOldMSGHistory">
<section class="c-header">
<div class="header-line">
<div class="c-header-l">
<span class="num">{{currentChat.diagnoseLogId}}</span>
<span class="dep">&nbsp;{{currentChat.department}}</span>
<span class="num">{{ currentChat.diagnoseLogId }}</span>
<span class="dep">&nbsp;{{ currentChat.department }}</span>
</div>
<div class="c-header-edit">
<span class="edit-imgclose" @click="overFn">
结束问诊
</span>
<span class="edit-imgclose" @click="overFn"> 结束问诊 </span>
<span class="edit-img" @click="closeChat">
<img src="../../assets/image/IM/im_close2.png" alt />
</span>
<img src="../../assets/image/IM/im_close2.png" alt />
</span>
<span class="edit-img" @click="toggleChatModal">
<img src="../../assets/image/IM/im_small.png" alt />
</span>
<img src="../../assets/image/IM/im_small.png" alt />
</span>
</div>
</div>
<div class="header-line">
</div>
<div class="header-line"></div>
</section>
<diagnosis-Live :doctorImg="doctorImg"></diagnosis-Live>
<section id="msgContentId" class="msg-content scroll-box">
<article
v-for="(item, index) in messageList"
:key="index">
<article v-for="(item, index) in messageList" :key="index">
<!-- sendOrReceive 为true在右边 -->
<div class="msg-item" :class="{'cr': item.sendOrReceive}">
<div class="msg-item" :class="{ cr: item.sendOrReceive }">
<div v-if="item.showType != 10" class="msg-item-img">
<img :src="item.avatarImg" alt />
</div>
<div class="msg-item-detail" :class="{'line': item.showType == 10}">
<span v-if="item.showType != 10" class="mid-time">{{item.name}} {{item.timestampStr}}</span>
<div
class="msg-item-detail"
:class="{ line: item.showType == 10 }"
>
<span v-if="item.showType != 10" class="mid-time"
>{{ item.name }} {{ item.timestampStr }}</span
>
<div class="send-warpper">
<img
v-if="item.sendOrReceive && item.isShowErrorIcon"
......@@ -52,72 +52,90 @@
src="../../assets/image/IM/loading-icon-new.png"
alt
/>
<div v-if="item.showType == 1" class="mid-text-wrapper" style="max-width: 520px;">
<div class="mid-text">{{item.text}}</div>
<div
v-if="item.showType == 1"
class="mid-text-wrapper"
style="max-width: 520px"
>
<div class="mid-text">{{ item.text }}</div>
</div>
<div v-if="item.showType == 2" class="mid-img" v-viewer>
<div class="img-box">
<img
class="img"
:src="item.url"
:style="{width: item.newW + 'px', height: item.newH + 'px' }"
:style="{
width: item.newW + 'px',
height: item.newH + 'px',
}"
alt
/>
</div>
</div>
<div v-if="item.showType == 3" class="mid-pdf" @click="openPDF(item)">
<div
v-if="item.showType == 3"
class="mid-pdf"
@click="openPDF(item)"
>
<div class="midp-left">
<span class="name">{{item.text | shortName(23)}}</span>
<span class="size">{{fileSizeChange(item.size)}}</span>
<span class="name">{{ item.text | shortName(23) }}</span>
<span class="size">{{ fileSizeChange(item.size) }}</span>
</div>
<div class="midp-icon">
<img src="../../assets/image/IM/icon-pdf.png" alt />
</div>
</div>
<div v-if="item.showType == 4" class="mid-text">
{{item.text}}
<span class="link">{{item.suffix}}</span>
{{ item.text }}
<span class="link">{{ item.suffix }}</span>
</div>
<div v-if="item.showType == 5" class="mid-text no-support">
<img src="../../assets/image/IM/icon-warning-circle.png" alt />
<img
src="../../assets/image/IM/icon-warning-circle.png"
alt
/>
<span>该消息类型PC端暂不支持</span>
</div>
<!-- 语音消息 -->
<div v-if="item.showType == 6" class="audio-box">
<audio controls>
<source :src="item.url" type="audio/mpeg">
<source :src="item.url" type="audio/mpeg" />
</audio>
</div>
<!-- 问诊开始与病例模块 -->
<div v-if="item.showType == 7" class="diagnosis-box">
<div class="title">{{item.title}}</div>
<div class="title">{{ item.title }}</div>
<div class="dia-text">
<span class="label">患者:</span>
<span>{{item.text.patientName}} {{item.text.sex == 1 ? '男' : '女'}} {{item.text.age}}</span>
<span
>{{ item.text.patientName }}
{{ item.text.sex == 1 ? "男" : "女" }}
{{ item.text.age }}</span
>
</div>
<div class="dia-text">
<span class="label">病情描述:</span>
<span>{{item.text.illnessDetail}}</span>
<span>{{ item.text.illnessDetail }}</span>
</div>
</div>
<!-- 预约时间模块 -->
<div v-if="item.showType == 8" class="time-box">
<div class="title">{{item.title}}</div>
<div class="time">{{item.text.timeStr}}</div>
<div class="time-text">{{item.text.tips}}</div>
<div class="title">{{ item.title }}</div>
<div class="time">{{ item.text.timeStr }}</div>
<div class="time-text">{{ item.text.tips }}</div>
</div>
<!-- 音视频与IM的交互 -->
<div v-if="item.showType == 9" class="live-box">
<div class="live-notice">{{item.text}}</div>
<div class="live-notice">{{ item.text }}</div>
</div>
<!-- 问诊结束 -->
<div v-if="item.showType == 10" class="diagnosis-end">
<div class="split-line">{{item.text}}</div>
<div class="split-line">{{ item.text }}</div>
</div>
<!-- 医生建议模块 -->
<div v-if="item.showType == 11" class="suggession-box">
<div class="title">{{item.title}}</div>
<div class="suggession-text">{{item.text}}</div>
<div class="title">{{ item.title }}</div>
<div class="suggession-text">{{ item.text }}</div>
</div>
</div>
</div>
......@@ -125,12 +143,19 @@
<span
v-if="item.sendOrReceive && item.isShowErrorMsg"
class="error-mg"
:class="{'mr': item.sendOrReceive}"
>{{item.errorMsg}}</span>
:class="{ mr: item.sendOrReceive }"
>{{ item.errorMsg }}</span
>
</article>
</section>
<section class="c-bottom">
<el-input type="textarea" class="c-bottom-input" placeholder="请输入内容" v-model="sendText" maxlength="499"></el-input>
<el-input
type="textarea"
class="c-bottom-input"
placeholder="请输入内容"
v-model="sendText"
maxlength="499"
></el-input>
<div class="cb-icon-wrapper">
<el-upload
class="bg-uploader"
......@@ -141,16 +166,26 @@
>
<img src="../../assets/image/IM/im_sendfile.png" alt />
</el-upload>
<img src="../../assets/image/IM/im_sendvedio.png" @click="preSendLinkMsg" alt />
<img
src="../../assets/image/IM/im_sendvedio.png"
@click="preSendLinkMsg"
alt
/>
</div>
<el-button size="small" class="send-btn" :class="{'active': canSend}" @click="sendTextMsg">
<el-button
size="small"
class="send-btn"
:class="{ active: canSend }"
@click="sendTextMsg"
>
发送
</el-button>
</section>
</article>
</section>
<div v-show="!toggleChatSize" class="wenzenbox" @click="toggleChatModal">
<img src="../../assets/image/IM/wenzhenicon.png" alt="" />
</div>
<!-- 选择链接弹窗 -->
<el-dialog
title="选择链接"
......@@ -161,15 +196,28 @@
width="500px"
class="link-form"
>
<el-form ref="linkFormRef" :rules="rules" :model="linkForm" label-width="100px">
<el-form
ref="linkFormRef"
:rules="rules"
:model="linkForm"
label-width="100px"
>
<el-form-item label="普通文本">
<el-col :span="20">
<el-input v-model="linkForm.remark" size="small" maxlength="300"></el-input>
<el-input
v-model="linkForm.remark"
size="small"
maxlength="300"
></el-input>
</el-col>
</el-form-item>
<el-form-item label="链接文案" prop="info">
<el-col :span="20">
<el-input v-model="linkForm.info" size="small" maxlength="100"></el-input>
<el-input
v-model="linkForm.info"
size="small"
maxlength="100"
></el-input>
</el-col>
</el-form-item>
<el-form-item label="链接地址" prop="url">
......@@ -192,9 +240,13 @@
</el-col>
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer" style="text-align: right;">
<el-button size="small" @click="showSelectDialog = false">取 消</el-button>
<el-button size="small" type="primary" @click="sendLinkMsg">确 定</el-button>
<div slot="footer" class="dialog-footer" style="text-align: right">
<el-button size="small" @click="showSelectDialog = false"
>取 消</el-button
>
<el-button size="small" type="primary" @click="sendLinkMsg"
>确 定</el-button
>
</div>
</el-dialog>
<alert ref="alert"></alert>
......@@ -207,7 +259,7 @@ import diagnosisLive from "./diagnosis-live";
import { doUpload, getFilePath } from "@/utils/qiniu-util";
import { openLoading, closeLoading, betaHandle } from "@/utils/utils";
import { getPicaKFAccid, getPhomeDemain } from "@/utils";
import {mapState} from "vuex";
import { mapState } from "vuex";
const CONTAINER_HEIGHT = 700;
let forwardMsgIntervalId = null,
continueIntervalId = null,
......@@ -219,7 +271,7 @@ export default {
components: {
BreadCrumb,
diagnosisLive,
alert
alert,
},
props: {
showChat: {
......@@ -236,7 +288,7 @@ export default {
currentTimestamp: 0,
myTaskCount: 0,
sessionList: [],
waitingTaskCount: 0
waitingTaskCount: 0,
},
currentContinueTimes: 0,
currentSessionIndex: 0, // 当前会话序号
......@@ -250,34 +302,34 @@ export default {
linkForm: {
remark: "",
info: "",
url: ""
url: "",
},
linkList: [], // 消息列表 showType 1: 文本; 2: 图片; 3: PDF; 4: 链接; 5: 不支持类型; 6: 语音;7: 病例;
messageList: [],
rules: {
info: [
{ required: true, message: "请填写链接显示文案", trigger: "blur" }
{ required: true, message: "请填写链接显示文案", trigger: "blur" },
],
url: [{ required: true, message: "请选择链接", trigger: "change" }]
url: [{ required: true, message: "请选择链接", trigger: "change" }],
},
imgWidth: 0,
imgHeight: 0,
imgProportion: 0,
hasNoHistoryData: false,
tid: '',
tid: "",
teamMemberList: [],
doctorName: '',
doctorImg: '',
toggleChatSize: false
doctorName: "",
doctorImg: "",
toggleChatSize: false,
};
},
computed: {
...mapState({
currentChat: 'currentChat',
currentChat: "currentChat",
}),
canSend() {
return !!this.sendText;
}
},
},
watch: {
......@@ -293,22 +345,20 @@ export default {
}
}
},
deep: true
deep: true,
},
// 监听到有变化,就缓存一下
sendText(newText) {
cacheMap[this.currentSession.id] = newText || "";
},
currentChat (newVal, oldVal) {
if(newVal !== oldVal && newVal.imTeamId){
currentChat(newVal, oldVal) {
if (newVal !== oldVal && newVal.imTeamId) {
this.chatInit();
}
}
},
},
created() {
},
created() {},
mounted() {
cacheMap = {};
......@@ -319,11 +369,11 @@ export default {
},
methods: {
chatInit () {
chatInit() {
_this = this;
this.picakfAccId = getPicaKFAccid();
const {imTeamId} = this.currentChat;
this.tid = imTeamId || '3854284100';
const { imTeamId } = this.currentChat;
this.tid = imTeamId || "3854284100";
this.getFiveContentList();
autoCompletionIntervalId && clearInterval(autoCompletionIntervalId);
autoCompletionIntervalId = setInterval(() => {
......@@ -331,7 +381,7 @@ export default {
}, 2000);
// 监听键盘的回车按键(回车时发送消息,并阻止其在textarea中的回车换行行为)
document.onkeydown = function(ev) {
document.onkeydown = function (ev) {
var event = ev || event;
if (event.keyCode == 13) {
_this.sendTextMsg();
......@@ -345,13 +395,14 @@ export default {
autoCompletionInterval() {
if (!this.messageList.length) return;
// 将带有loading的消息转成失败的
this.messageList.forEach(item => {
this.messageList.forEach((item) => {
if (item.isShowLoadingIcon) {
item.isShowLoadingIcon = false;
item.isShowErrorIcon = true;
}
});
let flag = false, msg;
let flag = false,
msg;
for (let i = 0; i < this.messageList.length; i++) {
msg = this.messageList[i];
if (msg.isShowErrorIcon && !msg.isShowErrorMsg) {
......@@ -366,12 +417,12 @@ export default {
// 查询群组成员列表
getMembersList() {
this.GET("/im/team/member/list", {tid: this.tid}).then(res => {
this.GET("/im/team/member/list", { tid: this.tid }).then((res) => {
if (res.code === "000000") {
this.teamMemberList = res.data // 1 问诊医生 2接诊医生 3居民 4其他
this.doctorName = this.teamMemberList[0].name
this.doctorImg = this.teamMemberList[0].avatarImageUrl
this.getMSGHistory() // 查询群聊历史消息
this.teamMemberList = res.data; // 1 问诊医生 2接诊医生 3居民 4其他
this.doctorName = this.teamMemberList[0].name;
this.doctorImg = this.teamMemberList[0].avatarImageUrl;
this.getMSGHistory(); // 查询群聊历史消息
}
});
},
......@@ -382,9 +433,9 @@ export default {
includeFlag: 0,
lastMsgTimestamp: msg.realTimestamp,
limit: 50,
tid: this.tid
tid: this.tid,
};
this.POST("/im/team/message/forward", params).then(res => {
this.POST("/im/team/message/forward", params).then((res) => {
if (res.code === "000000") {
this.contactForwardMessage(res.data, false);
}
......@@ -398,25 +449,25 @@ export default {
// 查询医生和居民的消息历史(下拉刷新时调用)
getOldMSGHistory() {
if(this.hasNoHistoryData) return
if (this.hasNoHistoryData) return;
let params = {
includeFlag: 0, // 不带本条消息
lastMsgTimestamp: this.historyTimestamp,
limit: 20,
tid: this.tid
}
this.POST("/im/team/message/history", params).then(res => {
tid: this.tid,
};
this.POST("/im/team/message/history", params).then((res) => {
if (res.code === "000000") {
// 将新消息合并到之前的消息中, 并且重置最后一条消息
if(res.data && res.data.length > 0) {
this.convertMessageList(res.data, 3)
if (res.data && res.data.length > 0) {
this.convertMessageList(res.data, 3);
} else {
this.hasNoHistoryData = true
this.hasNoHistoryData = true;
}
} else {
this.$message({
message: res.message,
type: "error"
type: "error",
});
}
});
......@@ -427,15 +478,15 @@ export default {
let params = {
includeFlag: 1, // 带本条消息
limit: 20,
tid: this.tid
tid: this.tid,
};
this.POST("/im/team/message/history", params).then(res => {
this.POST("/im/team/message/history", params).then((res) => {
if (res.code === "000000") {
this.convertMessageList(res.data, 1)
this.convertMessageList(res.data, 1);
} else {
this.$message({
message: res.message,
type: "error"
type: "error",
});
}
});
......@@ -448,15 +499,15 @@ export default {
includeFlag: 0,
lastMsgTimestamp: this.realTimestamp,
limit: 20,
tid: this.tid
tid: this.tid,
};
this.POST("/im/team/message/forward", params).then(res => {
this.POST("/im/team/message/forward", params).then((res) => {
if (res.code === "000000") {
this.convertMessageList(res.data, 2)
this.convertMessageList(res.data, 2);
} else {
this.$message({
message: res.message,
type: "error"
type: "error",
});
}
});
......@@ -472,7 +523,7 @@ export default {
convertMessageList(messageList, directFlag = 1) {
messageList.sort((a, b) => {
return a.timestamp - b.timestamp;
})
});
let msg = null,
content = null,
text = "",
......@@ -490,121 +541,136 @@ export default {
url = "";
title = "";
msg = Object.assign({}, rawMsg);
msg.sendOrReceive = rawMsg.fromAccId === this.picakfAccId; // 判断消息是显示在左边还是右边, true 右
msg.sendOrReceive = rawMsg.fromAccId === this.picakfAccId; // 判断消息是显示在左边还是右边, true 右
//msg.avatarImg = msg.sendOrReceive ? this.kfAvatar : this.currentSession.avatarImageUrl;
for(let i = 0; i < this.teamMemberList.length; i++) {
if(rawMsg.fromAccId == this.teamMemberList[i].accId) {
for (let i = 0; i < this.teamMemberList.length; i++) {
if (rawMsg.fromAccId == this.teamMemberList[i].accId) {
msg.avatarImg = this.teamMemberList[i].avatarImageUrl;
msg.name = this.teamMemberList[i].name;
break
break;
}
}
if (msg.type.toLowerCase() == "custom") {
content = JSON.parse(msg.content)
text = content.content
if (content.bizType == -1) { // 系统消息:消息由于违规未发送成功(可以不处理)
showType = -1
text = content.content
} else if (content.bizType == 18) { // PDF
showType = 3
text = content.name
size = content.size
url = content.url
} else if (content.bizType == 19) { // 链接
showType = 4
text = content.content
suffix = content.suffix
} else if(content.bizType == 22){ // 病例
showType = 7
title = content.title
text = JSON.parse(content.content)
} else if(content.bizType == 23) { // 预约时间
showType = 8
title = content.title
text = JSON.parse(content.content)
} else if(content.bizType == 24){ // 音视频与IM交互
showType = 9
text = content.content
} else if(content.bizType == 25){ // 本次问诊结束
showType = 10
text = content.content
} else if(content.bizType == 26){ // 医生建议
showType = 11
title = content.title
text = content.content
}else {
showType = 5
content = JSON.parse(msg.content);
text = content.content;
if (content.bizType == -1) {
// 系统消息:消息由于违规未发送成功(可以不处理)
showType = -1;
text = content.content;
} else if (content.bizType == 18) {
// PDF
showType = 3;
text = content.name;
size = content.size;
url = content.url;
} else if (content.bizType == 19) {
// 链接
showType = 4;
text = content.content;
suffix = content.suffix;
} else if (content.bizType == 22) {
// 病例
showType = 7;
title = content.title;
text = JSON.parse(content.content);
} else if (content.bizType == 23) {
// 预约时间
showType = 8;
title = content.title;
text = JSON.parse(content.content);
} else if (content.bizType == 24) {
// 音视频与IM交互
showType = 9;
text = content.content;
} else if (content.bizType == 25) {
// 本次问诊结束
showType = 10;
text = content.content;
} else if (content.bizType == 26) {
// 医生建议
showType = 11;
title = content.title;
text = content.content;
} else {
showType = 5;
}
} else if( msg.type.toLowerCase() == "image" || msg.type.toLowerCase() == "picture") { // 图片
} else if (
msg.type.toLowerCase() == "image" ||
msg.type.toLowerCase() == "picture"
) {
// 图片
content = JSON.parse(msg.content);
url = content.url;
text = content.name;
showType = 2;
this.imgSizeHandleNew(msg, content.w, content.h);
}else if(msg.type.toLowerCase() == "audio") { // 语音
content = JSON.parse(msg.content)
url = content.url
showType = 6
} else if (msg.type.toLowerCase() == "audio") {
// 语音
content = JSON.parse(msg.content);
url = content.url;
showType = 6;
} else {
showType = 1 // 文本
text = msg.content
showType = 1; // 文本
text = msg.content;
}
msg.title = title
msg.text = text
msg.showType = showType
msg.suffix = suffix
msg.size = size
msg.url = url
msg.sessionFlag = false
cMessageList.push(msg)
msg.title = title;
msg.text = text;
msg.showType = showType;
msg.suffix = suffix;
msg.size = size;
msg.url = url;
msg.sessionFlag = false;
cMessageList.push(msg);
});
if (directFlag === 1) {
this.messageList = []
this.$forceUpdate()
forwardMsgIntervalId && clearInterval(forwardMsgIntervalId)
this.messageList = cMessageList
this.$forceUpdate()
this.messageList = [];
this.$forceUpdate();
forwardMsgIntervalId && clearInterval(forwardMsgIntervalId);
this.messageList = cMessageList;
this.$forceUpdate();
setTimeout(() => {
this.$nextTick(() => {
const scrollBoxDom = document.querySelector(".scroll-box")
scrollBoxDom.scrollTop = scrollBoxDom.scrollHeight
const scrollBoxDom = document.querySelector(".scroll-box");
scrollBoxDom.scrollTop = scrollBoxDom.scrollHeight;
});
}, 100);
this.currentContinueTimes = this.sessionListData.currentTimestamp - this.currentSession.handleStartTime
continueIntervalId && clearInterval(continueIntervalId)
this.currentContinueTimes =
this.sessionListData.currentTimestamp -
this.currentSession.handleStartTime;
continueIntervalId && clearInterval(continueIntervalId);
continueIntervalId = setInterval(() => {
this.currentContinueTimes += 1000
this.currentContinueTimes += 1000;
}, 1000);
// 最新消息,要合并CUSTOM类型中,bizType是-1的数据(系统消息)
} else if (directFlag === 2) {
this.contactForwardMessage(cMessageList)
this.contactForwardMessage(cMessageList);
} else {
if (cMessageList.length) {
this.messageList.unshift(...cMessageList)
this.messageList.unshift(...cMessageList);
this.$nextTick(() => {
const scrollBoxDom = document.querySelector(".scroll-box")
scrollBoxDom.scrollTop = 1000
const scrollBoxDom = document.querySelector(".scroll-box");
scrollBoxDom.scrollTop = 1000;
});
}
}
// 重新设置历史与实时的时间戳
if (this.messageList.length) {
this.historyTimestamp = this.messageList[0].timestamp
let timestamp = this.messageList[this.messageList.length - 1].timestamp
this.historyTimestamp = this.messageList[0].timestamp;
let timestamp = this.messageList[this.messageList.length - 1].timestamp;
if (timestamp) {
this.realTimestamp = timestamp
this.realTimestamp = timestamp;
}
}
// 自己发送消息时,暂时不刷新消息
if (directFlag == 1) {
forwardMsgIntervalId = setInterval(() => {
this.getMSGForward()
}, 3000)
this.getMSGForward();
}, 3000);
}
this.$forceUpdate()
this.$forceUpdate();
},
// 接接数据
......@@ -614,7 +680,7 @@ export default {
msgIndex = -1,
newMsgList = [],
flag = false;
cMessageList.forEach(item => {
cMessageList.forEach((item) => {
content = {};
signature = "";
msgIndex = -1;
......@@ -623,7 +689,7 @@ export default {
content = JSON.parse(item.content);
if (content.bizType == -1) {
signature = content.signature;
msgIndex = this.messageList.findIndex(m => {
msgIndex = this.messageList.findIndex((m) => {
return m.signature == signature && !m.isShowErrorMsg;
});
if (msgIndex > -1) {
......@@ -645,14 +711,16 @@ export default {
if (flag) {
this.$nextTick(() => {
var element = document.querySelector(".scroll-box");
if (element.scrollTop >= element.scrollHeight - element.offsetHeight - 400) {
if (
element.scrollTop >=
element.scrollHeight - element.offsetHeight - 400
) {
element.scrollTop = element.scrollHeight - element.offsetHeight;
}
});
}
},
// 打开PDF
openPDF(item) {
window.open(item.url, "__blank");
......@@ -661,11 +729,11 @@ export default {
// 根据字段名及其值,从数组中查找对象
findItemByKeyAndVal(arr, key, value, flag = 0) {
if (flag == 0) {
return arr.find(item => {
return arr.find((item) => {
return item[key] == value;
});
} else if (flag == 1) {
return arr.findIndex(item => {
return arr.findIndex((item) => {
return item[key] == value;
});
}
......@@ -675,13 +743,13 @@ export default {
getFiveContentList() {
this.GET(
"/contents/admin/template/queryTemplate?publishFlag=5&pageNo=1&pageSize=99999"
).then(res => {
).then((res) => {
if (res.code === "000000") {
this.linkList = res.data.templateList || [];
} else {
this.$message({
message: res.message,
type: "error"
type: "error",
});
}
});
......@@ -694,7 +762,7 @@ export default {
if (fileSize > 5) {
this.$message({
message: "请上传小于5M的文件",
type: "warning"
type: "warning",
});
return;
}
......@@ -706,7 +774,7 @@ export default {
"preview4",
"progress",
""
).then(function(resData) {
).then(function (resData) {
closeLoading(_this);
let params = {};
params.fileSize = resData.size;
......@@ -724,7 +792,7 @@ export default {
params.type = 1;
let image = new Image();
image.src = params.url;
image.onload = function() {
image.onload = function () {
let _img = this;
params.width = _img.width;
params.height = _img.height;
......@@ -741,14 +809,14 @@ export default {
this.linkForm = {
remark: "",
info: "",
url: ""
url: "",
};
this.showSelectDialog = true;
},
// 发送带链接消息
sendLinkMsg() {
this.$refs["linkFormRef"].validate(valid => {
this.$refs["linkFormRef"].validate((valid) => {
if (valid) {
let params = Object.assign({}, this.linkForm);
params.url = getPhomeDemain() + `/template_v2/?id=${params.url}`;
......@@ -766,7 +834,6 @@ export default {
this.sendText = "";
},
/* 处理发送消息
1: 先将消息体直接显示在对话框中
2: 设置一个时间戳,以便再次找回
......@@ -799,18 +866,18 @@ export default {
msg.realTimestamp = this.realTimestamp;
msg.taskLogId = this.currentTaskLogId;
this.teamMemberList.forEach(item => {
if(this.picakfAccId = item.accId) {
msg.avatarImg = item.avatarImageUrl // 运营头像
this.teamMemberList.forEach((item) => {
if ((this.picakfAccId = item.accId)) {
msg.avatarImg = item.avatarImageUrl; // 运营头像
}
})
if(msg.type == 1) {
this.imgSizeHandleNew(msg, msg.width, msg.height)
});
if (msg.type == 1) {
this.imgSizeHandleNew(msg, msg.width, msg.height);
}
this.messageList.push(msg)
this.messageList.push(msg);
this.$nextTick(() => {
var element = document.querySelector(".scroll-box")
element.scrollTop = element.scrollHeight
var element = document.querySelector(".scroll-box");
element.scrollTop = element.scrollHeight;
});
},
......@@ -827,15 +894,15 @@ export default {
md5: "", // 图片或文件MD5 暂时由后台生成
remark: "", // 其他信息(链接中的前缀文案)
type: 0, // 类型 0文本 1图片 2pdf 3链接
url: "" // url地址(图片、pdf,链接)
}
params = Object.assign(sendMsgParams, params)
url: "", // url地址(图片、pdf,链接)
};
params = Object.assign(sendMsgParams, params);
// 将获取新数据的定时器关闭
forwardMsgIntervalId && clearInterval(forwardMsgIntervalId)
let sendId = new Date().getTime()
this.handleSendMsg(params, sendId)
forwardMsgIntervalId && clearInterval(forwardMsgIntervalId);
let sendId = new Date().getTime();
this.handleSendMsg(params, sendId);
await this.POST("/im/team/op/message/send", params)
.then(res => {
.then((res) => {
if (res.code === "000000") {
// 校验结果:1校验通过 2校验不通过
let msg = this.messageList[this.messageList.length - 1];
......@@ -843,43 +910,43 @@ export default {
msg = this.getMsgBySendId(sendId);
}
if (res.data.checkFlag == 1) {
this.realTimestamp = res.data.timetag
msg.isShowLoadingIcon = false
msg.isShowErrorIcon = false
msg.isShowErrorMsg = false // 只有在下次拉取新数据时才有可能是为ture
this.realTimestamp = res.data.timetag;
msg.isShowLoadingIcon = false;
msg.isShowErrorIcon = false;
msg.isShowErrorMsg = false; // 只有在下次拉取新数据时才有可能是为ture
} else {
msg.signature = res.data.signature
msg.isShowLoadingIcon = false
msg.isShowErrorIcon = true
msg.isShowErrorMsg = false // 只有在下次拉取新数据时才有可能是为ture
msg.signature = res.data.signature;
msg.isShowLoadingIcon = false;
msg.isShowErrorIcon = true;
msg.isShowErrorMsg = false; // 只有在下次拉取新数据时才有可能是为ture
}
this.teamMemberList.forEach((item, index) => {
if(params.fromAccount == item.accId) {
msg.name = item.name
if (params.fromAccount == item.accId) {
msg.name = item.name;
}
})
});
} else {
this.$message({
message: res.message,
type: "error"
type: "error",
});
}
})
.catch(error => {
let msg = this.messageList[this.messageList.length - 1]
.catch((error) => {
let msg = this.messageList[this.messageList.length - 1];
if (msg.sendId !== sendId) {
msg = this.getMsgBySendId(sendId)
msg = this.getMsgBySendId(sendId);
}
msg.isShowLoadingIcon = false
msg.isShowErrorIcon = true
msg.isShowErrorMsg = false // 只有在下次拉取新数据时才有可能是为ture
msg.canRepeatSend = true
msg.isShowLoadingIcon = false;
msg.isShowErrorIcon = true;
msg.isShowErrorMsg = false; // 只有在下次拉取新数据时才有可能是为ture
msg.canRepeatSend = true;
});
this.$forceUpdate()
this.$forceUpdate();
// 重新开启定时器
forwardMsgIntervalId = setInterval(() => {
this.getMSGForward()
}, 3000)
this.getMSGForward();
}, 3000);
},
// 根据sendId,查找到对应的消息
......@@ -900,11 +967,11 @@ export default {
return betaHandle(val);
},
closeChat () {
closeChat() {
window.rtc.leave();
this.clearSession();
this.$store.commit('updateShowChat', false);
this.$store.commit('updateCurrentChat', {});
this.$store.commit("updateShowChat", false);
this.$store.commit("updateCurrentChat", {});
},
clearSession() {
......@@ -929,7 +996,7 @@ export default {
},
out() {
const {diagnoseLogId} = this.currentChat;
const { diagnoseLogId } = this.currentChat;
let url = `/diagnose/admin/diagnose/endCall/${diagnoseLogId}`;
let params = {};
this.POST(url, params)
......@@ -957,16 +1024,15 @@ export default {
});
},
toggleChatModal () {
toggleChatModal() {
this.toggleChatSize = !this.toggleChatSize;
}
},
},
beforeDestroy() {
forwardMsgIntervalId && clearInterval(forwardMsgIntervalId);
autoCompletionIntervalId && clearInterval(autoCompletionIntervalId);
}
},
};
</script>
<style lang="scss" scoped>
......
......@@ -16,8 +16,7 @@
</div>
</div>
</div>
<div class="main" v-if="currentChat.diagnoseType == 1">
<div class="main" v-if="currentChat.diagnoseType == 1 || currentChat.diagnoseType == 2">
<div
class="viedo-wrapper"
v-for="(item, index) of memberList"
......@@ -35,13 +34,16 @@
<p class="text-num">{{item.role == 1 ? currentChat.doctorMobile : currentChat.userMobile}}</p>
</div>
</div>
<div class="viedo" :id="rtc.viewslist[index] ? rtc.viewslist[index].id : ''">
<div :class="{viedowrap:currentChat.diagnoseType == 2}" :id="rtc.viewslist[index] ? rtc.viewslist[index].id : ''">
</div>
<div class="viedo-btn-wrap" :id="rtc.viewslist[index] ? rtc.viewslist[index].id : ''">
<el-button class="call-btn"
:class="{calling1: item.role == 1 && doctorTrtcEntryStatus== 3, calling2: item.role == 2 && userTrtcEntryStatus== 3}"
@click="drivingCall(item)">
{{ item.role == 1 ? showText(doctorTrtcEntryStatus) : showText(userTrtcEntryStatus)}}
{{ item.role == 1 ? showText(doctorTrtcEntryStatus) : showText(userTrtcEntryStatus)}}
</el-button>
</div>
</div>
<div class="vedio-man">
<p class="man-img" @click="toggleVol">
......@@ -637,11 +639,12 @@ export default {
flex: 1;
.viedo-wrapper {
width: 224px;
height: 120px;
// height: 240px;
background: #F0F2F5;
border-radius: 18px;
padding: 15px;
margin-right: 2%;
position: relative;
.text {
display: flex;
.text-left{
......@@ -690,7 +693,7 @@ export default {
align-items: flex-end;
}
}
.viedo {
.viedo-btn-wrap {
.call-btn{
width: 173px;
height: 38px;
......@@ -703,6 +706,22 @@ export default {
.calling1, .calling2 {
background: #9FC8C0;
}
.viedo-container{
width: 100px;
height:100px;
margin: auto;
margin-top: 15px;
// position: absolute;
// top: 0;
// left: 0;
// right: 0;
// bottom: 0;
// margin: auto;
}
}
.viedowrap{
height: 180px;
}
}
.vedio-man{
......@@ -746,4 +765,5 @@ export default {
margin: 15px auto 6%;
}
}
</style>
......@@ -58,8 +58,10 @@ export default {
pageSize: 6,
returnStatus: 1
};
this.$store.commit("clearRawCurrentCalList")
this.POST('/diagnose/socket/condition/update', p).then(res=>{
if(res.code == '000000'){
this.$store.commit('updateSoketQuest', p)
this.$router.push({path:'/workbench'})
}else{
......
import storejs from 'storejs';
export default {
updateCurrentDiagList(state, obj) {
state.currentDiagList = obj;
},
// 改变原数据
changeRawCurrentCalList(state,obj){
// console.log("obj",obj)
let index = state.RawCurrentCalList.findIndex(val=>{
return val.status==obj.status
})
if(index>-1){
state.RawCurrentCalList[index]=obj
state.currentCalList[index].is_dot=false
}
},
clearRawCurrentCalList(state){
state.RawCurrentCalList=[]
},
updateCurrentCalList(state, obj) {
state.currentCalList = obj;
let NewData=obj
if(state.RawCurrentCalList.length==0){
state.RawCurrentCalList=obj
}
let RawData=state.RawCurrentCalList
for (let i = 0; i < NewData.length; i++) {
let is_dot = false;
if (RawData.length > 0) {
is_dot = NewData[i].count > RawData[i].count ? true: false;
}
NewData[i] = {
...NewData[i],
is_dot: is_dot,
};
}
state.currentCalList = NewData;
},
updateCurrentChat(state, obj) {
state.currentChat = obj;
......
......@@ -3,6 +3,7 @@
export default {
currentDiagList:[],
currentCalList:{},
RawCurrentCalList:[],
currentChat: {},
currentAdvice: {},
soketQuest: {},
......
......@@ -816,7 +816,7 @@ const change = (num) => {
}
return num;
}
// 拖拽
export const bindDragHeader = (classname,content) =>{
const dragDom = document.querySelector(classname);
const con = document.querySelector(content);
......
......@@ -29,7 +29,7 @@
:label="item.status"
>
{{ item.statusStr }}({{ item.count }})
<i class="circle-red"></i>
<i class="circle-red" v-if="item.is_dot"></i>
</el-radio-button>
<!-- <el-radio-button label="1">待处理({{currentCalList}})</el-radio-button>-->
</el-radio-group>
......@@ -80,6 +80,7 @@ export default {
},
watch: {
isSuperAdmin(newdata, olddata) {
// console.log("ererer")
if (newdata !== olddata && newdata.userID) {
const s = storejs.get("soketQuest");
const d = s ? s.dateTime : new Date().format("yyyy-MM-dd");
......@@ -93,15 +94,14 @@ export default {
returnStatus: s ? s.returnStatus : 1,
};
this.searchParam = p;
this.inquirySearch();
this.inquirySearch("clear");
}
},
},
data() {
const s = storejs.get("soketQuest");
const d = s ? s.dateTime : new Date().format("yyyy-MM-dd");
let id =
s && s.operateUserId ? s.operateUserId : this.isSuperAdmin.userID;
let id = s && s.operateUserId ? s.operateUserId : this.isSuperAdmin.userID;
return {
tabPosition: "1",
showChat: true,
......@@ -145,18 +145,19 @@ export default {
};
},
created() {},
mounted() {},
methods: {
tabChange(val) {
const s = this.searchParam;
s.returnStatus = val;
this.searchParam = s;
this.inquirySearch();
this.inquirySearch("tab");
},
changeDatetime(val) {
const s = this.searchParam;
s.dateTime = val.format("yyyy-MM-dd");
this.searchParam = s;
this.inquirySearch();
this.inquirySearch("clear");
},
handleSizeChange(val) {
const s = this.searchParam;
......@@ -169,11 +170,24 @@ export default {
this.searchParam = s;
this.inquirySearch();
},
inquirySearch() {
inquirySearch(type) {
const p = this.searchParam;
if (type == "clear") {
this.$store.commit("clearRawCurrentCalList");
}
this.POST("/diagnose/socket/condition/update", p).then((res) => {
if (res.code == "000000") {
this.$store.commit("updateSoketQuest", p);
if (type == "tab") {
const returnStatus = p.returnStatus;
const RespList = res.data.list[0].recordResp.countRespList.filter(
(val) => {
return val.status == returnStatus;
}
);
this.$store.commit("changeRawCurrentCalList", RespList[0]);
}
} else {
this.$message({
message: res.message,
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册