|
@@ -205,6 +205,7 @@ export default {
|
|
|
WeatherdataArray: [],
|
|
|
isCake: false,
|
|
|
isWeather: false,
|
|
|
+ baseId: this.$route.query.id || 1,
|
|
|
}
|
|
|
},
|
|
|
computed: {},
|
|
@@ -267,131 +268,177 @@ export default {
|
|
|
console.log(`start, end`, start, end)
|
|
|
},
|
|
|
getWeatherForecast() {
|
|
|
- return this.$http.get(`/api/weatherForecast`).then((res) => {
|
|
|
- const area = []
|
|
|
- const dataArray = {
|
|
|
- temperature: [],
|
|
|
- Weather: [],
|
|
|
- }
|
|
|
- res.forEach((element) => {
|
|
|
- area.push(element.时间)
|
|
|
- dataArray.temperature.push(element.温度)
|
|
|
- dataArray.Weather.push(element.天气)
|
|
|
+ return this.$http
|
|
|
+ .get(`/api/weatherForecast`, {
|
|
|
+ params: {
|
|
|
+ districtId: this.baseId,
|
|
|
+ },
|
|
|
+ })
|
|
|
+ .then((res) => {
|
|
|
+ if (res) {
|
|
|
+ const area = []
|
|
|
+ const dataArray = {
|
|
|
+ temperature: [],
|
|
|
+ Weather: [],
|
|
|
+ }
|
|
|
+ res.forEach((element) => {
|
|
|
+ area.push(element.时间)
|
|
|
+ dataArray.temperature.push(element.温度)
|
|
|
+ dataArray.Weather.push(element.天气)
|
|
|
+ })
|
|
|
+ this.Weatherarea = area
|
|
|
+ this.WeatherdataArray = dataArray
|
|
|
+ this.isWeather = true
|
|
|
+ }
|
|
|
})
|
|
|
- this.Weatherarea = area
|
|
|
- this.WeatherdataArray = dataArray
|
|
|
- this.isWeather = true
|
|
|
- })
|
|
|
},
|
|
|
getTrendOfTransplantQuantityThisMonth() {
|
|
|
- this.$http.get(`/api/transplantTrendAnalysis`).then((res) => {
|
|
|
- const area = []
|
|
|
- const dataArray = {
|
|
|
- LastYear: [],
|
|
|
- thisYear: [],
|
|
|
- comparisonLastDay: [],
|
|
|
- comparisonLastYear: [],
|
|
|
- }
|
|
|
- res.forEach((element) => {
|
|
|
- area.push(element.时间)
|
|
|
- dataArray.LastYear.push(element.去年)
|
|
|
- dataArray.thisYear.push(element.今年)
|
|
|
- dataArray.comparisonLastDay.push(element.较上日)
|
|
|
- dataArray.comparisonLastYear.push(element.较去年)
|
|
|
+ this.$http
|
|
|
+ .get(`/api/transplantTrendAnalysis`, {
|
|
|
+ params: {
|
|
|
+ districtId: this.baseId,
|
|
|
+ },
|
|
|
+ })
|
|
|
+ .then((res) => {
|
|
|
+ if (res) {
|
|
|
+ const area = []
|
|
|
+ const dataArray = {
|
|
|
+ LastYear: [],
|
|
|
+ thisYear: [],
|
|
|
+ comparisonLastDay: [],
|
|
|
+ comparisonLastYear: [],
|
|
|
+ }
|
|
|
+ res.forEach((element) => {
|
|
|
+ area.push(element.时间)
|
|
|
+ dataArray.LastYear.push(element.去年)
|
|
|
+ dataArray.thisYear.push(element.今年)
|
|
|
+ dataArray.comparisonLastDay.push(element.较上日)
|
|
|
+ dataArray.comparisonLastYear.push(element.较去年)
|
|
|
+ })
|
|
|
+ this.monthTrendarea = area
|
|
|
+ this.monthTrendDataArray = dataArray
|
|
|
+ this.isMonthTrend = true
|
|
|
+ }
|
|
|
})
|
|
|
- this.monthTrendarea = area
|
|
|
- this.monthTrendDataArray = dataArray
|
|
|
- this.isMonthTrend = true
|
|
|
- })
|
|
|
},
|
|
|
getMonthlyTransplantationAreaAnalysis() {
|
|
|
- this.$http.get(`/api/monthlyTransplantationAreaAnalysis`).then((res) => {
|
|
|
- const area = []
|
|
|
- const dataArray = {
|
|
|
- LastYear: [],
|
|
|
- thisYear: [],
|
|
|
- comparisonLastDay: [],
|
|
|
- comparisonLastYear: [],
|
|
|
- }
|
|
|
- res.forEach((element) => {
|
|
|
- area.push(element.时间)
|
|
|
- dataArray.LastYear.push(element.去年)
|
|
|
- dataArray.thisYear.push(element.今年)
|
|
|
- dataArray.comparisonLastDay.push(element.较上日)
|
|
|
- dataArray.comparisonLastYear.push(element.较去年)
|
|
|
+ this.$http
|
|
|
+ .get(`/api/monthlyTransplantationAreaAnalysis`, {
|
|
|
+ params: {
|
|
|
+ districtId: this.baseId,
|
|
|
+ },
|
|
|
+ })
|
|
|
+ .then((res) => {
|
|
|
+ if (res) {
|
|
|
+ const area = []
|
|
|
+ const dataArray = {
|
|
|
+ LastYear: [],
|
|
|
+ thisYear: [],
|
|
|
+ comparisonLastDay: [],
|
|
|
+ comparisonLastYear: [],
|
|
|
+ }
|
|
|
+ res.forEach((element) => {
|
|
|
+ area.push(element.时间)
|
|
|
+ dataArray.LastYear.push(element.去年)
|
|
|
+ dataArray.thisYear.push(element.今年)
|
|
|
+ dataArray.comparisonLastDay.push(element.较上日)
|
|
|
+ dataArray.comparisonLastYear.push(element.较去年)
|
|
|
+ })
|
|
|
+ this.monthTrendAnalysearea = area
|
|
|
+ this.monthTrendAnalyseDataArray = dataArray
|
|
|
+ this.isAnalyseMonthTrend = true
|
|
|
+ }
|
|
|
})
|
|
|
- this.monthTrendAnalysearea = area
|
|
|
- this.monthTrendAnalyseDataArray = dataArray
|
|
|
- this.isAnalyseMonthTrend = true
|
|
|
- })
|
|
|
},
|
|
|
getThisYearsTransplantingDataTrend() {
|
|
|
- this.$http.get(`/api/thisYearsTransplantingDataTrend`).then((res) => {
|
|
|
- const area = []
|
|
|
- const dataArray = {
|
|
|
- LastYear: [],
|
|
|
- thisYear: [],
|
|
|
- comparisonLastDay: [],
|
|
|
- comparisonLastYear: [],
|
|
|
- }
|
|
|
- res.forEach((element) => {
|
|
|
- area.push(element.时间)
|
|
|
- dataArray.LastYear.push(element.去年)
|
|
|
- dataArray.thisYear.push(element.今年)
|
|
|
- dataArray.comparisonLastDay.push(element.较上日)
|
|
|
- dataArray.comparisonLastYear.push(element.较去年)
|
|
|
+ this.$http
|
|
|
+ .get(`/api/thisYearsTransplantingDataTrend`, {
|
|
|
+ params: {
|
|
|
+ districtId: this.baseId,
|
|
|
+ },
|
|
|
+ })
|
|
|
+ .then((res) => {
|
|
|
+ if (res) {
|
|
|
+ const area = []
|
|
|
+ const dataArray = {
|
|
|
+ LastYear: [],
|
|
|
+ thisYear: [],
|
|
|
+ comparisonLastDay: [],
|
|
|
+ comparisonLastYear: [],
|
|
|
+ }
|
|
|
+ res.forEach((element) => {
|
|
|
+ area.push(element.时间)
|
|
|
+ dataArray.LastYear.push(element.去年)
|
|
|
+ dataArray.thisYear.push(element.今年)
|
|
|
+ dataArray.comparisonLastDay.push(element.较上日)
|
|
|
+ dataArray.comparisonLastYear.push(element.较去年)
|
|
|
+ })
|
|
|
+ this.yearTrendarea = area
|
|
|
+ this.yearTrendDataArray = dataArray
|
|
|
+ this.isYearTrend = true
|
|
|
+ }
|
|
|
})
|
|
|
- this.yearTrendarea = area
|
|
|
- this.yearTrendDataArray = dataArray
|
|
|
- this.isYearTrend = true
|
|
|
- })
|
|
|
},
|
|
|
getAnalysisOfAnnualTransplantArea() {
|
|
|
- this.$http.get(`/api/analysisOfAnnualTransplantArea`).then((res) => {
|
|
|
- const area = []
|
|
|
- const dataArray = {
|
|
|
- LastYear: [],
|
|
|
- thisYear: [],
|
|
|
- comparisonLastDay: [],
|
|
|
- comparisonLastYear: [],
|
|
|
- }
|
|
|
- res.forEach((element) => {
|
|
|
- area.push(element.时间)
|
|
|
- dataArray.LastYear.push(element.去年)
|
|
|
- dataArray.thisYear.push(element.今年)
|
|
|
- dataArray.comparisonLastDay.push(element.较上日)
|
|
|
- dataArray.comparisonLastYear.push(element.较去年)
|
|
|
+ this.$http
|
|
|
+ .get(`/api/analysisOfAnnualTransplantArea`, {
|
|
|
+ params: {
|
|
|
+ districtId: this.baseId,
|
|
|
+ },
|
|
|
+ })
|
|
|
+ .then((res) => {
|
|
|
+ if (res) {
|
|
|
+ const area = []
|
|
|
+ const dataArray = {
|
|
|
+ LastYear: [],
|
|
|
+ thisYear: [],
|
|
|
+ comparisonLastDay: [],
|
|
|
+ comparisonLastYear: [],
|
|
|
+ }
|
|
|
+ res.forEach((element) => {
|
|
|
+ area.push(element.时间)
|
|
|
+ dataArray.LastYear.push(element.去年)
|
|
|
+ dataArray.thisYear.push(element.今年)
|
|
|
+ dataArray.comparisonLastDay.push(element.较上日)
|
|
|
+ dataArray.comparisonLastYear.push(element.较去年)
|
|
|
+ })
|
|
|
+ this.yearTrendAnalysearea = area
|
|
|
+ this.yearTrendAnalyseDataArray = dataArray
|
|
|
+ this.isAnalyseYearTrend = true
|
|
|
+ }
|
|
|
})
|
|
|
- this.yearTrendAnalysearea = area
|
|
|
- this.yearTrendAnalyseDataArray = dataArray
|
|
|
- this.isAnalyseYearTrend = true
|
|
|
- })
|
|
|
},
|
|
|
getStatistics() {
|
|
|
- return this.$http.get(`/api/transplantData`).then((res) => {
|
|
|
- const obj = this.statisticsData
|
|
|
- // eslint-disable-next-line no-prototype-builtins
|
|
|
- if (res.hasOwnProperty(obj.title)) {
|
|
|
- obj.value = res[obj.title]
|
|
|
- }
|
|
|
- const list1 = this.statisticsData.acrossList
|
|
|
- this.statisticsData.acrossList = list1.map((item) => {
|
|
|
- // eslint-disable-next-line no-prototype-builtins
|
|
|
- if (res.hasOwnProperty(item.name)) {
|
|
|
- return { ...item, value: res[item.name] }
|
|
|
- }
|
|
|
- return item
|
|
|
+ return this.$http
|
|
|
+ .get(`/api/transplantData`, {
|
|
|
+ params: {
|
|
|
+ districtId: this.baseId,
|
|
|
+ },
|
|
|
})
|
|
|
- const list2 = this.statisticsData.verticalList
|
|
|
- this.statisticsData.verticalList = list2.map((item) => {
|
|
|
+ .then((res) => {
|
|
|
+ const obj = this.statisticsData
|
|
|
// eslint-disable-next-line no-prototype-builtins
|
|
|
- if (res.hasOwnProperty(item.name)) {
|
|
|
- return { ...item, value: res[item.name] }
|
|
|
+ if (res.hasOwnProperty(obj.title)) {
|
|
|
+ obj.value = res[obj.title]
|
|
|
}
|
|
|
- return item
|
|
|
+ const list1 = this.statisticsData.acrossList
|
|
|
+ this.statisticsData.acrossList = list1.map((item) => {
|
|
|
+ // eslint-disable-next-line no-prototype-builtins
|
|
|
+ if (res.hasOwnProperty(item.name)) {
|
|
|
+ return { ...item, value: res[item.name] }
|
|
|
+ }
|
|
|
+ return item
|
|
|
+ })
|
|
|
+ const list2 = this.statisticsData.verticalList
|
|
|
+ this.statisticsData.verticalList = list2.map((item) => {
|
|
|
+ // eslint-disable-next-line no-prototype-builtins
|
|
|
+ if (res.hasOwnProperty(item.name)) {
|
|
|
+ return { ...item, value: res[item.name] }
|
|
|
+ }
|
|
|
+ return item
|
|
|
+ })
|
|
|
+ this.isCake = true
|
|
|
})
|
|
|
- this.isCake = true
|
|
|
- })
|
|
|
},
|
|
|
backFn() {
|
|
|
this.$router.back()
|