Kaynağa Gözat

视频会商部门树、用户

Hwf 5 ay önce
ebeveyn
işleme
78d01ceb5a

+ 18 - 0
src/api/emergencyCommandMap/communication.ts

@@ -8,3 +8,21 @@ export function getStartMiniParan(data) {
     data: data
   });
 }
+
+// 视频会商-部门树
+export function getAvconDeptTree(params) {
+  return request({
+    url: '/api/system/user/avcon/deptTree',
+    method: 'get',
+    params: params
+  });
+}
+
+// 视频会商-部门树
+export function getAvconDeptList(id, params) {
+  return request({
+    url: '/api/system/user/avcon/list/dept/' + id,
+    method: 'get',
+    params: params
+  });
+}

+ 7 - 0
src/types/components.d.ts

@@ -44,11 +44,14 @@ declare module 'vue' {
     ElImage: typeof import('element-plus/es')['ElImage']
     ElInput: typeof import('element-plus/es')['ElInput']
     ElInputNumber: typeof import('element-plus/es')['ElInputNumber']
+    ElLink: typeof import('element-plus/es')['ElLink']
     ElMenu: typeof import('element-plus/es')['ElMenu']
     ElMenuItem: typeof import('element-plus/es')['ElMenuItem']
     ElOption: typeof import('element-plus/es')['ElOption']
     ElPagination: typeof import('element-plus/es')['ElPagination']
     ElPopover: typeof import('element-plus/es')['ElPopover']
+    ElRadio: typeof import('element-plus/es')['ElRadio']
+    ElRadioGroup: typeof import('element-plus/es')['ElRadioGroup']
     ElRow: typeof import('element-plus/es')['ElRow']
     ElScrollbar: typeof import('element-plus/es')['ElScrollbar']
     ElSelect: typeof import('element-plus/es')['ElSelect']
@@ -65,6 +68,7 @@ declare module 'vue' {
     ElTimelineItem: typeof import('element-plus/es')['ElTimelineItem']
     ElTooltip: typeof import('element-plus/es')['ElTooltip']
     ElTree: typeof import('element-plus/es')['ElTree']
+    ElTreeSelect: typeof import('element-plus/es')['ElTreeSelect']
     ElUpload: typeof import('element-plus/es')['ElUpload']
     ExcelEditor: typeof import('./../components/ExcelEditor/index.vue')['default']
     FileUpload: typeof import('./../components/FileUpload/index.vue')['default']
@@ -76,6 +80,9 @@ declare module 'vue' {
     HikvisionPlayer: typeof import('./../components/HKVideo/hikvision-player.vue')['default']
     HKVideo: typeof import('./../components/HKVideo/index.vue')['default']
     IconSelect: typeof import('./../components/IconSelect/index.vue')['default']
+    IEpCaretBottom: typeof import('~icons/ep/caret-bottom')['default']
+    IEpCaretTop: typeof import('~icons/ep/caret-top')['default']
+    IEpUploadFilled: typeof import('~icons/ep/upload-filled')['default']
     IFrame: typeof import('./../components/iFrame/index.vue')['default']
     ImagePreview: typeof import('./../components/ImagePreview/index.vue')['default']
     ImageUpload: typeof import('./../components/ImageUpload/index.vue')['default']

+ 0 - 2
src/views/comprehensiveGuarantee/materialReserves/materialsDeclaration.vue

@@ -1,13 +1,11 @@
 <template>
   <div class="app-container">
     <div v-show="!materialsDeclarationViewState.show && !materialsDistributionEditState.show && !materialsDeclarationAddState.show">
-      <h1>物资储备管理</h1>
       <el-row :gutter="10" class="mb8">
         <el-col :span="1.5">
           <el-button type="primary" icon="Plus" @click="handleAdd">新增采购</el-button>
         </el-col>
       </el-row>
-      <h3>申报列表</h3>
       <!-- 表格组件 -->
       <el-table ref="multipleTable" v-loading="loading" :data="tableData" style="width: 100%" :max-height="400">
         <el-table-column label="序号" align="center" width="55" fixed="left">

+ 2 - 2
src/views/emergencyCommandMap/LeftSection/AssociatedEvent.vue

@@ -129,7 +129,7 @@ const closeDialog = () => {
 // 提交事件信息
 const submitEvent = async () => {
   if (!form.value.event_title) {
-    proxy?.$message.error('请先选择一个事件');
+    proxy?.$modal.msgError('请先选择一个事件');
     return;
   }
   try {
@@ -148,7 +148,7 @@ const submitEvent = async () => {
     refreshPageData();
   } catch (error) {
     console.error('Failed to associate event:', error);
-    proxy?.$message.error('提交表单失败,请检查您的输入');
+    proxy?.$modal.msgError('提交表单失败,请检查您的输入');
   }
 };
 

+ 6 - 6
src/views/emergencyCommandMap/LeftSection/CloseCommand.vue

@@ -146,7 +146,7 @@ const endProcess = () => {
   // 如果 flag 为 false,则需要选择一个事件
   if (!props.flag) {
     if (!form.value.event_id) {
-      proxy?.$message.error('请先选择一个事件');
+      proxy?.$modal.msgError('请先选择一个事件');
       return;
     }
     // 提交选择的事件信息
@@ -161,12 +161,12 @@ const endProcess = () => {
           })
           .catch((error) => {
             console.error('Failed to close event:', error);
-            proxy?.$message.error('关闭事件失败,请检查您的输入');
+            proxy?.$modal.msgError('关闭事件失败,请检查您的输入');
           });
       })
       .catch((error) => {
         console.error('Failed to submit the form:', error);
-        proxy?.$message.error('提交表单失败,请检查您的输入');
+        proxy?.$modal.msgError('提交表单失败,请检查您的输入');
       });
   } else {
     // 如果 flag 为 true,则直接调用 closeEvent 接口关闭事件
@@ -177,7 +177,7 @@ const endProcess = () => {
       })
       .catch((error) => {
         console.error('Failed to submit the form:', error);
-        proxy?.$message.error('提交表单失败,请检查您的输入');
+        proxy?.$modal.msgError('提交表单失败,请检查您的输入');
       });
   }
 };
@@ -205,13 +205,13 @@ const endProcess = () => {
         } catch (error) {
           console.error('Failed to close event:', error);
           reject(error); // 拒绝Promise表示失败
-          proxy?.$message.error('关闭事件失败,请检查您的输入');
+          proxy?.$modal.msgError('关闭事件失败,请检查您的输入');
         } finally {
           buttonLoading.value = false;
         }
       } else {
         reject(new Error('Validation failed')); // 验证失败也拒绝Promise
-        proxy?.$message.error('表单验证失败,请检查您的输入');
+        proxy?.$modal.msgError('表单验证失败,请检查您的输入');
       }
     });
   });

+ 89 - 93
src/views/emergencyCommandMap/LeftSection/Communication.vue

@@ -10,7 +10,7 @@
     <div v-show="activeIndex === 0" class="content">
       <div class="left-content">
         <div class="search-box">
-          <el-input v-model="queryParams.keyword" class="custom-input" placeholder="组织架构搜索" style="width: 214px">
+          <el-input v-model="queryParams.label" class="custom-input" placeholder="组织架构搜索" style="width: 214px" @keyup.enter="getTree">
             <template #prefix>
               <el-icon class="el-input__icon"><search /></el-icon>
             </template>
@@ -84,11 +84,11 @@
 <!--        </div>-->
 <!--      </div>-->
       <div class="btn-box">
-        <div class="btn">
+        <div class="btn" @click="handleJoinMeeting">
           <div class="icon1"></div>
           <div class="text">会议号入会</div>
         </div>
-        <div class="btn">
+        <div class="btn" @click="handleStartCall">
           <div class="icon2"></div>
           <div class="text">电话呼叫</div>
         </div>
@@ -103,57 +103,25 @@
 
 <script lang="ts" setup>
 import { Search } from '@element-plus/icons-vue';
-import { getStartMiniParan } from '@/api/emergencyCommandMap/communication';
+import { getAvconDeptList, getAvconDeptTree, getStartMiniParan } from '@/api/emergencyCommandMap/communication';
+
+const proxy = getCurrentInstance()?.proxy;
 
 let activeIndex = ref(0);
 const options = ref([{ name: '全部', value: '全部' }]);
-const queryParams = ref({
-  value1: '',
-  keyword: ''
-});
 const menu = ref([{ name: '视频会商' }, { name: '无人机' }, { name: '单兵设备' }]);
-const treeData = ref([
-  {
-    label: '茂名市',
-    children: [
-      {
-        label: '茂名市委',
-        children: [
-          {
-            label: '茂名市纪委监委',
-            isLeaf: true
-          },
-          {
-            label: '茂名市委办公室',
-            isLeaf: true
-          },
-          {
-            label: '茂名市委组织部',
-            isLeaf: true
-          }
-        ]
-      },
-      {
-        label: '茂名市人大',
-        children: [
-          {
-            label: '茂名市人大常委会秘书长、副秘书长',
-            isLeaf: true
-          },
-          {
-            label: '茂名市人大常委会办公室',
-            isLeaf: true
-          },
-          {
-            label: '茂名市人大常委会研究室',
-            isLeaf: true
-          }
-        ]
-      }
-    ]
-  }
-]);
+const treeData = ref([]);
 const userList = ref([]);
+const queryParams = reactive({
+  label: '',
+  value1: ''
+});
+
+const getTree = () => {
+  getAvconDeptTree(queryParams).then((res) => {
+    treeData.value = res.data;
+  });
+};
 const selectList = computed(() => {
   const data = [];
   userList.value.forEach((item) => {
@@ -175,50 +143,15 @@ const getCheckedClass = () => {
   return res;
 };
 const handleNodeClick = (item) => {
-  if (item.isLeaf) {
-    const data = [
-      {
-        id: 1,
-        name: '李莉莉',
-        duty: '副主任',
-        dept: '茂名市/茂名市政府/茂名应急管理局'
-      },
-      {
-        id: 2,
-        name: '何里',
-        duty: '副主任',
-        dept: '茂名市/茂名市政府/茂名应急管理局'
-      },
-      {
-        id: 3,
-        name: '张三',
-        duty: '副主任',
-        dept: '茂名市/茂名市政府/茂名应急管理局'
-      },
-      {
-        id: 4,
-        name: '张三',
-        duty: '副主任',
-        dept: '茂名市/茂名市政府/茂名应急管理局'
-      },
-      {
-        id: 5,
-        name: '张三',
-        duty: '副主任',
-        dept: '茂名市/茂名市政府/茂名应急管理局'
-      },
-      {
-        id: 6,
-        name: '张三',
-        duty: '副主任',
-        dept: '茂名市/茂名市政府/茂名应急管理局'
-      }
-    ];
-    data.forEach((item) => {
-      item.checked = false;
+  // if (item.isLeaf) {
+  //   debugger
+    getAvconDeptList(item.id).then((res) => {
+      res.data.forEach((item) => {
+        item.checked = false;
+      });
+      userList.value = res.data;
     });
-    userList.value = data;
-  }
+  // }
 };
 // 全选、全取消
 const handleChecked = () => {
@@ -252,6 +185,64 @@ const deleteItem = (item) => {
     }
   }
 };
+// 会议号入会
+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();
+  });
+}
+
+// 电话呼叫
+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,
+      // "sip-list": [ { "id": "60002" }, { "id": "60008", "avtype": "a" }, { "id": "60003", "avtype": "v" } ]
+    }
+  };
+  getStartMiniParan(data).then((res) => {
+    // 创建一个a标签元素
+    const a = document.createElement('a');
+    // 设置a标签的href属性
+    a.href = res.data;
+    // 触发点击事件
+    a.click();
+  });
+};
 // 发起会议
 const handleStartMeeting = () => {
   const data = {
@@ -269,6 +260,10 @@ const handleStartMeeting = () => {
     a.click();
   });
 };
+
+onMounted(() => {
+  getTree();
+})
 </script>
 
 <style lang="scss" scoped>
@@ -423,9 +418,10 @@ const handleStartMeeting = () => {
             background-color: #122868;
           }
           .phone-icon {
+            flex-shrink: 0;
             width: 24px;
             height: 25px;
-            background: url('@/assets/images/emergencyCommandMap/communication/phone.png');
+            background: url('@/assets/images/emergencyCommandMap/communication/phone.png') no-repeat;
             background-size: 100%;
             cursor: pointer;
           }