{
  template: '${tmpl}',
    data: function() {
      return {
        tm: [{ 01: "化学原料" }, { 02: "颜料油漆" }, { 3: "日化用品" }, { 4: "燃料油脂" }, { 5: "医药" }, { 6: "金属材料" }, { 7: "机械设备" }, { 8: "手工器械" }, { 9: "科学仪器" }, { 10: "医疗器械" },
        { 11: "灯具空调" }, { 12: "运输工具" }, { 13: "军火烟火" }, { 14: "珠宝钟表" }, { 15: "乐器" }, { 16: "办公用品" }, { 17: "橡胶制品" }, { 18: "皮革皮具" }, { 19: "建筑材料" }, { 20: "家具" },
        { 21: "厨房洁具" }, { 22: "绳网袋蓬" }, { 23: "纱线丝" }, { 24: "布料床单" }, { 25: "服装鞋帽" }, { 26: "钮扣拉链" }, { 27: "地毯席垫" }, { 28: "健身器材" }, { 29: "食品" }, { 30: "方便食品" },
        { 31: "农林生鲜" }, { 32: "啤酒饮料" }, { 33: "酒" }, { 34: "烟草烟具" }, { 35: "广告销售" }, { 36: "金融物管" }, { 37: "建筑修理" }, { 38: "通讯服务" }, { 39: "运输贮藏" }, { 40: "材料加工" },
        { 41: "教育娱乐" }, { 42: "科技服务" }, { 43: "餐饮住宿" }, { 44: "医疗园艺" }, { 45: "社会服务" }],
        number: "",
        datalist: "",
        a: false,
        index: 0,
        fuwu: false,
        nclfuwu: "",
        nclfuwudata: [],
        size: 20,
        page: 1
      };
    },

  methods: {
    styleset(obj){
      var num = obj + 1;
      console.log("-----------------------");
      console.log(num);
      if (this.number == num.toString()) {
        return { color: "#ffffff", background: "#108EE9" };
      } else {
        return { color: '#303133', background: "#ffffff" };
      }
    },
    obtain(obj){
      var num = obj + 1;
      this.number = num.toString();
      var objdata = {
        number: this.number
      };
      this.index = 0;
      var that = this;
      const loadingbyc = this.$loading({
        lock: true,
        text: 'Loading',
        spinner: 'el-icon-loading',
        background: 'rgba(0, 0, 0, 0.7)'
      });
      var objdata = this.$root.copyParams(objdata, "getNclDetail", "/action/tmQuery/springBoard");
      this.$root.postReq("/web/trademark/tmqueryCtl/doPost", objdata).then(function (d) {
        loadingbyc.close();
        console.log(d.data);
        that.datalist = d.data;
        that.a = true;
      }).catch(function (e) {
        that.$message.warning(`操作失败，请刷新页面后重新操作`);
      });
      this.fuwu = false;
      this.nclfuwudata = [];

    },
    showdetail(index){
      console.log("000000000000000000000000000000000000000000000000");
      console.log(index);
      this.index = index;
    },
    nclFuwusearchClick()
    {
      if (this.nclfuwu == "") {
        this.$message.warning("请输入要查询的服务项");
      } else {
        this.nclfuwu = this.nclfuwu.replace(/(^\s*)|(\s*$)/g, "");
        var obj =
        {
          nclfuwu: this.nclfuwu,
          pageSize: 20,
          currentPage: 1
        };
        var that = this;
        this.size = 20;
        this.page = 1;
        this.number = "";
        const loadingbyc = this.$loading({
          lock: true,
          text: 'Loading',
          spinner: 'el-icon-loading',
          background: 'rgba(0, 0, 0, 0.7)'
        });
        this.$root.postReq("/web/bytmqueryCtl/nclFuwuSearch", obj).then(function (d) {
          that.nclfuwudata = d.data.rows;
          that.total = d.data.count;
          loadingbyc.close();
        }).catch(function (e) {
          that.$message.warning(`操作失败，请刷新页面后重新操作`);
        });
        this.a = false;
        this.fuwu = true;
      }
    },
    nclFuwusearch()
    {
      if (this.nclfuwu == "") {
        this.$message.warning("请输入要查询的服务项");
      } else {
        var obj =
        {
          nclfuwu: this.nclfuwu,
          pageSize: this.size,
          currentPage: this.page
        };
        this.number = "";
        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/nclFuwuSearch", obj).then(function (d) {
          that.nclfuwudata = d.data.rows;
          that.total = d.data.count;
          loadingbyc.close();
        }).catch(function (e) {
          that.$message.warning(`操作失败，请刷新页面后重新操作`);
        });
      }
    },
    handleCurrentChange(val)
    {
      this.page = val;
      this.nclFuwusearch();
    },
    handleSizeChange(val)
    {
      this.size = val;
      console.log(`每页 ${val} 条`);
      this.nclFuwusearch();
    },

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