This commit is contained in:
joylink_cuiweidong 2020-07-29 17:19:30 +08:00
commit 652968bf1b
5 changed files with 384 additions and 473 deletions

View File

@ -38,7 +38,6 @@ class TransformHandle {
view.transform = this.transform[i];
view.transformIndex = i;
view.decomposeTransform(); // 修改 transform 后同步位置
console.log('1111111111111111');
if (view.screenShow) {
view.screenShow();
} else {
@ -56,7 +55,6 @@ class TransformHandle {
if (view) {
view.transform = this.transform[view.transformIndex];
view.decomposeTransform();
console.log('111111111111113333311');
if (view.screenShow) {
view.screenShow();
} else {

View File

@ -1,75 +1,64 @@
<template>
<div class="chatBox" :style="{'bottom':offsetBottom+'px'}">
<div v-show="!minimize" class="chat-box">
<div class="chat-box-main">
<div class="chat-window">
<div class="chat-box-header">
<div class="chat-box-header-title">
<el-input v-if="isShow" v-model="queryMember" size="small" placeholder="请输入搜索人员">
<el-button slot="append" icon="el-icon-search" />
</el-input>
</div>
<div class="minimality" @click="handleMinimality('min')">
<i class="el-icon-remove" />
</div>
<div class="chat-setting" @click="handleSetting()">
<i class="el-icon-s-tools" />
</div>
</div>
<div v-if="isShow" class="chat-box-content">
<el-tree
ref="tree"
:data="treeData"
:props="defaultProps"
node-key="id"
default-expand-all
:filter-node-method="filterNode"
show-checkbox
style="margin: 10px;overflow-y: auto;height: 100%;margin-right: 0;"
@check-change="handleCheckChange"
>
<span :id="data.id" slot-scope="{ node, data }">
<span style="font-size: 14px">{{ data.label }}</span>
</span>
</el-tree>
</div>
<div v-else class="chat-box-content">
<div class="chatcontent">
<chat-content ref="chatContent" :chat-content-list="chatContentList" />
<div v-if="recordSending" class="chat_record_tip">
<div id="record_progress_bar" :style="'width:'+100/60*seconds+'%'" />
<div class="record_icon" />
<div class="record_tip_text">正在录音...</div>
<div class="record_tip_confirm" @click="stopRecording()">确定</div>
<div class="record_tip_cancle" @click="cancleRecording()">取消</div>
</div>
</div>
<chat-member-list ref="chatMemberList" :current-member-list="currentMemberList" />
</div>
<div class="chat-box-footer">
<div v-if="isShow">
<div class="userString">{{ userString }}</div>
<el-button :loading="loading" size="mini" type="primary" class="chat-box-create-coversite" @click="doCreate">创建会话</el-button>
<div v-if="scriptTip" class="scriptTip">{{ scriptTip }}</div>
</div>
<div v-else>
<div class="chat-box-footer-tool" />
<el-button v-if="isQuitShow" size="mini" type="danger" class="chat-box-footer-quit" :loading="loading" @click="quitConversition()">结束会话</el-button>
<el-button v-if="isStartRecord" class="chat-box-footer-send" size="mini" type="primary" :disabled="recordSending" @click="startRecording()">发送语音</el-button>
<div v-if="scriptTip" class="scriptTip">{{ scriptTip }}</div>
</div>
</div>
</div>
</div>
</div>
<div v-show="minimize" class="reminder-drag minimize-box">
<div class="chat-title">聊天窗口</div>
<div class="minimality" @click="handleMinimality('max')">
<i class="el-icon-circle-plus" />
</div>
<div class="chatBox" :class="{'active': drawer}" :style="{'bottom':offsetBottom+'px'}">
<div class="menuTrainListBtn" @click="clickBtn">
<i class="el-icon-more" />
</div>
<div class="chat-box-main">
<div class="chat-box-header">
<div class="chat-box-header-title">
<el-input v-if="isShow" v-model="queryMember" size="small" placeholder="请输入搜索人员">
<el-button slot="append" icon="el-icon-search" />
</el-input>
</div>
<div class="chat-setting" @click="handleSetting()">
<i class="el-icon-s-tools" />
</div>
</div>
<div v-if="isShow" class="chat-box-content">
<el-tree
ref="tree"
:data="treeData"
:props="defaultProps"
node-key="id"
default-expand-all
:filter-node-method="filterNode"
show-checkbox
style="margin: 10px;overflow-y: auto;height: 100%;margin-right: 0;"
@check-change="handleCheckChange"
>
<span :id="data.id" slot-scope="{ node, data }">
<span style="font-size: 14px">{{ data.label }}</span>
</span>
</el-tree>
</div>
<div v-else class="chat-box-content">
<div class="chatcontent">
<chat-content ref="chatContent" :chat-content-list="chatContentList" />
<div v-if="recordSending" class="chat_record_tip">
<div id="record_progress_bar" :style="'width:'+100/60*seconds+'%'" />
<div class="record_icon" />
<div class="record_tip_text">正在录音...</div>
<div class="record_tip_confirm" @click="stopRecording()">确定</div>
<div class="record_tip_cancle" @click="cancleRecording()">取消</div>
</div>
</div>
<chat-member-list ref="chatMemberList" :current-member-list="currentMemberList" />
</div>
<div class="chat-box-footer">
<div v-if="isShow">
<div class="userString">{{ userString }}</div>
<el-button :loading="loading" size="mini" type="primary" class="chat-box-create-coversite" @click="doCreate">创建会话</el-button>
<div v-if="scriptTip" class="scriptTip">{{ scriptTip }}</div>
</div>
<div v-else>
<div class="chat-box-footer-tool" />
<el-button v-if="isQuitShow" size="mini" type="danger" class="chat-box-footer-quit" :loading="loading" @click="quitConversition()">结束会话</el-button>
<el-button v-if="isStartRecord" class="chat-box-footer-send" size="mini" type="primary" :disabled="recordSending" @click="startRecording()">发送语音</el-button>
<div v-if="scriptTip" class="scriptTip">{{ scriptTip }}</div>
</div>
</div>
</div>
<chat-setting ref="chatSetting" :form="form" @setSetting="setSetting" />
<!-- @getCoversitionList="getCoversitionList" -->
<chat-tooltip ref="chatToolTip" :group="group" :conversition-id="conversitionId" :invite-user-name="inviteUserName" />
</div>
</template>
@ -137,7 +126,7 @@ export default {
},
data() {
return {
minimize:true,
drawer: false,
bottom:15,
queryMember:'',
defaultProps: {
@ -167,6 +156,13 @@ export default {
}
},
methods:{
clickBtn() {
if (this.drawer) {
this.drawer = false;
} else {
this.drawer = true;
}
},
handleSetting() {
this.$refs.chatSetting.doShow();
},
@ -186,14 +182,6 @@ export default {
});
}
},
handleMinimality(data) {
if (data == 'min') {
this.minimize = true;
this.$refs.chatSetting.doClose();
} else {
this.minimize = false;
}
},
setSetting(data) {
this.form = data;
},
@ -311,7 +299,9 @@ export default {
this.loading = false;
this.dialogVisible = false;
});
}
} else {
this.userString = '群聊列表为空, 请选择人员';
}
},
quitConversition() {
this.loading = true;
@ -330,27 +320,40 @@ export default {
};
</script>
<style lang="scss" scoped>
.chat-box-footer-quit{
font-size: 12px;
padding: 5px 15px;
color: #fff;
float: left;
margin-left: 10px;
margin-bottom: 10px;
.chatBox {
position: absolute;
left: 0;
top: calc((100% - 400px) / 2);
height: 400px;
width: 503px;
transform: translateX(-503px);
transition: all 0.4s;
z-index: 9;
&.active{
transform: translateX(0px);
}
}
.menuTrainListBtn {
width: 20px;
height: 40px;
background: #fff;
text-align: center;
border-radius: 0px 6px 6px 0px;
position: absolute;
top: 45%;
z-index: 2;
transform: translateX(502px);
cursor: pointer;
z-index: 9;
.el-icon-more{
font-size: 20px;
margin-top: 9px;
transform-origin: 50% 50%;
transform: rotate(90deg);
margin-left:0px;
}
}
.chatBox{
width: 503px;
position: absolute;
padding-left:5px;
left: 0;
bottom:15px;
z-index:9;
}
.chat-box{
width: 100%;
height: 400px;
}
.chat-box-header{
width: 100%;
height: 40px;
@ -372,9 +375,16 @@ export default {
border-bottom: 1px #dedede solid;
position: relative;
}
// .chat-box-contentTip{
// }
.chat-box-footer-quit{
font-size: 12px;
padding: 5px 15px;
color: #fff;
float: left;
margin-left: 10px;
margin-bottom: 10px;
cursor: pointer;
}
.chatcontent{
height: 100%;
width: 362px;
@ -388,10 +398,7 @@ export default {
width: 100%;
position: relative;
}
.chat-window{
display: inline-block;
width: 100%;
}
.chat-setting{
float: right;
line-height: 40px;
@ -437,15 +444,10 @@ export default {
z-index: 4;
background: #fff;
border-radius: 5px;
left:5px;
left: 0;
font-size:0;
}
// .chat-coversition{
// }
// .coversition-list{
// }
.chat-box-footer-send.disbled{
cursor: no-drop;
}
@ -487,13 +489,6 @@ export default {
resize: none;
}
// .showMembers{
// float: right;
// line-height: 40px;
// margin-right: 10px;
// cursor: pointer;
// font-size: 17px;
// }
#record_progress_bar{
height: 100%;
position: absolute;
@ -559,30 +554,4 @@ export default {
cursor: pointer;
}
.minimize-box {
width: 97.5%;
height: 40px;
position: absolute;
left: 5px;
bottom: 0;
z-index: 222;
background: #fff;
border-radius: 5px;
.chat-title {
float: left;
font-size: 15px;
margin-left: 10px;
line-height: 40px;
}
.minimality {
float: right;
height: 40px;
line-height: 40px;
margin-right: 10px;
cursor: pointer;
}
}
</style>

View File

@ -1,76 +1,68 @@
<template>
<!-- v-quickMenuDrag -->
<div class="chatBox" :style="{'bottom':bottom+'px'}">
<div v-show="!minimize" class="chat-box">
<div class="chat-box-main">
<div class="chat-window">
<div class="chat-box-header">
<div class="chat-box-header-title">
<el-input v-show="isShow" v-model="queryMember" size="small" placeholder="请输入搜索人员">
<el-button slot="append" icon="el-icon-search" />
</el-input>
</div>
<div class="minimality" @click="handleMinimality('min')">
<i class="el-icon-remove" />
</div>
<!-- <div v-show="memberListCoversition.all==undefined?true&&isShow:memberListCoversition.all&&isShow" class="chat-createGroup" @click="handleCreateGroup()">
<i class="el-icon-plus" style="font-weight: bolder;" />
</div> -->
<div class="chat-setting" @click="handleSetting()">
<i class="el-icon-s-tools" />
</div>
</div>
<div v-if="isShow" class="chat-box-content">
<el-tree
ref="tree"
:data="treeData"
:props="defaultProps"
node-key="id"
default-expand-all
:filter-node-method="filterNode"
show-checkbox
style="margin: 10px;overflow-y: auto;height: 100%;margin-right: 0;"
@check-change="handleCheckChange"
>
<span :id="data.id" slot-scope="{ node, data }">
<span style="font-size: 14px">{{ data.label }}</span>
</span>
</el-tree>
</div>
<div v-else class="chat-box-content">
<div class="chatcontentInner">
<chat-content ref="chatContent" :chat-content-list="chatContentList" />
<div v-if="recordSending" class="chat_record_tip">
<div id="record_progress_bar" :style="'width:'+100/60*seconds+'%'" />
<div class="record_icon" />
<div class="record_tip_text">正在录音...</div>
<div class="record_tip_confirm" @click="stopRecording()">确定</div>
<div class="record_tip_cancle" @click="cancleRecording()">取消</div>
</div>
</div>
<chat-member-list ref="chatMemberList" :user-role="userRole" :current-member-list="currentMemberList" />
</div>
<div class="chat-box-footer">
<div v-if="isShow">
<div class="userString">{{ userString }}</div>
<el-button :loading="loading" size="mini" type="primary" class="chat-box-create-coversite" @click="doCreate">创建会话</el-button>
</div>
<div v-else>
<div class="chat-box-footer-tool" />
<el-button v-if="isButtonShow&&isCreate" size="mini" type="danger" class="chat-box-footer-quit" :loading="loading" @click="quitCoversition()">结束会话</el-button>
<el-button v-if="memberListCoversition.all||isButtonShow" class="chat-box-footer-send" size="mini" type="primary" :disabled="recordSending" @click="startRecording()">发送语音</el-button>
<div v-if="scriptTip" class="scriptTip">{{ scriptTip }}</div>
</div>
</div>
</div>
</div>
</div>
<div v-show="minimize" class="reminder-drag minimize-box">
<div class="chat-title">聊天窗口</div>
<div class="minimality" @click="handleMinimality('max')">
<i class="el-icon-circle-plus" />
</div>
<div class="chatBox" :class="{'active': drawer}" :style="{'bottom':bottom+'px'}">
<div class="menuTrainListBtn" @click="clickBtn">
<i class="el-icon-more" />
</div>
<div class="chat-box-main">
<div class="chat-box-header">
<div class="chat-box-header-title">
<el-input v-show="isShow" v-model="queryMember" size="small" placeholder="请输入搜索人员">
<el-button slot="append" icon="el-icon-search" />
</el-input>
</div>
<!-- <div class="minimality" @click="handleMinimality('min')">
<i class="el-icon-remove" />
</div> -->
<!-- <div v-show="memberListCoversition.all==undefined?true&&isShow:memberListCoversition.all&&isShow" class="chat-createGroup" @click="handleCreateGroup()">
<i class="el-icon-plus" style="font-weight: bolder;" />
</div> -->
<div class="chat-setting" @click="handleSetting()">
<i class="el-icon-s-tools" />
</div>
</div>
<div v-if="isShow" class="chat-box-content">
<el-tree
ref="tree"
:data="treeData"
:props="defaultProps"
node-key="id"
default-expand-all
:filter-node-method="filterNode"
show-checkbox
style="margin: 10px;overflow-y: auto;height: 100%;margin-right: 0;"
@check-change="handleCheckChange"
>
<span :id="data.id" slot-scope="{ node, data }">
<span style="font-size: 14px">{{ data.label }}</span>
</span>
</el-tree>
</div>
<div v-else class="chat-box-content">
<div class="chatcontentInner">
<chat-content ref="chatContent" :chat-content-list="chatContentList" />
<div v-if="recordSending" class="chat_record_tip">
<div id="record_progress_bar" :style="'width:'+100/60*seconds+'%'" />
<div class="record_icon" />
<div class="record_tip_text">正在录音...</div>
<div class="record_tip_confirm" @click="stopRecording()">确定</div>
<div class="record_tip_cancle" @click="cancleRecording()">取消</div>
</div>
</div>
<chat-member-list ref="chatMemberList" :user-role="userRole" :current-member-list="currentMemberList" />
</div>
<div class="chat-box-footer">
<div v-if="isShow">
<div class="userString">{{ userString }}</div>
<el-button :loading="loading" size="mini" type="primary" class="chat-box-create-coversite" @click="doCreate">创建会话</el-button>
</div>
<div v-else>
<div class="chat-box-footer-tool" />
<el-button v-if="isButtonShow&&isCreate" size="mini" type="danger" class="chat-box-footer-quit" :loading="loading" @click="quitCoversition()">结束会话</el-button>
<el-button v-if="memberListCoversition.all||isButtonShow" class="chat-box-footer-send" size="mini" type="primary" :disabled="recordSending" @click="startRecording()">发送语音</el-button>
<div v-if="scriptTip" class="scriptTip">{{ scriptTip }}</div>
</div>
</div>
</div>
<chat-setting ref="chatSetting" :form="form" @setSetting="setSetting" />
<!-- <chat-create-group ref="createGroup" :group="group" :member-list="memberList" @addCoversition="addCoversition" /> -->
<chat-tooltip :group="group" @getCoversitionList="getCoversitionList" />
@ -108,7 +100,7 @@ export default {
},
data() {
return {
minimize:true,
drawer: false,
bottom:15,
recordSending:false,
memberList:[],
@ -215,6 +207,13 @@ export default {
this.initPage();
},
methods:{
clickBtn() {
if (this.drawer) {
this.drawer = false;
} else {
this.drawer = true;
}
},
async initPage() {
this.cancleRecording();
this.scriptTip = '';
@ -415,15 +414,6 @@ export default {
this.isHasCoversition = false;
}
},
handleMinimality(data) {
if (data == 'min') {
this.minimize = true;
this.$refs.chatSetting.doClose();
this.$refs.createGroup.doClose();
} else {
this.minimize = false;
}
},
setSetting(data) {
this.form = data;
},
@ -559,9 +549,9 @@ export default {
}
});
},
handleCreateGroup() {
this.$refs.createGroup.doShow();
},
// handleCreateGroup() {
// this.$refs.createGroup.doShow();
// },
handleSetting() {
this.$refs.chatSetting.doShow();
},
@ -576,28 +566,40 @@ export default {
};
</script>
<style lang="scss" scoped>
.chat-box-footer-quit{
font-size: 12px;
padding: 5px 15px;
color: #fff;
float: left;
margin-left: 10px;
margin-bottom: 10px;
.chatBox {
position: absolute;
left: 0;
top: calc((100% - 400px) / 2);
height: 400px;
width: 503px;
transform: translateX(-503px);
transition: all 0.4s;
z-index: 9;
&.active{
transform: translateX(0px);
}
}
.menuTrainListBtn {
width: 20px;
height: 40px;
background: #fff;
text-align: center;
border-radius: 0px 6px 6px 0px;
position: absolute;
top: 45%;
z-index: 2;
transform: translateX(502px);
cursor: pointer;
z-index: 9;
.el-icon-more{
font-size: 20px;
margin-top: 9px;
transform-origin: 50% 50%;
transform: rotate(90deg);
margin-left:0px;
}
}
.chatBox{
width: 503px;
// height: 400px;
position: absolute;
padding-left:5px;
left: 0;
bottom:15px;
z-index:9;
}
.chat-box{
width: 100%;
height: 400px;
}
.chat-box-header{
width: 100%;
height: 40px;
@ -618,9 +620,6 @@ export default {
height: 300px;
border-bottom: 1px #dedede solid;
position: relative;
}
.chat-box-contentTip{
}
.chatcontentInner{
height: 100%;
@ -636,10 +635,6 @@ export default {
width: 100%;
position: relative;
}
.chat-window{
display: inline-block;
width: 100%;
}
.chat-createGroup{
float: right;
line-height: 40px;
@ -659,6 +654,15 @@ export default {
width: 100%;
height: 30px;
}
.chat-box-footer-quit{
font-size: 12px;
padding: 5px 15px;
color: #fff;
float: left;
margin-left: 10px;
margin-bottom: 10px;
cursor: pointer;
}
.chat-box-footer-send{
font-size: 12px;
text-align: center;
@ -693,7 +697,7 @@ export default {
z-index: 4;
background: #fff;
border-radius: 5px;
left:5px;
left: 0;
font-size:0;
}
.chat-coversition{
@ -815,30 +819,4 @@ export default {
cursor: pointer;
}
.minimize-box {
width: 97.5%;
height: 40px;
position: absolute;
left: 5px;
bottom: 0;
z-index: 222;
background: #fff;
border-radius: 5px;
.chat-title {
float: left;
font-size: 15px;
margin-left: 10px;
line-height: 40px;
}
.minimality {
float: right;
height: 40px;
line-height: 40px;
margin-right: 10px;
cursor: pointer;
}
}
</style>

View File

@ -1,116 +1,104 @@
<template>
<div class="chatBox" :style="{'bottom':bottom+'px'}">
<div v-show="!minimize" class="chat-box">
<div class="chat-box-main">
<div v-if="!conversitionId && userRole !== 'AUDIENCE' && !commonConversation" class="chat-window">
<div class="chat-box-header">
<div class="chat-box-header-title">
<el-input v-model="queryMember" size="small" placeholder="请输入搜索人员">
<el-button slot="append" icon="el-icon-search" />
</el-input>
</div>
<div class="minimality" @click="handleMinimality('min')">
<i class="el-icon-remove" />
</div>
<div class="chat-setting" @click="handleSetting()">
<i class="el-icon-s-tools" />
</div>
<div v-if="!commonConversation" class="chat-setting" @click="goCommonConversation">
<el-tooltip effect="dark" content="公共会话" placement="top-start">
<i class="el-icon-chat-line-round" />
</el-tooltip>
</div>
<div v-if="conversitionId && commonConversation" class="chat-setting" @click="cancelCommonConversation">
<el-tooltip effect="dark" content="私有会话" placement="top-start">
<i class="el-icon-chat-round" />
</el-tooltip>
</div>
</div>
<div class="chat-box-content">
<el-tree
ref="tree"
:data="treeData"
:props="defaultProps"
node-key="id"
default-expand-all
show-checkbox
:filter-node-method="filterNode"
style="margin: 10px;overflow-y: auto;height: 100%;margin-right: 0;"
@node-click="handleNodeClick"
@check-change="handleCheckChange"
>
<span :id="data.id" slot-scope="{ node, data }">
<span style="font-size: 14px">{{ data.label + (data.userId? '(' + (simulationUsers[data.userId]||{}).nickName + ')': '') }}</span>
</span>
</el-tree>
</div>
<div class="chat-box-footer">
<div style="width: 400px;font-size: 14px;">{{ userString }}</div>
<el-button size="mini" type="primary" class="chat-box-footer-create" :loading="createLoading" @click="createCoversition()">创建会话</el-button>
<div v-if="scriptTip" class="scriptTip">{{ scriptTip }}</div>
</div>
</div>
<div v-else class="chat-window">
<div class="chat-box-header">
<!-- <div class="chat-box-header-title">{{ headerTitle }}</div> -->
<div class="minimality" @click="handleMinimality('min')">
<i class="el-icon-remove" />
</div>
<div class="chat-setting" @click="handleSetting()">
<i class="el-icon-s-tools" />
</div>
<div v-if="!conversitionId && userRole !== 'AUDIENCE'" class="chat-setting" @click="cancelCommonConversation">
<el-tooltip effect="dark" content="成员列表" placement="top-start">
<i class="el-icon-s-custom" />
</el-tooltip>
</div>
<div v-if="!commonConversation" class="chat-setting" @click="goCommonConversation">
<el-tooltip effect="dark" content="公共会话" placement="top-start">
<i class="el-icon-chat-line-round" />
</el-tooltip>
</div>
<div v-if="conversitionId && commonConversation" class="chat-setting" @click="cancelCommonConversation">
<el-tooltip effect="dark" content="私有会话" placement="top-start">
<i class="el-icon-chat-round" />
</el-tooltip>
</div>
</div>
<div class="chat-box-content">
<chat-content
ref="chatContent"
:project="project"
:is-answering="IsAnswering"
:conversition-id="conversitionId"
:conversition-member-list="conversitionMemberList"
:message-list="messageList"
:simulation-users="simulationUsers"
:common-conversation="commonConversation"
:user-role="userRole"
@changeMessageList="changeMessageList"
/>
<div v-if="recordSending" class="chat_record_tip">
<div id="record_progress_bar" :style="'width:'+100/60*seconds+'%'" />
<div class="record_icon" />
<div class="record_tip_text">正在录音...</div>
<div class="record_tip_confirm" @click="stopRecording()">确定</div>
<div class="record_tip_cancle" @click="cancleRecording()">取消</div>
</div>
<chat-member-list ref="chatMemberList" :conversition-member-list="conversitionMemberList" :simulation-users="simulationUsers" @connectMember="connectMember" />
</div>
<div class="chat-box-footer">
<div class="chat-box-footer-tool" />
<el-button v-if="isConversitionCreator && isButtonShow && !commonConversation" size="mini" type="danger" class="chat-box-footer-quit" :loading="quitLoading" @click="quitConversition()">结束会话</el-button>
<el-button v-if="isButtonShow && !commonConversation" class="chat-box-footer-send" size="mini" type="primary" :disabled="recordSending" @click="startRecording()">发送语音</el-button>
<div v-if="scriptTip" class="scriptTip">{{ scriptTip }}</div>
</div>
</div>
</div>
<div class="chatBox" :class="{'active': drawer}" :style="{'bottom':bottom+'px'}">
<div class="menuTrainListBtn" @click="clickBtn">
<i class="el-icon-more" />
</div>
<div v-show="minimize" class="reminder-drag minimize-box">
<div class="chat-title">聊天窗口</div>
<div class="minimality" @click="handleMinimality('max')">
<i class="el-icon-circle-plus" />
</div>
<div class="chat-box-main">
<template v-if="!conversitionId && userRole !== 'AUDIENCE' && !commonConversation">
<div class="chat-box-header">
<div class="chat-box-header-title">
<el-input v-model="queryMember" size="small" placeholder="请输入搜索人员">
<el-button slot="append" icon="el-icon-search" />
</el-input>
</div>
<div class="chat-setting" @click="handleSetting()">
<i class="el-icon-s-tools" />
</div>
<div v-if="!commonConversation" class="chat-setting" @click="goCommonConversation">
<el-tooltip effect="dark" content="公共会话" placement="top-start">
<i class="el-icon-chat-line-round" />
</el-tooltip>
</div>
<div v-if="conversitionId && commonConversation" class="chat-setting" @click="cancelCommonConversation">
<el-tooltip effect="dark" content="私有会话" placement="top-start">
<i class="el-icon-chat-round" />
</el-tooltip>
</div>
</div>
<div class="chat-box-content">
<el-tree
ref="tree"
:data="treeData"
:props="defaultProps"
node-key="id"
default-expand-all
show-checkbox
:filter-node-method="filterNode"
style="margin: 10px;overflow-y: auto;height: 100%;margin-right: 0;"
@node-click="handleNodeClick"
@check-change="handleCheckChange"
>
<span :id="data.id" slot-scope="{ node, data }">
<span style="font-size: 14px">{{ data.label + (data.userId? '(' + (simulationUsers[data.userId]||{}).nickName + ')': '') }}</span>
</span>
</el-tree>
</div>
<div class="chat-box-footer">
<div style="width: 400px;font-size: 14px;">{{ userString }}</div>
<el-button size="mini" type="primary" class="chat-box-footer-create" :loading="createLoading" @click="createCoversition()">创建会话</el-button>
<div v-if="scriptTip" class="scriptTip">{{ scriptTip }}</div>
</div>
</template>
<template v-else>
<div class="chat-box-header">
<div class="chat-setting" @click="handleSetting()">
<i class="el-icon-s-tools" />
</div>
<div v-if="!conversitionId && userRole !== 'AUDIENCE'" class="chat-setting" @click="cancelCommonConversation">
<el-tooltip effect="dark" content="成员列表" placement="top-start">
<i class="el-icon-s-custom" />
</el-tooltip>
</div>
<div v-if="!commonConversation" class="chat-setting" @click="goCommonConversation">
<el-tooltip effect="dark" content="公共会话" placement="top-start">
<i class="el-icon-chat-line-round" />
</el-tooltip>
</div>
<div v-if="conversitionId && commonConversation" class="chat-setting" @click="cancelCommonConversation">
<el-tooltip effect="dark" content="私有会话" placement="top-start">
<i class="el-icon-chat-round" />
</el-tooltip>
</div>
</div>
<div class="chat-box-content">
<chat-content
ref="chatContent"
:project="project"
:is-answering="IsAnswering"
:conversition-id="conversitionId"
:conversition-member-list="conversitionMemberList"
:message-list="messageList"
:simulation-users="simulationUsers"
:common-conversation="commonConversation"
:user-role="userRole"
@changeMessageList="changeMessageList"
/>
<div v-if="recordSending" class="chat_record_tip">
<div id="record_progress_bar" :style="'width:'+100/60*seconds+'%'" />
<div class="record_icon" />
<div class="record_tip_text">正在录音...</div>
<div class="record_tip_confirm" @click="stopRecording()">确定</div>
<div class="record_tip_cancle" @click="cancleRecording()">取消</div>
</div>
<chat-member-list ref="chatMemberList" :conversition-member-list="conversitionMemberList" :simulation-users="simulationUsers" @connectMember="connectMember" />
</div>
<div class="chat-box-footer">
<div class="chat-box-footer-tool" />
<el-button v-if="isConversitionCreator && isButtonShow && !commonConversation" size="mini" type="danger" class="chat-box-footer-quit" :loading="quitLoading" @click="quitConversition()">结束会话</el-button>
<el-button v-if="isButtonShow && !commonConversation" class="chat-box-footer-send" size="mini" type="primary" :disabled="recordSending" @click="startRecording()">发送语音</el-button>
<div v-if="scriptTip" class="scriptTip">{{ scriptTip }}</div>
</div>
</template>
</div>
<chat-setting ref="chatSetting" :form="form" @setSetting="setSetting" />
<chat-tooltip :group="group" :simulation-users="simulationUsers" @acceptInvite="acceptInvite" />
@ -145,7 +133,7 @@ export default {
},
data() {
return {
minimize:true,
drawer: false,
bottom:15,
recordSending:false,
conversitionId: '',
@ -213,6 +201,7 @@ export default {
} else {
this.bottom = 15;
}
this.isAudienceInitData();
},
'$store.state.training.prdType': function(val) {
this.$nextTick(() => {
@ -371,19 +360,11 @@ export default {
this.scriptTip = '';
},
methods:{
handleMinimality(data) {
if (data == 'min') {
this.minimize = true;
this.$refs.chatSetting.doClose();
clickBtn() {
if (this.drawer) {
this.drawer = false;
} else {
this.firstClick && this.$nextTick(() => {
this.isAudienceInitData();
if (this.$refs.tree) {
this.$refs.tree.filter(this.queryMember);
}
this.firstClick = false;
});
this.minimize = false;
this.drawer = true;
}
},
setSetting(data) {
@ -396,6 +377,7 @@ export default {
this.conversitionId = resp.data.id;
this.messageList = [];
this.privateMessageList = [];
this.memberIdList = [];
this.userString = '';
this.isConversitionCreator = true;
this.$message.success('创建会话成功!');
@ -688,52 +670,68 @@ export default {
};
</script>
<style lang="scss" scoped>
.chatBox{
width: 503px;
position: absolute;
padding-left:5px;
left: 0;
bottom:28px;
z-index:9;
.chatBox {
position: absolute;
left: 0;
top: calc((100% - 400px) / 2);
height: 400px;
width: 503px;
transform: translateX(-503px);
transition: all 0.4s;
z-index: 9;
&.active{
transform: translateX(0px);
}
}
.chat-box{
width: 100%;
height: 400px;
.menuTrainListBtn {
width: 20px;
height: 40px;
background: #fff;
text-align: center;
border-radius: 0px 6px 6px 0px;
position: absolute;
top: 45%;
z-index: 2;
transform: translateX(502px);
cursor: pointer;
z-index: 9;
.el-icon-more{
font-size: 20px;
margin-top: 9px;
transform-origin: 50% 50%;
transform: rotate(90deg);
margin-left:0px;
}
}
.chat-box-header{
width: 100%;
height: 40px;
border-bottom: 1px #dedede solid;
.chat-box-header-title{
font-size: 15px;
margin-left: 15px;
display: inline-block;
margin-top: 5px;
width: 70%;
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
}
}
.chat-box-header-title{
font-size: 15px;
margin-left: 15px;
display: inline-block;
margin-top: 5px;
width: 70%;
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
}
.chat-box-content{
width: 100%;
height: 300px;
border-bottom: 1px #dedede solid;
position: relative;
}
.chat-box-contentTip{
}
.chat-box-footer{
display: inline-block;
width: 100%;
height: 50px;
overflow-y: auto;
}
.chat-window{
display: inline-block;
width: 100%;
}
.chat-setting{
float: right;
line-height: 40px;
@ -794,14 +792,8 @@ export default {
z-index: 4;
background: #fff;
border-radius: 5px;
left:5px;
left: 0;
font-size:0;
}
.chat-coversition{
}
.coversition-list{
}
.chat-box-footer-create{
width: 65px;
@ -892,32 +884,6 @@ export default {
cursor: no-drop;
}
.minimize-box {
width: 97.5%;
height: 40px;
position: absolute;
left: 5px;
bottom: 0;
z-index: 222;
background: #fff;
border-radius: 5px;
.chat-title {
float: left;
font-size: 15px;
margin-left: 10px;
line-height: 40px;
}
.minimality {
float: right;
height: 40px;
line-height: 40px;
margin-right: 10px;
cursor: pointer;
}
}
.scriptTip{
position: absolute;
width: 260px;

View File

@ -17,10 +17,10 @@
:is-admin="isAdmin"
:device-code="deviceCode"
:countdown-time="countdownTime"
@passflow="passflow"
@passflow="passflow"
@getUserRole="getUserRole"
@hidepanel="hidepanel"
@devicemodel="devicemodel"
@devicemodel="devicemodel"
@startCounting="startCounting"
@hidejl3dcctv="hidejl3dcctv"
@handlerMemberManage="handlerMemberManage"
@ -210,8 +210,8 @@ export default {
});
},
'$store.state.app.windowSizeCount': function() { //
this.setWindowSize();
this.setPosition();
this.setWindowSize();
this.setPosition();
},
$route() {
this.initLoadData();
@ -479,8 +479,8 @@ export default {
},
faultChooseShow() { //
this.$refs.faultChoose.doShow();
},
passflow() {
},
passflow() {
const routeData = this.$router.resolve({
path:'/jlmap3d/passengerflow',
query:{
@ -516,7 +516,7 @@ export default {
window.open(routeData.href, '_blank', 'noopener noreferrer');
},
hidepanel() { //
if (this.$store.state.training.prdType == '04') {
if (this.$store.state.training.prdType == '04') {
this.panelShow = false;
this.drivingShow = true;
this.$refs.Jl3dDrive.show(this.mapId, this.group);