{"remainingRequest":"/data/jenkins/workspace/test-v5inweb-5.x-vue/node_modules/thread-loader/dist/cjs.js!/data/jenkins/workspace/test-v5inweb-5.x-vue/node_modules/babel-loader/lib/index.js!/data/jenkins/workspace/test-v5inweb-5.x-vue/node_modules/cache-loader/dist/cjs.js??ref--0-0!/data/jenkins/workspace/test-v5inweb-5.x-vue/node_modules/vue-loader/lib/index.js??vue-loader-options!/data/jenkins/workspace/test-v5inweb-5.x-vue/src/components/homeWelcome.vue?vue&type=script&lang=js&","dependencies":[{"path":"/data/jenkins/workspace/test-v5inweb-5.x-vue/src/components/homeWelcome.vue","mtime":1739760944318},{"path":"/data/jenkins/workspace/test-v5inweb-5.x-vue/babel.config.js","mtime":1739760943855},{"path":"/data/jenkins/workspace/test-v5inweb-5.x-vue/node_modules/cache-loader/dist/cjs.js","mtime":499162500000},{"path":"/data/jenkins/workspace/test-v5inweb-5.x-vue/node_modules/thread-loader/dist/cjs.js","mtime":499162500000},{"path":"/data/jenkins/workspace/test-v5inweb-5.x-vue/node_modules/babel-loader/lib/index.js","mtime":315532800000},{"path":"/data/jenkins/workspace/test-v5inweb-5.x-vue/node_modules/cache-loader/dist/cjs.js","mtime":499162500000},{"path":"/data/jenkins/workspace/test-v5inweb-5.x-vue/node_modules/vue-loader/lib/index.js","mtime":1655715099000}],"contextDependencies":[],"result":["import \"core-js/modules/web.dom.iterable\";\nimport \"core-js/modules/es6.regexp.split\";\nimport { getNowFormatDateCN, currDateTimeHMS, getNowFormatDate, diffDate } from '@/utils/global.js';\nexport default {\n inject: ['addTab'],\n data: function 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 //定义一个定时器的变量,\n greetings: '',\n //问候语\n hiredDateToNow: '',\n hiredDate: '',\n getAnnouncementFirst: {\n title: ''\n },\n bannerArr: [],\n //广告\n homeTemplateBoradType: localStorage.getItem('homeTemplateBoradType') || 'payTemplate',\n bjzw: null\n };\n },\n created: function created() {\n var _this = this;\n this.network = __network__;\n if (this.network) {\n this.getLocation();\n }\n this.timer = setInterval(function () {\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 mounted: function mounted() {\n if (location.hostname.indexOf('bj.baibaodun.cn') > -1) {\n //北京政务外网隐藏您已入职一行字符\n this.bjzw = true;\n } else {\n this.bjzw = false;\n }\n },\n beforeDestroy: function beforeDestroy() {\n if (this.timer) {\n clearInterval(this.timer); // 在Vue实例销毁前,清除我们的定时器\n }\n },\n methods: {\n greetingsStr: function greetingsStr() {\n var 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: function employeesInfo() {\n var _this2 = this;\n var data = {\n organizationId: localStorage.getItem(\"domainId\") || '',\n id: localStorage.getItem(\"employeeId\") || ''\n };\n this.$api.v3employeesInfoApi(data, {\n onSucess: function onSucess(response) {\n if (response.data.data) {\n _this2.hiredDate = response.data.data.hiredDate;\n _this2.hiredDateToNow = diffDate(response.data.data.hiredDate, getNowFormatDate());\n }\n }\n });\n },\n getAnnouncementList: function getAnnouncementList() {\n var _this3 = this;\n var data = {\n organizationId: localStorage.getItem(\"domainId\") || '',\n id: localStorage.getItem(\"employeeId\") || ''\n };\n this.$api.getAnnouncement({\n onSucess: function onSucess(response) {\n if (response.data.data) {\n if (response.data.data.datas.length) {\n _this3.getAnnouncementFirst = response.data.data.datas[0];\n } else {\n _this3.getAnnouncementFirst = {};\n }\n }\n }\n });\n },\n AnnouncementRedirect: function 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: function getLocation() {\n var 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 geolocation.getCurrentPosition();\n AMap.event.addListener(geolocation, 'complete', onComplete);\n AMap.event.addListener(geolocation, 'error', onError);\n function onComplete(data) {\n // data是具体的定位信息\n\n self.city = data.addressComponent.city;\n AMap.plugin('AMap.Weather', function () {\n var weather = new AMap.Weather();\n weather.getLive(self.city, function (err, data) {\n if (!err) {\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 function onError(data) {\n // 定位出错\n\n self.city = ''; //定位失败隐藏\n // 调用IP定位\n self.getLngLatLocation();\n }\n });\n },\n getLngLatLocation: function getLngLatLocation() {\n // 通过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\n // 逆向地理编码\n AMap.plugin('AMap.Geocoder', function () {\n var geocoder = new AMap.Geocoder({\n // city 指定进行编码查询的城市,支持传入城市名、adcode 和 citycode\n city: result.adcode\n });\n var lnglat = result.rectangle.split(';')[0].split(',');\n geocoder.getAddress(lnglat, function (status, data) {\n if (status === 'complete' && data.info === 'OK') {}\n });\n });\n }\n });\n });\n },\n AppMarketBannerlist: function AppMarketBannerlist() {\n var _this4 = this;\n //广告列表\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: function onSucess(response) {\n // this.$nextTick(() => { // 以服务的方式调用的 Loading 需要异步关闭\n // loading.close();//关闭加载\n // });\n\n if (response.data.data.data) {\n var Arry = [];\n response.data.data.data.forEach(function (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 _this4.bannerArr = Arry;\n }\n }\n });\n },\n applidetaillink: function applidetaillink(obj) {\n //进入详情\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};",null]}