Browse Source

Signed-off-by: Changpeng Duan <838560574@qq.com>

Changpeng Duan 5 years ago
parent
commit
2123dc306b

+ 1 - 1
pc/package.json

@@ -1,5 +1,5 @@
 {
-  "name": "new_back",
+  "name": "GoAllOut",
   "version": "0.1.0",
   "private": true,
   "scripts": {

+ 67 - 0
pc/src/Global.js

@@ -109,6 +109,19 @@ globalCheckPhone = function (val) {
     }
 };
 
+getNowDate = function () {
+    let date = new Date();
+    let y = date.getFullYear();
+    let m = date.getMonth() + 1;
+    let d = date.getDate();
+    let H = date.getHours();
+    let mm = date.getMinutes();
+    let s = date.getSeconds()
+    m = m < 10 ? "0" + m : m;
+    d = d < 10 ? "0" + d : d;
+    // H = H < 10 ? "0" + H : H;
+    return y + "年" + m + "月" + d + "日";
+}
 
 // table配置项目
 
@@ -135,3 +148,57 @@ pageOptions = function () {
     return option
 };
 
+// 到期日
+endTypeOptions = function () {
+    let option = [
+        {
+            value: 0,
+            label: '全部'
+        }, {
+            value: 1,
+            label: '当天'
+        }, {
+            value: 7,
+            label: '一周'
+        }, {
+            value: 30,
+            label: '一个月'
+        }, {
+            value: 90,
+            label: '一季度'
+        }, {
+            value: 180,
+            label: '半年'
+        },
+    ];
+    return option
+}
+//会员类型
+vipOptions = function (i) {
+    let option = [];
+    if (i == 0) {
+        option = [
+            {
+                value: 0,
+                label: '全部'
+            }, {
+                value: 1,
+                label: '年费会员'
+            }, {
+                value: 2,
+                label: '充值会员'
+            },
+        ];
+    } else {
+        option = [
+            {
+                value: 1,
+                label: '年费会员'
+            }, {
+                value: 2,
+                label: '充值会员'
+            },
+        ];
+    }
+    return option
+}

+ 2 - 0
pc/src/Mock/index.js

@@ -45,6 +45,7 @@ let testTable = function () {
             "Confirmed": "@integer(36844, 368449)",
             "Deaths": "@integer(1099, 10993)",
             "Recovered": "@integer(1986, 9999)",
+            "kick": "@integer(1986, 9999)",
             "Status": "@integer(1, 2)",
             "color": "@hex",
             "memo": "@paragraph(1, 1)",
@@ -52,6 +53,7 @@ let testTable = function () {
             "vipType": "@integer(1, 2)",
             "members": members,
             "wxVisible": "@integer(0, 1)",
+            "timeLong": "12:00-14:00",
             "timeScope":  [new Date(2016, 9, 10, 8, 40), new Date(2016, 9, 10, 9, 40)],
         })
     }

+ 30 - 2
pc/src/api/getApiRes.js

@@ -17,11 +17,11 @@ export function worldDetail(postdata) {
 }
 
 export function SignIn(postdata) {
-        let url = headapi + 'SignIn';
+        let url = headapi + '/v1/Auth/SignInSignIn';
         return getApiBasic(url,postdata);
 }
 export function GenVerifyPic(postdata) {
-        let url = headapi + '/Auth/GenVerifyPic';
+        let url = headapi + '/v1/Auth/GenVerifyPic';
         return getApiBasic(url,postdata);
 }
 
@@ -48,6 +48,34 @@ export function testSelect(postdata) {
     return getApiBasic(url,postdata);
 }
 
+// class
+export function ClassAdd(postdata) {
+    let url = headapi + '/v1/Class/ClassAdd';
+    return getApiBasic(url,postdata);
+}
+export function ClassEdit(postdata) {
+    let url = headapi + '/v1/Class/ClassEdit';
+    return getApiBasic(url,postdata);
+}
+export function ClassListQuery(postdata) {
+    let url = headapi + '/v1/Class/ClassListQuery';
+    return getApiBasic(url,postdata);
+}
+
+
+// User
+export function ShopManagerAdd(postdata) {
+    let url = headapi + '/v1/User/ShopManagerAdd';
+    return getApiBasic(url,postdata);
+}
+export function ShopManagerListQuery(postdata) {
+    let url = headapi + '/v1/User/ShopManagerListQuery';
+    return getApiBasic(url,postdata);
+}
+export function VipUserListQuery(postdata) {
+    let url = headapi + '/v1/User/VipUserListQuery';
+    return getApiBasic(url,postdata);
+}
 
 
 

BIN
pc/src/assets/img/main/Oval.png


+ 7 - 2
pc/src/components/Navside.vue

@@ -42,7 +42,7 @@
                 navs: [],
                 shopName: '高新店',
                 userLevelText: '店面管理员',
-                userLevel: 1,
+                userLevel: 2,
                 userLevelDeafult: "11",
             }
         },
@@ -64,7 +64,12 @@
             handleClose(key, keyPath) {
                 // console.log(key, keyPath);
             },
-        }
+        },
+        watch: {
+            $route(to,from){
+              this.userLevelDeafult = to.meta.clmid
+            },
+        },
     }
 </script>
 <style scoped>

+ 0 - 232
pc/src/components/Navside2.vue

@@ -1,232 +0,0 @@
-<template>
-    <div id="navside" :class="[{'wild':wildState == 0},{'short':wildState != 0}]">
-        <img src="../assets/logo.png" class="logo" width="100%" height="60px" alt="">
-        <header class="logo-env">
-            <ul id="main-menu" class="main-menu" data-clmid="0" data-url="">
-                <li v-for="(nav,index) in navs" :key="index">
-                    <a @click="handleNodeClick(nav,index)">
-                        <i :class="nav.clicon"></i>
-                        <span class="title" :data-url="nav.clmurl">{{nav.clmname}}</span>
-                        <div v-if="nav.childs != ''  && nav.clmname != '退出系统' && nav.clmname != '首页' && nav.clmname != '关于我们'  ">
-                            <i class="el-icon-arrow-up" v-if="childs && index == hasChilds"></i>
-                            <i class="el-icon-arrow-down" v-else></i>
-                        </div>
-                    </a>
-                    <el-collapse-transition>
-                        <ul class="hide_tap child_tap" v-show="childs && index == hasChilds && showChilds">
-                            <li v-for="(child,j) in nav.childs" v-bind:key="j">
-                                <a @click="handleNodeClick(child,index)">
-                                    <i class="el-icon-info"></i>
-                                    <span class="title" :data-url="child.clmurl">{{child.clmname}}</span>
-                                </a>
-                            </li>
-                        </ul>
-                    </el-collapse-transition>
-                </li>
-            </ul>
-        </header>
-    </div>
-</template>
-
-<script>
-    import Navs from '../api/Navs';
-    import axios from 'axios';
-
-    let qs = require('qs');
-    export default {
-        data() {
-            return {
-                wildState: 0,
-                appname: '',
-                showChilds: false,
-                hasChilds: '',
-                navs: [],
-                childs: [],
-                navshow: [false, false, false],
-            }
-        },
-        mounted() {
-            this.getTableQuery();
-        },
-        methods: {
-            hidePanel() {
-                this.wildState = 1;
-            },
-            showPanel() {
-                this.wildState = 0;
-            },
-            getTableQuery() {
-                // 菜单
-                this.navs = Navs;
-            },
-            handleNodeClick(menudata, index) {
-                let that = this;
-                let clmurl = menudata['clmurl'];
-                if (menudata.clmname == '退出系统') {
-                    that.$confirm('此操作将退出当前账号, 是否继续?', '提示', {
-                        confirmButtonText: '确定',
-                        cancelButtonText: '取消',
-                        type: 'warning'
-                    }).then(() => {
-                        that.logout();
-                    }).catch(() => {
-                        that.$message({
-                            showClose: true,
-                            message: '您已取消退出操作',
-                        });
-                    });
-                } else {
-                    if (!clmurl) {
-                        that.hasChilds = index;
-                        that.showChilds = !that.showChilds;
-                        // that.showChilds = true;
-                    } else {
-                        that.$emit('navOpen', menudata);
-                    }
-                }
-            },
-            navshowClick: function (index) {
-                this.navshow = [false, false, false];
-                this.navshow[index] = true;
-            },
-            // 注销
-            logout() {
-                localStorage.usercode = '';
-                this.$router.push({path: '/login', query: {status: 1}});
-                // const that = this;
-                // let url = headapi + '?ctl=&act=logout';
-                // let param = {};
-                // let postdata = qs.stringify(param);
-                // axios.post(url, postdata).then(function (data) {
-                //     let json = data.data;
-                //     // that.$router.push({path: '/login', query: {status: 1}});
-                // }, function (response) {
-                //     console.info(response);
-                // })
-            }
-        },
-        components: {}
-    }
-</script>
-<style scoped>
-    ul, li {
-        list-style: none;
-        padding: 0;
-        margin: 0;
-    }
-
-    #navside {
-        position: absolute;
-        top: 0px;
-        height: 100%;
-        overflow: hidden;
-        z-index: 2000;
-        background-color: #EFEFEF;
-        color: #333;
-        text-align: center;
-        line-height: 200px;
-        border-right: 6px solid #E6E6E6;
-    }
-
-    .wild {
-        width: 230px;
-    }
-
-    .short {
-        width: 0px !important;
-    }
-
-    .logo {
-        width: 100%;
-        overflow: hidden;
-        display: block;
-        margin: 0 auto;
-        margin-bottom: 30px;
-    }
-
-    .main-menu {
-        width: 100%;
-        overflow: hidden;
-        display: block;
-        margin: 0 auto;
-        margin-top: 20px;
-    }
-
-    .main-menu li {
-        width: 100%;
-        overflow: hidden;
-        display: block;
-        margin: 0 auto;
-        cursor: pointer;
-        border-bottom: 1px solid #E5E5E5;
-    }
-
-    .main-menu li a {
-        width: 100%;
-        overflow: hidden;
-        display: block;
-        margin: 0 auto;
-        height: 57px;
-        line-height: 57px;
-        color: #3B3B3B;
-        border-left: 3px solid #EFEFEF;
-        font-size: 16px;
-        text-align: center;
-    }
-
-    .main-menu li a:hover {
-        background-color: #fff;
-        border-left: 3px solid #03B1FF;
-        color: #03B1FF;
-    }
-
-    .main-menu a i {
-        float: left;
-        margin-top: 14px;
-        margin-left: 5px;
-    }
-
-    .main-menu a span {
-        min-width: 100px;
-        float: left;
-        text-align: left;
-        height: 57px;
-        text-indent: 6px;
-        line-height: 57px;
-        font-size: 16px;
-    }
-
-    .el-icon-arrow-right {
-        width: 10px;
-        height: 13px;
-        line-height: 13px;
-        color: #fff;
-        font-style: normal;
-        float: right;
-        font-size: 12px;
-    }
-
-    #main-menu li a > i {
-        width: 22px;
-        height: 22px;
-        float: left;
-        background-position: top center;
-        background-repeat: no-repeat;
-        margin-left: 33px;
-        margin-top: 18px;
-        margin-right: 21px;
-    }
-
-    .child_tap a i {
-        margin-left: 53px !important;
-        margin-right: 11px !important;
-    }
-
-    .child_tap a span {
-        font-size: 14px;
-    }
-
-
-
-
-</style>

+ 18 - 57
pc/src/router/index.js

@@ -26,6 +26,7 @@ const routes = [
                 component: () => import('@/views/Main.vue'),
                 meta: {
                     title: "首页",
+                    clmid: "1",
                 }
             },{
                 path: '/member',
@@ -33,6 +34,7 @@ const routes = [
                 component: () => import('@/views/Member.vue'),
                 meta: {
                     title: "会员管理",
+                    clmid: "2",
                 }
             },{
                 path: '/lesson',
@@ -40,6 +42,7 @@ const routes = [
                 component: () => import('@/views/Lesson.vue'),
                 meta: {
                     title: "课程模板",
+                    clmid: "3",
                 }
             },{
                 path: '/lessonTable',
@@ -47,6 +50,7 @@ const routes = [
                 component: () => import('@/views/LessonTable.vue'),
                 meta: {
                     title: "课程表模板",
+                    clmid: "4",
                 }
             },{
                 path: '/editLessonTable',
@@ -54,13 +58,15 @@ const routes = [
                 component: () => import('@/views/EditLessonTable.vue'),
                 meta: {
                     title: "编辑课程表模板",
+                    clmid: "4",
                 }
             },{
                 path: '/adminManage',
                 name: 'AdminManage',
                 component: () => import('@/views/AdminManage.vue'),
                 meta: {
-                    title: "用户管理",
+                    title: "管理员管理",
+                    clmid: "12",
                 }
             },{
                 path: '/log',
@@ -68,6 +74,7 @@ const routes = [
                 component: () => import('@/views/Log.vue'),
                 meta: {
                     title: "操作日志",
+                    clmid: "14",
                 }
             },{
                 path: '/shopManage',
@@ -75,6 +82,7 @@ const routes = [
                 component: () => import('@/views/ShopManage.vue'),
                 meta: {
                     title: "店面管理",
+                    clmid: "13",
                 }
             },{
                 path: '/adminSetting',
@@ -82,6 +90,7 @@ const routes = [
                 component: () => import('@/views/AdminSetting.vue'),
                 meta: {
                     title: "系统设置",
+                    clmid: "15",
                 }
             },{
                 path: '/lessonManage',
@@ -89,6 +98,7 @@ const routes = [
                 component: () => import('@/views/lessonManage.vue'),
                 meta: {
                     title: "课程表管理",
+                    clmid: "5",
                 }
             },{
                 path: '/coach',
@@ -96,6 +106,7 @@ const routes = [
                 component: () => import('@/views/coach.vue'),
                 meta: {
                     title: "教练管理",
+                    clmid: "6",
                 }
             },{
                 path: '/appoint',
@@ -103,6 +114,7 @@ const routes = [
                 component: () => import('@/views/appoint.vue'),
                 meta: {
                     title: "预约管理",
+                    clmid: "7",
                 }
             },{
                 path: '/record',
@@ -110,6 +122,7 @@ const routes = [
                 component: () => import('@/views/record.vue'),
                 meta: {
                     title: "预约记录",
+                    clmid: "8",
                 }
             },{
                 path: '/cost',
@@ -117,6 +130,7 @@ const routes = [
                 component: () => import('@/views/cost.vue'),
                 meta: {
                     title: "消费记录",
+                    clmid: "9",
                 }
             },{
                 path: '/setting',
@@ -124,6 +138,7 @@ const routes = [
                 component: () => import('@/views/setting.vue'),
                 meta: {
                     title: "系统设置",
+                    clmid: "11",
                 }
             },{
                 path: '/finish',
@@ -131,6 +146,7 @@ const routes = [
                 component: () => import('@/views/finish.vue'),
                 meta: {
                     title: "下课管理",
+                    clmid: "10",
                 }
             },{
                 path: '/finishDetail',
@@ -138,62 +154,7 @@ const routes = [
                 component: () => import('@/views/finishDetail.vue'),
                 meta: {
                     title: "下课管理",
-                }
-            },{
-                path: '/yhgl',
-                name: 'Yhgl',
-                component: () => import('@/views/Yhgl.vue'),
-                meta: {
-                    title: "用户管理",
-                }
-            },{
-                path: '/mockPage',
-                name: 'MockPage',
-                component: () => import('@/views/MockPage.vue'),
-                meta: {
-                    title: "用户管理",
-                }
-            },{
-                path: '/chart',
-                name: 'Chart',
-                component: () => import('@/views/Chart.vue'),
-                meta: {
-                    title: "图表效果",
-                }
-            },{
-                path: '/test',
-                name: 'Test',
-                component: () => import('@/views/Test.vue'),
-                meta: {
-                    title: "Test",
-                }
-            },{
-                path: '/aboutUs',
-                name: 'AboutUs',
-                component: () => import('@/views/AboutUs.vue'),
-                meta: {
-                    title: "关于我们",
-                }
-            },{
-                path: '/pwd',
-                name: 'Pwd',
-                component: () => import('@/views/Pwd.vue'),
-                meta: {
-                    title: "密码修改",
-                }
-            },{
-                path: '/basic',
-                name: 'Basic',
-                component: () => import('@/views/Basic.vue'),
-                meta: {
-                    title: "基本设置",
-                }
-            },{
-                path: '/upload',
-                name: 'Upload',
-                component: () => import('@/views/Upload.vue'),
-                meta: {
-                    title: "上传文件",
+                    clmid: "10",
                 }
             },
         ]

+ 41 - 11
pc/src/views/AdminManage.vue

@@ -85,14 +85,15 @@
                         sortable
                 >
                 </el-table-column>
-<!--                <el-table-column-->
-<!--                        prop="Status"-->
-<!--                        label="操作"-->
-<!--                >-->
-<!--                    <template slot-scope="scope">-->
-<!--                        <el-button type="text" @click="editList(scope.row)">编辑</el-button>-->
-<!--                    </template>-->
-<!--                </el-table-column>-->
+                <el-table-column
+                        prop="Status"
+                        label="操作"
+                >
+                    <template slot-scope="scope">
+                        <el-button type="text" v-if="scope.row.status == 1" @click="runAndPause(scope.row,0)">禁用</el-button>
+                        <el-button type="text" v-if="scope.row.status == 0" @click="runAndPause(scope.row,1)">启用</el-button>
+                    </template>
+                </el-table-column>
             </el-table>
             <br>
             <el-pagination
@@ -112,6 +113,9 @@
                     <el-form-item label="姓名">
                         <el-input v-model="form.name"></el-input>
                     </el-form-item>
+                    <el-form-item label="密码">
+                        <el-input v-model="form.pwd"></el-input>
+                    </el-form-item>
                     <el-form-item label="所属门店">
                         <el-select v-model="form.shopId" placeholder="请选择所属门店">
                             <el-option
@@ -135,6 +139,7 @@
 <script>
     import Global from '../Global.js'
     import {
+        ShopManagerListQuery,
         testTable,
         testSelect
     } from "../api/getApiRes";
@@ -175,6 +180,7 @@
                     name: '',
                     userCode: '',
                     shopId: '',
+                    pwd: '',
                 },
                 shops: [],
                 tableData: []
@@ -217,13 +223,14 @@
                     if (json.Code == 0) {
                         // 关闭弹窗
                         that.dialogVisible = false;
-                        // 重载列表
-                        that.getTableQuery();
                         that.$message({
                             showClose: true,
                             message: '管理员添加成功!',
                             type: 'success'
                         });
+
+                        // 重载列表
+                        that.getTableQuery();
                     } else {
                         that.$message.error(json.Memo);
                     }
@@ -305,6 +312,29 @@
                     });
                 });
             },
+            runAndPause(row,status){
+                let that = this;
+                let param = {
+                token: localStorage.token,
+                    userId: row.userId,
+                    status: status,
+                };
+                let postdata = qs.stringify(param);
+                editbasicinfo(postdata).then(res => {
+                    let json = res;
+                    if (json.Code == 0) {
+                        that.$message({
+                            showClose: true,
+                            message: '管理员状态已修改成功!',
+                            type: 'success'
+                        });
+                        // 重载列表
+                        that.getTableQuery();
+                    } else {
+                        that.$message.error(json.Memo);
+                    }
+                })
+            },
             clearForm() {
                 // clear
                 this.form.name = '';
@@ -369,7 +399,7 @@
                     tableMax: 9999,//
                 };
                 let postdata = qs.stringify(param);
-                testTable(postdata).then(res => {
+                ShopManagerListQuery(postdata).then(res => {
                     let json = res;
                     if (json.Code == 0) {
                         that.loading = false;

+ 0 - 1
pc/src/views/EditLessonTable.vue

@@ -150,7 +150,6 @@
                     keyword: '',
                     USERCODE: '',
                     taskstatus: 99,
-
                     draw: 1,
                     start: 0,
                     recordsTotal: 0,

+ 65 - 56
pc/src/views/Lesson.vue

@@ -27,54 +27,54 @@
                         width="50">
                 </el-table-column>
                 <el-table-column
-                        prop="name"
+                        prop="ClassName"
                         label="课程名称"
                 >
                 </el-table-column>
                 <el-table-column
-                        prop="vipType"
+                        prop="ClassType"
                         label="是否通用"
                         width="110"
                         align="center"
                         sortable
                 >
                     <template slot-scope="scope">
-                        <span v-if="scope.row.vipType == 1">是</span>
-                        <span v-if="scope.row.vipType == 0">否</span>
+                        <span v-if="scope.row.ClassType == 1">是</span>
+                        <span v-if="scope.row.ClassType == 0">否</span>
                     </template>
                 </el-table-column>
                 <el-table-column
-                        prop="vipType"
+                        prop="ShopId"
                         label="课程类型"
                         width="110"
                         align="center"
                         sortable
                 >
                     <template slot-scope="scope">
-                        <span v-if="scope.row.vipType == 1">占用课时</span>
-                        <span v-if="scope.row.vipType == 0">不占课时</span>
+                        <span v-if="scope.row.ShopId == 1">占用课时</span>
+                        <span v-if="scope.row.ShopId == 0">不占课时</span>
                     </template>
                 </el-table-column>
                 <el-table-column
-                        prop="Recovered"
+                        prop="ConsumeHour"
                         label="消耗课时"
                         sortable
                 >
                 </el-table-column>
                 <el-table-column
-                        prop="Recovered"
+                        prop="TopLimit"
                         label="建议上课人数"
                         sortable
                 >
                 </el-table-column>
+<!--                <el-table-column-->
+<!--                        prop="Recovered"-->
+<!--                        label="课程会员人数"-->
+<!--                        sortable-->
+<!--                >-->
+<!--                </el-table-column>-->
                 <el-table-column
-                        prop="Recovered"
-                        label="课程会员人数"
-                        sortable
-                >
-                </el-table-column>
-                <el-table-column
-                        prop="wxVisible"
+                        prop="WxVisible"
                         label="微信可见"
                 >
                     <template slot-scope="scope">
@@ -90,24 +90,24 @@
                     </template>
                 </el-table-column>
                 <el-table-column
-                        prop="color"
+                        prop="ClassColor"
                         label="课程颜色"
                         width="110"
                 >
                     <template slot-scope="scope">
-                        <el-color-picker v-model="scope.row.color"
-                                         @change="changeColor(scope.row.color,scope.row)"></el-color-picker>
+                        <el-color-picker v-model="scope.row.ClassColor"
+                                         @change="changeColor(scope.row.ClassColor,scope.row)"></el-color-picker>
                     </template>
                 </el-table-column>
                 <el-table-column
-                        prop="create"
+                        prop="CreatedAt"
                         label="创建时间"
                         width="210"
                         sortable
                 >
                 </el-table-column>
                 <el-table-column
-                        prop="name"
+                        prop="Memo"
                         label="备注">
                     <template slot-scope="scope">
                         <el-popover
@@ -115,15 +115,15 @@
                                 title="标题"
                                 width="200"
                                 trigger="hover"
-                                :content="scope.row.name">
+                                :content="scope.row.Memo">
                             <span slot="reference"
-                                  v-if="scope.row.name.length > 6">{{scope.row.name.substr(0,6)}} ....</span>
+                                  v-if="scope.row.Memo.length > 6">{{scope.row.Memo.substr(0,6)}} ....</span>
                         </el-popover>
-                        <span v-if="scope.row.name.length <= 6">{{scope.row.name}}</span>
+                        <span v-if="scope.row.Memo.length <= 6">{{scope.row.Memo}}</span>
                     </template>
                 </el-table-column>
                 <el-table-column
-                        prop="Status"
+                        prop="ClassId"
                         label="操作"
                 >
                     <template slot-scope="scope">
@@ -147,7 +147,7 @@
                 <div class="pull-left">
                     <el-form ref="form" :model="form" label-width="160px">
                         <el-form-item label="课程名称">
-                            <el-input v-model="form.currName"></el-input>
+                            <el-input v-model="form.className"></el-input>
                         </el-form-item>
                         <el-form-item label="消耗课时">
                             <el-input-number v-model="form.consumeHour" :min="0" :max="99999"
@@ -168,7 +168,7 @@
                         </el-form-item>
                         <el-form-item label="是否占课时">
                             <el-switch
-                                    v-model="form.wxvisible"
+                                    v-model="form.classType"
                                     active-value="1"
                                     inactive-value="0"
                                     active-color="#409EFF"
@@ -177,7 +177,7 @@
                         </el-form-item>
                         <el-form-item label="是否通用">
                             <el-switch
-                                    v-model="form.wxvisible"
+                                    v-model="form.allUse"
                                     active-value="1"
                                     inactive-value="0"
                                     active-color="#409EFF"
@@ -185,7 +185,7 @@
                             </el-switch>
                         </el-form-item>
                         <el-form-item label="课程颜色">
-                            <el-color-picker v-model="form.currColor"></el-color-picker>
+                            <el-color-picker v-model="form.classColor"></el-color-picker>
                         </el-form-item>
                         <el-form-item label="备注">
                             <el-input v-model="form.memo"></el-input>
@@ -195,7 +195,7 @@
                 <div class="pull-right">
                     <el-form ref="form" :model="form" label-width="160px">
                         <el-form-item label="课程会员人数">
-                            <el-transfer  filterable v-model="form.dialogValue" :data="form.dialogdata"></el-transfer>
+                            <el-transfer filterable v-model="form.dialogValue" :data="form.dialogdata"></el-transfer>
                         </el-form-item>
                     </el-form>
                 </div>
@@ -211,7 +211,7 @@
                 <span>基础功能</span>
             </div>
             <div>
-                <el-transfer  filterable  v-model="dialogValue" :data="form.dialogdata"></el-transfer>
+                <el-transfer filterable v-model="dialogValue" :data="form.dialogdata"></el-transfer>
             </div>
             <div class="dialogFooter">
                 <el-button type="primary" size="small">确定</el-button>
@@ -237,6 +237,9 @@
 <script>
     import Global from '../Global.js'
     import {
+        ClassAdd,
+        ClassEdit,
+        ClassListQuery,
         testTable,
         testSelect
     } from "../api/getApiRes";
@@ -251,6 +254,7 @@
                 dialogdata: [],
                 gridData: [],
                 dialogValue: [],
+                allTableData: [],
                 // panel 配置项目
                 panel: {
                     usercode: '',
@@ -259,12 +263,11 @@
                     keyword: '',
                     USERCODE: '',
                     taskstatus: 99,
-
+                    tableData: [],
+                    allTableData: [],
                     draw: 1,
                     start: 0,
                     recordsTotal: 0,
-                    tableData: [],
-                    allTableData: [],
                     limit: '10',
                     multipleSort: false,
                     loading: false,
@@ -279,11 +282,14 @@
                     time1: globalBt(),
                 },
                 form: {
-                    currName: "",
+                    className: "",
                     consumeHour: 0,
                     topLimit: 0,
                     wxvisible: 1,
-                    currColor: "",
+                    classType: 1,
+                    classColor: "#ffffff",
+                    teacherId: "",
+                    allUse: "",
                     memo: "",
                     dialogdata: [],//穿梭待选
                     dialogValue: [],//穿梭已选
@@ -308,11 +314,11 @@
                 let that = this;
 
                 // checkNum
-                if (!that.form.currName) {
+                if (!that.form.className) {
                     this.$message.error('错了哦,课程名称不能为空');
                     return false
                 }
-                if (that.form.currName.length > 20) {
+                if (that.form.className.length > 20) {
                     this.$message.error('错了哦,课程名称字数超过20个字');
                     return false
                 }
@@ -323,17 +329,21 @@
                     }
                 }
 
+                let teacherId =  that.form.dialogValue.toString();
                 let param = {
                     token: localStorage.token,
-                    currName: that.form.currName,
+                    shopId: localStorage.shopId,
+                    className: that.form.className,
                     consumeHour: that.form.consumeHour,
                     topLimit: that.form.topLimit,
-                    wxvisible: that.form.wxvisible,
-                    currColor: that.form.currColor,
+                    classType: that.form.classType,
+                    wxVisible: that.form.wxvisible,
+                    classColor: that.form.classColor,
+                    teacherId:teacherId,
                     memo: that.form.memo,
                 };
                 let postdata = qs.stringify(param);
-                testSelect(postdata).then(res => {
+                ClassAdd(postdata).then(res => {
                     let json = res;
                     if (json.Code == 0) {
                         // 关闭弹窗
@@ -353,14 +363,13 @@
             // 新增课程
             addLesson() {
                 // clear
-                this.form.currName = '';
-                this.form.consumeHour = '';
-                this.form.topLimit = '';
+                this.form.className = '';
+                this.form.consumeHour = 0;
+                this.form.topLimit = 0;
                 this.form.wxvisible = 1;
-                this.form.currColor = "";
+                this.form.classColor = "#ffffff";
                 this.form.memo = "";
-                this.form.dialogValue = "";
-
+                this.form.dialogValue = [];
                 this.dialogLesson = true;
             },
             // 改色
@@ -510,25 +519,25 @@
             handleSelectionChange(val) {
                 this.multipleSelection = val;
             },
-            clearForm(){
+            clearForm() {
                 // clear
-                this.form.currName = '';
+                this.form.className = '';
                 this.form.consumeHour = 0;
                 this.form.topLimit = 0;
                 this.form.wxvisible = 1;
-                this.form.currColor = '';
+                this.form.classColor = '';
                 this.form.memo = '';
             },
             // 编辑
-            editLesson(row){
+            editLesson(row) {
                 let that = this;
                 this.clearForm();
 
-                this.form.currName = row.name;
+                this.form.className = row.name;
                 this.form.consumeHour = row.Recovered;
                 this.form.topLimit = row.Recovered;
                 this.form.wxvisible = row.wxVisible;
-                this.form.currColor = row.color;
+                this.form.classColor = row.color;
                 this.form.memo = row.memo;
                 this.form.dialogValue = row.dialogValue;
                 this.form.btnType = 1; //编辑
@@ -536,7 +545,7 @@
                 this.dialogLesson = true
                 this.dialogTitle = '编辑课程'
             },
-            Lessonmember(row){
+            Lessonmember(row) {
                 this.dialogTableVisible = true;
                 this.gridData = row.members;
 
@@ -562,7 +571,7 @@
                     tableMax: 9999,//
                 };
                 let postdata = qs.stringify(param);
-                testTable(postdata).then(res => {
+                ClassListQuery(postdata).then(res => {
                     let json = res;
                     if (json.Code == 0) {
                         that.loading = false;

+ 104 - 30
pc/src/views/Main.vue

@@ -56,41 +56,41 @@
             <div class="finish">
                 <div class="title">
                     <h5>下课管理</h5>
-                    <span>2020年08月19日</span>
+                    <span>{{getNowDate}}</span>
                 </div>
                 <ul>
-                    <li v-for="l in 6">
-                        <div class="finListTitle">
-                            基础功能
+                    <li v-for="c in classList">
+                        <div class="finListTitle" :style="{ background:c.color }">
+                            {{c.name}}
                         </div>
                         <div class="context">
                             <div class="ctl">
-                                <span>上课时间: 08:30 - 10:00</span>
-                                <span>上课人数: 20 人</span>
+                                <span>上课时间:  {{c.timeLong}}</span>
+                                <span>上课人数: {{c.kick}} 人</span>
                             </div>
                             <br>
                             <br>
-                            <el-button type="primary" plain  @click="goPage('finish')">下课</el-button>
+                            <el-button type="primary" plain @click="goPage('finish')">下课</el-button>
                         </div>
                     </li>
                 </ul>
             </div>
 
             <div class="appoint">
-                <div class="title">
+                <div class="title" >
                     <h5>预约课程</h5>
-                    <span>2020年08月19日</span>
+                    <span>{{getNowDate}}</span>
                 </div>
                 <div class="appointCard">
-                    <el-card class="box-card" v-for="c in 6">
-                        <div class="cardTitle blue">
-                            基础功能
+                    <el-card class="box-card" v-for="c in classList" >
+                        <div class="cardTitle blue"  :style="{ color:c.color }">
+                            {{c.name}}
                         </div>
                         <span>
-                            08:30 - 10:00
+                           {{c.timeLong}}
                         </span>
-                        <em>最大预约人数 <i>21</i></em>
-                        <em>已预约人数 <i>21</i></em>
+                        <em>最大预约人数 <i>{{c.kick}}</i></em>
+                        <em>已预约人数 <i>{{c.kick}}</i></em>
                         <em>预约状态 <s class="blue">可预约</s></em>
                     </el-card>
                 </div>
@@ -100,20 +100,21 @@
             <div class="rtContext">
                 <div class="rtTitle">
                     <h5>最新预约</h5>
-                    <span  @click="goPage('appoint')">查看全部</span>
+                    <span @click="goPage('appoint')">查看全部</span>
                 </div>
                 <ul>
-                    <li v-for="as in 4">
+                    <li v-for="as in appointList">
                         <div class="asTitle">
-                            <el-avatar
-                                    src="https://cube.elemecdn.com/0/88/03b0d39583f48206768a7534e55bcpng.png"></el-avatar>
-                            176****7710
+                            <img src="../assets/img/main/Oval.png" alt="">
+                          <span>
+                                {{as.tel}}
+                          </span>
                         </div>
                         <div class="asContent">
-                            <span>预约时间:<em>08/06 12:30</em></span>
-                            <span>预约状态:<em>预约成功</em></span>
-                            <span>预约课程:<s class="blue"> 燃烧卡路里</s></span>
-                            <span>剩余课时:<em>63课时</em></span>
+                            <span>预约时间:<em>{{as.create.substr(11,9)}}</em></span>
+                            <span>预约状态:<em>{{as.Status == 1 ?'预约成功':'预约失败'}}</em></span>
+                            <span>预约课程:<s class="blue" :style="{ background:as.color }"> {{as.name}}</s></span>
+                            <span>剩余课时:<em>{{as.kick}}课时</em></span>
                         </div>
                     </li>
                 </ul>
@@ -123,20 +124,84 @@
 </template>
 
 <script>
+    import {testTable} from "../api/getApiRes";
+
+    let qs = require('qs');
     export default {
         data() {
             return {
-                editableTabsValue: '1'
+                editableTabsValue: '1',
+                getNowDate: getNowDate(),
+                classList: [],
+                appointList: [],
             }
         },
+        mounted() {
+            let that = this;
+
+            // test
+            localStorage.token = 'f4106343326bca181a19ef806c88cd4c';
+            localStorage.shopId = 0;
+
+
+            // 下课管理
+            this.ClassQuery();
+            this.appointQuery();
+            this.timer = setInterval(() => {
+                that.appointQuery();
+            }, 10000);
+        },
+        destroyed () {
+            clearInterval(this.timer);//页面销毁时清除定时器
+        },
         methods: {
             goPage(url) {
                 this.$router.push({
                     path: '/' + url,
-                    query: {
+                    query: {}
+                })
+            },
+            // 下课管理
+            ClassQuery() {
+                let that = this;
+                that.loading = true;
+                let param = {
+                    token: localStorage.token,
+                };
+                let postdata = qs.stringify(param);
+                testTable(postdata).then(res => {
+                    let json = res;
+                    if (json.Code == 0) {
+                        that.loading = false;
+                        if (json.Rs) {
+                            that.classList = json.Rs;
+                            console.log(that.classList);
+                        }
+                    } else {
+                        that.$message.error(json.Memo);
                     }
                 })
             },
+            // 最新预约
+            appointQuery() {
+                let that = this;
+                that.loading = true;
+                let param = {
+                    token: localStorage.token,
+                };
+                let postdata = qs.stringify(param);
+                testTable(postdata).then(res => {
+                    let json = res;
+                    if (json.Code == 0) {
+                        that.loading = false;
+                        if (json.Rs) {
+                            that.appointList = json.Rs;
+                        }
+                    } else {
+                        that.$message.error(json.Memo);
+                    }
+                })
+            }
         },
         components: {}
     }
@@ -360,7 +425,7 @@
     }
 
     /deep/ .el-button--primary.is-plain:hover {
-        color: #005EA2!important;
+        color: #005EA2 !important;
     }
 
     .blue {
@@ -532,18 +597,24 @@
 
     .asTitle {
         width: 100%;
+        height: 30px;
         overflow: hidden;
         display: block;
         margin: 0 auto;
         text-align: left;
-        line-height: 30px;
+        line-height: 20px;
         color: #000000;
         font-size: 14px;
     }
+    .asTitle img {
+        float: left;
+        margin-right: 5px;
+    }
 
     .asTitle span {
-        width: 26px;
-        height: 26px;
+        /*width: 26px;*/
+        height: 30px;
+        line-height: 26px;
         float: left;
         margin-right: 10px;
     }
@@ -580,4 +651,7 @@
     .asContent span s.blue {
         background-color: #E5F2FF;
     }
+    .box-card em {
+        font-style: normal;
+    }
 </style>

+ 31 - 42
pc/src/views/Member.vue

@@ -7,17 +7,17 @@
                     <el-row :gutter="20">
                         <el-col :span="4">
                             <em>姓名:</em>
-                            <el-input v-model="panel.USERCODE" placeholder="请输入姓名"></el-input>
+                            <el-input v-model="panel.name" placeholder="请输入姓名"></el-input>
                         </el-col>
                         <el-col :span="4">
                             <em>手机号:</em>
-                            <el-input v-model="panel.keyword" placeholder="请输入手机号"></el-input>
+                            <el-input v-model="panel.phone" placeholder="请输入手机号"></el-input>
                         </el-col>
                         <el-col :span="4">
                             <em>会员类型:</em>
-                            <el-select v-model="panel.taskstatus">
+                            <el-select v-model="panel.vipType">
                                 <el-option
-                                        v-for="item in panel.options"
+                                        v-for="item in panel.vipOptions"
                                         :key="item.value"
                                         :label="item.label"
                                         :value="item.value">
@@ -26,7 +26,7 @@
                         </el-col>
                         <el-col :span="4">
                             <em>到期日:</em>
-                            <el-select v-model="panel.endType">
+                            <el-select v-model="panel.expDay">
                                 <el-option
                                         v-for="item in panel.endTypeOptions"
                                         :key="item.value"
@@ -189,10 +189,10 @@
                             </el-select>
                         </el-form-item>
                         <el-form-item label="课时">
-                            <el-input-number v-model="form.lesson" :min="0" :max="99999" label="(天)"></el-input-number>
+                            <el-input-number v-model="form.normalhour" :min="0" :max="99999" label="(天)"></el-input-number>
                         </el-form-item>
                         <el-form-item label="赠送课时">
-                            <el-input-number v-model="form.gift" :min="0" :max="99999" label="(天)"></el-input-number>
+                            <el-input-number v-model="form.gifthour" :min="0" :max="99999" label="(天)"></el-input-number>
                         </el-form-item>
                         <el-form-item label="备注">
                             <el-input v-model="form.memo"></el-input>
@@ -226,10 +226,10 @@
                 </h5>
             </div>
             <div v-if="dialogLesson">
-                <el-input-number v-model="form.lesson" :min="0" :max="9999" label="课时调整"></el-input-number>
+                <el-input-number v-model="form.normalhour" :min="0" :max="9999" label="课时调整"></el-input-number>
             </div>
             <div v-if="dialogGift">
-                <el-input-number v-model="form.gift" :min="0" :max="9999" label="赠送课时调整"></el-input-number>
+                <el-input-number v-model="form.gifthour" :min="0" :max="9999" label="赠送课时调整"></el-input-number>
             </div>
 
             <div v-if="dialogExpTime">
@@ -259,6 +259,7 @@
 <script>
     import Global from '../Global.js'
     import {
+        VipUserListQuery,
         testTable,
         testSelect
     } from "../api/getApiRes";
@@ -295,17 +296,10 @@
                     fileList: [],
                     multipleSelection: [],
                     detectedmac: '',
-                    options: [
-                        {value: 99, label: '全部'},
-                        {value: 1, label: '进行中'},
-                        {value: 2, label: '已完成'},
-                    ],
-                    endTypeOptions: [
-                        {value: 99, label: '全部'},
-                        {value: 30, label: '近一个月'},
-                        {value: 7, label: '近一周'},
-                        {value: 1, label: '当日'},
-                    ],
+                    vipType: 0,
+                    expDay: 0,
+                    vipOptions:vipOptions(0),
+                    endTypeOptions:endTypeOptions(),
                     time1: globalBt(),
                 },
                 multipleSelection: [],
@@ -320,18 +314,15 @@
                     userCode: '',
                     shopId: '',
                     memberType: 1,
-                    lesson: 1,
-                    gift: 1,
+                    normalhour: 1,
+                    gifthour: 1,
                     btnType: 0,//0新建,1编辑编辑
                     memo: '',
                     expTime: '',
                     dialogdata: [],//穿梭待选
                     dialogValue: [],//穿梭已选
                 },
-                memberTypes: [
-                    {value: 1, label: '年会员'},
-                    {value: 2, label: '充值会员'},
-                ],
+                memberTypes:vipOptions(1),
                 tableData: []
             }
         },
@@ -348,8 +339,8 @@
                 this.form.userCode = row.userCode;
                 this.form.name = row.name;
                 this.form.memberType = row.vipType;
-                this.form.lesson = row.Recovered;
-                this.form.gift = row.Recovered;
+                this.form.normalhour = row.Recovered;
+                this.form.gifthour = row.Recovered;
                 this.form.memo = row.memo;
                 this.form.btnType = 1;
 
@@ -492,7 +483,7 @@
                     return false
                 }
                 let row = this.multipleSelection[0];
-                this.form.lesson = row.Recovered;
+                this.form.normalhour = row.Recovered;
                 this.form.rowName = row.name;
                 this.dialogVisible = true;
                 this.dialogLesson = true;
@@ -518,7 +509,7 @@
                     return false
                 }
                 let row = this.multipleSelection[0];
-                this.form.gift = row.Recovered;
+                this.form.gifthour = row.Recovered;
                 this.form.rowName = row.name;
                 this.dialogVisible = true;
                 this.dialogGift = true;
@@ -544,7 +535,7 @@
                     return false
                 }
                 let row = this.multipleSelection[0];
-                this.form.gift = row.Recovered;
+                this.form.gifthour = row.Recovered;
                 this.form.rowName = row.name;
                 this.dialogVisible = true;
                 this.dialogLessonTable = true;
@@ -581,8 +572,8 @@
                     userCode: that.form.userCode,
                     name: that.form.name,
                     memberType: that.form.memberType,
-                    lesson: that.form.lesson,
-                    gift: that.form.gift,
+                    normalhour: that.form.normalhour,
+                    gift: that.form.gifthour,
                     memo: that.form.memo,
                     dialogValue: that.form.dialogValue,
                 };
@@ -637,7 +628,7 @@
                     name: that.form.name,
                     memberType: that.form.memberType,
                     lesson: that.form.lesson,
-                    gift: that.form.gift,
+                    gift: that.form.gifthour,
                     memo: that.form.memo,
                     dialogValue: that.form.dialogValue,
                 };
@@ -695,7 +686,7 @@
                 let param = {
                     token: localStorage.token,
                     userCode: that.form.userCode,
-                    gift: that.form.gift,
+                    gift: that.form.gifthour,
                 };
                 let postdata = qs.stringify(param);
                 testSelect(postdata).then(res => {
@@ -873,15 +864,13 @@
                 // 查询检测设备。上级区域id,区域id必传。regionid传0,查询supregionid对应所有子区域的检测设备。 如果supregionid,regionid都传0,默认查询企业ID下所有检测设备
                 let param = {
                     token: localStorage.token,
-                    supregionid: 0,//
-                    regionid: this.panel.regionid,//
-                    comid: 1,//
-                    tagname: that.panel.tagname,//标签名
-                    start: 1,//
-                    tableMax: 9999,//
+                    vipType : that.panel.vipType ,//
+                    phone : that.panel.phone ,//
+                    name : that.panel.name ,//
+                    expDay : that.panel.expDay ,//
                 };
                 let postdata = qs.stringify(param);
-                testTable(postdata).then(res => {
+                VipUserListQuery(postdata).then(res => {
                     let json = res;
                     if (json.Code == 0) {
                         that.loading = false;

+ 9 - 5
pc/src/views/appoint.vue

@@ -1,7 +1,11 @@
 <template>
     <div class="context">
-        <div class="panel">
-            <h5>预约管理 <span class="current">{{current}}</span></h5>
+<!--        panel-->
+        <div class="">
+            <div class="panel">
+                <h5>预约管理 <span class="current">{{current}}</span></h5>
+            </div>
+
             <el-tabs v-model="activeName" type="card">
                 <el-tab-pane label="课程预览总览" name="first">
                     <div class="table">
@@ -248,8 +252,8 @@
     export default {
         data() {
             return {
-                // activeName: 'first',
-                activeName: 'second',
+                activeName: 'first',
+                // activeName: 'second',
                 tableView: true,//其他dialog
                 dialogVisible: false,//其他dialog
                 dialogMemberVisible: false,//新增教练dialog
@@ -258,7 +262,7 @@
                 dialogExpTime: false,//有效期调整
                 dialogLessonTable: false,//教练课程
                 dialogTitle: '新增教练',
-                current: '星期日 2020/08/16',
+                current: getNowDate(),
                 dialogValue: [],
                 // panel 配置项目
                 panel: {

+ 1 - 1
pc/vue.config.js

@@ -3,7 +3,7 @@ module.exports = {
     devServer: {
         proxy: {
             '/api': {
-                target: 'http://192.168.0.162:19095/',
+                target: 'http://192.168.0.3:19095/',
                 changeOrigin: true,
                 pathRewrite: {
                     '^/api': '',