{
    template:'${tmpl}',
    data:function(){
        return {
          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: '集团公司'
          }],
          activeName: 'second',
          summerTabs: 1,
          restaurants:[
            
          ]
        }
    },
    mounted:function(){
      this.$root.showHeadLogo();
      this.$root.headerRowType = true;

      var sself=this;
        var f=function(){
          var own=sself;
          var t=setTimeout(()=>{
          if(own.$root.currentCompany){
              /*own.findAllServicesitemA();*/
              clearTimeout(t);
          }else{
              f();
          }
          },1000);
        };
        f();
    },
    created:function(){
  
      $('#header').show();
    },
    methods:{
      createFilter(queryString) {
        return (restaurant) => {
          return (restaurant.value != '');
        };
      },
      querySearch(queryString, cb) {
        var obj = {
            name: queryString
        };
        var that = this;
        this.$root.postReq("/web/companyportraitCtl/phonequery",obj).then(d=>{
            if(d && d.status==0){
              console.log(d,'--------------------------------');
              if (d.data.rows.lenght != 0) {
                this.restaurants = d.data.rows;
                var restaurants = d.data.rows;
                var results = queryString ? restaurants.filter(that.createFilter(queryString)) : restaurants;
                cb(results);
              }
            }
        }).catch(e=>{
        });
        
      },
      handleIconClick(ev) {
        console.log(ev);
        this.$root.pushx({
          title:"企业画像",
          name:"/entdrawing",
          params:{"obj": ev}
        });
      },
      handleSelect(item) {
        console.log(item);
        this.$root.pushx({
          title:"企业画像",
          name:"/entdrawing",
          params:{"obj": item}
        });
      },
      handleClick(tab, event) {
        console.log(tab, event);
      },
      placeAnOrder () {
        this.$root.pushx({
          title:"企业工商注册",
          name:"/icnameresult"
        });
      },
      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'
            });
          }
        
      },
      summerDetails () {
        this.$root.pushx({
          title:"工商商品详情",
          name:"/icproductdetail"
        });
      },
      showneed(name,code){
        this.dialogFormVisible=true;
        this.serviceName=name;
        this.serviceCode=code;		
      }
    },
    computed:{
    },
    vname:"gsb-moreservice"
}
