{"remainingRequest":"D:\\jenkins\\workspace\\jd_cgpt_fvue\\node_modules\\thread-loader\\dist\\cjs.js!D:\\jenkins\\workspace\\jd_cgpt_fvue\\node_modules\\babel-loader\\lib\\index.js!D:\\jenkins\\workspace\\jd_cgpt_fvue\\node_modules\\cache-loader\\dist\\cjs.js??ref--0-0!D:\\jenkins\\workspace\\jd_cgpt_fvue\\node_modules\\vue-loader\\lib\\index.js??vue-loader-options!D:\\jenkins\\workspace\\jd_cgpt_fvue\\src\\views\\BigScreen\\headline.vue?vue&type=script&lang=js&","dependencies":[{"path":"D:\\jenkins\\workspace\\jd_cgpt_fvue\\src\\views\\BigScreen\\headline.vue","mtime":1701745912029},{"path":"D:\\jenkins\\workspace\\jd_cgpt_fvue\\node_modules\\cache-loader\\dist\\cjs.js","mtime":499162500000},{"path":"D:\\jenkins\\workspace\\jd_cgpt_fvue\\node_modules\\thread-loader\\dist\\cjs.js","mtime":499162500000},{"path":"D:\\jenkins\\workspace\\jd_cgpt_fvue\\node_modules\\babel-loader\\lib\\index.js","mtime":315532800000},{"path":"D:\\jenkins\\workspace\\jd_cgpt_fvue\\node_modules\\cache-loader\\dist\\cjs.js","mtime":499162500000},{"path":"D:\\jenkins\\workspace\\jd_cgpt_fvue\\node_modules\\vue-loader\\lib\\index.js","mtime":499162500000}],"contextDependencies":[],"result":["import \"core-js/modules/es6.regexp.split\";\nimport \"core-js/modules/web.dom.iterable\";\nimport \"core-js/modules/es6.function.name\";\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\nimport commomAPI from '@/api/bigScreen/common.js';\nimport utils from '@/utils';\nimport moment from 'moment';\nexport default {\n name: 'bigScreen',\n data: function data() {\n return {\n menuData: [],\n workPlatMenu: [],\n showWorkPlat: false,\n timenow: '',\n daynow: '',\n weathernow: '',\n activeIndex: '1',\n weatherIcon: '',\n hournow: '',\n workPlatData: [],\n menuActived: '',\n timer: null\n };\n },\n mounted: function mounted() {\n this.menuActived = this.$route.name;\n this.getTimeNow();\n this.getWeather();\n this.getMenu();\n },\n methods: {\n getWeather: function getWeather() {\n var _this = this;\n\n var ss = sessionStorage.getItem('weathernow');\n\n if (ss) {\n this.getWeatherIcon(JSON.parse(ss));\n } else {\n commomAPI.queryWeather().then(function (res) {\n console.log('res', res); // console.log('获取的数据' + res.data.lives[0].weather)\n\n _this.weathernow = res.data.lives[0].weather;\n\n _this.getWeatherIcon(_this.weathernow);\n\n sessionStorage.setItem('weathernow', JSON.stringify(_this.weathernow));\n }).catch(function (err) {\n console.log('err', err);\n });\n }\n },\n getMenu: function getMenu() {\n var _this2 = this;\n\n this.$store.dispatch('menu/actionFrontMenus').then(function (data) {\n var bigScreen = data && data.filter(function (item) {\n return item.alias === 'bigScreen';\n });\n\n if (bigScreen[0].children.length !== 0) {\n bigScreen[0].children.forEach(function (item) {\n if (item.alias != 'workPlat') {\n _this2.menuData.push(item);\n } else {\n _this2.workPlatMenu.push(item);\n }\n });\n if (_this2.workPlatMenu.length) _this2.showWorkPlat = true;\n }\n });\n },\n // 切换不同大屏菜单\n enterMenu: function enterMenu(alias) {\n if (alias == 'workPlat') {\n return;\n } else {\n this.$router.push({\n path: '/' + alias\n });\n }\n },\n // 切换工作台\n changeNormal: function changeNormal(item) {\n console.log('我切换了', item);\n\n if (item.alias == 'normal') {\n if (item.children[0].length !== 0 && item.children[0].children.length) {\n this.$router.push({\n path: \"/platLayout/\".concat(item.children[0].children[0].alias)\n });\n } else {\n this.$router.push({\n path: \"/platLayout/\".concat(item.children[0].alias)\n });\n }\n }\n },\n // 退出登陆\n handleLogout: function handleLogout() {\n var _this3 = this;\n\n this.$store.dispatch('menu/clearMenus');\n this.$store.dispatch('user/clearUser');\n this.$store.dispatch('menu/setCopyMenus', []); //菜单\n\n var loginRouthPath = localStorage.getItem(this.$store.state.login.currentUser.account + 'loginRoutePath') || '/login';\n this.$store.dispatch('login/logoutAndCleanUp').then(function () {\n switch (window.ssoConfig.mode) {\n case 'cas':\n case 'oauth':\n window.sessionStorage.removeItem('currentUser');\n window.location.href = window.ssoConfig.logout + '?service=' + window.location.href.split('?')[0];\n break;\n\n default:\n _this3.$router.push({\n path: loginRouthPath\n });\n\n break;\n }\n });\n },\n // 实时获取\n getTimeNow: function getTimeNow() {\n var _this4 = this;\n\n this.daynow = moment().format('YYYY年MM月DD日');\n this.timenow = moment().format('hh:mm:ss');\n this.timer = setInterval(function () {\n _this4.timenow = moment().format('hh:mm:ss');\n }, 1000);\n },\n clear: function clear() {\n clearInterval(this.timer);\n },\n // 工作台二级菜单\n handleSelect: function handleSelect(key, keyPath) {\n console.log(key, keyPath);\n },\n // 获取天气icon\n getWeatherIcon: function getWeatherIcon(weather) {\n this.hournow = moment().format('hh'); // 获取时间 判断半天黑夜\n\n this.weathernow = weather;\n\n if (this.hournow > 6 && this.hournow < 19 && this.weathernow == '晴') {\n this.weatherIcon = require('@/assets/img/weather/qing.png');\n } else if (this.hournow > 6 && this.hournow < 19 && this.weathernow == '多云') {\n this.weatherIcon = require('@/assets/img/weather/duoyun.png');\n } else if (this.weathernow == '阴') {\n this.weatherIcon = require('@/assets/img/weather/yin.png');\n } else if (this.weathernow == '霾') {\n this.weatherIcon = require('@/assets/img/weather/yin.png');\n } else if (this.weathernow == '雷阵雨') {\n this.weatherIcon = require('@/assets/img/weather/leizhenyu.png');\n } else if (this.weathernow == '雨') {\n this.weatherIcon = require('@/assets/img/weather/xiaoyu.png');\n } else if (this.weathernow == '小雨') {\n this.weatherIcon = require('@/assets/img/weather/xiaoyu.png');\n } else if (this.weathernow == '中雨') {\n this.weatherIcon = require('@/assets/img/weather/zhongyu.png');\n } else if (this.weathernow == '大雨') {\n this.weatherIcon = require('@/assets/img/weather/dayu.png');\n } else if (this.weathernow == '暴雨') {\n this.weatherIcon = require('@/assets/img/weather/baoyu.png');\n } else if (this.weathernow == '大暴雨') {\n this.weatherIcon = require('@/assets/img/weather/baoyu.png');\n } else if (this.weathernow == '中雨-大雨' || this.weathernow == '小雨-中雨' || this.weathernow == '大雨-暴雨' || this.weathernow == '暴雨-大暴雨') {\n this.weatherIcon = require('@/assets/img/weather/dayu.png');\n } else if (this.weathernow.indexOf('风') != -1) {\n this.weatherIcon = require('@/assets/img/weather/dafeng.png');\n } else if (this.hournow < 6 && this.hournow > 19 && this.weathernow == '多云') {\n this.weatherIcon = require('@/assets/img/weather/duoyunye.png');\n } else if (this.hournow < 6 && this.hournow > 19 && this.weathernow == '晴') {\n this.weatherIcon = require('@/assets/img/weather/qingye.png');\n } else {\n this.weatherIcon = require('@/assets/img/weather/yin.png');\n }\n },\n beforeDestroy: function beforeDestroy() {\n this.clear();\n }\n }\n};",null]}