<template>
    <div id="rdsj">
        <div class="rdsj" v-show="flag==1">
            <div>
                <div class="ahead">
                    <div class="left-ahead">
                        <div class="left-ahead-left">
                            <div v-for="(item,index) in left_img_ztgl" @click="item.cover!=null?showBigImg(item):''">
                                <h3 v-show="item.cover!=null">{{ item.name }}</h3>
                                <img :src="item.cover" alt="">
                            </div>
                        </div>
                        <div class="left-ahead-right">
                            <el-carousel :interval="5000" :arrow="bigItem&&bigItem.length>1?'always':'never'">
                                <el-carousel-item v-for="(item,index) in bigItem" :key="index">
                                    <h3>{{ item.title }}</h3>
                                    <img :src="LiteraturePictureUrl+item.website_img[0]" alt="" @click="showInfo(item)" :onerror="errimg">
                                </el-carousel-item>
                            </el-carousel>
                        </div>
                    </div>
                    <div class="right-ahead">
                        <div class="right-ahead-title">
                            <img :src="htmlImg.leftImg" alt="" :onerror="errimg">
                            <span>国际国内热点</span>
                            <img :src="htmlImg.rightImg" alt="" :onerror="errimg">
                            <span class="el-icon-more" @click="showList('国际国内热点')"></span>
                        </div>
                        <div class="right-ahead-content">
                            <ul>
                                <li v-for="(item,index) in hotNews.news" @click="showInfo(item)">
                                    <div class="mark"></div>
                                    <div v-text="item.title_zh" :title="item.title_zh"></div>
                                    <div v-text="item.pubdate.slice(5,10)" :title="item.pubdate"></div>
                                </li>
                            </ul>
                        </div>
                    </div>
                </div>
                <div class="newsKinds">
                    <div class="everyKind" v-for="(item,index) in newsKinds">
                        <div class="everyKind-title">
                            <img :src="htmlImg.leftImg" alt="" :onerror="errimg">
                            <span v-text="item.title"></span>
                            <img :src="htmlImg.rightImg" alt="" :onerror="errimg">
                            <span class="el-icon-more" @click="showList(item.title)"></span>
                        </div>
                        <div class="everyKind-content">
                            <div class="everyKind-img">
                                <div v-for="(item1,index1) in item.img.slice(0,2)" v-if="item1.website_img">
                                    <img :src="LiteraturePictureUrl+item1.website_img[0]" alt="" @click="showInfo(item1)" :onerror="errimg">
                                </div>
                            </div>
                            <div class="everyKind-list">
                                <ul>
                                    <li v-for="(item1,index1) in item.news" @click="showInfo(item1)">
                                        <div class="mark"></div>
                                        <div v-text="item1.title_zh" :title="item1.title_zh"></div>
                                        <div v-text="item1.pubdate.slice(5,10)" :title="item1.pubdate"></div>
                                    </li>
                                </ul>
                            </div>
                        </div>
                    </div>
                </div>
                <div class="authorityRelease">
                    <div class="authorityRelease-title">权威发布</div>
                    <div class="authorityRelease-cotnent" v-for="(item,index) in newsauthority">
                        <div class="content-title">
                            <img :src="htmlImg.leftImg" alt="" :onerror="errimg">
                            <span v-text="item.title"></span>
                            <img :src="htmlImg.rightImg" alt="" :onerror="errimg">
                            <span class="el-icon-more" @click="showList(item)"></span>
                        </div>
                        <div class="content-content">
                            <div class="content-img">
                                <div v-for="(item1,index1) in item.img">
                                    <img :src="NewsPictureUrl+item1.folder+'/'+item1.image" alt="" @click="viewLiterature(item1)" @contextmenu.prevent.stop="showLiteratureInfo(item1)" :onerror="errimg">
                                </div>
                            </div>
                            <div class="content-list">
                                <ul>
                                    <li v-for="(item1,index1) in item.news" @click="viewLiterature(item1)" @contextmenu.prevent.stop="showLiteratureInfo(item1)">
                                        <div class="mark"></div>
                                        <div v-text="item1.originName" :title="item1.originName"></div>
                                        <div v-text="item1.createTime.slice(5,10)" :title="item1.createTime"></div>
                                    </li>
                                </ul>
                            </div>
                        </div>
                    </div>
                </div>
                <div class="sentiment">
                    <div class="sentiment-title">舆情分析</div>
                    <div class="sentiment-cotnent" v-for="(item,index) in sentiment">
                        <div class="content-title">
                            <img :src="htmlImg.leftImg" alt="" :onerror="errimg">
                            <span v-text="item.title"></span>
                            <img :src="htmlImg.rightImg" alt="" :onerror="errimg">
                            <span class="el-icon-more" @click="showList(item)"></span>
                        </div>
                        <div class="content-content">
                            <div class="content-img">
                                <div v-for="(item1,index1) in item.img">
                                    <img :src="NewsPictureUrl+item1.folder+'/'+item1.image" alt="" @click="viewLiterature(item1)" @contextmenu.prevent.stop="showLiteratureInfo(item1)" :onerror="errimg">
                                </div>
                            </div>
                            <div class="content-list">
                                <ul>
                                    <li v-for="(item1,index1) in item.news" @click="viewLiterature(item1)" @contextmenu.prevent.stop="showLiteratureInfo(item1)">
                                        <div class="mark"></div>
                                        <div v-text="item1.originName" :title="item1.originName"></div>
                                        <div v-text="item1.createTime.slice(5,10)" :title="item1.createTime"></div>
                                    </li>
                                </ul>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
        <div class="rdsjKinds" v-show="flag==2">
            <img class="back" :src="back" @click="goBack" />
            <div class="head">
                <div class="left-content">
                    <el-tree :data="treeData" :props="defaultProps" @node-click="handleNodeClick" highlight-current></el-tree>
                </div>
                <div class="right-content">
                    <el-table :data="newsData" style="width: 100%;height:calc(100% - 50px)" height="calc(100% - 50px)" @row-click="showInfo" :header-cell-style="{color:'white',background:'#263b5d'}" :row-style="{color:'white',background:'#1d2d46'}" v-show="flagIs">
                        <el-table-column type="index" label="序号" width="180">
                        </el-table-column>
                        <el-table-column prop="author" label="网站" show-overflow-tooltip="" width="200">
                        </el-table-column>
                        <el-table-column label="内容" show-overflow-tooltip="">
                            <template slot-scope="scope">
                                <div>
                                    <el-tag type="danger" effect="dark" v-text="scope.row.is_original?'原创':'转发'"></el-tag>
                                </div>
                                <div v-text="scope.row.title_zh"></div>
                                <div>
                                    <span>板块名称：</span><span v-text="scope.row.subname"></span>&emsp;&emsp;
                                    <span>站点名称：</span><span v-text="scope.row.site_name"></span>
                                </div>
                            </template>
                        </el-table-column>
                        <el-table-column prop="pubdate" label="发布时间" width="250">
                        </el-table-column>
                    </el-table>
                    <el-table :data="literatureList" style="width: 100%;height:calc(100% - 50px)" height="calc(100% - 50px)" :header-cell-style="{color:'white',background:'#263b5d'}" :row-style="{color:'white',background:'#1d2d46'}" @row-click="viewLiterature" v-show="flagIs==false">
                        <el-table-column type="index" label="序号" width="180">
                        </el-table-column>
                        <el-table-column prop="originName" label="文件名" show-overflow-tooltip="">
                        </el-table-column>
                        <el-table-column prop="createTime" label="上传时间" width="250">
                        </el-table-column>
                    </el-table>
                    <div class="pagination-div">
                        <el-pagination class="myPagination" background layout="total, sizes, prev, pager, next, jumper" :page-size="everySize" :current-page="currentPage" :total="total" @current-change="handleCurrentChange" @size-change="handleSizeChange" :page-sizes="[10,20,50,100]">
                        </el-pagination>
                    </div>
                </div>
            </div>
        </div>
        <div id="literatureInfo" v-show="flag==3" v-if="pickObj.attachment">
            <img class="back" :src="back" @click="goBack" />
            <div class="literatureInfo" v-html="pickObj.attachment.content" @contextmenu.prevent.stop="openMenu($event)"></div>
            <div v-show="visible" :style="{position:'absolute',backgroundColor:'white',left:left+'px',top:top+'px'}" class="contextmenu">
                <ul>
                    <li @click="relatedPerson">关联人物</li>
                    <li @click="relatedOrganization">关联机构</li>
                    <li @click="addTag">添加标签</li>
                    <li @click="addCollection">收藏</li>
                </ul>
            </div>
        </div>
        <el-dialog title="关联人物" :visible.sync="dialogVisiblePerson" width="30%" :before-close="handleClose">
            <el-form ref="form" label-width="120px">
                <el-form-item label="摘要">
                    <el-input type="textarea" :autosize="{ minRows: 2, maxRows: 10}" placeholder="请输入内容" v-model="selectText" disabled style="width:70%;"></el-input>
                </el-form-item>
                <el-form-item label="搜索人物">
                    <el-autocomplete v-model="state" :fetch-suggestions="querySearchAsync" placeholder="请输入内容" @select="handleSelect" style="width:70%;"></el-autocomplete>
                </el-form-item>
                <el-form-item label="选择类型">
                    <el-select v-model="personType" style="width:70%;">
                        <!-- <el-option value="相关人物">相关人物</el-option> -->
                        <el-option value="相关舆情">相关舆情</el-option>
                        <el-option value="相关活动">相关活动</el-option>
                        <el-option value="相关专著">相关专著</el-option>
                        <el-option value="相关言论">相关言论</el-option>
                        <el-option value="关键影响人物">关键影响人物</el-option>
                        <el-option value="评价言论">评价言论</el-option>
                    </el-select>
                </el-form-item>
            </el-form>
            <span slot="footer" class="dialog-footer">
                <el-button @click="dialogVisiblePerson = false">取 消</el-button>
                <el-button type="primary" @click="defineRelatedPerson">确 定</el-button>
            </span>
        </el-dialog>
        <el-dialog title="关联机构" :visible.sync="dialogVisibleOrganization" width="30%" :before-close="handleClose">
            <el-form ref="form" label-width="120px">
                <el-form-item label="摘要">
                    <el-input type="textarea" :autosize="{ minRows: 2, maxRows: 10}" placeholder="请输入内容" v-model="selectText" disabled style="width:70%;"></el-input>
                </el-form-item>
                <el-form-item label="搜索机构">
                    <el-autocomplete v-model="state" :fetch-suggestions="querySearchAsyncOrganization" placeholder="请输入内容" @select="handleSelect" style="width:70%;"></el-autocomplete>
                </el-form-item>
                <el-form-item label="选择类型">
                    <el-select v-model="organizationType" style="width:70%;">
                        <!-- <el-option value="相关人物">相关人物</el-option> -->
                        <el-option value="所属基地">所属基地</el-option>
                        <el-option value="所属部队">所属部队</el-option>
                        <el-option value="所属装备">所属装备</el-option>
                        <el-option value="相关舆情">相关舆情</el-option>
                        <el-option value="历史文献">历史文献</el-option>
                        <el-option value="证据资料">证据资料</el-option>
                        <el-option value="关键影响人物">关键影响人物</el-option>
                        <el-option value="评价言论">评价言论</el-option>
                        <el-option value="机构分析报告">机构分析报告</el-option>
                    </el-select>
                </el-form-item>
            </el-form>
            <span slot="footer" class="dialog-footer">
                <el-button @click="dialogVisibleOrganization = false">取 消</el-button>
                <el-button type="primary" @click="defineRelatedOrganization">确 定</el-button>
            </span>
        </el-dialog>
        <el-dialog title="添加标签" :visible.sync="dialogVisibleTag" width="30%" :before-close="handleClose">
            <el-tag :key="tag" v-for="tag in dynamicTags" closable :disable-transitions="false" @close="handleClose(tag)">
                {{tag}}
            </el-tag>
            <el-input class="input-new-tag" v-if="inputVisible" v-model="inputValue" ref="saveTagInput" size="small" @keyup.enter.native="handleInputConfirm" @blur="handleInputConfirm">
            </el-input>
            <el-button v-else class="button-new-tag" size="small" @click="showInput">+ 标签</el-button>
            <span slot="footer" class="dialog-footer">
                <el-button @click="dialogVisibleTag = false">取 消</el-button>
                <el-button type="primary" @click="defineAddTag">确 定</el-button>
            </span>
        </el-dialog>
        <el-dialog title="添加收藏" :visible.sync="dialogVisibleCollection" width="20%" :before-close="handleClose">
            <ul>
                <li v-for="(item,index) in collectionFolder" @click.stop="addFolder(item,index)" :style="{'background':(index==selectIndex)?'#f56c6c':''}">
                    <span class="el-icon-folder-opened"></span>&emsp;{{item.name}}
                    <el-button class="delete" type="text" size="mini" @click.stop.native="delectCollectionFolder(item.id)">
                        <i class="el-icon-error"></i>
                    </el-button>
                </li>
            </ul>
            <el-dialog width="30%" title="新增收藏夹" :visible.sync="innerVisible" append-to-body>
                <el-form ref="form" label-width="120px">
                    <el-form-item label="名称">
                        <el-input v-model="collectionName" placeholder="请输入收藏夹名称" @click.stop.native="stopstop" style="width:70%;"></el-input>
                    </el-form-item>
                </el-form>
                <span slot="footer" class="dialog-footer">
                    <el-button size="mini" @click.stop="innerVisible = false">取 消</el-button>
                    <el-button size="mini" type="danger" @click.stop="addCollectionFolder()">确 定</el-button>
                </span>
            </el-dialog>
            <span slot="footer" class="dialog-footer">
                <el-button type="" size="mini" @click.stop="defineAddCollection">确定</el-button>
                <el-button type="danger" size="mini" @click.stop="innerVisible=true">新增收藏夹</el-button>
            </span>
        </el-dialog>
    </div>
</template>

<style lang="scss">
#rdsj {
    width: 100%;
    height: 91%;
    margin-top: 2%;
    overflow-x: hidden;
    overflow-y: scroll;
    &::-webkit-scrollbar {
        display: none; /* Chrome Safari */
    }
    .rdsj {
        .ahead {
            width: 1500px;
            height: 560px;
            margin: 0 auto;
            margin-top: 50px;
            .left-ahead {
                width: 1000px;
                padding: 30px;
                box-sizing: border-box;
                float: left;
                background-image: url(../../assets/img/yqjc/60.png);
                background-size: 100% 100%;
                .left-ahead-left {
                    width: 180px;
                    height: 500px;
                    float: left;
                    overflow-y: auto;
                    &::-webkit-scrollbar {
                        display: none;
                    }
                    div{
                        position: relative;
                    }
                    img {
                        width: 100%;
                        height: 105px;
                        border-radius: 10px;
                        margin-bottom: 20px;
                        cursor: pointer;
                    }
                    h3{
                        width: 100%;
                        position: absolute;
                        bottom: 20px;
                        margin: 0;
                        font-size: 13px;
                        color: white;
                        text-align: center;
                        background: linear-gradient(180deg, #9696960a, rgba(53, 53, 53, 0.6));
                        padding: 12px 0px;
                    }
                }
                .left-ahead-right {
                    width: 760px;
                    height: 500px;
                    padding-left: 30px;
                    box-sizing: border-box;
                    float: left;
                    .el-carousel {
                        height: 100%;
                        .el-carousel__container {
                            height: 100%;
                        }
                    }
                    .el-carousel__button{
                        width: 26px;
                    }
                    .el-carousel__item h3 {
                        width: 100%;
                        position: absolute;
                        bottom: 20px;
                        margin: 0;
                        font-size: 18px;
                        color: white;
                        text-align: center;
                        background: linear-gradient(180deg,#9696960a,rgba(53, 53, 53, 0.6));
                        padding: 12px 0px;
                    }

                    .el-carousel__item:nth-child(2n) {
                        background-color: #99a9bf;
                    }

                    .el-carousel__item:nth-child(2n + 1) {
                        background-color: #d3dce6;
                    }
                    img {
                        width: 100%;
                        height: 100%;
                        cursor: pointer;
                    }
                }
            }
            .right-ahead {
                width: 500px;
                float: left;
                .right-ahead-title {
                    width: 100%;
                    height: 50px;
                    line-height: 50px;
                    text-align: center;
                    img {
                        width: 60px;
                    }
                    span {
                        font-size: 25px;
                        letter-spacing: 2px;
                        font-weight: 500;
                    }
                    .el-icon-more {
                        float: right;
                        margin-top: 10px;
                        color: rgb(1, 244, 245);
                        cursor: pointer;
                    }
                }
                .right-ahead-content {
                    width: 100%;
                    height: 500px;
                    ul {
                        width: 100%;
                        height: 100%;
                        padding-left: 15px;
                        box-sizing: border-box;
                        overflow-y: auto;

                        li {
                            height: 50px;
                            line-height: 50px;
                            font-weight: 600;
                            list-style: none;
                            cursor: pointer;
                            overflow: hidden;
                            white-space: nowrap;
                            text-overflow: ellipsis;
                            div {
                                &:first-child {
                                    width: 5px;
                                    height: 5px;
                                    float: left;
                                    margin-top: 21.5px;
                                    margin-right: 10px;
                                    border: 1px solid grey;
                                    border-radius: 20px;
                                    background-color: grey;
                                    opacity: 0.5;
                                }
                                &:nth-child(2) {
                                    width: 70%;
                                    float: left;
                                    overflow: hidden;
                                    text-overflow: ellipsis;
                                    white-space: nowrap;
                                }
                                &:last-child {
                                    float: right;
                                }
                                &:hover {
                                    font-weight: bold;
                                    color: #0dada7;
                                    text-decoration: underline;
                                }
                            }
                        }
                    }
                }
            }
        }
        .newsKinds {
            width: 1500px;
            height: 808px;
            margin: 0 auto;
            margin-top: 30px;
            .everyKind {
                width: 500px;
                height: 404px;
                float: left;
                margin: 0 auto;
                margin-top: 10px;
                .everyKind-title {
                    width: 100%;
                    height: 50px;
                    line-height: 50px;
                    padding-left: 30px;
                    box-sizing: border-box;
                    text-align: center;
                    img {
                        width: 60px;
                    }
                    span {
                        font-size: 20px;
                        font-weight: 500;
                    }
                    .el-icon-more {
                        float: right;
                        margin-top: 15px;
                        margin-right: 10px;
                        color: rgb(1, 244, 245);
                        cursor: pointer;
                    }
                }
                .everyKind-content {
                    width: calc(100% - 20px);
                    height: calc(100% - 50px);
                    margin-left: 10px;
                    background-image: url(../../assets/img/flfg/cardContent.png);
                    background-size: 100% 100%;
                    padding: 10px;
                    box-sizing: border-box;
                    border-radius: 5px;
                    .everyKind-img {
                        width: 100%;
                        height: 100px;
                        margin-top: 20px;
                        div {
                            width: 170px;
                            height: 100px;
                            float: left;
                            margin-left: 40px;
                            img {
                                width: 100%;
                                height: 100%;
                            }
                        }
                    }
                    .everyKind-list {
                        height: calc(100% - 130px);
                        margin-top: 10px;
                        overflow-y: auto;
                        &::-webkit-scrollbar {
                            display: none;
                        }
                        ul {
                            width: calc(100% - 70px);
                            li {
                                height: 30px;
                                line-height: 30px;
                                font-size: 15px;
                                font-weight: 600;
                                list-style: none;
                                cursor: pointer;
                                overflow: hidden;
                                white-space: nowrap;
                                text-overflow: ellipsis;
                                div {
                                    &:first-child {
                                        width: 5px;
                                        height: 5px;
                                        float: left;
                                        margin-top: 11.5px;
                                        margin-right: 10px;
                                        border: 1px solid grey;
                                        border-radius: 20px;
                                        background-color: grey;
                                        opacity: 0.5;
                                    }
                                    &:nth-child(2) {
                                        width: 70%;
                                        float: left;
                                        overflow: hidden;
                                        text-overflow: ellipsis;
                                        white-space: nowrap;
                                    }
                                    &:last-child {
                                        float: right;
                                    }
                                    &:hover {
                                        font-weight: bold;
                                        color: #0dada7;
                                        text-decoration: underline;
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
        .authorityRelease {
            width: 1500px;
            height: 460px;
            margin: 0 auto;
            margin-top: 30px;
            .authorityRelease-title {
                width: 100%;
                height: 50px;
                line-height: 50px;
                font-size: 25px;
                letter-spacing: 10px;
                text-align: center;
                background-image: url('../../assets/img/flfg/title.png');
                background-size: 100% 100%;
            }
            .authorityRelease-cotnent {
                width: 500px;
                height: 410px;
                float: left;
                margin: 0 auto;
                margin-top: 10px;
                .content-title {
                    width: 100%;
                    height: 50px;
                    line-height: 50px;
                    padding-left: 30px;
                    box-sizing: border-box;
                    text-align: center;
                    img {
                        width: 60px;
                    }
                    span {
                        font-size: 20px;
                        font-weight: 500;
                    }
                    .el-icon-more {
                        float: right;
                        margin-top: 15px;
                        margin-right: 10px;

                        color: rgb(1, 244, 245);
                        cursor: pointer;
                    }
                }
                .content-content {
                    width: calc(100% - 20px);
                    height: 360px;
                    margin-left: 10px;
                    background-image: url(../../assets/img/flfg/cardContent.png);
                    background-size: 100% 100%;
                    padding: 10px;
                    box-sizing: border-box;
                    border-radius: 5px;
                    .content-img {
                        width: 100%;
                        height: 100px;
                        margin-top: 20px;
                        overflow-y: auto;
                        &::-webkit-scrollbar {
                            display: none;
                        }
                        div {
                            width: 170px;
                            height: 100px;
                            float: left;
                            margin-left: 40px;
                            img {
                                width: 100%;
                                height: 100%;
                            }
                        }
                    }
                    .content-list {
                        height: calc(100% - 130px);
                        margin-top: 10px;
                        overflow-y: auto;
                        &::-webkit-scrollbar {
                            display: none;
                        }
                        ul {
                            width: calc(100% - 70px);
                            li {
                                height: 30px;
                                line-height: 30px;
                                font-size: 15px;
                                font-weight: 600;
                                list-style: none;
                                cursor: pointer;
                                overflow: hidden;
                                white-space: nowrap;
                                text-overflow: ellipsis;
                                div {
                                    &:first-child {
                                        width: 5px;
                                        height: 5px;
                                        float: left;
                                        margin-top: 11.5px;
                                        margin-right: 10px;
                                        border: 1px solid grey;
                                        border-radius: 20px;
                                        background-color: grey;
                                        opacity: 0.5;
                                    }
                                    &:nth-child(2) {
                                        width: 70%;
                                        float: left;
                                        overflow: hidden;
                                        text-overflow: ellipsis;
                                        white-space: nowrap;
                                    }
                                    &:last-child {
                                        float: right;
                                    }
                                    &:hover {
                                        font-weight: bold;
                                        color: #0dada7;
                                        text-decoration: underline;
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
        .sentiment {
            width: 1500px;
            height: 460px;
            margin: 0 auto;
            margin-top: 30px;
            .sentiment-title {
                width: 100%;
                height: 50px;
                line-height: 50px;
                font-size: 25px;
                letter-spacing: 10px;
                text-align: center;
                background-image: url('../../assets/img/flfg/title.png');
                background-size: 100% 100%;
            }
            .sentiment-cotnent {
                width: 500px;
                height: 410px;
                float: left;
                margin: 0 auto;
                margin-top: 10px;
                .content-title {
                    width: 100%;
                    height: 50px;
                    line-height: 50px;
                    padding-left: 30px;
                    box-sizing: border-box;
                    text-align: center;
                    img {
                        width: 60px;
                    }
                    span {
                        font-size: 20px;
                        font-weight: 500;
                    }
                    .el-icon-more {
                        float: right;
                        margin-top: 15px;
                        margin-right: 10px;
                        color: rgb(1, 244, 245);
                        cursor: pointer;
                    }
                }
                .content-content {
                    width: calc(100% - 20px);
                    height: 360px;
                    margin-left: 10px;
                    background-image: url(../../assets/img/flfg/cardContent.png);
                    background-size: 100% 100%;
                    padding: 10px;
                    box-sizing: border-box;
                    border-radius: 5px;
                    .content-img {
                        width: 100%;
                        height: 100px;
                        margin-top: 20px;
                        overflow-y: auto;
                        &::-webkit-scrollbar {
                            display: none;
                        }
                        div {
                            width: 170px;
                            height: 100px;
                            float: left;
                            margin-left: 40px;
                            img {
                                width: 100%;
                                height: 100%;
                            }
                        }
                    }
                    .content-list {
                        height: calc(100% - 130px);
                        margin-top: 10px;
                        overflow-y: auto;
                        &::-webkit-scrollbar {
                            display: none;
                        }
                        ul {
                            width: calc(100% - 70px);
                            li {
                                height: 30px;
                                line-height: 30px;
                                font-size: 15px;
                                font-weight: 600;
                                list-style: none;
                                cursor: pointer;
                                overflow: hidden;
                                white-space: nowrap;
                                text-overflow: ellipsis;
                                div {
                                    &:first-child {
                                        width: 5px;
                                        height: 5px;
                                        float: left;
                                        margin-top: 11.5px;
                                        margin-right: 10px;
                                        border: 1px solid grey;
                                        border-radius: 20px;
                                        background-color: grey;
                                        opacity: 0.5;
                                    }
                                    &:nth-child(2) {
                                        width: 70%;
                                        float: left;
                                        overflow: hidden;
                                        text-overflow: ellipsis;
                                        white-space: nowrap;
                                    }
                                    &:last-child {
                                        float: right;
                                    }
                                    &:hover {
                                        font-weight: bold;
                                        color: #0dada7;
                                        text-decoration: underline;
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
    //热点事件分类展示
    .rdsjKinds {
        width: 97%;
        height: 100%;
        color: white;
        overflow: hidden;
        background-image: url(../../assets/img/main/background.png);
        background-size: 100% 100%;
        .back {
            width: 40px;
            height: 40px;
            position: absolute;
            top: 11%;
            right: 80px;
            z-index: 100;
            cursor: pointer;
        }
        .head {
            width: 100%;
            float: flex;
            margin: 0 auto;
            .left-content {
                width: 250px;
                height: 100%;
                float: left;
                padding: 20px;
                overflow-y: auto;
                box-sizing: border-box;
                background: url('../../assets/img/yqjc/01.png') no-repeat;
                background-size: 100% 100%;
                .el-tree {
                    margin-top: 10px;
                    color: white;
                    background: transparent;
                    .el-tree-node__content {
                        height: 40px;
                    }
                }
                .el-tree > .el-tree-node > .el-tree-node__content {
                    height: 40px;
                    background-image: url(../../assets/img/yqjc/24.png);
                    background-repeat: no-repeat;
                    background-size: 100% 100%;
                }
                .el-tree
                    > .el-tree-node
                    > .el-tree-node__children
                    > .el-tree-node
                    > .el-tree-node__content {
                    height: 40px;
                    // background-image: url(../../assets/img/yqjc/24.png);
                    background-repeat: no-repeat;
                    background-size: 100% 100%;
                }
                .el-tree
                    > .el-tree-node
                    > .el-tree-node__content
                    > .el-tree-node__label {
                    font-size: 14px !important;
                }
                .el-tree > .el-tree-node > .el-tree-node__children {
                    background-color: #1d2d46 !important;
                }
                .el-tree-node:focus > .el-tree-node__content {
                    background-color: #00648a96 !important;
                    // border-radius: 5px;
                }

                .el-tree-node__content:hover,
                .el-tree-node__content:focus {
                    background-color: #00648a96 !important;
                    // border-radius: 5px;
                }
                .el-tree--highlight-current
                    .el-tree-node.is-current
                    > .el-tree-node__content {
                    background-color: #00648a96 !important;
                    // border-radius: 5px;
                }
            }
            .right-content {
                width: calc(100% - 270px);
                height: 100%;
                float: left;
                margin-left: 20px;
                padding: 20px;
                background: url('../../assets/img/yqjc/02.png') no-repeat;
                background-size: 100% 100%;
                box-sizing: border-box;
                .el-table--enable-row-hover {
                    .el-table__body tr {
                        &:hover > td {
                            background-color: #82848a78 !important;
                        }
                    }
                }
                .el-table {
                    background-color: transparent !important;
                    .el-table__header-wrapper {
                        width: 100%;
                        height: 48px;
                    }
                    .el-table__body-wrapper {
                        width: 100%;
                        height: calc(100% - 48px);
                    }
                    th.is-leaf {
                        border-bottom: 1px solid #185066;
                    }
                    .gutter {
                        background-color: #263b5d;
                    }
                    &::before {
                        display: none;
                    }
                    td {
                        border-bottom: 1px solid #185066;
                        &:nth-child(2) {
                            .el-tag {
                                height: 20px;
                                padding: 0px 8px;
                                line-height: 19px;
                            }
                        }
                        .el-switch__label {
                            color: white;
                        }
                        .is-active {
                            color: #409eff !important;
                        }
                    }
                }
                .pagination-div {
                    width: 100%;
                    height: 50px;
                    // margin-left: calc(50% - 632px);

                    .el-pagination {
                        margin-top: 9px;
                        text-align: right;
                        .el-pagination__total {
                            color: white;
                        }
                        .el-pagination__jump {
                            color: white;
                        }
                    }
                    .myPagination.is-background
                        .el-pager
                        li:not(.disabled).active {
                        color: #fff;
                        border: 1px solid #146a80;
                        box-shadow: 0 0 10px #1b6097;
                        background-color: #1d2d46;
                    }
                }
            }
        }
    }
    //文件详情
    #literatureInfo {
        width: 70%;
        height: calc(100% - 50px);
        margin: auto;
        color: white;
        overflow-x: hidden;
        overflow-y: auto;
        .back {
            width: 40px;
            height: 40px;
            position: absolute;
            top: 11%;
            right: 80px;
            z-index: 100;
            cursor: pointer;
        }
        .literatureInfo {
            width: fit-content;
            margin: auto;
            white-space: pre-wrap;
        }
        .contextmenu {
            width: 200px;
            padding: 5px 0px;
            box-sizing: border-box;
            ul {
                margin: 0;
                padding: 0;
                overflow-y: auto;
                list-style: none;
                li {
                    height: 30px;
                    line-height: 30px;
                    padding-left: 20px;
                    position: relative;
                    font-size: 14px;
                    box-sizing: border-box;
                    color: black;
                    &:hover {
                        cursor: pointer;
                        background-color: #ddd;
                    }
                    .delete {
                        position: absolute;
                        right: 10px;
                        i {
                            font-size: 16px;
                            color: #ff5454;
                        }
                    }
                }
            }
        }
    }
    .el-dialog {
        color: white;
        background: #1d2d46 !important;
        .el-dialog__body {
            .el-form {
                .el-form-item {
                    .el-form-item__label {
                        color: white;
                    }
                    .el-form-item__content {
                        color: white;
                        .el-upload__tip {
                            color: white;
                        }
                    }
                }
            }
            .el-input__inner {
                color: white !important;
                background: none !important;
                border: 1px solid #146a80 !important;
                box-shadow: 0 0 10px #1b6097;
            }
            textarea {
                color: white !important;
                background: none !important;
                border: 1px solid #146a80 !important;
                box-shadow: 0 0 10px #1b6097;
            }
            .el-icon-document {
                height: auto;
            }

            .el-tag + .el-tag {
                margin-left: 10px;
            }
            .button-new-tag {
                margin-left: 10px;
                height: 32px;
                line-height: 30px;
                padding-top: 0;
                padding-bottom: 0;
            }
            .input-new-tag {
                width: 90px;
                margin-left: 10px;
                vertical-align: bottom;
            }
            ul {
                height: 150px;
                margin: 0;
                padding: 0;
                overflow-y: auto;
                list-style: none;
                li {
                    height: 30px;
                    line-height: 30px;
                    padding-left: 10px;
                    position: relative;
                    box-sizing: border-box;
                    color: white;
                    &:hover {
                        color: white;
                        background-color: #f56c6c;
                    }
                    .delete {
                        position: absolute;
                        right: 10px;
                        i {
                            font-size: 16px;
                            color: #ff5454;
                        }
                    }
                }
            }
        }
    }
}
</style>

<script>
import leftImg from '../../assets/img/flfg/leftTitle.png';
import rightImg from '../../assets/img/flfg/rightTitle.png';
import img1 from '../../assets/img/rdsj/3.png';
import img2 from '../../assets/img/rdsj/4.png';
import img3 from '../../assets/img/rdsj/5.png';
import img4 from '../../assets/img/rdsj/6.png';
import img5 from '../../assets/img/rdsj/7.png';
import img6 from '../../assets/img/rdsj/8.png';
import img7 from '../../assets/img/rdsj/9.png';
import img8 from '../../assets/img/rdsj/10.png';
import img9 from '../../assets/img/rdsj/11.png';
import back from "../../assets/img/setting/back.png";
import jh_bg from "../../assets/img/dfzy/zwtp.png";
import { endLoading, get, post, startLoading } from '../../util/http_util';
import { NewsPictureUrl } from "../../api/publicUrl";
import { LiteraturePictureUrl } from "../../api/publicUrl";
export default {
    name: 'rdsj',
    data() {
        return {
            NewsPictureUrl:NewsPictureUrl,
            LiteraturePictureUrl:LiteraturePictureUrl,
            flag: 1,
            back: back,
            htmlImg: {
                leftImg: leftImg,
                rightImg: rightImg,
                img: [img1, img2, img3, img4],
                img1: img1,
                img2: img2,
                img3: img3,
                img4: img4,
                img5: img5,
                img6: img6,
                img7: img7,
                img8: img8
            },
            hotNews: {
                img: [],
                news: []
            },
            newsKinds: [
                { title: '美盟涉华舆情', img: [], news: [] },
                { title: '台海潮声', img: [], news: [] },
                { title: '中日交锋', img: [], news: [] },
                { title: '半岛风云', img: [], news: [] },
                { title: '南海观澜', img: [], news: [] },
                { title: '国际大势', img: [], news: [] }
            ],
            newsauthority: [
                { title: '国家机关', img: [], news: [] },
                { title: '军委机关', img: [], news: [] },
                { title: '战区机关', img: [], news: [] }
            ],
            sentiment: [
                { title: '舆情动态', img: [], news: [] },
                { title: '舆情报告', img: [], news: [] },
                { title: '舆情专报', img: [], news: [] }
            ],
            newInfo: {},
            bigItem: [],
            activeName: '国际国内热点',
            currentPage: 0,
            total: 0,
            newsData: [],
            everySize: 10,
            literatureList: [],
            newsList: ['国际国内热点', '美盟涉华舆情', '台海潮声', '中日交锋', '半岛风云', '南海观澜', '国际大势'],
            defaultProps: {
                children: 'children',
                label: 'label'
            },
            treeData: [{
                label: '新闻类',
                children: [{
                    label: '国际国内热点',
                },
                {
                    label: '美盟涉华舆情',
                },
                {
                    label: '台海潮声',
                }, {
                    label: '中日交锋',
                },
                {
                    label: '半岛风云',
                },
                {
                    label: '南海观澜',
                },
                {
                    label: '国际大势',
                }]
            }, {
                label: '权威发布',
                children: []
            }, {
                label: '舆情分析',
                children: []
            }],
            flagIs: true,
            moduleList: [],
            pickObj: {},
            visible: false,
            top: 300,
            left: 300,
            dynamicTags: [],
            inputVisible: false,
            inputValue: '',
            dialogVisiblePerson: false,
            dialogVisibleOrganization: false,
            dialogVisibleTag: false,
            personValue: '',
            organizationValue: '',
            personType: '',
            organizationType: '',
            timeout: null,
            state: '',
            selectText: '',
            pickItem: {},
            literatureObj: {},
            dialogVisibleCollection: false,
            innerVisible: false,
            collectionName: '',
            collectionFolder: [],
            collectionData: {},
            selectIndex: -1,
            left_img_ztgl:[],
            errimg: "this.src='" + jh_bg + "'",
        }
    },
    methods: {
        //#region
        goBack() {
            this.flag = 1;
        },//新闻详情
        showInfo(item) {
            startLoading();
            this.$router.push({ name: "新闻详情" + this.$route.meta.type_name, params: { key: item.id } });
            endLoading();
        },
        //文献预览
        viewLiterature(item) {
            window.open('api/rest/document/viewLiterature/' + item.folder + '/' + item.name);
        },
        showList(val) {
            this.flag = 2;
            this.total = 0;
            if (this.newsList.indexOf(val) != -1) {
                this.activeName = val;
                this.queryNews(1, this.everySize, val);
                this.flagIs = true;
            } else {
                this.activeName = val.id;
                this.queryLiterature(1, this.everySize, val.id);
                this.flagIs = false;
            }

        },
        handleSizeChange(val) {
            this.everySize = val;
            this.currentPage = 1;
            if (this.newsList.indexOf(this.activeName) != -1) {
                this.queryNews(1, val, this.activeName);
            } else {
                this.queryLiterature(1, val, this.activeName);
            }

        },
        showBigImg(item) {
            // this.$router.push("rdsj");
            // this.$router.push("/ztfx");
            // this.activeIndex = key + "";
            this.$store.commit("activeIndex","1");
            this.$emit('getMessage', "主题分析");
            for(let i =0; i < this.homeModule.length; i++){
                if(this.homeModule[i].name == "舆情监测"){
                    this.$store.commit("activeIndex", ++i+"");
                    this.$router.push({
                        name: '主题分析',
                        params: {zt_id: item}
                    });
                    break;
                }
            }
        },
        queryNews(pageNum, pageSize, module) {
            post('api/rest/fulltext/queryNews?pageNum=' + pageNum + '&pageSize=' + pageSize, { topic: module }).then(res => {
                this.newsData = res.list;
                this.total = res.totals;
            }).catch(err => {
                this.$message.warning(err.message); 
            })
        },
        //查询新闻模块的文件
        queryLiterature(pageNum, pageSize, type) {
            let typeUrl = (type != '' && type != null) ? ('&folder=' + type) : '';
            get('api/rest/document/queryLiterature?module=舆情报告&pageNum=' + pageNum + '&pageSize=' + pageSize + typeUrl).then(res => {
                this.literatureList = res.list;
                this.total = res.totals;
            })
            .catch((err)=>{
                this.$message.warning(err.message); 
            });
        },
        handleCurrentChange(pageNum) {
            this.currentPage = pageNum;
            if (this.newsList.indexOf(this.activeName) != -1) {
                this.queryNews(pageNum, this.everySize, this.activeName);
            } else {
                this.queryLiterature(pageNum, this.everySize, this.activeName);
            }


        },
        handleNodeClick(data) {
            this.currentPage = 1;
            this.total = 0;
            if (this.newsList.indexOf(data.label) != -1) {
                this.activeName = data.label;
                this.queryNews(1, this.everySize, data.label);
                this.flagIs = true;
            } else if (data.label == '新闻类' || data.label == '权威发布' || data.label == '舆情分析') {
                this.activeName = data.label;
                this.queryNews(1, this.everySize, data.label);
                this.flagIs = true;
            } else {
                this.activeName = data.id;
                this.queryLiterature(1, this.everySize, data.id);
                this.flagIs = false;
            }
        },
        showLiteratureInfo(item) {
            get('api/rest/fulltext/queryLiteratureById?id=' + item.name).then(res => {
                this.flag = 3;
                this.pickObj = res;
                this.literatureObj = item;
            }).catch(err => {
                this.$message.warning(err.message); 
            });
        },
        openMenu(e) {
            this.selectText = '';
            this.selectIndex = -1;
            const menuMinWidth = 300
            const offsetLeft = this.$el.getBoundingClientRect().left - 150; // container margin left
            const offsetWidth = this.$el.offsetWidth - 200; // container width
            const maxLeft = offsetWidth - menuMinWidth; // left boundary
            const left = e.clientX - offsetLeft; // 15: margin right

            if (left > maxLeft) {
                this.left = maxLeft;
            } else {
                this.left = left;
            }

            this.top = e.clientY; // fix 位置bug
            this.visible = true;
            this.selectText = window.getSelection().toString();
        },
        closeMenu() {
            this.visible = false;
        },
        //关联人物
        relatedPerson() {
            this.state = '';
            this.dialogVisiblePerson = true;
        },
        //关联机构
        relatedOrganization() {
            this.state = '';
            this.dialogVisibleOrganization = true;
        },

        querySearchAsync(queryString, cb) {
            let personList = [];
            post(
                `api/rest/resource/queryDynamicCharacter?pageNum=1&pageSize=100&multiFieldSearch=`+queryString,
                {
                    mould: "敌方资源",
                }
            ).then(res => {
                res.list.forEach(item => {
                    let personObj = {};
                    personObj['value'] = item.baseProperty.姓名;
                    personObj['address'] = item._id;
                    personList.push(personObj);
                })
                // var results = queryString ? personList.filter(this.createStateFilter(queryString)) : personList;
                clearTimeout(this.timeout);
                this.timeout = setTimeout(() => {
                    cb(personList);
                }, 3000 * Math.random());
            })
            .catch((err)=>{
                this.$message.warning(err.message); 
            });

            post(
                `api/rest/resource/queryDynamicCharacter?pageNum=1&pageSize=100&multiFieldSearch=`+queryString,
                {
                    mould: "敌方外网资源",
                }
            ).then(res => {
                res.list.forEach(item => {
                    let personObj = {};
                    personObj['value'] = item.baseProperty.姓名;
                    personObj['address'] = item._id;
                    personList.push(personObj);
                })
                // var results = queryString ? personList.filter(this.createStateFilter(queryString)) : personList;
                clearTimeout(this.timeout);
                this.timeout = setTimeout(() => {
                    cb(personList);
                }, 3000 * Math.random());
            })
            .catch((err)=>{
                this.$message.warning(err.message); 
            });
        },
        querySearchAsyncOrganization(queryString, cb) {
            let organizationList = [];
            post(
                "api/rest/resource/queryDynamicOrganization?pageNum=1&pageSize=100&multiFieldSearch="+queryString,
                {
                    mould: "敌方外网资源机构",
                }
            ).then(res => {
                res.list.forEach(item => {
                    let organizationObj = {};
                    organizationObj['value'] = item.baseProperty.部队番号;
                    organizationObj['address'] = item._id;
                    organizationList.push(organizationObj);
                })
                // var results = queryString ? organizationList.filter(this.createStateFilter(queryString)) : organizationList;
                clearTimeout(this.timeout);
                this.timeout = setTimeout(() => {
                    cb(organizationList);
                }, 3000 * Math.random());
            })
            .catch((err)=>{
                this.$message.warning(err.message); 
            });
            post(
                "api/rest/resource/queryDynamicOrganization?pageNum=1&pageSize=100&multiFieldSearch="+queryString,
                {
                    mould: "敌方资源机构",
                }
            ).then(res => {
                res.list.forEach(item => {
                    let organizationObj = {};
                    organizationObj['value'] = item.baseProperty.部队番号;
                    organizationObj['address'] = item._id;
                    organizationList.push(organizationObj);
                })
                // var results = queryString ? organizationList.filter(this.createStateFilter(queryString)) : organizationList;
                clearTimeout(this.timeout);
                this.timeout = setTimeout(() => {
                    cb(organizationList);
                }, 3000 * Math.random());
            })
            .catch((err)=>{
                this.$message.warning(err.message); 
            });
        },
        createStateFilter(queryString) {
            return (state) => {
                return (state.value.toLowerCase().indexOf(queryString.toLowerCase()) === 0);
            };
        },
        handleSelect(item) {
            this.pickItem = item;
        },
        //确定关联人物
        defineRelatedPerson() {
            let obj = {};
            if(this.personType=='相关专著'||this.personType=='人物画像分析报告'){
                obj['object'] = this.literatureObj.originName;
            }else{
                obj['object'] = this.selectText.trim();
            }
            obj['objectFrom'] = this.literatureObj.id;
            obj['subject'] = this.pickItem.address;
            obj['relation'] = this.personType;
            obj['objectType'] = '文献';
            post(`api/rest/3z/resource/addRelatedInfo`, obj).then(res => {
                if (res == 1) {
                    this.$message.success('关联人员成功！');
                    this.dialogVisiblePerson = false;
                } else {
                    this.$message.error('关联人员失败！');
                }
            }).catch(err => {
                this.$message.warning(err.message); 
            });

        },
        //确定关联机构
        defineRelatedOrganization() {
            let obj = {};
            if(this.organizationType=='历史文献'||this.organizationType=='证据资料'||this.organizationType=='机构分析报告'){
                obj['object'] = this.literatureObj.originName;
            }else{
                obj['object'] = this.selectText.trim();
            }
            obj['objectFrom'] = this.literatureObj.id;
            obj['subject'] = this.pickItem.address;
            obj['relation'] = this.organizationType;
            obj['objectType'] = '文献';
            post(`api/rest/3z/resource/addRelatedInfo`, obj).then(res => {
                if (res == 1) {
                    this.$message.success('关联机构成功！');
                    this.dialogVisibleOrganization = false;
                } else {
                    this.$message.error('关联机构失败！');
                }
            }).catch(err => {
                this.$message.warning(err.message); 
            });
        },

        //添加标签
        addTag() {
            this.dialogVisibleTag = true;
            this.dynamicTags = [];
        },
        handleClose(tag) {
            this.dynamicTags.splice(this.dynamicTags.indexOf(tag), 1);
        },
        showInput() {
            this.inputVisible = true;
            this.$nextTick(_ => {
                this.$refs.saveTagInput.$refs.input.focus();
            });
        },
        handleInputConfirm() {
            let inputValue = this.inputValue;
            if (inputValue) {
                this.dynamicTags.push(inputValue);
            }
            this.inputVisible = false;
            this.inputValue = '';
        },
        //确定新增标签
        defineAddTag() {
            let labels = this.dynamicTags;
            post('api/rest/document/addLiteratureLabel?id=' + this.literatureObj.id, labels).then(res => {
                if (res == 1) {
                    this.$message.success('添加标签成功！');
                    this.dialogVisibleTag = false;
                } else {
                    this.$message.error('添加标签失败！');
                }
            }).catch(err => {
                this.$message.warning(err.message); 
            });
        },
        handleClose(done) {
            done();
        },
        //#endregion
        //收藏
        //查询收藏目录
        searchCollectionFolder() {
            get('api/rest/resource/queryCollectionFolder?collector=' + this.userInfo.account).then(res => {
                this.collectionFolder = res;
            })
            .catch((err)=>{
                this.$message.warning(err.message); 
            });
        },
        //选择收藏夹
        addFolder(item, index) {
            this.selectIndex = index;
            if (this.selectText != '') {
                this.collectionData.description = this.selectText;
                this.collectionData.folderId = item.id;
                this.collectionData.originId = this.literatureObj.id;
                this.collectionData.title = this.literatureObj.originName.split('.')[0];
                this.collectionData.collector = this.userInfo.account;
            } else {
                this.$message.warning('未选择文字！');
            }
        },
        //选择收藏夹完成上传
        defineAddCollection() {
            if (this.collectionData.folderId != undefined) {
                post('api/rest/resource/addCollection', this.collectionData).then(res => {
                    if (res == 1) {
                        this.$message.success('收藏成功!');
                        this.dialogVisibleCollection = false;
                    }
                })
                .catch((err)=>{
                    this.$message.warning(err.message); 
                });
            } else {
                this.$message.warning('未选择收藏夹！');
                this.dialogVisibleCollection = true;
            }

        },
        addCollection() {
            this.dialogVisibleCollection = true;
        },
        stopstop() { },
        //新增收藏夹名称
        addCollectionFolder() {
            if (this.collectionName != '' && this.collectionName != null) {
                post('api/rest/resource/addCollectionFolder', { name: this.collectionName, collector: this.userInfo.account }).then(res => {
                    if (res == 1) {
                        this.$message.success('新增成功！');
                        this.searchCollectionFolder();
                        this.innerVisible = false;
                    }
                })
                .catch((err)=>{
                    this.$message.warning(err.message); 
                });
            } else {
                this.$message.warning('新增目录不能为空！');
                this.innerVisible = true;
            }
        },
        //删除收藏夹目录
        delectCollectionFolder(id) {
            delete_util('api/rest/resource/removeCollectionFolder?folderId=' + id).then(res => {
                if (res == 1) {
                    this.$message.success("删除成功！");
                    this.searchCollectionFolder();
                }
            })
            .catch((err)=>{
                this.$message.warning(err.message); 
            });
        },
    },
    watch: {
        visible(value) {
            if (value) {
                document.body.addEventListener('click', this.closeMenu)
            } else {
                document.body.removeEventListener('click', this.closeMenu)
            }
        }
    },
    computed: {
        userInfo() {
            if (this.$store.getters.userInfo) {
                return this.$store.getters.userInfo;
            } else {
                return { username: "" };
            }
        },
        homeModule() {
            return this.$store.getters.homeModule;
        }
    },
    activated() {
        //查询板块名称
        //所有版块id集合
        let ids = [];
        get('api/rest/document/queryLiteratureFolder?module=热点事件').then(res => {
            this.moduleList = res;
            let tmpQwfb = [], tmpYqfx = [];
            // this.activeName = res[0] && res[0].id;
            res.filter(item => item.remark == '权威发布').forEach((item, index) => {
                this.newsauthority[index].title = item.name;
                this.newsauthority[index].id = item.id;
                tmpQwfb.push({ label: item.name, id: item.id });
                this.treeData[1].children.push();
            });
            res.filter(item => item.remark == '舆情分析').forEach((item, index) => {
                this.sentiment[index].title = item.name;
                this.sentiment[index].id = item.id;
                tmpYqfx.push({ label: item.name, id: item.id });
            });
            res.forEach(item => {
                ids.push(item.id);
            });
            this.treeData[1].children = tmpQwfb;
            this.treeData[2].children = tmpYqfx;
        }).then(() => {
            //查询收藏夹
            this.searchCollectionFolder();
            post("api/rest/sentiment/queryTheme", {pageNum:1,pageSize:4})
            .then((res) => {
                this.left_img_ztgl=[];
                if(res.list.length>0){
                    res.list.forEach((item,index)=>{
                        this.left_img_ztgl.push(item);
                    })
                }
            })
            post('api/rest/fulltext/multiTopicQueryNews', ['国际国内热点', '美盟涉华舆情', '台海潮声', '中日交锋', '半岛风云', '南海观澜', '国际大势']).then(res => {
                //热点
                this.hotNews.news = res.国际国内热点;
                this.newsKinds[0].news = res.美盟涉华舆情;
                this.newsKinds[1].news = res.台海潮声;
                this.newsKinds[2].news = res.中日交锋;
                this.newsKinds[3].news = res.半岛风云;
                this.newsKinds[4].news = res.南海观澜;
                this.newsKinds[5].news = res.国际大势;
            });

            post('api/rest/fulltext/multiTopicQueryNews?showPic=true', ['国际国内热点', '美盟涉华舆情', '台海潮声', '中日交锋', '半岛风云', '南海观澜', '国际大势']).then(res => {
                //热点
                this.hotNews.img = res.国际国内热点;
                this.bigItem = [];
                this.hotNews.img.forEach(item=>{
                    if(item.website_img.length>0)
                    this.bigItem.push(item);
                })
                this.newsKinds[0].img = res.美盟涉华舆情;
                this.newsKinds[1].img = res.台海潮声;
                this.newsKinds[2].img = res.中日交锋;
                this.newsKinds[3].img = res.半岛风云;
                this.newsKinds[4].img = res.南海观澜;
                this.newsKinds[5].img = res.国际大势;
            });

            post('api/rest/document/multiQueryLiterature?module=舆情报告', ids).then(res => {
                //权威发布
                this.newsauthority[0].news = res[25];
                this.newsauthority[1].news = res[26];
                this.newsauthority[2].news = res[27];
                //舆情分析
                this.sentiment[0].news = res[28];
                this.sentiment[1].news = res[29];
                this.sentiment[2].news = res[30];
            });
            post('api/rest/document/multiQueryLiterature?module=舆情报告&showPic=true', ids).then(res => {
                // //权威发布
                this.newsauthority[0].img = res[25];
                this.newsauthority[1].img = res[26];
                this.newsauthority[2].img = res[27];
                //舆情分析
                this.sentiment[0].img = res[28];
                this.sentiment[1].img = res[29];
                this.sentiment[2].img = res[30];
            });
        })
        .catch((err)=>{
            this.$message.warning(err.message); 
        });
    }
}
</script>