Jelajahi Sumber

完成 首页 产房信息 产房详情 PSY分析 出栏预测

linan 5 tahun lalu
induk
melakukan
0716e14caf

+ 2 - 11
src/router/index.js

@@ -1,6 +1,6 @@
 import Vue from 'vue'
 import VueRouter from 'vue-router'
-import store from '../store'
+// import store from '../store'
 
 import App from '../App.vue'
 import Login from '../views/Login/Login.vue'
@@ -39,14 +39,5 @@ const routes = [
 const router = new VueRouter({
 	routes
 })
-// 判断下是否需要登录
-router.beforeEach((to,from,next)=>{
-	// console.log(store.getters.token,to)
-    if(store.getters.token == null && !localStorage.getItem("token") && to.path !== '/login'){
-        next({
-            path:'/login',
-            query: {redirect:to.fullPath}
-        })
-    }else next()
-})
+
 export default router

+ 29 - 8
src/router/routes.js

@@ -2,6 +2,11 @@ import Home from '../views/Home/Home.vue'
 /* 首页 UnityTrace */
 import Index from '@/views/index/Index.vue'
 import DeliveryRoom from '@/views/deliveryRoom/DeliveryRoom.vue'
+import Detail from '@/views/deliveryRoom/detail/Detail.vue'
+/* 统计分许 */
+import PSY from '@/views/statisticAnalysis/PSY.vue'
+import Crop from '@/views/statisticAnalysis/Crop.vue'
+
 
 /* 群体管理 */
 import GroupRecord from '../views/groupManagment/GroupRecord.vue'
@@ -27,16 +32,32 @@ export default [
 		component: Home,
 		children: [
 			{
-				path: '/Index',
+				path: 'Index',
 				name: 'Index',
 				component: Index
 			},
 			// 产床管理
 			{
-				path: '/DeliveryRoom',
+				path: 'DeliveryRoom',
 				name: 'DeliveryRoom',
 				component: DeliveryRoom
 			},
+			{
+				path: 'Detail',
+				name: 'Detail',
+				component: Detail
+			},
+			// 统计分许
+			{
+				path: 'PSY',
+				name: 'PSY',
+				component: PSY
+			},
+			{
+				path: 'Crop',
+				name: 'Crop',
+				component: Crop
+			},
 			// 个体管理 deliveryRoom
 			{
 				path: 'UnityTrace',
@@ -51,32 +72,32 @@ export default [
 			},
 			// 模板
 			{
-				path: '/aa',
+				path: 'aa',
 				name: 'aa',
 				component: Aa
 			},
 			{
-				path: '/ab',
+				path: 'ab',
 				name: 'ab',
 				component: Ab
 			},
 			{
-				path: '/ac',
+				path: 'ac',
 				name: 'ac',
 				component: Ac
 			},
 			{
-				path: '/ad',
+				path: 'ad',
 				name: 'ad',
 				component: Ad
 			},
 			{
-				path: '/ae',
+				path: 'ae',
 				name: 'ae',
 				component: Ae
 			},
 			{
-				path: '/af',
+				path: 'af',
 				name: 'af',
 				component: Af
 			}

+ 0 - 8
src/store/index.js

@@ -1,6 +1,5 @@
 import Vue from 'vue'
 import Vuex from 'vuex'
-import sdk from "../sdk/index"
 
 Vue.use(Vuex)
 
@@ -20,13 +19,6 @@ export default new Vuex.Store({
 	actions: {
 		login({ commit }, token) {
 			commit('setToken', token)
-			// commit('route/ROUTE_CHANGED',{to: {path: '/'}})
 		},
-		fetch({ state }, params) {
-			sdk.fetch(params, state.token)
-		},
-		upload({ state }, params) {
-			return sdk.uploadCustom(params, state.token)
-		}
 	}
 })

+ 4 - 4
src/views/Home/Home.vue

@@ -2,7 +2,7 @@
     <div class="home">
         <header class="header">
             <div class="left">
-                慧牧科技
+                慧牧科技 
                 <el-button
                     @click="onMenuCollapse"
                     circle
@@ -258,8 +258,8 @@ export default {
             box-sizing: border-box;
             .col1 {
                 margin-right: 5px;
-                // background-color: rgb(46,38,87);
-                background-image: linear-gradient(to bottom, rgb(85, 70, 148) , rgb(41, 33, 85), rgb(41, 33, 85));
+                background-color: rgb(46,38,87);
+                // background-image: linear-gradient(to bottom, rgb(85, 70, 148) , rgb(41, 33, 85), rgb(41, 33, 85));
             }
             .col2 {
                 flex: 1;
@@ -280,7 +280,7 @@ export default {
                     display: flex;
                     align-items: center;
                     box-sizing: border-box;
-                    z-index: 1;
+                    z-index: 3;
                     position: fixed;
                     .item {
                         margin-right: 8px;

+ 25 - 6
src/views/Home/mencCofig.js

@@ -3,7 +3,7 @@ export const menuData = [
     {
         optionName: "首页",
         iconClassName: "el-icon-s-home",
-        routerName: "index",
+        routerName: "Index",
         index: '-1',
         disabled: false
     },
@@ -36,31 +36,50 @@ export const menuData = [
 
         ]
     },
+    {
+        optionName: "统计分析",
+        iconClassName: "el-icon-s-flag",
+        index: '2',
+        disabled: false,
+        childList: [
+            {
+                optionName: 'PSY分析',
+                index: '2-1',
+                routerName: "PSY"
+            },
+            {
+                optionName: '出栏预测',
+                index: '2-2',
+                routerName: "Crop"
+            }
+            
+        ]
+    },
 
     {
         optionName: "群体管理",
         iconClassName: "el-icon-s-flag",
-        index: '2',
+        index: '21',
         disabled: false,
         childList: [
             {
                 optionName: '群体档案',
-                index: '2-1',
+                index: '21-1',
                 routerName: "GroupRecord"
             },
             {
                 optionName: '健康分析',
-                index: '2-2',
+                index: '21-2',
                 routerName: "aa"
             },
             {
                 optionName: '转群记录',
-                index: '2-3',
+                index: '21-3',
                 routerName: "aa"
             },
             {
                 optionName: '群体盘点',
-                index: '2-4',
+                index: '21-4',
                 routerName: "aa"
             }
         ]

+ 100 - 36
src/views/deliveryRoom/DeliveryRoom.vue

@@ -2,10 +2,11 @@
     <div class="deliveryRoom">
         <section class="section">
             <ul class="ul">
-                <li class="li">
-                    <h5>产房001</h5>
-                    <img class="img" src="@/assets/deliveryRoom_2.png">
-                    <div class="info">
+
+                <li @click="toDetail" class="li" v-for="(item, index) in list" :key="index">
+                    <h5>产房00{{ index+1 }}</h5>
+                    <img class="img" :src="typeImgUrl[item.type - 1]" />
+                    <div class="info" v-if="item.type != 1">
                         <p class="p">
                             <span class="title">母猪耳标:</span>
                             <span class="content">16545</span>
@@ -19,43 +20,90 @@
                             <span class="content">2020-04-15</span>
                         </p>
                     </div>
+                    <p v-else class="info fontC">空床时间{{ 4 }}天</p>
                 </li>
-                <li class="li"></li>
-                <li class="li"></li>
-                <li class="li"></li>
-                <li class="li"></li>
-                <li class="li"></li>
-                <li class="li"></li>
-                <li class="li"></li>
-                <li class="li"></li>
+
             </ul>
+            <el-row type="flex" justify="center">
+                <el-col :span="8" class="pagination">
+                    <el-pagination
+                        @current-change="pageChange"
+                        background
+                        layout="prev, pager, next"
+                        :page-count="5"
+                    ></el-pagination>
+                </el-col>
+            </el-row>
         </section>
     </div>
 </template>
 
 
 <script>
+import typeImgUrl_1 from "@/assets/deliveryRoom_1.png";
+import typeImgUrl_2 from "@/assets/deliveryRoom_2.png";
+import typeImgUrl_3 from "@/assets/deliveryRoom_3.png";
+import typeImgUrl_4 from "@/assets/deliveryRoom_4.png";
+// 每页数据条数
+const pageSize = 10;
+
+let list = [
+    {
+        type: 1
+    },
+    {
+        type: 2
+    },
+    {
+        type: 3
+    },
+    {
+        type: 4
+    },
+    {
+        type: 1
+    },
+    {
+        type: 3
+    },
+    {
+        type: 3
+    },
+    {
+        type: 4
+    },
+    {
+        type: 2
+    },
+    {
+        type: 1
+    }
+];
+
 export default {
     name: "deliveryRoom",
     data() {
-        return {};
+        return {
+            list,
+            typeImgUrl: [
+                typeImgUrl_1,
+                typeImgUrl_2,
+                typeImgUrl_3,
+                typeImgUrl_4
+            ],
+            pageSize,
+            page: 1
+        };
     },
     created() {},
     methods: {
-        get() {
-            this.fetch({
-                api: "aaa",
-                method: "GET",
-                data: {},
-                success: res => {
-                    console.log(res);
-                },
-                fail: err => {
-                    console.log(err);
-                    if (err.errMsg) this.$message.error(err.errMsg);
-                    else this.$message.error("服务器发生异常");
-                }
-            });
+        toDetail() {
+            this.$router.push({path: "Detail"})
+        },
+        pageChange(p) {
+            console.log(p);
+            this.page = p;
+            // this.getDeviceList();
         }
     }
 };
@@ -74,30 +122,46 @@ export default {
                 width: 290px;
                 height: 350px;
                 margin: 10px;
-                border: 1px solid #00f;
-                h5{
+                h5 {
                     text-align: center;
                     font-size: 30px;
                     color: #424242;
-                    background-color: #199ED8;
+                    background-color: #199ed8;
                 }
-                .img{
+                .img {
                     width: 100%;
                 }
-                .info{
+                .info {
                     flex: 1;
                     display: flex;
                     padding-left: 20px;
                     flex-direction: column;
                     justify-content: space-around;
-                    color: #555;
-                    .p{
-                        .title{}
-                        .content{}
+                    .p {
+                        .title {
+                            font-weight: 600;
+                            color: rgb(136, 127, 127);
+                        }
+                        .content {
+                            color: #777;
+                        }
                     }
                 }
+                .fontC {
+                    align-items: center;
+                    padding-left: 0px;
+                    color: rgb(80, 183, 231);
+                    font-size: 20px;
+                    font-weight: 600;
+                }
             }
         }
     }
 }
+
+// border: 1px solid #00f;
+
+.pagination {
+    margin-top: 5px;
+}
 </style>

+ 218 - 0
src/views/deliveryRoom/detail/Detail.vue

@@ -0,0 +1,218 @@
+<template>
+    <div class="Detail">
+        <header class="header">
+            <el-page-header @back="goBack" content="产床信息" />
+            <div class="title">
+                <h4></h4>
+                <span class="title">产床002</span>
+                <el-date-picker
+                    v-model="date"
+                    @change="pickerChange"
+                    type="date"
+                    value-format="yyyy-MM-dd"
+                    :picker-options="pickerOptions"
+                    placeholder="选择日期"
+                ></el-date-picker>
+            </div>
+        </header>
+
+        <section class="section">
+            <article class="left">
+                <ul class="ul">
+                    <li class="li">
+                        <span class="title">产仔数:</span>
+                        <span class="content">9只</span>
+                    </li>
+                    <li class="li">
+                        <span class="title">活仔数:</span>
+                        <span class="content">9只</span>
+                    </li>
+                    <li class="li">
+                        <span class="title">存活率:</span>
+                        <span class="content">100%</span>
+                    </li>
+                    <li class="li">
+                        <span class="title">仔猪日龄:</span>
+                        <span class="content">12天</span>
+                    </li>
+                    <li class="li">
+                        <span class="title">产床状态:</span>
+                        <span class="content">已产仔</span>
+                    </li>
+                    <li class="li">
+                        <span class="title">出生日期:</span>
+                        <span class="content">2020-04-25</span>
+                    </li>
+                    <li class="li">
+                        <span class="title">预计断奶剩余天数:</span>
+                        <span class="content">16天</span>
+                    </li>
+                </ul>
+            </article>
+
+            <article class="right">
+                <div class="contianer">
+                    <el-carousel height="250px" indicator-position="none">
+                        <el-carousel-item>
+                            <img
+                                @click="toSowDetail"
+                                src="https://ns-strategy.cdn.bcebos.com/ns-strategy/upload/fc_big_pic/part-00044-516.jpg"
+                            />
+                        </el-carousel-item>
+                        <el-carousel-item>
+                            <img
+                                @click="toSowDetail"
+                                src="https://ss0.bdstatic.com/70cFvHSh_Q1YnxGkpoWK1HF6hhy/it/u=1451307779,3128056523&fm=26&gp=0.jpg"
+                            />
+                        </el-carousel-item>
+                        <el-carousel-item>
+                            <img
+                                @click="toSowDetail"
+                                src="https://ss1.bdstatic.com/70cFuXSh_Q1YnxGkpoWK1HF6hhy/it/u=1510260968,1676318121&fm=26&gp=0.jpg"
+                            />
+                        </el-carousel-item>
+                        <el-carousel-item>
+                            <img
+                                @click="toSowDetail"
+                                src="https://ss2.bdstatic.com/70cFvnSh_Q1YnxGkpoWK1HF6hhy/it/u=3523098162,3587342676&fm=26&gp=0.jpg"
+                            />
+                        </el-carousel-item>
+                    </el-carousel>
+                </div>
+            </article>
+        </section>
+
+        <footer class="footer">
+            <chart-a></chart-a>
+            <chart-b></chart-b>
+        </footer>
+    </div>
+</template>
+
+<script>
+import chart_a from "./charts/chart_a";
+import chart_b from "./charts/chart_b";
+
+// 时间选择器配置
+const pickerOptions = {
+    // 禁用时间
+    disabledDate(time) {
+        return time.getTime() > Date.now();
+    },
+    shortcuts: [
+        {
+            text: "今天",
+            onClick(picker) {
+                picker.$emit("pick", new Date());
+            }
+        },
+        {
+            text: "昨天",
+            onClick(picker) {
+                const date = new Date();
+                date.setTime(date.getTime() - 3600 * 1000 * 24);
+                picker.$emit("pick", date);
+            }
+        },
+        {
+            text: "前天",
+            onClick(picker) {
+                const date = new Date();
+                date.setTime(date.getTime() - 3600 * 1000 * 24 * 2);
+                picker.$emit("pick", date);
+            }
+        }
+    ]
+};
+
+export default {
+    name: "Detail",
+    components: {
+        "chart-a": chart_a,
+        "chart-b": chart_b
+    },
+    data() {
+        return {
+            date: "",
+            pickerOptions
+        };
+    },
+    created() {},
+    methods: {
+        pickerChange(value) {
+            console.log(value);
+            // this.date = Math.floor(new Date(value[0]).getTime() / 1000)
+            // this.getReportList()
+        },
+        toSowDetail() {
+            console.log(555);
+            this.$message.warning("母猪详细信息正在开发中!!");
+        },
+        goBack() {
+            this.$router.go(-1)
+        }
+    }
+};
+</script>
+
+<style lang="scss" scoped>
+.Detail {
+    .header {
+        > .title {
+            display: flex;
+            justify-content: space-between;
+            align-items: center;
+            padding: 0px 30% 10px 20px;
+            margin: 0 0 10px 0;
+            border-bottom: 2px solid #eee;
+            > h4 {
+                color: #777;
+            }
+            > .title {
+                font-size: 20px;
+                font-weight: 600;
+                color: #444;
+            }
+        }
+    }
+    .section {
+        display: flex;
+        .left {
+            width: 40%;
+            // border: 2px solid rgb(182, 63, 63);
+            .ul {
+                .li {
+                    margin: 5px 0 5px 10px;
+                    .title {
+                        font-size: 17px;
+                        color: #474444;
+                    }
+                    .content {
+                        font-size: 16px;
+                        color: #555;
+                    }
+                }
+            }
+        }
+        .right {
+            flex: 1;
+            // border: 2px solid rgb(63, 182, 69);
+            .contianer {
+                width: 500px;
+                height: 250px;
+                border-radius: 6px;
+                overflow: hidden;
+                img {
+                    width: 100%;
+                    height: 250px;
+                }
+            }
+        }
+    }
+    .footer {
+        margin-top: 20px;
+    }
+}
+
+// border: 1px solid #00f;
+</style>

+ 115 - 0
src/views/deliveryRoom/detail/charts/chart_a.vue

@@ -0,0 +1,115 @@
+<template>
+    <div class="chart_a">
+        <div id="chart_a" style="width: 75%;height:300px;"></div>
+    </div>
+</template>
+
+<script>
+export default {
+    name: "chart_a",
+    props: [
+        'tagId'
+    ],
+    data() {
+        return {
+        };
+    },
+    mounted() {
+        this.drawChart();
+    },
+    methods: {
+        drawChart() {
+            // 基于准备好的dom,初始化echarts实例
+            let myChart = this.$echarts.init(
+                document.getElementById("chart_a")
+            );
+            // 指定图表的配置项和数据
+            let option = {
+                title: {
+                    text: "小时温度",
+                    subtext: "纯属虚构",
+                    left: 100
+                },
+                tooltip: {
+                    trigger: "axis"
+                },
+                toolbox: {
+                    show: true,
+                    feature: {
+                        dataZoom: {
+                            yAxisIndex: "none"
+                        },
+                        dataView: { readOnly: true },
+                        magicType: { type: ["line", "bar"] },
+                        restore: {},
+                        saveAsImage: {}
+                    }
+                },
+                color: {
+                    type: "linear",
+                    x: 0,
+                    y: 0,
+                    x2: 0,
+                    y2: 1,
+                    colorStops: [
+                        {
+                            offset: 0,
+                            color: "red" // 0% 处的颜色
+                        },
+                        {
+                            offset: 1,
+                            color: "blue" // 100% 处的颜色
+                        }
+                    ]
+                },
+                xAxis: {
+                    type: "category",
+                    boundaryGap: false,
+                    data: [
+                        "七小时前",
+                        "六小时前",
+                        "五小时前",
+                        "四小时前",
+                        "三小时前",
+                        "两小时前",
+                        "当前"
+                    ]
+                },
+                yAxis: {
+                    type: "value",
+                    axisLabel: {
+                        formatter: "{value} °C"
+                    },
+                    scale: true
+                },
+                series: [
+                    {
+                        name: "时间",
+                        type: "line",
+                        data: [32.5,32.66,32.52, 32.6, 32.4, 32.5, 32.4, 32.6, 32.4],
+                        markPoint: {
+                            data: [
+                                { type: "max", name: "最大值" },
+                                { type: "min", name: "最小值" }
+                            ]
+                        },
+                        markLine: {
+                            data: [{ type: "average", name: "平均值" }]
+                        }
+                    }
+                ]
+            };
+            // 使用刚指定的配置项和数据显示图表。
+            myChart.setOption(option);
+        }
+    }
+};
+</script>
+
+<style lang="scss" scoped>
+.chart_a {
+    .chart {
+        width: 100%;
+    }
+}
+</style>

+ 114 - 0
src/views/deliveryRoom/detail/charts/chart_b.vue

@@ -0,0 +1,114 @@
+<template>
+    <div class="chart_b">
+        <div id="chart_b" style="width: 75%;height:300px;"></div>
+    </div>
+</template>
+
+<script>
+export default {
+    name: "chart_b",
+    props: {
+    },
+    data() {
+        return {
+        };
+    },
+    created() {
+        
+    },
+    mounted() {
+        
+        this.drawChart();
+    },
+    methods: {
+        drawChart() {
+            // 基于准备好的dom,初始化echarts实例
+            let myChart = this.$echarts.init(
+                document.getElementById('chart_b')
+            );
+            // 指定图表的配置项和数据
+            let option = {
+                title: {
+                    text: "日温度",
+                    subtext: "纯属虚构",
+                    left: 100
+                },
+                tooltip: {
+                    trigger: "axis"
+                },
+                toolbox: {
+                    show: true,
+                    feature: {
+                        dataZoom: {
+                            yAxisIndex: "none"
+                        },
+                        dataView: { readOnly: true },
+                        magicType: { type: ["line", "bar"] },
+                        restore: {},
+                        saveAsImage: {}
+                    }
+                },
+                color: {
+                    type: "linear",
+                    x: 0,
+                    y: 0,
+                    x2: 0,
+                    y2: 1,
+                    colorStops: [
+                        {
+                            offset: 0,
+                            color: "red" // 0% 处的颜色
+                        },
+                        {
+                            offset: 1,
+                            color: "blue" // 100% 处的颜色
+                        }
+                    ]
+                },
+                xAxis: {
+                    type: "category",
+                    boundaryGap: false,
+                    data: [
+                        "七日前",
+                        "六日前",
+                        "五日前",
+                        "四日前",
+                        "三日前",
+                        "两日前",
+                        "当前"
+                    ]
+                },
+                yAxis: {
+                    type: "value",
+                    axisLabel: {
+                        formatter: "{value} °C"
+                    },
+                    scale: true
+                },
+                series: [
+                    {
+                        name: "时间",
+                        type: "line",
+                        data: [32.5, 32.6, 32.4, 32.5, 32.4, 32.6, 32.4],
+                        markPoint: {
+                            data: [
+                                { type: "max", name: "最大值" },
+                                { type: "min", name: "最小值" }
+                            ]
+                        },
+                        markLine: {
+                            data: [{ type: "average", name: "平均值" }]
+                        }
+                    }
+                ]
+            };
+            // 使用刚指定的配置项和数据显示图表。
+            myChart.setOption(option);
+        }
+    }
+};
+</script>
+
+<style lang="scss" scoped>
+
+</style>

+ 1 - 0
src/views/index/Index.vue

@@ -158,6 +158,7 @@ export default {
             height: 100%;
             display: flex;
             box-sizing: border-box;
+            border-radius: 10px;
             align-items: center;
             
             .left{

+ 123 - 0
src/views/statisticAnalysis/Crop.vue

@@ -0,0 +1,123 @@
+<template>
+    <div class="Crop">
+        <header class="header">出栏预测:</header>
+
+        <section class="section">
+            <el-select v-model="value" placeholder="请选择">
+                <el-option
+                    v-for="item in options"
+                    :key="item.value"
+                    :label="item.label"
+                    :value="item.value"
+                ></el-option>
+            </el-select>
+            <div class="container">
+                <article class="left">
+                    <crop-chart-a />
+                </article>
+                <article class="right">
+                    <crop-chart-b />
+                </article>
+            </div>
+        </section>
+        <section class="section">
+            <el-select v-model="value2" placeholder="请选择">
+                <el-option
+                    v-for="item in options2"
+                    :key="item.value"
+                    :label="item.label"
+                    :value="item.value"
+                ></el-option>
+            </el-select>
+            <div class="container">
+                <article class="left">
+                    <crop-chart-c />
+                </article>
+                <article class="right">
+                    <crop-chart-d />
+                </article>
+            </div>
+        </section>
+    </div>
+</template>
+
+<script>
+import crop_chart_a from "./charts/crop_chart_a";
+import crop_chart_b from "./charts/crop_chart_b";
+import crop_chart_c from "./charts/crop_chart_c";
+import crop_chart_d from "./charts/crop_chart_d";
+export default {
+    name: "Crop",
+    components: {
+        "crop-chart-a": crop_chart_a,
+        "crop-chart-b": crop_chart_b,
+        "crop-chart-c": crop_chart_c,
+        "crop-chart-d": crop_chart_d
+    },
+    data() {
+        return {
+            options: [
+                {
+                    value: "选项1",
+                    label: "一牧场"
+                },
+                {
+                    value: "选项2",
+                    label: "二牧场"
+                }
+            ],
+            options2: [
+                {
+                    value: "选项1",
+                    label: "一舍"
+                },
+                {
+                    value: "选项2",
+                    label: "二舍"
+                },
+                {
+                    value: "选项3",
+                    label: "三舍"
+                },
+                {
+                    value: "选项4",
+                    label: "四舍"
+                },
+                {
+                    value: "选项5",
+                    label: "五舍"
+                }
+            ],
+            value: "选项1",
+            value2: "选项1"
+        };
+    },
+    created() {},
+    methods: {}
+};
+</script>
+
+<style lang="scss" scoped>
+.Crop {
+    .header {
+        margin-bottom: 15px;
+        font-size: 18px;
+        font-weight: 600;
+        color: #444;
+    }
+    .section {
+        .container {
+            display: flex;
+            .left {
+                width: 40%;
+                // border: 1px solid #066;
+                overflow: visible;
+            }
+            .right {
+                width: 40%;
+                // border: 1px solid rgb(39, 37, 160);
+            }
+        }
+    }
+}
+</style>

+ 142 - 0
src/views/statisticAnalysis/PSY.vue

@@ -0,0 +1,142 @@
+<template>
+    <div class="PSY">
+        <h5 class="h5">PSY分析:</h5>
+        <header class="header">
+            <article class="card">
+                <h5 class="title">PSA</h5>
+                <span class="value">19.8</span>
+                <div class="describe">
+                    <div class="up">
+                        <span>年同比</span>
+                        <span class="icon el-icon-caret-top"></span>
+                        <span>12%</span>
+                    </div>
+                    <div class="down">
+                        <span>周环比</span>
+                        <span class="icon el-icon-caret-bottom"></span>
+                        <span>11%</span>
+                    </div>
+                </div>
+            </article>
+
+            <article class="card">
+                <h5 class="title">PSA</h5>
+                <span class="value">19.8</span>
+                <div class="describe">
+                    <div class="up">
+                        <span>年同比</span>
+                        <span class="icon el-icon-caret-top"></span>
+                        <span>12%</span>
+                    </div>
+                    <div class="down">
+                        <span>周环比</span>
+                        <span class="icon el-icon-caret-bottom"></span>
+                        <span>11%</span>
+                    </div>
+                </div>
+            </article>
+
+            <article class="card">
+                <h5 class="title">PSA</h5>
+                <span class="value">19.8</span>
+                <div class="describe">
+                    <div class="up">
+                        <span>年同比</span>
+                        <span class="icon el-icon-caret-top"></span>
+                        <span>12%</span>
+                    </div>
+                    <div class="down">
+                        <span>周环比</span>
+                        <span class="icon el-icon-caret-bottom"></span>
+                        <span>11%</span>
+                    </div>
+                </div>
+            </article>
+        </header>
+        <section class="section">
+            <psy-chart/>
+        </section>
+    </div>
+</template>
+
+<script>
+import PSY_chart from "./charts/PSY_chart";
+
+export default {
+    name: "PSY",
+    components: {
+        "psy-chart": PSY_chart
+    },
+    data() {
+        return {};
+    },
+    created() {
+    },
+    methods: {
+        
+    }
+};
+</script>
+
+<style lang="scss" scoped>
+.PSY{
+    .h5{
+        margin-bottom: 15px;
+        font-size: 18px;
+        font-weight: 600;
+        color: #444;
+    }
+    .header{
+        width: 75%;
+        display: flex;
+        justify-content: space-around;
+        .card{
+            display: flex;
+            flex-direction: column;
+            justify-content: space-between;
+            align-items: center;
+            width: 250px;
+            height: 140px;
+            padding: 15px 20px 0 20px;
+            border: 1px solid #ddd;
+            border-radius: 10px;
+            color: #999;
+            .title{
+                font-size: 30px;
+                
+            }
+            .value{
+                font-size: 30px;
+                text-align: center;
+                color: #444;
+                font-weight: 600;
+                padding-bottom: 10px;
+                width: 100%;
+                border-bottom: 2px #ddd solid;
+            }
+            .describe{
+                flex: 1;
+                display: flex;
+                justify-content: center;
+                align-items: center;
+                .up{
+                    margin-right: 25px;
+                    .icon{
+                        color: #8FD96B;
+                        margin: 0 3px;
+                    }
+                }
+                .down{
+                    .icon{
+                        color: #F5232E;
+                        margin: 0 3px;
+                    }
+                }
+            }
+        }
+    }
+    .section{
+        margin-top: 30px;
+    }
+}
+</style>

+ 107 - 0
src/views/statisticAnalysis/charts/PSY_chart.vue

@@ -0,0 +1,107 @@
+<template>
+    <div class="PSY_chart">
+        <div id="PSY_chart" style="width: 60%;height:400px;"></div>
+    </div>
+</template>
+
+<script>
+export default {
+    name: "PSY_chart",
+    props: {},
+    data() {
+        return {};
+    },
+    created() {},
+    mounted() {
+        this.drawChart();
+    },
+    methods: {
+        drawChart() {
+            // 基于准备好的dom,初始化echarts实例
+            let myChart = this.$echarts.init(
+                document.getElementById("PSY_chart")
+            );
+            // 指定图表的配置项和数据
+            let option = {
+                title: {
+                    text: "PSY曲线",
+                    left: "center",
+                    bottom: 5
+                },
+                color: ["#3398DB"],
+                tooltip: {
+                    trigger: "axis",
+                    axisPointer: {
+                        // 坐标轴指示器,坐标轴触发有效
+                        type: "line" // 默认为直线,可选为:'line' | 'shadow'
+                    }
+                },
+                toolbox: {
+                    show: true,
+                    feature: {
+                        dataView: { show: true, readOnly: true },
+                        magicType: { show: true, type: ["line", "bar"] },
+                        restore: { show: true },
+                        saveAsImage: { show: true }
+                    }
+                },
+                grid: {
+                    left: "10%",
+                    right: "10%",
+                    bottom: "13%",
+                    containLabel: true
+                },
+                xAxis: [
+                    {
+                        type: "category",
+                        data: [
+                            "七月",
+                            "八月",
+                            "九月",
+                            "十月",
+                            "十一月",
+                            "十二月"
+                        ],
+                        axisTick: {
+                            alignWithLabel: true
+                        }
+                    }
+                ],
+                yAxis: [
+                    {
+                        type: "value"
+                    }
+                ],
+                series: [
+                    {
+                        name: "数量",
+                        type: "line",
+                        barWidth: "50%",
+                        data: [40, 66, 80, 120, 82, 66],
+                        encode: {
+                            // Map the "amount" column to X axis.
+                            x: "amount",
+                            // Map the "product" column to Y axis
+                            y: "product"
+                        },
+                        markPoint: {
+                            data: [
+                                { type: "max", name: "最大值" },
+                                { type: "min", name: "最小值" }
+                            ]
+                        },
+                        markLine: {
+                            data: [{ type: "average", name: "平均值" }]
+                        }
+                    }
+                ]
+            };
+            // 使用刚指定的配置项和数据显示图表。
+            myChart.setOption(option);
+        }
+    }
+};
+</script>
+
+<style lang="scss" scoped>
+</style>

+ 107 - 0
src/views/statisticAnalysis/charts/crop_chart_a.vue

@@ -0,0 +1,107 @@
+<template>
+    <div class="crop_chart_a">
+        <div id="crop_chart_a" style="width: 100%;height:400px;"></div>
+    </div>
+</template>
+
+<script>
+export default {
+    name: "crop_chart_a",
+    props: {},
+    data() {
+        return {};
+    },
+    created() {},
+    mounted() {
+        this.drawChart();
+    },
+    methods: {
+        drawChart() {
+            // 基于准备好的dom,初始化echarts实例
+            let myChart = this.$echarts.init(
+                document.getElementById("crop_chart_a")
+            );
+            // 指定图表的配置项和数据
+            let option = {
+                title: {
+                    text: "未来保育猪数量预测",
+                    left: "center",
+                    bottom: 5
+                },
+                color: ["#3398DB"],
+                tooltip: {
+                    trigger: "axis",
+                    axisPointer: {
+                        // 坐标轴指示器,坐标轴触发有效
+                        type: "line" // 默认为直线,可选为:'line' | 'shadow'
+                    }
+                },
+                toolbox: {
+                    show: true,
+                    feature: {
+                        dataView: { show: true, readOnly: true },
+                        magicType: { show: true, type: ["line", "bar"] },
+                        restore: { show: true },
+                        saveAsImage: { show: true }
+                    }
+                },
+                grid: {
+                    left: "10%",
+                    right: "10%",
+                    bottom: "13%",
+                    containLabel: true
+                },
+                xAxis: [
+                    {
+                        type: "category",
+                        data: [
+                            "七月",
+                            "八月",
+                            "九月",
+                            "十月",
+                            "十一月",
+                            "十二月"
+                        ],
+                        axisTick: {
+                            alignWithLabel: true
+                        }
+                    }
+                ],
+                yAxis: [
+                    {
+                        type: "value"
+                    }
+                ],
+                series: [
+                    {
+                        name: "数量",
+                        type: "bar",
+                        barWidth: "50%",
+                        data: [52, 200, 334, 390, 330, 220],
+                        encode: {
+                            // Map the "amount" column to X axis.
+                            x: "amount",
+                            // Map the "product" column to Y axis
+                            y: "product"
+                        },
+                        markPoint: {
+                            data: [
+                                { type: "max", name: "最大值" },
+                                { type: "min", name: "最小值" }
+                            ]
+                        },
+                        markLine: {
+                            data: [{ type: "average", name: "平均值" }]
+                        }
+                    }
+                ]
+            };
+            // 使用刚指定的配置项和数据显示图表。
+            myChart.setOption(option);
+        }
+    }
+};
+</script>
+
+<style lang="scss" scoped>
+</style>

+ 107 - 0
src/views/statisticAnalysis/charts/crop_chart_b.vue

@@ -0,0 +1,107 @@
+<template>
+    <div class="crop_chart_b">
+        <div id="crop_chart_b" style="width: 100%;height:400px;"></div>
+    </div>
+</template>
+
+<script>
+export default {
+    name: "crop_chart_b",
+    props: {},
+    data() {
+        return {};
+    },
+    created() {},
+    mounted() {
+        this.drawChart();
+    },
+    methods: {
+        drawChart() {
+            // 基于准备好的dom,初始化echarts实例
+            let myChart = this.$echarts.init(
+                document.getElementById("crop_chart_b")
+            );
+            // 指定图表的配置项和数据
+            let option = {
+                title: {
+                    text: "未来商品猪数量预测",
+                    left: "center",
+                    bottom: 5
+                },
+                color: ["#3398DB"],
+                tooltip: {
+                    trigger: "axis",
+                    axisPointer: {
+                        // 坐标轴指示器,坐标轴触发有效
+                        type: "shadow" // 默认为直线,可选为:'line' | 'shadow'
+                    }
+                },
+                toolbox: {
+                    show: true,
+                    feature: {
+                        dataView: { show: true, readOnly: true },
+                        magicType: { show: true, type: ["line", "bar"] },
+                        restore: { show: true },
+                        saveAsImage: { show: true }
+                    }
+                },
+                grid: {
+                    left: "10%",
+                    right: "10%",
+                    bottom: "13%",
+                    containLabel: true
+                },
+                xAxis: [
+                    {
+                        type: "category",
+                        data: [
+                            "七月",
+                            "八月",
+                            "九月",
+                            "十月",
+                            "十一月",
+                            "十二月"
+                        ],
+                        axisTick: {
+                            alignWithLabel: true
+                        }
+                    }
+                ],
+                yAxis: [
+                    {
+                        type: "value"
+                    }
+                ],
+                series: [
+                    {
+                        name: "数量",
+                        type: "bar",
+                        barWidth: "50%",
+                        data: [52, 200, 334, 390, 330, 220],
+                        encode: {
+                            // Map the "amount" column to X axis.
+                            x: "amount",
+                            // Map the "product" column to Y axis
+                            y: "product"
+                        },
+                        markPoint: {
+                            data: [
+                                { type: "max", name: "最大值" },
+                                { type: "min", name: "最小值" }
+                            ]
+                        },
+                        markLine: {
+                            data: [{ type: "average", name: "平均值" }]
+                        }
+                    }
+                ]
+            };
+            // 使用刚指定的配置项和数据显示图表。
+            myChart.setOption(option);
+        }
+    }
+};
+</script>
+
+<style lang="scss" scoped>
+</style>

+ 107 - 0
src/views/statisticAnalysis/charts/crop_chart_c.vue

@@ -0,0 +1,107 @@
+<template>
+    <div class="crop_chart_c">
+        <div id="crop_chart_c" style="width: 100%;height:400px;"></div>
+    </div>
+</template>
+
+<script>
+export default {
+    name: "crop_chart_c",
+    props: {},
+    data() {
+        return {};
+    },
+    created() {},
+    mounted() {
+        this.drawChart();
+    },
+    methods: {
+        drawChart() {
+            // 基于准备好的dom,初始化echarts实例
+            let myChart = this.$echarts.init(
+                document.getElementById("crop_chart_c")
+            );
+            // 指定图表的配置项和数据
+            let option = {
+                title: {
+                    text: "未来保育猪数量预测",
+                    left: "center",
+                    bottom: 5
+                },
+                color: ["#3398DB"],
+                tooltip: {
+                    trigger: "axis",
+                    axisPointer: {
+                        // 坐标轴指示器,坐标轴触发有效
+                        type: "line" // 默认为直线,可选为:'line' | 'shadow'
+                    }
+                },
+                toolbox: {
+                    show: true,
+                    feature: {
+                        dataView: { show: true, readOnly: true },
+                        magicType: { show: true, type: ["line", "bar"] },
+                        restore: { show: true },
+                        saveAsImage: { show: true }
+                    }
+                },
+                grid: {
+                    left: "10%",
+                    right: "10%",
+                    bottom: "13%",
+                    containLabel: true
+                },
+                xAxis: [
+                    {
+                        type: "category",
+                        data: [
+                            "七月",
+                            "八月",
+                            "九月",
+                            "十月",
+                            "十一月",
+                            "十二月"
+                        ],
+                        axisTick: {
+                            alignWithLabel: true
+                        }
+                    }
+                ],
+                yAxis: [
+                    {
+                        type: "value"
+                    }
+                ],
+                series: [
+                    {
+                        name: "数量",
+                        type: "bar",
+                        barWidth: "50%",
+                        data: [355, 200, 422, 390, 330, 220],
+                        encode: {
+                            // Map the "amount" column to X axis.
+                            x: "amount",
+                            // Map the "product" column to Y axis
+                            y: "product"
+                        },
+                        markPoint: {
+                            data: [
+                                { type: "max", name: "最大值" },
+                                { type: "min", name: "最小值" }
+                            ]
+                        },
+                        markLine: {
+                            data: [{ type: "average", name: "平均值" }]
+                        }
+                    }
+                ]
+            };
+            // 使用刚指定的配置项和数据显示图表。
+            myChart.setOption(option);
+        }
+    }
+};
+</script>
+
+<style lang="scss" scoped>
+</style>

+ 107 - 0
src/views/statisticAnalysis/charts/crop_chart_d.vue

@@ -0,0 +1,107 @@
+<template>
+    <div class="crop_chart_d">
+        <div id="crop_chart_d" style="width: 100%;height:400px;"></div>
+    </div>
+</template>
+
+<script>
+export default {
+    name: "crop_chart_d",
+    props: {},
+    data() {
+        return {};
+    },
+    created() {},
+    mounted() {
+        this.drawChart();
+    },
+    methods: {
+        drawChart() {
+            // 基于准备好的dom,初始化echarts实例
+            let myChart = this.$echarts.init(
+                document.getElementById("crop_chart_d")
+            );
+            // 指定图表的配置项和数据
+            let option = {
+                title: {
+                    text: "未来保育猪数量预测",
+                    left: "center",
+                    bottom: 5
+                },
+                color: ["#3398DB"],
+                tooltip: {
+                    trigger: "axis",
+                    axisPointer: {
+                        // 坐标轴指示器,坐标轴触发有效
+                        type: "line" // 默认为直线,可选为:'line' | 'shadow'
+                    }
+                },
+                toolbox: {
+                    show: true,
+                    feature: {
+                        dataView: { show: true, readOnly: true },
+                        magicType: { show: true, type: ["line", "bar"] },
+                        restore: { show: true },
+                        saveAsImage: { show: true }
+                    }
+                },
+                grid: {
+                    left: "10%",
+                    right: "10%",
+                    bottom: "13%",
+                    containLabel: true
+                },
+                xAxis: [
+                    {
+                        type: "category",
+                        data: [
+                            "七月",
+                            "八月",
+                            "九月",
+                            "十月",
+                            "十一月",
+                            "十二月"
+                        ],
+                        axisTick: {
+                            alignWithLabel: true
+                        }
+                    }
+                ],
+                yAxis: [
+                    {
+                        type: "value"
+                    }
+                ],
+                series: [
+                    {
+                        name: "数量",
+                        type: "bar",
+                        barWidth: "50%",
+                        data: [366, 566, 334, 390, 330, 220],
+                        encode: {
+                            // Map the "amount" column to X axis.
+                            x: "amount",
+                            // Map the "product" column to Y axis
+                            y: "product"
+                        },
+                        markPoint: {
+                            data: [
+                                { type: "max", name: "最大值" },
+                                { type: "min", name: "最小值" }
+                            ]
+                        },
+                        markLine: {
+                            data: [{ type: "average", name: "平均值" }]
+                        }
+                    }
+                ]
+            };
+            // 使用刚指定的配置项和数据显示图表。
+            myChart.setOption(option);
+        }
+    }
+};
+</script>
+
+<style lang="scss" scoped>
+</style>

+ 3 - 80
src/views/template/Aa.vue

@@ -1,57 +1,6 @@
 <template>
     <div class="GroupRecord">
-        <header id="header">
-            <el-row type="flex">
-                <el-col :span="4">
-                    <el-select v-model="value" placeholder="请选择">
-                        <el-option label="item.label" value="item.value"></el-option>
-                        <el-option label="item.label" value="item.value"></el-option>
-                    </el-select>
-                </el-col>
-                <el-col :span="4">
-                    <el-select v-model="value" placeholder="请选择">
-                        <el-option label="item.label" value="item.value"></el-option>
-                        <el-option label="item.label" value="item.value"></el-option>
-                    </el-select>
-                </el-col>
-                <el-col :span="4">
-                    <el-select v-model="value" placeholder="请选择">
-                        <el-option label="item.label" value="item.value"></el-option>
-                        <el-option label="item.label" value="item.value"></el-option>
-                    </el-select>
-                </el-col>
-                <el-col :span="4">
-                    <el-button type="primary">查找</el-button>
-                </el-col>
-            </el-row>
-        </header>
-        <section>
-            <article class="table">
-                <el-table :data="tableData" border style="width: 100%">
-                    <el-table-column prop="date" sortable label="日期" width="180"></el-table-column>
-                    <el-table-column prop="name" label="姓名" width="180"></el-table-column>
-                    <el-table-column prop="address" label="地址"></el-table-column>
-                    <el-table-column label="操作" width="150">
-                        <template slot-scope="scope">
-                            <el-button @click="edit(scope.row)" type="text" size="small">编辑</el-button>
-                            <el-popconfirm title="是否删除此设备的信息?" @onConfirm="del(scope.row)">
-                                <el-button slot="reference" type="text" size="small">删除</el-button>
-                            </el-popconfirm>
-                        </template>
-                    </el-table-column>
-                </el-table>
-                <el-row type="flex" justify="end">
-                    <el-col :span="8" class="pagination">
-                        <el-pagination
-                            @current-change="pageChange"
-                            background
-                            layout="prev, pager, next"
-                            :total="1000"
-                        ></el-pagination>
-                    </el-col>
-                </el-row>
-            </article>
-        </section>
+        
     </div>
 </template>
 
@@ -59,38 +8,12 @@
 export default {
     data() {
         return {
-            value: "",
-            tableData: [
-                {
-                    date: "2016-05-02",
-                    name: "王小虎",
-                    address: "上海市普陀区金沙江路 1518 弄"
-                },
-                {
-                    date: "2016-05-04",
-                    name: "王小虎",
-                    address: "上海市普陀区金沙江路 1517 弄"
-                },
-                {
-                    date: "2016-05-01",
-                    name: "王小虎",
-                    address: "上海市普陀区金沙江路 1519 弄"
-                },
-                {
-                    date: "2016-05-03",
-                    name: "王小虎",
-                    address: "上海市普陀区金沙江路 1516 弄"
-                }
-            ]
+            
         };
     },
     created() {},
     methods: {
-        edit(row) {},
-        del(row) {},
-        pageChange(p) {
-            console.log(p)
-        }
+        
     }
 };
 </script>

+ 1 - 88
src/views/template/Ab.vue

@@ -1,57 +1,5 @@
 <template>
     <div class="GroupRecord">
-        <header id="header">
-            <el-row type="flex">
-                <el-col :span="4">
-                    <el-select v-model="value" placeholder="请选择">
-                        <el-option label="item.label" value="item.value"></el-option>
-                        <el-option label="item.label" value="item.value"></el-option>
-                    </el-select>
-                </el-col>
-                <el-col :span="4">
-                    <el-select v-model="value" placeholder="请选择">
-                        <el-option label="item.label" value="item.value"></el-option>
-                        <el-option label="item.label" value="item.value"></el-option>
-                    </el-select>
-                </el-col>
-                <el-col :span="4">
-                    <el-select v-model="value" placeholder="请选择">
-                        <el-option label="item.label" value="item.value"></el-option>
-                        <el-option label="item.label" value="item.value"></el-option>
-                    </el-select>
-                </el-col>
-                <el-col :span="4">
-                    <el-button type="primary">查找</el-button>
-                </el-col>
-            </el-row>
-        </header>
-        <section>
-            <article class="table">
-                <el-table :data="tableData" border style="width: 100%">
-                    <el-table-column prop="date" sortable label="日期" width="180"></el-table-column>
-                    <el-table-column prop="name" label="姓名" width="180"></el-table-column>
-                    <el-table-column prop="address" label="地址"></el-table-column>
-                    <el-table-column label="操作" width="150">
-                        <template slot-scope="scope">
-                            <el-button @click="edit(scope.row)" type="text" size="small">编辑</el-button>
-                            <el-popconfirm title="是否删除此设备的信息?" @onConfirm="del(scope.row)">
-                                <el-button slot="reference" type="text" size="small">删除</el-button>
-                            </el-popconfirm>
-                        </template>
-                    </el-table-column>
-                </el-table>
-                <el-row type="flex" justify="end">
-                    <el-col :span="8" class="pagination">
-                        <el-pagination
-                            @current-change="pageChange"
-                            background
-                            layout="prev, pager, next"
-                            :total="1000"
-                        ></el-pagination>
-                    </el-col>
-                </el-row>
-            </article>
-        </section>
     </div>
 </template>
 
@@ -59,49 +7,14 @@
 export default {
     data() {
         return {
-            value: "",
-            tableData: [
-                {
-                    date: "2016-05-02",
-                    name: "王小虎",
-                    address: "上海市普陀区金沙江路 1518 弄"
-                },
-                {
-                    date: "2016-05-04",
-                    name: "王小虎",
-                    address: "上海市普陀区金沙江路 1517 弄"
-                },
-                {
-                    date: "2016-05-01",
-                    name: "王小虎",
-                    address: "上海市普陀区金沙江路 1519 弄"
-                },
-                {
-                    date: "2016-05-03",
-                    name: "王小虎",
-                    address: "上海市普陀区金沙江路 1516 弄"
-                }
-            ]
         };
     },
     created() {},
     methods: {
-        edit(row) {},
-        del(row) {},
-        pageChange(p) {
-            console.log(p)
-        }
     }
 };
 </script>
 
 <style lang="scss" scoped>
-#header {
-    margin-bottom: 15px;
-}
-.table {
-    .pagination {
-        margin-top: 20px;
-    }
-}
+
 </style>

+ 5 - 318
src/views/template/Ac.vue

@@ -1,337 +1,24 @@
 <template>
     <div class="MessageBind">
-        <el-button @click="add" type="primary" icon="el-icon-document-add">添加</el-button>
-        <el-table :data="tableData" border>
-            <el-table-column prop="id" label="序号" width="120"></el-table-column>
-
-            <el-table-column label="发送方式" width="100">
-                <template slot-scope="scope">
-                    <span v-for="item in sendMethodList" :key="item.code">
-                        <el-tag
-                            size="small"
-                            type="warning"
-                            v-if="scope.row.methodCode == item.code"
-                        >{{item.description}}</el-tag>
-                    </span>
-                </template>
-            </el-table-column>
-
-            <el-table-column label="消息点">
-                <template slot-scope="scope">
-                    <span v-for="item in messagePointList" :key="item.code">
-                        <el-tag
-                            size="small"
-                            type="info"
-                            v-if="scope.row.pointCode == item.code"
-                        >{{item.description}}</el-tag>
-                    </span>
-                </template>
-            </el-table-column>
-
-            <el-table-column label="模板">
-                <template slot-scope="scope">
-                    <span v-for="item in messageTemplateList" :key="item.code">
-                        <el-tag
-                            size="small"
-                            type="info"
-                            v-if="scope.row.templateCode == item.code"
-                        >{{item.description}}</el-tag>
-                    </span>
-                </template>
-            </el-table-column>
-
-            <el-table-column label="服务商">
-                <template slot-scope="scope">
-                    <span v-for="item in messageServicMerList" :key="item.code">
-                        <el-tag
-                            size="small"
-                            type="success"
-                            v-if="scope.row.providerId == item.id"
-                        >{{item.name}}</el-tag>
-                    </span>
-                </template>
-            </el-table-column>
-
-            <el-table-column fixed="right" label="操作" width="150">
-                <template slot-scope="scope">
-                    <el-button @click="edit(scope.row)" type="text" size="small">编辑</el-button>
-                    <el-popconfirm title="是否删除此设备的信息?" @onConfirm="del(scope.row)">
-                        <el-button slot="reference" type="text" size="small">删除</el-button>
-                    </el-popconfirm>
-                </template>
-            </el-table-column>
-        </el-table>
-
-        <el-dialog :title="isAdd?'新增消息绑定':'编辑消息绑定'" :visible.sync="showDialog">
-            <el-row type="flex">
-                <el-col :span="14">
-                    <el-form ref="dyForm" :model="dyForm" label-width="140px">
-                        <!-- <el-form-item label="消息点编码:" prop="point">
-                            <el-input v-model="dyForm.code"></el-input>
-                        </el-form-item>-->
-
-                        <el-form-item label="发送方式">
-                            <el-select v-model="dyForm.methodCode" placeholder="请选择发送方式">
-                                <el-option
-                                    v-for="item in sendMethodList"
-                                    :label="item.description"
-                                    :value="item.code"
-                                    :key="item.code"
-                                ></el-option>
-                            </el-select>
-                        </el-form-item>
-
-                        <el-form-item label="消息点">
-                            <el-select v-model="dyForm.pointCode" placeholder="请选择发送方式">
-                                <el-option
-                                    v-for="item in messagePointList"
-                                    :label="item.description"
-                                    :value="item.code"
-                                    :key="item.code"
-                                ></el-option>
-                            </el-select>
-                        </el-form-item>
-
-                        <el-form-item label="模板">
-                            <el-select v-model="dyForm.templateCode" placeholder="请选择发送方式">
-                                <el-option
-                                    v-for="item in messageTemplateList"
-                                    :label="item.description+'(' + comparisonTable[item.methodCode]+')'"
-                                    :value="item.code"
-                                    :key="item.code"
-                                ></el-option>
-                            </el-select>
-                        </el-form-item>
-
-                        <el-form-item label="服务商">
-                            <el-select v-model="dyForm.providerId" placeholder="请选择发送方式">
-                                <el-option
-                                    v-for="item in messageServicMerList"
-                                    :label="item.name+'(' + comparisonTable[item.methodCode]+')'"
-                                    :value="item.id"
-                                    :key="item.id"
-                                ></el-option>
-                            </el-select>
-                        </el-form-item>
-
-                        <el-form-item>
-                            <el-button @click="showDialog=false">取 消</el-button>
-                            <el-button type="primary" @click="submitForm('dyForm')">保 存</el-button>
-                        </el-form-item>
-                    </el-form>
-                </el-col>
-            </el-row>
-        </el-dialog>
+        
     </div>
 </template>
 <script>
-import { mapActions } from "vuex";
-const rules = {
-    // code: [{ required: true, message: "请输入消息模板编码", trigger: "blur" }],
-    // description: [
-    //     { required: true, message: "请输入消息点描述", trigger: "blur" }
-    // ]
-};
+
 
 export default {
     name: "MessageBind",
     data() {
         return {
-            tableData: [],
-            showDialog: false,
-            dyForm: {
-                methodCode: null,
-                pointCode: null,
-                templateCode: null,
-                providerId: null
-            },
-            sendMethodList: [],
-            messagePointList: [],
-            messageTemplateList: [],
-            messageServicMerList: [],
-            // 发送方式的 code 与 name对照表
-            comparisonTable: {},
-            rules,
-            isAdd: true
+            
         };
     },
     mounted() {
-        // 获取消息绑定 列表
-        this.getMessageBind();
-        // 获取发送方式 列表
-        this.getSendMethodList();
-        // 获取消息点 列表
-        this.getMessagePoint();
-        // 获取消息模板 列表
-        this.getMessageTemplate();
-        // 获取服务商 列表
-        this.getMessageServicMer();
+        
     },
     
     methods: {
-        ...mapActions(["fetch"]),
-        // 获取消息绑定 列表
-        getMessageBind() {
-            this.fetch({
-                api: "/message/bind/list",
-                method: "GET",
-                data: {},
-                success: res => {
-                    this.tableData = res;
-                    
-                },
-                fail: err => {
-                    console.log(err);
-                    if (err.errMsg) this.$message.error(err.errMsg);
-                    else this.$message.error("服务器发生异常");
-                }
-            });
-        },
-
-        // 获取发送方式 列表
-        getSendMethodList() {
-            this.fetch({
-                api: "/message/method/list",
-                method: "GET",
-                data: {},
-                success: res => {
-                    this.sendMethodList = res;
-                    this.dyForm.methodCode = res[0].code;
-
-                    let comparisonTable = {}
-                    res.forEach(item => {
-                        comparisonTable[item.code] = item.description
-                    });
-                    this.comparisonTable = comparisonTable;
-                },
-                fail: err => {
-                    console.log(err);
-                    if (err.errMsg) this.$message.error(err.errMsg);
-                    else this.$message.error("服务器发生异常");
-                }
-            });
-        },
-        // 获取消息点 列表
-        getMessagePoint() {
-            this.fetch({
-                api: "/message/point/list",
-                method: "GET",
-                data: {},
-                success: res => {
-                    console.log(res);
-                    this.messagePointList = res;
-                    this.dyForm.pointCode = res[0].code;
-                },
-                fail: err => {
-                    console.log(err);
-                    if (err.errMsg) this.$message.error(err.errMsg);
-                    else this.$message.error("服务器发生异常");
-                }
-            });
-        },
-        // 获取消息模板 列表
-        getMessageTemplate() {
-            this.fetch({
-                api: "/message/template/list",
-                method: "GET",
-                data: {},
-                success: res => {
-                    this.messageTemplateList = res;
-                    this.dyForm.templateCode = res[0].code;
-                },
-                fail: err => {
-                    console.log(err);
-                    if (err.errMsg) this.$message.error(err.errMsg);
-                    else this.$message.error("服务器发生异常");
-                }
-            });
-        },
-        // 获取服务商 列表
-        getMessageServicMer() {
-            this.fetch({
-                api: "/message/provider/list",
-                method: "GET",
-                data: {},
-                success: res => {
-                    console.log(res);
-                    this.messageServicMerList = res;
-                    this.dyForm.providerId = res[0].name;
-                },
-                fail: err => {
-                    console.log(err);
-                    if (err.errMsg) this.$message.error(err.errMsg);
-                    else this.$message.error("服务器发生异常");
-                }
-            });
-        },
-        add() {
-            this.isAdd = true;
-            this.showDialog = true;
-            // this.dyForm = {
-            //     methodCode: this.sendMethodList[0].code,
-            //     pointCode: this.messagePointList[0].code,
-            //     templateCode: this.messageTemplateList[0].code,
-            //     providerId: this.messageServicMerList[0].id,
-            // };
-        },
-        edit(row) {
-            console.log(row);
-            this.isAdd = false;
-            this.showDialog = true;
-            this.dyForm = row;
-        },
-        del(row) {
-            this.fetch({
-                api: "/message/bind/delete",
-                method: "POST",
-                data: { id: row.id },
-                success: res => {
-                    console.log(res);
-                    this.getMessageBind();
-                    this.$message, success("删除成功!");
-                },
-                fail: err => {
-                    console.log(err);
-                    if (err.errMsg) this.$message.error(err.errMsg);
-                    else this.$message.error("服务器发生异常");
-                }
-            });
-        },
-        submitForm(formName) {
-            this.$refs[formName].validate(valid => {
-                if (valid) {
-                    console.log(this.dyForm);
-                    this.isAdd
-                        ? this.reqSave("/message/bind/add")
-                        : this.reqSave("/message/bind/update");
-                } else {
-                    return false;
-                }
-            });
-        },
-        // 请求 保存 (添加 和 更新)
-        reqSave(api) {
-            this.fetch({
-                api,
-                method: "POST",
-                data: this.dyForm,
-                success: res => {
-                    console.log(res);
-                    this.getMessageBind();
-                    this.$message.success("添加消息模板成功!");
-                    this.showDialog = false;
-                },
-                fail: err => {
-                    console.log(err);
-                    if (err.errMsg) this.$message.error(err.errMsg);
-                    else this.$message.error("服务器发生异常");
-                }
-            });
-        },
-        // 
-        findSendMethodName(methodCode) {
-           
-        }
+        
     }
 };
 

+ 0 - 2
src/views/template/Af.vue

@@ -11,7 +11,6 @@
 </template>
 
 <script>
-import { mapActions } from "vuex";
 
 export default {
     name: "Af",
@@ -290,7 +289,6 @@ export default {
     },
     created() {},
     methods: {
-        ...mapActions(["fetch"]),
 
         get() {
             this.fetch({

+ 1 - 17
src/views/unityManagement/UnityTrace.vue

@@ -5,7 +5,6 @@
 </template>
 
 <script>
-import { mapActions } from "vuex";
 
 export default {
     name: "UnityTrace",
@@ -14,22 +13,7 @@ export default {
     },
     created() {},
     methods: {
-        ...mapActions(["fetch"]),
-        get() {
-            this.fetch({
-                api: "aaa",
-                method: "GET",
-                data: {},
-                success: res => {
-                    console.log(res);
-                },
-                fail: err => {
-                    console.log(err);
-                    if (err.errMsg) this.$message.error(err.errMsg);
-                    else this.$message.error("服务器发生异常");
-                }
-            });
-        }
+        
     }
 };
 </script>