{
    template:'${tmpl}',
    data:function(){
      return {
        dialogFormVisible: false,
        logo:"",
        a:true,
        b:false,
        c:false,
        d:false,
        e:false,
        total: 0,
        size: 12,
        page: 1,
        mark:"",
        xssb:"",
        jqcx:"",
        zch:"",
        zcr:"",
        activeName: 'first',
        tabPosition:'bottom',
        activeNames: ['1'],
        tmdata:{},
        tmRegistNums:[],
        queryimagedata:[],
        querydata:[],
        tmRegistNumsAll:[
        ],
        sqlbdata:[
        ],
        flzt:[
          {"fl":"无效","count":"6777"},
          {"fl":"有效","count":"6777"},
          {"fl":"不定","count":"6777"},
          {"fl":"待审","count":"6777"},
          {"fl":"变更","count":"6777"},

        ],
        sqnf:[
          {"nf":"1980","count":"6777"},
          {"nf":"2018","count":"6777"},
          {"nf":"1982","count":"6777"},
          {"nf":"1943","count":"6777"},
          {"nf":"1944","count":"6777"},
          {"nf":"1956","count":"6777"},
          {"nf":"2017","count":"6777"},
          {"nf":"2016","count":"6777"},
          {"nf":"2015","count":"6777"},
        ],
        dynamicTags: [

        ],
        sqlbtab:"",
        sqlbtabkey:"",
        flzttab:"",
        sqnftab:"",
      };
    },

    methods:{
      sqlbclick(val){
        console.log('----------------sqlb------------------');
        console.log(val);
        this.sqlbtab=val.keyvalue;
        this.sqlbtabkey=val.key;
        if (this.activeName === "second") {
          this.size=12;
          this.page=1;
          this.jqcxsearch();
        } else if (this.activeName === "third") {
          this.size=12;
          this.page=1;
          this.zchsearch();
        } else if (this.activeName === "fourth") {
          this.size=12;
          this.page=1;
          this.zcrsearch();
        } else {
          this.size=12;
          this.page=1;
          this.xssbsearch();
        }

      },
      flztclick(val){
        console.log('----------------flzt------------------');
        console.log(val);
        this.flzttab=val;
        console.log(this.sqlbtab);
        console.log(this.flzttab);
        console.log(this.sqnftab);
      },
      sqnfclick(val){
        console.log('----------------sqnf------------------');
        console.log(val);
        this.sqnftab=val;
        console.log(this.sqlbtab);
        console.log(this.flzttab);
        console.log(this.sqnftab);
      },
      sqlbtabClose(tag) {
        /*this.dynamicTags.splice(this.dynamicTags.indexOf(tag), 1);*/
        this.sqlbtab="";
        console.log(this.sqlbtabkey);
        this.sqlbtabkey="";
        if (this.activeName === "second") {
          this.size=12;
          this.page=1;
          this.jqcxsearch();
        } else if (this.activeName === "third") {
          this.size=12;
          this.page=1;
          this.zchsearch();
        } else if (this.activeName === "fourth") {
          this.size=12;
          this.page=1;
          this.zcrsearch();
        } else {
          this.size=12;
          this.page=1;
          this.xssbsearch();
        }

      },
      flzttabClose(tag) {
        /*this.dynamicTags.splice(this.dynamicTags.indexOf(tag), 1);*/
        this.flzttab="";
      },
      sqnftabClose(tag) {
        /*this.dynamicTags.splice(this.dynamicTags.indexOf(tag), 1);*/
        this.sqnftab="";
      },
      handleClick(tab, event) {
        console.log(tab, event);
        console.log('----------------------------------');
        console.log(this.activeName);
        this.dynamicTags=[];
      },
      handleChange(val) {
       console.log(val);
       console.log("00000000000000000000000000000000000000000000");
      },
      indexsearch(){
        if(this.mark==""){
          this.$message.warning("请输入目标");
        }else{
          var obj =
            {
              tmName: this.mark,
              sqlbtabkey:"",
              pageSize: 12,
              currentPage: 1
            };
            var that=this;
            this.$root.showMask();
            this.$root.postReq("/web/tmqueryCtl/findTrademarkName",obj).then(function(d){
              that.$root.hideMask();
              that.querydata = d.data.rows;
              that.sqlbdata = d.data.code_counts;
              that.logo=d.data.rows.logo;
              that.total = d.data.count;
            }).catch(function(e){
              that.$message.warning(`操作失败，请刷新页面后重新操作`);
            });
          this.a=false;
          this.b=true;
          this.c=true;
          this.d=true;
          this.e=true;
        }
      },
      xssbsearchClick(){ /* 相似查询 */
        if(this.mark==""){
          this.$message.warning("请输入商标名");
        }else{
          var obj =
            {
              tmName: this.mark,
              sqlbtabkey:"",
              pageSize: "12",
              currentPage: "1"
            };
            this.size=12;
            this.page=1;
            var that=this;
            this.$root.showMask();
            this.sqlbtab="";
            this.sqlbtabkey="";
            this.flzttab="";
            this.sqnftab="";
            this.$root.postReq("/web/tmqueryCtl/findTrademarkName",obj).then(function(d){
              that.$root.hideMask();
              that.querydata = d.data.rows;
              that.sqlbdata = d.data.code_counts;
              that.logo=d.data.rows.logo;
              that.total = d.data.count;
            }).catch(function(e){
              that.$message.warning(`操作失败，请刷新页面后重新操作`);
            });
        }
      },
      xssbsearch(){ /* 相似查询 */
        if(this.mark==""){
          this.$message.warning("请输入商标名");
        }else{
          var obj =
            {
              tmName: this.mark,
              sqlbtabkey:this.sqlbtabkey,
              pageSize: this.size,
              currentPage: this.page
            };
            var that=this;
            this.$root.showMask();
            this.$root.postReq("/web/tmqueryCtl/findTrademarkName",obj).then(function(d){
              that.$root.hideMask();
              that.querydata = d.data.rows;
              that.sqlbdata = d.data.code_counts;
              that.logo=d.data.rows.logo;
              that.total = d.data.count;
            }).catch(function(e){
              that.$message.warning(`操作失败，请刷新页面后重新操作`);
            });
        }
      },
      jqcxsearchClick(){
        if(this.jqcx==""){
          this.$message.warning("请输入商标名");
        }else{
          var obj =
            {
              tmName: this.jqcx,
              sqlbtabkey:"",
              pageSize: "12",
              currentPage: "1"
            };
            this.size=12;
            this.page=1;
            var that=this;
            this.$root.showMask();
            this.sqlbtab="";
            this.sqlbtabkey="";
            this.flzttab="";
            this.sqnftab="";
            this.$root.postReq("/web/tmqueryCtl/findTrademarkNameAccurate",obj).then(function(d){
              that.$root.hideMask();
              that.querydata = d.data.rows;
              that.sqlbdata = d.data.code_counts;
              that.logo=d.data.rows.logo;
              that.total = d.data.count;
            }).catch(function(e){
              that.$message.warning(`操作失败，请刷新页面后重新操作`);
            });
        }
      },

      jqcxsearch(){
        if(this.jqcx==""){
          this.$message.warning("请输入商标名");
        }else{
          var obj =
            {
              tmName: this.jqcx,
              sqlbtabkey:this.sqlbtabkey,
              pageSize: this.size,
              currentPage: this.page
            };
            var that=this;
            this.$root.showMask();
            this.$root.postReq("/web/tmqueryCtl/findTrademarkNameAccurate",obj).then(function(d){
              that.$root.hideMask();
              that.querydata = d.data.rows;
              that.sqlbdata = d.data.code_counts;
              that.logo=d.data.rows.logo;
              that.total = d.data.count;
            }).catch(function(e){
              that.$message.warning(`操作失败，请刷新页面后重新操作`);
            });
        }
      },

      zchsearchClick(){
        if(this.zch==""){
          this.$message.warning("请输入申请号");
        }else{
          var obj =
            {
              regNum:this.zch,
              sqlbtabkey:"",
              pageSize: "12",
              currentPage: "1"
            };
            this.size=12;
            this.page=1;
            var that=this;
            this.sqlbtab="";
            this.sqlbtabkey="";
            this.flzttab="";
            this.sqnftab="";
            this.$root.showMask();
            this.$root.postReq("/web/tmqueryCtl/findTrademarkzchAccurate",obj).then(function(d){
              that.$root.hideMask();
              that.querydata = d.data.rows;
              that.sqlbdata = d.data.code_counts;
              that.logo=d.data.rows.logo;
              that.total = d.data.count;
            }).catch(function(e){
              that.$message.warning(`操作失败，请刷新页面后重新操作`);
            });
        }
      },

      zchsearch(){
        if(this.zch==""){
          this.$message.warning("请输入申请号");
        }else{
          var obj =
            {
              regNum:this.zch,
              sqlbtabkey:this.sqlbtabkey,
              pageSize: this.size,
              currentPage: this.page
            };
            var that=this;
            this.$root.showMask();
            this.$root.postReq("/web/tmqueryCtl/findTrademarkzchAccurate",obj).then(function(d){
              that.$root.hideMask();
              that.querydata = d.data.rows;
              that.sqlbdata = d.data.code_counts;
              that.logo=d.data.rows.logo;
              that.total = d.data.count;
            }).catch(function(e){
              that.$message.warning(`操作失败，请刷新页面后重新操作`);
            });
        }
      },
      zcrsearchClick(){
        if(this.zcr==""){
          this.$message.warning("请输入申请人");
        }else{
          var obj =
            {
              regMan:this.zcr,
              sqlbtabkey:"",
              pageSize: "12",
              currentPage: "1"
            };
            this.size=12;
            this.page=1;
            var that=this;
            this.sqlbtab="";
            this.sqlbtabkey="";
            this.flzttab="";
            this.sqnftab="";
            this.$root.showMask();
            this.$root.postReq("/web/tmqueryCtl/findTrademarkzcr",obj).then(function(d){
              that.$root.hideMask();
              that.querydata = d.data.rows;
              that.sqlbdata = d.data.code_counts;
              that.logo=d.data.rows.logo;
              that.total = d.data.count;
            }).catch(function(e){
              that.$message.warning(`操作失败，请刷新页面后重新操作`);
            });
        }
      },

      zcrsearch(){
        if(this.zcr==""){
          this.$message.warning("请输入申请人");
        }else{
          var obj =
            {
              regMan:this.zcr,
              sqlbtabkey:this.sqlbtabkey,
              pageSize: this.size,
              currentPage: this.page
            };
            var that=this;
            this.$root.showMask();
            this.$root.postReq("/web/tmqueryCtl/findTrademarkzcr",obj).then(function(d){
              that.$root.hideMask();
              that.querydata = d.data.rows;
              that.sqlbdata = d.data.code_counts;
              that.logo=d.data.rows.logo;
              that.total = d.data.count;
            }).catch(function(e){
              that.$message.warning(`操作失败，请刷新页面后重新操作`);
            });
        }
      },

      getTmFlowInfo(row){
        var that=this;
        this.$root.postReq("/web/tmqueryCtl/getTmFlowByRegNum",{"regNum":row.sbzch}).then(function(d){
          if(d!=null){
            that.tmdata["lcxx"]=d;
          }

        });
      },

      detailclick:function(row){
        var that=this;
        var options={
          regNum:row.sbzch
        };
         console.log(options);
         var productId=this.$router.currentRoute.params.id;
         console.log(productId);
         that.$root.postReq("/web/tmqueryCtl/getTmFlowByRegNum",options).then(function(d){
           row.lcxx=d;
           that.$root.postReq("/web/tmqueryCtl/createTrade",{"productId":productId}).then(function(d){
             if(d!=null && d.id!=null && d.id!=""){
               that.tmdata=row;
               that.getTmFlowInfo(row);
               that.tmdata.sblx=row.sblx;
               that.tmdata.sbzt=row.sbzt;
               that.dialogFormVisible=true;
             }else{
               console.log(e);
               that.$message.warning(`操作失败，请刷新页面后重新操作`);
             }
           }).catch(function(e){
              console.log(e);
             that.$message.warning(`操作失败，请刷新页面后重新操作`);
           });

         }).catch(function(e){
           console.log(e);
           that.$message.warning(`操作失败，请刷新页面后重新操作`);
         });


      },
      handleCurrentChange(val) {
        this.page = val;
        console.log(`当前 ${val} 页`);
        if (this.activeName === "second") {
          this.jqcxsearch();
        } else if (this.activeName === "third") {
          this.zchsearch();
        } else if (this.activeName === "fourth") {
          this.zcrsearch();
        } else {
          this.xssbsearch();
        }
      },
      handleSizeChange(val) {
        this.size = val;
        console.log(`每页 ${val} 条`);
        if (this.activeName === "second") {
          this.jqcxsearch();
        } else if (this.activeName === "third") {
          this.zchsearch();
        } else if (this.activeName === "fourth") {
          this.zcrsearch();
        } else {
          this.xssbsearch();
        }
      },

    },
    mounted:function(){
    },
    vname:"gsb-trademarkquery"
}
