zhangxin 2 жил өмнө
parent
commit
a4b282c70f

+ 1 - 1
.env.development

@@ -5,7 +5,7 @@ VUE_APP_TITLE = 若依管理系统
 ENV = 'development'
 
 # 若依管理系统/开发环境
-VUE_APP_BASE_API = '/dev-api'
+VUE_APP_BASE_API = 'http://103.150.181.107:8080/'
 
 # 路由懒加载
 VUE_CLI_BABEL_TRANSPILE_MODULES = true

+ 20 - 0
src/router/index.js

@@ -87,6 +87,26 @@ export const constantRoutes = [
         meta: { title: '个人中心', icon: 'user' }
       }
     ]
+  },
+  {
+    path: '/messageList',
+    component: Layout,
+    // redirect: '消息管理',
+    name:'消息管理'  ,
+    children: [
+      {
+        path: 'messageList',
+        component: () => import('@/views/message/messageList'),
+        name: 'messageList',
+        meta: { title: '消息列表', icon: 'user' }
+      },
+      {
+        path: 'addMessage',
+        component: () => import('@/views/message/addMessage'),
+        name: 'addMessage',
+        meta: { title: '添加消息', icon: 'user' }
+      }
+    ]
   }
 ]
 

+ 51 - 0
src/views/dashboard/messageManager.vue

@@ -0,0 +1,51 @@
+<template>
+  <div :class="className" :style="{height:height,width:width}">1</div>
+</template>
+
+<script>
+import * as echarts from 'echarts';
+require('echarts/theme/macarons') // echarts theme
+import resize from './mixins/resize'
+
+const animationDuration = 6000
+
+export default {
+  mixins: [resize],
+  props: {
+    className: {
+      type: String,
+      default: 'chart'
+    },
+    width: {
+      type: String,
+      default: '100%'
+    },
+    height: {
+      type: String,
+      default: '300px'
+    }
+  },
+  data() {
+    return {
+      chart: null
+    }
+  },
+  mounted() {
+    this.$nextTick(() => {
+      this.initChart()
+    })
+  },
+  beforeDestroy() {
+    if (!this.chart) {
+      return
+    }
+    this.chart.dispose()
+    this.chart = null
+  },
+  methods: {
+    initChart() {
+      this.chart = echarts.init(this.$el, '消息列表')
+    }
+  }
+}
+</script>

+ 8 - 1
src/views/index_v1.vue

@@ -23,6 +23,11 @@
           <bar-chart />
         </div>
       </el-col>
+      <el-col :xs="24" :sm="24" :lg="8">
+        <div class="chart-wrapper">
+          <messageManager />
+        </div>
+      </el-col>
     </el-row>
 
     
@@ -35,6 +40,7 @@ import LineChart from './dashboard/LineChart'
 import RaddarChart from './dashboard/RaddarChart'
 import PieChart from './dashboard/PieChart'
 import BarChart from './dashboard/BarChart'
+import messageManager from './dashboard/messageManager'
 
 const lineChartData = {
   newVisitis: {
@@ -62,7 +68,8 @@ export default {
     LineChart,
     RaddarChart,
     PieChart,
-    BarChart
+    BarChart,
+    messageManager
   },
   data() {
     return {

+ 7 - 0
src/views/message/addMessage.vue

@@ -0,0 +1,7 @@
+<template>
+  <div :class="className" :style="{height:height,width:width}" >消息列表</div>
+</template>
+
+<script>
+
+</script>

+ 7 - 0
src/views/message/messageList.vue

@@ -0,0 +1,7 @@
+<template>
+  <div :class="className" :style="{height:height,width:width}" >添加消息</div>
+</template>
+
+<script>
+
+</script>