@@ -152,17 +152,28 @@
console.log('dom ===>',dom)
dom.pause()
if(this.times > 0){
+ console.log(this.times)
if(dom.readyState == 4){
- for(let i = 0;i<=this.times;i++){
- setTimeout(() =>{
- this.start++;
- this.isMuted = false,
+ for(let i = 0;i<=this.times;i++){
+ setTimeout(() =>{
+ this.start++;
+ this.times--;
+ this.isMuted = false,
+ this.isPlay = true
+ dom.play()
+ },2500 * i)
+ }
+
+ }
+ }else{
+ if(dom.readyState == 4){
+ this.isMuted = false,
this.isPlay = true
+ this.start = 0
dom.play()
- },2500 * i)
+ }
+
}
- }
- }
if (obj) {
this.$notify({
title: '警告',
diff --git a/src/views/dispatch/index.vue b/src/views/dispatch/index.vue
index f56272c..62b3402 100644
--- a/src/views/dispatch/index.vue
+++ b/src/views/dispatch/index.vue
@@ -56,7 +56,7 @@
邀请
删除
@@ -74,12 +74,12 @@
- {{ data.groupName }}
+ {{ data.groupName }}
邀请
@@ -609,11 +609,11 @@ export default {
mylog("receiveConferenceInvite: ");
_conf = para.conference;
});
- setTimeout(() =>{
+ // setTimeout(() =>{
if(!isRegisted()) {
regist();
}
- },2000)
+ // },2000)
},
// 获取所有调度组
getGroupData(){
@@ -675,33 +675,8 @@ export default {
// 邀请群组
inviteGroup(row){
console.log(row)
- this.$confirm('确定要邀请该群组吗?', '提示', {
- confirmButtonText: '确定',
- cancelButtonText: '取消',
- type: 'warning'
- }).then(() => {
- this.isGroup = true;
- row.children.map(item => {
- this.selectTreeNode.push(item.id)
- this.inviteList.push({
- id:item.id,
- name:item.label
- })
- })
-
- this.$nextTick(() => {
- let audio = document.getElementById('video') //获取媒体控件
- this.$refs.tree.setCheckedKeys(this.selectTreeNode); //把当前选择的key设置到el-tree中
- client.startIntercom(row.id, audio).then((conf) => { //发起群组对讲
- this._intercom = conf;
- setListener();
- mylog("startintercom success");
- }).catch((error) => {
- mylog("startIntercom fail: " + JSON.stringify(error));
- })
- })
-
- })
+ this.getGroupPeo(row)
+
},
@@ -836,15 +811,21 @@ export default {
this.isIntercom = true;
this.isMetting = false
this.dialogCall = false;
- this.callItem.isSelect = 1;
- this.deviceData.find(item => item.id == this.callItem.id).isSelect = 1;
- this.inviteList.push(this.callItem);
- let audio = document.getElementById('video') //获取媒体控件
- client.startTempIntercom([this.callItem.id],audio,"").then((conf) => { //发起临时对讲
+
+ // let audio = document.getElementById('video') //获取媒体控件
+ var members = [this.callItem.name]
+ var mediaControl = video1;
+ var name = ''
+ client.startTempIntercom(members,mediaControl,name).then((conf) => { //发起临时对讲
+ console.log('发起对讲======================================================================>')
+ this.callItem.isSelect = 1;
+ this.deviceData.find(item => item.id == this.callItem.id).isSelect = 1;
+ this.inviteList.push(this.callItem);
this._intercom = conf;
setListener();
mylog("startintercom success:" + conf.groupNumber);
}).catch((error)=>{
+ this.$message.error('对讲失败')
mylog("startIntercomfail:" + JSON.stringify(error));
})
})
@@ -860,10 +841,9 @@ export default {
},
// 视频呼叫
videoCall(){
- this.callItem.isSelect = 1;
+ // this.callItem.isSelect = 1;
this.isIntercom = false;
- this.deviceData.find(item => item.id == this.callItem.id).isSelect = 1;
- this.inviteList.push(this.callItem);
+
this.dialogCall = false;
this.makecall(true,2)
},
@@ -1128,27 +1108,90 @@ export default {
// console.log('点击节点 ===>',data,node)
// },
- loadNode(node,resolve){
- let arr = []
- console.log('node ===>',node)
+ getGroupPeo(data){
getGroupUser({
curPage:1,
pageRows:100,
- groupNum:node.data.groupNum,
- groupName:node.data.groupName
+ groupNum:data.groupNum,
+ groupName:data.groupName
}).then(res =>{
+ let dataList = res.data.page.dataList
getOnline().then(res1 =>{
+ console.log('res1 ===>',res1)
res1.data.Onlines.map(item1 =>{
- res.data.page.dataList.map(item =>{
+ console.log('item1 ======>',item1)
+ dataList.map(item =>{
+ item.online = false
if(item1.employeeID == item.employeeID){
item.online = true
}
- arr.push({groupNum:item.id,groupName:item.name,online:item.online})
})
})
+ let tmp = dataList.find(item => item.online)
+ console.log('tmp ==================>', tmp)
+ if(tmp){
+ this.$confirm('确定要邀请该群组吗?', '提示', {
+ confirmButtonText: '确定',
+ cancelButtonText: '取消',
+ type: 'warning'
+ }).then(() => {
+ this.isGroup = true;
+ // row.children.map(item => {
+ // this.selectTreeNode.push(item.id)
+ // this.inviteList.push({
+ // id:item.id,
+ // name:item.label
+ // })
+ // })
+
+ this.$nextTick(() => {
+ var groupNumber = data.groupNum;
+ var mediaControl = video1
+ console.log('groupNumber===》',groupNumber,'media ===>',mediaControl)
+ // this.$refs.tree.setCheckedKeys(this.selectTreeNode); //把当前选择的key设置到el-tree中
+ client.startIntercom(groupNumber,mediaControl).then((conf) => { //发起群组对讲
+ this._intercom = conf;
+ setListener();
+ mylog("startintercom success");
+ }).catch((error) => {
+ mylog("startIntercom fail: " + JSON.stringify(error));
+ })
+ })
+
+ })
+ }else{
+ this.$message.error('该组下无在线人员,不可邀请')
+ }
+ })
+
+
+ })
+ },
+ loadNode(node,resolve){
+ let arr = []
+ getOnline().then(res =>{
+ let onlineData = res.data.Onlines
+ getGroupUser({
+ curPage:1,
+ pageRows:100,
+ groupNum:node.data.groupNum,
+ groupName:node.data.groupName
+ }).then(res =>{
+ let dataList = res.data.page.dataList
+ dataList.map(item =>{
+ item.online = false
+ onlineData.map(item1 =>{
+ if(item.employeeID == item1.employeeID){
+ item.online = true
+ }
+ })
+ })
+ dataList.map(item =>{
+ arr.push({groupNum:item.id,groupName:item.name,online:item.online})
+ })
+ arr.sort((a, b) => b.online-a.online)
+ return resolve(arr)
})
- console.log('arr ===>',arr)
- return resolve(arr)
})
}
},
@@ -1561,6 +1604,11 @@ export default {
opacity: 0.4;
}
+ /deep/ .outline{
+ opacity: 0.4;
+
+ }
+
/deep/ .el-tree-node__content:hover{
background: transparent;
}