|
@@ -0,0 +1,87 @@
|
|
|
+<template>
|
|
|
+ <div class="home-page">
|
|
|
+ <div class="top-nav-box">
|
|
|
+ <div class="name">{{boardInfo&&boardInfo.BiDashboardName}}</div>
|
|
|
+ </div>
|
|
|
+ <div class="bottom-content">
|
|
|
+ <BIBoardContent ref="boardContent" :knowList.sync="knowledgeList" v-model="boardDataList" :canDemo="isCanDemo" renderHeight="calc(100vh - 60px)"/>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+</template>
|
|
|
+
|
|
|
+<script>
|
|
|
+import BIBoardContent from '@/views/BI_manage/components/BoardContent.vue'
|
|
|
+import { getPublicSettingsApi } from '@/api/modules/oldApi';
|
|
|
+import apiBiBoard from '@/api/modules/BIBoard.js'
|
|
|
+export default {
|
|
|
+ components:{BIBoardContent},
|
|
|
+ data() {
|
|
|
+ return {
|
|
|
+ DashboardId:'',
|
|
|
+ boardInfo: null,//看板详情数据
|
|
|
+ boardDataList: [],//看板数据
|
|
|
+ knowledgeList:[],//知识资源模块列表的全部数据
|
|
|
+ isCanDemo: false,//是否可以演示
|
|
|
+ };
|
|
|
+ },
|
|
|
+
|
|
|
+ methods: {
|
|
|
+ async getBoardDetail() {
|
|
|
+ const res = await apiBiBoard.boardDetail({ DashboardId: this.DashboardId })
|
|
|
+ if (res.Ret === 200) {
|
|
|
+ this.boardInfo = res.Data
|
|
|
+ document.title = this.boardInfo.BiDashboardName || '看板演示';
|
|
|
+ this.boardDataList = res.Data.List || []
|
|
|
+ this.handleKnowList();
|
|
|
+ }
|
|
|
+ },
|
|
|
+
|
|
|
+ async handleKnowList(){
|
|
|
+ let item = this.boardDataList.find(_=>_.Type == 3);
|
|
|
+ if(!item) return;
|
|
|
+ let res = await apiBiBoard.getKnowledge({ BiDashboardDetailId:item.BiDashboardDetailId });
|
|
|
+ if(res.Ret != 200) return;
|
|
|
+ this.knowledgeList = (res.Data && res.Data.KnowledgeResourceList) || [];
|
|
|
+ if(this.knowledgeList.length > 0) this.setFirstKnow();
|
|
|
+ },
|
|
|
+
|
|
|
+ setFirstKnow(){
|
|
|
+ this.$nextTick(()=>{
|
|
|
+ this.$refs.boardContent && this.$refs.boardContent.setFirstKnow()
|
|
|
+ })
|
|
|
+ },
|
|
|
+
|
|
|
+ async getPublicSettings() {
|
|
|
+ const res = await getPublicSettingsApi();
|
|
|
+ if (res.Ret !== 200) return
|
|
|
+ this.$store.commit('SET_DYNAMIC_LINK', res.Data)
|
|
|
+ this.isCanDemo = true;
|
|
|
+ },
|
|
|
+ },
|
|
|
+
|
|
|
+ created() {
|
|
|
+ this.DashboardId = +this.$route.query.DashboardId || 0;
|
|
|
+ this.getBoardDetail();
|
|
|
+ this.getPublicSettings();
|
|
|
+ },
|
|
|
+};
|
|
|
+</script>
|
|
|
+
|
|
|
+<style lang="scss" scoped>
|
|
|
+.home-page{
|
|
|
+ height: 100%;
|
|
|
+ $border-color: #c8cdd9;
|
|
|
+ background-color: #fff;
|
|
|
+ border: 1px solid $border-color;
|
|
|
+ box-sizing: border-box;
|
|
|
+ display: flex;
|
|
|
+ flex-direction: column;
|
|
|
+ .top-nav-box {
|
|
|
+ padding: 14px 20px;
|
|
|
+ border-bottom: 1px solid $border-color;
|
|
|
+ }
|
|
|
+ .bottom-content{
|
|
|
+ flex: 1;
|
|
|
+ }
|
|
|
+}
|
|
|
+</style>
|