<template>
  <div class="information" id="information">

    <div class="ADContainer" v-if="ADContainershow">
      <!-- 鍏憡澶撮儴 -->
      <div class="adTop"><span class="title">鍏憡</span>
        <el-button type="primary" size="small" @click="centerDialogVisible = true" v-if="domainAdmin">鍙戝叕鍛�</el-button>
      </div>

      <!-- 鍏憡鍒楄〃-->
      <div class="adlist">
        <ul>
          <li v-for="item in announcementList" :key="item.id">
            <div><span class="title" style="font-size: 24px;" @click="adlidetail(item)">{{item.title}}<em class="top"
                v-show="item.sticky">缃《</em></span></div>
            <div>鍒嗙被锛�<span class="DateInfo"><i>{{item.category}}</i></span></div>
            <div>鍏憡鍐呭锛�<span class="content" v-html="item.content"></span></div>
            <div>鍙戝竷鏃堕棿锛�<span class="DateInfo"><i>{{item.createTime}}</i></span></div>
            <div>鍙戝竷鏉ユ簮锛�<span class="DateInfo"><i>{{item.sender}}</i></span></div>
            <span class="closebtn" @click="deleteMessage(item,2)"><img
                src="~@/assets/images/other/closelink.png"></span>
          </li>
        </ul>
        <div class="adlistmore" @click="viewmore" v-if="!noDataLength"><span>鏌ョ湅鏇村</span></div>
        <div class="adlistnodata" v-if="noDataLength"><span>娌℃湁鏇村浜�</span></div>
      </div>
    </div>

    <div class="ADContainerDetail" v-if="ADContainerDetailshow">
      <div class="DetailTop">
        <el-button size="small" @click="backGoAD">杩斿洖</el-button>
      </div>
      <div class="AdDetailContent">
        <span class="title">{{addetailobj.title}}</span>
        <span class="dateinfo"><i>{{addetailobj.sender}}</i><i>{{addetailobj.createTime}}</i></span>
        <span class="content" v-html="addetailobj.content"></span>
      </div>
    </div>

    <!--鍙戝叕鍛婂脊绐�-->
    <el-dialog :close-on-click-modal="false" class="bulletin-dialog" title="鍙戝叕鍛�" :visible.sync="centerDialogVisible"
      width="55%" center v-loading="loading">
      <div class="dialog-box">
        <el-scrollbar class="scrollbar">
          <el-form :label-position="labelPosition" label-width="80px">
            <el-form-item label="鏍囬:">
              <el-input v-model="headline"></el-input>
            </el-form-item>
            <el-form-item label="鎺ユ敹浜�:">
              <el-input v-model="recipient" class="recipientVisible" readonly ref="recipient"></el-input>
              <el-button icon="el-icon-plus" @click="PlusSign(false)"></el-button>
              <el-button icon="el-icon-close" class="minus-msg" @click="eduiminus"></el-button>
            </el-form-item>
            <el-form-item label="鍒嗙被:">
              <el-select v-model="category">
                <el-option
                  v-for="(item, index) in categoryList"
                  :key="index"
                  :label="item.label"
                  :value="item.value"
                >
                </el-option>
              </el-select>
            </el-form-item>
            <el-form-item label="鍏朵粬璁剧疆:">
              <el-checkbox v-model="otherSettings">缃《</el-checkbox>
            </el-form-item>
            <el-form-item label="鍏憡鍐呭:" class="edit-html">
              <div class="html-box">
                <div>
                  <vue-html5-editor @change="updateData" :content="textarea">
                  </vue-html5-editor>
                </div>
                <div class="text-num">
                  褰撳墠宸茶緭鍏{currentWordCount}}涓瓧绗�, 鎮ㄨ繕鍙互杈撳叆{{wordsRemaining}}涓瓧绗︺€�
                </div>
              </div>
            </el-form-item>

          </el-form>
        </el-scrollbar>
      </div>
      <span slot="footer" class="dialog-footer">
        <el-button size="medium" @click="hiddenBulletinDialog()">鍙� 娑�</el-button>
        <el-button size="medium" type="primary" @click="eduirelease">鍙戝竷</el-button>
      </span>
    </el-dialog>

    <!--閮ㄩ棬鏍戝脊绐�-->

    <el-dialog :close-on-click-modal="false" title="閫夋嫨閮ㄩ棬" class="dept-dialog" v-if="Receivedby"
      :visible.sync="Receivedby" width="40%">
      <div class="msg-pull-box">
        <el-scrollbar class="scrollbar">
          <el-tree empty-text="鍔犺浇涓�..." :props="propsPull" :load="loadNodeDept" node-key="id" ref="deptTree" lazy
            show-checkbox :check-strictly="true" :default-checked-keys="defaultCheckedKeys"
            @check-change="Receivethetitle($event)">
          </el-tree>
        </el-scrollbar>
      </div>
      <span slot="footer" class="dialog-footer">
        <el-button size="medium" @click="Receivedby = false">鍙栨秷</el-button>
        <el-button size="medium" type="primary" @click="getDeptData">纭畾</el-button>
      </span>
    </el-dialog>
  </div>
</template>
<script>
import API from "@/api.js";
import Constant from "@/Constant.js";
export default {
  props: ["openParams"],
  data() {
    return {
      domainAdmin: localStorage.getItem("domainAdmin") == "true" ? true : false,
      param: {
        currpage: 1,
        pagesize: 10,
      },
      announcementList: [], //鍏憡鍒楄〃鏁扮粍
      noDataLength: false,
      addetailobj: {}, //鍏憡璇︽儏
      ADContainershow: true,
      ADContainerDetailshow: false,
      loading: false,
      categoryList: [
        {
          label: '浜轰簨鍏憡',
          value: '浜轰簨鍏憡'
        },{
          label: '涓氬姟鍏憡',
          value: '涓氬姟鍏憡'
        },{
          label: '鍒跺害鍏憡',
          value: '鍒跺害鍏憡'
        },{
          label: '娲诲姩鍏憡',
          value: '娲诲姩鍏憡'
        }
      ],
      Constant,
      showEmotion: false,
      imag: '<img src="/obpm/message/img/face/qlx_thumb.gif" />gddd',
      emotionList: [
        {
          type: "[鍘绘梾琛宂",
          path: '<img src="/obpm/message/img/face/qlx_thumb.gif" />',
          url: "/obpm/message/img/face/qlx_thumb.gif",
        },
        {
          type: "[骞垮憡]",
          path: '<img src="/obpm/message/img/face/ad_new0902_thumb.gif" />',
          url: "/obpm/message/img/face/ad_new0902_thumb.gif",
        },
        {
          type: "[doge]",
          path: '<img src="/obpm/message/img/face/doge_thumb.gif" />',
          url: "/obpm/message/img/face/doge_thumb.gif",
        },
        {
          type: "[鍠靛柕]",
          path: '<img src="/obpm/message/img/face/mm_thumb.gif" />',
          url: "/obpm/message/img/face/mm_thumb.gif",
        },
        {
          type: "[浜屽搱]",
          path: '<img src="/obpm/message/img/face/moren_hashiqi_thumb.png" />',
          url: "/obpm/message/img/face/moren_hashiqi_thumb.png",
        },
        {
          type: "[鍝嗗暒A姊﹀悆鎯奭",
          path: '<img src="/obpm/message/img/face/dorachijing_thumb.gif" />',
          url: "/obpm/message/img/face/dorachijing_thumb.gif",
        },
        {
          type: "[鍝嗗暒A姊﹁姳蹇僝",
          path: '<img src="/obpm/message/img/face/dorahaose_thumb.gif" />',
          url: "/obpm/message/img/face/dorachijing_thumb.gif",
        },
        {
          type: "[鍝嗗暒A姊﹀井绗慮",
          path: '<img src="/obpm/message/img/face/jqmweixiao_thumb.gif" />',
          url: "/obpm/message/img/face/jqmweixiao_thumb.gif",
        },
        {
          type: "[绗慶ry]",
          path: '< src="/obpm/message/img/face/xiaoku_thumb.gif" />',
          url: "/obpm/message/img/face/xiaoku_thumb.gif",
        },
        {
          type: "[鎽婃墜]",
          path: '<img src="/obpm/message/img/face/pcmoren_tanshou_thumb.png" />',
          url: "/obpm/message/img/face/pcmoren_tanshou_thumb.png",
        },
        {
          type: "[鎶辨墜]",
          path: '<img src="/obpm/message/img/face/pcmoren_baobao_thumb.png" />',
          url: "/obpm/message/img/face/pcmoren_baobao_thumb.png",
        },
        {
          type: "[缇や綋鍥磋]",
          path: '<img src="/obpm/message/img/face/lxhweiguan_thumb.gif" />',
          url: "/obpm/message/img/face/lxhweiguan_thumb.gif",
        },

        //12
        {
          type: "[鍧忕瑧]",
          path: '<img src="/obpm/message/img/face/pcmoren_huaixiao_thumb.png" />',
          url: "/obpm/message/img/face/pcmoren_huaixiao_thumb.png",
        },
        {
          type: "[鑸斿睆]",
          path: '<img src="/obpm/message/img/face/pcmoren_tian_thumb.png" />',
          url: "/obpm/message/img/face/pcmoren_tian_thumb.png",
        },
        {
          type: "[姹",
          path: '<img src="/obpm/message/img/face/pcmoren_wu_thumb.png" />',
          url: "/obpm/message/img/face/pcmoren_wu_thumb.png",
        },
        {
          type: "[寰瑧]",
          path: '<img src="/obpm/message/img/face/huanglianwx_thumb.gif" />',
          url: "/obpm/message/img/face/huanglianwx_thumb.gif",
        },
        {
          type: "[鍢诲樆]",
          path: '<img src="/obpm/message/img/face/tootha_thumb.gif" />',
          url: "/obpm/message/img/face/tootha_thumb.gif",
        },
        {
          type: "[鍝堝搱]",
          path: '<img src="/obpm/message/img/face/laugh.gif" />',
          url: "/obpm/message/img/face/laugh.gif",
        },
        {
          type: "[鎸栭蓟]",
          path: '<img src="/obpm/message/img/face/wabi_thumb.gif" />',
          url: "/obpm/message/img/face/wabi_thumb.gif",
        },
        {
          type: "[鍙埍]",
          path: '<img src="/obpm/message/img/face/tza_thumb.gif" />',
          url: "/obpm/message/img/face/tza_thumb.gif",
        },
        {
          type: "[鍙€淽",
          path: '<img src="/obpm/message/img/face/kl_thumb.gif" />',
          url: "/obpm/message/img/face/kl_thumb.gif",
        },
        {
          type: "[鍚冩儕]",
          path: '<img src="/obpm/message/img/face/cj_thumb.gif" />',
          url: "/obpm/message/img/face/cj_thumb.gif",
        },
        {
          type: "[瀹崇緸]",
          path: '<img src="/obpm/message/img/face/shamea_thumb.gif" />',
          url: "/obpm/message/img/face/shamea_thumb.gif",
        },
        {
          type: "[鎸ょ溂]",
          path: '<img src="/obpm/message/img/face/zy_thumb.gif" />',
          url: "/obpm/message/img/face/zy_thumb.gif",
        },
        //24
        {
          type: "[闂槾]",
          path: '<img src="/obpm/message/img/face/bz_thumb.gif" />',
          url: "/obpm/message/img/face/bz_thumb.gif",
        },
        {
          type: "[閯欒]",
          path: '<img src="/obpm/message/img/face/bs2_thumb.gif" />',
          url: "/obpm/message/img/face/bs2_thumb.gif",
        },
        {
          type: "[鐖变綘]",
          path: '<img src="/obpm/message/img/face/lovea_thumb.gif" />',
          url: "/obpm/message/img/face/lovea_thumb.gif",
        },
        {
          type: "[娉猐",
          path: '<img src="/obpm/message/img/face/sada_thumb.gif" />',
          url: "/obpm/message/img/face/sada_thumb.gif",
        },
        {
          type: "[鍋风瑧]",
          path: '<img src="/obpm/message/img/face/heia_thumb.gif" />',
          url: "/obpm/message/img/face/heia_thumb.gif",
        },
        {
          type: "[浜蹭翰]",
          path: '<img src="/obpm/message/img/face/qq_thumb.gif" />',
          url: "/obpm/message/img/face/qq_thumb.gif",
        },
        {
          type: "[鐢熺梾]",
          path: '<img src="/obpm/message/img/face/sb_thumb.gif" />',
          url: "/obpm/message/img/face/sb_thumb.gif",
        },
        {
          type: "[澶紑蹇僝",
          path: '<img src="/obpm/message/img/face/mb_thumb.gif" />',
          url: "/obpm/message/img/face/mb_thumb.gif",
        },
        {
          type: "[鐧界溂]",
          path: '<img src="/obpm/message/img/face/landeln_thumb.gif" />',
          url: "/obpm/message/img/face/landeln_thumb.gif",
        },
        {
          type: "[鍙冲摷鍝糫",
          path: '<img src="/obpm/message/img/face/yhh_thumb.gif" />',
          url: "/obpm/message/img/face/yhh_thumb.gif",
        },
        {
          type: "[宸﹀摷鍝糫",
          path: '<img src="/obpm/message/img/face/zhh_thumb.gif" />',
          url: "/obpm/message/img/face/zhh_thumb.gif",
        },
        {
          type: "[鍢榏",
          path: '<img src="/obpm/message/img/face/x_thumb.gif" />',
          url: "/obpm/message/img/face/x_thumb.gif",
        },
        //36
        {
          type: "[鍝€]",
          path: '<img src="/obpm/message/img/face/cry.gif" />',
          url: "/obpm/message/img/face/cry.gif",
        },
        {
          type: "[濮斿眻]",
          path: '<img src="/obpm/message/img/face/wq_thumb.gif" />',
          url: "/obpm/message/img/face/wq_thumb.gif",
        },

        {
          type: "[鍚怾",
          path: '<img src="/obpm/message/img/face/t_thumb.gif" />',
          url: "/obpm/message/img/face/t_thumb.gif",
        },
        {
          type: "[鍝堟瑺]",
          path: '<img src="/obpm/message/img/face/haqianv2_thumb.gif" />',
          url: "/obpm/message/img/face/haqianv2_thumb.gif",
        },
        {
          type: "[鎶辨姳_鏃",
          path: '<img src="/obpm/message/img/face/bba_thumb.gif" />',
          url: "/obpm/message/img/face/bba_thumb.gif",
        },
        {
          type: "[鎬抅",
          path: '<img src="/obpm/message/img/face/angrya_thumb.gif" />',
          url: "/obpm/message/img/face/angrya_thumb.gif",
        },
        {
          type: "[鐤戦棶]",
          path: '<img src="/obpm/message/img/face/yw_thumb.gif" />',
          url: "/obpm/message/img/face/yw_thumb.gif",
        },
        {
          type: "[棣嬪槾]",
          path: '<img src="/obpm/message/img/face/cza_thumb.gif" />',
          url: "/obpm/message/img/face/cza_thumb.gif",
        },
        {
          type: "[鎷滄嫓]",
          path: '<img src="/obpm/message/img/face/88_thumb.gif" />',
          url: "/obpm/message/img/face/88_thumb.gif",
        },
        {
          type: "[鎬濊€僝",
          path: '<img src="/obpm/message/img/face/sk_thumb.gif" />',
          url: "/obpm/message/img/face/sk_thumb.gif",
        },
        {
          type: "[姹梋",
          path: '<img src="/obpm/message/img/face/sweata_thumb.gif" />',
          url: "/obpm/message/img/face/sweata_thumb.gif",
        },
        {
          type: "[鍥癩",
          path: '<img src="/obpm/message/img/face/kunv2_thumb.gif" />',
          url: "/obpm/message/img/face/kunv2_thumb.gif",
        },
        //48
        {
          type: "[鐫",
          path: '<img src="/obpm/message/img/face/huangliansj_thumb.gif" />',
          url: "/obpm/message/img/face/huangliansj_thumb.gif",
        },
        {
          type: "[閽盷",
          path: '<img src="/obpm/message/img/face/money_thumb.gif" />',
          url: "/obpm/message/img/face/money_thumb.gif",
        },
        {
          type: "[澶辨湜]",
          path: '<img src="/obpm/message/img/face/sw_thumb.gif" />',
          url: "/obpm/message/img/face/sw_thumb.gif",
        },
        {
          type: "[閰穄",
          path: '<img src="/obpm/message/img/face/cool_thumb.gif" />',
          url: "/obpm/message/img/face/cool_thumb.gif",
        },
        {
          type: "[鑹瞉",
          path: '<img src="/obpm/message/img/face/huanglianse_thumb.gif" />',
          url: "/obpm/message/img/face/huanglianse_thumb.gif",
        },
        {
          type: "[鍝糫",
          path: '<img src="/obpm/message/img/face/hatea_thumb.gif" />',
          url: "/obpm/message/img/face/hatea_thumb.gif",
        },
        {
          type: "[榧撴帉]",
          path: '<img src="/obpm/message/img/face/gza_thumb.gif" />',
          url: "/obpm/message/img/face/gza_thumb.gif",
        },
        {
          type: "[鏅昡",
          path: '<img src="/obpm/message/img/face/dizzya_thumb.gif" />',
          url: "/obpm/message/img/face/dizzya_thumb.gif",
        },
        {
          type: "[鎮蹭激]",
          path: '<img src="/obpm/message/img/face/bs_thumb.gif" />',
          url: "/obpm/message/img/face/bs_thumb.gif",
        },
        {
          type: "[鎶撶媯]",
          path: '<img src="/obpm/message/img/face/crazya_thumb.gif" />',
          url: "/obpm/message/img/face/crazya_thumb.gif",
        },
        {
          type: "[榛戠嚎]",
          path: '<img src="/obpm/message/img/face/h_thumb.gif" />',
          url: "/obpm/message/img/face/h_thumb.gif",
        },
        {
          type: "[闃撮櫓]",
          path: '<img src="/obpm/message/img/face/yx_thumb.gif" />',
          url: "/obpm/message/img/face/yx_thumb.gif",
        },
        //60
        {
          type: "[鎬掗獋]",
          path: '<img src="/obpm/message/img/face/numav2_thumb.gif" />',
          url: "/obpm/message/img/face/numav2_thumb.gif",
        },
        {
          type: "[浜掔矇]",
          path: '<img src="/obpm/message/img/face/hufen_thumb.gif" />',
          url: "/obpm/message/img/face/hufen_thumb.gif",
        },
        {
          type: "[蹇僝",
          path: '<img src="/obpm/message/img/face/hearta_thumb.gif" />',
          url: "/obpm/message/img/face/hearta_thumb.gif",
        },
        {
          type: "[浼ゅ績]",
          path: '<img src="/obpm/message/img/face/unheart.gif" />',
          url: "/obpm/message/img/face/unheart.gif",
        },
        {
          type: "[鐚ご]",
          path: '<img src="/obpm/message/img/face/pig.gif" />',
          url: "/obpm/message/img/face/pig.gif",
        },
        {
          type: "[鐔婄尗]",
          path: '<img src="/obpm/message/img/face/panda_thumb.gif" />',
          url: "/obpm/message/img/face/panda_thumb.gif",
        },
        {
          type: "[鍏斿瓙]",
          path: '<img src="/obpm/message/img/face/rabbit_thumb.gif" />',
          url: "/obpm/message/img/face/rabbit_thumb.gif",
        },
        {
          type: "[ok]",
          path: '<img src="/obpm/message/img/face/ok_thumb.gif" />',
          url: "/obpm/message/img/face/ok_thumb.gif",
        },
        {
          type: "[鑰禲",
          path: '<img src="/obpm/message/img/face/ye_thumb.gif" />',
          url: "/obpm/message/img/face/ye_thumb.gif",
        },
        {
          type: "[good]",
          path: '<img src="/obpm/message/img/face/good_thumb.gif" />',
          url: "/obpm/message/img/face/good_thumb.gif",
        },
        {
          type: "[NO]",
          path: '<img src="/obpm/message/img/face/buyao_org.gif" />',
          url: "/obpm/message/img/face/buyao_org.gif",
        },
        {
          type: "[璧瀅",
          path: '<img src="/obpm/message/img/face/z2_thumb.gif" />',
          url: "/obpm/message/img/face/z2_thumb.gif",
        },
        //72
        {
          type: "[鏉",
          path: '<img src="/obpm/message/img/face/come_thumb.gif" />',
          url: "/obpm/message/img/face/come_thumb.gif",
        },
        {
          type: "[寮盷",
          path: '<img src="/obpm/message/img/face/sad_thumb.gif" />',
          url: "/obpm/message/img/face/sad_thumb.gif",
        },
        {
          type: "[鑽夋偿椹琞",
          path: '<img src="/obpm/message/img/face/shenshou_thumb.gif" />',
          url: "/obpm/message/img/face/shenshou_thumb.gif",
        },
        {
          type: "[绁為┈]",
          path: '<img src="/obpm/message/img/face/horse2_thumb.gif" />',
          url: "/obpm/message/img/face/horse2_thumb.gif",
        },
        {
          type: "[鍥",
          path: '<img src="/obpm/message/img/face/j_thumb.gif" />',
          url: "/obpm/message/img/face/j_thumb.gif",
        },
        {
          type: "[娴簯]",
          path: '<img src="/obpm/message/img/face/fuyun_thumb.gif" />',
          url: "/obpm/message/img/face/fuyun_thumb.gif",
        },
        {
          type: "[缁欏姏]",
          path: '<img src="/obpm/message/img/face/geiliv2_thumb.gif" />',
          url: "/obpm/message/img/face/geiliv2_thumb.gif",
        },
        {
          type: "[鍥磋]",
          path: '<img src="/obpm/message/img/face/wg_thumb.gif" />',
          url: "/obpm/message/img/face/wg_thumb.gif",
        },
        {
          type: "[濞佹]",
          path: '<img src="/obpm/message/img/face/vw_thumb.gif" />',
          url: "/obpm/message/img/face/vw_thumb.gif",
        },
        {
          type: "[璇濈瓛]",
          path: '<img src="/obpm/message/img/face/huatongv2_thumb.gif" />',
          url: "/obpm/message/img/face/huatongv2_thumb.gif",
        },
        {
          type: "[铚$儧]",
          path: '<img src="/obpm/message/img/face/lazhuv2_thumb.gif" />',
          url: "/obpm/message/img/face/lazhuv2_thumb.gif",
        },
        {
          type: "[铔嬬硶]",
          path: '<img src="/obpm/message/img/face/cakev2_thumb.gif" />',
          url: "/obpm/message/img/face/cakev2_thumb.gif",
        },
      ],
      readStatus: "",
      currentActiveName: "first",
      currentWordCount: 0,
      wordsRemaining: 10000,
      isEmptyPage: false,
      noReply: false,
      noReplyMy: false,
      allIsEmptyPage: false,
      messagesListNum: "", //浼佷笟鍔ㄦ€佷俊鎭垪琛ㄦ暟閲�
      messagesList: [], //浼佷笟鍔ㄦ€佷俊鎭垪琛�
      currentArray: [],
      currentIndex: "", //鐐瑰嚮鍥炲鏃剁殑index鍊�
      isSendRange: "",
      sendRangeList: [], //鍙戦€佽寖鍥撮儴闂ㄥ垪琛�
      sendRangeName: "", //鍙戦€佽寖鍥撮儴闂ㄥ悕瀛�
      deptList: [],
      otherSettings: false,
      labelPosition: "right",
      fileList: [],
      tabPosition: "left",
      information: "",
      msgsubmit: "",
      headline: "",
      recipient: "",
      category: "",
      selectDeptList: "", //鍙戝叕鍛婄獥鍙i€夋嫨鐨勯儴闂ㄦ暟鎹�
      Howmanywords: 140,
      tabpanelComment: "",
      textarea: "",
      workslide: "first",
      activekeep: "first",
      activeName: "first",
      dialogVisible: false,
      Receivedby: false, //鍙戝叕鍛婇噷闈㈢殑鍔犲彿寮规
      centerDialogVisible: false,
      remnant: 140,
      eduiPlus: 0,
      eduisubtract: 10000,
      props: {
        label: "name",
        children: "zones",
        isLeaf: "leaf",
      },
      propsPull: {
        label: "name",
        children: "zones",
        isLeaf: "leaf",
      },

      //璇勮鍥炲鎺ュ彛鎵€闇€鐨勫弬鏁扮紦瀛�
      replyToUser: "",
      replyToUserId: "",
      replyMessageId: "",
      replyCommentId: "",
      replyTocontent: "",

      labelSwitchVal: "first",
      unreadWorkItems: [], //鏈宸ヤ綔浜嬮」
      unreadWorkNum: 0,
      allNotice: [], //鍏ㄩ儴宸ヤ綔浜嬮」
      allNoticeNum: 0,
      myReplyData: [],
      myReplyNum: 0,
      receiveNum: 0,
      receiveData: [],
      currentFlowType: "",
      currentFlowTypeNum: "",
      flowType: "first",
      defaultCheckedKeys: [],
    };
  },
  created() {
    //鏌ヨ鍏憡鍒楄〃
    this.getMessagesAdList();

    //this.notices();
    this.getMessagesList();
    // console.log("this.openParams----->",this.openParams);

    //鐐瑰嚮娑堟伅鎻愰啋閫氳繃浼犲叆鑷畾涔夊弬鏁帮紝鍒ゆ柇鍙傛暟鍐嶅畾涔塩urrentActiveName鐨勫€煎嵆鍙�
    if (this.openParams.remind) {
      this.currentActiveName = "second";
      this.labelSwitch("first");
    }
    if (this.openParams.isWorkMatters) {
      this.currentActiveName = "second";
      let readStatus = 0;
      let type = 0;
      let data = {
        readStatus: 0,
        type: 0,
      };
      this.$api.getNotice(data, {
        onSucess: (res) => {
          if (res.data.data.datas.length == 0) {
            this.isEmptyPage = true;
          } else {
            this.unreadWorkNum = res.data.data.rowCount;
            this.unreadWorkItems = res.data.data.datas;
          }
        },
      });
    }
  },
  methods: {
    getMessagesAdList() {
      //鍏憡鍒楄〃鍒嗛〉
      this.$api.getAnnouncementPage(this.param.currpage, this.param.pagesize, {
        onSucess: (res) => {
          if (res.data.data.datas.length) {
            if (res.data.data.datas.length < this.param.pagesize)
              this.noDataLength = true;
            let datas = res.data.data.datas;
            datas.forEach((item) => {
              this.announcementList.push(item);
            });
          } else {
            this.noDataLength = true;
          }
        },
      });
    },
    deleteMessage(item, type) {
      let messageId = item.id;
      this.$confirm("鍒犻櫎鍚庢棤娉曟仮澶嶏紝纭畾鍒犻櫎鍚楋紵", "鎻愮ず", {
        confirmButtonText: "纭畾",
        cancelButtonText: "鍙栨秷",
        type: "warning",
      })
        .then(() => {
          this.$api.deleteMessage(messageId, {
            onSucess: (response) => {
              if (response.data.status == 1) {
                this.param.currpage = 1; //閲嶇疆绗竴椤�
                this.announcementList = []; //閲嶇疆鍒楄〃
                if (type == "1") {
                  this.$api.getMessagesList({
                    onSucess: (res) => {
                      this.messagesListNum = res.data.data.rowCount;
                      this.messagesList = res.data.data.datas;
                    },
                  });
                } else if (type == "2") {
                  this.getMessagesAdList(); //鍒嗛〉鍏憡鍒楄〃
                }
              }
            },
          });
        })
        .catch(() => {});
    },
    adlidetail(item) {
      //鍏憡璇︽儏
      this.addetailobj = item;
      this.ADContainerDetailshow = true;
      this.ADContainershow = false;
    },
    backGoAD() {
      //鍏憡杩斿洖
      this.ADContainerDetailshow = false;
      this.ADContainershow = true;
    },
    viewmore() {
      this.param.currpage++;
      this.getMessagesAdList();
    },
    showEmotionDialog(val) {
      if (val) {
        this.showEmotion = false;
      } else {
        this.showEmotion = !this.showEmotion;
      }
    },
    getEmoticons(item) {
      console.log("item--->", item);
      this.information += item.type;
    },
    deleteReplyMessage(el, index, parentIndex) {
      let commentId = el.id,
        messageId = el.messageId;
      this.$confirm("鍒犻櫎鍚庢棤娉曟仮澶嶏紝纭畾鍒犻櫎鍚楋紵", "鎻愮ず", {
        confirmButtonText: "纭畾",
        cancelButtonText: "鍙栨秷",
        type: "warning",
      })
        .then(() => {
          this.$api.deleteReply(commentId, messageId, {
            onSucess: (res) => {
              if (res.data.status == 1) {
                this.$notify({
                  title: "鍒犻櫎鎴愬姛!",
                  message: "",
                  type: "sucess",
                });
                this.messagesList[parentIndex].replayData.splice(index, 1);
                this.$forceUpdate();
              }
            },
          });
        })
        .catch(() => {});
    },
    hiddenBulletinDialog() {
      this.headline = "";
      this.recipient = "";
      this.textarea = "";
      this.centerDialogVisible = false;
    },

    //鎴戝洖澶嶇殑锛堝垹闄わ級
    deleteReply(item, index, num) {
      let commentId = item.id,
        messageId = item.messageId;
      this.$confirm("鍒犻櫎鍚庢棤娉曟仮澶嶏紝纭畾鍒犻櫎鍚楋紵", "鎻愮ず", {
        confirmButtonText: "纭畾",
        cancelButtonText: "鍙栨秷",
        type: "warning",
      })
        .then(() => {
          this.$api.deleteReply(commentId, messageId, {
            onSucess: (res) => {
              if (res.data.status == 1) {
                this.$notify({
                  title: "鍒犻櫎鎴愬姛!",
                  message: "",
                  type: "sucess",
                });
                if (num == "1") {
                  this.myReplyData.splice(index, 1);
                } else if (num == "2") {
                  this.receiveData.splice(index, 1);
                }
                this.$forceUpdate();
              }
            },
          });
        })
        .catch(() => {});
    },

    doJump(item, index) {
      let obj = JSON.parse(item.linkParams);
      let params = {
        appId: this.$root.appid,
        linkType: "00",
        actionContent: obj._formid,
        name: "娴佺▼",
        docId: obj._docid,
        _select: obj._docid,
      };
      this.$emit("add-tab", params);
      if (index >= 0) {
        this.$api.noticeRead(item.id, {
          onSucess: () => {},
        });
        this.unreadWorkItems.splice(index, 1);
        if (this.unreadWorkItems.length == 0) {
          this.isEmptyPage = true;
        }
      }
    },
    announcementClick(tab) {
      if (tab.index == 1) {
        this.$api.getAnnouncement({
          onSucess: (res) => {
            this.announcementList = res.data.data.datas;
          },
        });
      }
    },
    paging() {},
    workHandleClick(val, currentType) {
      // console.log("----------->menu", val)
      this.currentFlowType = currentType;
      this.currentFlowTypeNum = val;
      let readStatus = "";
      let type = val;
      let data;
      if (this.flowType == "first") {
        data = {
          readStatus: 0,
          type: val,
        };
        this.$api.getNotice(data, {
          onSucess: (res) => {
            if (res.data.data.datas.length == 0) {
              this.isEmptyPage = true;
            } else {
              this.isEmptyPage = false;
              this.unreadWorkNum = res.data.data.rowCount;
              this.unreadWorkItems = res.data.data.datas;
            }
          },
        });
      } else if (this.flowType == "second") {
        data = {
          readStatus: "",
          type: val,
        };
        this.$api.getNotice(data, {
          onSucess: (res) => {
            this.allNoticeNum = res.data.data.rowCount;
            this.allNotice = res.data.data.datas;
            if (res.data.data.datas.length <= 0) {
              this.allIsEmptyPage = true;
            } else {
              this.allIsEmptyPage = false;
            }
          },
        });
      }
    },

    replyClick(tab) {
      if (tab.index == 1) {
        let currpage = 1;
        let _rowcount = 30;
        this.$api.getReceive(currpage, _rowcount, {
          onSucess: (res) => {
            if (res.data.data.rowCount <= 0) {
              this.noReplyMy = true;
            }
            this.receiveNum = res.data.data.rowCount;
            this.receiveData = res.data.data.datas;
          },
        });
      }
    },

    handleClick(tab) {
      if (tab.index == 1) {
        let readStatus = 0;
        let type = 0;
        let data = {
          readStatus: 0,
          type: 0,
        };
        this.$api.getNotice(data, {
          onSucess: (res) => {
            if (res.data.data.datas.length == 0) {
              this.isEmptyPage = true;
            } else {
              this.unreadWorkNum = res.data.data.rowCount;
              this.unreadWorkItems = res.data.data.datas;
            }
          },
        });
      } else if (tab.index == 2) {
        let currpage = 1;
        let _rowcount = 30;
        this.$api.getMyreply(currpage, _rowcount, {
          onSucess: (res) => {
            if (res.data.data.rowCount <= 0) {
              this.noReply = true;
            }
            this.myReplyNum = res.data.data.rowCount;
            this.myReplyData = res.data.data.datas;
          },
        });
      }
    },

    //鍏ㄩ儴鏍囪宸茶
    setAllRead() {
      this.$api.setAllRead({
        onSucess: (res) => {
          // console.log("res-->",res);
          if (res.data.status) {
            this.readStatus = 0;
            let type = 0;
            let data = {
              readStatus: 0,
              type: this.currentFlowTypeNum ? this.currentFlowTypeNum : 0,
            };
            this.$api.getNotice(data, {
              onSucess: (res) => {
                if (res.data.data.datas.length == 0) {
                  this.isEmptyPage = true;
                } else {
                  this.unreadWorkNum = res.data.data.rowCount;
                  this.unreadWorkItems = res.data.data.datas;
                }
              },
            });
          }
        },
      });
    },

    //鍒犻櫎宸ヤ綔浜嬮」
    deleteWorkItem(id, index, val) {
      this.$confirm("鍒犻櫎鍚庢棤娉曟仮澶嶏紝纭畾鍒犻櫎鍚楋紵", "鎻愮ず", {
        confirmButtonText: "纭畾",
        cancelButtonText: "鍙栨秷",
        type: "warning",
      })
        .then(() => {
          this.$api.deleteNotice(id, {
            onSucess: (res) => {
              if (res.data.status == 1) {
                this.$notify({
                  title: "鍒犻櫎鎴愬姛!",
                  message: "",
                  type: "sucess",
                });
                if (val == "isUnread") {
                  this.$api.getNotice(
                    {
                      readStatus: 0,
                      type: 0,
                    },
                    {
                      onSucess: (res) => {
                        if (res.data.data.datas.length == 0) {
                          this.isEmptyPage = true;
                        } else {
                          this.unreadWorkNum = res.data.data.rowCount;
                          this.unreadWorkItems = res.data.data.datas;
                        }
                      },
                    }
                  );
                } else if (val == "isHaveRead") {
                  this.allNotice.splice(index, 1);
                  if (this.allNotice.length <= 0) {
                    this.allIsEmptyPage = true;
                  }
                }
              }
            },
          });
        })
        .catch(() => {});
    },

    //宸ヤ綔浜嬮」
    labelSwitch(val) {
      this.labelSwitchVal = val;
      //this.currentFlowType = '';
      if (val == "first") {
        this.flowType = "first";
        this.readStatus = 0;
        let type = 0;
        let data = {
          readStatus: 0,
          type: this.currentFlowTypeNum ? this.currentFlowTypeNum : 0,
        };
        this.$api.getNotice(data, {
          onSucess: (res) => {
            if (res.data.data.datas.length == 0) {
              this.isEmptyPage = true;
            } else {
              this.isEmptyPage = false;
              this.unreadWorkNum = res.data.data.rowCount;
              this.unreadWorkItems = res.data.data.datas;
            }
          },
        });
      } else if (val == "second") {
        this.flowType = "second";
        let readStatus = "";
        let type = 0;
        let data = {
          readStatus: "",
          type: this.currentFlowTypeNum ? this.currentFlowTypeNum : 0,
        };

        this.$api.getNotice(data, {
          onSucess: (res) => {
            this.allNoticeNum = res.data.data.rowCount;
            this.allNotice = res.data.data.datas;
            if (res.data.data.datas.length <= 0) {
              this.allIsEmptyPage = true;
            } else {
              this.allIsEmptyPage = false;
            }
            this.$forceUpdate();
          },
        });
      }
    },
    //鍥炲
    doComment(toUser, toUserId, messageId, toContent, index) {
      let newData =
        encodeURIComponent("content.toUser") +
        "=" +
        encodeURIComponent(this.replyToUser ? this.replyToUser : toUser) +
        "&" +
        encodeURIComponent("content.toUserId") +
        "=" +
        encodeURIComponent(this.replyToUserId ? this.replyToUserId : toUserId) +
        "&" +
        encodeURIComponent("content.messageId") +
        "=" +
        encodeURIComponent(
          this.replyMessageId ? this.replyMessageId : messageId
        ) +
        "&" +
        encodeURIComponent("content.commentId") +
        "=" +
        encodeURIComponent(this.replyCommentId) +
        "&" +
        encodeURIComponent("toContent") +
        "=" +
        encodeURIComponent(
          this.replyTocontent ? this.replyTocontent : toContent
        ) +
        "&" +
        encodeURIComponent("content.content") +
        "=" +
        encodeURIComponent(this.tabpanelComment) +
        "&" +
        encodeURIComponent("content.attachment") +
        "=" +
        encodeURIComponent("");
      this.$api.doComment(newData, {
        onSucess: (res) => {
          if (res.data.status == 1) {
            this.messagesList[
              this.currentIndex ? this.currentIndex : index
            ].replayData.unshift(res.data.data);
            this.$forceUpdate();
            this.replyToUser = "";
            this.replyToUserId = "";
            this.replyMessageId = "";
            this.replyCommentId = "";
            this.replyTocontent = "";
            this.tabpanelComment = "";
          }
        },
      });
    },
    //璇勮鍥炲
    replyToComment(toUser, toUserId, messageId, id, content, index) {
      this.tabpanelComment = "鍥炲 @" + toUser + " ";
      this.replyToUser = toUser;
      this.replyToUserId = toUserId;
      this.replyMessageId = messageId;
      this.replyCommentId = id;
      this.replyTocontent = content;
      this.currentIndex = index;
    },

    //灞曠ず璇勮鍖�
    showComments(index, id) {
      if (this.currentArray.indexOf(index) > -1) {
        for (let i = 0; i < this.currentArray.length; i++) {
          if (index == this.currentArray[i]) {
            this.currentArray.splice(i, 1);
            return;
          }
        }
      } else {
        this.currentArray.push(index);
        this.$api.getMessagesReplay(id, {
          onSucess: (res) => {
            this.messagesList[index].replayData = res.data.data.datas;
            this.$forceUpdate();
          },
        });
      }
    },
    //涓婁紶鏂囦欢
    uploadFile(e) {
      let fileArray = e.file;
      let file = fileArray;
      let that = this;
      let form = new FormData();
      let id = "WU_FILE_0",
        name = e.file.name,
        type = e.file.type,
        lastModifiedDate = e.file.lastModifiedDate,
        size = e.file.size;
      form.append("id", id);
      form.append("name", name);
      form.append("type", type);
      form.append("lastModifiedDate", lastModifiedDate);
      form.append("size", size);
      form.append("file", file);
      this.$api.messageUploadFile(form, {
        onSucess: (res) => {
          let obj = {
            extName: res.data.extName,
            id: res.data.id,
            size: res.data.size,
            type: res.data.type,
            name: res.data.name,

            url: res.data.url,
          };
          this.fileList.push(obj);
        },
      });
    },

    getDeptData() {
      let nodes = this.$refs.deptTree.getCheckedNodes();
      let dept = [];
      let name = [];
      let deptIdArray = [];
      if (nodes && nodes.length > 0) {
        for (let i = 0; i < nodes.length; i++) {
          let obj = {};
          obj.deptId = nodes[i].id;
          obj.deptName = nodes[i].name;
          name += nodes[i].name + ";";
          dept.push(obj);
          deptIdArray.push(nodes[i].id);
        }
        this.defaultCheckedKeys = deptIdArray;
        // this.$refs.deptTree.setCheckedKeys(deptIdArray);
        if (this.isSendRange) {
          this.sendRangeName = name;
          this.sendRangeList = dept;
        } else {
          this.recipient = name;
          this.selectDeptList = dept;
        }
      }

      this.Receivedby = false;
    },

    loadNodeDept(node, resolve) {
      let appid = this.$root.appid;
      if (node.level === 0) {
        API.getDepartmentsByParentId(appid, "", {
          onSucess: function (response) {
            resolve(response.data.data);
          },
        });
      } else {
        API.getDepartmentsByParentId(appid, node.key, {
          onSucess: function (response) {
            resolve(response.data.data);
          },
        });
      }
    },

    //鍙戦€佸叕鍛婇噷闈㈢殑鍔犲彿寮规
    PlusSign(val) {
      if (val) {
        this.isSendRange = true;
      } else {
        this.isSendRange = "";
      }
      this.$api.getAllDeptList({
        onSucess: (res) => {
          this.deptList = res.data.data;
        },
      });
      this.Receivedby = true;
    },
    //鎶婅幏鍙栧埌鐨勬暟鎹斁鍒版帴鍙椾汉閲岄潰鍘�
    Receivethetitle(event) {
      this.recipient = event.name;
    },
    Sendthescope(event) {
      this.msgsubmit = event.name;
    },

    updateData(event) {
      this.textarea = event;
      // console.log("event--->",event);
      this.currentWordCount = event.length;
      this.wordsRemaining = 10000 - event.length;
    },

    eduirelease() {
      let that = this;
      if (this.headline.length == 0) {
        this.$message({
          message: "鏍囬涓嶈兘涓虹┖!",
          type: "warning",
        });
      } else if (this.recipient.length == 0) {
        this.$message({
          message: "鎺ユ敹浜轰笉鑳戒负绌�!",
          type: "warning",
        });
      } else if (this.category.length == 0) {
        this.$message({
          message: "鍒嗙被涓嶈兘涓虹┖!",
          type: "warning",
        });
      } else if (this.textarea.length == 0) {
        this.$message({
          message: "鍐呭涓嶈兘涓虹┖!",
          type: "warning",
        });
      } else {
        let userData = {
          user: [],
          dept: this.selectDeptList,
        };
        let newData =
          encodeURIComponent("content.title") +
          "=" +
          encodeURIComponent(this.headline) +
          "&" +
          encodeURIComponent("content.category") +
          "=" +
          encodeURIComponent(this.category) +
          "&" +
          encodeURIComponent("content.content") +
          "=" +
          encodeURIComponent(this.textarea) +
          "&" +
          encodeURIComponent("content.attachment") +
          "=" +
          encodeURIComponent("") +
          "&" +
          encodeURIComponent("content.scope") +
          "=" +
          encodeURIComponent(2) +
          "&" +
          encodeURIComponent("receiverInfo") +
          "=" +
          encodeURIComponent(JSON.stringify(userData)) +
          "&" +
          encodeURIComponent("content.type") +
          "=" +
          encodeURIComponent(1) +
          "&" +
          encodeURIComponent("content.sticky") +
          "=" +
          encodeURIComponent(this.otherSettings);
        this.loading = true;
        this.$api.makeAnnouncement(newData, {
          onSucess: (res) => {
            if (res.data.status == 1) {
              this.otherSettings = false;
              that.getMessagesList();
              that.centerDialogVisible = false;
              that.$notify({
                title: res.data.message,
                message: "",
                type: "success",
              });
              this.$api.getAnnouncement({
                onSucess: (res) => {
                  this.announcementList = res.data.data.datas;
                },
              });
            } else {
              that.centerDialogVisible = false;
              that.$notify({
                title: "鍙戝竷澶辫触",
                message: "",
                type: "error",
              });
            }
            this.loading = false;
          },
        });
        this.headline = "";
        this.recipient = "";
        this.textarea = "";
      }
    },
    tabpanelInput() {
      let txtVal = this.tabpanelComment.length;
      this.Howmanywords = 140 - txtVal;
    },
    eduiInput() {
      let txtVal = this.textarea.length;
      this.eduisubtract = 10000 - txtVal;
      this.eduiPlus = 0 + txtVal;
    },
    descInput() {
      let txtVal = this.information.length;
      this.remnant = 140 - txtVal;
    },
    handleRemove(file, fileList) {
      let fl = this.fileList;
      if (fl && fl.length > 0) {
        for (let i = 0; i < fl.length; i++) {
          if (file.id == fl[i].id) {
            fl.splice(i, 1);
            break;
          }
        }
      }
      this.fileList = fl;
    },
    handlePreview(file) {
      let params = {
        id: file.id,
        extName: file.extName,
        url: file.url,
        _: new Date().getTime(),
      };
      this.$api.getPreview(params, {
        onSucess: (res) => {
          if (res.data.status === 1) {
            // console.log("file--->",file);
            let fileName = file.id + file.extName;
            let url =
              this.obpmConfig.obpmFilePath +
              "/message/pdfviewer.html?fileName=" +
              fileName +
              "&path=" +
              file.url +
              "&showName=" +
              encodeURI(file.name) +
              "&fileType=" +
              file.extName;
            let URL = encodeURI(url);
            window.open(URL);
          }
        },
      });
    },
    handleExceed(files) {
      this.$message.warning(
        `褰撳墠闄愬埗閫夋嫨 3 涓枃浠讹紝鏈閫夋嫨浜� ${files.length} 涓枃浠讹紝鍏遍€夋嫨浜� ${files.length} 涓枃浠禶
      );
    },
    beforeRemove(file) {
      return this.$confirm(`纭畾绉婚櫎 ${file.name}锛焋);
    },
    //閲嶇疆鍙戦€佽寖鍥寸殑杈撳叆妗�
    minus() {
      this.sendRangeName = "";
    },
    eduiminus() {
      // console.log("this.recipient-->",this.recipient);
      // console.log("this.selectDeptList-->",this.selectDeptList);
      this.recipient = "";
      this.selectDeptList = "";
    },
    adhibition() {
      let that = this;
      if (!this.information) {
        this.$message({
          message: "鍐呭涓嶈兘涓虹┖!",
          type: "warning",
        });
      } else if (!this.sendRangeName) {
        this.$message({
          message: "鍙戦€佽寖鍥翠笉鑳戒负绌�!",
          type: "warning",
        });
      } else {
        let userData = {
          user: [],
          dept: this.sendRangeList,
        };
        let newData =
          encodeURIComponent("content.content") +
          "=" +
          encodeURIComponent(this.information) +
          "&" +
          encodeURIComponent("content.attachment") +
          "=" +
          encodeURIComponent(JSON.stringify(this.fileList)) +
          "&" +
          encodeURIComponent("content.scope") +
          "=" +
          encodeURIComponent(2) +
          "&" +
          encodeURIComponent("receiverInfo") +
          "=" +
          encodeURIComponent(JSON.stringify(userData)) +
          "&" +
          encodeURIComponent("content.type") +
          "=" +
          encodeURIComponent(0);
        // console.log('fileList==>',this.fileList)
        // console.log('newData==>',newData)
        this.$api.annouce(newData, {
          onSucess: (res) => {
            if (res.data.status == 1) {
              this.information = "";
              this.sendRangeName = "";
              this.sendRangeList = [];
              this.getMessagesList();
              that.$notify({
                title: res.data.message,
                message: "",
                type: "success",
              });
            }
          },
        });
      }
    },
    //鑾峰彇浼佷笟鍔ㄦ€佸叕鍛婂拰璇勮
    getMessagesList() {
      this.$api.getMessagesList({
        onSucess: (res) => {
          this.messagesListNum = res.data.data.rowCount;
          //this.messagesList = res.data.data.datas;
          let newData = res.data.data.datas.map((item) => {
            return {
              attachment: item.attachment,
              comment: item.comment,
              commentCount: item.commentCount,
              content: this.getEmot(item.content),
              createTime: item.createTime,
              id: item.id,
              module: item.module,
              receiverDeptId: item.receiverDeptId,
              receiverId: item.receiverId,
              receiverInfo: item.receiverInfo,
              scope: item.scope,
              sender: item.sender,
              senderDept: item.senderDept,
              senderDeptId: item.senderDeptId,
              senderId: item.senderId,
              sticky: item.sticky,
              title: item.title,
              type: item.type,
            };
          });
          this.messagesList = newData;
        },
      });
    },
    getEmot(val) {
      //   eplaceFace聽:聽function(str){
      // 聽聽聽聽if(str聽&&聽str聽!=聽undefined){
      // 聽聽聽聽聽聽let聽re聽=聽/\[.[^[]*\]/g;
      // 聽聽聽聽聽聽let聽faceArr聽=聽str.match(re);
      // 聽聽聽聽聽聽if(faceArr聽!=聽null聽&&聽faceArr.length聽>聽0){
      // 聽聽聽聽聽聽聽聽for(let聽i聽=聽0;聽i聽<聽faceArr.length;聽i++){
      // 聽聽聽聽聽聽聽聽聽聽let聽fileName聽=聽Message.Util.cache.mapping["face_"+faceArr[i]];
      // 聽聽聽聽聽聽聽聽聽聽str聽=聽str.replace(faceArr[i],'<img聽src="img/face/'+fileName+'"聽border="0"聽/>');
      // 聽聽聽聽聽聽聽聽}
      // 聽聽聽聽聽聽}
      // 聽聽聽聽聽聽return聽str;
      // 聽聽聽聽}
      // 聽聽},
      let value = val;
      let emo = "";
      for (let i = 0; i < this.emotionList.length; i++) {
        //value = value.replace(this.emotionList[i].type,'<img聽src="obpm/message/img/face/ad_new0902_thumb.gif"聽/>');

        value = value.replace(
          this.emotionList[i].type,
          this.emotionList[i].path
        );
        // console.log("value.--->",value)
      }
      return value;
    },

    timeAgo(dateTimeStamp) {
      const minute = 1000 * 60;
      const hour = minute * 60;
      const day = hour * 24;
      const halfamonth = day * 15;
      const month = day * 30;
      let time = "";
      if (dateTimeStamp == undefined) {
        return false;
      } else {
        dateTimeStamp = dateTimeStamp.replace(/\-/g, "/");
        let sTime = new Date(dateTimeStamp).getTime(); //鎶婃椂闂磒retime鐨勫€艰浆涓烘椂闂存埑
        let now = new Date().getTime(); //鑾峰彇褰撳墠鏃堕棿鐨勬椂闂存埑
        let diffValue = now - sTime;
        if (diffValue < 0) {
          console.log("缁撴潫鏃ユ湡涓嶈兘灏忎簬寮€濮嬫棩鏈燂紒");
        }
        let monthC = diffValue / month;
        let weekC = diffValue / (7 * day);
        let dayC = diffValue / day;
        let hourC = diffValue / hour;
        let minC = diffValue / minute;
        if (monthC >= 1) {
          time = parseInt(monthC) + "涓湀鍓�";
        } else if (weekC >= 1) {
          time = parseInt(weekC) + "鍛ㄥ墠";
        } else if (dayC >= 1) {
          time = parseInt(dayC) + "澶╁墠";
        } else if (hourC >= 1) {
          time = parseInt(hourC) + "涓皬鏃跺墠";
        } else if (minC >= 1) {
          time = parseInt(minC) + "鍒嗛挓鍓�";
        } else {
          time = "鍒氬垰";
        }
      }
      return time;
    },
  },
};
</script>
<style lang="scss">
.information {
  em,
  b,
  i {
    font-style: normal;
  }
  .ADContainer {
    height: 100%;
    .adTop {
      background: #fff;
      padding: 24px;
      display: flex;
      .title {
        flex: 1;
        font-size: 18px;
      }
    }
    .adlist {
      background: #fff;
      // height: 670px;
      max-height: calc(100% - 80px);
      overflow: auto;
      ul {
        list-style: none;
        padding: 24px;
        display: flex;

        flex-wrap: wrap;
        justify-content: space-between;
        li {
          border: 1px solid #e9e9e9;
          border-radius: 5px;
          padding: 16px;
          width: 49%;
          margin-bottom: 16px;
          display: flex;
          flex-direction: column;
          position: relative;
          .title {
            color: #1e263c;
            font-size: 14px;
            height: 20px;
            overflow: hidden;
            text-overflow: ellipsis;
            white-space: nowrap;
            width: 80%;
            cursor: pointer;
            em {
              background: #ff2855;
              border-radius: 4px;
              color: #fff;
              margin-left: 10px;
              font-size: 12px;
              padding: 5px;
            }
          }
          .content {
            color: #808191;
            font-size: 14px;
            margin: 4px 0 8px;
            height: 20px;
            overflow: hidden;
            text-overflow: ellipsis;
            white-space: nowrap;
          }
          .DateInfo {
            color: #9fa0a3;
            font-size: 10px;
            i {
              margin-right: 8px;
            }
          }
          .closebtn {
            position: absolute;
            top: 8px;
            right: 8px;
            cursor: pointer;
          }
        }
      }
      .adlistmore {
        text-align: center;
        color: #808191;
        font-size: 14px;
      }
      .adlistnodata {
        text-align: center;
        color: #808191;
        font-size: 14px;
      }
    }
  }

  .ADContainerDetail {
    .DetailTop {
      background: #fff;
      padding: 24px;
      display: flex;
    }
    .AdDetailContent {
      display: flex;
      flex-direction: column;
      padding: 24px;
      .title {
        text-align: center;
        padding: 10px 0px 10px 20px;
        color: #000;
      }
      .dateinfo {
        color: #999999;
        display: flex;
        justify-content: center;
        i {
          margin-right: 30px;
        }
      }
      .content {
        border-top: 1px solid #eeeeee;
        padding: 10px 0;
        margin-top: 10px;
        height: 580px;
        overflow: auto;
      }
    }
  }
}
</style>