{"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\\headlineAI.vue?vue&type=script&lang=js&","dependencies":[{"path":"D:\\jenkins\\workspace\\sfz-lh-fvue\\src\\views\\BigScreen\\headlineAI.vue","mtime":1705604912221},{"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\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 props: {\r\n AITitle: {\r\n type: String,\r\n required: true,\r\n },\r\n },\r\n data() {\r\n return {\r\n sysName: '',\r\n logoUrl: '',\r\n timenow: '',\r\n daynow: '',\r\n weathernow: '',\r\n weatherIcon: '',\r\n hournow: '',\r\n timer: null,\r\n }\r\n },\r\n mounted() {\r\n this.getSysInfo()\r\n this.getTimeNow()\r\n // this.getWeather()\r\n },\r\n activated() {},\r\n methods: {\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 // 退出登陆\r\n handleHomePage() {\r\n this.$router.push({\r\n path: '/homePage',\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 // 获取天气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]}