浏览代码

会议号入会

Hwf 5 月之前
父节点
当前提交
f1f36e8912
共有 2 个文件被更改,包括 57 次插入24 次删除
  1. 10 1
      src/api/emergencyCommandMap/communication.ts
  2. 47 23
      src/views/emergencyCommandMap/LeftSection/Communication.vue

+ 10 - 1
src/api/emergencyCommandMap/communication.ts

@@ -1,7 +1,7 @@
 import request from '@/utils/request';
 
 // 获取融合通信链接
-export function getStartMiniParan(data) {
+export function getStartMiniParam(data) {
   return request({
     url: '/api/videoResource/avcon/get_start_mini_param',
     method: 'post',
@@ -9,6 +9,15 @@ export function getStartMiniParan(data) {
   });
 }
 
+// 获取融合通信链接(会议号入会)
+export function getStartMiniWithNoParam(data) {
+  return request({
+    url: '/api/videoResource/avcon/get_start_mini_with_no_param',
+    method: 'post',
+    data: data
+  });
+}
+
 // 视频会商-部门树
 export function getAvconDeptTree(params) {
   return request({

+ 47 - 23
src/views/emergencyCommandMap/LeftSection/Communication.vue

@@ -84,7 +84,7 @@
       <!--        </div>-->
       <!--      </div>-->
       <div class="btn-box">
-        <div class="btn" @click="handleJoinMeeting">
+        <div class="btn" @click="showJoinMeetingDialog">
           <div class="icon1"></div>
           <div class="text">会议号入会</div>
         </div>
@@ -98,12 +98,19 @@
         </div>
       </div>
     </div>
+    <Dialog v-if="showJoinMeeting" customShow type="xs" height="300px" title="加入会议" @confirm="handleJoinMeeting" @close="closeDialog">
+      <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>
+    </Dialog>
   </div>
 </template>
 
 <script lang="ts" setup>
 import { Search } from '@element-plus/icons-vue';
-import { getAvconDeptList, getAvconDeptTree, getStartMiniParan } from '@/api/emergencyCommandMap/communication';
+import { getAvconDeptList, getAvconDeptTree, getStartMiniWithNoParam, getStartMiniParam } from '@/api/emergencyCommandMap/communication';
 
 const proxy = getCurrentInstance()?.proxy;
 
@@ -199,27 +206,44 @@ const deleteItem = (item) => {
   item.checked = false;
   changeSelectList(item);
 };
+let formRef = ref();
+let showJoinMeeting = ref(false);
+let meetingForm = reactive({
+  roomcode: ''
+});
+const rules = reactive({
+  roomcode: [{ required: true, message: '会议号不能为空', trigger: 'blur' }]
+});
+// 点击会议号入会
+const showJoinMeetingDialog = () => {
+  showJoinMeeting.value = true;
+};
+const closeDialog = () => {
+  showJoinMeeting.value = false;
+  meetingForm.roomcode = '';
+};
 // 会议号入会
 const handleJoinMeeting = () => {
-  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: '715724498', // 会议号
-    windowpos: { 'x': 0, 'y': 0, 'width': screenWidth, 'height': screenHeight, 'top': true },
-    members: { num: 1 } // 不用邀请别人
-  };
-  getStartMiniParan(data).then((res) => {
-    // 创建一个a标签元素
-    const a = document.createElement('a');
-    // 设置a标签的href属性
-    a.href = res.data;
-    // 触发点击事件
-    a.click();
+  formRef.value?.validate((valid) => {
+    if (valid) {
+      const screenWidth = window.screen.width * window.devicePixelRatio;
+      const screenHeight = window.screen.height * window.devicePixelRatio;
+      const data = {
+        'userid': '', // 空表示后台获取当前用户对应融合通信dev_id
+        'password': '123',
+        roomcode: meetingForm.roomcode, // 会议号
+        windowpos: { 'x': 0, 'y': 0, 'width': screenWidth, 'height': screenHeight, 'top': true }
+      };
+      getStartMiniWithNoParam(data).then((res) => {
+        // 创建一个a标签元素
+        const a = document.createElement('a');
+        // 设置a标签的href属性
+        a.href = res.data;
+        // 触发点击事件
+        a.click();
+      });
+      closeDialog();
+    }
   });
 };
 
@@ -247,7 +271,7 @@ const handleStartCall = () => {
       'dev-list': dev_list
     }
   };
-  getStartMiniParan(data).then((res) => {
+  getStartMiniParam(data).then((res) => {
     // 创建一个a标签元素
     const a = document.createElement('a');
     // 设置a标签的href属性
@@ -280,7 +304,7 @@ const handleStartMeeting = () => {
       'dev-list': dev_list
     }
   };
-  getStartMiniParan(data).then((res) => {
+  getStartMiniParam(data).then((res) => {
     // 创建一个a标签元素
     const a = document.createElement('a');
     // 设置a标签的href属性