Browse Source

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

# Conflicts:
#	src/views/emergencyCommandMap/RightSection/RenWuGengXin.vue
愿你天天开心 9 months ago
parent
commit
ebad8d2c5f

+ 10 - 0
src/assets/styles/index.scss

@@ -489,3 +489,13 @@ aside {
     transform: translateX(0);
   }
 }
+
+.success-bg {
+  background-color: #38c95a;
+}
+.primary-bg {
+  background-color: #2c81ff;
+}
+.processing-bg {
+  background-color: #ffb000;
+}

+ 4 - 6
src/components/Map/index.vue

@@ -55,7 +55,6 @@ const containerRef = ref();
 const width = ref('100%');
 const height = ref('100%');
 
-
 const mapState = reactive({
   center: [110.93154257997, 21.669064031332],
   zoom: 7.9,
@@ -122,14 +121,14 @@ const { getAMap, getMap, switchMap, addMarker, addSearchMarker, clearMarker, get
         tableBox.className = 'table-box';
         let table = document.createElement('div');
         table.className = 'table';
-        table.innerHTML = '<div class="point-item"><div class="td1">主题</div><div class="td1">名称</div></div>';
+        table.innerHTML = '<div class="point-item"><div class="td3">主题</div><div class="td3">名称</div></div>';
         data2.forEach((item) => {
           item.longitude = data.longitude;
           item.latitude = data.latitude;
           const div = document.createElement('div');
-          div.className = 'point-item';
+          div.className = 'point-item point-item-hover';
           div.innerHTML =
-            '<div class="td2">' + getDictLabel(point_type.value, item.dataType.toString()) + '</div><div class="td2">' + item.name + '</div>';
+            '<div class="td4">' + getDictLabel(point_type.value, item.dataType.toString()) + '</div><div class="td4">' + item.name + '</div>';
           div.addEventListener('click', () => {
             handlePointDetails(item);
           });
@@ -261,7 +260,7 @@ const filterTd = (obj, dataType) => {
         i = 0;
       }
       const value = !!obj[key] ? obj[key] : '';
-      if (value && value.length > 6) {
+      if (value && value.length > 8) {
         if (i === 0) {
           data.push({ type: 'longText', data: [{ label: keyLabel, value: value }] });
           i = 0;
@@ -286,7 +285,6 @@ const filterTd = (obj, dataType) => {
   if (!!tempData && JSON.stringify(tempData) !== '{}') {
     data.push(tempData);
   }
-  debugger
   if (data[data.length - 1].data && data[data.length - 1].data.length === 1 && data[data.length - 1].type === 'shortText') {
     data[data.length - 1].data[1] = { label: '', value: '' };
   }

+ 55 - 52
src/components/Map/map.scss

@@ -11,23 +11,26 @@ $vh_base: 2520;
 }
 
 :deep(.point-info) {
-  border: 4px solid #2a81fc;
-  padding: 5px 15px 15px;
-  width: 570px;
-  font-size: 16px;
+  border: vw(7) solid #2a81fc;
+  padding: vw(5) vw(32) vw(32);
+  width: vw(1569);
+  font-size: vw(38);
   display: flex;
   flex-wrap: wrap;
   background-color: #1c294c;
   color: #d5dde3;
   position: relative;
   .table-box {
-    max-height: 250px;
+    max-height: vw(800);
     overflow-y: auto;
     width: 100%;
+    &::-webkit-scrollbar {
+      width: vw(6);
+    }
   }
   .table {
-    border-top: 1px solid #3d66ae;
-    border-right: 1px solid #3d66ae;
+    border-top: vw(2) solid #3d66ae;
+    border-right: vw(2) solid #3d66ae;
     display: flex;
     flex-wrap: wrap;
     width: 100%;
@@ -39,111 +42,111 @@ $vh_base: 2520;
   .point-item {
     display: flex;
     width: 100%;
-    .td1 {
-      width: 132.75px;
-    }
-    .td2 {
-      width: 132.75px;
+  }
+  .point-item-hover {
+    cursor: pointer;
+    &:hover {
+      background-color: #1a326e;
     }
   }
   .point-item2 {
     display: flex;
     width: 100%;
-    .td1 {
-      width: 132.75px;
-    }
-    .td2 {
-      width: 398.25px;
-    }
   }
-  .td1 {
+  .td1, {
+    width: vw(369);
+  }
+  .td1, .td3 {
     background-color: #1a326e;
-    padding: 5px 10px;
+    padding: vw(15) vw(20);
     color: #c6d1e6;
-    border-bottom: 1px solid #3d66ae;
-    border-left: 1px solid #3d66ae;
+    border-bottom: vw(2) solid #3d66ae;
+    border-left: vw(2) solid #3d66ae;
+  }
+  .td2, .td4 {
+    padding: vw(15) vw(20);
+    border-bottom: vw(1) solid #3d66ae;
+    border-left: vw(1) solid #3d66ae;
   }
-  .td2 {
-    padding: 5px 10px;
-    border-bottom: 1px solid #3d66ae;
-    border-left: 1px solid #3d66ae;
+  .td2, .td3, .td4 {
+    flex: 1;
   }
   .close {
     position: absolute;
-    top: 8px;
-    right: 12px;
-    width: 10px;
-    height: 10px;
+    top: vw(20);
+    right: vw(60);
+    width: vw(32);
+    height: vw(32);
     background: url('@/assets/images/close.png') no-repeat;
     background-size: 100% 100%;
     cursor: pointer;
   }
   .title-box {
-    width: 550px;
-    height: 40px;
+    width: vw(1354);
+    height: vw(175);
     position: relative;
     background: url('@/assets/images/line.png') no-repeat;
-    background-size: 35px 15px;
+    background-size: vw(163) vw(69);
     background-position: bottom left;
     &::before {
       content: "";
-      width: 500px;
-      height: 2px;
+      width: vw(1309);
+      height: vw(6.9);
       background-image: linear-gradient(to right, rgba(0, 191, 252, 0.35) 0, rgba(0, 191, 252, 0) 100%);
       display: block;
       position: absolute;
-      left: 38px;
-      bottom: 6.5px;
+      left: vw(180);
+      bottom: vw(30);
     }
   }
   .gradient-text {
-    font-size: 24px;
+    font-size: vw(84);
   }
   .icon1, .icon2, .icon3, .icon4 {
     position: absolute;
-    top: 2px;
-    left: 2px;
-    width: 12px;
-    height: 12px;
+    top: vw(10);
+    left: vw(10);
+    width: vw(12);
+    height: vw(12);
     background: url('@/assets/images/inputIcon1.png') no-repeat;
   }
   .icon2 {
     left: unset;
-    right: 2px;
+    right: vw(10);
     transform: rotate(90deg);
   }
   .icon3 {
     left: unset;
     top: unset;
-    right: 2px;
-    bottom: 2px;
+    right: vw(10);
+    bottom: vw(10);
     transform: rotate(180deg);
   }
   .icon4 {
     top: unset;
-    bottom: 2px;
+    bottom: vw(10);
     transform: rotate(-90deg);
   }
   .flex {
     width: 100%;
     display: flex;
     justify-content: flex-end;
+    margin-top: vw(-20);
   }
   .btn {
-    width: 125px;
-    height: 50px;
+    width: vw(300);
+    height:vw(120);
     background: url('@/assets/images/map/rightMenu/potentialFloodHazard/btn2.png') no-repeat;
     background-size: 100% 100%;
     display: flex;
     justify-content: center;
     align-items: center;
     cursor: pointer;
-    margin-left: 20px;
+    margin-left: vw(20);
     color: #edfaff;
-    //font-size: 32px;
     .video-icon {
-      width: 20.5px;
-      height: 19px;
+      width: vw(41);
+      height: vw(38);
       background: url('@/assets/images/map/rightMenu/potentialFloodHazard/video.png') no-repeat;
       background-size: 100% 100%;
       display: flex;

+ 0 - 1
src/components/NearbyVideos/index.vue

@@ -21,7 +21,6 @@
       />
     </div>
   </Dialog>
-
 </template>
 
 <script lang="ts" setup name="NearbyVideos">

+ 3 - 9
src/views/emergencyCommandMap/RightSection/RenWuGenZong.vue

@@ -7,7 +7,7 @@
           <div class="header-left">
             <div class="box-title">{{ item.unit_name ? item.unit_name : '茂名市应急局' }}</div>
             <div class="time">{{ item.update_time }}</div>
-            <div :class="item.processing_status === '已完成' ? 'success' : 'processing'">{{ item.processing_status }}</div>
+            <div :class="item.processing_status === '已完成' ? 'success-bg' : item.processing_status === '已完成' ? 'primary-bg' : 'processing-bg'">{{ item.processing_status }}</div>
           </div>
           <div class="btn" @click="openUpdateDialog(item)">更新</div>
         </div>
@@ -154,8 +154,8 @@ watch(
         margin-left: 70px;
       }
     }
-    .success,
-    .processing,
+    .success-bg,
+    .processing-bg,
     .btn {
       width: 154px;
       height: 56px;
@@ -166,12 +166,6 @@ watch(
       text-align: center;
       margin-left: 30px;
     }
-    .success {
-      background-color: #38c95a;
-    }
-    .processing {
-      background-color: #ffb000;
-    }
     .btn {
       background-color: #247dff;
       cursor: pointer;

+ 40 - 38
src/views/emergencyCommandMap/RightSection/RenWuGenZongInfo.vue

@@ -63,9 +63,10 @@
         <div class="td">{{ item.registrar }}</div>
         <div class="td">{{ formatDateTime(item.creation_time) }}</div>
         <div class="td">{{ formatDateTime(item.update_time) }}</div>
-        <div class="td">{{ item.processing_status }}</div>
         <div class="td">
-          <div>更新</div>
+          <div :class="item.processing_status === '已完成' ? 'success-bg' : item.processing_status === '已完成' ? 'primary-bg' : 'processing-bg'">{{ item.processing_status }}</div></div>
+        <div class="td">
+          <div class="btn" @click="openUpdateDialog(item)">更新</div>
         </div>
       </div>
     </div>
@@ -80,11 +81,19 @@
       />
     </div>
   </Dialog>
+  <RenWuGengXin
+    v-model="newSectionState.showListDialog"
+    :task="selectedTask"
+    :event-id="eventId"
+    title="任务进度更新"
+    @update-success="getList"
+  />
 </template>
 
 <script lang="ts" setup>
 import { ref, reactive } from 'vue';
 import { selectTask } from '@/api/emergencyCommandMap/JointDuty';
+import RenWuGengXin from '@/views/emergencyCommandMap/RightSection/RenWuGengXin.vue';
 
 const taskList = ref([]);
 const total = ref(0);
@@ -131,30 +140,6 @@ const resetQuery = () => {
   getList();
 };
 
-const handleSelectionChange = (selection) => {
-  ids.value = selection.map((item) => item.eventId);
-  selectedRow.value = selection.length === 1 ? selection[0] : null;
-  single.value = selection.length != 1;
-  multiple.value = !selection.length;
-};
-
-const eventEditDialogState = reactive({
-  show: false,
-  title: ''
-});
-const eventDetailsState = reactive({
-  show: false,
-  title: ''
-});
-
-//查看事件详情
-const handleView = (row) => {
-  // 查看事件详情逻辑
-  eventId.value = row.event_id;
-  eventDetailsState.title = '查看事件';
-  eventDetailsState.show = true;
-};
-
 // 关闭事件
 const closeDialogState = reactive({
   show: false,
@@ -167,19 +152,20 @@ const closeDialogState = reactive({
   }
 });
 
-const handleClose = (row) => {
-  if (row) {
-    console.log(row);
-    closeDialogState.form.eventId = row.event_id;
-    closeDialogState.form.deaths = row.deaths;
-    closeDialogState.form.injuries = row.injuries;
-    closeDialogState.form.missing = row.missing;
-    closeDialogState.show = true;
-  }
-};
+// 选中的任务
+const selectedTask = ref({
+  task_id: '',
+  sortBy: 'creation_time',
+  pageNum: 2,
+  pageSize: 20
+});
+const newSectionState = reactive({
+  showListDialog: false
+});
 
-const handleCloseEventDialog = (b) => {
-  console.log('handleCloseEventDialog', b);
+const openUpdateDialog = (task) => {
+  selectedTask.value = { ...task };
+  newSectionState.showListDialog = true;
 };
 const props = defineProps<{
   modelValue?: boolean;
@@ -331,4 +317,20 @@ const closeDialog = () => {
   display: flex;
   align-items: flex-start;
 }
+.success-bg,
+.processing-bg,
+.btn {
+  width: 154px;
+  height: 56px;
+  line-height: 56px;
+  font-size: 32px;
+  color: #ffffff;
+  border-radius: 10px;
+  text-align: center;
+  margin-left: 30px;
+}
+.btn {
+  background-color: #247dff;
+  cursor: pointer;
+}
 </style>

+ 31 - 4
src/views/routineCommandMap/LeftSection/EventManage.vue

@@ -96,7 +96,7 @@
               </el-form-item>
             </el-col>
             <div class="flex">
-              <div class="common-btn-primary" @click="handleQuery" style="margin-top: -32px">搜索</div>
+              <div class="common-btn-primary" style="margin-top: -32px" @click="handleQuery">搜索</div>
               <div class="common-btn" @click="resetQuery">重置</div>
             </div>
           </el-row>
@@ -118,14 +118,41 @@
       <div v-for="(item, index) in eventList" :key="index" class="tr">
         <div class="td">{{ item.event_id }}</div>
         <div class="td">{{ item.event_title }}</div>
-        <div class="td">{{ item.event_type }}</div>
+<!--        <div class="td">{{ item.event_type }}</div>-->
+        <div v-if="item.event_type === '0' || item.event_type === '1' || item.event_type === '2' || item.event_type === '3'" class="flex">
+          <template v-if="item.event_type === '0'">
+            <div>自然灾害</div>
+          </template>
+          <template v-if="item.event_type === '1'">
+            <div>事故灾害</div>
+          </template>
+          <template v-if="item.event_type === '2'">
+            <div>公共卫生事件</div>
+          </template>
+          <template v-if="item.event_type === '3'">
+            <div>社会安全事件</div>
+          </template>
+        </div>
         <div class="td">{{ item.event_level }}</div>
         <div class="td">{{ item.address }}</div>
-        <div class="td">{{ item.event_status }}</div>
+        <div v-if="item.event_status === '0' || item.event_status === '1' || item.event_status === '2' || item.event_status === '3'" class="flex">
+          <template v-if="item.event_status === '0'">
+            <div>已登记</div>
+          </template>
+          <template v-if="item.event_status === '1'">
+            <div>指挥中</div>
+          </template>
+          <template v-if="item.event_status === '2'">
+            <div>指挥结束</div>
+          </template>
+          <template v-if="item.event_status === '3'">
+            <div>已关闭</div>
+          </template>
+        </div>
         <div class="td">{{ item.event_time }}</div>
         <div class="td">
           <div class="common-btn2" @click="enterCommand(item)">进入指挥</div>
-<!--          <div class="common-btn2" style="margin-left: 20px" @click="handleClose(item)">关闭事件</div>-->
+          <!--          <div class="common-btn2" style="margin-left: 20px" @click="handleClose(item)">关闭事件</div>-->
         </div>
       </div>
     </div>

+ 13 - 2
src/views/routineCommandMap/RightSection/planManageDialog.vue

@@ -1,5 +1,5 @@
 <template>
-  <Dialog v-model="localValue" customShow type="xl" title="预案管理列表" hide-footer @close="handleClose">
+  <Dialog v-model="localValue" custom-show type="xl" title="预案管理列表" hide-footer @close="handleClose">
     <transition name="fade">
       <div v-if="isFormVisible" class="mb-[20px]">
         <el-form ref="queryFormRef" :model="planForm" :inline="true">
@@ -79,7 +79,18 @@
       <div v-for="(item, index) in demoList" :key="index" class="tr">
         <div class="td">{{ item.planId }}</div>
         <div class="td">{{ item.planName }}</div>
-        <div class="td">{{ item.planType }}</div>
+        <!--        <div class="td">{{ item.planType }}</div>-->
+        <div v-if="item.planType === '1' || item.planType === '2' || item.planType === '3'" class="flex">
+          <template v-if="item.planType === '1'">
+            <div>总体应急预案</div>
+          </template>
+          <template v-if="item.planType === '2'">
+            <div>专项应急预案</div>
+          </template>
+          <template v-if="item.planType === '3'">
+            <div>部门应急预案</div>
+          </template>
+        </div>
         <div class="td">{{ item.document }}</div>
         <div class="td">{{ item.organizingUnit }}</div>
         <div class="td">{{ item.publishDate }}</div>