Browse Source

指挥记录

Hwf 1 tuần trước cách đây
mục cha
commit
c56d078c88

+ 1 - 1
src/api/system/menu/index.ts

@@ -11,7 +11,7 @@ export const listMenu = (query?: MenuQuery): AxiosPromise<MenuVO[]> => {
   });
 };
 
-export const listMenu2 = (query?: MenuQuery): AxiosPromise<MenuVO[]> => {
+export const listMenu2 = (query) => {
   return request({
     url: '/api/layerConfiguration/getRouters',
     method: 'get',

+ 1 - 1
src/store/modules/map.ts

@@ -143,7 +143,7 @@ export const useMapStore = defineStore('map', () => {
   };
   // 初始化左侧菜单数据
   const initMenuData = () => {
-    listMenu2().then((res: any) => {
+    listMenu2({ ZT: '2' }).then((res: any) => {
       const data = res.data ? res.data : [];
       data.forEach((item: any) => {
         item.show = true;

+ 1 - 1
src/views/monitor/operlog/index.vue

@@ -52,7 +52,7 @@
         ref="operLogTableRef"
         v-loading="loading"
         :data="operlogList"
-        
+
         @selection-change="handleSelectionChange"
         @sort-change="handleSortChange"
       >

+ 114 - 0
src/views/routineCommandMap/RightSection/EventReport/CommandRecord.vue

@@ -0,0 +1,114 @@
+<template>
+  <Dialog type="xl" title="指挥记录" class="custom-dialog" customShow hide-footer @close="handleClose">
+    <!-- 表格组件 -->
+    <div class="common-table">
+      <div class="table-header">
+        <div class="td">操作人员</div>
+        <div class="td">操作地址</div>
+        <div class="td">操作内容</div>
+        <div class="td">操作日期</div>
+      </div>
+      <div v-for="(item, index) in operlogList" :key="index" class="tr">
+        <div class="td">{{ item.operName }}</div>
+        <div class="td">{{ item.operIp }}</div>
+        <div class="td">{{ item.czrz }}</div>
+        <div class="td">{{ item.operTime }}</div>
+      </div>
+    </div>
+    <div class="footer">
+      <pagination
+        v-show="total > 0"
+        v-model:page="queryParams.pageNum"
+        v-model:limit="queryParams.pageSize"
+        :total="total"
+        layout="total, prev, pager, next"
+        @pagination="getList"
+      />
+    </div>
+  </Dialog>
+</template>
+
+<script lang="ts" setup name="CommandRecord">
+import { list } from '@/api/monitor/operlog';
+
+const props = defineProps({
+  modelValue: {
+    type: Boolean,
+    default: () => {
+      return false;
+    }
+  }
+});
+const emits = defineEmits(['update:modelValue']);
+
+const operlogList = ref([]);
+const total = ref(0);
+const queryParams = reactive({
+  pageNum: 1,
+  pageSize: 10
+});
+
+/** 查询日志 */
+const getList = async () => {
+  const res = await list(queryParams);
+  operlogList.value = res.rows;
+  total.value = res.total;
+};
+
+const handleClose = () => {
+  emits('update:modelValue', false);
+};
+
+getList();
+</script>
+
+<style lang="scss" scoped>
+.footer {
+  height: 64px;
+  display: flex;
+  justify-content: flex-end;
+  margin-bottom: 30px;
+  .pagination-container {
+    height: 64px;
+    margin: 0;
+  }
+  :deep(.el-pagination__total) {
+    color: #a7ccdf !important;
+  }
+  :deep(.el-pagination) {
+    .btn-next,
+    .btn-prev {
+      background-color: transparent !important;
+      border: none !important;
+      .el-icon {
+        color: #a7ccdf !important;
+      }
+    }
+    .btn-prev:disabled,
+    .btn-next:disabled {
+      background-color: transparent !important;
+      border: none !important;
+    }
+    .el-pager li {
+      text-align: center;
+      color: #a7ccdf !important;
+      background-color: #0e3064 !important;
+      border: 1px solid #0c57a7 !important;
+      &:hover {
+        background-color: #038dff !important;
+        border: 1px solid #038dff !important;
+      }
+    }
+    .el-pager li.is-active {
+      background-color: #038dff !important;
+      border: 1px solid #038dff !important;
+    }
+  }
+}
+:deep(.el-form) {
+  .el-form-item__label {
+    color: #ffffff !important;
+    margin-right: 10px !important;
+  }
+}
+</style>

+ 41 - 4
src/views/routineCommandMap/RightSection/EventReport/EventManage.vue

@@ -162,9 +162,18 @@
         </div>
         <div class="td">{{ item.event_time }}</div>
         <div class="td">
-          <div v-if="item.event_status !== '0'" class="common-btn2" @click="enterCommand(item)">进入指挥</div>
-          <div v-if="item.event_status === '0'" class="common-btn2" @click="changeStartCommand">开始指挥</div>
-          <!--          <div class="common-btn2" style="margin-left: 20px" @click="handleClose(item)">关闭事件</div>-->
+          <div v-if="item.event_status === '0'" class="btn-box" @click="enterCommand()">
+            <i class="start-icon" />
+            <div class="gradient-text3">开始指挥</div>
+          </div>
+          <div v-else-if="item.event_status === '1'" class="btn-box" @click="enterCommand(item)">
+            <i class="start-icon" />
+            <div class="gradient-text3">进入指挥</div>
+          </div>
+          <div v-else-if="['2', '3'].includes(item.event_status)" class="btn-box" @click="handleCommandRecord">
+            <i class="record-icon" />
+            <div class="gradient-text3">指挥记录</div>
+          </div>
         </div>
         <div class="two">
           <Dialog
@@ -213,8 +222,8 @@
       :event-id="eventId"
       @update:model-value="handleCloseEventDialog"
     />
+    <CommandRecord v-if="showCommandRecord" v-model="showCommandRecord" />
   </Dialog>
-
 </template>
 
 <script lang="ts" setup>
@@ -223,6 +232,7 @@ import { getEvent } from '@/api/duty/eventing';
 
 import EventEditDialog from '../../eventing/EventEditDialog.vue';
 import CloseEventDialog from '../../eventing/CloseEventDialog.vue';
+import CommandRecord from './CommandRecord.vue';
 const proxy = getCurrentInstance()?.proxy;
 const { mm_event_type, mm_event_level, mm_event_state, region } = toRefs<any>(
   proxy?.useDict('mm_event_type', 'mm_event_level', 'mm_event_state', 'region')
@@ -393,6 +403,13 @@ const enterCommand = (item) => {
     });
   }
 };
+
+const showCommandRecord = ref(false);
+// 展示指挥记录
+const handleCommandRecord = () => {
+  showCommandRecord.value = true;
+};
+
 const enterCommand1 = (item) => {
   if (!queryParams.value.event_level) {
     proxy?.$modal.msgError('请先选择一个等级');
@@ -518,4 +535,24 @@ const conmandClose = () => {
     color: #fff !important;
   }
 }
+.btn-box {
+  display: flex;
+  justify-content: center;
+  align-items: center;
+  cursor: pointer;
+  .start-icon {
+    display: inline-block;
+    width: 15px;
+    height: 15px;
+    background: url('@/assets/images/routineCommandMap/eventReport/start.png') no-repeat;
+    background-size: 100% 100%;
+  }
+  .record-icon {
+    display: inline-block;
+    width: 14px;
+    height: 15px;
+    background: url('@/assets/images/routineCommandMap/eventReport/record.png') no-repeat;
+    background-size: 100% 100%;
+  }
+}
 </style>

+ 9 - 1
src/views/routineCommandMap/RightSection/EventReport/index.vue

@@ -32,7 +32,7 @@
             <i class="start-icon" />
             <div class="gradient-text3">进入指挥</div>
           </div>
-          <div v-else-if="['2', '3'].includes(item.event_status)" class="btn-box">
+          <div v-else-if="['2', '3'].includes(item.event_status)" class="btn-box" @click="handleCommandRecord">
             <i class="record-icon" />
             <div class="gradient-text3">指挥记录</div>
           </div>
@@ -43,6 +43,7 @@
   <!--事件接报弹窗-->
   <EventManage v-model="eventManageState.showListDialog" />
   <EventDetail v-if="eventDetailStatus.show" v-model="eventDetailStatus.show" :eventId="eventDetailStatus.id" :title="eventDetailStatus.title" />
+  <CommandRecord v-if="showCommandRecord" v-model="showCommandRecord" />
 </template>
 
 <script lang="ts" setup name="EventReport">
@@ -50,6 +51,7 @@ import { reactive, ref, toRefs } from 'vue';
 import { getEvent } from '@/api/duty/eventing';
 import EventManage from './EventManage.vue';
 import EventDetail from './EventDetail.vue';
+import CommandRecord from './CommandRecord.vue';
 
 const proxy = getCurrentInstance()?.proxy;
 const { mm_event_type, mm_event_level, mm_event_state, region } = toRefs<any>(
@@ -97,6 +99,12 @@ const enterCommand = (item) => {
   }
 };
 
+const showCommandRecord = ref(false);
+// 展示指挥记录
+const handleCommandRecord = () => {
+  showCommandRecord.value = true;
+};
+
 const getEventStatusClass = (value) => {
   let className = 'tag4';
   if (value === '0') {