{
    template:'${tmpl}',
    data:function(){
      return {
        options:[
          {value:"TMZCSQ",label:"商标初步审定公告"},
          {value:"TMZCZC",label:"商标注册公告（一）"},
          {value:"TMQTZC",label:"商标注册公告（二）"}
        ],
        options1:[],
        noticetype: "TMZCSQ",
        noticetype1: "",
        noticenumber:"",
        applynumber:"",
        tmname:"",
        applier:"",
        tmcategory:"",
        tmcbsdgg:"",
        gonggao:true,
        total:0,
        querydata:[
        ],
        chushendata:[
        ],
        page: 1,
        size: 20,
        yydate:"",
        maxdata:""
      };
    },
    methods:{
      reset(){
        this.noticetype="all";
        this.noticenumber="";
        this.applynumber="";
        this.tmname="";
        this.applier="";
        this.tmcategory="";
        this.gonggao=true;
        this.yydate="";
      },
      handleCurrentChange(val)
      {
        this.page = val;
        this.noticequery();
      },
      handleSizeChange(val)
      {
        this.size = val;
        console.log(`每页 ${val} 条`);
        this.noticequery();
      },
      getRole (prov) {
        console.log("-------------------------------");
        console.log(prov);
        if(prov=="TMZCSQ"){
          var obj =
          {
              noticetype: prov
          };
          this.noticenumber="";
          var that =this;
          var obj = this.$root.copyParams(obj,"noticequeryTMZCSQ","/action/tmQuery/springBoard");
          this.$root.postReq("/web/trademark/tmqueryCtl/doPost", obj).then(function (d) {
            let select1=d.data.selectdata;
            that.gonggao=false;
            that.options1=select1;
            that.yydate=d.data.date;
          }).catch(function (e) {
              that.$message.warning(`操作失败，请刷新页面后重新操作`);
          });
        }else{
          this.gonggao=true;
          this.yydate="";
          this.noticetype1="";
        }

      },
      noticequeryClick(){
        var obj =
            {
                noticenumber: this.noticenumber,
                applynumber:this.applynumber,
                tmname: this.tmname,
                applier: this.applier,
                noticetype: this.noticetype,
                noticetype1:this.noticetype1,
                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)'
        });
        var obj = this.$root.copyParams(obj,"noticequery","/action/tmQuery/springBoard");
        this.$root.postReq("/web/trademark/tmqueryCtl/doPost", 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,
                noticetype1:this.noticetype1,
                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)'
        });
        var obj = this.$root.copyParams(obj,"noticequery","/action/tmQuery/springBoard");
        this.$root.postReq("/web/trademark/tmqueryCtl/doPost", obj).then(function (d) {
          loadingbyc.close();
          that.querydata=d.data.rows;
          that.total = d.data.count;
        }).catch(function (e) {
            that.$message.warning(`操作失败，请刷新页面后重新操作`);
        });
      },
      isNull(str)
      {
          if (str == "") return true;
          var regu = "^[ ]+$";
          var re = new RegExp(regu);
          return re.test(str);
      },
      noticeindexClick(){
        console.log("--------------------------");
        if (this.isNull(this.noticenumber)) {
            this.$message.warning("请输入目标");
        }else{
          var re = /^[0-9]+.?[0-9]*$/;
          if(re.test(this.noticenumber)){
            if(this.noticenumber<=this.maxdata){
              var localurl = location.href;
              console.log(localurl);
              var base = localurl.split("bycnoticetm");
              var url = base[0] + "bycnoticeindex?noticetype="+this.noticetype+"&noticenumber="+this.noticenumber;
              console.log(base);
              console.log(url);
              this.$root.pushx({
                title:"",
                name: `/${this.$root.channelName}/bycnoticeindex`,
                params: { noticetype: this.noticetype, noticenumber: this.noticenumber }
               });
            }else{
              this.$message.warning("不能超过最大初审公告期号");
            }
          }else{
            this.$message.warning("公告期号只能是数字");
          }
        }
      },
      noticeindexClick1(row){
        console.log("--------------------------");
        var localurl = location.href;
        console.log(localurl);
        var base = localurl.split("bycnoticetm");
        var url = base[0] + "bycnoticeindex?noticetype=TMZCSQ"+"&noticenumber="+row.notice_issue;
        console.log(base);
        console.log(url);this.$root.pushx({
          title:"",
          name: `/${this.$root.channelName}/bycnoticeindex`,
          params: { noticetype: "TMZCSQ", noticenumber: row.notice_issue }
         });
      }
    },
    mounted:function(){
      var obj =
      {
          noticetype: "TMZCSQ"
      };
      this.noticenumber="";
      var that =this;
      var obj = this.$root.copyParams(obj,"noticequeryTMZCSQ","/action/tmQuery/springBoard");
      this.$root.postReq("/web/trademark/tmqueryCtl/doPost", obj).then(function (d) {
        let select1=d.data.selectdata;
        that.gonggao=false;
        that.options1=select1;
        that.chushendata=d.data.rows;
        that.maxdata=d.data.selectdata[0].value;
      }).catch(function (e) {
          that.$message.warning(`操作失败，请刷新页面后重新操作`);
      });
    },
    vname:"gsb-bycnoticetm"
}
