{
    template:'${tmpl}',
    data:function(){
      return {
        options:[
          {value:"all",label:"全部公告类型"},
          {value:"TMZCSQ",label:"商标初步审定公告"},
          {value:"TMZCZC",label:"商标注册公告（一）"},
          {value:"TMQTZC",label:"商标注册公告（二）"}
        ],
        noticetype: "all",
        noticenumber:"",
        applynumber:"",
        tmname:"",
        applier:"",
        tmcategory:"",
        total:0,
        querydata:[
        ],
        page: 1,
        size: 20,
      };
    },
    methods:{
      reset(){
        this.noticetype="all";
        this.noticenumber="";
        this.applynumber="";
        this.tmname="";
        this.applier="";
        this.tmcategory="";
      },
      handleCurrentChange(val)
      {
        this.page = val;
        this.noticequery();
      },
      handleSizeChange(val)
      {
        this.size = val;
        console.log(`每页 ${val} 条`);
        this.noticequery();
      },
      noticequeryClick(){
        var obj =
            {
                noticenumber: this.noticenumber,
                applynumber:this.applynumber,
                tmname: this.tmname,
                applier: this.applier,
                noticetype: this.noticetype,
                pageSize:20,
                currentPage:1,
            };
        var that =this;
        const loadingbyc = this.$loading({
            lock: true,
            text: 'Loading',
            spinner: 'el-icon-loading',
            background: 'rgba(0, 0, 0, 0.7)'
        });
        this.$root.postReq("/web/bytmqueryCtl/noticequery", obj).then(function (d) {
          loadingbyc.close();
          that.querydata=d.data.rows;
          that.total = d.data.count;
        }).catch(function (e) {
            that.$message.warning(`操作失败，请刷新页面后重新操作`);
        });
      },
      noticequery(){
        var obj =
            {
                noticenumber: this.noticenumber,
                applynumber:this.applynumber,
                tmname: this.tmname,
                applier: this.applier,
                noticetype: this.noticetype,
                pageSize:this.size,
                currentPage:this.page,
            };
        var that =this;
        const loadingbyc = this.$loading({
            lock: true,
            text: 'Loading',
            spinner: 'el-icon-loading',
            background: 'rgba(0, 0, 0, 0.7)'
        });
        this.$root.postReq("/web/bytmqueryCtl/noticequery", obj).then(function (d) {
          loadingbyc.close();
          that.querydata=d.data.rows;
          that.total = d.data.count;
        }).catch(function (e) {
            that.$message.warning(`操作失败，请刷新页面后重新操作`);
        });
      },
      noticedetailClick(row){
        console.log("--------------------------");
        console.log(row.sbzch);
        console.log(row.linkurl);
        var localurl = location.href;
        console.log(localurl);
        var base = localurl.split("b#");
        var url = base[0] + "b#/bycnoticedetailtm?name="+row.sbzch+"&imgurl="+row.linkurl;
        console.log(base);
        console.log(url);
        window.open(url);
      }
    },
    mounted:function(){

    },
    vname:"gsb-bycnoticetm"
}
