|
@@ -2,7 +2,7 @@
|
|
|
<div class="communication-container">
|
|
|
<div class="common-title gradient-text">前方通信</div>
|
|
|
<div class="tabs">
|
|
|
- <div v-for="(item, index) in menu" :key="index" :class="activeIndex === index ? 'tab tab_active' : 'tab'">
|
|
|
+ <div v-for="(item, index) in menu" :key="index" :class="activeIndex === index ? 'tab tab_active' : 'tab'" @click="activeIndex = index">
|
|
|
{{ item.name }}
|
|
|
</div>
|
|
|
</div>
|
|
@@ -24,7 +24,7 @@
|
|
|
>
|
|
|
<el-option v-for="level in options" :key="level.value" :label="level.name" :value="level.value"></el-option>
|
|
|
</el-select>
|
|
|
- <el-input v-model="queryParams.keyword" class="custom-input" placeholder="组织架构搜索">
|
|
|
+ <el-input v-model="queryParams.value1" class="custom-input" placeholder="设备搜索">
|
|
|
<template #prefix>
|
|
|
<el-icon class="el-input__icon"><search /></el-icon>
|
|
|
</template>
|
|
@@ -42,8 +42,8 @@
|
|
|
<div class="td2">
|
|
|
<div :class="getCheckedClass()" @click="handleChecked"></div>
|
|
|
</div>
|
|
|
- <div class="td">姓名</div>
|
|
|
- <div class="td3">职务</div>
|
|
|
+ <div class="td">设备</div>
|
|
|
+ <!--<div class="td3">姓名职务</div>-->
|
|
|
</div>
|
|
|
<div class="table-content">
|
|
|
<div v-for="(item, index) in userList" :key="index" class="tr2">
|
|
@@ -51,10 +51,11 @@
|
|
|
<div :class="item.checked ? 'common-checked-active' : 'common-checked'" @click="handleChecked2(item)"></div>
|
|
|
</div>
|
|
|
<div class="td">{{ item.name }}</div>
|
|
|
- <div class="td3">
|
|
|
+ <!--<div class="td3">
|
|
|
{{ item.duty }}
|
|
|
<div class="phone-icon"></div>
|
|
|
</div>
|
|
|
+ -->
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
@@ -88,22 +89,62 @@
|
|
|
<div class="icon1"></div>
|
|
|
<div class="text">会议号入会</div>
|
|
|
</div>
|
|
|
- <div class="btn" @click="handleStartCall">
|
|
|
+ <div class="btn" @click="handleOpenCall">
|
|
|
<div class="icon2"></div>
|
|
|
<div class="text">电话呼叫</div>
|
|
|
</div>
|
|
|
- <div class="btn" @click="handleStartMeeting">
|
|
|
+ <div class="btn" @click="handleOpenMeeting">
|
|
|
<div class="icon3"></div>
|
|
|
<div class="text">发起会议</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
- <Dialog v-if="showJoinMeeting" customShow type="xs" height="180px" title="加入会议" @confirm="handleJoinMeeting" @close="closeDialog">
|
|
|
+ <Drone v-show="activeIndex === 1" />
|
|
|
+ <IndividualEquipment v-show="activeIndex === 2" />
|
|
|
+
|
|
|
+ <Dialog v-if="showOpenMeeting" customShow type="xs" height="220px" title="发起会议" @confirm="handleStartMeeting" @close="closeOpenDialog">
|
|
|
+ <div class="dialog-content">
|
|
|
+ <el-form ref="form2Ref" :model="openMeetingForm" :rules="rules2">
|
|
|
+
|
|
|
+ <el-form-item label="账号" label-width="80px" prop="username">
|
|
|
+ <el-input v-model="openMeetingForm.username" class="custom-input2" clearable placeholder="请输入设备账号" />
|
|
|
+ </el-form-item>
|
|
|
+
|
|
|
+ <el-form-item label="密码" label-width="80px" prop="userpass">
|
|
|
+ <el-input v-model="openMeetingForm.userpass" type="password" class="custom-input2" clearable placeholder="请输入设备密码" />
|
|
|
+ </el-form-item>
|
|
|
+ </el-form>
|
|
|
+ </div>
|
|
|
+ </Dialog>
|
|
|
+
|
|
|
+ <Dialog v-if="showJoinMeeting" customShow type="xs" height="280px" title="加入会议" @confirm="handleJoinMeeting" @close="closeDialog">
|
|
|
<div class="dialog-content">
|
|
|
<el-form ref="formRef" :model="meetingForm" :rules="rules">
|
|
|
<el-form-item label="会议号" label-width="80px" prop="roomcode">
|
|
|
<el-input v-model="meetingForm.roomcode" class="custom-input2" clearable placeholder="请输入会议号" />
|
|
|
</el-form-item>
|
|
|
+ <el-form-item label="账号" label-width="80px" prop="username">
|
|
|
+ <el-input v-model="meetingForm.username" class="custom-input2" clearable placeholder="请输入设备账号" />
|
|
|
+ </el-form-item>
|
|
|
+
|
|
|
+ <el-form-item label="密码" label-width="80px" prop="userpass">
|
|
|
+ <el-input v-model="meetingForm.userpass" type="password" class="custom-input2" clearable placeholder="请输入设备密码" />
|
|
|
+ </el-form-item>
|
|
|
+ </el-form>
|
|
|
+ </div>
|
|
|
+ </Dialog>
|
|
|
+
|
|
|
+ <Dialog v-if="showOpenMeeting" customShow type="xs" height="220px" title="电话呼叫" @confirm="handleStartCall" @close="closeOpenDialog">
|
|
|
+ <div class="dialog-content">
|
|
|
+ <el-form ref="form2Ref" :model="openMeetingForm" :rules="rules2">
|
|
|
+
|
|
|
+ <el-form-item label="账号" label-width="80px" prop="username">
|
|
|
+ <el-input v-model="openMeetingForm.username" class="custom-input2" clearable placeholder="请输入设备账号" />
|
|
|
+ </el-form-item>
|
|
|
+
|
|
|
+ <el-form-item label="密码" label-width="80px" prop="userpass">
|
|
|
+ <el-input v-model="openMeetingForm.userpass" type="password" class="custom-input2" clearable placeholder="请输入设备密码" />
|
|
|
+ </el-form-item>
|
|
|
</el-form>
|
|
|
</div>
|
|
|
</Dialog>
|
|
@@ -112,10 +153,11 @@
|
|
|
|
|
|
<script lang="ts" setup>
|
|
|
import { Search } from '@element-plus/icons-vue';
|
|
|
-import { getAvconDeptList, getAvconDeptTree, getStartMiniWithNoParam, getStartMiniParam } from '@/api/emergencyCommandMap/communication';
|
|
|
+import { getStartMiniWithNoParam, getStartMiniParam, getAvconDeviceTree, getAvconDeviceList } from '@/api/emergencyCommandMap/communication';
|
|
|
+import Drone from './Drone.vue';
|
|
|
+import IndividualEquipment from './IndividualEquipment.vue';
|
|
|
|
|
|
const proxy = getCurrentInstance()?.proxy;
|
|
|
-
|
|
|
let activeIndex = ref(0);
|
|
|
const options = ref([{ name: '全部', value: '全部' }]);
|
|
|
const menu = ref([{ name: '视频会商' }, { name: '无人机' }, { name: '单兵设备' }]);
|
|
@@ -127,10 +169,11 @@ const queryParams = reactive({
|
|
|
});
|
|
|
|
|
|
const getTree = () => {
|
|
|
- getAvconDeptTree(queryParams).then((res) => {
|
|
|
+ getAvconDeviceTree(queryParams).then((res) => {
|
|
|
treeData.value = res.data;
|
|
|
});
|
|
|
};
|
|
|
+/*
|
|
|
const selectList = computed(() => {
|
|
|
const data = [];
|
|
|
userList.value.forEach((item) => {
|
|
@@ -140,6 +183,8 @@ const selectList = computed(() => {
|
|
|
});
|
|
|
return data;
|
|
|
});
|
|
|
+*/
|
|
|
+const selectList = ref([]);
|
|
|
const getCheckedClass = () => {
|
|
|
let res = 'common-checked';
|
|
|
const len = userList.value.length;
|
|
@@ -152,7 +197,7 @@ const getCheckedClass = () => {
|
|
|
return res;
|
|
|
};
|
|
|
const handleNodeClick = (item) => {
|
|
|
- getAvconDeptList(item.id, {}).then((res) => {
|
|
|
+ getAvconDeviceList(item.id, {}).then((res) => {
|
|
|
res.data.forEach((item) => {
|
|
|
item.checked = false;
|
|
|
});
|
|
@@ -211,10 +256,14 @@ const deleteItem = (item) => {
|
|
|
let formRef = ref();
|
|
|
let showJoinMeeting = ref(false);
|
|
|
let meetingForm = reactive({
|
|
|
- roomcode: ''
|
|
|
+ roomcode: '',
|
|
|
+ username: '',
|
|
|
+ userpass: ''
|
|
|
});
|
|
|
const rules = reactive({
|
|
|
- roomcode: [{ required: true, message: '会议号不能为空', trigger: 'blur' }]
|
|
|
+ roomcode: [{ required: true, message: '会议号不能为空', trigger: 'blur' }],
|
|
|
+ username: [{ required: true, message: '会议账号不能为空', trigger: 'blur' }],
|
|
|
+ userpass: [{ required: true, message: '会议密码不能为空', trigger: 'blur' }]
|
|
|
});
|
|
|
// 点击会议号入会
|
|
|
const showJoinMeetingDialog = () => {
|
|
@@ -224,6 +273,27 @@ const closeDialog = () => {
|
|
|
showJoinMeeting.value = false;
|
|
|
meetingForm.roomcode = '';
|
|
|
};
|
|
|
+///////////////////
|
|
|
+let form2Ref = ref();
|
|
|
+let showOpenMeeting = ref(false);
|
|
|
+let openMeetingForm = reactive({
|
|
|
+ username: '',
|
|
|
+ userpass: ''
|
|
|
+});
|
|
|
+const rules2 = reactive({
|
|
|
+ username: [{ required: true, message: '会议账号不能为空', trigger: 'blur' }],
|
|
|
+ userpass: [{ required: true, message: '会议密码不能为空', trigger: 'blur' }]
|
|
|
+});
|
|
|
+const handleOpenMeeting = () => {
|
|
|
+ showOpenMeeting.value = true;
|
|
|
+};
|
|
|
+const closeOpenDialog = () => {
|
|
|
+ showOpenMeeting.value = false;
|
|
|
+};
|
|
|
+const handleOpenCall = () => {
|
|
|
+ showOpenMeeting.value = true;
|
|
|
+};
|
|
|
+
|
|
|
// 会议号入会
|
|
|
const handleJoinMeeting = () => {
|
|
|
formRef.value?.validate((valid) => {
|
|
@@ -231,8 +301,8 @@ const handleJoinMeeting = () => {
|
|
|
const screenWidth = window.screen.width * window.devicePixelRatio;
|
|
|
const screenHeight = window.screen.height * window.devicePixelRatio;
|
|
|
const data = {
|
|
|
- 'userid': '', // 空表示后台获取当前用户对应融合通信dev_id
|
|
|
- 'password': '123',
|
|
|
+ userid: meetingForm.username, // 空表示后台获取当前用户对应融合通信dev_id
|
|
|
+ password: meetingForm.userpass || '123',
|
|
|
roomcode: meetingForm.roomcode, // 会议号
|
|
|
windowpos: { 'x': 0, 'y': 0, 'width': screenWidth, 'height': screenHeight, 'top': true }
|
|
|
};
|
|
@@ -243,6 +313,9 @@ const handleJoinMeeting = () => {
|
|
|
a.href = res.data;
|
|
|
// 触发点击事件
|
|
|
a.click();
|
|
|
+ // 保存账号和密码
|
|
|
+ localStorage.setItem('meeting_username', meetingForm.username)
|
|
|
+ localStorage.setItem('meeting_userpass', meetingForm.userpass)
|
|
|
});
|
|
|
closeDialog();
|
|
|
}
|
|
@@ -251,72 +324,97 @@ const handleJoinMeeting = () => {
|
|
|
|
|
|
// 电话呼叫
|
|
|
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
|
|
|
- }
|
|
|
- });
|
|
|
- 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': '', // 空表示后台获取当前用户对应融合通信dev_id
|
|
|
- 'password': '123',
|
|
|
- roomid: '', // 空表示新会议室
|
|
|
- windowpos: { 'x': 0, 'y': 0, 'width': screenWidth, 'height': screenHeight, 'top': true },
|
|
|
- members: {
|
|
|
- num: dev_list.length + 2, // 配置多少个座位,一般就是邀请人多少个就多少个
|
|
|
- 'dev-list': dev_list
|
|
|
+ form2Ref.value?.validate((valid) => {
|
|
|
+ if (valid) {
|
|
|
+ let dev_list = [];
|
|
|
+ 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) {
|
|
|
+ proxy?.$modal.msgError('请勾选人员');
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+ const screenWidth = window.screen.width * window.devicePixelRatio;
|
|
|
+ const screenHeight = window.screen.height * window.devicePixelRatio;
|
|
|
+ const data = {
|
|
|
+ userid: openMeetingForm.username, // 空表示后台获取当前用户对应融合通信dev_id
|
|
|
+ password: openMeetingForm.userpass,
|
|
|
+ roomid: '', // 空表示新会议室
|
|
|
+ windowpos: { 'x': 0, 'y': 0, 'width': screenWidth, 'height': screenHeight, 'top': true },
|
|
|
+ members: {
|
|
|
+ num: dev_list.length + 2, // 配置多少个座位,一般就是邀请人多少个就多少个
|
|
|
+ 'dev-list': dev_list
|
|
|
+ }
|
|
|
+ };
|
|
|
+ getStartMiniParam(data).then((res) => {
|
|
|
+ // 创建一个a标签元素
|
|
|
+ const a = document.createElement('a');
|
|
|
+ // 设置a标签的href属性
|
|
|
+ a.href = res.data;
|
|
|
+ // 触发点击事件
|
|
|
+ a.click();
|
|
|
+
|
|
|
+ // 保存账号和密码
|
|
|
+ localStorage.setItem('meeting_username', openMeetingForm.username)
|
|
|
+ localStorage.setItem('meeting_userpass', openMeetingForm.userpass)
|
|
|
+ });
|
|
|
+ closeOpenDialog();
|
|
|
}
|
|
|
- };
|
|
|
- getStartMiniParam(data).then((res) => {
|
|
|
- // 创建一个a标签元素
|
|
|
- const a = document.createElement('a');
|
|
|
- // 设置a标签的href属性
|
|
|
- a.href = res.data;
|
|
|
- // 触发点击事件
|
|
|
- a.click();
|
|
|
- });
|
|
|
+ })
|
|
|
};
|
|
|
// 发起会议
|
|
|
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: '', // 空表示后台获取当前用户对应融合通信dev_id
|
|
|
- password: '123', // 空表示后台获取
|
|
|
- roomid: '',
|
|
|
- windowpos: { 'x': 0, 'y': 0, 'width': screenWidth, 'height': screenHeight, 'top': true },
|
|
|
- members: {
|
|
|
- num: dev_list.length + 2, // 配置多少个座位,一般就是邀请人多少个就多少个
|
|
|
- 'dev-list': dev_list
|
|
|
+ form2Ref.value?.validate((valid) => {
|
|
|
+ if (valid) {
|
|
|
+ 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: openMeetingForm.username, // 空表示后台获取当前用户对应融合通信dev_id
|
|
|
+ password: openMeetingForm.userpass,
|
|
|
+ roomid: '',
|
|
|
+ windowpos: { 'x': 0, 'y': 0, 'width': screenWidth, 'height': screenHeight, 'top': true },
|
|
|
+ members: {
|
|
|
+ num: dev_list.length + 2, // 配置多少个座位,一般就是邀请人多少个就多少个
|
|
|
+ 'dev-list': dev_list
|
|
|
+ }
|
|
|
+ };
|
|
|
+ getStartMiniParam(data).then((res) => {
|
|
|
+ // 创建一个a标签元素
|
|
|
+ const a = document.createElement('a');
|
|
|
+ // 设置a标签的href属性
|
|
|
+ a.href = res.data;
|
|
|
+ // 触发点击事件
|
|
|
+ a.click();
|
|
|
+
|
|
|
+ // 保存账号和密码
|
|
|
+ localStorage.setItem('meeting_username', openMeetingForm.username)
|
|
|
+ localStorage.setItem('meeting_userpass', openMeetingForm.userpass)
|
|
|
+ });
|
|
|
+ closeOpenDialog();
|
|
|
}
|
|
|
- };
|
|
|
- getStartMiniParam(data).then((res) => {
|
|
|
- // 创建一个a标签元素
|
|
|
- const a = document.createElement('a');
|
|
|
- // 设置a标签的href属性
|
|
|
- a.href = res.data;
|
|
|
- // 触发点击事件
|
|
|
- a.click();
|
|
|
- });
|
|
|
+ })
|
|
|
};
|
|
|
|
|
|
onMounted(() => {
|
|
|
+ const meeting_username = localStorage.getItem('meeting_username') || "";
|
|
|
+ const meeting_userpass = localStorage.getItem('meeting_userpass') || "";
|
|
|
+ meetingForm.username = meeting_username;
|
|
|
+ meetingForm.userpass = meeting_userpass;
|
|
|
+ openMeetingForm.username = meeting_username;
|
|
|
+ openMeetingForm.userpass = meeting_userpass;
|
|
|
+
|
|
|
getTree();
|
|
|
});
|
|
|
</script>
|