{
    template:'${tmpl}',
    data:function(){
      return {
        showLargePic:false,
        largePicUrl:"",
        detaildata:"",
        nclexist:[],
        nclnotexist:[],
        tmstatus:1,
        showMask:false,
        companyInfo:{},
        sbmc: "",
        linkurl: "",
        rowLinkUrl:"",
        rowName:"",
        dialogTableVisible: false,
        progressNarArr:[{
          icon:'/imgs/jdt/shenqing.png',
          name:'申请中'
        },{
          icon:'/imgs/jdt/chushen.png',
          name:'已初审'
        },{
          icon:'/imgs/jdt/zhuce.png',
          name:'已注册'
        },{
          icon:'/imgs/jdt/wuxiao.png',
          name:'已无效'
        }],
        tdStepsLeftWidth: null,
        tdStepsRightWidth: null
      };
    },
    created: function() {
      $("#byctitle").text("标眼查-商标详情");
      /*页面加载时使用*/
  },
    methods:{
        progressNarBgColor(i) {
          var k = this.tmstatus - 2;
          if (i <= k) {
            return 'background:linear-gradient(141deg,rgba(153,226,255,1) 0%,rgba(80,202,252,1) 100%);'
          }else if (i > k) {
            return 'background:linear-gradient(149deg,rgba(236,236,236,1) 0%,rgba(212,212,212,1) 100%);'
          }
        },
        progressNarColor(i) {
          var k = this.tmstatus - 2;
          if (i <= k) {
            return 'color:rgba(66,195,248,1);'
          }else if (i > k) {
            return 'color:rgba(212,212,212,1);'
          }
        },
        progressNarBorColor(i) {
          var k = this.tmstatus - 2;
          if (i < k) {
            return 'border-color:rgba(66,195,248,1);'
          }else if (i >= k){
            return 'border-color:rgba(212,212,212,1);'
          }
        },
        showLargeTm(url){
            if(url){
                this.showLargePic=true;
                this.largePicUrl=url;
            }
        },
        /*复制“已注册群组”*/
        copyLink(){
          var oInput = document.createElement('input');
          var copytext="";
          for(var i=0;i<this.nclexist.length;i++){
            if(copytext.length!=0){
              copytext=copytext+"，"+this.nclexist[i].small_name;
            }else{
              copytext=this.nclexist[i].small_name;
            }
          }
          oInput.value =copytext;
          document.body.appendChild(oInput);
          oInput.select();
          document.execCommand("Copy");
          oInput.className = 'oInput';
          oInput.style.display='none';
          this.$message({
              type: 'success',
              message: '复制成功'
          });
        },
        /*商标详情弹出框*/
        mask(name){
          var obj = {
              company_name:name
          };
          var that=this;
          const loading = this.$loading({
                   lock: true,
                   text: 'Loading',
                   spinner: 'el-icon-loading',
                   background: 'rgba(0, 0, 0, 0.7)'
                 });
          that.$root.postReq("/web/bytmmonitCtl/getCompanyInfoNoUser", obj).then(function (d) {
              loading.close();
              if(d.code==1){
                if(d.data){
                    that.companyInfo=d.data;
                    that.showMask=true;
                }else{
                    that.companyInfo={"name":""};
                    that.companyInfo.name=name;
                    that.showMask=true;
                }
              }
          }).catch(function (e) {
              that.$message.warning(`操作失败，请刷新页面后重新操作`);
          });
        },
        maskclose(){
            this.showMask=false;
            this.companyInfo={};
        },
        noticezcggClick(row)
        {
            console.log("--------------------------");
            console.log(row);
            var obj = {
                sbzch: row.sbzch,
                zcggqh: row.zcgg
            };
            var that = this;
            this.$root.postReq("/web/bytmqueryCtl/noticezcggsearch", obj).then(function (d) {
                if (d.status == 0) {
                    console.log(d);
                    that.sbmc = d.data.sbmc;
                    that.linkurl = d.data.linkurl;
                    console.log(that.sbmc);
                    if (that.sbmc != "" && that.linkurl != "") {
                        that.dialogTableVisible = true;
                        that.rowName = that.sbmc;
                        that.rowLinkUrl = that.linkurl;
                        var localurl = location.href;
                        console.log(localurl);
                        var base = localurl.split("bycdetailtm");
                        var url = base[0] + "bycnoticedetailtm?name=" + that.sbmc + "&imgurl=" + that.linkurl;
                        console.log(base);
                        console.log(url);
                        /*window.open(url);*/
                    }else{
                        that.$message.warning(`暂无数据`);
                    }
                }
            });
        },
        noticecsggClick(row)
        {
            console.log("--------------------------");
            console.log(row);
            var obj = {
                sbzch: row.sbzch,
                csggqh: row.csgg
            };
            var that = this;
            this.$root.postReq("/web/bytmqueryCtl/noticesearch", obj).then(function (d) {
                if (d.status == 0) {
                    console.log(d);
                    that.sbmc = d.data.sbmc;
                    that.linkurl = d.data.linkurl;
                    console.log(that.sbmc);
                    if (that.sbmc != "" && that.linkurl != "") {
                        that.dialogTableVisible = true;
                        that.rowName = that.sbmc;
                        that.rowLinkUrl = that.linkurl;
                        var localurl = location.href;
                        console.log(localurl);
                        var base = localurl.split("bycdetailtm");
                        var url = base[0] + "bycnoticedetailtm?name=" + that.sbmc + "&imgurl=" + that.linkurl;
                        console.log(base);
                        console.log(url);
                        /*window.open(url);*/
                    }else{
                        that.$message.warning(`暂无数据`);
                    }
                }
            });
        },
        lcxxdetailClick(row){
          this.dialogTableVisible = true;
          console.log("--------------------------");
          console.log(row.name);
          console.log(row.link_url);
          this.rowName = row.name;
          this.rowLinkUrl = row.link_url;
          var localurl = location.href;
          console.log(localurl);
          var base = localurl.split("bycdetailtm");
          var url = base[0] + "bycnoticedetailtm?name="+row.name+"&imgurl="+row.link_url;
          console.log(base);
          console.log(url);
          /*window.open(url);*/
        }
    },
    mounted:function(){
      var that=this;
      console.log("+++++++++++++++++zyf++++++++++++++++++++++++++++++++++++",$('.td-title')[0].clientWidth,$('.td-content'));
      this.tdStepsLeftWidth = 'width:' + $('.td-title')[0].clientWidth + 'px';
      this.tdStepsRightWidth = 'width:' + $('.td-content')[5].clientWidth + 'px;right:-' + $('.td-content')[5].clientWidth/10 + 'px';
      window.onresize = function(){
        that.tdStepsLeftWidth = 'width:' + $('.td-title')[0].clientWidth + 'px';
        that.tdStepsRightWidth = 'width:' + $('.td-content')[5].clientWidth + 'px;right:-' + $('.td-content')[5].clientWidth/10 + 'px'
      };
      var url = location.href;
      var sbzch=this.$router.history.current.query.sbzch;
      var gjfl=this.$router.history.current.query.gjfl;
      var obj={
        sbzch:sbzch,
        gjfl:gjfl
      };
      
      const loading = this.$loading({
        lock: true,
        text: 'Loading',
        spinner: 'el-icon-loading',
        background: 'rgba(0, 0, 0, 0.7)'
      });
      this.$root.postReq("/web/bytmqueryCtl/tradeMarkDetail",obj).then(function(d){
        loading.close();
        if(d.data.detaildata[0]){
          if(d.data.detaildata[0].sbzt=="申请中"){
            that.tmstatus=2;
          }
          else if (d.data.detaildata[0].sbzt=="已初审") {
            that.tmstatus=3;
          }
          else if (d.data.detaildata[0].sbzt=="已注册") {
            that.tmstatus=4;
          }
          else if (d.data.detaildata[0].sbzt=="已无效") {
            that.tmstatus=5;
          }
        }
        that.detaildata=d.data.detaildata[0];
        that.nclexist=d.data.nclexist;
        that.nclnotexist=d.data.nclnotexist;
      }).catch(function(e){
        that.$message.warning(`操作失败，请刷新页面后重新操作`);
      });

    },
    vname:"gsb-bycdetailtm"
}
