|
@@ -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>
|