{
  template: '${tmpl}',
    props: ["title"],
      data: function() {
        var validateMobile = (rule, value, callback) => {
          if (value == "") {
            callback(new Error('请输入手机号码'));
          } else {
            var x = (/^1(3|4|5|7|8)\d{9}$/.test(value));
            if (!x) {
              callback(new Error('手机号码格式有误'));
            } else {
              callback();
            }
          }
        };
        return {
          restaurants: [],
          xcl: [],
          checkedXcl: [],
          inputTabsKey: 1,
          checkAll1: false,
          checkedNcl: [],
          mark: "",
          checkedNclNum: [],
          f: false,
          ncl: ["01类 化学原料", "02类 颜料油漆", "03类 日化用品", "04类 燃料油脂", "05类 医药", "06类 金属材料", "07类 机械设备", "08类 手工器械", "09类 科学仪器",
            "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类 社会服务"
          ],
          popupsDataList: [],
          pDataKey: 0,
          pTowDataKey: null,
          popupsSeDataNew: [],
          popupsDataNew: [
            {
              itemTypeName: '商标服务',
              oneIconUrl: '/imgs/normal/a1.png',
              twoIconUrl: '/imgs/normal/a2.png'
            }, {
              itemTypeName: '专利服务',
              oneIconUrl: '/imgs/normal/b1.png',
              twoIconUrl: '/imgs/normal/b2.png'
            }, {
              itemTypeName: '版权服务',
              oneIconUrl: '/imgs/normal/c1.png',
              twoIconUrl: '/imgs/normal/c2.png'
            }, {
              itemTypeName: '工商服务',
              oneIconUrl: '/imgs/normal/d1.png',
              twoIconUrl: '/imgs/normal/d2.png'
            }, {
              itemTypeName: '财税服务',
              oneIconUrl: '/imgs/normal/e1.png',
              twoIconUrl: '/imgs/normal/e2.png'
            }, {
              itemTypeName: '高新企业认证',
              oneIconUrl: '/imgs/normal/f1.png',
              twoIconUrl: '/imgs/normal/f2.png'
            }, {
              itemTypeName: '贯标服务',
              oneIconUrl: '/imgs/normal/g1.png',
              twoIconUrl: '/imgs/normal/g2.png'
            }
          ],
          option: {
            img: "",
            size: 1,
            full: false,
            outputType: "png",
            canMove: true,
            fixedBox: false,
            fixed: true,
            original: false,
            canMoveBox: true,
            autoCropWidth: "",
            autoCropHeight: "",
            autoCrop: true,
            centerBox: true,
            high: true
          },
          exhibitionArr: [
            {
              name: '高新企业认定',
              text: '享百万财政补贴，减免40%所得税',
              icon: '/imgs/normal/exIcon1.png',
              img: 'background: url(\'/imgs/normal/exback1.png\') no-repeat;',
              path: '/servicedetails?isDirectJump=1&sdsId=411'
            }, {
              name: '双软评估',
              text: '享政策税收优惠，增值税即征即退',
              icon: '/imgs/normal/exIcon2.png',
              img: 'background: url(\'/imgs/normal/exback2.png\') no-repeat;',
              path: '/servicedetails?isDirectJump=1&sdsId=2683'
            }, {
              name: '研发费用加计扣除',
              text: '减税捷径，加速创新',
              icon: '/imgs/normal/exIcon3.png',
              img: 'background: url(\'/imgs/normal/exback3.png\') no-repeat;',
              path: '/servicedetails?isDirectJump=1&sdsId=2687'
            }
          ],
          bgcArr: [
            "background:url('/imgs/normal/springz0.jpg')",
            "background:url('/imgs/springz1.jpg')",
            "background:url('/imgs/springz2.jpg')",
            "background:url('/imgs/springz0.jpg')",
            "background:url('/imgs/springz1.jpg')",
            "background:url('/imgs/springz2.jpg')",
          ],
          popupsData: [],
          bgcUrl: [
            'http://gsb-zc.oss-cn-beijing.aliyuncs.com/default/zcsyhdsbtu.jpg',
            'http://gsb-zc.oss-cn-beijing.aliyuncs.com/default/zcsyhdbq.jpg',
            'http://gsb-zc.oss-cn-beijing.aliyuncs.com/default/zcsyhdzl.jpg',
            'http://gsb-zc.oss-cn-beijing.aliyuncs.com/default/zcsyhdgs.jpg',
            'http://gsb-zc.oss-cn-beijing.aliyuncs.com/default/zcsyhdcs.jpg',
            'http://gsb-zc.oss-cn-beijing.aliyuncs.com/default/zcsyhdjy.jpg',
          ],
          bgcArr2: [
            'background:linear-gradient(142deg, rgb(174, 201, 243) 0%, rgb(12, 56, 243) 100%);',
            'background:linear-gradient(142deg, rgb(212, 202, 239) 0%, rgb(75, 7, 245) 100%);',
            'background:linear-gradient(142deg, rgb(245, 222, 189) 0%, #fb9905 100%);',
            'background:linear-gradient(142deg,#65cfff 0%,#2a75fd 100%)',
            'background:linear-gradient(142deg,#ffd700 0%,#ff694a 100%)',
            'background:linear-gradient(142deg,#feabb6 0%,#e06e7c 100%)',
          ],
          slideLeft: false,
          slideRight: false,
          tabKey: null,
          cardKey: null,
          cardK: null,
          slideKey: null,
          swiperNum: 0,
          inputstr: "",
          itemtype: "ip",
          imgHeight: "",
          loopplays: [
            /*{ leftimg: '/imgs/normal/beij1.png' },
            {
              leftimg: '/imgs/normal/beij2.jpg',
              skipUrl: 'https://www.gongsibao.com/topic.php?topic_id=57&&preview=1'
            },
            {
              leftimg: '/imgs/normal/beij3.jpg',
              skipUrl: 'https://www.gongsibao.com/topic.php?topic_id=71&&preview=1'
            }*/
          ],
          datalist: [],
          widthnumber: "",
          dialogFormVisible: false,
          serviceName: "",
          serviceCode: "",
          form: {
            name: "",
            mobile: "",
            city: [],
            notes: ""
          },
          rules: {
            name: [
              { required: true, message: '请输入您的名字', trigger: 'blur' }
            ],
            mobile: [
              { required: true, validator: validateMobile, trigger: 'blur' }
            ],
          },
          nctKey: 0,
          enterpriseTopArr: ['/imgs/normal/a.png', '/imgs/normal/b.png', '/imgs/normal/c.png', '/imgs/normal/d.png', '/imgs/normal/e.png', '/imgs/normal/f.png'],
          enterpriseBottomArr: ['/imgs/normal/g.png', '/imgs/normal/h.png', '/imgs/normal/i.png', '/imgs/normal/j.png', '/imgs/normal/k.png', '/imgs/normal/l.png'],
          electWeArr: [
            {
              icon: '/imgs/normal/selectWe1.png',
              name: '实时掌握申请进度',
              text: '关键节点短信、公众号通知，申请进度实时查询申请进度，一目了然。'
            }, {
              icon: '/imgs/normal/selectWe2.png',
              name: '流程简化 注册高效',
              text: '优化注册流程，简单易用，直连商标局和工商局接口，注册高效。'
            }, {
              icon: '/imgs/normal/selectWe3.png',
              name: '专业专注 值得信赖',
              text: '提供专业专注的服务，确保服务质量，大品牌值得信赖。'
            }, {
              icon: '/imgs/normal/selectWe4.png',
              name: '管理便捷 易用性好',
              text: '全程先生自主化管理，便捷易用，方便查找'
            },
          ],
          state2: '',
          input: '',
          value1: '',
          options1: [{
            value: '北京',
            label: '北京'
          }, {
            value: '上海',
            label: '上海'
          }, {
            value: '广州',
            label: '广州'
          }, {
            value: '深圳',
            label: '深圳'
          }, {
            value: '杭州',
            label: '杭州'
          }, {
            value: '成都',
            label: '成都'
          }],
          value2: '',
          options2: [{
            value: '文化',
            label: '文化'
          }, {
            value: '科技',
            label: '科技'
          }, {
            value: '管理',
            label: '管理'
          }, {
            value: '咨询',
            label: '咨询'
          }, {
            value: '服务',
            label: '服务'
          }, {
            value: '传媒',
            label: '传媒'
          }, {
            value: '影业',
            label: '影业'
          }, {
            value: '贸易',
            label: '贸易'
          }, {
            value: '广告',
            label: '广告'
          }, {
            value: '教育',
            label: '教育'
          }, {
            value: '设计',
            label: '设计'
          }],
          value3: '',
          options3: [{
            value: '有限公司',
            label: '有限公司'
          }, {
            value: '股份有限公司',
            label: '股份有限公司'
          }, {
            value: '集团公司',
            label: '集团公司'
          }],
          CommerceArr: [
            {
              icon: '/imgs/normal/icon1.png',
              name: '公司变更',
              text: '最快1天递交 全程线上化进度透明限时特惠，部分地区低至68元',
              price: '¥499.00',
              path: '/servicedetails?isDirectJump=1&sdsId=274'
            }, {
              icon: '/imgs/normal/icon2.png',
              name: '银行开户',
              text: '合作银行 免预约排队',
              price: '¥499.00',
              path: '/servicedetails?isDirectJump=1&sdsId=327'
            }, {
              icon: '/imgs/normal/icon3.png',
              name: '代理记账',
              text: '财务处理、税务申报、编制报表',
              price: '¥499.00',
              path: '/servicedetails?isDirectJump=1&sdsId=334'
            }
          ],
          InnovativeServicesArr: [
            {
              name: '国家高新企业认定',
              text: '享受税收减免优惠，获得政府政策扶持，推动企业快速发展',
              price: '¥25800',
              id: 'CP201909031758kvyAWH'
            }, {
              name: '双软认证',
              text: '通过软件产品登记和软件企业认定给予企业税收减免等政策支持',
              price: '先确定方案，再付款',
              id: 'CP2019090317597y3k1g'
            }, {
              name: 'ISO9001质量管理体系认证',
              text: '表明企业能持续稳定地向顾客提供预期和满意的合格产品',
              price: '先确定方案，再付款',
              id: 'CP201909031800JX2Pos'
            }, {
              name: '科技成果评价',
              text: '国家科技成果认定，入国家科技成果库',
              price: '先确定方案，再付款',
              id: 'CP201909031800Cp85m7'
            }, {
              name: '贯标申请服务',
              text: '规范管理体系，强化产权意识，增加无形资产',
              price: '先确定方案，再付款',
              id: 'CP201909031748lVG29M'
            }, {
              name: '专利风险预警',
              text: '专利风险规避、专利无效提起、专利权稳定性分析',
              price: '先确定方案，再付款',
              id: 'CP201909031753illO6b'
            }, {
              name: '专利侵权对抗',
              text: '侵权对抗、法庭应对、侵权抗辩',
              price: '先确定方案，再付款',
              id: 'CP201909031758GHFzq7'
            }, {
              name: '资质服务',
              text: 'ICP经营许可证、网络文化经营许可证、商业特许经营许可证等各种资质申请',
              price: '先确定方案，再付款',
              id: 'CP201909031801H05os3'
            }
          ],
          b2: false,
          checkAll: true,
          isIndeterminate: false,
          cities1: ["中国大陆", "香港", "澳门", "台湾"],
          cities2: ["EPO", "WIPO", "美国", "日本", "韩国", "英国", "法国", "德国", "俄罗斯", "瑞士"],
          cities3: ["奥地利", "澳大利亚", "西班牙", "意大利", "加拿大", "瑞典"],
          isIndeterminate1: false,
          checkAll1: true,
          isIndeterminate2: false,
          checkAll2: true,
          isIndeterminate3: false,
          checkAll3: true,
          checked: ["中国大陆", "香港", "澳门", "台湾"],
          checkedmain: ["EPO", "WIPO", "美国", "日本", "韩国", "英国", "法国", "德国", "俄罗斯", "瑞士"],
          checkedother: ["奥地利", "澳大利亚", "西班牙", "意大利", "加拿大", "瑞典"],
          patentInput: '',
          centerDialogVisible: false,
          popupForm: {
            name: '',
            company: '',
            phone: '',
            textarea: '',
            title: '',
            id: ''
          },
          rules: {
            name: [
              { required: true, message: '请输入姓名', trigger: 'blur' }
            ],
            company: [
              { required: true, message: '请输入公司名称', trigger: 'blur' }
            ],
            phone: [
              { required: true, message: '请输入手机号', trigger: 'blur' },
              { min: 11, max: 11, message: '长度在11个字符', trigger: 'blur' }
            ]
          },
          pagesize: 20,
          currentpage: 1,
          publishdate: "",
          applydate: "",
          status: "",
          patenttype: "",
          activeName: "patentname",
          show: false,
          /*获取图片参数 */
          picName: "",
          tag: { name: '', type: '' },
          imageUrl: "",
          /*结束 */
          secondList: [],
          navData: [],
          checkImage: [],
          ImageSelectedValue: "",
        }
      },
  mounted: function() {
    this.$root.showHeadLogo();
    this.$root.headerRowType = true;
    window.addEventListener('scroll', this.handleScroll, true);
    var itemtype = this.$router.history.current.query.itemtype;
    if (itemtype != null) {
      this.itemtype = itemtype;
    };
    var self = this;
    var f = function () {
      var own = self;
      var t = setTimeout(() => {
        if (own.$root.currentCompany) {
          own.findAllServicesitemA();
          /*own.findAllServicesitem();*/
          $("#header").removeClass("headtransparent");
          $(".spechorizotal .nav_color").css("color", "black");
          $(".spechorizotal .nav_color:hover").css("color", "#2692FF");
          clearTimeout(t);
        } else {
          f();
        }
      }, 1000);
    };
    f();
    var storage = window.localStorage;
    var list = [];
    var key = "byc_mark";
    var tbDataList = storage.getItem("byc_mark");
    if (tbDataList) {
      var stringStr = JSON.parse(tbDataList);
      this.restaurants = stringStr.reverse();
    }
    this.tminput = this.$router.history.current.query.tminput;
    if (this.tminput || this.tmmonitzcr) {
      $('#wave-container').css('display', 'none');
    }

    var self = this;
    /*导航数据 */
    this.$root.getReq("/web/producttypeCtl/getAllProducts", {}).then((d) => {
      this.popupsDataNew.length = d.data.length;
      d.data.map((item, index) => {
        this.popupsDataNew[index].itemTypeName = item.name;
        this.popupsDataNew[index].code = item.code;
      });
      this.secondList = d.data;
      this.navData = d.data[0].children;
      console.log(this.secondList, `111111111111111111111111ss`);
    }).catch((e) => {
      console.log(e);
      this.$message.warning(`操作失败，请刷新页面后重新操作`);
    });
    /**轮播图 */
    this.$root.postReq("/web/loopplayCtl/getLooppayList", { theme_name: this.$root.currentCompany.siteTheme }).then((d) => {
      if (d.data.length > 0) {
        this.loopplays = [];
        this.loopplays = d.data;
        console.log(this.loopplays,"1vvvvvvvvvvvvvvvvvvvvvvv");
      }else {
        console.log(this.loopplays,"2vvvvvvvvvvvvvvvvvvvvvvv");
      }
      this.$forceUpdate();
    }).catch((e) => {
      console.log(e);
      this.$message.warning(`操作失败，请刷新页面后重新操作`);
    });
  },
  created: function() {
    let arr = this.$root.rsData;
    for (let index = 0; index < arr.length; index++) {
      if (this.$root.mnufunc(arr[index].codePath) && arr[index].label != '首页') {
        this.popupsSeDataNew.push(arr[index])
      }
    }
  },
  methods: {
    checkImageValue(e){
      console.log(e);
      if (e.length > 1) {
        this.ImageSelectedValue = "2";
      } else {
        if (e[0] == "原始图像") {
          this.ImageSelectedValue = "0";
        } else if (e[0] == "灰度图像") {
          this.ImageSelectedValue = "1";
        }
      }
    },
    banerpath(item) {
      console.log(item);
      if (item.skipUrl) {
        window.open(item.skipUrl)
      } else if (item.type) {
        /*this.centerDialogVisible = true;
        this.popupForm.title = '商品条码';
        this.popupForm.id = ''*/
      }
    },
    submitForm(formName) {
      if (this.popupForm.phone != '') {
        var need = {
          publisherName: this.popupForm.name,
          publisherMobile: this.popupForm.phone,
          entname: this.popupForm.company,
          notes: this.popupForm.textarea,
          servicecode: this.popupForm.id,
          company_id: this.$root.currentCompany && this.$root.currentCompany.id ? this.$root.currentCompany.id : ""
        };
        var that = this;
        this.$root.postReq("/web/needCtl/submitneed", need).then(function (d) {
          console.log(d);
          that.centerDialogVisible = false;
          if (d.code == 1) {
            that.$alert('需求提交成功，我们会尽快联系您！', '', {
              confirmButtonText: '确定',
              callback: action => {

              }
            });
          } else if (d.code == -100 || d.code == 0) {
            that.$message.warning(d.msg);
          } else {
            that.$message.warning('操作失败，请稍后重试');
          }
        })
      }
    },
    handleCheckAllChange1(val) {
      this.checked = val ? this.cities1 : [];
      this.isIndeterminate1 = false;
      this.check();
    },
    handleCheckedCitiesChange1(value) {
      let checkedCount = value.length;
      this.checkAll1 = checkedCount === this.cities1.length;
      this.isIndeterminate1 = checkedCount > 0 && checkedCount < this.cities1.length;
      this.check();
    },
    handleCheckAllChange2(val) {
      this.checkedmain = val ? this.cities2 : [];
      this.isIndeterminate2 = false;
      this.check();
    },
    handleCheckedCitiesChange2(value) {
      let checkedCount = value.length;
      this.checkAll2 = checkedCount === this.cities2.length;
      this.isIndeterminate2 = checkedCount > 0 && checkedCount < this.cities2.length;
      this.check();
    },
    handleCheckAllChange3(val) {
      this.checkedother = val ? this.cities3 : [];
      this.isIndeterminate3 = false;
      this.check();
    },
    handleCheckedCitiesChange3(value) {
      let checkedCount = value.length;
      this.checkAll3 = checkedCount === this.cities3.length;
      this.isIndeterminate3 = checkedCount > 0 && checkedCount < this.cities3.length;
      this.check();
    },
    handleSelectionChange(val) {
      this.multipleSelection = val;
    },
    handleCheckAllChangeAnalysis(val){
      this.multipleSelection = val ? this.datalist2 : [];
      console.log(this.multipleSelection);
      this.toggleSelection(this.multipleSelection);
      this.isIndeterminateAnalysis = false;
    },
    checkPatentClick(){
      this.b2 = !this.b2;
    },
    search1(val){
      if (typeof val == 'string') {
        this.patentInput = val;
      }
      if (!this.patentInput) {
        this.$message.warning("输入的搜索关键字不能为空");
        return false;
      };
      this.patentInput = this.patentInput.replace(/\s+/g, "");
      console.log(this.patentInput,"this.patentInput................");
      return this.$root.pushx({
        title: "",
        name: "/recommen",
        params: {
          tminput: this.patentInput
        }
      });
    },
    search(){
      if (!this.patentInput) {
        this.$message.warning("输入的搜索关键字不能为空");
        return false;
      };
      var obj = {
        lable: this.activeName,
        content: this.patentInput,
        range: {
          china: this.checked,
          main: this.checkedmain,
          other: this.checkedother
        },
        patenttype: this.patenttype,
        status: this.status,
        applydate: this.applydate,
        publishdate: this.publishdate,
        pagesize: this.pagesize,
        currentpage: this.currentpage,
      };
      this.$root.pushx({
        title: "专利检索",
        name: "/patentsimplesearch",
        params: { patenObj: JSON.stringify(obj) }
      });
    },
    normalMenuSelect(command) {
      this.$root.handleCommand(command)
    },
    tabsChoose(item) {

      if (item.name == '商标注册') {
        this.$root.pushx({
          title: "自主商标注册",
          name: "/selftmreg",
          params: { itemCode: 'zzsbzc' }
        });
      } else {
        window.open(window.location.href.split("?")[0] + "#" + item.path)
        /*this.$root.pushx({
          title: item.name,
          name: item.path
        });
        if (item.name == '公司注册') {
        window.open(window.location.href.split("#")[0]+ "#" + item.path)
        }else */
      }
    },
    companyRegistered() {
      window.open(window.location.href.split("?")[0] + "#/servicedetails?isDirectJump=1&isModifyTitle=1&sdsId=449")
    },
    CommerceDetails(item) {
      window.open(window.location.href.split("?")[0] + "#" + item.path)
    },
    searchResult() {
      if (this.summerTabs == 2) {
        if (this.restaurants && this.restaurants.lenght == 1) {
          this.$root.pushx({
            title: "企业画像",
            name: "/entdrawing",
            params: { "obj": this.restaurants[0] }
          });
        } else {
          this.$message({
            message: '请选择一个公司',
            type: 'warning'
          });
        }

        return;
      }
      let obj = {
        "cityname": this.value1,
        "keyword": this.input,
        "btname": this.value2,
        "orgname": this.value3,
        "sitcity": 1
      };
      if (this.value1 != '' && this.value2 != '' && this.value3 != '' && this.input != '') {
        this.$root.pushx({
          title: "工商核名查询",
          name: "/icorder",
          params: { obj: obj }
        });
      } else {
        this.$message({
          message: '请按提示输入',
          type: 'warning'
        });
      }

    },
    popupsList(list, key) {
      /* 
      if (this.datalist.lenght != 0) {
        this.popupsDataList = this.datalist[key] ? this.datalist[key].smallList : [];
      }
      this.popupsDataList = list.smallList;*/
      if (this.secondList) {
        this.navData = this.secondList[key].children;
      }
      this.pDataKey = key;
      this.pTowDataKey = key;
    },
    popupsLeave() {
      this.pTowDataKey = null;
    },
    handleCheckedNclChange(value){
      console.log(value);
      this.checkedNcl = value;
      let checkedCount = value.length;
      this.checkAll1 = checkedCount === this.ncl.length;
      this.isIndeterminate = checkedCount > 0 && checkedCount < this.ncl.length;
    },
    checkClick(){
      console.log("lllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllll");
      console.log(this.fkey);
      if (this.fkey == 0) {
        this.f = true;
        this.fkey = 1;
      } else {
        this.f = false;
        this.fkey = 0;
        this.checkedNcl = [];
        this.checkAll1 = false;
        this.isIndeterminate = false;
      }
    },
    handleSelect() { },
    indexsearch(name){
      if (typeof name == 'string') {
        this.mark = name
      };
      $('#wave-container').css('display', 'none');
      this.aitmrate = false;
      this.ainclonerate = [];
      if (this.isNull(this.mark)) {
        this.$message.warning("请输入要查询的关键字");
      } else {
        this.mark = this.mark.replace(/\s+/g, "");
        console.log(this.mark,"this.mark................");
        return this.$root.pushx({
          title: "",
          name: "/policyquery",
          params: {
            tminput: this.mark
          }
        });
      }
    },
    localstoragesb(mk){
      var storage = window.localStorage;
      var list = [];
      var key = "byc_mark";
      var mark = mk;
      var tbDataList = storage.getItem("byc_mark");
      if (tbDataList && tbDataList != null && tbDataList != "null") {
        list = JSON.parse(tbDataList);
        if (mark != "" && mark != null) {
          if (list.length < 10) {
            var delIndex = list.findIndex(v => v.value === mark);
            if (delIndex < 0) {
              list.push({ value: mark });
            }
          } else {
            var delIndex = list.findIndex(v => v.value === mark);
            if (delIndex < 0) {
              list.splice(0, 1);
              list.push({ value: mark });
            }
          }
        }
      } else {
        if (mark != "" && mark != null) {
          var m = {
            value: mark
          };
          list.push(m);
        }
      }
      var stringStr = JSON.stringify(list);
      storage.setItem(key, stringStr);
    },
    isNull(str){
      if (str == "") return true;
      var regu = "^[ ]+$";
      var re = new RegExp(regu);
      return re.test(str);
    },
    querySearch(queryString, cb){
      var restaurants = this.restaurants;
      var results = queryString ? restaurants.filter(this.createFilter(queryString)) : restaurants;
      cb(results);
    },
    handleCheckAllChange(val){
      console.log(val);
      this.checkedNcl = val ? this.nclOptions : [];
      console.log(this.checkedNcl);
      this.isIndeterminate = false;
    },
    createFilter(queryString) {
      return (restaurant) => {
        return (restaurant.value != '');
      };
    },
    handleIconClick(ev) {
      this.$root.loadingHome = true;
      setTimeout(() => {
        this.$root.loadingHome = false;
      }, 3000);
      this.$root.pushx({
        title: "企业画像",
        name: "/entdrawing",
        params: { "obj": ev, "shouji": this.isNumber(this.state2) ? this.state2 : '' }
      });
    },
    isNumber(val) {
      var regPos = /^\d+(\.\d+)?$/;
      var regNeg = /^(-(([0-9]+\.[0-9]*[1-9][0-9]*)|([0-9]*[1-9][0-9]*\.[0-9]+)|([0-9]*[1-9][0-9]*)))$/;
      if (regPos.test(val) || regNeg.test(val)) {
        return true;
      } else {
        return false;
      }
    },
    searchResult() {
      if (this.summerTabs == 2) {
        if (this.restaurants && this.restaurants.lenght == 1) {
          this.$root.pushx({
            title: "企业画像",
            name: "/entdrawing",
            params: { "obj": this.restaurants[0] }
          });
        } else {
          this.$message({
            message: '请选择一个公司',
            type: 'warning'
          });
        }

        return;
      }
      let obj = {
        "cityname": this.value1,
        "keyword": this.input,
        "btname": this.value2,
        "orgname": this.value3,
        "sitcity": 1
      };
      if (this.value1 != '' && this.value2 != '' && this.value3 != '' && this.input != '') {
        this.$root.pushx({
          title: "工商核名查询",
          name: "/icorder",
          params: { obj: obj }
        });
      } else {
        this.$message({
          message: '请按提示输入',
          type: 'warning'
        });
      }

    },
    rightServiceModule(key, item) {
      if (item.length > 3) {
        if (((item.length / 3) * 960) - Math.abs(this.swiperNum) > 960) {
          this.slideLeft = true;
          this.swiperNum = this.swiperNum - 960;
          this.$refs.serviceModule[key].style.transform = 'translateX(' + this.swiperNum + 'px) scale(1)';
        } else {
          this.slideRight = false;
          this.$message({
            message: '没有更多了',
            type: 'warning'
          });
        }
      }
    },
    leftServiceModule(key, item) {
      if (item.length > 3) {
        console.log(this.swiperNum, 'kanzheliaaaaaaaaaaaaaaaaaaaaa');
        if (this.swiperNum < 0) {
          this.slideRight = true;
          this.swiperNum = this.swiperNum + 960;
          this.$refs.serviceModule[key].style.transform = 'translateX(' + this.swiperNum + 'px) scale(1)';
        } else {
          this.slideLeft = false;
          this.$message({
            message: '没有更多了',
            type: 'warning'
          });
        }
      }
    },
    moveLocation(key, move) {
      if (this.swiperNum != move) {
        this.swiperNum = -move;
        this.$refs.serviceModule[key].style.transform = 'translateX(' + -move + 'px) scale(1)';
      }
      /* 点击下面导航点 跳转 */
    },
    handleScroll() {
      var scrollTop = window.pageYOffset || document.documentElement.scrollTop || document.body.scrollTop;
    },
    goServiceDetails(i){
      console.log('?????????????????????');
      console.log(i);
      if (i.code == 'zzsbzc') {
        this.$root.popupsType = false;
        this.$root.pushx({
          title: "自主商标注册",
          name: "/selftmreg",
          params: { itemCode: i.code }
        });
      } else {
        window.open(window.location.href.split("?")[0] + "#/servicedetails?isDirectJump=1&sdsId=" + i.id)
      }
    },
    enterCard(k, key) {
      this.cardK = k;
      this.cardKey = key;
    },
    /* 移入 */
    enter(key, item) {
      if (item.length > 3) {
        this.slideKey = key;
        this.slideRight = true;
        this.slideLeft = true;
      }
    },
    /* 移出 */
    leave() {
      this.slideLeft = false;
      this.slideRight = false;
      this.slideKey = null;
    },
    onfocus(){
      if (this.inputstr == "") {
        this.$message({
          type: 'error',
          message: '请填写搜索内容'
        });
      } else {
        this.$root.pushx({
          title: "标眼查",
          name: "/bycquerytm",
          params: { tminput: this.inputstr }
        });
      }
    },
    showneed(name, code){
      this.dialogFormVisible = true;
      this.serviceName = name;
      this.serviceCode = code;
    },
    toZzsbzc(name, code){
      if (code) {
        this.$root.pushx({
          title: "自主商标注册",
          name: "/selftmreg",
          params: { itemCode: code }
        });
      } else {
        this.$message.warning("产品编码错误");
      }
    },
    styleset(obj){
      var that = this;
      that.widthnumber = 1200 / that.datalist.length + "px";
      console.log("width:", that.widthnumber);
      if (that.itemtype == obj) {
        return { width: that.widthnumber, color: '#2692FF' };
      } else {
        return { width: that.widthnumber, color: '#B2B2B2' };
      }
    },
    change(obj, key){
      this.tabKey = key;
      this.itemtype = obj;
      this.styleset();
    },
    findAllServicesitemA(){
      /*this.company_id=this.$root.currentCompany.id;*/
      var params = { company_id: this.$root.currentCompany ? this.$root.currentCompany.id : "" };
      var that = this;

      that.company_id = that.$root.currentCompany.id;
      that.popupsData = [];
      if (productLst) {
        productLst.forEach(r => {
          if (r) {
            that.popupsData.push(r);
          }
          that.popupsDataList = that.popupsData[0].smallList;
        });
        console.log(that.popupsDataList, "....................L0");
        that.datalist = that.popupsData;
        that.$root.popupsType = true;
        $("#header").addClass("headtransparent");
        $("#welcome").css("color", "#fff");
        $("#exitbtn").css("color", "#fff");
        $("#adminbtn").css("color", "#fff");
        $('.nav_color').css("color", '#fff');

        that.$root.popupsData = that.popupsData;
        that.$root.popupsDataList = that.popupsDataList;

      }

    },
    /**首页图片上传 */
    uploadImg(e, num) {
      console.log("++++++++133333+++++++++++++");
      var file = e.target.files[0];
      if (!/\.(gif|jpg|jpeg|png|bmp|GIF|JPG|PNG)$/.test(e.target.value)) {
        alert('图片类型必须是.gif,jpeg,jpg,png,bmp中的一种');
        return false;
      }
      $('#wave-container').css('display', 'none');
      console.log("file");
      console.log(file);
      console.log(e);
      this.picName = file.name;
      var reader = new FileReader();
      var that = this;
      reader.onload = (e) => {
        var data = null;
        if (typeof e.target.result === 'object') {
          data = window.URL.createObjectURL(new Blob([e.target.result]));
        } else {
          data = e.target.result;
        }

        if (num == 1) {
          this.option.img = data;
        } else if (num == 2) {
          this.example2.img = data;
        }
        var image = new Image();
        image.src = data;
        image.onload = function () {
          that.option.autoCropWidth = image.width;
          that.option.autoCropHeight = image.height;
          console.log("+++++++++++++++++++++++++");
          console.log(that.option.autoCropWidth, that.option.autoCropHeight);
        };
      };
      reader.readAsArrayBuffer(file);
      this.show = true;
      var _input = $('#uploads');
      _input.val('');
    },
    hideCropper: function() {
      var _input = $('#uploads');
      _input.val('');
      this.show = false;
      this.option.img = "";
    },
    realTime: function(data) {
      this.previews = data;
      console.log(data);
    },
    imgLoad: function(msg) {
      console.log("imgLoad");
      console.log(msg);
    },
    submit: function() {
      var that = this;
      this.$refs.cropper.getCropData((data) => {
        this.$root.postReq("/web/toolCtl/getCropperPic", { base64: data }).then(function (d) {
          console.log("dddddddddddddgetCropperPic");
          console.log(d);
          if (d) {
            that.show = false;
            that.imageUrl = d;
            that.tag.name = that.picName;
            var obj = {
              imageUrl: d,
              tag: that.picName,
              imagetype: that.ImageSelectedValue,
            };
            console.log(obj, "!!!!!!!!!!!!!!!!!!!!!!!!!!1");
            that.$root.pushx({
              title: "",
              name: "/bycquerytm",
              params: { imageSearch: JSON.stringify(obj) }
            });
          };
        }).catch(function (e) {
          console.log(e);
        });


      });


    },

    imagequery(){
      if (this.imageUrl == "" || this.imageUrl == null) {
        this.$message.warning(`操作失败，请选择图片后重新操作`);
        return false;
      }
      this.imageupurl = this.imageUrl;
      var msg = {
        cls: "bytmqueryCtl",
        method: "imagequery",
        data: { "imageUrl": this.imageUrl }
      };
      var that = this;
      this.tmRegistNums = [];
      this.sqlbtab = "";
      this.sqlbtabkey = "";
      this.sqlbtabkeycount = "";
      this.flzttab = "";
      this.flzttabkey = "";
      this.flzttabkeycount = "";
      this.sqnftabkey = "";
      this.sqnftabkeycount = "";
      console.log(msg);
      this.checkedXcl = [];
      var obj = {
        imageUrl: this.imageUrl,
        imagetype: this.ImageSelectedValue,
      };
      console.log(obj, "nnnnnnnnnnnnnnnnnnnn");
      const loadingbyc = this.$loading({
        lock: true,
        text: 'Loading',
        spinner: 'el-icon-loading',
        background: 'rgba(255, 255, 255, 0.7)'
      });
      this.$root.postReq("/web/bytmqueryCtl/imagequery", obj).then(function (d) {
        that.tmRegistNumsAll = d.data.rows;
        that.sqlbdata = d.data.code_counts;
        that.flztdata = d.data.status_counts;
        that.sqnfdata = d.data.year_counts;
        that.imagesqlbdata = d.data.code_counts;
        that.imageflztdata = d.data.status_counts;
        that.imagesqnfdata = d.data.year_counts;
        that.imagecount = d.data.count;
        that.pageChanged(36, 1);
      }).catch(function (e) {
        console.log(e);
        that.$message.warning(`操作失败，请刷新页面后重新操作`);
        loadingbyc.close();
      });
      this.c = false;
      this.img = true;
    },
  },
  computed: {
  },
  vname: "gsb-moreservice"
}
