var vms = Vue.component("Company-amplify-rydqfb", {
template: `
{{scope.$index + 1}}
{{scope.row.name}}
{{scope.row.value}}
`,
props: {
},
data() {
return {
show:false,
tableData:[],
rowStyle:{
color:'#B6CFEF',
fontSize:'16px',
height:'54px'
},
}
},
mounted(){
},
methods: {
openAmplify(){
this.show = true
this.getAreaData()
//人员地区分布 自动滚动
this.interval = setInterval(this.scroll,50);
},
closeAmplify(){
this.show = false
},
closeAmplifyAll(e){
if(e.target.className == 'amplify-fixed'){
this.show = false
}
},
//人员地区分布
getAreaData(){
var that = this
axios.post("https://smz.makalu.cc/mkl/screenApi/getAreaData?token=00e650bb50854f54b146e83f73500ca8&deptId=123&typtDeptId="+JSON.parse(localStorage.getItem("data")).dept_id, {
}).then(res => {
that.tableData = res.data.areaDataList;
}).catch(err => {
})
},
// 表格滚动 方法 --------- 开始
scroll(){
let maxHeight=this.$refs.wgzp.$el.querySelectorAll ('.el-table__body')[0].offsetHeight;
let clientHeight=this.$refs.wgzp.bodyWrapper.clientHeight;
if(Math.abs(this.$refs.wgzp.bodyWrapper.scrollTop-(maxHeight-clientHeight))<5){ //预留5像素误差
this.$refs.wgzp.bodyWrapper.scrollTop=0;
}else{
this.$refs.wgzp.bodyWrapper.scrollTop+= 1;//32是每一行表格的高度,每秒滚一行
}
},
MouseEnter(){//鼠标移入停止滚动
clearInterval(this.interval);
},
MouseLeave(){//鼠标离开继续滚动
this.interval=setInterval(this.scroll,30);
},
},
watch:{
},
})