{"remainingRequest":"/data/jenkins/workspace/badp-bcxin-web-5.x-vue/node_modules/vue-loader/lib/index.js??vue-loader-options!/data/jenkins/workspace/badp-bcxin-web-5.x-vue/src/components/homeWelcome.vue?vue&type=script&lang=js","dependencies":[{"path":"/data/jenkins/workspace/badp-bcxin-web-5.x-vue/src/components/homeWelcome.vue","mtime":1732847429511},{"path":"/data/jenkins/workspace/badp-bcxin-web-5.x-vue/node_modules/cache-loader/dist/cjs.js","mtime":499162500000},{"path":"/data/jenkins/workspace/badp-bcxin-web-5.x-vue/node_modules/thread-loader/dist/cjs.js","mtime":499162500000},{"path":"/data/jenkins/workspace/badp-bcxin-web-5.x-vue/node_modules/babel-loader/lib/index.js","mtime":456789000000},{"path":"/data/jenkins/workspace/badp-bcxin-web-5.x-vue/node_modules/cache-loader/dist/cjs.js","mtime":499162500000},{"path":"/data/jenkins/workspace/badp-bcxin-web-5.x-vue/node_modules/vue-loader/lib/index.js","mtime":499162500000}],"contextDependencies":[],"result":["\nimport {getNowFormatDateCN,currDateTimeHMS,getNowFormatDate,diffDate} from '@/utils/global.js'\nexport default {\n inject:['addTab'],\n data(){\n return{\n city:'',\n cityInfo:{},\n weatherImg:'',\n network: true,\n sun:require('@/assets/images/other/sun.png'),\n cloud:require('@/assets/images/other/cloud.png'),\n cloudy:require('@/assets/images/other/cloudy.png'),\n dust:require('@/assets/images/other/dust.png'),\n haze:require('@/assets/images/other/haze.png'),\n hail:require('@/assets/images/other/hail.png'),\n rain:require('@/assets/images/other/rain.png'),\n rainsnow:require('@/assets/images/other/rainsnow.png'),\n ray:require('@/assets/images/other/ray.png'),\n snow:require('@/assets/images/other/snow.png'),\n nowDate:'',\n nowTime:'',\n timer: \"\",//定义一个定时器的变量,\n greetings:'',//问候语\n hiredDateToNow:'',\n hiredDate:'',\n getAnnouncementFirst:{title:''},\n bannerArr:[], //广告\n homeTemplateBoradType:localStorage.getItem('homeTemplateBoradType')||'payTemplate',\n bjzw:null,\n }\n },\n created() {\n console.log(this.$root.user)\n this.network = __network__\n if(this.network){\n this.getLocation(); \n }\n this.timer=setInterval(()=>{\n this.nowDate=getNowFormatDateCN()\n this.nowTime=currDateTimeHMS()\n this.greetingsStr() //问候语 \n },1000) \n this.employeesInfo()//在职员工信息\n this.getAnnouncementList()//获取工作台3.0公告\n\n this.AppMarketBannerlist()//广告列表 \n \n },\n mounted() {\n if(location.hostname.indexOf('bj.baibaodun.cn')>-1){//北京政务外网隐藏您已入职一行字符\n this.bjzw=true\n }else{\n this.bjzw=false\n }\n },\n beforeDestroy(){\n if (this.timer) {\n clearInterval(this.timer); // 在Vue实例销毁前,清除我们的定时器\n }\n },\n methods: {\n greetingsStr(){\n let HH=this.nowTime.split(\":\")[0]\n if(HH>='0'&&HH<='05'){\n this.greetings='凌晨好!'\n }else if(HH>='06'&&HH<='11'){\n this.greetings='上午好!'\n }else if(HH>='12'&&HH<='13'){\n this.greetings='中午好!'\n }else if(HH>='14'&&HH<='17'){\n this.greetings='下午好!'\n }else if(HH>='18'&&HH<='23'){\n this.greetings='晚上好!'\n }\n },\n employeesInfo(){\n let data={\n organizationId:localStorage.getItem(\"domainId\")||'',\n id:localStorage.getItem(\"employeeId\")||''\n }\n this.$api.v3employeesInfoApi(data,{\n onSucess: response => {\n if(response.data.data){\n this.hiredDate=response.data.data.hiredDate\n console.log(this.hiredDate)\n this.hiredDateToNow=diffDate(response.data.data.hiredDate,getNowFormatDate())\n }\n }\n })\n },\n getAnnouncementList(){\n let data={\n organizationId:localStorage.getItem(\"domainId\")||'',\n id:localStorage.getItem(\"employeeId\")||''\n }\n this.$api.getAnnouncement({\n onSucess: response => {\n if(response.data.data){\n console.log(response.data.data)\n if(response.data.data.datas.length){\n this.getAnnouncementFirst=response.data.data.datas[0]\n }else{\n this.getAnnouncementFirst={} \n }\n }\n }\n })\n },\n AnnouncementRedirect(){\n var param={\n id:\"ad\",\n name:'公告',\n linkType:'ad',\n actionContent:\"\",\n notice:this.notice,\n icon:\"\",\n key:\"\"\n }\n this.addTab(param)\n },\n getLocation(){\n let self = this;\n AMap.plugin('AMap.Geolocation', function () {\n var geolocation = new AMap.Geolocation({\n // 是否使用高精度定位,默认:true\n enableHighAccuracy: true,\n // 设置定位超时时间,默认:无穷大\n timeout: 10000\n });\n \n geolocation.getCurrentPosition();\n AMap.event.addListener(geolocation, 'complete', onComplete);\n AMap.event.addListener(geolocation, 'error', onError);\n \n function onComplete (data) {\n // data是具体的定位信息\n console.log('定位成功信息:', data.addressComponent.city);\n self.city = data.addressComponent.city;\n AMap.plugin('AMap.Weather', function() {\n console.log(self.city)\n var weather = new AMap.Weather();\n weather.getLive(self.city, function(err, data) {\n if (!err) {\n console.log(data)\n self.cityInfo=data\n if(data.weather.indexOf('晴')>-1){\n self.weatherImg=self.sun\n }else if(data.weather.indexOf('云')>-1){\n self.weatherImg=self.cloud\n }else if(data.weather.indexOf('阴')>-1){\n self.weatherImg=self.cloudy\n }else if(data.weather.indexOf('沙')>-1){\n self.weatherImg=self.dust\n }else if(data.weather.indexOf('雾')>-1){\n self.weatherImg=self.haze\n }else if(data.weather.indexOf('霾')>-1){\n self.weatherImg=self.haze\n }else if(data.weather.indexOf('雹')>-1){\n self.weatherImg=self.hail\n }else if(data.weather=='雨夹雪'){\n self.weatherImg=self.rainsnow\n }else if(data.weather=='雷雨'){\n self.weatherImg=self.ray\n }else if(data.weather.indexOf('雪')>-1){\n self.weatherImg=self.snow\n }else if(data.weather.indexOf('雨')>-1){\n self.weatherImg=self.rain\n }else{\n self.weatherImg=self.cloud\n }\n }\n })\n }) \n }\n \n function onError (data) {\n // 定位出错\n console.log('定位失败错误:', data);\n self.city=''//定位失败隐藏\n // 调用IP定位\n self.getLngLatLocation();\n }\n }); \n },\n getLngLatLocation () {// 通过IP获取当前位置\n AMap.plugin('AMap.CitySearch', function () {\n var citySearch = new AMap.CitySearch();\n citySearch.getLocalCity(function (status, result) {\n if (status === 'complete' && result.info === 'OK') {\n // 查询成功,result即为当前所在城市信息\n console.log('通过ip获取当前城市:', result);\n // 逆向地理编码\n AMap.plugin('AMap.Geocoder', function () {\n var geocoder = new AMap.Geocoder({\n // city 指定进行编码查询的城市,支持传入城市名、adcode 和 citycode\n city: result.adcode\n });\n \n var lnglat = result.rectangle.split(';')[0].split(',');\n geocoder.getAddress(lnglat, function (status, data) {\n if (status === 'complete' && data.info === 'OK') {\n // result为对应的地理位置详细信息\n console.log(data);\n }\n });\n });\n }\n });\n });\n },\n\n AppMarketBannerlist(){//广告列表\n // let options={\n // target:document.querySelector(\".homeAdvert\"), \n // text: '加载中...',\n // spinner: 'el-icon-loading',\n // }\n // const loading = Loading.service(options);//开始加载\n this.$api.AppMarketBannerlistApi({},{ \n onSucess: response => {\n // this.$nextTick(() => { // 以服务的方式调用的 Loading 需要异步关闭\n // loading.close();//关闭加载\n // });\n console.log('banner______________',response.data.data.data)\n if(response.data.data.data){\n let Arry=[]\n response.data.data.data.forEach(item=>{\n var obj={}\n obj.name=item.items['__f1dc2wtiu1VnfSPzQse'].value //标题\n obj.pic=item.items['__cMLE2QENXQjNp1sWHE6'].value&&JSON.parse(item.items['__cMLE2QENXQjNp1sWHE6'].value)[0].path //图片\n obj.appid=item.items['__qPv375wKiySlNqrRlEi'].value //应用id-跳转到详情页面\n obj.imgsort=item.items['__XkErrW7l1lWDQVE29vq'].value //图片排序\n Arry.push(obj) \n })\n this.bannerArr=Arry\n console.log(this.bannerArr)\n }\n }\n })\n },\n applidetaillink(obj){//进入详情\n var param={\n id:\"applicationMarket\",\n name:'应用市场',\n linkType:'applicationMarket',\n actionContent:\"\",\n icon:\"-1\",\n key:\"\"\n }\n this.addTab(param)//监听传递给父元素---重要父子传递 \n }, \n\n },\n}\n",null]}