{
    template:'${tmpl}',
    data:function(){
      return {
        applynum:"",
        publishnum:"",
        activeIndex:"",
        datalist:{
        },
        patentvaluedata:{
          
        },
        showpatentvalue:true,
      };
    },
    created:function(){
      
    },
    methods:{
      obtainpatentvalue(){
        var that=this;
        var obj={
          applynum:this.applynum,
          publishnum:this.publishnum
        };
        this.$root.postReq("/web/patentycCtl/patentrank", obj).then(function (d){
          console.log("------------------------------------------");
          console.log(d);
          if(d.status==0){
            setTimeout(function(){
              var data = that.$refs.patentvalue.getEchartObj();
              if(data){
                var option = data.getOption();
                data.clear();
                option={
                  tooltip : {
                      formatter: "{a} : {c}%"
                  },
                  series: [
                      {
                          name: '专利价值',
                          type: 'gauge',
                          radius:	"85%",
                          detail: {
                            formatter:'{value}'
                          },
                          title:{
                            show: true,
                            offsetCenter: [0,"80%"],
                            color: "auto",
                            fontSize: 18,
                          },
                          data: [],
                          axisLine:{
                            lineStyle:{
                              color:[[0.2,'#c23531'],[0.4, 'rgb(249,70,5)'],[0.6,'rgb(221,225,113)'],[0.8,'rgb(144,224,93)'],[1,'#91c7ae']]
                            }
                          }
                      }
                  ]
                };
                option.series[0].data.push(d.data);
                data.setOption(option);
              }
            },1000);
          }else{
            that.showpatentvalue=false;
          }
        })
      },
      obtainpatentinfo(){
        var obj={
          applynum:this.applynum,
          publishnum:this.publishnum
        };
        var that=this;
        this.$root.postReq("/web/patentycCtl/obtainpatentinfo", obj).then(function (d){
          if(d.status==0){
            that.datalist=d.data;
          }
        })
      },
      report(){
        var localurl = location.href;
        var base = localurl.split("p#");
        var url = base[0] + "p#/patentreport?publishnum=" + this.publishnum+"&applynum="+this.applynum;
        window.open(url);
      }
    },
    mounted:function(){
      this.applynum=this.$router.history.current.query.applynum;
      this.publishnum=this.$router.history.current.query.publishnum;
      this.activeIndex=this.$router.history.current.query.activeIndex;
      if(this.activeIndex==1){
        $("#patentyc").text("常规检索-专利详情");
      };
      if(this.activeIndex==2){
        $("#patentyc").text("高级检索-专利详情");
      }
      this.obtainpatentinfo();
      this.obtainpatentvalue();
    },
    vname:"gsb-patentdetail"
}
