|
@@ -61,28 +61,28 @@
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
-<!-- <div class="select-box2">-->
|
|
|
-<!-- <div class="select-header">-->
|
|
|
-<!-- <div class="left-item">-->
|
|
|
-<!-- <div>已选择:</div>-->
|
|
|
-<!-- <div class="text">{{ selectList.length }}</div>-->
|
|
|
-<!-- <div>人</div>-->
|
|
|
-<!-- </div>-->
|
|
|
-<!-- <div class="clear-btn" @click="clearSelect">清空</div>-->
|
|
|
-<!-- </div>-->
|
|
|
-<!-- <div class="select-content">-->
|
|
|
-<!-- <div v-for="(item, index) in selectList" :key="index" class="box-item">-->
|
|
|
-<!-- <div class="line">-->
|
|
|
-<!-- <div class="text1">{{ item.name }}</div>-->
|
|
|
-<!-- <div class="text2">{{ item.duty }}</div>-->
|
|
|
-<!-- </div>-->
|
|
|
-<!-- <div class="line" style="margin-top: 20px">-->
|
|
|
-<!-- <div class="text2">{{ item.dept }}</div>-->
|
|
|
-<!-- </div>-->
|
|
|
-<!-- <div class="close-btn" @click="deleteItem(item)"></div>-->
|
|
|
-<!-- </div>-->
|
|
|
-<!-- </div>-->
|
|
|
-<!-- </div>-->
|
|
|
+ <!-- <div class="select-box2">-->
|
|
|
+ <!-- <div class="select-header">-->
|
|
|
+ <!-- <div class="left-item">-->
|
|
|
+ <!-- <div>已选择:</div>-->
|
|
|
+ <!-- <div class="text">{{ selectList.length }}</div>-->
|
|
|
+ <!-- <div>人</div>-->
|
|
|
+ <!-- </div>-->
|
|
|
+ <!-- <div class="clear-btn" @click="clearSelect">清空</div>-->
|
|
|
+ <!-- </div>-->
|
|
|
+ <!-- <div class="select-content">-->
|
|
|
+ <!-- <div v-for="(item, index) in selectList" :key="index" class="box-item">-->
|
|
|
+ <!-- <div class="line">-->
|
|
|
+ <!-- <div class="text1">{{ item.name }}</div>-->
|
|
|
+ <!-- <div class="text2">{{ item.duty }}</div>-->
|
|
|
+ <!-- </div>-->
|
|
|
+ <!-- <div class="line" style="margin-top: 20px">-->
|
|
|
+ <!-- <div class="text2">{{ item.dept }}</div>-->
|
|
|
+ <!-- </div>-->
|
|
|
+ <!-- <div class="close-btn" @click="deleteItem(item)"></div>-->
|
|
|
+ <!-- </div>-->
|
|
|
+ <!-- </div>-->
|
|
|
+ <!-- </div>-->
|
|
|
<div class="btn-box">
|
|
|
<div class="btn" @click="handleJoinMeeting">
|
|
|
<div class="icon1"></div>
|
|
@@ -143,15 +143,12 @@ const getCheckedClass = () => {
|
|
|
return res;
|
|
|
};
|
|
|
const handleNodeClick = (item) => {
|
|
|
- // if (item.isLeaf) {
|
|
|
- // debugger
|
|
|
- getAvconDeptList(item.id, {}).then((res) => {
|
|
|
- res.data.forEach((item) => {
|
|
|
- item.checked = false;
|
|
|
- });
|
|
|
- userList.value = res.data;
|
|
|
+ getAvconDeptList(item.id, {}).then((res) => {
|
|
|
+ res.data.forEach((item) => {
|
|
|
+ item.checked = false;
|
|
|
});
|
|
|
- // }
|
|
|
+ userList.value = res.data;
|
|
|
+ });
|
|
|
};
|
|
|
// 全选、全取消
|
|
|
const handleChecked = () => {
|
|
@@ -162,11 +159,13 @@ const handleChecked = () => {
|
|
|
}
|
|
|
userList.value.forEach((item) => {
|
|
|
item.checked = flag;
|
|
|
+ changeSelectList(item);
|
|
|
});
|
|
|
};
|
|
|
// 单个选中、取消选中
|
|
|
const handleChecked2 = (item) => {
|
|
|
item.checked = !item.checked;
|
|
|
+ changeSelectList(item);
|
|
|
};
|
|
|
// 清空
|
|
|
const clearSelect = () => {
|
|
@@ -175,6 +174,19 @@ const clearSelect = () => {
|
|
|
item.checked = false;
|
|
|
}
|
|
|
});
|
|
|
+ selectList.value = [];
|
|
|
+};
|
|
|
+const changeSelectList = (item) => {
|
|
|
+ const index = selectList.value.findIndex((item2) => item2.id === item.id);
|
|
|
+ if (item.checked) {
|
|
|
+ if (index === -1) {
|
|
|
+ selectList.value.push(item);
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ if (index > -1) {
|
|
|
+ selectList.value.splice(index);
|
|
|
+ }
|
|
|
+ }
|
|
|
};
|
|
|
// 清空指定项
|
|
|
const deleteItem = (item) => {
|
|
@@ -184,6 +196,8 @@ const deleteItem = (item) => {
|
|
|
break;
|
|
|
}
|
|
|
}
|
|
|
+ item.checked = false;
|
|
|
+ changeSelectList(item);
|
|
|
};
|
|
|
// 会议号入会
|
|
|
const handleJoinMeeting = () => {
|
|
@@ -193,11 +207,11 @@ const handleJoinMeeting = () => {
|
|
|
const screenWidth = window.screen.width * window.devicePixelRatio;
|
|
|
const screenHeight = window.screen.height * window.devicePixelRatio;
|
|
|
const data = {
|
|
|
- "userid": "", // 空表示后台获取当前用户对应融合通信dev_id
|
|
|
- "password": "123",
|
|
|
+ 'userid': '', // 空表示后台获取当前用户对应融合通信dev_id
|
|
|
+ 'password': '123',
|
|
|
roomid: '715724498', // 会议号
|
|
|
- windowpos: { "x": 0, "y": 0, "width": screenWidth, "height": screenHeight, "top": true },
|
|
|
- members: { num: 1} // 不用邀请别人
|
|
|
+ windowpos: { 'x': 0, 'y': 0, 'width': screenWidth, 'height': screenHeight, 'top': true },
|
|
|
+ members: { num: 1 } // 不用邀请别人
|
|
|
};
|
|
|
getStartMiniParan(data).then((res) => {
|
|
|
// 创建一个a标签元素
|
|
@@ -207,14 +221,14 @@ const handleJoinMeeting = () => {
|
|
|
// 触发点击事件
|
|
|
a.click();
|
|
|
});
|
|
|
-}
|
|
|
+};
|
|
|
|
|
|
// 电话呼叫
|
|
|
const handleStartCall = () => {
|
|
|
let dev_list = [];
|
|
|
- userList.value.forEach((item)=>{
|
|
|
- if(item.checked && item.mobile != '') {
|
|
|
- dev_list.push({id: item.mobile, avtype: 'a'}); // a 音频 v 视频 默认 av
|
|
|
+ userList.value.forEach((item) => {
|
|
|
+ if (item.checked && item.mobile != '') {
|
|
|
+ dev_list.push({ id: item.mobile, avtype: 'a' }); // a 音频 v 视频 默认 av
|
|
|
}
|
|
|
});
|
|
|
if (dev_list.length == 0) {
|
|
@@ -224,14 +238,13 @@ const handleStartCall = () => {
|
|
|
const screenWidth = window.screen.width * window.devicePixelRatio;
|
|
|
const screenHeight = window.screen.height * window.devicePixelRatio;
|
|
|
const data = {
|
|
|
- "userid": "", // 空表示后台获取当前用户对应融合通信dev_id
|
|
|
- "password": "123",
|
|
|
+ 'userid': '', // 空表示后台获取当前用户对应融合通信dev_id
|
|
|
+ 'password': '123',
|
|
|
roomid: '', // 空表示新会议室
|
|
|
- windowpos: { "x": 0, "y": 0, "width": screenWidth, "height": screenHeight, "top": true },
|
|
|
+ windowpos: { 'x': 0, 'y': 0, 'width': screenWidth, 'height': screenHeight, 'top': true },
|
|
|
members: {
|
|
|
num: dev_list.length + 2, // 配置多少个座位,一般就是邀请人多少个就多少个
|
|
|
- "dev-list": dev_list,
|
|
|
- // "sip-list": [ { "id": "60002" }, { "id": "60008", "avtype": "a" }, { "id": "60003", "avtype": "v" } ]
|
|
|
+ 'dev-list': dev_list
|
|
|
}
|
|
|
};
|
|
|
getStartMiniParan(data).then((res) => {
|
|
@@ -245,16 +258,26 @@ const handleStartCall = () => {
|
|
|
};
|
|
|
// 发起会议
|
|
|
const handleStartMeeting = () => {
|
|
|
+ let dev_list = [];
|
|
|
+ userList.value.forEach((item) => {
|
|
|
+ if (item.checked && item.mobile != '') {
|
|
|
+ dev_list.push({ id: item.mobile, avtype: 'av' }); // a 音频 v 视频 默认 av
|
|
|
+ }
|
|
|
+ });
|
|
|
+ if (dev_list.length == 0) {
|
|
|
+ proxy?.$modal.msgError('请勾选人员');
|
|
|
+ return false;
|
|
|
+ }
|
|
|
const screenWidth = window.screen.width * window.devicePixelRatio;
|
|
|
const screenHeight = window.screen.height * window.devicePixelRatio;
|
|
|
const data = {
|
|
|
- userid: 'mmyj0006@mm.zw.yj', // 空表示后台获取当前用户对应融合通信dev_id
|
|
|
- password: '123', // 空表示后台获取
|
|
|
+ userid: '', // 空表示后台获取当前用户对应融合通信dev_id
|
|
|
+ password: '123', // 空表示后台获取
|
|
|
roomid: '',
|
|
|
- windowpos: { "x": 0, "y": 0, "width": screenWidth, "height": screenHeight, "top": true },
|
|
|
+ windowpos: { 'x': 0, 'y': 0, 'width': screenWidth, 'height': screenHeight, 'top': true },
|
|
|
members: {
|
|
|
- num: 6, // 配置多少个座位,一般就是邀请人多少个就多少个
|
|
|
- 'dev-list': [{ id: 'mmyj0010@mm.zw.yj', avtype: 'av' }] // 0010是李步尚
|
|
|
+ num: dev_list.length + 2, // 配置多少个座位,一般就是邀请人多少个就多少个
|
|
|
+ 'dev-list': dev_list
|
|
|
}
|
|
|
};
|
|
|
getStartMiniParan(data).then((res) => {
|
|
@@ -269,7 +292,7 @@ const handleStartMeeting = () => {
|
|
|
|
|
|
onMounted(() => {
|
|
|
getTree();
|
|
|
-})
|
|
|
+});
|
|
|
</script>
|
|
|
|
|
|
<style lang="scss" scoped>
|