{
    template: '${tmpl}',
      data: function() {
        return {
          total: 0,
          state2: '',
          show2: false,
          policyArr: [],
          recommendationsArr: [],
          policyOptions: [{
            value: '北京东方飞扬软件股份有限公司',
            label: '北京东方飞扬软件股份有限公司'
          }],
          policyValue: '',
          transformNumber: 0,
          portrayalArr: [],
          zctext: '',
          detailPageType: true,
          recommendationsObj: {},
          recommendationsObjBefore: {},
          recommendationsObjAfter: {},
          companyObj: {},
          rKey: null,
          zcoName: '',
          activeNames: ['1'],
          headerHeight: true,
          headerHeight1: true,
          headerHeight2: true,
          headerHeight3: true,
          headerHeight4: true,
          headerHeight5: true,
          headerHeight6: true,
          headerHeight7: true,
          headerHeight8: true,
          headerHeight9: true,
          areaName:'',
          input1:'',
          input2:'',
          input3:'',
          input4:'',
          input5:'',
          input6:'',
          input7:'',
          input8:'',
          input9:'',
          quanbu:'',
          imgurls:[
           {
            'path':'https://gsb-zc.oss-cn-beijing.aliyuncs.com//zc_44810157502884567420192920045674declare_tuisong.png'
           },
           {
            'path':'https://gsb-zc.oss-cn-beijing.aliyuncs.com//zc_44810157502884567420192920045674declare_tuisong.png'
           }
          ],
          loopplays: [
            { leftimg: 'https://gsb-zc.oss-cn-beijing.aliyuncs.com//zc_44810157502884567420192920045674declare_tuisong.png' 
          },
            {
              leftimg: 'https://gsb-zc.oss-cn-beijing.aliyuncs.com//zc_44810157502884567420192920045674declare_tuisong.png'
            }
          ],
          quanData1:[
          {
            title:'申报通知',
            count:'3054'
          },
          {
            title:'立项公示',
            count:'100'
           
          },
          {
            title:'政策图解',
            count:'200'
            
          },
          {
            title:'政务信息',
            count:'300'
           
          },
         {
            title:'新闻资讯(69)',
            count:'400'
         }
          ],
          tableData1: [
            '北京',
            '天津',
            '上海',
            '重庆',
            '河北',
            '河南',
            '云南',
            '辽宁',
            '黑龙江',
            '湖南',
            '安徽',
            '山东',
            '江苏',
            '浙江',
            '江西',
            '湖北',
            '新疆维吾尔族自治区',
            '广西壮族自治区',
            '甘肃',
            '山西',
            '陕西',
            '内蒙古自治区',
            '吉林',
            '福建',
            '贵州',
            '广东',
            '青海',
            '西藏自治区',
            '夏回族自治区',
            '四川'
          ],
          tableData2:[
            '部委',
            '省级',
            '市级',
            '区级'
          ],
          tableData3:[
            '发改部门',
            '教育部门',
            '科学技术部门',
            '工业和信息化部门',
            '人社部门',
            '生态环境部门',
            '交通运输部门',
            '农业农村部门',
            '商务部门',
            '文化和旅游部门',
            '知识产权部门',
            '财政部门',
            '税务部门',
            '国防科技部门',
            '开发区/高新区/自贸区',
            '市场监督部门',
            '其他部门'
          ],
          tableData4:[
            '资质荣誉',
            '事前补助',
            '研发费补助',
            '奖励',
            '贷款信息',
            '担保补助',
            '投资补贴',
            '税收优惠',
            '创业补贴',
            '人才补贴'
          ],
          tableData5:[
            '事业单位',
            '企业单位',
            '社会组织'
          ],
          tableData6:[
            '工业',
            '建筑业',
             '金融业',
             '农、林、牧、渔业',
             '软件、信息传输和信息技术服务业',
             '住宿和餐饮业',
             '批发和零售业',
             '现代服务业',
             '租赁和商业服务业',
             '交通运输、仓储和邮政业',
             '教育和卫生业',
             '文化、体育和娱乐业',
             '房地产和物业管理业',
             '水利、环境和公共设施管理业',
             '公共管理、社会保障、社会和国际组织',
             '电力、热力、燃气及水生产和供应业',
             '其他'
          ],
          tableData7:[
            '普惠(创新券/社保补贴/创业补贴等)',
            '科技创新',
            '人才类',
            '资质认定',
            '商贸业/电子商务/交通/现代物流',
            '税收优惠',
            '技术改造',
            '智能制造',
            '现代服务业',
            '工程中心/技术中心/实验室/研发机构',
            '金融补贴',
            '首台/首套',
            '绿色建筑',
            '创客空间/孵化器/产业园/科技园',
            '生物医药',
            '航空航天',
            '奖项评选',
            '知识产权/知识产权金融',
            '专精特新/瞪羚/小巨人/独角兽',
            '公共/示范平台',
            '龙头/标杆/骨干/示范企业',
            '租金/展会/制定标准补贴',
            '产品认定',
            '其他'
          ],
          tableData8:[
            '基础与应用基础研究',
            '社会民生',
            '现代服务业',
            '高新技术领域',
             '新一代信息技术产业',
             '战略性新兴产业',
             '未来产业',
             '创业补贴',
             '人才补贴'
          ],
          tableData9:[
            '2019',
            '2018',
            '2017',
            '2016',
            '2015',
            '2014',
            '2013'
          ],
          colorList:[{
              bgColor:"#EDEEFA",
              fontColor:"#5B65D3"
          },{
              bgColor:"#FDF2EC",
              fontColor:"#FC835A"
          },{
              bgColor:"#FFEBF5",
              fontColor:"#FF75B3"
          },{
              bgColor:"#E1EDFB",
              fontColor:"#3CACFF"
          },{
              bgColor:"#E0F4E8",
              fontColor:"#54D02F"
          },{
              bgColor:"#E8F7F9",
              fontColor:"#30BBCE"
          }]
        }
      },
  
    methods: {
      rgba() {
        var color = this.colorList[Math.floor(Math.random()*this.colorList.length)];
        return `color:${color.fontColor};background-color:${color.bgColor}`;
      },
      inputDel(input) {
          console.log(input);
        this[input] = '';
        this.zcPost()
      },
      tableDataClick1(val) {
        console.log(val);
        if (val == undefined) {
          console.log(123123123123);
            val = ''
        };
        this.input1 = val;
        this.zcPost()
      },
      quanClick1(val) {
        console.log(val);
        if (val == undefined) {
          console.log(123123123123);
            val = ''
        };
        this.quanbu = val;
      },
      tableDataClick2(val) {
        console.log(val);
        if (val == undefined) {
            val = ''
        };
        this.input2 = val;
        this.zcPost()
      },
      tableDataClick3(val) {
        console.log(val);
        if (val == undefined) {
            val = ''
        };
        this.input3 = val;
        this.zcPost()
      },
      tableDataClick4(val) {
        console.log(val);
        if (val == undefined) {
            val = ''
        };
        this.input4 = val;
        this.zcPost()
      },
      tableDataClick5(val) {
        console.log(val);
        if (val == undefined) {
            val = ''
        };
        this.input5 = val;
        this.zcPost()
      },
      tableDataClick6(val) {
        console.log(val);
        if (val == undefined) {
            val = ''
        };
        this.input6 = val;
        this.zcPost()
      },
      tableDataClick7(val) {
        console.log(val);
        if (val == undefined) {
            val = ''
        };
        this.input7 = val;
        this.zcPost()
      },
      tableDataClick8(val) {
        console.log(val);
        if (val == undefined) {
            val = ''
        };
        this.input8 = val;
        this.zcPost()
      },
      tableDataClick9(val) {
        console.log(val);
        if (val == undefined) {
            val = ''
        };
        this.input9 = val;
        this.zcPost()
      },
      search() {
        this.zcPost()
      },
      handleCurrentChange(val) {
        this.zcPost(val)
      },
      consulting () {
        this.$confirm('提交后会有政策解读专家与您联系，为您进行一对一免费解答，请 确认是否提交？', '政策咨询', {
          confirmButtonText: '确定',
          cancelButtonText: '取消',
          type: ''
        }).then(() => {
          this.$message({
            type: 'success',
            message: '提交成功!'
          });
        }).catch(() => {
          this.$message({
            type: 'info',
            message: '已取消提交'
          });          
        });
      },
      articleDetails(obj) {
        this.detailPageType = false;
        scrollTo(0,0);
        this.recommendationsObj = obj;
        this.portrayalArr = obj.hx_list;
        console.log(this.portrayalArr,'11111111111111');
        axios.post('http://43.247.184.92:8018/gsb/api/zcdetailcount',{
          "ID": obj.ID,
          "count":0
        }).then( d => {
          console.log(d,'=================================');
          var data = d.data.data;
          this.recommendationsArr = data
        })
      },
      /*before(i) {
        this.rKey = i-1;
      },
      after(i) {
        this.rKey = i+1;
      },*/
      next () {
        this.detailPageType = true;
        this.zccompanyPost();
        this.zcPost()
      },
      LookHome() {
        this.zccompanyPost();
        this.zcPost()
        /* this.recommendationsArr = this.recommendationsArr1*/
      },
      LookCompany(i) {
        this.companyObj = i;
        /*this.recommendationsArr = this.recommendationsArr2*/
        this.zcoName = i.name;
        this.zccompanyNamePost()
      },
      color16(){
              var r = Math.floor(Math.random()*256);
              var g = Math.floor(Math.random()*256);
              var b = Math.floor(Math.random()*256);
              var color = 'background-color:' + '#'+r.toString(16)+g.toString(16)+b.toString(16);
              return color;
          },
      rgb(){
              var r = Math.floor(Math.random()*256);
              var g = Math.floor(Math.random()*256);
              var b = Math.floor(Math.random()*256);
        var rgb = 'color:' + 'rgba('+r+','+g+','+b+', 1)'  + ';' + 'background-color:' + 'rgba('+r+','+g+','+b+', 0.3)';
              return rgb;
          },
      leftswiperList () {
        console.log(this.$refs.swiperList.offsetWidth);
        if (this.transformNumber < 0) {
          this.transformNumber = this.transformNumber + 360;
          this.$refs.swiperList.style.transform = 'translateX(' + this.transformNumber + 'px) scale(1)';
        }
      },
      rightswiperList () {
        if ((this.$refs.swiperList.offsetWidth - Math.abs(this.transformNumber)) > this.$refs.swiperMain.offsetWidth) {
          this.transformNumber = this.transformNumber - 360;
          this.$refs.swiperList.style.transform = 'translateX(' + this.transformNumber + 'px) scale(1)';
        }
      },
      zccompanyNamePost() {
        axios.post('http://43.247.184.92:8018/gsb/api/zccompany_name',{
          "company_name": this.zcoName
        }).then( d => {
          console.log(d,'=================================');
          var data = d.data.data;
          this.portrayalArr = d.data.company_keys;
          this.recommendationsArr = data
        })
      },
      zcPost(size) {
        /*http://43.247.184.92:8018/gsb/api/zc*/
        axios.post('http://43.247.184.92:8019/gsb/api/zc',{
            "zctext": this.zctext,
            "currentpage": size || 1,
            "pagesize":15,
            "cityname": this.input1, 
            "policygrade": this.input2,
            "policydepartment": this.input3,
            "policytype": this.input4,
            "qiye": this.input5,
            "classification": this.input6,
            "policydomain": this.input7,
            "fieldtext": this.input8,
            "year": this.input9,
            "address":this.areaName
        }).then( d => {
          console.log(d,'---------------------------------');
          var data = d.data.data;
          this.recommendationsArr = data;
          this.total = d.data.total;
          this.tableData1 = d.data.cityname_list;
          console.log(this.recommendationsArr,12312312321);
        })
      },
      zccompanyPost() {
        axios.post('http://43.247.184.92:8018/gsb/api/zccompany',{}).then( d => {
          console.log(d);
          var data = d.data.data;
          this.portrayalArr = data
        })
      },
      getCompanyListPost() {
        /*function getLocalTime(nS) { 
          let date = new Date(nS);
          let year = date.getFullYear();
          let month = date.getMonth()+1;
          let day = date.getDate();
          month = month < 10 ? "0"+month:month;
          day = day < 10 ? "0"+day:day;
          date = year+'-'+month+'-'+day;
          return date;
        };*/
        var that = this;
        this.$root.postReq("/web/tmquery/toolCtl/getCompanyList", {}).then(function (d) {
          console.log(d, "//////////////////////////");
          var data = d.data;
          that.policyArr = [];
          for (let i = 0; i < data.length; i++) {
            data[i]['logo'] = data[i].name.substr(0, 4);
            that.policyArr.push(data[i]);
          };
          console.log(that.policyArr)
        }).catch(function (e) {
          console.log(`操作失败，请刷新页面后重新操作`);
        });
      }
    },
    mounted: function() {
      $("#footer").show();
      /*for (let i = 0; i < this.portrayalArr.length; i++) {
        this.portrayalArr[i].col = this.rgb();
      };*/
      this.areaName = localStorage.getItem("areaName");
      this.zcPost();
      this.zccompanyPost();
    },
    vname: "gsb-policyquery"
  }
  