Bladeren bron

知识库详情

Hwf 3 dagen geleden
bovenliggende
commit
fc942decc3

+ 4 - 5
src/views/emergencyCommandMap/LeftSection/VideoMonitorEdit.vue

@@ -69,7 +69,7 @@
     <div class="border"></div>
     <div class="video-list2">
       <div
-        v-if="!webPlay" 
+        v-if="!webPlay"
         v-for="(item, index) in dialogListData"
         :key="index"
         class="video-box"
@@ -92,7 +92,7 @@
         <HikVideo
           :wsUrl="wsUrl"
           :objData="HKobjData"
-          ref="hkplayer"  
+          ref="hkplayer"
           @exitFullScreen="onHKExitFullScreen"
         ></HikVideo>
       </div>
@@ -323,13 +323,13 @@ const wsUrl = ref('');
 const hkplayer = ref(null);
 const webPlay = ref(false);
 const changeWebPay = ()=> {
-  webPlay.value = true;  
+  webPlay.value = true;
 };
 const onHKExitFullScreen = () => {
   if(webPlay.value) {
       hkplayer.value.stopAllPreview()
       setTimeout(()=>{
-        webPlay.value = false; 
+        webPlay.value = false;
         emits('update:modelValue', false);
       }, 500)
   }
@@ -351,7 +351,6 @@ const onHKExitFullScreen = () => {
   .video-box {
     width: 790px;
     height: 356px;
-    width: 25%;
     margin-right: 35.06px;
     cursor: pointer;
     cursor: pointer;

+ 1 - 1
src/views/emergencyCommandMap/RightSection/RightTop.vue

@@ -66,7 +66,7 @@ const props = defineProps<{
 const tabs = reactive([
   { id: '任务跟踪', label: '任务跟踪' },
   { id: '预案通知', label: '预案通知' },
-  { id: '资源调度', label: '资源调度' },
+  // { id: '资源调度', label: '资源调度' },
   { id: '事件简报', label: '事件简报' }
 ]);
 

+ 95 - 0
src/views/emergencyCommandMap/RightSection/knowledgeDetail.vue

@@ -0,0 +1,95 @@
+<template>
+  <Dialog custom-show type="sm" title="知识库详情" hide-footer @close="closeDialog">
+    <div class="form-group">
+      <div class="form-title">报告名称:</div>
+      <div class="form-text">{{ detailData.reportName }}</div>
+    </div>
+    <div class="form-group">
+      <div class="form-title">报告编号:</div>
+      <div class="form-text">{{ detailData.report_id }}</div>
+    </div>
+    <div class="form-group">
+      <div class="form-title">主题词:</div>
+      <div class="form-text">{{ detailData.subject }}</div>
+    </div>
+    <div class="form-group">
+      <div class="form-title">事件类型:</div>
+      <div class="form-text"><dict-tag :options="mm_event_type" :value="detailData.eventType" /></div>
+    </div>
+    <div class="form-group">
+      <div class="form-title">来源单位:</div>
+      <div class="form-text">{{ detailData.publishingUnit }}</div>
+    </div>
+    <div class="form-group">
+      <div class="form-title">发布日期:</div>
+      <div class="form-text">{{ detailData.publishDate }}</div>
+    </div>
+    <div class="form-group">
+      <div class="form-title">知识类型:</div>
+      <div class="form-text">{{ detailData.notificationType }}</div>
+    </div>
+    <div class="form-group">
+      <div class="form-title">摘要:</div>
+      <div class="form-text">{{ detailData.summary }}</div>
+    </div>
+    <div class="form-group">
+      <div class="form-title">附件:</div>
+      <div
+        v-if="detailData.file && detailData.file.length > 0"
+        class="form-text"
+        style="color: #00e8ff; cursor: pointer"
+        @click="downloadSummaryFile(detailData.file[0].content, detailData.file[0].url)"
+      >
+        {{ detailData.file[0].content }}
+      </div>
+    </div>
+  </Dialog>
+</template>
+
+<script lang="ts" setup>
+import { fetchReportDetail } from '@/api/knowledge';
+import { download2 } from '@/utils/request';
+
+const props = defineProps({
+  modelValue: String,
+  id: String
+});
+const emit = defineEmits(['update:modelValue']);
+const proxy = getCurrentInstance()?.proxy;
+const { mm_event_type } = toRefs<any>(proxy?.useDict('mm_event_type'));
+const closeDialog = () => {
+  emit('update:modelValue', false);
+};
+const detailData = ref({
+  report_id: '',
+  subject: '',
+  eventType: '',
+  publishingUnit: '',
+  publishDate: '',
+  notificationType: '',
+  summary: '',
+  file: ''
+});
+
+const downloadSummaryFile = (file_name, url) => {
+  download2(baseUrl + '/file/download/' + url, file_name);
+};
+const baseUrl = import.meta.env.VITE_APP_BASE_API;
+onMounted(() => {
+  fetchReportDetail(props.id).then((res) => {
+    detailData.value = res.data[0];
+  });
+});
+</script>
+
+<style lang="scss" scoped>
+.form-group {
+  display: flex;
+  margin-bottom: 15px;
+  font-size: 48px;
+  .form-title {
+    margin-right: 20px;
+    flex-shrink: 0;
+  }
+}
+</style>

+ 14 - 4
src/views/emergencyCommandMap/RightSection/knowledgeWarehouse.vue

@@ -1,5 +1,5 @@
 <template>
-  <Dialog custom-show type="xl" title="知识库列表" hide-footer @close="closeDialog">
+  <Dialog v-if="!showDetail" custom-show type="xl" title="知识库列表" hide-footer @close="closeDialog">
     <!-- 表格组件 -->
     <div class="common-table">
       <div class="table-header">
@@ -10,6 +10,7 @@
         <div class="td">摘要</div>
         <div class="td">来源单位</div>
         <div class="td">发布时间</div>
+        <div class="td" style="width: 200px; flex: unset">操作</div>
       </div>
       <div v-for="(item, index) in tableData" :key="index" class="tr">
         <div class="td">{{ item.reportId }}</div>
@@ -21,6 +22,9 @@
         <div class="td">{{ item.summary }}</div>
         <div class="td">{{ item.publishingUnit }}</div>
         <div class="td">{{ item.publishDate }}</div>
+        <div class="td" style="width: 200px; flex: unset">
+          <div style="cursor: pointer; color: #00e8ff" @click="handleView(item.reportId)">查看</div>
+        </div>
       </div>
     </div>
     <div class="footer">
@@ -34,20 +38,22 @@
       />
     </div>
   </Dialog>
+  <KnowledgeDetail v-if="showDetail" v-model="showDetail" :id="detailId" />
 </template>
 <script setup lang="ts">
 import { reactive } from 'vue';
 import { fetchReports } from '@/api/knowledge/index';
 import { parseTime } from '@/utils/ruoyi';
+import KnowledgeDetail from './knowledgeDetail.vue';
 
 const emit = defineEmits(['update:show']);
 const closeDialog = () => {
   emit('update:show', false);
 };
 const proxy = getCurrentInstance()?.proxy;
-const { mm_event_type } = toRefs<any>(
-  proxy?.useDict('mm_event_type')
-);
+const { mm_event_type } = toRefs<any>(proxy?.useDict('mm_event_type'));
+const showDetail = ref(false);
+const detailId = ref('');
 const queryParams = reactive({
   pageNum: 1,
   pageSize: 10,
@@ -74,6 +80,10 @@ const getList = async () => {
   });
 };
 
+const handleView = (id) => {
+  detailId.value = id;
+  showDetail.value = true;
+};
 onMounted(() => {
   getList();
 });