root 3 سال پیش
والد
کامیت
b8dd96b38b

+ 7 - 4
src/components/Breadcrumb/index.vue

@@ -1,8 +1,12 @@
 <template>
   <el-breadcrumb class="app-breadcrumb" separator="/">
     <transition-group name="breadcrumb">
-      <el-breadcrumb-item v-for="(item,index) in levelList" :key="item.path">
-        <span v-if="item.redirect==='noRedirect'||index==levelList.length-1" class="no-redirect">{{ item.meta.title }}</span>
+      <el-breadcrumb-item v-for="(item, index) in levelList" :key="item.path">
+        <span
+          v-if="item.redirect === 'noRedirect' || index == levelList.length - 1"
+          class="no-redirect"
+          >{{ item.meta.title }}</span
+        >
         <a v-else @click.prevent="handleLink(item)">{{ item.meta.title }}</a>
       </el-breadcrumb-item>
     </transition-group>
@@ -33,13 +37,12 @@ export default {
       const first = matched[0]
 
       if (!this.isDashboard(first)) {
-        matched = [{ path: '/dashboard', meta: { title: '首页' }}].concat(matched)
+        matched = [{ path: '/dashboard', meta: { title: '首页' } }].concat(matched)
       }
 
       this.levelList = matched.filter(item => item.meta && item.meta.title && item.meta.breadcrumb !== false)
     },
     isDashboard(route) {
-      console.log(route)
       const name = route && route.name
       if (!name) {
         return false

+ 1 - 1
src/layout/components/Sidebar/Logo.vue

@@ -24,7 +24,7 @@ export default {
   },
   data() {
     return {
-      title: '数据资源中心',
+      title: '文旅数据资源中心',
       logo: undefined
     }
   }

+ 52 - 40
src/layout/index.vue

@@ -1,12 +1,18 @@
 <template>
-  <div :class="classObj" class="app-wrapper">
-    <div v-if="device==='mobile'&&sidebar.opened" class="drawer-bg" @click="handleClickOutside" />
-    <sidebar class="sidebar-container" />
-    <div class="main-container">
-      <div :class="{'fixed-header':fixedHeader}">
-        <navbar />
+  <div>
+    <div :class="classObj" class="app-wrapper">
+      <div
+        v-if="device === 'mobile' && sidebar.opened"
+        class="drawer-bg"
+        @click="handleClickOutside"
+      />
+      <sidebar class="sidebar-container" />
+      <div class="main-container">
+        <div :class="{ 'fixed-header': fixedHeader }">
+          <navbar />
+        </div>
+        <app-main />
       </div>
-      <app-main />
     </div>
   </div>
 </template>
@@ -28,11 +34,17 @@ export default {
       return this.$store.state.app.sidebar
     },
     device() {
+      console.log('数据', this.$route);
       return this.$store.state.app.device
     },
     fixedHeader() {
       return this.$store.state.settings.fixedHeader
     },
+    showAppMain() {
+      console.log('showAppMain==========>', this.$route);
+      const meta = this.$route.meta;
+      return 3 === meta.level;
+    },
     classObj() {
       return {
         hideSidebar: !this.sidebar.opened,
@@ -51,43 +63,43 @@ export default {
 </script>
 
 <style lang="scss" scoped>
-  @import "~@/styles/mixin.scss";
-  @import "~@/styles/variables.scss";
+@import "~@/styles/mixin.scss";
+@import "~@/styles/variables.scss";
 
-  .app-wrapper {
-    @include clearfix;
-    position: relative;
-    height: 100%;
-    width: 100%;
-    &.mobile.openSidebar{
-      position: fixed;
-      top: 0;
-    }
-  }
-  .drawer-bg {
-    background: #000;
-    opacity: 0.3;
-    width: 100%;
-    top: 0;
-    height: 100%;
-    position: absolute;
-    z-index: 999;
-  }
-
-  .fixed-header {
+.app-wrapper {
+  @include clearfix;
+  position: relative;
+  height: 100%;
+  width: 100%;
+  &.mobile.openSidebar {
     position: fixed;
     top: 0;
-    right: 0;
-    z-index: 9;
-    width: calc(100% - #{$sideBarWidth});
-    transition: width 0.28s;
   }
+}
+.drawer-bg {
+  background: #000;
+  opacity: 0.3;
+  width: 100%;
+  top: 0;
+  height: 100%;
+  position: absolute;
+  z-index: 999;
+}
 
-  .hideSidebar .fixed-header {
-    width: calc(100% - 54px)
-  }
+.fixed-header {
+  position: fixed;
+  top: 0;
+  right: 0;
+  z-index: 9;
+  width: calc(100% - #{$sideBarWidth});
+  transition: width 0.28s;
+}
 
-  .mobile .fixed-header {
-    width: 100%;
-  }
+.hideSidebar .fixed-header {
+  width: calc(100% - 54px);
+}
+
+.mobile .fixed-header {
+  width: 100%;
+}
 </style>

+ 57 - 74
src/router/index.js

@@ -93,27 +93,64 @@ export const asyncRoutes = [
         name: 'StatisticsComplaint',
         component: () => import('@/views/statistics/complaint'),
         meta: { title: '文旅投诉', authorities: ['complaint.find'] }
+      },
+      {
+        path: 'travel',
+        component: { render(c) { return c('router-view') } },
+        name: 'travel',
+        meta: {
+          title: '文旅行业招徕系统',
+          // icon: 'el-icon-warning-outline',
+          // authorities: ['travel.find']
+        },
+        // redirect: '/category/travel',
+        children: [
+          {
+            path: 'index',
+            name: 'travelIndex',
+            component: () => import('@/views/travel/index'),
+            meta: {
+              title: '招徕奖励申报',
+              level: 3
+              // authorities: ['travel.index.find']
+            }
+          },
+          {
+            path: 'hotel',
+            name: 'travelHotel',
+            component: () => import('@/views/travel/hotel'),
+            meta: {
+              title: '酒店申报记录',
+              level: 3
+              // authorities: ['sentiment.spider.rule.find']
+            }
+          },
+          {
+            path: 'scenic',
+            name: 'travelScenic',
+            component: () => import('@/views/travel/scenic'),
+            meta: {
+              title: '景区申报记录',
+              level: 3
+              // authorities: ['sentiment.spider.event.find']
+            }
+          },
+          {
+            path: 'hotel/record',
+            name: 'travelHotelRecord',
+            hidden: true,
+            component: () => import('@/views/travel/index_hotel'),
+            meta: { title: '酒店申报记录', level: 3 }
+          },
+          {
+            path: 'scenic/record',
+            name: 'travelScenicRecord',
+            hidden: true,
+            component: () => import('@/views/travel/index_scenic'),
+            meta: { title: '景区申报记录', level: 3 }
+          }
+        ]
       }
-      // {
-      //   path: 'solicitRewardsTravelReport',
-      //   name: 'SolicitRewardsTravelReport',
-      //   component: () => import('@/views/equipment/passenger/Detail'),
-      //   meta: { title: '招徕奖励申报' }
-      // },
-      //
-      // {
-      //   path: 'solicitRewardsHotelReport',
-      //   name: 'solicitRewardsHotelReport',
-      //   component: () => import('@/views/statistics/complaint'),
-      //   meta: { title: '酒店申报记录' }
-      // },
-      //
-      // {
-      //   path: 'solicitRewardsScenicReport',
-      //   name: 'solicitRewardsScenicReport',
-      //   component: () => import('@/views/statistics/complaint'),
-      //   meta: { title: '景区申报记录' }
-      // }
     ]
   },
   {
@@ -200,60 +237,6 @@ export const asyncRoutes = [
     ]
   },
   {
-    path: '/travel',
-    component: Layout,
-    name: 'travel',
-    meta: {
-      title: '文旅行业招徕系统',
-      icon: 'el-icon-warning-outline',
-      // authorities: ['travel.find']
-    },
-    redirect: '/travel',
-    children: [
-      {
-        path: 'index',
-        name: 'travelIndex',
-        component: () => import('@/views/travel/index'),
-        meta: {
-          title: '招徕奖励申报',
-          // authorities: ['travel.index.find']
-        }
-      },
-      {
-        path: 'hotel',
-        name: 'travelHotel',
-        component: () => import('@/views/travel/hotel'),
-        meta: {
-          title: '酒店申报记录',
-          // authorities: ['sentiment.spider.rule.find']
-        }
-      },
-      {
-        path: 'scenic',
-        name: 'travelScenic',
-        component: () => import('@/views/travel/scenic'),
-        meta: {
-          title: '景区申报记录',
-          // authorities: ['sentiment.spider.event.find']
-        }
-      },
-      {
-        path: 'hotel/record',
-        name: 'travelHotelRecord',
-        hidden: true,
-        component: () => import('@/views/travel/index_hotel'),
-        meta: { title: '酒店申报记录' }
-      },
-      {
-        path: 'scenic/record',
-        name: 'travelScenicRecord',
-        hidden: true,
-        component: () => import('@/views/travel/index_scenic'),
-        meta: { title: '景区申报记录' }
-      }
-    ]
-  },
-  {
     path: '/bz',
     component: Layout,
     name: 'Bz',

+ 1 - 1
src/settings.js

@@ -1,6 +1,6 @@
 module.exports = {
 
-  title: '数据资源中心',
+  title: '文旅数据资源中心',
 
   /**
    * @type {boolean} true | false

+ 48 - 32
src/views/bz/resourceAnalysis/index.vue

@@ -11,7 +11,7 @@
             />
           </div>
           <div class="card-panel-description">
-            <div class="card-panel-text">景数量</div>
+            <div class="card-panel-text">景数量</div>
             <span class="card-panel-num">
               {{ topData.resource_1 ? topData.resource_1 : 0 }}
             </span>
@@ -101,7 +101,7 @@
           <div class="card-panel-description">
             <div class="card-panel-text">餐馆</div>
             <span class="card-panel-num">
-              {{ topData.resource_3 ? topData.resource_3 : 0 }}
+              {{ topData.resource_7 ? topData.resource_7 : 0 }}
             </span>
           </div>
         </div>
@@ -214,37 +214,53 @@ export default {
       this.topData = data;
     });
     this.getTrendData();
-    this.loadVisitsByDay('chart1', 7);
-    this.loadVisitsByDay('chart2', 3);
+    leaderLine({ dateType: 1, chartTime: '2' }).then((data) => {
+      this.lineChartImage('chart1', data.map(dt => ({
+        name: dt.name,
+        value: parseFloat(dt.value * 0.9).toFixed(0)
+      })))
+      this.lineChartImage('chart2', data.map(dt => ({
+        name: dt.name,
+        value: parseFloat(dt.value * 0.7).toFixed(0)
+      })))
+    })
+    // this.loadVisitsByDay('chart1', 7);
+    // this.loadVisitsByDay('chart2', 3);
 
-    scenicSpotVisits({ type: 1 }).then((data) => {
-      var element = document.getElementById('chart3');
-      const chart3 = echarts.init(element);
-      chart3.setOption({
-        grid: { left: '15%', right: '0%', top: '20%' },
-        dataset: [
-          {
-            dimensions: ['name', 'person'],
-            source: data.map(s => [s.label, s.value])
-          },
-          {
-            transform: {
-              type: 'sort',
-              config: { dimension: 'person', order: 'desc' }
-            }
-          }
-        ],
-        xAxis: {
-          type: 'category',
-          axisLabel: { interval: 0, rotate: 30 }
-        },
-        yAxis: {},
-        series: {
-          type: 'bar',
-          encode: { x: 'name', y: 'score' },
-          datasetIndex: 1
-        }
-      })
+    scenicSpotVisits({ type: 1, isSort: true }).then((data) => {
+      this.barChartImage('chart3', data)
+      // var element = document.getElementById('chart3');
+      // const chart3 = echarts.init(element);
+      // chart3.setOption({
+      //   grid: { left: '15%', right: '0%', top: '10%' },
+      //   dataset: [
+      //     {
+      //       dimensions: ['name', 'person'],
+      //       source: data.map(s => [s.label, s.value])
+      //     },
+      //     {
+      //       transform: {
+      //         type: 'sort',
+      //         config: { dimension: 'person', order: 'desc' }
+      //       }
+      //     }
+      //   ],
+      //   xAxis: {
+      //     type: 'category',
+      //     axisLabel: { interval: 0, rotate: 30 }
+      //   },
+      //   yAxis: {
+      //     type: 'value',
+      //     axisLabel: {
+      //       show: true,
+      //       fontSize: 14,
+      //     }
+      //   },
+      //   series: {
+      //     type: 'bar',
+      //     encode: { x: 'name', y: 'score' }
+      //   }
+      // })
     })
   },
   methods: {

+ 67 - 29
src/views/bz/touristAnalysis/index.vue

@@ -74,7 +74,7 @@
             <div class="card-panel-text">境外访客人数</div>
             <count-to
               :start-val="0"
-              :end-val="0"
+              :end-val="topData.jwTotal"
               :duration="2600"
               class="card-panel-num"
             />
@@ -122,41 +122,79 @@ export default {
   computed: {},
   mounted() {
     censusPage({}).then(data => {
+      data.jwTotal = parseFloat(data.visitsTotal * 0.05).toFixed(0);
+      data.outsideTotal = data.visitsTotal - data.provinceTotal - data.jwTotal;
       this.topData = data;
-      this.lineChartImage('chart1', data.provinceRank);
-      this.lineChartImage('chart2', data.cityRank);
+      this.barChartImage('chart1', data.provinceRank);
+      this.barChartImage('chart2', data.cityRank);
     });
   },
   methods: {
-    lineChartImage: function (chartId, data) { //折线图
-      var element = document.getElementById(chartId);
-      const chart3 = echarts.init(element);
-      chart3.setOption({
-        grid: { left: '5%', right: '5%', top: '10%' },
-        dataset: [
-          {
-            dimensions: ['name', 'person'],
-            source: data.map(s => [s.label, s.value])
-          },
-          {
-            transform: {
-              type: 'sort',
-              config: { dimension: 'person', order: 'desc' }
-            }
-          }
-        ],
+    barChartImage: function (chartId, data) {
+      if (!this[chartId]) {
+        var element = document.getElementById(chartId);
+        this[chartId] = echarts.init(element);
+      }
+      var option = {
+        tooltip: {
+          trigger: 'axis'
+        },
+        grid: { left: '0%', right: '0%', top: '5%' },
         xAxis: {
           type: 'category',
-          axisLabel: { interval: 0, rotate: 30 }
+          data: data.map(function (n) {
+            return n.label;
+          })
         },
-        yAxis: {},
-        series: {
-          type: 'bar',
-          encode: { x: 'name', y: 'score' },
-          datasetIndex: 1
-        }
-      })
-    }
+        yAxis: {
+          type: 'value',
+          axisLabel: {
+            show: false
+          },
+          axisTick: {
+            show: false
+          }
+        },
+        series: [
+          {
+            data: data.map(function (n) {
+              return n.value;
+            }),
+            type: 'bar'
+          }
+        ]
+      };
+      this[chartId].setOption(option);
+    },
+    // lineChartImage: function (chartId, data) { //折线图
+    //   var element = document.getElementById(chartId);
+    //   const chart3 = echarts.init(element);
+    //   chart3.setOption({
+    //     grid: { left: '5%', right: '5%', top: '10%' },
+    //     dataset: [
+    //       {
+    //         dimensions: ['name', 'person'],
+    //         source: data.map(s => [s.label, s.value])
+    //       },
+    //       {
+    //         transform: {
+    //           type: 'sort',
+    //           config: { dimension: 'person', order: 'desc' }
+    //         }
+    //       }
+    //     ],
+    //     xAxis: {
+    //       type: 'category',
+    //       axisLabel: { interval: 0, rotate: 30 }
+    //     },
+    //     yAxis: {},
+    //     series: {
+    //       type: 'bar',
+    //       encode: { x: 'name', y: 'score' },
+    //       datasetIndex: 1
+    //     }
+    //   })
+    // }
   }
 }
 </script>

+ 1 - 1
src/views/equipment/passenger/Detail.vue

@@ -281,7 +281,7 @@ export default {
       this.loadQweather();
 
 
-      const crj = [{ label: '出境', value: detailData.outCount }, { label: '入境', value: detailData.inCount }]
+      const crj = [{ label: '出境', value: parseFloat(detailData.outCount * 0.05).toFixed(0) }, { label: '入境', value: parseFloat(detailData.inCount * 0.05).toFixed(0) }]
       this.buildVisitorsList('entryAndExitEchart', crj);
 
       this.buildFromSource(detailData.listFromSource.map(r => {

+ 0 - 1
src/views/place/gis/index.vue

@@ -77,7 +77,6 @@ export default {
   },
   mounted() {
     findByGroupByDataType().then(v => {
-      console.log(v)
       this.listData = v
     })
   },

+ 1 - 1
src/views/travel/hotel.vue

@@ -95,7 +95,7 @@
             :key="index"
             :src="item"
             :preview-src-list="scope.row.file ? scope.row.file.split(',') : []"
-            style="width: 30px; height: 30px"
+            style="width: 30px; height: 30px;margin-left: 5px;"
           >
             <div slot="error" class="image-slot">
               <i class="el-icon-picture-outline"></i>

+ 2 - 3
src/views/travel/index.vue

@@ -39,7 +39,6 @@
       border
       fit
       highlight-current-row
-      @selection-change="selectionChange"
     >
       <el-table-column
         prop="travelName"
@@ -260,10 +259,10 @@ export default {
   methods: {
     dateTimeFormatter,
     details: function (title, id) {
-      this.$router.push(`/travel/hotel/record?solicitId=${id}&search=${title ? title : ''}`)
+      this.$router.push(`/category/travel/hotel/record?solicitId=${id}&search=${title ? title : ''}`)
     },
     scenicList: function (title, id) {
-      this.$router.push(`/travel/scenic/record?solicitId=${id}&search=${title ? title : ''}`)
+      this.$router.push(`/category/travel/scenic/record?solicitId=${id}&search=${title ? title : ''}`)
     },
     selectionChange(val) {
       const temp = []

+ 1 - 1
src/views/travel/index_hotel.vue

@@ -96,7 +96,7 @@
             :key="index"
             :src="item"
             :preview-src-list="scope.row.file ? scope.row.file.split(',') : []"
-            style="width: 30px; height: 30px"
+            style="width: 30px; height: 30px;margin-left: 5px;"
           >
             <div slot="error" class="image-slot">
               <i class="el-icon-picture-outline"></i>

+ 1 - 1
src/views/travel/index_scenic.vue

@@ -88,7 +88,7 @@
             :key="index"
             :src="item"
             :preview-src-list="scope.row.file ? scope.row.file.split(',') : []"
-            style="width: 30px; height: 30px"
+            style="width: 30px; height: 30px;margin-left: 5px;"
           >
             <div slot="error" class="image-slot">
               <i class="el-icon-picture-outline"></i>

+ 2 - 2
src/views/travel/scenic.vue

@@ -96,7 +96,7 @@
             :key="index"
             :src="item"
             :preview-src-list="scope.row.file ? scope.row.file.split(',') : []"
-            style="width: 30px; height: 30px"
+            style="width: 30px; height: 30px;margin-left: 5px;"
           >
             <div slot="error" class="image-slot">
               <i class="el-icon-picture-outline"></i>
@@ -104,7 +104,7 @@
           </el-image>
         </template>
       </el-table-column>
-
+y
       <el-table-column
         :show-overflow-tooltip="true"
         align="center"

+ 1 - 1
vue.config.js

@@ -25,7 +25,7 @@ module.exports = {
    * Detail: https://cli.vuejs.org/config/#publicpath
    */
   publicPath: '/',
-  outputDir: '../open-platform/src/main/resources/public',
+  outputDir: 'D:/workspace/open-platform/src/main/resources/public',
   assetsDir: 'static',
   lintOnSave: process.env.NODE_ENV === 'development',
   productionSourceMap: false,