pangqijun 2 тижнів тому
батько
коміт
90da42633b

+ 11 - 8
src/components/Customize/evaluationStatistics/index.vue

@@ -2,25 +2,25 @@
 <template>
   <div class="oblongBox" :style="{height:barHeight }">
     <div class="title">
-      <span class="label">评价总</span>
-      <span class="value">{{ total }}</span>
-      <span style="font-size: 16px;margin: 0 10px">26.5%</span>
-      <img v-if="isHoist" src="@/assets/img/hoist.png">
-      <img v-else src="@/assets/img/decline.png">
+      <span class="label">评价总</span>
+      <span class="value">{{ data.total }}</span>
+<!--      <span style="font-size: 16px;margin: 0 10px">26.5%</span>-->
+<!--      <img v-if="isHoist" src="@/assets/img/hoist.png">-->
+<!--      <img v-else src="@/assets/img/decline.png">-->
     </div>
     <div class="appraiseBox">
       <div class="appraiseItem">
-        <div class="green total">11231</div>
+        <div class="green total">{{ data.h }}</div>
         <img src="@/assets/img/goodReviews.png">
         <div>好评</div>
       </div>
       <div class="appraiseItem">
-        <div class="blue total">11231</div>
+        <div class="blue total">{{ data.z }}</div>
         <img src="@/assets/img/neutralReview.png">
         <div>中评</div>
       </div>
       <div class="appraiseItem">
-        <div class="red total">11231</div>
+        <div class="red total">{{ data.c }}</div>
         <img src="@/assets/img/badReviews.png">
         <div>差评</div>
       </div>
@@ -54,6 +54,9 @@ export default {
     unit: {
       type: String,
     },
+    data: {
+      type: Object
+    }
   },
   mounted() {
     this.getEchart()

+ 5 - 13
src/components/Customize/liquidfill.vue

@@ -3,7 +3,7 @@
   <div class="oblongBox" :style="{height:barHeight }">
     <div class="title">
       <span class="label">综合评价</span>
-      <span class="value">{{ total }}</span>
+      <span class="value">{{ data.zhpj }}</span>
     </div>
     <div class="chartsdom" :id="id">
     </div>
@@ -31,17 +31,8 @@ export default {
       type: String,
       default: `200px`,
     },
-    area: {
-      type: Array,
-    },
-    total: {
-      type: String || Number,
-    },
-    dataArray: {
-      type: Array,
-    },
-    unit: {
-      type: String,
+    data: {
+      type: Object,
     },
   },
   mounted() {
@@ -55,7 +46,8 @@ export default {
   methods: {
     getEchart() {
       let myChart = echarts.init(document.getElementById(this.id))
-      var value = 0.43
+      console.log(this.data.myd)
+      var value = this.data.myd;
       this.option = {
         series: [
           {

+ 1 - 1
src/components/Customize/wordClouds.vue

@@ -129,7 +129,7 @@ export default {
             },
 
             // Data is an array. Each array item must have name and value property.
-            data: list,
+            data: this.dataArray,
           },
         ],
       };

+ 7 - 7
src/views/page2/index.vue

@@ -37,14 +37,14 @@
         v-if="hasGetJson"
         :getJson="getJson"
     ></threeMap>
-    <pieChartsList :barHeight="'254px'"
-                   id="商品交易类型分布"
-                   style="position: absolute; right: 50%; top: 760px;   transform: translate(50%,15%);"
-                   title="商品交易类型分布"
-                   :area="trendarea"
-                   :dataArray="trendDataArray">
+<!--    <pieChartsList :barHeight="'254px'"-->
+<!--                   id="商品交易类型分布"-->
+<!--                   style="position: absolute; right: 50%; top: 760px;   transform: translate(50%,15%);"-->
+<!--                   title="商品交易类型分布"-->
+<!--                   :area="trendarea"-->
+<!--                   :dataArray="trendDataArray">-->
 
-    </pieChartsList>
+<!--    </pieChartsList>-->
     <weatherForecast
         :barHeight="'254px'"
         id="订单总量"

+ 77 - 145
src/views/page3/index.vue

@@ -4,9 +4,7 @@
         style="position: absolute; left: 20px; top: 98px"
         class="animated fadeInLeft"
         :barHeight="'312px'"
-        total="2700"
-        :area="Transplantarea"
-        :dataArray="TransplantdataArray"
+        :data="commentStatisticsVo"
     />
     <wordClouds
         :barHeight="'312px'"
@@ -14,6 +12,7 @@
         style="position: absolute; left: 20px; top: 426px"
         class="animated fadeInLeft"
         title="区域内评价热词分布"
+        :dataArray="hotWordsList"
     >
     </wordClouds>
     <weatherForecast
@@ -42,9 +41,8 @@
         total="3.5"
         style="position: absolute; right: 20px; top: 98px"
         class="animated fadeInRight"
-        title="水球"
-        :area="trendarea"
-        :dataArray="trendDataArray"
+        title=""
+        :data="comprehensiveVo"
     ></liquidFill>
     <slotCake
         :showSlot="false"
@@ -150,45 +148,57 @@ export default {
       isTrend: false,
       hasGetJson: false,
       isCake: false,
+
+      // =========
+      commentStatisticsVo: {
+        total: 0,
+        h: 0,
+        z: 0,
+        c: 0
+      },
+      hotWordsList: [],
+      comprehensiveVo: {},
+      commentDistributionTotal: 0,
+      commentDistributionList: []
     }
   },
   computed: {},
   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
-    //     },
-    //   }
-    // )
+    this.$util.autoVueFn(
+      [
+        {
+          time: 1000 * 60,
+          fn: this.commentStatistics,
+        },
+        {
+          time: 1000 * 60,
+          fn: this.hotWords,
+        },
+        {
+          time: 1000 * 60,
+          fn: this.comprehensive,
+        },
+        {
+          time: 1000 * 60,
+          fn: this.commentDistribution,
+        },
+        // {
+        //   time: 1000 * 60,
+        //   fn: this.getStatistics,
+        // },
+        // {
+        //   time: 1000 * 60,
+        //   fn: this.getTrendAnalysis,
+        // },
+      ],
+      {
+        vm: this,
+        batEnd() {
+          this.autoVueFnInit = true
+        },
+      }
+    )
   },
   mounted() {
   },
@@ -215,121 +225,43 @@ export default {
       }
       console.log(`val`, val)
     },
-    getAnalysisOfTransplantYieldInVariousRegions() {
+    // 评价统计
+    commentStatistics() {
       return this.$http
-          .get(`/api/analysisOfTransplantYieldInVariousRegions`)
+          .get(`/api/screen/dspj/commentStatistics`)
           .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
+            this.commentStatisticsVo.total = res.total;
+            this.commentStatisticsVo.h = res.list[0].value;
+            this.commentStatisticsVo.z = res.list[1].value;
+            this.commentStatisticsVo.c = res.list[2].value;
           })
     },
-    getWeatherForecast() {
+    // 热词分布
+    hotWords() {
       return this.$http
-          .get(`/api/weatherForecast`, {
-            params: {
-              districtId: 0,
-            },
-          })
+          .get(`/api/screen/dspj/hotWords`)
           .then((res) => {
-            const area = []
-            const dataArray = {
-              temperature: [],
-              Weather: [],
-            }
-            res.forEach((element) => {
-              area.push(element.时间)
-              dataArray.temperature.push(element.温度)
-              dataArray.Weather.push(element.天气)
+            this.hotWordsList = [];
+            res.forEach(e => {
+              this.hotWordsList.push({value:e.value, name:e.label})
             })
-            this.Weatherarea = area
-            this.WeatherdataArray = dataArray
-            this.isWeather = 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
-      })
-    },
-    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() {
-      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
-        })
-        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
-      })
+    // 综合评价
+    comprehensive() {
+      return this.$http
+          .get(`/api/screen/dspj/comprehensive`)
+          .then((res) => {
+            this.comprehensiveVo = res;
+          })
     },
-    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
-      })
+    // 评价类型分布
+    commentDistribution() {
+      return this.$http
+          .get(`/api/screen/dspj/commentDistribution`)
+          .then((res) => {
+
+          })
     },
     async getJSON() {
       this.getJson = mapOfTongren