{
  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:#62b5db'
      } else if (i > k) {
        return 'background:#eff1f9'
      }
    },
    progressNarColor(i) {
      var k = this.tmstatus - 2;
      if (i <= k) {
        return 'color:rgb(9, 137, 197)'
      } else if (i > k) {
        return 'color:#bbbbbb;'
      }
    },
    progressNarBorColor(i) {
      var k = this.tmstatus - 2;
      if (i < k) {
        return 'border-color:#62b5db;'
      } else if (i >= k) {
        return 'border-color:#eff1f9;;'
      }
    },
    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)'
      });
      var obj = this.$root.copyParams(obj, "getCompanyInfoNoUser", "/action/tmQuery/springBoard");
      this.$root.postReq("/web/trademark/tmqueryCtl/doPost", obj).then(function (d) {
        loading.close();
        if (d.status == 0) {
          if (d.data) {
            that.companyInfo = d.data;
            that.showMask = true;
          } else {
            that.companyInfo = { "name": "" };
            that.companyInfo.name = name;
            that.showMask = true;
          }
        } else {
          that.$message.warning(d.msg);
        }
      }).catch(function (e) {
        console.log(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;
      var obj = this.$root.copyParams(obj, "noticezcggsearch", "/action/tmQuery/springBoard");
      this.$root.postReq("/web/trademark/tmqueryCtl/doPost", 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;
      var obj = this.$root.copyParams(obj, "noticesearch", "/action/tmQuery/springBoard");
      this.$root.postReq("/web/trademark/tmqueryCtl/doPost", 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)'
    });
    var obj = this.$root.copyParams(obj, "tradeMarkDetail", "/action/tmQuery/springBoard");

    this.$root.postReq("/web/trademark/tmqueryCtl/doPost", 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-jdbycdetailtm"
}
