{
  template:'${tmpl}',
  data:function(){
      return {
        isdev:false,
        multipleSelection: [],
        developerData:[],
        problemBardata:{
          title: {
              text: '系统问题个人统计',
              left:'center'
          },
          tooltip : {
            trigger: 'axis'
          },
          legend: {
            top:10,
            data: ['','','待解决', '处理中','已解决']
          },
          calculable : true,
          xAxis:[ {
              type: 'category',
              data: []
          }],
          yAxis:  [
            {
                type : 'value',
                name : '问题个数（个）',
                axisLabel : {
                    formatter: '{value} '
                }
            }
          ],
          series: [
              {
                  name:'待解决',
                  type:'bar',
                  barWidth:20,
                  data:[]
              },
              {
                  name:'处理中',
                  type:'bar',
                  barWidth:20,
                  data:[]
              },
              {
                  name:'已解决',
                  type:'bar',
                  barWidth:20,
                  data:[]
              }
          ]
        },
      }
  },
  mounted:function(){
    setTimeout(()=>{
      var dev=this.$root.currentUser.roles.indexOf("002");
      var kfjl=this.$root.currentUser.roles.indexOf("001");
      var yfbmjl=this.$root.currentUser.roles.indexOf("003");
      if(dev>=0 || kfjl>=0 || yfbmjl>=0 || this.$root.currentUser.isAdmin){
        this.isdev=true;
        this.fetchQuestionForDev();
      }else{
        this.isdev=false;
      }
    },1500);
  },
  created:function(){
   
  },
  methods:{
    async fetchQuestionForDev(){
      var that=this;
      var obj={};
      var d=await this.$root.postReq("/web/pm/pmquestionCtl/fetchQuestionForDev",obj);
      if(d.status==0&&d.data){
        this.developerData=d.data.obj1;
        var data=this.$refs.problemBar.getEchartObj();
        if(data){
          var option = data.getOption();
          option.xAxis[0].data=d.data.obj2;
          option.series[0].data = d.data.obj3;
          option.series[1].data = d.data.obj4;
          option.series[2].data = d.data.obj5;
          data.setOption(option);
          window.addEventListener("resize",function(){
              data.resize();
          });
        }
      }
    },
    onColFormater(row,column,cellvalue,index){
       return cellvalue;
     },
    handleSelectionChange:function(val){
       this.multipleSelection = val;
       console.log(val);
     },
    onRowClick(row,key,e){
         if(key=="stopUser"){

         }
    },
    gengduo () {
      this.$alert('更多功能敬请期待', '提示', {
        confirmButtonText: '确定',
        callback: action => {
          this.$message({
            type: 'info',
            message: `action: ${ action }`
          });
        }
    });
    }

  },
  computed: Vuex.mapState({
    count:state=>state.count,
    headStyle:function(){
      return {"background-color":"white"};
    }
  }),
  vname:"gsb_roleview"
}