{"remainingRequest":"D:\\jenkins\\workspace\\sfz-lh-fvue\\node_modules\\vue-loader\\lib\\index.js??vue-loader-options!D:\\jenkins\\workspace\\sfz-lh-fvue\\src\\views\\BigScreen\\headline.vue?vue&type=script&lang=js&","dependencies":[{"path":"D:\\jenkins\\workspace\\sfz-lh-fvue\\src\\views\\BigScreen\\headline.vue","mtime":1706209714475},{"path":"D:\\jenkins\\workspace\\sfz-lh-fvue\\node_modules\\babel-loader\\lib\\index.js","mtime":315532800000},{"path":"D:\\jenkins\\workspace\\sfz-lh-fvue\\node_modules\\cache-loader\\dist\\cjs.js","mtime":499162500000},{"path":"D:\\jenkins\\workspace\\sfz-lh-fvue\\node_modules\\vue-loader\\lib\\index.js","mtime":499162500000}],"contextDependencies":[],"result":["//\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//\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\r\nimport commomAPI from '@/api/bigScreen/common.js'\r\nimport routerManagement from '@/api/BasicDataManagement/tollStationManagement.js'\r\nimport utils from '@/utils'\r\nimport moment from 'moment'\r\nexport default {\r\n name: 'bigScreen',\r\n data() {\r\n return {\r\n searchTime: moment().format('YYYY-MM'),\r\n sysName: '',\r\n logoUrl: '',\r\n menuData: [],\r\n workPlatMenu: [],\r\n showWorkPlat: false,\r\n timenow: '',\r\n daynow: '',\r\n weathernow: '',\r\n activeIndex: '1',\r\n weatherIcon: '',\r\n hournow: '',\r\n workPlatData: [],\r\n menuActived: '',\r\n timer: null,\r\n showWorkSys: false,\r\n showWorkSysMask: false,\r\n tollStationId: '',\r\n tollStationOptions: [], // 收费站数据\r\n }\r\n },\r\n mounted() {\r\n this.menuActived = this.$route.name\r\n this.getSysInfo()\r\n this.getTimeNow()\r\n // this.getWeather()\r\n this.getMenu()\r\n },\r\n activated() {\r\n this.loadTollStation()\r\n this.menuActived = this.$route.name\r\n this.tollStationId = sessionStorage.getItem('tollStationId')\r\n },\r\n methods: {\r\n showtip() {\r\n this.$parent.showTip()\r\n },\r\n // 收费站\r\n loadTollStation() {\r\n let params = {\r\n pageBean: {\r\n page: 1,\r\n pageSize: -1,\r\n },\r\n }\r\n this.tollStationId = sessionStorage.getItem('tollStationId')\r\n routerManagement.queryTollStation(params).then((res) => {\r\n let data = res.data\r\n this.tollStationOptions = data.rows || []\r\n if (!this.tollStationId) {\r\n this.tollStationId = this.tollStationOptions[0].id\r\n sessionStorage.setItem('tollStationId', this.tollStationId)\r\n this.$emit('changeTollStation')\r\n }\r\n })\r\n },\r\n // 收费站信息\r\n changeTollStation(val) {\r\n sessionStorage.setItem('tollStationId', val)\r\n this.$emit('changeTollStation')\r\n },\r\n // 获取年月\r\n changeMonth(val) {\r\n this.$emit('changeMonth', val.format('yyyy-MM'))\r\n this.showtip()\r\n },\r\n // 获取系统信息\r\n getSysInfo() {\r\n let sysinfo = sessionStorage.getItem('sysinfo')\r\n if (sysinfo) {\r\n sysinfo = JSON.parse(sysinfo)\r\n this.logoUrl = sysinfo.logoUrl\r\n this.sysName = sysinfo.sysName\r\n } else {\r\n let url =\r\n '${uc}/uc/tenantManage/v1/getTenantByCode?code=platform'\r\n this.$http.get(url).then((resp) => {\r\n if (resp.data) {\r\n let tenantManage = resp.data\r\n this.sysName = tenantManage.nameFront\r\n if (tenantManage.frontLogo) {\r\n let frontLogo = JSON.parse(tenantManage.frontLogo)\r\n if (frontLogo && frontLogo.length > 0) {\r\n this.logoUrl =\r\n window.context.portal +\r\n '/file/onlinePreviewController/v1/getFileById_' +\r\n frontLogo[0].id\r\n\r\n let sysinfo = {\r\n logoUrl: this.logoUrl,\r\n sysName: this.sysName,\r\n }\r\n sessionStorage.setItem(\r\n 'sysinfo',\r\n JSON.stringify(sysinfo)\r\n )\r\n }\r\n }\r\n }\r\n })\r\n }\r\n },\r\n getWeather() {\r\n let ss = sessionStorage.getItem('weathernow')\r\n if (ss) {\r\n this.getWeatherIcon(JSON.parse(ss))\r\n } else {\r\n commomAPI\r\n .queryWeather()\r\n .then((res) => {\r\n console.log('res', res)\r\n // console.log('获取的数据' + res.data.lives[0].weather)\r\n this.weathernow = res.data.lives[0].weather\r\n this.getWeatherIcon(this.weathernow)\r\n sessionStorage.setItem(\r\n 'weathernow',\r\n JSON.stringify(this.weathernow)\r\n )\r\n })\r\n .catch((err) => {\r\n console.log('err', err)\r\n })\r\n }\r\n },\r\n getMenu() {\r\n this.$store.dispatch('menu/actionFrontMenus').then((data) => {\r\n let bigScreen =\r\n data && data.filter((item) => item.alias === 'bigScreen')\r\n if (bigScreen[0].children.length !== 0) {\r\n bigScreen[0].children.forEach((item) => {\r\n if (item.alias != 'workPlat') {\r\n this.menuData.push(item)\r\n } else {\r\n this.workPlatMenu.push(item)\r\n }\r\n })\r\n if (this.workPlatMenu.length) this.showWorkPlat = true\r\n }\r\n })\r\n },\r\n // 切换不同大屏菜单\r\n enterMenu(alias) {\r\n if (alias == 'workPlat') {\r\n return\r\n } else {\r\n this.$router.push({\r\n path: '/' + alias,\r\n })\r\n }\r\n },\r\n // 切换工作台\r\n changeNormal(item) {\r\n console.log('我切换了', item)\r\n if (item.alias == 'normal') {\r\n if (\r\n item.children[0].length !== 0 &&\r\n item.children[0].children.length\r\n ) {\r\n this.$router.push({\r\n path: `/platLayout/${item.children[0].children[0].alias}`,\r\n })\r\n } else {\r\n this.$router.push({\r\n path: `/platLayout/${item.children[0].alias}`,\r\n })\r\n }\r\n } else if (item.alias.indexOf('href') !== -1) {\r\n window.open(item.href, '_blank')\r\n }\r\n },\r\n // 其他系统\r\n handleSys() {\r\n // setTimeout(() => {\r\n // this.showWorkSysMask = !this.showWorkSysMask\r\n // }, 500)\r\n if (this.showWorkSysMask) {\r\n this.showWorkSys = !this.showWorkSys\r\n setTimeout(() => {\r\n this.showWorkSysMask = false\r\n }, 400)\r\n } else {\r\n this.showWorkSysMask = !this.showWorkSysMask\r\n setTimeout(() => {\r\n this.showWorkSys = !this.showWorkSys\r\n }, 100)\r\n }\r\n },\r\n // 退出登陆\r\n handleLogout() {\r\n this.$store.dispatch('menu/clearMenus')\r\n this.$store.dispatch('user/clearUser')\r\n this.$store.dispatch('menu/setCopyMenus', []) //菜单\r\n let loginRouthPath =\r\n localStorage.getItem(\r\n this.$store.state.login.currentUser.account +\r\n 'loginRoutePath'\r\n ) || '/login'\r\n this.$store.dispatch('login/logoutAndCleanUp').then(() => {\r\n switch (window.ssoConfig.mode) {\r\n case 'cas':\r\n case 'oauth':\r\n window.sessionStorage.removeItem('currentUser')\r\n window.location.href =\r\n window.ssoConfig.logout +\r\n '?service=' +\r\n window.location.href.split('?')[0]\r\n break\r\n default:\r\n this.$router.push({\r\n path: loginRouthPath,\r\n })\r\n break\r\n }\r\n })\r\n },\r\n // 实时获取\r\n getTimeNow() {\r\n this.daynow = moment().format('YYYY年MM月DD日')\r\n this.timenow = moment().format('HH:mm:ss')\r\n this.timer = setInterval(() => {\r\n this.timenow = moment().format('HH:mm:ss')\r\n }, 1000)\r\n },\r\n clear() {\r\n clearInterval(this.timer)\r\n },\r\n // 工作台二级菜单\r\n handleSelect(key, keyPath) {\r\n console.log(key, keyPath)\r\n },\r\n // 获取天气icon\r\n getWeatherIcon(weather) {\r\n this.hournow = moment().format('hh') // 获取时间 判断半天黑夜\r\n this.weathernow = weather\r\n if (\r\n this.hournow > 6 &&\r\n this.hournow < 19 &&\r\n this.weathernow == '晴'\r\n ) {\r\n this.weatherIcon = require('@/assets/img/weather/qing.png')\r\n } else if (\r\n this.hournow > 6 &&\r\n this.hournow < 19 &&\r\n this.weathernow == '多云的'\r\n ) {\r\n this.weatherIcon = require('@/assets/img/weather/duoyun.png')\r\n } else if (this.weathernow == '阴') {\r\n this.weatherIcon = require('@/assets/img/weather/yin.png')\r\n } else if (this.weathernow == '霾') {\r\n this.weatherIcon = require('@/assets/img/weather/yin.png')\r\n } else if (this.weathernow == '雷阵雨') {\r\n this.weatherIcon = require('@/assets/img/weather/leizhenyu.png')\r\n } else if (this.weathernow == '雨') {\r\n this.weatherIcon = require('@/assets/img/weather/xiaoyu.png')\r\n } else if (this.weathernow == '小雨') {\r\n this.weatherIcon = require('@/assets/img/weather/xiaoyu.png')\r\n } else if (this.weathernow == '中雨') {\r\n this.weatherIcon = require('@/assets/img/weather/zhongyu.png')\r\n } else if (this.weathernow == '大雨') {\r\n this.weatherIcon = require('@/assets/img/weather/dayu.png')\r\n } else if (this.weathernow == '暴雨') {\r\n this.weatherIcon = require('@/assets/img/weather/baoyu.png')\r\n } else if (this.weathernow == '大暴雨') {\r\n this.weatherIcon = require('@/assets/img/weather/baoyu.png')\r\n } else if (\r\n this.weathernow == '中雨-大雨' ||\r\n this.weathernow == '小雨-中雨' ||\r\n this.weathernow == '大雨-暴雨' ||\r\n this.weathernow == '暴雨-大暴雨'\r\n ) {\r\n this.weatherIcon = require('@/assets/img/weather/dayu.png')\r\n } else if (this.weathernow.indexOf('风') != -1) {\r\n this.weatherIcon = require('@/assets/img/weather/dafeng.png')\r\n } else if (\r\n this.hournow < 6 &&\r\n this.hournow > 19 &&\r\n this.weathernow == '多云都'\r\n ) {\r\n this.weatherIcon = require('@/assets/img/weather/duoyunye.png')\r\n } else if (\r\n this.hournow < 6 &&\r\n this.hournow > 19 &&\r\n this.weathernow == '晴'\r\n ) {\r\n this.weatherIcon = require('@/assets/img/weather/qingye.png')\r\n } else {\r\n this.weatherIcon = require('@/assets/img/weather/yin.png')\r\n }\r\n },\r\n beforeDestroy() {\r\n this.clear()\r\n },\r\n },\r\n}\r\n",null]}