<template>
  <div class="all-box">
    <div class="home-dialog">
      <el-dialog
      style=""
      top="0"
      title="系统通知"
      :visible.sync="dialogVisible"
      width="30%">
        <el-tabs v-model="activeName" type="card" @tab-click="handleClick">
          <el-tab-pane v-for="(msgitem,index) in msgtype" :key="index" :label="msgitem.id+''" :name="msgitem.name">
            <span slot="label">
              {{ msgitem.name }}
              <el-badge :hidden="msgitem.unReadCount==0?true:false" :value="msgitem.unReadCount" :max="9999"></el-badge>
            </span>
          </el-tab-pane>
          <div class="msg-box">
            <div class="read-btn">
              <el-button type="primary" @click="taskclicks(2)"  size="mini" :plain="tasknobtn" >未读</el-button>
              <el-button type="primary" @click="taskclicks(3)" size="mini" :plain="taskbtn" >已读</el-button>
            </div>
            <div class="scroll-box">
              <div class="news-box" v-for="(item,index) in msglist" :key="index">
                <div class="news-box-list">
                  <div class="news-list-hade">
                    <div v-if="type==1021">系统通知</div>
                    <div v-if="type!=1021">{{item.title}}</div>
                    <div v-if="type!=1021">所属部门: {{item.issuerDep}}</div>
                  </div>
                  <div class="news-list-content" v-html="item.content">
                  </div>
                  <div class="news-list-posts">
                    <div v-if="type==1020">发布人: {{item.issuerUser}}</div>
                    <div v-if="type==1020">发布时间: {{item.releaseTime}}</div>
                    <div v-if="type!=1020">发送时间: {{item.releaseTime}}</div>
                  </div>
                  <div v-if="type==1020" class="news-list-btn" >
                    <el-button @click="DeleMsg(index,item)" size="mini" v-if="item.isRead==0" type="primary">前往任务</el-button>
                    <el-button v-if="item.isRead==1" size="mini" type="info">已读任务</el-button>
                  </div>
                  <div v-else class="news-list-btn" >
                    <el-button @click="DeleMsg(index,item)" size="mini" v-if="item.isRead==0" type="primary">确认已读</el-button>
                    <el-button v-if="item.isRead==1" size="mini" type="info">已读</el-button>
                  </div>
                </div>
              </div>
              <div v-if="count>10&&msglist.length<count" class="loadmore">
                <el-button @click="loadadd" size="mini">加载更多</el-button>
              </div>
              <el-divider v-if="msglist.length>=count" style="">没有更多了！</el-divider>
            </div>
          </div>
        </el-tabs>
      </el-dialog>
    </div>
    <div class="gpt-dialog">
      <el-dialog top="3vh" width="1600px" title="请自行用手机号注册即可使用" :visible.sync="gptdialog">
        <iframe src="https://kimi.moonshot.cn" width="100%" height="800px"></iframe>
      </el-dialog>
    </div>
    <el-container class="all">
      <el-aside class="delwh menubar">
        <div  ref="haeds" class="user">
          <div class="user-box">
            <div class="user-img">
              <img src="../assets/logo2.png" />
            </div>
            <div v-if="panduan" class="user-text">
              泛美国际 - AI智能办公系统
            </div>
          </div>
        </div>
        <div ref="avatarhaeds" class="avatar-box">
          <div class="nei-avatar">
            <div class="avatar">
              <div class="avatar-img">
                <img v-if="sex==1" src="../assets/nv.png" alt="" />
                <img v-else src="../assets/nan.png" alt="" />
              </div>
              <div v-if="panduan" class="avatar-text">
                <div class="avatar-name">员工: {{ userinif.userInfo.cnName }}</div>
                <div class="avatar-division">职位: {{ userinif.userInfo.jobName }}</div>
                <div>部门: {{ userinif.userInfo.depName }}</div>
              </div>
            </div>
          </div>
        </div>
        <el-menu :style="gaodu" :default-active="indexs" class="el-menu-vertical-demo meun-ul" @open="handleOpen" @close="handleClose"
          :collapse="isCollapse">
          <el-menu-item v-for="(item, filindex) in filmenuList" :key="filindex + '/'"
            :index="item.modulid + '-' + item.pageList[0].pageid" @click="toURLs($event.index, item)">
            <i :class="iconfont+item.remark"></i>
            <span slot="title">{{ item.pageList[0].pageName }}</span>
          </el-menu-item>
          <el-submenu v-for="(item, index) in filmenuLists" :key="index" :index='item.modulid + ""'
            @click="toURL($event.index)">
            <template slot="title">
              <i :class="iconfont+item.remark"></i>
              <span>{{ item.modulName }}</span>
            </template>
            <el-menu-item-group>
              <el-menu-item @click="toURL($event.index, items)" v-for="(items, index) in item.pageList" :key="index"
                :index="items.modulid + '-' + items.pageid">{{ items.pageName }}</el-menu-item>
            </el-menu-item-group>
          </el-submenu>
        </el-menu>
      </el-aside>
      <el-container>
        <el-header>
          <div class="btnradio">
            <el-radio-group v-model="isCollapse" @change="radioChange($event)">
              <el-radio-button class="radiobox" :label="false"><span
                  class="iconfont icon-caidanzhankai icon"></span></el-radio-button>
              <el-radio-button class="radiobox" :label="true"><span
                  class="iconfont icon-caidanshouqi icon"></span></el-radio-button>
            </el-radio-group>
            <div class="header-title">首页</div>
          </div>
          <div class="name-box">
            <div class="instrument" @click="instrumentclick('.instrument-box', $event)">
              <i class="iconfont icon-shiyonggongju"></i>
            </div>
            <div class="message">
              <el-badge :value="unReadCount" class="item">
                <i class="iconfont icon-tongzhi" @click="dialogVisible= true"></i>
              </el-badge>
            </div>
            <div class="user-inif" @click="instrumentclick('.user-operate', $event)">
              <div class="user-inifs">
                <img v-if="sex==1" src="../assets/nv.png" alt="" />
                <img v-else src="../assets/nan.png" alt="" />
              </div>
            </div>
          </div>
          <div class="instrument-box">
            <div class="instrument-box-title">实用工具</div>
            <div class="instrument-box-inif">
              <div class="box-inif-ul">
                <div @click="gptdialog = true"  class="box-inif-li">
                  <div class="inif-li-img">
                    <img src="../assets/QuNaEr.jpg" alt="" />
                  </div>
                  <div class="inif-li-text">KIMI</div>
                </div>
                <div @click="opengpt" class="box-inif-li">
                  <div class="inif-li-img">
                    <img src="../assets/QuNaEr.jpg" alt="" />
                  </div>
                  <div class="inif-li-text">GPT</div>
                </div>
                <!-- <div class="box-inif-li">
                  <div class="inif-li-img">
                    <img src="../assets/QuNaEr.jpg" alt="" />
                  </div>
                  <div class="inif-li-text">去哪儿</div>
                </div>
                <div class="box-inif-li">
                  <div class="inif-li-img">
                    <img src="../assets/QuNaEr.jpg" alt="" />
                  </div>
                  <div class="inif-li-text">去哪儿</div>
                </div>
                <div class="box-inif-li">
                  <div class="inif-li-img">
                    <img src="../assets/QuNaEr.jpg" alt="" />
                  </div>
                  <div class="inif-li-text">去哪儿</div>
                </div>
                <div class="box-inif-li">
                  <div class="inif-li-img">
                    <img src="../assets/QuNaEr.jpg" alt="" />
                  </div>
                  <div class="inif-li-text">去哪儿</div>
                </div>
                <div class="box-inif-li">
                  <div class="inif-li-img">
                    <img src="../assets/QuNaEr.jpg" alt="" />
                  </div>
                  <div class="inif-li-text">去哪儿</div>
                </div>
                <div class="box-inif-li">
                  <div class="inif-li-img">
                    <img src="../assets/QuNaEr.jpg" alt="" />
                  </div>
                  <div class="inif-li-text">去哪儿</div>
                </div>
                <div class="box-inif-li">
                  <div class="inif-li-img">
                    <img src="../assets/QuNaEr.jpg" alt="" />
                  </div>
                  <div class="inif-li-text">去哪儿</div>
                </div>
                <div class="box-inif-li">
                  <div class="inif-li-img">
                    <img src="../assets/QuNaEr.jpg" alt="" />
                  </div>
                  <div class="inif-li-text">去哪儿</div>
                </div>
                <div class="box-inif-li">
                  <div class="inif-li-img">
                    <img src="../assets/QuNaEr.jpg" alt="" />
                  </div>
                  <div class="inif-li-text">去哪儿</div>
                </div> -->
              </div>
            </div>
          </div>
          <div class="user-operate">
            <div class="operate-title">
              <div class="avatar">
                <div class="avatar-img">
                  <img v-if="sex==1" src="../assets/nv.png" alt="" />
                  <img v-else src="../assets/nan.png" alt="" />
                </div>
                <div class="avatar-text">
                  <div class="avatar-name">姓名:{{ userinif.userInfo.cnName }} 部门: {{ userinif.userInfo.depName }}</div>
                  <div class="avatar-division">职位: {{ userinif.userInfo.jobName }}</div>
                </div>
              </div>
            </div>
            <div class="operate-ul">
              <!-- <div class="operate-li">全屏</div>
              <div class="operate-li">修改密码</div>
              <div class="operate-li">个人资料</div> -->
              <div @click="logOut()" class="operate-li">退出</div>
            </div>
          </div>
        </el-header>
        <el-main>
          <keep-alive>
            <router-view v-if="$route.meta.keepAlive"/>
          </keep-alive>
          <router-view v-if="!$route.meta.keepAlive" /> 
        </el-main>
      </el-container>
    </el-container>
  </div>
</template>
<script>
//import * as signalR from "@aspnet/signalr";
// const signalR=require('@microsoft/signalr')
// import * as signalR from "@microsoft/signalr";
// import * as signalR from "../../node_modules/microso";
// import child from '~/components/Finance/FeesPage';
// const signalR=require('@microsoft/signalr')
 
export default {
  data() {
    return {
      userId:'',
      token:'',
      menuList: [],
      isCollapse: false,
      panduan: "",
      username: "雷怡",
      indexs: "1",
      pdinstrument: true,
      userinif: '',
      dialogVisible: false ,
      newstasklist:[],
      newsgrouplist:[],
      activeName: '',
      tasknot:0,//任务未读条数
      groupnot:0,//团组未读条数
      tasknotlist:[],//任务未读
      taskReadlist:[],//任务以读
      groupnotlist:[],//团组未读
      groupReadlist:[],//团组以读
      taskbtn:true,//plain任务已读
      tasknobtn:false,//plain任务未读
      groupbtn:true,//plain团组已读
      groupnobtn:true,//plain团组未读
      unReadCount:0,//未读总条数
      msgtype:[],//未读总条数
      pageIndex:1,//页码
      pageSize:10,//条数
      type:0,//类型
      readStatus:2,//状态
      msglist:[],//list
      count:0,//list数量
      panduans:false,
      iconfont:'iconfont ',
      gaodu:'',
      gptdialog:false,
      sex:0
    };
  },
  // components: {
  //   child
  // },
  methods: {
    handleOpen(key, keyPath) {
      console.log(key, keyPath);
    },
    handleClose(key, keyPath) {
      console.log(key, keyPath);
    },
    //移除element行内样式
    removal() {
      document.querySelector(".menubar").style.height = window.innerHeight + "px";
      document.querySelector(".all").style.height = window.innerHeight + "px";
      document.querySelector(".delwh").style.width = "";
      document.querySelector(".meun-ul").style.height=(window.innerHeight-(this.$refs.haeds.offsetHeight+this.$refs.avatarhaeds.offsetHeight))+'px';
      console.log(window.innerHeight-(this.$refs.haeds.offsetHeight+this.$refs.avatarhaeds.offsetHeight))
    },
    toURLs(val, item) {
      console.log(val)
      console.log(item)
      localStorage.setItem("indexs", val);
      localStorage.setItem("innhtml", item.pageList[0].pageName);
      localStorage.setItem("Permissions", JSON.stringify(item.pageAuth));
      this.$router.push({ path: "/home" + item.pageList[0].webUrl });
      document.querySelector(".header-title").innerHTML = item.pageList[0].pageName;
    },
    toURL(val, item) {
      console.log(val)
      console.log(item)
      localStorage.setItem("indexs", val);
      localStorage.setItem("innhtml", item.pageName);
      localStorage.setItem("Permissions", JSON.stringify(item.pageAuth));
      this.$router.push({ path: "/home" + item.webUrl });
      document.querySelector(".header-title").innerHTML = item.pageName;
    },
    //打开gpt
    opengpt(){
      window.open('https://chat.openai.com')
    },
    
    radioChange(val) {
      this.gaodu='height:'+ (window.innerHeight-(this.$refs.haeds.offsetHeight+this.$refs.avatarhaeds.offsetHeight))+'px'
      var radiobox = document.querySelectorAll(".radiobox");
      if (val == true) {
        this.panduan = false;
        document.querySelector(".user-text").style.display = "none";
        document.querySelector(".avatar-text").style.display = "none";
        radiobox[1].style.display = "none";
        radiobox[0].style.display = "inline-block";
      } else if (val == false) {
        this.panduan = true;
        radiobox[1].style.display = "inline-block";
        radiobox[0].style.display = "none";
      }
    },
    ifIndexValue() {
      this.indexs = localStorage.getItem('indexs');
      document.querySelector(".header-title").innerHTML = localStorage.getItem('innhtml');
      console.log(this.indexs)
    },
    //实用工具
    instrumentclick(val, evt) {
      if (document.querySelector(val).style.top != "60px") {
        evt.currentTarget.style.backgroundImage = "linear-gradient(rgba(29,33,41,.03),rgba(29,33,41,.1))";
        evt.currentTarget.firstElementChild.style.color = "#666";
        document.querySelector(val).style.top = 60 + "px";
      } else {
        evt.currentTarget.style.backgroundImage = "";
        evt.currentTarget.firstElementChild.style.color = "";
        document.querySelector(val).style.top = -570 + "px";
      }
    },
    getmenu() {
      this.menuList = JSON.parse(localStorage.getItem('userinif')).authData;
      console.log(this.menuList)
    },
    //登出
    logOut() {
      this.$confirm('此操作将退出此账号, 是否继续?', '提示', {
        confirmButtonText: '确定',
        cancelButtonText: '取消',
        type: 'warning'
      }).then(() => {
        this.$router.push({ name: 'Login' })
        localStorage.clear();
        this.$message({
          type: 'success',
          message: '已退出!'
        });
      }).catch(() => {
        this.$message({
          type: 'info',
          message: '已取消退出'
        });
      });
      // this.$router.push({name:'Login'})
      // localStorage.clear();
    },
    fatherMethod() {
      console.log('测试');
    },
    handleClick(tab, event) {
      this.pageIndex=1;
      this.pageSize=10;
      this.msglist=[];
      this.type=Number(tab.label);
      this.PotsMessagePageList();
    },
    //已读未读切换
    taskclicks(val){
      if(val==2){
        this.tasknobtn=false;
        this.taskbtn=true;
      }else{
        this.tasknobtn=true;
        this.taskbtn=false;
      }
      this.readStatus=val;
      this.pageIndex=1;
      this.pageSize=10;
      this.msglist=[];
      this.PotsMessagePageList();
    },
    //加载更多
    loadadd(){
      this.pageIndex++
      this.PotsMessagePageList()
    },
    //消息list
    PotsMessagePageList(){
      console.log(this.type)
      var url = "/api/System/PotsMessagePageList"
      var that = this
      this.$axios({
          method: 'post',
          url: url,
          headers: {
              Authorization: 'Bearer ' + that.token
          },
          data:{
            portType:1,
            pageIndex:that.pageIndex,
            pageSize:that.pageSize,
            type:that.type,
            userId:that.userId,
            readStatus:that.readStatus
          }
      }).then(function (res) {
          console.log(res)
          if(res.data.code==200){
            var magarr=res.data.data;
            that.count=res.data.count;
            for(let j=0;j<magarr.length;j++){
              that.msglist.push(magarr[j])
            }
          }else{
            that.$message.error(res.data.msg);
          }
      }).catch(function (error) {
          that.$message.error("获取消息列表失败！");
      });
    },
    //任务通知切换
    newstasklistclick(){
      console.log(this.newstasklist)
    },
    //消息类型
    PotsMsgTypeData(){
      this.msglist=[];
      var url = "/api/System/PotsMsgTypeData"
      var that = this
      this.$axios({
          method: 'post',
          url: url,
          headers: {
              Authorization: 'Bearer ' + that.token
          },
          data:{
            portType:1,
            userId:that.userId
          }
      }).then(function (res) {
          console.log(res)
          if(res.data.code==200){
            that.msgtype=res.data.data;
            if(!that.panduans){
              that.activeName=that.msgtype[0].name;
              that.type=that.msgtype[0].id;
            }
            that.panduans=false
            that.PotsMessagePageList()
          }else{
            that.$message.error(res.data.msg);
          }
      }).catch(function (error) {
          that.$message.error(error);
      });
    },
    //未读条数
    PotsMessageUnreadTotalCount(){
        var url = "/api/System/PotsMessageUnreadTotalCount"
        var that = this
        this.$axios({
            method: 'post',
            url: url,
            headers: {
                Authorization: 'Bearer ' + that.token
            },
            data:{
              userId:that.userId
            }
        }).then(function (res) {
            if(res.data.code==200){
              that.unReadCount=res.data.data.messageUnReadCount;
              if(that.unReadCount!=localStorage.getItem('unReadCount')){
                that.PotsMsgTypeData();
                window.localStorage.removeItem('unReadCount');
                localStorage.setItem('unReadCount', JSON.stringify(that.unReadCount));
              }else{
                console.log('没有新通知！')
              }
                // return res.data.data.unreadCount;
            }else{
                that.$message.error(res.data.msg);
            }
        }).catch(function (error) {
            that.$message.error(error);
        });
    },
    //消息确认已读
    DeleMsg(index,row){
      this.$confirm('此操作将认定你已知晓此通知?', '提示', {
        confirmButtonText: '确定',
        cancelButtonText: '取消',
        type: 'warning'
      }).then(() => {
        var url = "/api/System/SetMessageRead"
        var that = this
        this.$axios({
            method: 'post',
            url: url,
            headers: {
                Authorization: 'Bearer ' + that.token
            },
            data:{
              portType:1,
              msgId:row.id,
              userId:that.userId
            }
        }).then(function (res) {
            console.log(res)
            if(res.data.code==200){
              if(that.type==1020){
                that.$router.push({ path: "/home/TaskList"});
                that.dialogVisible=false;
              }
              that.panduans=true;
              that.PotsMsgTypeData();
              that.$message({
                type: 'success',
                message: res.data.msg
              });
            }else{
              that.$message.error(res.data.msg);
            }
        }).catch(function (error) {
            that.$message.error("确认已读失败！");
        });
        
      }).catch(() => {
        this.$message({
          type: 'info',
          message: '已取消确认已读'
        });          
      });
      console.log(index,row)
      console.log(this.type)
      
    },
    //修改未读条数
    uplocal(){
      window.localStorage.removeItem('unReadCount');
      this.unReadCount--;
      localStorage.setItem('unReadCount', JSON.stringify(this.unReadCount));
    },
    //任务切换
    taskclick(text){
      if(text=='未读'){
        this.newstasklist=this.tasknotlist
        this.tasknobtn=false;
        this.taskbtn=true;
      }else{
        this.newstasklist=this.taskReadlist
        this.tasknobtn=true;
        this.taskbtn=false;
      }
      console.log(this.newstasklist)
    },
    //团组切换
    groupclick(text){
      if(text=='未读'){
        this.newsgrouplist=this.groupnotlist
        this.groupnobtn=false;
        this.groupbtn=true;
      }else{
        this.newsgrouplist=this.groupReadlist
        this.groupnobtn=true;
        this.groupbtn=false;
      }
    },
    //消息通知
    chatHub(){
        var url = "/api/chatHub"
        var that = this
        this.$axios({
            method: 'post',
            url: url,
            headers: {
                Authorization: 'Bearer ' + that.token
            },
            data:{
              userId:that.userId
            }
        }).then(function (res) {
            console.log(res)
            if(res.data.code==200){
              
            }else{
                that.$message.error(res.data.msg);
            }
        }).catch(function (error) {
            that.$message.error("获取数据源失败！");
        });
    },

    handleClosezz(done) {
      this.$confirm('确认关闭？')
        .then(_ => {
          done();
        })
        .catch(_ => {});
    },
    setIntervaltime(){

    }
    //实时通讯
    // async startConnection() {
    //   this.connection = new signalR.HubConnectionBuilder()
    //     .withUrl('/api/chatHub') // 替换为你的SignalR服务端URL
    //     .build();
 
    //   this.connection.on('ReceiveMessage', (message) => {
    //     console.log('Received message:', message);
    //   });
 
    //   try {
    //     await this.connection.start();
    //     console.log('SignalR Connected.');
    //   } catch (err) {
    //     console.log('Error while starting SignalR connection:', err);
    //   }
    // },
    // async sendMessage() {
    //   if (this.connection) {
    //     try {
    //       await this.connection.invoke('SendMessage', 'Hello World'); // SendMessage是服务端定义的方法
    //     } catch (err) {
    //       console.error(err);
    //     }
    //   }
    // },
  },
  mounted() {
    
    // this.unReadCount=JSON.parse(localStorage.getItem('unReadCount'));
    this.removal();
    this.radioChange(false);
    this.ifIndexValue();
    this.getmenu();
    
    this.PotsMsgTypeData();

    let timer = setInterval(() => {
      this.PotsMessageUnreadTotalCount();
    }, 10000)
    this.$once('hook:beforeDestroy', () => {
      clearInterval(timer)
      timer = null
    })
    // setTimeout(this.PotsMessagePageList(),500)
    // this.setIntervaltime();
    // setInterval(this.PotsMessageUnreadTotalCount, 10000);
    // setInterval(this.PsotMsgPageList, 3000);
    // this.chatHub();
  },
  created() {
    this.userId=JSON.parse(localStorage.getItem('userinif')).userInfo.userId;
    this.sex=JSON.parse(localStorage.getItem('userinif')).userInfo.sex;
    this.token=JSON.parse(localStorage.getItem('userinif')).token;
    this.userinif = JSON.parse(localStorage.getItem('userinif'));
    this.PotsMessageUnreadTotalCount();
    
    // this.startConnection();
  },
  computed: {
    getWsMsg (){
        return this.$store.state.webSocketMsg
    },
    filmenuList: function () {
      return this.menuList.filter(function (item) {
        if (item.modulName == '主页') {
          return item
        }
      })
    },
    filmenuLists: function () {
      return this.menuList.filter(function (item) {
        if (item.modulName != '主页') {
          return item
        }
      })
    }
  },
  watch:{
    PotsMessageUnreadTotalCount:{
      handler(newVal,oldVal) {
          console.log(newVal,oldVal)
      }
    }
  }
};
</script>
<style>
*{
  font-family:"微软雅黑";
}
.all-box{
  font-family:"微软雅黑";
}
.el-menu .el-menu-item.is-active {
  color: #fff;
  background-color: rgba(0, 0, 0, 0.1);
}

body {
  margin: 0;
  padding: 0;
}

html {
  background-color: #fff;
}

.home-dialog .el-dialog{
  position: fixed;
  right: 0;
  height: 100%;
  margin: 0;
}
.el-menu-vertical-demo:not(.el-menu--collapse) {
  width: 260px;
  min-height: 400px;
}

.el-menu {
  border-right: none;
}

.delwh {
  border-right: solid 1px #e6e6e6;
  background-image: linear-gradient(270deg,
      rgba(178, 45, 226, 0.18),
      transparent);
  background-color: #0f619f;
}

.el-menu-vertical-demo {
  background-image: linear-gradient(270deg,
      rgba(178, 45, 226, 0.18),
      transparent);
  background-color: #0f619f;
}
.aligns{
  display: flex;
  justify-content: space-between;
}
.el-header {
  border-bottom: solid 1px #e6e6e6;
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: relative;
  z-index: 3;
}

.instrument-box {
  position: absolute;
  z-index: 2;
  right: 20px;
  top: -400px;
  width: 350px;
  border-radius: 5px;
  overflow: hidden;
  box-shadow: 0 0 5px #0005;
  transition: all 0.5s;
}

.instrument-box-title {
  background: linear-gradient(250deg, #3e93d6, #8a75aa);
  padding: 20px;
  text-align: center;
  color: #fff;
}

.instrument-box-inif {
  background-color: #fff;
  height: 320px;
  overflow-y: auto;
}

.box-inif-ul {
  display: flex;
  flex-wrap: wrap;
  padding: 10px;
}

.inif-li-text {
  font-size: 12px;
}

.box-inif-li {
  width: 25%;
  height: 81px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  border-radius: 50%;
  padding: 10px;
  margin: 0 3px;
  cursor: pointer;
}

.box-inif-li:hover {
  background-image: linear-gradient(rgba(29, 33, 41, 0.03),
      rgba(29, 33, 41, 0.04));
  color: #967bbd;
}

.btnradio {
  display: flex;
  align-items: center;
}
.home-dialog .el-dialog__body{
  padding: 0px 20px;
}
.name-box {
  display: flex;
  font-size: 14px;
}

.user-operate {
  position: absolute;
  z-index: 2;
  right: 20px;
  top: -300px;
  width: 310px;
  border-radius: 5px;
  overflow: hidden;
  box-shadow: 0 0 5px #0005;
  transition: all 0.5s;
}

.operate-title {
  background: linear-gradient(250deg, #3e93d6, #8a75aa);
  padding: 20px;
  text-align: center;
  color: #fff;
}

.operate-ul {
  background-color: #fff;
}

.operate-li {
  padding: 12px 24px;
  cursor: pointer;
  color: #555;
}

.operate-li:hover {
  background-image: linear-gradient(rgba(29, 33, 41, 0.03),
      rgba(29, 33, 41, 0.04));
  color: #967bbd;
}

.names {
  margin-right: 20px;
}

.quit {
  cursor: pointer;
}

.btnradio .el-radio-button:first-child .el-radio-button__inner {
  border: none;
}

.el-radio-button:last-child .el-radio-button__inner {
  border: none;
}

.icon {
  font-size: 20px;
}

.el-radio-button__inner {
  padding: 0;
}

.header-title {
  margin-left: 20px;
}

.icon-shouye {
  margin-right: 5px;
  width: 24px;
  text-align: center;
  font-size: 18px;
  vertical-align: middle;
  display: inline-block;
  font-weight: 600;
}

.icon-tongjitu {
  margin-right: 5px;
  width: 24px;
  text-align: center;
  font-size: 18px;
  vertical-align: middle;
  display: inline-block;
  font-weight: 600;
}

.user-img {
  width: 40px;
  height: 40px;
}

.user-img img {
  width: 100%;
  height: 100%;
}

.user-box {
  padding: 10px 0;
  display: flex;
  justify-content: center;
  align-items: center;
}

.user-text {
  /*margin-left: 15px;*/
  font-size: 16px;
  /*font-weight: 600;*/
  color: #fff;
}

.naem-box {
  font-size: 16px;
}

.naem-box div {
  padding-left: 20px;
}

.el-menu-vertical-demo .el-menu-item {
  color: #82c2f3;
}

.el-menu-vertical-demo .el-menu-item:focus,
.el-menu-vertical-demo .el-menu-item:hover {
  background-color: rgba(0, 0, 0, 0.1);
  color: #fff;
}

.el-menu-vertical-demo .el-menu-item i {
  color: #2595ea;
}

.avatar-box {
  height: 9.53rem;
  background-image: url("../assets/cover-2-lg.png");
  background-repeat: no-repeat;
}

.nei-avatar {
  height: 100%;
  background-color: rgba(27, 92, 164, 0.5);
  display: flex;
  justify-content: center;
  align-items: center;
  transition: all 1.5s;
}

.nei-avatar:hover {
  background-color: rgba(27, 92, 164, 0);
}

.avatar {
  display: flex;
  align-items: center;
  justify-content: center;
}

.avatar-text {
  color: #fff;
  margin-left: 15px;
  font-size: 14px;
  text-align: left;
}

.avatar-text>div {
  line-height: 24px;
}

.avatar-img {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  overflow: hidden;
}

.avatar-img img {
  width: 100%;
}

.user-inifs {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  overflow: hidden;
}

.user-inif img {
  width: 100%;
}

i.icon-shiyonggongju {
  font-size: 32px;
  color: #2198f3;
}

i.icon-tongzhi {
  font-size: 32px;
  color: #2198f3;
}

.name-box>div {
  cursor: pointer;
  margin-left: 15px;
  display: flex;
  justify-content: center;
  align-items: center;
  width: 50px;
  height: 50px;
  border-radius: 50%;
}

.name-box i:hover {
  color: #666;
}

.el-main {
  background-color: #ebf6fd;
}

.inif-li-img {
  width: 50px;
  height: 50px;
}

.inif-li-img img {
  width: 100%;
}
.meun-ul{
  overflow: auto;
}
.meun-ul::-webkit-scrollbar {
  width: 5px;
  height: 10px;
}

.meun-ul::-webkit-scrollbar-track {
  border-radius: 10px;
}

.meun-ul::-webkit-scrollbar-thumb {
  border-radius: 10px;
  box-shadow: inset 0 0 0 rgba(0, 158, 255, 0.46);
  background-color: rgba(0, 158, 255, 0.46);
}
/*消息*/ 
.news-box:last-child{
  border-bottom: 1px solid #EBEEF5;
}
.news-box:hover{
  background-color: #EBEEF5;
}
.news-box{
  border-top: 1px solid #EBEEF5;
  padding: 10px;
}
.news-list-hade{
  display: flex;
  justify-content: space-between;
  font-size:15px;
  font-weight: 600;
  margin-bottom: 15px;
}
.news-list-posts{
  text-align: right;
  margin: 10px 0;
  font-size: 15px;
  font-weight: 600;
}
.instrument-box-inif::-webkit-scrollbar {
  width: 5px;
  height: 16px;
  background-color: transparent;
}
.news-list-btn{
  text-align: right;
}
.home-dialog .el-tabs__header{
  margin-bottom: 0;
}
.read-btn{
  margin: 10px 0;
}
.read-btn .el-badge{
  margin-right: 15px;
}
.notyet{
  height: 20px;
  line-height: 20px;
  font-size: 17px;
  font-weight: 600;
  text-align: center;
}
.home-dialog .el-dialog__header{
  padding: 10px 20px;
}
.news-list-content{
  line-height: 20px;
}
.loadmore{
  margin-top: 20px;
  text-align: center;
}



/*定义滚动条轨道
    内阴影+圆角*/
.instrument-box-inif::-webkit-scrollbar-track {
  -webkit-box-shadow: inset 0 0 6px rgba(0, 0, 0, 0);
  border-radius: 10px;
  background-color: transparent;
}

/*定义滑块
    内阴影+圆角*/
.instrument-box-inif::-webkit-scrollbar-thumb {
  border-radius: 10px;
  -webkit-box-shadow: inset 0 0 6px rgba(0, 0, 0, 0.3);
  background-color: #b9bcc0;
}

.delwh .el-menu {
  background-color: #0f619f;
}

.delwh .el-submenu__title:hover,
.delwh .el-submenu__title:focus {
  background-color: rgba(0, 0, 0, 0.1);
  color: #fff;
}

.delwh .el-submenu__title {
  color: #82c2f3;
}

.delwh .el-submenu__title i {
  color: #2595ea;
}

.delwh .el-menu-item-group__title {
  padding: 0;
}

.el-menu-item-group .el-menu-item-group__title {
  padding: 0;
}
.delwh::-webkit-scrollbar {display:none}
.scroll-box{
  height: 750px;
  overflow-y: auto;
}
.scroll-box::-webkit-scrollbar {
  width: 6px;
}
.scroll-box::-webkit-scrollbar-track {
  background: rgb(239, 239, 239);
  border-radius: 2px;
}
.scroll-box::-webkit-scrollbar-thumb {
  background: #40a0ff49;
  border-radius: 10px;
}
.scroll-box::-webkit-scrollbar-thumb:hover {
  background: #40a0ff;
}
.all-box .communal-box .el-autocomplete,.el-select{
  margin-right: 0;
}
.all-box .el-table th.el-table__cell>.cell{
  text-align: center;
}
.all-box .el-table--enable-row-transition .el-table__body td.el-table__cell{
  text-align: center;
}

.gpt-dialog .el-dialog__body{
  padding: 0 20px;
  padding-bottom:10px;
}
</style>

