<template>
  <!-- 用户信息 -->
  <div class="userinfo">
    <swiper-tools :notice-list="noticeList" :title-list="titleList"></swiper-tools>
  </div>
</template>

<script>
import SwiperTools from "./SwiperTools"
import {HttpResetClass} from "vue-client";
export default {
  name: "Userinfo",
  components:{
    SwiperTools
  },
  data(){
    return{
      noticeList:[],
      titleList:{
        date: '派单时间',
        name:'用户姓名',
        orderType:'工单类型',
        address:'用户地址',
        receptionist:'话务员',
        state:'工单状态'
      }
    }
  },
  props:['filialeId'],
  methods:{
    getworkuser(){
      let http = new HttpResetClass()
      http.load('post','rs/logic/Workorderinformation',{
        data: {
          f_orgid: this.filialeId?this.filialeId:23145 // 分公司id
        }
      },{rejectMsg:null,resolveMsg:null}).then((ress)=>{
        console.log("getworkuser"+JSON.stringify(ress.data))
        this.noticeList = ress.data.data
        console.log("this.noticeList"+JSON.stringify(this.noticeList))
      })
    }
  },
  ready(){
    this.getworkuser()
    setInterval(() => {
      this.getworkuser()
    }, 300000)
  },
  watch: {
    'filialeId'(val){
      console.log("filialeId>>>=====",val)
      this.getworkuser()
    }
  }
}
</script>

<style lang="less" scoped>
.userinfo {
  width: 71.40625vw;
  height: 28.426vh;
  background: rgba(255, 255, 255, .04);
  position: absolute;
  right: 1.09375vw;
  bottom: 3.889vh;
  padding: 0 1vw;
}
</style>
