Bladeren bron

Merge remote-tracking branch 'origin/dev' into dev

# Conflicts:
#	src/types/components.d.ts
zhangyihao 5 maanden geleden
bovenliggende
commit
1d8bf85062

+ 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
+  });
+}

+ 9 - 1
src/types/auto-imports.d.ts

@@ -78,6 +78,7 @@ declare global {
   const onStartTyping: typeof import('@vueuse/core')['onStartTyping']
   const onUnmounted: typeof import('vue')['onUnmounted']
   const onUpdated: typeof import('vue')['onUpdated']
+  const onWatcherCleanup: typeof import('vue')['onWatcherCleanup']
   const pausableWatch: typeof import('@vueuse/core')['pausableWatch']
   const provide: typeof import('vue')['provide']
   const provideLocal: typeof import('@vueuse/core')['provideLocal']
@@ -189,6 +190,7 @@ declare global {
   const useFullscreen: typeof import('@vueuse/core')['useFullscreen']
   const useGamepad: typeof import('@vueuse/core')['useGamepad']
   const useGeolocation: typeof import('@vueuse/core')['useGeolocation']
+  const useId: typeof import('vue')['useId']
   const useIdle: typeof import('@vueuse/core')['useIdle']
   const useImage: typeof import('@vueuse/core')['useImage']
   const useInfiniteScroll: typeof import('@vueuse/core')['useInfiniteScroll']
@@ -205,6 +207,7 @@ declare global {
   const useMediaQuery: typeof import('@vueuse/core')['useMediaQuery']
   const useMemoize: typeof import('@vueuse/core')['useMemoize']
   const useMemory: typeof import('@vueuse/core')['useMemory']
+  const useModel: typeof import('vue')['useModel']
   const useMounted: typeof import('@vueuse/core')['useMounted']
   const useMouse: typeof import('@vueuse/core')['useMouse']
   const useMouseInElement: typeof import('@vueuse/core')['useMouseInElement']
@@ -252,6 +255,7 @@ declare global {
   const useStyleTag: typeof import('@vueuse/core')['useStyleTag']
   const useSupported: typeof import('@vueuse/core')['useSupported']
   const useSwipe: typeof import('@vueuse/core')['useSwipe']
+  const useTemplateRef: typeof import('vue')['useTemplateRef']
   const useTemplateRefsList: typeof import('@vueuse/core')['useTemplateRefsList']
   const useTextDirection: typeof import('@vueuse/core')['useTextDirection']
   const useTextSelection: typeof import('@vueuse/core')['useTextSelection']
@@ -303,7 +307,7 @@ declare global {
 // for type re-export
 declare global {
   // @ts-ignore
-  export type { Component, ComponentPublicInstance, ComputedRef, ExtractDefaultPropTypes, ExtractPropTypes, ExtractPublicPropTypes, InjectionKey, PropType, Ref, VNode, WritableComputedRef } from 'vue'
+  export type { Component, ComponentPublicInstance, ComputedRef, DirectiveBinding, ExtractDefaultPropTypes, ExtractPropTypes, ExtractPublicPropTypes, InjectionKey, PropType, Ref, MaybeRef, MaybeRefOrGetter, VNode, WritableComputedRef } from 'vue'
   import('vue')
 }
 // for vue template auto import
@@ -384,6 +388,7 @@ declare module 'vue' {
     readonly onStartTyping: UnwrapRef<typeof import('@vueuse/core')['onStartTyping']>
     readonly onUnmounted: UnwrapRef<typeof import('vue')['onUnmounted']>
     readonly onUpdated: UnwrapRef<typeof import('vue')['onUpdated']>
+    readonly onWatcherCleanup: UnwrapRef<typeof import('vue')['onWatcherCleanup']>
     readonly pausableWatch: UnwrapRef<typeof import('@vueuse/core')['pausableWatch']>
     readonly provide: UnwrapRef<typeof import('vue')['provide']>
     readonly provideLocal: UnwrapRef<typeof import('@vueuse/core')['provideLocal']>
@@ -495,6 +500,7 @@ declare module 'vue' {
     readonly useFullscreen: UnwrapRef<typeof import('@vueuse/core')['useFullscreen']>
     readonly useGamepad: UnwrapRef<typeof import('@vueuse/core')['useGamepad']>
     readonly useGeolocation: UnwrapRef<typeof import('@vueuse/core')['useGeolocation']>
+    readonly useId: UnwrapRef<typeof import('vue')['useId']>
     readonly useIdle: UnwrapRef<typeof import('@vueuse/core')['useIdle']>
     readonly useImage: UnwrapRef<typeof import('@vueuse/core')['useImage']>
     readonly useInfiniteScroll: UnwrapRef<typeof import('@vueuse/core')['useInfiniteScroll']>
@@ -511,6 +517,7 @@ declare module 'vue' {
     readonly useMediaQuery: UnwrapRef<typeof import('@vueuse/core')['useMediaQuery']>
     readonly useMemoize: UnwrapRef<typeof import('@vueuse/core')['useMemoize']>
     readonly useMemory: UnwrapRef<typeof import('@vueuse/core')['useMemory']>
+    readonly useModel: UnwrapRef<typeof import('vue')['useModel']>
     readonly useMounted: UnwrapRef<typeof import('@vueuse/core')['useMounted']>
     readonly useMouse: UnwrapRef<typeof import('@vueuse/core')['useMouse']>
     readonly useMouseInElement: UnwrapRef<typeof import('@vueuse/core')['useMouseInElement']>
@@ -558,6 +565,7 @@ declare module 'vue' {
     readonly useStyleTag: UnwrapRef<typeof import('@vueuse/core')['useStyleTag']>
     readonly useSupported: UnwrapRef<typeof import('@vueuse/core')['useSupported']>
     readonly useSwipe: UnwrapRef<typeof import('@vueuse/core')['useSwipe']>
+    readonly useTemplateRef: UnwrapRef<typeof import('vue')['useTemplateRef']>
     readonly useTemplateRefsList: UnwrapRef<typeof import('@vueuse/core')['useTemplateRefsList']>
     readonly useTextDirection: UnwrapRef<typeof import('@vueuse/core')['useTextDirection']>
     readonly useTextSelection: UnwrapRef<typeof import('@vueuse/core')['useTextSelection']>

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

@@ -22,18 +22,14 @@ declare module 'vue' {
     DistributionMap: typeof import('./../components/Map/YztMap/DistributionMap.vue')['default']
     DrawMap: typeof import('./../components/Map/YztMap/DrawMap.vue')['default']
     Editor: typeof import('./../components/Editor/index.vue')['default']
-    ElAnchor: typeof import('element-plus/es')['ElAnchor']
-    ElAnchorLink: typeof import('element-plus/es')['ElAnchorLink']
     ElAutocomplete: typeof import('element-plus/es')['ElAutocomplete']
     ElBadge: typeof import('element-plus/es')['ElBadge']
     ElButton: typeof import('element-plus/es')['ElButton']
-    ElCard: typeof import('element-plus/es')['ElCard']
+    ElCheckbox: typeof import('element-plus/es')['ElCheckbox']
     ElCol: typeof import('element-plus/es')['ElCol']
     ElColorPicker: typeof import('element-plus/es')['ElColorPicker']
     ElConfigProvider: typeof import('element-plus/es')['ElConfigProvider']
     ElDatePicker: typeof import('element-plus/es')['ElDatePicker']
-    ElDescriptions: typeof import('element-plus/es')['ElDescriptions']
-    ElDescriptionsItem: typeof import('element-plus/es')['ElDescriptionsItem']
     ElDialog: typeof import('element-plus/es')['ElDialog']
     ElDivider: typeof import('element-plus/es')['ElDivider']
     ElDrawer: typeof import('element-plus/es')['ElDrawer']
@@ -54,16 +50,17 @@ declare module 'vue' {
     ElRow: typeof import('element-plus/es')['ElRow']
     ElScrollbar: typeof import('element-plus/es')['ElScrollbar']
     ElSelect: typeof import('element-plus/es')['ElSelect']
+    ElSkeleton: typeof import('element-plus/es')['ElSkeleton']
+    ElSkeletonItem: typeof import('element-plus/es')['ElSkeletonItem']
+    ElSlider: typeof import('element-plus/es')['ElSlider']
     ElSubMenu: typeof import('element-plus/es')['ElSubMenu']
     ElSwitch: typeof import('element-plus/es')['ElSwitch']
-    ElTable: typeof import('element-plus/es')['ElTable']
-    ElTableColumn: typeof import('element-plus/es')['ElTableColumn']
-    ElTabPane: typeof import('element-plus/es')['ElTabPane']
-    ElTabs: typeof import('element-plus/es')['ElTabs']
     ElTag: typeof import('element-plus/es')['ElTag']
     ElText: typeof import('element-plus/es')['ElText']
+    ElTimeline: typeof import('element-plus/es')['ElTimeline']
+    ElTimelineItem: typeof import('element-plus/es')['ElTimelineItem']
     ElTooltip: typeof import('element-plus/es')['ElTooltip']
-    ElTreeSelect: typeof import('element-plus/es')['ElTreeSelect']
+    ElTree: typeof import('element-plus/es')['ElTree']
     ElUpload: typeof import('element-plus/es')['ElUpload']
     ExcelEditor: typeof import('./../components/ExcelEditor/index.vue')['default']
     FileUpload: typeof import('./../components/FileUpload/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('表单验证失败,请检查您的输入');
       }
     });
   });

+ 98 - 96
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,13 +185,77 @@ 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 screenWidth = window.screen.width * window.devicePixelRatio;
+  const screenHeight = window.screen.height * window.devicePixelRatio;
   const data = {
-    userid: 'mmyj0006@mm.zw.yj',
-    password: '123',
+    userid: 'mmyj0006@mm.zw.yj', // 空表示后台获取当前用户对应融合通信dev_id
+    password: '123',             // 空表示后台获取
     roomid: '',
-    'dev-list': [{ id: 'hh@mm.zw.yj', avtype: 'av' }]
+    windowpos: { "x": 0, "y": 0, "width": screenWidth, "height": screenHeight, "top": true },
+    members: {
+      num: 6, // 配置多少个座位,一般就是邀请人多少个就多少个
+      'dev-list': [{ id: 'mmyj0010@mm.zw.yj', avtype: 'av' }]  // 0010是李步尚
+    }
   };
   getStartMiniParan(data).then((res) => {
     // 创建一个a标签元素
@@ -269,6 +266,10 @@ const handleStartMeeting = () => {
     a.click();
   });
 };
+
+onMounted(() => {
+  getTree();
+})
 </script>
 
 <style lang="scss" scoped>
@@ -423,9 +424,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;
           }