// document.writeln("<div id = app>");
// document.writeln("				<header>");
// document.writeln("							<div class=\'a\'>");
// document.writeln("								<div class=\'container\'>");
// document.writeln("									<div class=\'tool\'>");
// document.writeln("										<div class=\'fr\'>");
// document.writeln("											<a href=\'\' target=\'_blank\'></a>");
// document.writeln("				");
// document.writeln("										</div>");
// document.writeln("										");
// document.writeln("										<!-- <script src=\'static/js/time.js\'></script> -->");
// document.writeln("										<div class=\'loca\'>");
// document.writeln("											<span> 欢迎访问 安徽省刷制品质量监督检验中心 !  今天{{date_show}} {{week}}</span>");
// document.writeln("										</div>");
// document.writeln("										 <div class=\'srch\'><input type=\'text\' class=\'tt\' placeholder=\'输入要查找的信息\' v-model=\'inpute\' @blur=\'inpubie\'/> <img");
// document.writeln("												src=\'static/picture/icon_ztl_ss@2x.png\' @click=\'nhyesee\'> </div>");
// document.writeln("									</div>");
// document.writeln("								</div>");
// document.writeln("							</div>");
// document.writeln("							<div class=\'b\'>");
// document.writeln("								<div class=\'container\'>");
// document.writeln("									<div class=\'logo\'>");
// document.writeln("										 <a href=\'javascript:void(0)\'><img src=\'static/picture/pic_hp_dh_logo@2x.png\' alt=\'\' /></a>");
// document.writeln("									</div>");
// document.writeln("									<div class=\'frs fr\'  v-if=\'hyew == true\' >");
// document.writeln("										<div class=  \'menu _list\'>");
// document.writeln("											<ul>");
// document.writeln("												<li  v-for=\'item,index in tablide\'  :key=\'index\' @click=\'tabcl(index,item.id)\'>");
// document.writeln("													<div :class=\'[ nue == index ? \'on\' : \'\' , \'i\' ]\'>");
// document.writeln("														<p><a :href=\'ulrw\'>{{item.label}}</a></p>");
// document.writeln("														<div class=\'ex\' v-for=\'(items,indexs) in item.children\' :key=\'indexs + \'y\'\'  v-if=\'item.children\' @click.stop=\'jeuese(items.id)\'>");
// document.writeln("															 <p><a :href=\'ulrw\'>{{items.label}}</a></p>");
// document.writeln("															 <!-- jggk.html -->");
// document.writeln("															 <!-- <p><a href=\'zzhjg.html\'>组织架构</a></p> -->");
// document.writeln("														</div>");
// document.writeln("													</div>");
// document.writeln("												</li>");
// document.writeln("												");
// document.writeln("											</ul>");
// document.writeln("										</div>");
// document.writeln("									</div>");
// document.writeln("									<a href=\'\' class=\'mbtn pc-hide\'></a>");
// document.writeln("								</div>");
// document.writeln("							</div>");
// document.writeln("						</header>");
// document.writeln("			</div>");
// <script type="text/javascript">

		var app = new Vue({
		  el: '#appse',
		  data: {
		    message: 'Hello Vue!',
			inpute:'',
			tablide:[],
			hyew:false,
			nue:"首页",
			week:'',
			date_show:'',
			ulrw:'',
			mjuede:'',
			hyesfr:'',
			tiles:'',
			heyseks:'',
		  },
		  created() {
		  	// console.log(234)
			this.getdataTime()
			this.gettablist()
			// Vue.$forceUpdate();
		  },
		  mounted(optio) {
			  this.tiles = decodeURI(this.getQueryString("titel"))
			  this.heyseks = decodeURI(this.getQueryString("ntitel"))
			  this.nue = this.heyseks
		  	// console.log(this.getQueryString("id"))
		  	// this.gettablist()
		  },
		  methods:{
			  gettablist(){
				  var that = this
				  $.ajax({
					  url:'http://118.31.23.65:5001/dev-api/gateway/query/treeselect',
					  type:'get',
					  data:'',
					  dataType:'json',
					  success:function(res){
						console.log(res,765) 
						if(res.code == 200){
							that.tablide = res.data
							that.hyew = true
						}else{
							that.$message({
							          message: res.msg,
							          type: 'error'
							        });
						}
						console.log(that.tablide,765) 
					  }
				  })
			  },
			  inpubie(){
				  console.log(this.inpute)
			  },
			  nhyesee(){
				  console.log(this.inpute)
				  let  nhye= this.inpute + ''
				  // let iyew = JSON.parse(nhye)
				  // console.log(iyew)
				  window.location.href = "ss.html?" + encodeURI(nhye)
 
			  },
			  tabcl(val,index){
				  this.nue = index
				  if(index == "首页"){
					 window.location.href="index.html?ntitel=首页"
				  }
				  console.log(val,index)
			  },
			  jeuese(index){  
				  if(index.label=='报告查询'){
					   window.location.href="bgcx.html"
				  }else if(index.label=='网上送检'){
					  window.location.href="wshsj.html"
				  }else{
					 window.location.href="djdt.html?id=" + index.id +'&titel=' + index.label + '&ntitel=' + this.hyesfr  + '&openMode=' + index.openMode 
				  }
				  // console.log(index.label)
				 //  if(index == 25 || index == 26 ||index ==33 || index ==33 || index == 20 || index ==21 || index==24){
				 //  window.location.href="jgjj.html?id=" + index +'&titel=' + val + '&ntitel=' + this.hyesfr
				 //  }else if(index == 32){
					// window.location.href="jcfanw.html?id=" + index +'&titel=' + val + '&ntitel=' + this.hyesfr  
				 //  }else if(index == 34){
					// window.location.href="zzhnl.html?id=" + index +'&titel=' + val + '&ntitel=' + this.hyesfr  
				 //  }
				  
				  // else {
					// window.location.href="djdt.html?id=" + index.id +'&titel=' + index.label + '&ntitel=' + this.hyesfr  + '&openMode=' + index.openMode
				  // }
				  // if(index == 1){
					 //  // this.$router.push('/index.html');
				  // 					this.ulrw = index.html
				  // }else{
				  // 					this.ulrw = 'djdt.html?id=' + index
				  // }
			  },
			  dheyfr(val){
				  console.log(val)
				  this.hyesfr = val
			  },
			  getdataTime(){
			  	      let wk = new Date().getDay()  
			  	      let yy = new Date().getFullYear();
			  	      let mm = new Date().getMonth() + 1;
			  	      let dd = new Date().getDate();
			  	      let weeks = ['星期日', '星期一', '星期二', '星期三', '星期四', '星期五', '星期六']
			  	      this.week = weeks[wk]
			  	      this.date_show = yy + "年" + mm + "月" + dd + "日"
			  	    },
					// 获取路由参数
					getQueryString(name) {
					     try {
					            var reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)");
					            var r = window.location.href.split('?')[1].match(reg);
								console.log(reg,r)
					            if(r != null) {
					              return r[2];
					            }
					            return "";//如果此处只写return;则返回的是undefined
					        } catch(e) {
					            return "";//如果此处只写return;则返回的是undefined
					        }
					},
					 
		  }
		})
		
		
		    
