|
@@ -1,281 +1,245 @@
|
|
<template>
|
|
<template>
|
|
- <bgBox :tabChange="tabChange" class="bgBox" bgType="g-bg3">
|
|
|
|
- <div class="main">
|
|
|
|
- <div class="topBar">
|
|
|
|
- <div class="query">
|
|
|
|
- <img src="@/assets/img2/种植分析详情/编组 8.png" alt="" />
|
|
|
|
- <el-radio-group v-model="query.radio" class="radio-group">
|
|
|
|
- <el-radio class="date" :label="6">近一周</el-radio>
|
|
|
|
- <el-radio class="date" :label="30">近30天</el-radio>
|
|
|
|
- <el-radio class="date" :label="90">近90天</el-radio>
|
|
|
|
- </el-radio-group>
|
|
|
|
- <el-date-picker
|
|
|
|
- :pickerOptions="pickerOptions0"
|
|
|
|
- v-model="query.date[0]"
|
|
|
|
- type="date"
|
|
|
|
- placeholder="开始日期"
|
|
|
|
- class="mr-20px ml-20px date"
|
|
|
|
- >
|
|
|
|
- </el-date-picker>
|
|
|
|
- <el-date-picker
|
|
|
|
- class="date"
|
|
|
|
- :pickerOptions="pickerOptions1"
|
|
|
|
- v-model="query.date[1]"
|
|
|
|
- type="date"
|
|
|
|
- placeholder="结束日期"
|
|
|
|
- >
|
|
|
|
- </el-date-picker>
|
|
|
|
- </div>
|
|
|
|
- <img
|
|
|
|
- @click="backFn"
|
|
|
|
- src="@/assets/img2/种植分析详情/编组 16备份.png"
|
|
|
|
- alt=""
|
|
|
|
- />
|
|
|
|
- </div>
|
|
|
|
- <leftBox class="lefBox" />
|
|
|
|
- <leftBox2 class="lefBox2" />
|
|
|
|
- <cake
|
|
|
|
- id="`移栽数据`"
|
|
|
|
- barWidth="448px"
|
|
|
|
- style="position: absolute; top: 95px; right: 550px"
|
|
|
|
- title="移栽数据"
|
|
|
|
|
|
+ <bgBox :tabChange="tabChange" class="bgBox" :tabIndex="2">
|
|
|
|
+ <evaluationStatistics
|
|
|
|
+ style="position: absolute; left: 20px; top: 98px"
|
|
|
|
+ class="animated fadeInLeft"
|
|
|
|
+ :barHeight="'312px'"
|
|
|
|
+ total="2700"
|
|
|
|
+ :area="Transplantarea"
|
|
|
|
+ :dataArray="TransplantdataArray"
|
|
|
|
+ />
|
|
|
|
+ <wordClouds
|
|
|
|
+ :barHeight="'312px'"
|
|
|
|
+ id="平台订单总交易额趋势(月)"
|
|
|
|
+ style="position: absolute; left: 20px; top: 426px"
|
|
|
|
+ class="animated fadeInLeft"
|
|
|
|
+ title="平台订单总交易额趋势(月)"
|
|
|
|
+ >
|
|
|
|
+ </wordClouds>
|
|
|
|
+ <weatherForecast
|
|
|
|
+ id="平台订单总量趋势(月)"
|
|
|
|
+ :barHeight="'312px'"
|
|
|
|
+ style="position: absolute; left: 20px; top: 750px"
|
|
|
|
+ class="animated fadeInLeft"
|
|
|
|
+ title="平台订单总量趋势(月)"
|
|
|
|
+ :area="trendarea"
|
|
|
|
+ :dataArray="trendDataArray"
|
|
|
|
+ ></weatherForecast>
|
|
|
|
+ <threeMap
|
|
|
|
+ @toView="toView"
|
|
|
|
+ class="animated zoomIn"
|
|
|
|
+ style="
|
|
|
|
+ position: absolute;
|
|
|
|
+ left: 50%;
|
|
|
|
+ transform: translate(-50%,15%);
|
|
|
|
+ "
|
|
|
|
+ v-if="hasGetJson"
|
|
|
|
+ :getJson="getJson"
|
|
|
|
+ ></threeMap>
|
|
|
|
+ <liquidFill
|
|
|
|
+ :barHeight="'312px'"
|
|
|
|
+ id="水球"
|
|
|
|
+ total="3.5"
|
|
|
|
+ style="position: absolute; right: 20px; top: 98px"
|
|
|
|
+ class="animated fadeInRight"
|
|
|
|
+ title="水球"
|
|
|
|
+ :area="trendarea"
|
|
|
|
+ :dataArray="trendDataArray"
|
|
|
|
+ ></liquidFill>
|
|
|
|
+ <slotCake
|
|
|
|
+ :showSlot="false"
|
|
|
|
+ id="`评价类型分布`"
|
|
|
|
+ style="position: absolute; right: 20px; top: 434px"
|
|
|
|
+ title="评价类型分布"
|
|
:data="statisticsData"
|
|
:data="statisticsData"
|
|
class="animated fadeInRight"
|
|
class="animated fadeInRight"
|
|
- v-if="isCake"
|
|
|
|
- />
|
|
|
|
- <weatherForecast
|
|
|
|
- :unit="`摄氏度`"
|
|
|
|
- barWidth="448px"
|
|
|
|
- style="position: absolute; right: 50px; top: 95px"
|
|
|
|
|
|
+ :barHeight="'312px'"
|
|
|
|
+ />
|
|
|
|
+ <weatherForecast
|
|
|
|
+ id="区域收获评价总量趋势"
|
|
|
|
+ :barHeight="'312px'"
|
|
|
|
+ style="position: absolute; right: 20px; top: 758px"
|
|
class="animated fadeInRight"
|
|
class="animated fadeInRight"
|
|
- v-if="isWeather"
|
|
|
|
- title="实时天气"
|
|
|
|
|
|
+ title="区域收获评价总量趋势(月)"
|
|
:area="Weatherarea"
|
|
:area="Weatherarea"
|
|
:dataArray="WeatherdataArray"
|
|
:dataArray="WeatherdataArray"
|
|
- :alertValue="30"
|
|
|
|
- />
|
|
|
|
- <wavyLineChart
|
|
|
|
- id="`月度移栽趋势`"
|
|
|
|
- barWidth="448px"
|
|
|
|
- style="position: absolute; right: 550px; top: 400px; z-index: 10"
|
|
|
|
- v-if="isMonthTrend"
|
|
|
|
- :lineName="monthName"
|
|
|
|
- title="月度移栽趋势"
|
|
|
|
- class="animated fadeInRight"
|
|
|
|
- :area.sync="monthTrendarea"
|
|
|
|
- :dataArray.sync="monthTrendDataArray"
|
|
|
|
- />
|
|
|
|
- <wavyLineChart
|
|
|
|
- id="`月度移栽面积分析`"
|
|
|
|
- barWidth="448px"
|
|
|
|
- style="position: absolute; right: 550px; top: 730px; z-index: 10"
|
|
|
|
- v-if="isAnalyseMonthTrend"
|
|
|
|
- :lineName="monthName"
|
|
|
|
- title="月度移栽面积分析"
|
|
|
|
- class="animated fadeInRight"
|
|
|
|
- :area.sync="monthTrendAnalysearea"
|
|
|
|
- :dataArray.sync="monthTrendAnalyseDataArray"
|
|
|
|
- />
|
|
|
|
- <wavyLineChart
|
|
|
|
- id="`年度移栽趋势`"
|
|
|
|
- barWidth="448px"
|
|
|
|
- style="position: absolute; right: 50px; top: 400px; z-index: 10"
|
|
|
|
- :lineName="yearName"
|
|
|
|
- title="年度移栽趋势"
|
|
|
|
- :area.sync="yearTrendarea"
|
|
|
|
- class="animated fadeInRight"
|
|
|
|
- :dataArray.sync="yearTrendDataArray"
|
|
|
|
- v-if="isYearTrend"
|
|
|
|
- />
|
|
|
|
- <wavyLineChart
|
|
|
|
- id="`年度移栽面积分析`"
|
|
|
|
- barWidth="448px"
|
|
|
|
- style="position: absolute; right: 50px; top: 730px; z-index: 10"
|
|
|
|
- :lineName="yearName"
|
|
|
|
- title="年度移栽面积分析"
|
|
|
|
- :area.sync="yearTrendAnalysearea"
|
|
|
|
- class="animated fadeInRight"
|
|
|
|
- :dataArray.sync="yearTrendAnalyseDataArray"
|
|
|
|
- v-if="isAnalyseYearTrend"
|
|
|
|
- />
|
|
|
|
- </div>
|
|
|
|
|
|
+ ></weatherForecast>
|
|
</bgBox>
|
|
</bgBox>
|
|
</template>
|
|
</template>
|
|
|
|
|
|
<script>
|
|
<script>
|
|
-import 'element-ui/lib/theme-chalk/index.css'
|
|
|
|
-import wavyLineChart from '@/components/Customize/wavyLineChart'
|
|
|
|
-import weatherForecast from '@/components/Customize/weatherForecast'
|
|
|
|
-import cake from '@/components/Customize/cake'
|
|
|
|
|
|
+import mapOfTongren from '@/http/mapOfTongren.json'
|
|
import bgBox from '@/components/bgBox/index.vue'
|
|
import bgBox from '@/components/bgBox/index.vue'
|
|
-import leftBox from './leftBox.vue'
|
|
|
|
-import leftBox2 from './leftBox2.vue'
|
|
|
|
-import { Button, DatePicker, RadioGroup, Radio } from 'element-ui'
|
|
|
|
-import Vue from 'vue'
|
|
|
|
-import dayjs from 'dayjs'
|
|
|
|
-
|
|
|
|
-// 获取近一周的日期范围
|
|
|
|
-function getLastDay(day) {
|
|
|
|
- const end = dayjs() // 当前日期
|
|
|
|
- const start = end.subtract(day, `day`) // 前六天
|
|
|
|
- return { start: start.format(`YYYY-MM-DD`), end: end.format(`YYYY-MM-DD`) }
|
|
|
|
-}
|
|
|
|
-
|
|
|
|
-window.getLastDay = getLastDay
|
|
|
|
-window.dayjs = dayjs
|
|
|
|
-
|
|
|
|
-Vue.use(Button)
|
|
|
|
-Vue.use(RadioGroup)
|
|
|
|
-Vue.use(Radio)
|
|
|
|
-Vue.use(DatePicker)
|
|
|
|
|
|
+import cake from '@/components/Customize/cake'
|
|
|
|
+import HybridCharts from '@/components/Customize/HybridCharts'
|
|
|
|
+import liquidFill from '@/components/Customize/liquidfill'
|
|
|
|
+import wordClouds from '@/components/Customize/wordClouds'
|
|
|
|
+import slotCake from '@/components/Customize/slotCake'
|
|
|
|
+import evaluationStatistics from '@/components/Customize/evaluationStatistics/index.vue'
|
|
|
|
+import ComplexHistograms from '@/components/Customize/Complex histograms'
|
|
|
|
+import weatherForecast from '@/components/Customize/weatherForecast'
|
|
|
|
+import HorizontalHistogram from '@/components/Customize/HorizontalHistogram'
|
|
|
|
+import statisticsPanel from '@/components/statisticsPanel/index.vue'
|
|
|
|
+import threeMap from '@/components/Customize/map/index'
|
|
|
|
|
|
export default {
|
|
export default {
|
|
|
|
+ name: `Home`,
|
|
components: {
|
|
components: {
|
|
- leftBox,
|
|
|
|
- leftBox2,
|
|
|
|
- bgBox,
|
|
|
|
- wavyLineChart,
|
|
|
|
|
|
+ evaluationStatistics,
|
|
|
|
+ liquidFill,
|
|
|
|
+ wordClouds,
|
|
|
|
+ HybridCharts,
|
|
|
|
+ slotCake,
|
|
weatherForecast,
|
|
weatherForecast,
|
|
|
|
+ HorizontalHistogram,
|
|
|
|
+ ComplexHistograms,
|
|
|
|
+ statisticsPanel,
|
|
|
|
+ bgBox,
|
|
|
|
+ threeMap,
|
|
cake,
|
|
cake,
|
|
},
|
|
},
|
|
data() {
|
|
data() {
|
|
- const vm = this
|
|
|
|
return {
|
|
return {
|
|
- pickerOptions0: {
|
|
|
|
- disabledDate(time) {
|
|
|
|
- return time.getTime() > Date.now()
|
|
|
|
- },
|
|
|
|
|
|
+ tabs: {
|
|
|
|
+ index: 0,
|
|
|
|
+ list: [`订单总量`, `订单交易额`],
|
|
},
|
|
},
|
|
- pickerOptions1: {
|
|
|
|
- disabledDate(time) {
|
|
|
|
- if (vm.query.date[0]) {
|
|
|
|
- return (
|
|
|
|
- time.getTime() < vm.query.date[0] || time.getTime() > Date.now()
|
|
|
|
- )
|
|
|
|
- } else {
|
|
|
|
- return time.getTime() > Date.now()
|
|
|
|
- }
|
|
|
|
- },
|
|
|
|
|
|
+ max: 100,
|
|
|
|
+ autoVueFnInit: false,
|
|
|
|
+ statisticsData: {
|
|
|
|
+ title: `目标完成率`,
|
|
|
|
+ value: 0,
|
|
|
|
+ acrossList: [
|
|
|
|
+ {name: `年移栽数量`, value: undefined},
|
|
|
|
+ {name: `年移栽面积`, value: undefined},
|
|
|
|
+ ],
|
|
|
|
+ verticalList: [
|
|
|
|
+ {name: `移栽区域数`, value: undefined},
|
|
|
|
+ {name: `烟农数量`, value: undefined},
|
|
|
|
+ ],
|
|
},
|
|
},
|
|
- query: {
|
|
|
|
- radio: 6,
|
|
|
|
- date: [],
|
|
|
|
|
|
+ yearName: {
|
|
|
|
+ lastName: `去年`,
|
|
|
|
+ thisName: `今年`,
|
|
},
|
|
},
|
|
- trendarea: [],
|
|
|
|
- trendDataArray: {
|
|
|
|
- LastYear: [],
|
|
|
|
- thisYear: [],
|
|
|
|
|
|
+ TransplantdataArray: [],
|
|
|
|
+ Transplantarea: [],
|
|
|
|
+ Weatherarea: [],
|
|
|
|
+ WeatherdataArray: {
|
|
|
|
+ temperature: [],
|
|
|
|
+ Weather: [],
|
|
},
|
|
},
|
|
- monthTrendarea: [],
|
|
|
|
- monthTrendDataArray: {
|
|
|
|
|
|
+ wavyLineArea: [],
|
|
|
|
+ wavyLinedataArray: {
|
|
LastYear: [],
|
|
LastYear: [],
|
|
thisYear: [],
|
|
thisYear: [],
|
|
},
|
|
},
|
|
- monthName: {
|
|
|
|
- lastName: `上月`,
|
|
|
|
- thisName: `本月`,
|
|
|
|
- },
|
|
|
|
- monthTrendAnalysearea: [],
|
|
|
|
- monthTrendAnalyseDataArray: [],
|
|
|
|
- yearTrendarea: [],
|
|
|
|
- yearTrendDataArray: {
|
|
|
|
|
|
+ trendarea: [],
|
|
|
|
+ trendDataArray: {
|
|
LastYear: [],
|
|
LastYear: [],
|
|
thisYear: [],
|
|
thisYear: [],
|
|
},
|
|
},
|
|
- isMonthTrend: false,
|
|
|
|
- isYearTrend: false,
|
|
|
|
- isAnalyseMonthTrend: false,
|
|
|
|
- isAnalyseYearTrend: false,
|
|
|
|
- yearName: {
|
|
|
|
- lastName: `去年`,
|
|
|
|
- thisName: `今年`,
|
|
|
|
|
|
+ HorizontalArea: [],
|
|
|
|
+ HorizontalArray: {
|
|
|
|
+ Done: [],
|
|
|
|
+ Percentage: [],
|
|
},
|
|
},
|
|
- yearTrendAnalysearea: [],
|
|
|
|
- yearTrendAnalyseDataArray: [],
|
|
|
|
- statisticsData: {
|
|
|
|
- title: `处理率`,
|
|
|
|
- value: 0,
|
|
|
|
- acrossList: [{ name: `今日种植数`, value: undefined }],
|
|
|
|
- verticalList: [
|
|
|
|
- { name: `目标移栽数`, value: undefined },
|
|
|
|
- { name: `累计移栽`, value: undefined },
|
|
|
|
- ],
|
|
|
|
- },
|
|
|
|
- Weatherarea: [],
|
|
|
|
- WeatherdataArray: [],
|
|
|
|
- isCake: false,
|
|
|
|
|
|
+ getJson: {},
|
|
|
|
+ isGetData: false,
|
|
isWeather: false,
|
|
isWeather: false,
|
|
- baseId: this.$route.query.id || 1,
|
|
|
|
|
|
+ isWavyLine: false,
|
|
|
|
+ isHorizontal: false,
|
|
|
|
+ isTrend: false,
|
|
|
|
+ hasGetJson: false,
|
|
|
|
+ isCake: false,
|
|
}
|
|
}
|
|
},
|
|
},
|
|
computed: {},
|
|
computed: {},
|
|
- async created() {
|
|
|
|
- this.$util.autoVueFn(
|
|
|
|
- [
|
|
|
|
- {
|
|
|
|
- time: 1000 * 60,
|
|
|
|
- fn: this.getTrendOfTransplantQuantityThisMonth,
|
|
|
|
- },
|
|
|
|
- {
|
|
|
|
- time: 1000 * 60,
|
|
|
|
- fn: this.getThisYearsTransplantingDataTrend,
|
|
|
|
- },
|
|
|
|
- {
|
|
|
|
- time: 1000 * 60,
|
|
|
|
- fn: this.getMonthlyTransplantationAreaAnalysis,
|
|
|
|
- },
|
|
|
|
- {
|
|
|
|
- time: 1000 * 60,
|
|
|
|
- fn: this.getAnalysisOfAnnualTransplantArea,
|
|
|
|
- },
|
|
|
|
- {
|
|
|
|
- time: 1000 * 60,
|
|
|
|
- fn: this.getStatistics,
|
|
|
|
- },
|
|
|
|
- {
|
|
|
|
- time: 1000 * 60,
|
|
|
|
- fn: this.getWeatherForecast,
|
|
|
|
- },
|
|
|
|
- ],
|
|
|
|
- this
|
|
|
|
- )
|
|
|
|
|
|
+ created() {
|
|
|
|
+ this.getJSON()
|
|
|
|
+ // this.$util.autoVueFn(
|
|
|
|
+ // [
|
|
|
|
+ // {
|
|
|
|
+ // time: 1000 * 60,
|
|
|
|
+ // fn: this.getWeatherForecast,
|
|
|
|
+ // },
|
|
|
|
+ // {
|
|
|
|
+ // time: 1000 * 60,
|
|
|
|
+ // fn: this.getAnalysisOfTransplantYieldInVariousRegions,
|
|
|
|
+ // },
|
|
|
|
+ // {
|
|
|
|
+ // time: 1000 * 60,
|
|
|
|
+ // fn: this.getTransplantAreaInEachRegion,
|
|
|
|
+ // },
|
|
|
|
+ // {
|
|
|
|
+ // time: 1000 * 60,
|
|
|
|
+ // fn: this.getAnalysisOfTransplantingSituation,
|
|
|
|
+ // },
|
|
|
|
+ // {
|
|
|
|
+ // time: 1000 * 60,
|
|
|
|
+ // fn: this.getStatistics,
|
|
|
|
+ // },
|
|
|
|
+ // {
|
|
|
|
+ // time: 1000 * 60,
|
|
|
|
+ // fn: this.getTrendAnalysis,
|
|
|
|
+ // },
|
|
|
|
+ // ],
|
|
|
|
+ // {
|
|
|
|
+ // vm: this,
|
|
|
|
+ // batEnd() {
|
|
|
|
+ // this.autoVueFnInit = true
|
|
|
|
+ // },
|
|
|
|
+ // }
|
|
|
|
+ // )
|
|
},
|
|
},
|
|
- watch: {
|
|
|
|
- 'query.radio': {
|
|
|
|
- handler(val) {
|
|
|
|
- if (this.query.radio) {
|
|
|
|
- this.query.date = []
|
|
|
|
- const { start, end } = getLastDay(this.query.radio)
|
|
|
|
- this.getEchartData(start, end)
|
|
|
|
- }
|
|
|
|
- },
|
|
|
|
- immediate: true,
|
|
|
|
|
|
+ mounted() {
|
|
|
|
+ },
|
|
|
|
+ methods: {
|
|
|
|
+ async toView(code) {
|
|
|
|
+ console.log(code)
|
|
|
|
+
|
|
|
|
+ const {id, 区域编码} = (await this.$util.code2base(this, code)) || {}
|
|
|
|
+ this.$router.push({
|
|
|
|
+ path: `/page3`,
|
|
|
|
+ query: {
|
|
|
|
+ id,
|
|
|
|
+ code: 区域编码,
|
|
|
|
+ },
|
|
|
|
+ })
|
|
},
|
|
},
|
|
- 'query.date'([a, b] = []) {
|
|
|
|
- if (a && b) {
|
|
|
|
- this.query.radio = 0
|
|
|
|
- const start = dayjs(a || Date.now()).format(`YYYY-MM-DD`)
|
|
|
|
- const end = dayjs(b || Date.now()).format(`YYYY-MM-DD`)
|
|
|
|
- this.getEchartData(start, end)
|
|
|
|
- } else if (!a && !b && !this.query.radio) {
|
|
|
|
- this.query.radio = 6
|
|
|
|
|
|
+ tabChange(val) {
|
|
|
|
+ if (val === 0) {
|
|
|
|
+ this.$router.push(`/page1`)
|
|
|
|
+ } else if (val === 1) {
|
|
|
|
+ this.$router.push(`/page2`)
|
|
|
|
+ } else if (val === 2) {
|
|
|
|
+ this.$router.push(`/page3`)
|
|
}
|
|
}
|
|
|
|
+ console.log(`val`, val)
|
|
},
|
|
},
|
|
- },
|
|
|
|
- mounted() {},
|
|
|
|
- methods: {
|
|
|
|
- getEchartData(start, end) {
|
|
|
|
- console.log(`start, end`, start, end)
|
|
|
|
|
|
+ getAnalysisOfTransplantYieldInVariousRegions() {
|
|
|
|
+ return this.$http
|
|
|
|
+ .get(`/api/analysisOfTransplantYieldInVariousRegions`)
|
|
|
|
+ .then((res) => {
|
|
|
|
+ const area = []
|
|
|
|
+ const dataArray = []
|
|
|
|
+ res.forEach((element) => {
|
|
|
|
+ area.push(element.名称.slice(0, 2))
|
|
|
|
+ dataArray.push(element.值)
|
|
|
|
+ })
|
|
|
|
+ this.Transplantarea = area
|
|
|
|
+ this.TransplantdataArray = dataArray
|
|
|
|
+ this.isGetData = true
|
|
|
|
+ })
|
|
},
|
|
},
|
|
getWeatherForecast() {
|
|
getWeatherForecast() {
|
|
return this.$http
|
|
return this.$http
|
|
- .get(`/api/weatherForecast`, {
|
|
|
|
- params: {
|
|
|
|
- districtId: this.baseId,
|
|
|
|
- },
|
|
|
|
- })
|
|
|
|
- .then((res) => {
|
|
|
|
- if (res) {
|
|
|
|
|
|
+ .get(`/api/weatherForecast`, {
|
|
|
|
+ params: {
|
|
|
|
+ districtId: 0,
|
|
|
|
+ },
|
|
|
|
+ })
|
|
|
|
+ .then((res) => {
|
|
const area = []
|
|
const area = []
|
|
const dataArray = {
|
|
const dataArray = {
|
|
temperature: [],
|
|
temperature: [],
|
|
@@ -289,253 +253,125 @@ export default {
|
|
this.Weatherarea = area
|
|
this.Weatherarea = area
|
|
this.WeatherdataArray = dataArray
|
|
this.WeatherdataArray = dataArray
|
|
this.isWeather = true
|
|
this.isWeather = true
|
|
- }
|
|
|
|
- })
|
|
|
|
- },
|
|
|
|
- getTrendOfTransplantQuantityThisMonth() {
|
|
|
|
- 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
|
|
|
|
- }
|
|
|
|
- })
|
|
|
|
- },
|
|
|
|
- getMonthlyTransplantationAreaAnalysis() {
|
|
|
|
- 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
|
|
|
|
- }
|
|
|
|
- })
|
|
|
|
|
|
+ })
|
|
},
|
|
},
|
|
- getThisYearsTransplantingDataTrend() {
|
|
|
|
- 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
|
|
|
|
- }
|
|
|
|
|
|
+ getTransplantAreaInEachRegion() {
|
|
|
|
+ return this.$http.get(`/api/transplantAreaInEachRegion`).then((res) => {
|
|
|
|
+ const area = []
|
|
|
|
+ const dataArray = {
|
|
|
|
+ LastYear: [],
|
|
|
|
+ thisYear: [],
|
|
|
|
+ }
|
|
|
|
+ res.forEach((element) => {
|
|
|
|
+ area.push(element.名称.slice(0, 2))
|
|
|
|
+ dataArray.LastYear.push(element.去年)
|
|
|
|
+ dataArray.thisYear.push(element.今年)
|
|
})
|
|
})
|
|
|
|
+ this.wavyLineArea = area
|
|
|
|
+ this.wavyLinedataArray = dataArray
|
|
|
|
+ this.isWavyLine = true
|
|
|
|
+ })
|
|
},
|
|
},
|
|
- getAnalysisOfAnnualTransplantArea() {
|
|
|
|
- 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
|
|
|
|
- }
|
|
|
|
|
|
+ getAnalysisOfTransplantingSituation() {
|
|
|
|
+ this.$http.get(`/api/analysisOfTransplantingSituation`).then((res) => {
|
|
|
|
+ const area = []
|
|
|
|
+ const dataArray = {
|
|
|
|
+ Done: [],
|
|
|
|
+ Percentage: [],
|
|
|
|
+ }
|
|
|
|
+ const date = res
|
|
|
|
+ date.forEach((element) => {
|
|
|
|
+ area.push(element.名称.slice(0, 2))
|
|
|
|
+ dataArray.Done.push(element.已移载)
|
|
|
|
+ dataArray.Percentage.push(element.比率.toFixed(0))
|
|
})
|
|
})
|
|
|
|
+ this.HorizontalArea = area
|
|
|
|
+ this.HorizontalArray = dataArray
|
|
|
|
+ this.isHorizontal = true
|
|
|
|
+ })
|
|
},
|
|
},
|
|
getStatistics() {
|
|
getStatistics() {
|
|
- return this.$http
|
|
|
|
- .get(`/api/transplantData`, {
|
|
|
|
- params: {
|
|
|
|
- districtId: this.baseId,
|
|
|
|
- },
|
|
|
|
|
|
+ return this.$http.get(`/api/realTimeStatistics`).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
|
|
})
|
|
})
|
|
- .then((res) => {
|
|
|
|
- const obj = this.statisticsData
|
|
|
|
|
|
+ const list2 = this.statisticsData.verticalList
|
|
|
|
+ this.statisticsData.verticalList = list2.map((item) => {
|
|
// eslint-disable-next-line no-prototype-builtins
|
|
// eslint-disable-next-line no-prototype-builtins
|
|
- if (res.hasOwnProperty(obj.title)) {
|
|
|
|
- obj.value = res[obj.title]
|
|
|
|
|
|
+ if (res.hasOwnProperty(item.name)) {
|
|
|
|
+ return {...item, value: res[item.name]}
|
|
}
|
|
}
|
|
- 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
|
|
|
|
|
|
+ return item
|
|
})
|
|
})
|
|
|
|
+ this.isCake = true
|
|
|
|
+ })
|
|
},
|
|
},
|
|
- backFn() {
|
|
|
|
- this.$router.back()
|
|
|
|
|
|
+ getTrendAnalysis() {
|
|
|
|
+ return this.$http.get(`/api/transplantTrendAnalysis`).then((res) => {
|
|
|
|
+ const area = []
|
|
|
|
+ const dataArray = {
|
|
|
|
+ LastYear: [],
|
|
|
|
+ thisYear: [],
|
|
|
|
+ }
|
|
|
|
+ res.forEach((element) => {
|
|
|
|
+ area.push(element.时间)
|
|
|
|
+ dataArray.LastYear.push(element.去年)
|
|
|
|
+ dataArray.thisYear.push(element.今年)
|
|
|
|
+ })
|
|
|
|
+ this.trendarea = area
|
|
|
|
+ this.trendDataArray = dataArray
|
|
|
|
+ this.isTrend = true
|
|
|
|
+ })
|
|
},
|
|
},
|
|
- tabChange(val) {
|
|
|
|
- console.log(`val`, val)
|
|
|
|
|
|
+ async getJSON() {
|
|
|
|
+ this.getJson = mapOfTongren
|
|
|
|
+ this.hasGetJson = true
|
|
},
|
|
},
|
|
},
|
|
},
|
|
}
|
|
}
|
|
</script>
|
|
</script>
|
|
|
|
+<style lang="less">
|
|
|
|
+.tabbotton {
|
|
|
|
+ text-align: center;
|
|
|
|
+ display: flex;
|
|
|
|
+ justify-content: space-between;
|
|
|
|
+ background-image: url('~@/assets/img2/综合总览/编组 9.png');
|
|
|
|
+ background-repeat: no-repeat;
|
|
|
|
+ background-position: center bottom;
|
|
|
|
+ width: 460px;
|
|
|
|
|
|
-<style lang="less" scoped>
|
|
|
|
-.bgBox {
|
|
|
|
- .main {
|
|
|
|
- padding: 50px;
|
|
|
|
- padding-top: 45px;
|
|
|
|
- .topBar {
|
|
|
|
- display: flex;
|
|
|
|
- justify-content: space-between;
|
|
|
|
- align-items: center;
|
|
|
|
- }
|
|
|
|
- .lefBox,
|
|
|
|
- .lefBox2 {
|
|
|
|
- position: absolute;
|
|
|
|
- z-index: 10;
|
|
|
|
- top: 120px;
|
|
|
|
- }
|
|
|
|
- .lefBox {
|
|
|
|
- left: 458px;
|
|
|
|
- }
|
|
|
|
- .lefBox2 {
|
|
|
|
- left: 47px;
|
|
|
|
- }
|
|
|
|
- .query {
|
|
|
|
- font-size: 14px;
|
|
|
|
- display: flex;
|
|
|
|
- align-items: center;
|
|
|
|
- .radio-group {
|
|
|
|
- margin-top: -1px;
|
|
|
|
- margin-left: 20px;
|
|
|
|
- }
|
|
|
|
- .date {
|
|
|
|
- background: rgba(255, 255, 255, 0.2);
|
|
|
|
- border-radius: 10px;
|
|
|
|
- }
|
|
|
|
- ::v-deep {
|
|
|
|
- .el-radio__input.is-checked + .el-radio__label {
|
|
|
|
- color: rgba(255, 255, 255, 0.8);
|
|
|
|
- }
|
|
|
|
- .el-input__suffix {
|
|
|
|
- right: 0;
|
|
|
|
- }
|
|
|
|
- .el-radio {
|
|
|
|
- background: rgba(255, 255, 255, 0.2);
|
|
|
|
- box-sizing: border-box;
|
|
|
|
- height: 27px;
|
|
|
|
- padding: 0 10px;
|
|
|
|
- line-height: 27px;
|
|
|
|
- color: rgba(255, 255, 255, 0.8);
|
|
|
|
- margin-right: 5px;
|
|
|
|
- }
|
|
|
|
- .el-input--prefix .el-input__inner {
|
|
|
|
- padding: 0;
|
|
|
|
- }
|
|
|
|
- .el-input__prefix {
|
|
|
|
- display: none;
|
|
|
|
- }
|
|
|
|
- .el-date-editor.el-input {
|
|
|
|
- width: 120px;
|
|
|
|
- }
|
|
|
|
- .el-input__icon {
|
|
|
|
- line-height: 27px;
|
|
|
|
- height: 27px;
|
|
|
|
- }
|
|
|
|
- .el-input__inner {
|
|
|
|
- border-radius: 10px;
|
|
|
|
- width: 120px;
|
|
|
|
- height: 27px;
|
|
|
|
- box-sizing: border-box;
|
|
|
|
- line-height: 27px;
|
|
|
|
- color: rgba(255, 255, 255, 0.8);
|
|
|
|
- text-align: center;
|
|
|
|
- border-width: 0;
|
|
|
|
- }
|
|
|
|
- .el-input__inner,
|
|
|
|
- .el-radio__inner {
|
|
|
|
- background-color: transparent;
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
- ::v-deep {
|
|
|
|
- .top {
|
|
|
|
- display: none !important;
|
|
|
|
- }
|
|
|
|
- *[aria-hidden='true'] {
|
|
|
|
- display: none;
|
|
|
|
|
|
+ .tab-item {
|
|
|
|
+ width: 220px;
|
|
|
|
+ height: 40px;
|
|
|
|
+ line-height: 40px;
|
|
|
|
+ font-family: YouSheBiaoTiHei;
|
|
|
|
+ font-size: 22px;
|
|
|
|
+ color: #bababa;
|
|
|
|
+ text-align: center;
|
|
|
|
+ position: relative;
|
|
|
|
+ cursor: pointer;
|
|
|
|
+ background-image: url("~@/assets/img/rectangle.png");
|
|
|
|
+ background-size: contain;
|
|
|
|
+ background-repeat: no-repeat;
|
|
|
|
+ background-position: center;
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+ &.cur {
|
|
|
|
+ color: rgba(77, 255, 251, .9);
|
|
|
|
+ background-image: url("~@/assets/img/rectangleing.png");
|
|
|
|
+ background-size: contain;
|
|
|
|
+ background-repeat: no-repeat;
|
|
|
|
+ background-position: center;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|