diff --git a/yanzhu-bigscreen/src/api/index.js b/yanzhu-bigscreen/src/api/index.js index 90877d10..f9074947 100644 --- a/yanzhu-bigscreen/src/api/index.js +++ b/yanzhu-bigscreen/src/api/index.js @@ -1,8 +1,10 @@ import {axios,download} from '@/utils/request' import project from './project' +import weather from './weather' export default { http:axios, downFile:download, - project + project, + weather } \ No newline at end of file diff --git a/yanzhu-bigscreen/src/api/weather.js b/yanzhu-bigscreen/src/api/weather.js new file mode 100644 index 00000000..9e2ae8ab --- /dev/null +++ b/yanzhu-bigscreen/src/api/weather.js @@ -0,0 +1,28 @@ +import request from "@/utils/request"; + + +const getByCity = (id) => { + return request({ + url: "/manage/weather/city/"+id, + method: "get", + }); + }; + +const getCityInfo = () => { +return request({ + url: "/manage/weather/getCityInfo", + method: "get", +}); +}; + +const getCityNowInfo = (id) => { + return request({ + url: "/manage/weather/getCityNowInfo/"+id, + method: "get", + }); + }; +export default { + getByCity, + getCityInfo, + getCityNowInfo +} \ No newline at end of file diff --git a/yanzhu-bigscreen/src/assets/icons/svg/humidity.svg b/yanzhu-bigscreen/src/assets/icons/svg/humidity.svg new file mode 100644 index 00000000..f956d0c4 --- /dev/null +++ b/yanzhu-bigscreen/src/assets/icons/svg/humidity.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/yanzhu-bigscreen/src/assets/icons/svg/precipitation.svg b/yanzhu-bigscreen/src/assets/icons/svg/precipitation.svg new file mode 100644 index 00000000..cbdd0e3f --- /dev/null +++ b/yanzhu-bigscreen/src/assets/icons/svg/precipitation.svg @@ -0,0 +1,5 @@ + + \ No newline at end of file diff --git a/yanzhu-bigscreen/src/assets/icons/svg/pressure.svg b/yanzhu-bigscreen/src/assets/icons/svg/pressure.svg new file mode 100644 index 00000000..90e2533e --- /dev/null +++ b/yanzhu-bigscreen/src/assets/icons/svg/pressure.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/yanzhu-bigscreen/src/assets/icons/svg/wind.svg b/yanzhu-bigscreen/src/assets/icons/svg/wind.svg new file mode 100644 index 00000000..8a6aa820 --- /dev/null +++ b/yanzhu-bigscreen/src/assets/icons/svg/wind.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/yanzhu-bigscreen/src/components-old/people-number.vue b/yanzhu-bigscreen/src/components/people-number.vue similarity index 86% rename from yanzhu-bigscreen/src/components-old/people-number.vue rename to yanzhu-bigscreen/src/components/people-number.vue index 004f9fb6..6dccccc2 100644 --- a/yanzhu-bigscreen/src/components-old/people-number.vue +++ b/yanzhu-bigscreen/src/components/people-number.vue @@ -1,7 +1,7 @@ - + {{unit}} diff --git a/yanzhu-bigscreen/src/views/init.js b/yanzhu-bigscreen/src/views/init.js index 357e1ffa..b32cf3e2 100644 --- a/yanzhu-bigscreen/src/views/init.js +++ b/yanzhu-bigscreen/src/views/init.js @@ -12,6 +12,7 @@ import moduleOne13 from '../components/module/module-one-1-3.vue' import moduleOne21 from '../components/module/module-one-2-1.vue' import moduleOne22 from '../components/module/module-one-2-2.vue' import moduleOne23 from '../components/module/module-one-2-3.vue' +import peopleNumber from '@/components/people-number.vue' import MyDialog from '@/components/MyDialog.vue' //import projectOverviewChart from '../components/project-overview-chart.vue' //import peopleNumber from '../components/people-number.vue' @@ -27,6 +28,7 @@ Vue.component("module-one-1-3",moduleOne13) Vue.component("module-one-2-1",moduleOne21) Vue.component("module-one-2-2",moduleOne22) Vue.component("module-one-2-3",moduleOne23) +Vue.component("people-number",peopleNumber) Vue.component("MyDialog",MyDialog) Vue.prototype.$bus=new Vue(); //Vue.component("people-number",peopleNumber) diff --git a/yanzhu-bigscreen/src/views/projectDetail.vue b/yanzhu-bigscreen/src/views/projectDetail.vue index 8cc500b8..fa9d55a3 100644 --- a/yanzhu-bigscreen/src/views/projectDetail.vue +++ b/yanzhu-bigscreen/src/views/projectDetail.vue @@ -359,17 +359,139 @@ - - + + + + + + + + + + + + + 计划:{{ item.planEndDate || "---" }} + + + 实际:{{ item.endDate || "--" }} + + + {{ item.finish }} + + + + + + + + + + - + + + + 安全生产 + + + + 第 + 天 + + + + 环境监测 + + + + + + 今天 + {{ weathers[0].weather }} + + {{ weathers[0].highTemp }} ~ {{ weathers[0].lowTemp }} + + + 明天 + {{ weathers[1].weather }} + + {{ weathers[1].highTemp }} ~ {{ weathers[1].lowTemp }} + + + 后天 + {{ weathers[2].weather }} + + {{ weathers[2].highTemp }} ~ {{ weathers[2].lowTemp }} + + + + + + + + + + 当前气压 + + {{ weatherInfo.pressure }} + hPa + + + + + + + + + 当前湿度 + + {{ weatherInfo.humidity }} + % + + + + + + + + + + + + 当前降雨量 + + {{ weatherInfo.precipitation }} + mm + + + + + + + + + 当前风向 + + {{ weatherInfo.windDirection }}{{ weatherInfo.windScale + }} + + + + + + + + - - - @@ -378,6 +500,7 @@