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