Browse Source

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

Hwf 2 months ago
parent
commit
0e7ba34cc8

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

@@ -33,11 +33,6 @@ declare module 'vue' {
     ElSkeleton: typeof import('element-plus/es')['ElSkeleton']
     ElSkeletonItem: typeof import('element-plus/es')['ElSkeletonItem']
     ElSlider: typeof import('element-plus/es')['ElSlider']
-    ElStep: typeof import('element-plus/es')['ElStep']
-    ElSteps: typeof import('element-plus/es')['ElSteps']
-    ElSwitch: typeof import('element-plus/es')['ElSwitch']
-    ElTabPane: typeof import('element-plus/es')['ElTabPane']
-    ElTabs: typeof import('element-plus/es')['ElTabs']
     ElText: typeof import('element-plus/es')['ElText']
     ElTimeline: typeof import('element-plus/es')['ElTimeline']
     ElTimelineItem: typeof import('element-plus/es')['ElTimelineItem']

+ 3 - 0
src/views/login.vue

@@ -364,4 +364,7 @@ onMounted(() => {
     right: -5px;
   }
 }
+:deep(.el-form .el-form-item--default .el-form-item__error) {
+  font-size: 14px !important;
+}
 </style>

+ 54 - 40
src/views/routineCommandMap/PositionMap.vue

@@ -1,5 +1,5 @@
 <template>
-  <Dialog type="sm" :title="!!id ? '修改灾害信息' : '请选择事发地点'" draggable customShow @close="handleClose" @confirm="submit">
+  <Dialog type="sm" :title="!!id ? '修改灾害信息' : '请选择事发地点'" draggable custom-show @close="handleClose" @confirm="submit">
     <el-form ref="queryFormRef" :model="form">
       <div class="form">
         <div class="line">
@@ -26,8 +26,8 @@
         <div class="line">
           <div class="form-item" style="margin-right: 20px">
             <div class="text">详细地址</div>
-            <el-input v-model="form.address" class="custom-input" placeholder="请输入" />
-            <div v-if="searchPop" class="scroll_box">
+            <el-input v-model="form.address" class="custom-input" placeholder="请输入" @input="handleInput" />
+            <div v-if="searchPop" class="scroll_box" style="width: 1350px; height: 700px">
               <div style="height: 60px; line-height: 60px">
                 <span style="font-weight: bold">搜索结果列表</span>
                 <i class="el-icon-close" style="float: right; font-size: 20px; cursor: pointer" @click="closeSearchList()" />
@@ -51,6 +51,7 @@
               </el-scrollbar>
 
               <el-pagination
+                class="custom-pagination-popper"
                 background
                 small
                 :hide-on-single-page="true"
@@ -58,7 +59,7 @@
                 :total="total"
                 :page-size="pageSize"
                 :current-page="pageNum"
-                style="margin-top: 10px"
+                style="margin-top: -40px; margin-left: 600px"
                 @current-change="handleChangePage"
               >
               </el-pagination>
@@ -101,6 +102,7 @@ import { useRouter } from 'vue-router';
 import { addEvent } from '@/api/emergencyCommandMap/JointDuty';
 import { showErrorMsg, showSuccessMsg } from '@/utils/notification';
 import { editEvent, getEventDetail } from '@/api/duty/eventing';
+import { debounce } from '@/utils/index';
 
 const props = defineProps({
   id: {
@@ -197,49 +199,54 @@ onUnmounted(() => {
   }
   window.removeEventListener('resize', handleResize);
 });
-function handleInput(flag) {
-  if (!form.value.address) return;
+const handleInput = debounce(
+  function (flag) {
+    if (!form.value.address) return;
 
-  if (!flag) {
-    //搜索
-    total.value = 0;
-    pageNum.value = 1;
-  }
-
-  if (!placeSearch) {
-    placeSearch = new amap.PlaceSearch({
-      pageSize: pageSize.value, // 每页条数,默认10,范围1-50
-      pageIndex: pageNum.value, // 页码
-      extensions: 'all' // 默认base,返回基本地址信息;all:返回详细信息
-    });
-  }
+    if (!flag) {
+      //搜索
+      total.value = 0;
+      pageNum.value = 1;
+    }
 
-  searchPop.value = true;
-  placeSearch.setPageIndex(pageNum.value);
-  placeSearch.search(form.value.address, (status, result) => {
-    // console.log(result.poiList.pois, 'result')
-    if (!!result.poiList && result.poiList.pois && result.poiList.pois.length > 0) {
-      let arr = [];
-      const pois = result.poiList.pois;
-      total.value = result.poiList ? result.poiList.count : 0;
-      arr = pois.map((item) => {
-        return {
-          name: item.name,
-          address: item.address,
-          img: item.photos[0]?.url,
-          lnglat: [item.location.lng, item.location.lat]
-        };
+    if (!placeSearch) {
+      placeSearch = new amap.PlaceSearch({
+        pageSize: pageSize.value, // 每页条数,默认10,范围1-50
+        pageIndex: pageNum.value, // 页码
+        extensions: 'all' // 默认base,返回基本地址信息;all:返回详细信息
       });
-      searchList.value = arr;
-    } else {
-      total.value = 0;
-      searchList.value = [];
     }
-  });
-}
+    searchPop.value = true;
+    placeSearch.setPageIndex(pageNum.value);
+    placeSearch.search(form.value.address, (status, result) => {
+      // console.log(result.poiList.pois, 'result')
+      if (!!result.poiList && result.poiList.pois && result.poiList.pois.length > 0) {
+        let arr = [];
+        const pois = result.poiList.pois;
+        total.value = result.poiList ? result.poiList.count : 0;
+        arr = pois.map((item) => {
+          return {
+            name: item.name,
+            address: item.address,
+            img: item.photos[0]?.url,
+            lnglat: [item.location.lng, item.location.lat]
+          };
+        });
+        searchList.value = arr;
+      } else {
+        total.value = 0;
+        searchList.value = [];
+      }
+    });
+  },
+  500,
+  false
+);
+
 function handleChangePage(newNum) {
   if (!searchPop.value) return;
   pageNum.value = newNum;
+  debugger;
   handleInput(1);
 }
 function closeSearchList() {
@@ -563,4 +570,11 @@ function submit() {
     }
   }
 }
+:deep(.dialog-content) {
+  overflow: unset !important;
+}
+.custom-pagination-popper {
+  z-index: 9999 !important;
+  position: relative;
+}
 </style>

+ 87 - 2
src/views/routineCommandMap/RightSection/EventReport/EventManage.vue

@@ -166,7 +166,7 @@
         </div>
         <div class="td">{{ item.event_time }}</div>
         <div class="td">
-          <div v-if="item.event_status === '0'" class="btn-box" @click="enterCommand(item)">
+          <div v-if="item.event_status === '0'" class="btn-box" @click="startCommand()">
             <i class="start-icon" />
             <div class="gradient-text3">开始指挥</div>
           </div>
@@ -181,6 +181,34 @@
 <!--          <div class="common-btn2" @click="enterCommand(item)">进入指挥</div>-->
           <!--          <div class="common-btn2" style="margin-left: 20px" @click="handleClose(item)">关闭事件</div>-->
         </div>
+        <Dialog
+          v-if="startPop"
+          type="sm"
+          custom-show
+          :title="title"
+          confirm-text="确 定"
+          confirm-class="common-btn-danger"
+          @confirm="enterCommand1(item)"
+          @close="conmandClose"
+          style="height: 500px"
+          class="two"
+        >
+          <el-form ref="eventFormRef" :model="form" :rules="data.rules" label-width="190px">
+            <el-form-item label="事件等级" prop="event_level">
+              <el-select
+                v-model="queryParams.event_level"
+                placeholder="请选择事件"
+                class="custom-select"
+                size="large"
+                popper-class="custom-select-popper"
+                :teleported="false"
+                clearable
+              >
+                <el-option v-for="item in mm_event_level" :key="item.value" :label="item.label" :value="item.value"></el-option>
+              </el-select>
+            </el-form-item>
+          </el-form>
+        </Dialog>
       </div>
     </div>
     <div class="footer">
@@ -256,10 +284,14 @@ const data = reactive({
   },
   event_levelSelection: [],
   event_statusSelection: [],
-  regionSelection: []
+  regionSelection: [],
+  rules: {
+    event_level: [{ required: true, message: '事件等级不能为空', trigger: 'blur' }]
+  }
 });
 
 const { queryParams, form } = toRefs(data);
+
 const getList = () => {
   loading.value = true;
   getEvent(queryParams.value)
@@ -368,6 +400,28 @@ const enterCommand = (item) => {
     });
   }
 };
+const enterCommand1 = (item) => {
+  if (!queryParams.value.event_level) {
+    proxy?.$modal.msgError('请先选择一个等级');
+    return;
+  }
+  if (item) {
+    // 查看事件详情逻辑
+    console.log('进入指挥', item);
+    router.push({
+      path: props.flag ? '/emergencyCommandMap' : '/emergencyCommandMap2',
+      query: { event_id: item.event_id }
+    });
+    startPop.value = false;
+  }
+};
+const startPop = ref(false);
+const startCommand = () => {
+  startPop.value = true;
+};
+const conmandClose = () => {
+  startPop.value = false;
+};
 </script>
 
 <style lang="scss" scoped>
@@ -467,4 +521,35 @@ const enterCommand = (item) => {
   display: flex;
   align-items: flex-start;
 }
+.btn-box {
+  display: flex;
+  justify-content: center;
+  align-items: center;
+  cursor: pointer;
+  .start-icon {
+    display: inline-block;
+    width: 50px;
+    height: 50px;
+    background: url('@/assets/images/routineCommandMap/eventReport/start.png') no-repeat;
+    background-size: 100% 100%;
+    margin-right: 8px;
+  }
+  .record-icon {
+    display: inline-block;
+    width: 46px;
+    height: 50px;
+    background: url('@/assets/images/routineCommandMap/eventReport/record.png') no-repeat;
+    background-size: 100% 100%;
+    margin-right: 8px;
+  }
+}
+.two {
+  :deep(.dialog-content) {
+    overflow: unset !important;
+  }
+
+  :deep(.el-form-item__label) {
+    color: #fff !important;
+  }
+}
 </style>