Просмотр исходного кода

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

Changpeng Duan 5 лет назад
Родитель
Сommit
8d8c275601

+ 1 - 0
pc/.idea/vcs.xml

@@ -1,6 +1,7 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <project version="4">
   <component name="VcsDirectoryMappings">
+    <mapping directory="$PROJECT_DIR$/.." vcs="Git" />
     <mapping directory="$PROJECT_DIR$" vcs="Git" />
   </component>
 </project>

+ 2 - 0
pc/README.md

@@ -14,6 +14,8 @@
                                                                                          
 ##常用的后台管理模板  
 
+小飞龙api服务
+http://192.168.0.3:19095/v1/docs/index.html
 
 
 基于 https://panjiachen.github.io/vue-element-admin-site/zh/guide/ 的版本, 只保留常用功能和修改部分UI效果  

+ 1 - 0
pc/src/Global.js

@@ -100,6 +100,7 @@ globalValid = function (data, mins, maxs, text, that) {
 // 手机号码格式
 globalCheckPhone = function (val) {
     let re = /^1[3|4|5|6|7|8|9][0-9]\d{8}$/;
+    val = val.toString();
     if (val.search(re) == -1) {
         return false;
     } else {

+ 15 - 4
pc/src/Mock/index.js

@@ -23,10 +23,17 @@ let worldDetail = function () {
 
 let testTable = function () {
     let item = [];
-    for (var i = 0; i < 30; i++) {
+
+    let members = [
+        {id: 1, name: '霍元甲', userCode: '15253135600', vipType: 1},
+        {id: 2, name: '陈真', userCode: '15253135602', vipType: 2},
+        {id: 3, name: '成龙', userCode: '15253135604', vipType: 1},
+    ]
+
+    for (var i = 0; i < 6; i++) {
         item.push({
             "id": "@guid",
-            "userCode": "@region",
+            "userCode": "@integer(15253135600, 15253135699)",
             "name": "@region",
             "tel": "@integer(15253135600, 15253135699)",
             "shop": "@region",
@@ -35,11 +42,15 @@ let testTable = function () {
             "valid": "@datetime",
             "Confirmed": "@integer(36844, 368449)",
             "Deaths": "@integer(1099, 10993)",
-            "Recovered": "@integer(1986, 19865)",
+            "Recovered": "@integer(1986, 9999)",
             "Status": "@integer(1, 2)",
             "color": "@hex",
+            "memo": "@paragraph(1, 1)",
+            "dialogValue": "@range(1, 3)",
             "vipType": "@integer(1, 2)",
+            "members": members,
             "wxVisible": "@integer(0, 1)",
+            "timeScope":  [new Date(2016, 9, 10, 8, 40), new Date(2016, 9, 10, 9, 40)],
         })
     }
 
@@ -56,7 +67,7 @@ let testSelect = function () {
     for (var i = 0; i < 30; i++) {
         item.push({
             "key": i + 1,
-            "value": "@guid",
+            "value": i + 1,
             "label": "@region",
         })
     }

+ 16 - 7
pc/src/api/Navs.js

@@ -34,7 +34,7 @@ let navs = [{
     "show": 1,
     "grouplist": "2,5",
     "icon": "el-icon-tickets",
-},  {
+}, {
     "clmid": "5",
     "clmcode": "lessonManage",
     "clmname": "课程表管理",
@@ -72,6 +72,15 @@ let navs = [{
     "icon": "el-icon-document-copy",
 }, {
     "clmid": "9",
+    "clmcode": "cost",
+    "clmname": "消费记录",
+    "clmurl": "/cost",
+    "prname": "",
+    "show": 1,
+    "grouplist": "2,5",
+    "icon": "el-icon-bank-card",
+}, {
+    "clmid": "10",
     "clmcode": "finish",
     "clmname": "下课管理",
     "clmurl": "/finish",
@@ -80,7 +89,7 @@ let navs = [{
     "grouplist": "2,5",
     "icon": "el-icon-bell",
 }, {
-    "clmid": "10",
+    "clmid": "11",
     "clmcode": "setting",
     "clmname": "系统设置",
     "clmurl": "/setting",
@@ -89,7 +98,7 @@ let navs = [{
     "grouplist": "2,5",
     "icon": "el-icon-setting",
 }, {
-    "clmid": "11",
+    "clmid": "12",
     "clmcode": "adminManage",
     "clmname": "管理员管理",
     "clmurl": "/adminManage",
@@ -98,7 +107,7 @@ let navs = [{
     "grouplist": "2,5",
     "icon": "el-icon-user",
 }, {
-    "clmid": "12",
+    "clmid": "13",
     "clmcode": "shop",
     "clmname": "店面管理",
     "clmurl": "/shopManage",
@@ -106,8 +115,8 @@ let navs = [{
     "show": 2,
     "grouplist": "2,5",
     "icon": "el-icon-s-shop",
-},{
-    "clmid": "13",
+}, {
+    "clmid": "14",
     "clmcode": "log",
     "clmname": "操作日志",
     "clmurl": "/log",
@@ -116,7 +125,7 @@ let navs = [{
     "grouplist": "2,5",
     "icon": "el-icon-s-claim",
 }, {
-    "clmid": "14",
+    "clmid": "15",
     "clmcode": "setting",
     "clmname": "系统设置",
     "clmurl": "/adminSetting",

+ 4 - 1
pc/src/api/getApiRes.js

@@ -16,11 +16,14 @@ export function worldDetail(postdata) {
         return getApiBasic(url,postdata);
 }
 
-
 export function SignIn(postdata) {
         let url = headapi + 'SignIn';
         return getApiBasic(url,postdata);
 }
+export function GenVerifyPic(postdata) {
+        let url = headapi + '/Auth/GenVerifyPic';
+        return getApiBasic(url,postdata);
+}
 
 export function editbasicinfo(postdata) {
     let url = headapi + 'editbasicinfo';

BIN
pc/src/assets/img/lessonTable/star.png


+ 7 - 0
pc/src/router/index.js

@@ -83,6 +83,13 @@ const routes = [
                 meta: {
                     title: "系统设置",
                 }
+            },{
+                path: '/lessonManage',
+                name: 'lessonManage',
+                component: () => import('@/views/lessonManage.vue'),
+                meta: {
+                    title: "课程表管理",
+                }
             },{
                 path: '/yhgl',
                 name: 'Yhgl',

+ 137 - 72
pc/src/views/EditLessonTable.vue

@@ -1,14 +1,30 @@
 <template>
     <div class="context">
+        todo
         <div class="panel">
-            <h5>编辑课程表模板</h5>
+            <h5>{{pageTitle}}</h5>
         </div>
         <div class="panel-body">
-            <span>课程表名称</span>
-            <s>2020年暑期训练方案</s>
+            <div class="panel_control">
+                <el-row :gutter="20">
+                    <el-col :span="9">
+                        <em>课程表模板名称:</em>
+                        <el-input v-model="panel.name" placeholder="请输入课程表模板名称"></el-input>
+                    </el-col>
+                </el-row>
+            </div>
         </div>
         <br>
-
+        <el-tabs v-model="activeName" type="card" @tab-click="handleClick">
+            <el-tab-pane label="星期一" name="Monday"></el-tab-pane>
+            <el-tab-pane label="星期二" name="Tuesday"></el-tab-pane>
+            <el-tab-pane label="星期三" name="Wednesday"></el-tab-pane>
+            <el-tab-pane label="星期四" name="Thursday"></el-tab-pane>
+            <el-tab-pane label="星期五" name="Friday"></el-tab-pane>
+            <el-tab-pane label="星期六" name="Saturday"></el-tab-pane>
+            <el-tab-pane label="星期天" name="Sunday"></el-tab-pane>
+        </el-tabs>
+        <el-button class="seeTemp">预览模板</el-button>
         <div class="table">
             <el-table
                     :data="tableData"
@@ -21,43 +37,76 @@
 
             >
                 <el-table-column
-                        type="index"
-                        label="ID"
-                        width="50">
+                        prop="timeScope"
+                        label="时间"
+                        width="260px"
+                >
+                    <template slot-scope="scope">
+                        <el-time-picker
+                                is-range
+                                v-model="scope.row.timeScope"
+                                range-separator="至"
+                                start-placeholder="开始时间"
+                                end-placeholder="结束时间"
+                                placeholder="选择时间范围">
+                        </el-time-picker>
+                    </template>
                 </el-table-column>
                 <el-table-column
                         prop="name"
-                        label="课程表"
+                        label="课程"
                 >
                     <template slot-scope="scope">
-                        <router-link to="/text">{{scope.row.name}}</router-link>
+                        <el-select v-model="scope.row.vipType">
+                            <el-option
+                                    v-for="item in panel.options"
+                                    :key="item.value"
+                                    :label="item.label"
+                                    :value="item.value">
+                            </el-option>
+                        </el-select>
                     </template>
                 </el-table-column>
                 <el-table-column
-                        prop="name"
-                        label="最近修改时间"
+                        prop="Recovered"
+                        label="预约名额"
+                >
+                    <template slot-scope="scope">
+                        <el-input-number v-model="scope.row.Recovered"  :min="1" :max="9999" label=""></el-input-number>
+                    </template>
+                </el-table-column>
+                <el-table-column
+                        prop="Recovered"
+                        label="消耗课时"
                 >
+                    <template slot-scope="scope">
+                        <el-input-number v-model="scope.row.Recovered"  :min="1" :max="9999" label=""></el-input-number>
+                    </template>
                 </el-table-column>
+
                 <el-table-column
                         prop="Status"
                         label="操作"
+                        width="100px"
                 >
                     <template slot-scope="scope">
-                        <el-button type="text">编辑</el-button>
-                        <el-button type="text">删除</el-button>
-                        <el-button type="text">预览</el-button>
-                        <el-button type="text">发布课程表</el-button>
+                        <el-button type="text" class="red">删除</el-button>
                     </template>
                 </el-table-column>
 
             </el-table>
-            <br>
-            <el-pagination
-                    background
-                    :total="pageination.total"
-                    :page-size="pageination.pageItem"
-                    @current-change="pageChange"
-            ></el-pagination>
+<!--            <br>-->
+<!--            <el-pagination-->
+<!--                    background-->
+<!--                    :total="pageination.total"-->
+<!--                    :page-size="pageination.pageItem"-->
+<!--                    @current-change="pageChange"-->
+<!--            ></el-pagination>-->
+
+            <div class="rowBottom">
+                <el-button type="primary">新增课表</el-button>
+                <el-button type="primary">提交</el-button>
+            </div>
         </div>
 
         <el-dialog title="增删课程会员" :visible.sync="dialogVisible">
@@ -65,7 +114,7 @@
                 <span>基础功能</span>
             </div>
             <div>
-                <el-transfer v-model="dialogValue" :data="dialogdata"></el-transfer>
+                <el-transfer filterable v-model="dialogValue" :data="dialogdata"></el-transfer>
             </div>
             <div class="dialogFooter">
                 <el-button type="primary" size="small">确定</el-button>
@@ -77,27 +126,21 @@
 
 <script>
     import Global from '../Global.js'
-    import {DetectorQuery} from "../api/getApiRes";
+    import {
+        testTable,
+        testSelect
+    } from "../api/getApiRes";
 
     let qs = require('qs');
     export default {
         data() {
-            // todo
-            const generateData = _ => {
-                const data = [];
-                for (let i = 1; i <= 15; i++) {
-                    data.push({
-                        key: i,
-                        label: `备选项 ${i}`,
-                        disabled: i % 4 === 0
-                    });
-                }
-                return data;
-            };
             return {
+                pageTitle: '新增课程表模板',
                 dialogVisible: false,
-                dialogdata: generateData(),
-                dialogValue: [1, 4],
+                dialogdata: [],
+                dialogValue: [],
+                temId: '',
+                activeName: 'Monday',
                 // panel 配置项目
                 panel: {
                     usercode: '',
@@ -132,29 +175,16 @@
                     total: 100,
                     pageIndex: 1,
                 },
-                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 弄'
-                }]
+                tableData: []
             }
         },
         mounted() {
-            // this.getTableQuery();
+            this.getTableQuery();
         },
         methods: {
+            handleClick(){
+                console.log(123);
+            },
             changeWechat(e, row) {
                 console.log(e);
                 console.log(row);
@@ -189,7 +219,7 @@
                     tableMax: 9999,//
                 };
                 let postdata = qs.stringify(param);
-                DetectorQuery(postdata).then(res => {
+                testTable(postdata).then(res => {
                     let json = res;
                     if (json.Code == 0) {
                         that.loading = false;
@@ -208,15 +238,6 @@
                     }
                 })
             },
-            // 导出excel
-            btnExpAll() {
-                let that = this;
-                let url = headapi + '?ctl=ajax&mod=czgl&act=czcx_excel';//获取
-                let bt = globaltime2String(that.panel.time1[0]);
-                let et = globaltime2String(that.panel.time1[1]);
-                let usercode = that.panel.usercode;
-                window.location = url + '&bt=' + bt + '&et=' + et + '&usercode=' + usercode;
-            },
             // 设置分页数据
             setPaginations() {
                 // 分页属性
@@ -263,10 +284,17 @@
                 let that = this;
                 return globalfmtDate(column, 11);
             },
-            // 过滤金额
-            filterMoney(value, row, column) {
-                let that = this;
-                return parseFloat(column).toFixed(2);
+        },
+        watch: {
+            $route() {
+                this.temId = this.$route.query.id
+            },
+            temId(e) {
+                if (parseInt(e) == 0) {
+                    this.pageTitle = '新增课程表模板'
+                } else {
+                    this.pageTitle = '编辑课程表模板'
+                }
             },
         },
     }
@@ -275,6 +303,10 @@
 <style scoped>
     @import "../assets/css/panel.css";
 
+    em {
+        font-style: normal;
+    }
+
     .context {
         overflow: hidden;
         display: block;
@@ -354,7 +386,40 @@
         margin-left: 10px;
     }
 
-    /deep/ a:-webkit-any-link {
-        color: #03B1FF;
+    /deep/  .panel_control .el-input {
+        width: 200px;
+        float: left;
+    }
+
+    .panel_control em {
+        float: left;
+        font-size: 14px;
+        color: #545454;
+        line-height: 45px;
+        margin-right: 10px;
+    }
+    .seeTemp {
+        position: relative;
+        float: right;
+        bottom: 60px;
+    }
+    .table {
+        position: relative;
+        top: -50px;
+    }
+    .el-range-editor.el-input__inner {
+        width: 220px;
+        padding: 3px 6px;
+    }
+    .rowBottom {
+        width: 100%;
+        overflow: hidden;
+        display: block;
+        margin: 0 auto;
+        margin-top: 10px;
+    }
+    .rowBottom button {
+        float: left;
+        margin-right: 10px;
     }
 </style>

+ 242 - 16
pc/src/views/Lesson.vue

@@ -4,9 +4,9 @@
             <h5>课程管理</h5>
         </div>
         <div class="change">
-            <el-button type="primary">新增课程</el-button>
+            <el-button type="primary" @click="addLesson">新增课程</el-button>
             <el-button @click="lessonStudenChange">增删课程会员</el-button>
-            <el-button @click="delList">删除课程</el-button>
+            <el-button @click="delList">删除</el-button>
         </div>
         <div class="table">
             <el-table
@@ -15,9 +15,7 @@
                     is-horizontal-resize
                     :default-sort="{prop: 'date', order: 'descending'}"
                     element-loading-background="rgba(0, 0, 0, 0.8)"
-                    class=""
                     @selection-change="handleSelectionChange"
-
             >
                 <el-table-column
                         type="selection"
@@ -28,19 +26,34 @@
                         label="课程名称"
                 >
                 </el-table-column>
+                <el-table-column
+                        prop="vipType"
+                        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>
+                    </template>
+                </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="Recovered"
                         label="课程会员人数"
+                        sortable
                 >
                 </el-table-column>
                 <el-table-column
@@ -62,12 +75,20 @@
                 <el-table-column
                         prop="color"
                         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>
                     </template>
                 </el-table-column>
+                <el-table-column
+                        prop="create"
+                        label="创建时间"
+                        width="210"
+                        sortable
+                >
+                </el-table-column>
                 <el-table-column
                         prop="name"
                         label="备注">
@@ -89,8 +110,8 @@
                         label="操作"
                 >
                     <template slot-scope="scope">
-                        <el-button type="text">修改</el-button>
-                        <el-button type="text">课程会员</el-button>
+                        <el-button type="text" @click="editLesson(scope.row)">修改</el-button>
+                        <el-button type="text" @click="Lessonmember(scope.row)">课程会员</el-button>
                     </template>
                 </el-table-column>
 
@@ -104,16 +125,58 @@
             ></el-pagination>
         </div>
 
-        <el-dialog title="新增课程" :visible.sync="dialogLesson">
-            <div class="dialogTitle">
-                <span>基础功能</span>
-            </div>
+        <el-dialog title="新增课程" :visible.sync="dialogLesson" width="1200px">
             <div>
-                <el-transfer v-model="dialogValue" :data="dialogdata"></el-transfer>
+                <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-form-item>
+                        <el-form-item label="消耗课时">
+                            <el-input-number v-model="form.consumeHour" :min="0" :max="99999"
+                                             label="(天)"></el-input-number>
+                        </el-form-item>
+                        <el-form-item label="建议上课人数">
+                            <el-input-number v-model="form.topLimit" :min="0" :max="99999"
+                                             label="(天)"></el-input-number>
+                        </el-form-item>
+                        <el-form-item label="微信可见">
+                            <el-switch
+                                    v-model="form.wxvisible"
+                                    active-value="1"
+                                    inactive-value="0"
+                                    active-color="#409EFF"
+                                    inactive-color="#D9D9D9">
+                            </el-switch>
+                        </el-form-item>
+                        <el-form-item label="是否通用">
+                            <el-switch
+                                    v-model="form.wxvisible"
+                                    active-value="1"
+                                    inactive-value="0"
+                                    active-color="#409EFF"
+                                    inactive-color="#D9D9D9">
+                            </el-switch>
+                        </el-form-item>
+                        <el-form-item label="课程颜色">
+                            <el-color-picker v-model="form.currColor"></el-color-picker>
+                        </el-form-item>
+                        <el-form-item label="备注">
+                            <el-input v-model="form.memo"></el-input>
+                        </el-form-item>
+                    </el-form>
+                </div>
+                <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-form-item>
+                    </el-form>
+                </div>
             </div>
             <div class="dialogFooter">
-                <el-button type="primary" size="small">确定</el-button>
-                <el-button @click="dialogVisible = false" size="small">取消</el-button>
+                <el-button type="primary" size="small" @click="confirmAddLesson">确定</el-button>
+                <el-button size="small" @click="dialogLesson = false">取消</el-button>
             </div>
         </el-dialog>
 
@@ -122,13 +185,26 @@
                 <span>基础功能</span>
             </div>
             <div>
-                <el-transfer v-model="dialogValue" :data="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>
-                <el-button @click="dialogVisible = false" size="small">取消</el-button>
+                <el-button @click=" dialogVisible = false" size="small">取消</el-button>
             </div>
         </el-dialog>
+
+        <el-dialog title="课程会员" :visible.sync="dialogTableVisible">
+            <el-table :data="gridData">
+                <el-table-column property="name" label="姓名" width="200"></el-table-column>
+                <el-table-column property="userCode" label="手机"></el-table-column>
+                <el-table-column property="vipType" label="会员类型">
+                    <template slot-scope="scope">
+                        <span v-if="scope.row.vipType == 1">年费会员</span>
+                        <span v-if="scope.row.vipType == 2">充值会员</span>
+                    </template>
+                </el-table-column>
+            </el-table>
+        </el-dialog>
     </div>
 </template>
 
@@ -145,8 +221,10 @@
             return {
                 dialogLesson: false,//新增课程
                 dialogVisible: false,
+                dialogTableVisible: false,
                 dialogdata: [],
-                dialogValue: [1, 4],
+                gridData: [],
+                dialogValue: [],
                 // panel 配置项目
                 panel: {
                     usercode: '',
@@ -174,6 +252,16 @@
                     ],
                     time1: globalBt(),
                 },
+                form: {
+                    currName: "",
+                    consumeHour: 0,
+                    topLimit: 0,
+                    wxvisible: 1,
+                    currColor: "",
+                    memo: "",
+                    dialogdata: [],//穿梭待选
+                    dialogValue: [],//穿梭已选
+                },
                 multipleSelection: [],
                 pageination: {
                     pageItem: 100,
@@ -185,9 +273,70 @@
             }
         },
         mounted() {
+            this.panelSelect();
             this.getTableQuery();
         },
         methods: {
+            // 确认添加课程
+            confirmAddLesson() {
+                let that = this;
+
+                // checkNum
+                if (!that.form.currName) {
+                    this.$message.error('错了哦,课程名称不能为空');
+                    return false
+                }
+                if (that.form.currName.length > 20) {
+                    this.$message.error('错了哦,课程名称字数超过20个字');
+                    return false
+                }
+                if (that.form.memo) {
+                    if (that.form.memo.length > 200) {
+                        this.$message.error('错了哦,备注字数超过200个字');
+                        return false
+                    }
+                }
+
+                let param = {
+                    token: localStorage.token,
+                    currName: that.form.currName,
+                    consumeHour: that.form.consumeHour,
+                    topLimit: that.form.topLimit,
+                    wxvisible: that.form.wxvisible,
+                    currColor: that.form.currColor,
+                    memo: that.form.memo,
+                };
+                let postdata = qs.stringify(param);
+                testSelect(postdata).then(res => {
+                    let json = res;
+                    if (json.Code == 0) {
+                        // 关闭弹窗
+                        that.dialogLesson = false;
+                        // 重载列表
+                        that.getTableQuery();
+                        that.$message({
+                            showClose: true,
+                            message: '会员课程调整成功!',
+                            type: 'success'
+                        });
+                    } else {
+                        that.$message.error(json.Memo);
+                    }
+                })
+            },
+            // 新增课程
+            addLesson() {
+                // clear
+                this.form.currName = '';
+                this.form.consumeHour = '';
+                this.form.topLimit = '';
+                this.form.wxvisible = 1;
+                this.form.currColor = "";
+                this.form.memo = "";
+                this.form.dialogValue = "";
+
+                this.dialogLesson = true;
+            },
             // 改色
             changeColor(c, row) {
                 let that = this;
@@ -268,6 +417,23 @@
                     });
                 });
             },
+            // 加载选项
+            panelSelect() {
+                let that = this;
+                let param = {
+                    token: localStorage.token,
+                };
+                let postdata = qs.stringify(param);
+                testSelect(postdata).then(res => {
+                    let json = res;
+                    if (json.Code == 0) {
+                        that.dialogdata = json.Rs;
+                        that.form.dialogdata = json.Rs;
+                    } else {
+                        that.$message.error(json.Memo);
+                    }
+                })
+            },
             // 微信可见与否
             changeWechat(e, row) {
                 let that = this;
@@ -294,11 +460,61 @@
             },
             // 增删会员课程
             lessonStudenChange() {
+                if (!this.multipleSelection.length) {
+                    this.$message({
+                        showClose: true,
+                        message: '错了哦,需要先选中至少一条记录',
+                        type: 'error'
+                    });
+                    return false
+                }
+                if (this.multipleSelection.length != 1) {
+                    this.$message({
+                        showClose: true,
+                        message: '错了哦,只能选中一条记录',
+                        type: 'error'
+                    });
+                    return false
+                }
+                console.log(123);
+                let row = this.multipleSelection[0];
+                this.dialogValue = row.dialogValue;
                 this.dialogVisible = true
             },
             handleSelectionChange(val) {
                 this.multipleSelection = val;
             },
+            clearForm(){
+                // clear
+                this.form.currName = '';
+                this.form.consumeHour = 0;
+                this.form.topLimit = 0;
+                this.form.wxvisible = 1;
+                this.form.currColor = '';
+                this.form.memo = '';
+            },
+            // 修改
+            editLesson(row){
+                let that = this;
+                this.clearForm();
+
+                this.form.currName = row.name;
+                this.form.consumeHour = row.Recovered;
+                this.form.topLimit = row.Recovered;
+                this.form.wxvisible = row.wxVisible;
+                this.form.currColor = row.color;
+                this.form.memo = row.memo;
+                this.form.dialogValue = row.dialogValue;
+                this.form.btnType = 1; //修改
+
+                this.dialogLesson = true
+                this.dialogTitle = '修改课程'
+            },
+            Lessonmember(row){
+                this.dialogTableVisible = true;
+                this.gridData = row.members;
+
+            },
             // 查询按钮
             query() {
                 // this.getTableQuery();
@@ -484,4 +700,14 @@
         float: right;
         margin-left: 10px;
     }
+
+    .pull-left {
+        width: 30%;
+        float: left;
+    }
+
+    .pull-right {
+        width: 70%;
+        float: right;
+    }
 </style>

+ 269 - 100
pc/src/views/LessonTable.vue

@@ -4,7 +4,9 @@
             <h5>课程表模板</h5>
         </div>
         <div class="change">
-            <el-button type="primary">新增课程表</el-button>
+            <el-button type="primary" @click="addLessonTable">新增课程表</el-button>
+            <el-button type="" @click="copy">复制</el-button>
+            <el-button type="" @click="delList">删除</el-button>
         </div>
         <div class="table">
             <el-table
@@ -15,35 +17,49 @@
                     element-loading-background="rgba(0, 0, 0, 0.8)"
                     class=""
                     @selection-change="handleSelectionChange"
-
             >
+                <el-table-column
+                        type="selection"
+                        width="55">
+                </el-table-column>
                 <el-table-column
                         type="index"
-                        label="ID"
+                        label="序号"
                         width="50">
                 </el-table-column>
                 <el-table-column
                         prop="name"
-                        label="课程表"
+                        label="课程表模板名称"
                 >
                     <template slot-scope="scope">
-                        <router-link to="/text">{{scope.row.name}}</router-link>
+                        <span class="link" @click="goEdit(scope.row.id)">
+                               {{scope.row.name}}
+                        </span>
+
                     </template>
                 </el-table-column>
                 <el-table-column
                         prop="name"
-                        label="最近修改时间"
+                        label="课程表名称"
+                        sortable
                 >
                 </el-table-column>
+                <el-table-column
+                        prop="create"
+                        label="最后修改时间"
+                        sortable
+                >
+                </el-table-column>
+
                 <el-table-column
                         prop="Status"
                         label="操作"
                 >
                     <template slot-scope="scope">
                         <el-button type="text" @click="goEdit(scope.row)">编辑</el-button>
-                        <el-button type="text">删除</el-button>
-                        <el-button type="text">预览</el-button>
-                        <el-button type="text">发布课程表</el-button>
+                        <el-button type="text" @click="goEdit(scope.row)">预览本周</el-button>
+                        <el-button type="success" size="mini" v-if="scope.row.Status == 1" @click="openLessonTable(scope.row)">发布</el-button>
+                        <el-button type="warning" size="mini" v-if="scope.row.Status == 2" @click="unpubilc(scope.row)">取消发布</el-button>
                     </template>
                 </el-table-column>
 
@@ -57,15 +73,46 @@
             ></el-pagination>
         </div>
 
-        <el-dialog title="增删课程会员" :visible.sync="dialogVisible">
+        <el-dialog title="发布课程表" :visible.sync="dialogVisible" width="640px">
             <div class="dialogTitle">
-                <span>基础功能</span>
+                <span>{{form.name}}</span>
             </div>
             <div>
-                <el-transfer v-model="dialogValue" :data="dialogdata"></el-transfer>
+                <span class="demonstration">选择发布日期(按周选取)</span>
+                <br>
+                <br>
+                <el-date-picker
+                        v-model="form.week"
+                        type="week"
+                        :picker-options="{'firstDayOfWeek': 1}"
+                        format="yyyy 第 WW 周"
+                        placeholder="选择周">
+                </el-date-picker>
+                <br>
+                <br>
+                <span>
+                    微信可见
+                </span>
+                <el-switch
+                        v-model="form.wechat"
+                        active-value="1"
+                        inactive-value="0"
+                        active-color="#409EFF"
+                        inactive-color="#D9D9D9">
+                </el-switch>
+                <span>
+                    微信可预约
+                </span>
+                <el-switch
+                        v-model="form.appoint"
+                        active-value="1"
+                        inactive-value="0"
+                        active-color="#409EFF"
+                        inactive-color="#D9D9D9">
+                </el-switch>
             </div>
             <div class="dialogFooter">
-                <el-button type="primary" size="small">确定</el-button>
+                <el-button type="primary" size="small" @click="public">确定</el-button>
                 <el-button @click="dialogVisible = false" size="small">取消</el-button>
             </div>
         </el-dialog>
@@ -74,54 +121,19 @@
 
 <script>
     import Global from '../Global.js'
-    import {DetectorQuery} from "../api/getApiRes";
+    import {
+        testTable,
+        testSelect
+    } from "../api/getApiRes";
 
     let qs = require('qs');
     export default {
         data() {
-            // todo
-            const generateData = _ => {
-                const data = [];
-                for (let i = 1; i <= 15; i++) {
-                    data.push({
-                        key: i,
-                        label: `备选项 ${i}`,
-                        disabled: i % 4 === 0
-                    });
-                }
-                return data;
-            };
             return {
                 dialogVisible: false,
-                dialogdata: generateData(),
-                dialogValue: [1, 4],
+                dialogdata: [],
+                dialogValue: [],
                 // panel 配置项目
-                panel: {
-                    usercode: '',
-                    username: '',
-                    compname: '',
-                    keyword: '',
-                    USERCODE: '',
-                    taskstatus: 99,
-
-                    draw: 1,
-                    start: 0,
-                    recordsTotal: 0,
-                    tableData: [],
-                    allTableData: [],
-                    limit: '10',
-                    multipleSort: false,
-                    loading: false,
-                    fileList: [],
-                    multipleSelection: [],
-                    detectedmac: '',
-                    options: [
-                        {value: 99, label: '全部'},
-                        {value: 1, label: '进行中'},
-                        {value: 2, label: '已完成'},
-                    ],
-                    time1: globalBt(),
-                },
                 multipleSelection: [],
                 pageination: {
                     pageItem: 100,
@@ -129,44 +141,213 @@
                     total: 100,
                     pageIndex: 1,
                 },
-                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 弄'
-                }]
+                form:{
+                    Id:'',
+                    name:'',
+                    week:'',
+                    wechat:1,
+                    appoint:1,
+                },
+                tableData: []
             }
         },
         mounted() {
-            // this.getTableQuery();
+            this.getTableQuery();
         },
         methods: {
-            // 编辑课程表模板
-            goEdit(row){
-                this.$router.push({path:'/editLessonTable', query:{
-                        id:row.id
-                    }});
+            addLessonTable() {
+                this.$router.push({
+                    path: '/editLessonTable', query: {
+                        id: 0
+                    }
+                });
             },
-            changeWechat(e, row) {
-                console.log(e);
-                console.log(row);
-                this.$message.success('当前用户微信已可见');
-                // this.$message.success('当前用户微信已不可见');
+            // 删除
+            delList() {
+                let that = this;
+                // checkNum
+                if (!this.multipleSelection.length) {
+                    that.$message({
+                        showClose: true,
+                        message: '错了哦,需要先选中至少一条记录',
+                        type: 'error'
+                    });
+                    return false
+                }
+                if (this.multipleSelection.length != 1) {
+                    that.$message({
+                        showClose: true,
+                        message: '错了哦,只能选中一条记录',
+                        type: 'error'
+                    });
+                    return false
+                }
+
+                let detectorid = that.multipleSelection[0].Id;
+
+                let param = {
+                    token: localStorage.token,
+                    detectorid: detectorid,
+                    status: 9,//0禁用1启用9删除
+                };
+                let postdata = qs.stringify(param);
+
+                this.$confirm('此操作将永久删除该课程表模板, 是否继续?', '提示', {
+                    confirmButtonText: '确定',
+                    cancelButtonText: '取消',
+                    type: 'warning'
+                }).then(() => {
+                    testSelect(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);
+                        }
+                    });
+                }).catch(() => {
+                    this.$message({
+                        type: 'info',
+                        message: '已取消删除'
+                    });
+                });
             },
-            // 增删会员课程
-            lessonStudenChange() {
-                this.dialogVisible = true
+
+            copy() {
+                let that = this;
+                // checkNum
+                if (!this.multipleSelection.length) {
+                    that.$message({
+                        showClose: true,
+                        message: '错了哦,需要先选中至少一条记录',
+                        type: 'error'
+                    });
+                    return false
+                }
+                if (this.multipleSelection.length != 1) {
+                    that.$message({
+                        showClose: true,
+                        message: '错了哦,只能选中一条记录',
+                        type: 'error'
+                    });
+                    return false
+                }
+
+                let detectorid = that.multipleSelection[0].Id;
+
+                let param = {
+                    token: localStorage.token,
+                    detectorid: detectorid,
+                    status: 3,//0禁用1启用9删除
+                };
+                let postdata = qs.stringify(param);
+
+                this.$confirm('此操作将复制相同内容的课程表, 是否继续?', '提示', {
+                    confirmButtonText: '确定',
+                    cancelButtonText: '取消',
+                    type: 'warning'
+                }).then(() => {
+                    testSelect(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);
+                        }
+                    });
+                }).catch(() => {
+                    this.$message({
+                        type: 'info',
+                        message: '已取消复制'
+                    });
+                });
+            },
+            // 发布课程表
+            openLessonTable(row){
+                this.dialogVisible = true;
+                this.form.name = row.name;
+                this.form.Id = row.Id;
+                this.form.week = '';
+            },
+            // 发布
+            public() {
+                let that = this;
+                if (!this.form.week) {
+                    this.$message({
+                        showClose: true,
+                        message: '错了哦,发布周期不能空',
+                        type: 'error'
+                    });
+                    return false
+                }
+
+                let param = {
+                    token: localStorage.token,
+                    detectorid: this.form.Id,
+                    week: this.form.week,
+                    wechat: this.form.wechat,
+                    appoint: this.form.appoint,
+                };
+                let postdata = qs.stringify(param);
+                testSelect(postdata).then(res => {
+                    let json = res;
+                    if (json.Code == 0) {
+                        that.$message({
+                            showClose: true,
+                            message: this.form.name + '已发布!',
+                            type: 'success'
+                        });
+                        // 重载列表
+                        that.getTableQuery();
+                        this.dialogVisible = false;
+                    } else {
+                        that.$message.error(json.Memo);
+                    }
+                });
+            },
+            // 取消发布
+            unpubilc(row) {
+                let that = this;
+                let param = {
+                    token: localStorage.token,
+                    detectorid: row.Id,
+                    status: 4,//0禁用1启用9删除
+                };
+                let postdata = qs.stringify(param);
+                testSelect(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);
+                    }
+                });
+            },
+            // 编辑课程表模板
+            goEdit(row) {
+                this.$router.push({
+                    path: '/editLessonTable', query: {
+                        id: row.id
+                    }
+                });
             },
             handleSelectionChange(val) {
                 this.multipleSelection = val;
@@ -184,15 +365,11 @@
                 // 查询检测设备。上级区域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,//
                 };
                 let postdata = qs.stringify(param);
-                DetectorQuery(postdata).then(res => {
+                testTable(postdata).then(res => {
                     let json = res;
                     if (json.Code == 0) {
                         that.loading = false;
@@ -211,15 +388,6 @@
                     }
                 })
             },
-            // 导出excel
-            btnExpAll() {
-                let that = this;
-                let url = headapi + '?ctl=ajax&mod=czgl&act=czcx_excel';//获取
-                let bt = globaltime2String(that.panel.time1[0]);
-                let et = globaltime2String(that.panel.time1[1]);
-                let usercode = that.panel.usercode;
-                window.location = url + '&bt=' + bt + '&et=' + et + '&usercode=' + usercode;
-            },
             // 设置分页数据
             setPaginations() {
                 // 分页属性
@@ -357,7 +525,8 @@
         margin-left: 10px;
     }
 
-    /deep/ a:-webkit-any-link {
+    .link {
         color: #03B1FF;
+        text-decoration: underline;
     }
 </style>

+ 24 - 2
pc/src/views/Login.vue

@@ -37,10 +37,14 @@
 </template>
 
 <script>
-    import {SignIn} from '../api/getApiRes.js'
+    import {
+        SignIn,
+        GenVerifyPic,
+    } from '../api/getApiRes.js'
 
     let qs = require('qs');
     import Global from '../Global.js'
+    import {testSelect} from "../api/getApiRes";
 
     export default {
         data() {
@@ -50,12 +54,14 @@
                     pwd: '',
                     valid: '',
                 },
-                valImgSrc: 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAPAAAABQCAMAAAAQlwhOAAAAP1BMVEUAAACcvA7J6TuszB6gwBKcvA6z0yXC4jSryx2+3jCy0iTG5ji72y3G5jievhCryx2dvQ+buw3N7T+21iioyBqdrAOEAAAAAXRSTlMAQObYZgAAA9BJREFUeJzsW2mP4yAMxT341FTVzP//r6tuJmAbm6sh0CRvpF0pTYDHM76amhMnWsBa23sJm8LagzE+Ce8eR+PbGVOPSa/Xa49p35gmhfGz4aTXa0/G8uXnsyHjroQ17FbhLtg9X2B/uwdQ7J0yhFDv/fn52XRtTVDG9/sZ/xkx+mtN+PXxCJ9BoPir3LoK4derL2PBhn9/I4zVgR65M36BwjmO+/EIGY/o7qNOar5DvifQ6cGfinmDfkgSliIzQOIkzps0YkSPhyEUtIKrL+rd0WeObNp6OiChAhiJ8EJVit2I7IiJKlwuF9Cz6HnVEmMAWWFgCo+m8eXyn7GaY8lCqQqTszukwozw4lndMpW9mC8ECvPdGV9hYDZsvVHjp1T/y0PRcArDfIaJdRr/r7X2/5IDpRTlpNtGY+y9MFf4fcnCYuK5CgfDN1x8DQJrNlhhCN2Sfyx39Cbrvt1uVc9ROpQZOF4B4cwcqp2Xvt0qGHuO6JKQRXIPbjIVrsm0cjeojrBgrLINBnadE2GhIpcOz46CcsJKKRPxvkt0IsavE68yZuRKEigWWHBEJuplmF3r/szQ+qFqVesXWmq1qk4EJHRxwjzbwKl0FecV3TsoFZ+fTn9uvkOMXHQMg89A8UE25Ph8hncdG+tFJBRmxix/X+EUNuQUlKwyJkrJOHOnIjJQTGEcoUnCzdaGtfljjYjMEnpa6gabqE/MwnwIX/oY0cgJvMpfaAb97OV/6+3bzS6lcDBNkx4y5imq6Ca9X8KM6Ek1gvvytAGWd0WwmyNxx9n8NCmM3aJrCEO6a5owofAwUsqBdJZthnJbjLC3jELjBjCKW+bLjxuAOCwqocGg4GUCL+eOv0F2miBMzk9BxSLeCqj6S7sIeTvAN4I4WNxarD0YYpqmBBXI7oL6syOPo3cfsxmjJXnlgLSJPg6ofNO024zPAeID5QicKpK0D9fpTy8BMOa107IFCicmje2I+vy6iTGgxqjUT9LPLxkiT+AMiZX8fM1KYPF9AFIdkzNVwWr4gE82kOTU1jBoYUTA5TPgy1nIfO+LLZ68Hyfvb4Nv1JCuBR6XIv1m31L50wyS8BX6Q62/UXM8i6dIKgxBKGTaAS6oDHaGTVu17UZHqQS6Qj52qRVpeYzWis8FyaAM9+60XKLHq++66wGUst6qH/r74SIIrSy55dH85G4GJqzRIv4uyDognrmF1vejeYTtCf0Npd3y7fx25MY4Ce8eR+N74sSJEydObI37/d57CZvifj8Y48EIt/8971iEt/jF9kh8j/cT9cMQ/hcAAP//l64Pg1y7/TYAAAAASUVORK5CYII=',
+                valImgSrc: '',
+                valImgId: '',
                 overtime: '',
             }
         },
         mounted() {
             this.overtime = new Date();
+            this.getGenVerifyPic();
             // 如果是手动退出用户
             if (this.$route.query.status == 1) {
                 // 刷新验证图
@@ -65,6 +71,22 @@
             }
         },
         methods: {
+            getGenVerifyPic(){
+                let param = {
+                    token: localStorage.token,
+                };
+                let postdata = qs.stringify(param);
+                GenVerifyPic(postdata).then(res => {
+                    let json = res;
+                    if (json.Code == 0) {
+                        console.log(json);
+                        that.valImgSrc = json.pic;
+                        that.valImgId = json.id;
+                    } else {
+                        that.$message.error(json.Memo);
+                    }
+                })
+            },
             //            点击验证码切换
             changeValImg: function () {
                 let that = this;

+ 121 - 11
pc/src/views/Member.vue

@@ -123,19 +123,19 @@
                         label="会员课程">
                 </el-table-column>
                 <el-table-column
-                        prop="name"
+                        prop="memo"
                         label="备注">
                     <template slot-scope="scope">
                         <el-popover
                                 placement="top"
-                                title="标题"
+                                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
@@ -143,10 +143,13 @@
                         label="操作"
                 >
                     <template slot-scope="scope">
-                        <el-button type="text">编辑</el-button>
-                        <el-button type="danger" v-if="scope.row.Status == 1" @click="pauseRow(scope.row)">禁用
+                        <el-button type="text" @click="editMember(scope.row)">编辑</el-button>
+                        <el-button type="danger" v-if="scope.row.Status == 1" size="mini" @click="pauseRow(scope.row)">
+                            禁用
+                        </el-button>
+                        <el-button type="success" v-if="scope.row.Status == 2" size="mini" @click="runRow(scope.row)">
+                            启用
                         </el-button>
-                        <el-button type="success" v-if="scope.row.Status == 2" @click="runRow(scope.row)">启用</el-button>
                     </template>
                 </el-table-column>
             </el-table>
@@ -193,13 +196,14 @@
                 <div class="pull-right">
                     <el-form ref="form" :model="form" label-width="160px">
                         <el-form-item label="会员课程">
-                            <el-transfer 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>
             </div>
             <div class="dialogFooter">
-                <el-button type="primary" size="small" @click="confirmMember">确定</el-button>
+                <el-button type="primary" size="small" v-if="form.btnType == 0" @click="confirmMember">确定</el-button>
+                <el-button type="primary" size="small"  v-if="form.btnType == 1" @click="confirmEditMember">确定</el-button>
                 <el-button size="small" @click="dialogMemberVisible = false">取消</el-button>
             </div>
         </el-dialog>
@@ -230,7 +234,7 @@
                 </el-date-picker>
             </div>
             <div v-if="dialogLessonTable">
-                <el-transfer v-model="form.dialogValue" :data="form.dialogdata"></el-transfer>
+                <el-transfer  filterable v-model="form.dialogValue" :data="form.dialogdata"></el-transfer>
             </div>
 
             <div class="dialogFooter">
@@ -238,6 +242,8 @@
                 <el-button type="primary" size="small" @click="confirmLesson" v-if="dialogLesson">确定</el-button>
                 <el-button type="primary" size="small" @click="confirmGift" v-if="dialogGift">确定</el-button>
                 <el-button type="primary" size="small" @click="confirmExpTime" v-if="dialogExpTime">确定</el-button>
+                <el-button type="primary" size="small" @click="confirmLessonTable" v-if="dialogLessonTable">确定
+                </el-button>
                 <el-button size="small" @click="dialogVisible = false">取消</el-button>
             </div>
         </el-dialog>
@@ -310,6 +316,7 @@
                     memberType: 1,
                     lesson: 1,
                     gift: 1,
+                    btnType: 0,//0新建,1修改编辑
                     memo: '',
                     expTime: '',
                     dialogdata: [],//穿梭待选
@@ -327,6 +334,24 @@
             this.getTableQuery();
         },
         methods: {
+            // 编辑
+            editMember(row) {
+                let that = this;
+                this.clearForm();
+
+                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.memo = row.memo;
+                this.form.btnType = 1;
+
+                this.form.shopId = row.Id;
+                this.dialogMemberVisible = true
+                this.dialogTitle = '编辑会员'
+
+            },
             // 禁用
             pauseRow(row) {
                 let that = this;
@@ -403,6 +428,7 @@
                 this.dialogGift = false;
                 this.dialogLesson = false;
                 this.dialogExpTime = false;
+                this.dialogLessonTable = false;
             },
             // 用户禁用 todo
             // 用户启用 todo
@@ -572,6 +598,61 @@
                     }
                 })
             },
+            confirmEditMember() {
+                console.log(123);
+                let that = this;
+                // checkNum
+                if (!that.form.userCode) {
+                    this.$message.error('错了哦,手机号不能为空');
+                    return false
+                }
+                console.log(that.form.userCode);
+                if (!globalCheckPhone(that.form.userCode)) {
+                    this.$message.error('错了哦,手机号格式不正确');
+                    return false
+                }
+                if (!that.form.name) {
+                    this.$message.error('错了哦,会员名不能为空');
+                    return false
+                }
+                if (that.form.name.length > 8) {
+                    this.$message.error('错了哦,会员名字数超过8个字');
+                    return false
+                }
+                if (that.form.memo) {
+                    if (that.form.memo.length > 200) {
+                        this.$message.error('错了哦,备注字数超过200个字');
+                        return false
+                    }
+                }
+                let param = {
+                    token: localStorage.token,
+                    userCode: that.form.userCode,
+                    name: that.form.name,
+                    memberType: that.form.memberType,
+                    lesson: that.form.lesson,
+                    gift: that.form.gift,
+                    memo: that.form.memo,
+                    dialogValue: that.form.dialogValue,
+                };
+                let postdata = qs.stringify(param);
+                testSelect(postdata).then(res => {
+                    let json = res;
+                    if (json.Code == 0) {
+                        // 关闭弹窗
+                        that.dialogMemberVisible = false;
+                        // 重载列表
+                        that.getTableQuery();
+                        that.$message({
+                            showClose: true,
+                            message: '会员信息编辑成功!',
+                            type: 'success'
+                        });
+                    } else {
+                        that.$message.error(json.Memo);
+                    }
+                })
+            },
             // 确认提交课时
             confirmLesson() {
                 let that = this;
@@ -656,6 +737,34 @@
                     }
                 })
             },
+            // 确认提交会员课程
+            confirmLessonTable() {
+                let that = this;
+                // checkNum
+
+                let param = {
+                    token: localStorage.token,
+                    userCode: that.form.userCode,
+                    dialogValue: that.form.dialogValue,
+                };
+                let postdata = qs.stringify(param);
+                testSelect(postdata).then(res => {
+                    let json = res;
+                    if (json.Code == 0) {
+                        // 关闭弹窗
+                        that.dialogVisible = false;
+                        // 重载列表
+                        that.getTableQuery();
+                        that.$message({
+                            showClose: true,
+                            message: '会员课程调整成功!',
+                            type: 'success'
+                        });
+                    } else {
+                        that.$message.error(json.Memo);
+                    }
+                })
+            },
             // 加载选项
             panelSelect() {
                 let that = this;
@@ -676,6 +785,7 @@
             addMember() {
                 this.clearForm();
                 this.dialogMemberVisible = true
+                this.btnType = 0;
                 this.dialogTitle = '新增会员'
             },
             // 删除

+ 576 - 0
pc/src/views/lessonManage.vue

@@ -0,0 +1,576 @@
+<template>
+    <div class="context">
+        <div class="panel">
+            <h5>课程表管理</h5>
+        </div>
+        <div class="change">
+            <el-button type="primary" @click="addLessonTable">新增课程表</el-button>
+            <el-button type="" @click="copy">复制</el-button>
+            <el-button type="" @click="delList">删除</el-button>
+        </div>
+        <div class="table">
+            <el-table
+                    :data="tableData"
+                    border
+                    is-horizontal-resize
+                    :default-sort="{prop: 'date', order: 'descending'}"
+                    element-loading-background="rgba(0, 0, 0, 0.8)"
+                    class=""
+                    @selection-change="handleSelectionChange"
+            >
+                <el-table-column
+                        type="selection"
+                        width="55">
+                </el-table-column>
+                <el-table-column
+                        type="index"
+                        label="序号"
+                        width="50">
+                </el-table-column>
+                <el-table-column
+                        prop="name"
+                        label="日期"
+                >
+                    <template slot-scope="scope">
+                        <span class="readyTime" v-if="scope.row.Status == 0">
+                               {{scope.row.name}}
+                        </span>
+                        <span class="CurTime" v-if="scope.row.Status == 1">
+                               {{scope.row.name}}
+                        </span>
+                        <i class="curIcon" v-if="scope.row.Status == 1"></i>
+                        <span class="runTime" v-if="scope.row.Status == 2">
+                            {{scope.row.name}}
+                        </span>
+                    </template>
+                </el-table-column>
+                <el-table-column
+                        prop="name"
+                        label="课程表名称"
+                        sortable
+                >
+                </el-table-column>
+                <el-table-column
+                        prop="create"
+                        label="最后修改时间"
+                        sortable
+                >
+                </el-table-column>
+
+                <el-table-column
+                        prop="Status"
+                        label="操作"
+                >
+                    <template slot-scope="scope">
+                        <el-button type="text" @click="goEdit(scope.row)">编辑</el-button>
+                        <el-button type="text" @click="goEdit(scope.row)">预览本周</el-button>
+                    </template>
+                </el-table-column>
+
+            </el-table>
+            <br>
+            <el-pagination
+                    background
+                    :total="pageination.total"
+                    :page-size="pageination.pageItem"
+                    @current-change="pageChange"
+            ></el-pagination>
+        </div>
+
+        <el-dialog title="发布课程表" :visible.sync="dialogVisible" width="640px">
+            <div class="dialogTitle">
+                <span>{{form.name}}</span>
+            </div>
+            <div>
+                <span class="demonstration">选择发布日期(按周选取)</span>
+                <br>
+                <br>
+                <el-date-picker
+                        v-model="form.week"
+                        type="week"
+                        :picker-options="{'firstDayOfWeek': 1}"
+                        format="yyyy 第 WW 周"
+                        placeholder="选择周">
+                </el-date-picker>
+                <br>
+                <br>
+                <span>
+                    微信可见
+                </span>
+                <el-switch
+                        v-model="form.wechat"
+                        active-value="1"
+                        inactive-value="0"
+                        active-color="#409EFF"
+                        inactive-color="#D9D9D9">
+                </el-switch>
+                <span>
+                    微信可预约
+                </span>
+                <el-switch
+                        v-model="form.appoint"
+                        active-value="1"
+                        inactive-value="0"
+                        active-color="#409EFF"
+                        inactive-color="#D9D9D9">
+                </el-switch>
+            </div>
+            <div class="dialogFooter">
+                <el-button type="primary" size="small" @click="public">确定</el-button>
+                <el-button @click="dialogVisible = false" size="small">取消</el-button>
+            </div>
+        </el-dialog>
+    </div>
+</template>
+
+<script>
+    import Global from '../Global.js'
+    import {
+        testTable,
+        testSelect
+    } from "../api/getApiRes";
+
+    let qs = require('qs');
+    export default {
+        data() {
+            return {
+                dialogVisible: false,
+                dialogdata: [],
+                dialogValue: [],
+                // panel 配置项目
+                multipleSelection: [],
+                pageination: {
+                    pageItem: 100,
+                    pageoptions: pageOptions(),
+                    total: 100,
+                    pageIndex: 1,
+                },
+                form:{
+                    Id:'',
+                    name:'',
+                    week:'',
+                    wechat:1,
+                    appoint:1,
+                },
+                tableData: []
+            }
+        },
+        mounted() {
+            this.getTableQuery();
+        },
+        methods: {
+            addLessonTable() {
+                this.$router.push({
+                    path: '/editLessonTable', query: {
+                        id: 0
+                    }
+                });
+            },
+            // 删除
+            delList() {
+                let that = this;
+                // checkNum
+                if (!this.multipleSelection.length) {
+                    that.$message({
+                        showClose: true,
+                        message: '错了哦,需要先选中至少一条记录',
+                        type: 'error'
+                    });
+                    return false
+                }
+                if (this.multipleSelection.length != 1) {
+                    that.$message({
+                        showClose: true,
+                        message: '错了哦,只能选中一条记录',
+                        type: 'error'
+                    });
+                    return false
+                }
+
+                let detectorid = that.multipleSelection[0].Id;
+
+                let param = {
+                    token: localStorage.token,
+                    detectorid: detectorid,
+                    status: 9,//0禁用1启用9删除
+                };
+                let postdata = qs.stringify(param);
+
+                this.$confirm('此操作将永久删除该课程表模板, 是否继续?', '提示', {
+                    confirmButtonText: '确定',
+                    cancelButtonText: '取消',
+                    type: 'warning'
+                }).then(() => {
+                    testSelect(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);
+                        }
+                    });
+                }).catch(() => {
+                    this.$message({
+                        type: 'info',
+                        message: '已取消删除'
+                    });
+                });
+            },
+
+            copy() {
+                let that = this;
+                // checkNum
+                if (!this.multipleSelection.length) {
+                    that.$message({
+                        showClose: true,
+                        message: '错了哦,需要先选中至少一条记录',
+                        type: 'error'
+                    });
+                    return false
+                }
+                if (this.multipleSelection.length != 1) {
+                    that.$message({
+                        showClose: true,
+                        message: '错了哦,只能选中一条记录',
+                        type: 'error'
+                    });
+                    return false
+                }
+
+                let detectorid = that.multipleSelection[0].Id;
+
+                let param = {
+                    token: localStorage.token,
+                    detectorid: detectorid,
+                    status: 3,//0禁用1启用9删除
+                };
+                let postdata = qs.stringify(param);
+
+                this.$confirm('此操作将复制相同内容的课程表, 是否继续?', '提示', {
+                    confirmButtonText: '确定',
+                    cancelButtonText: '取消',
+                    type: 'warning'
+                }).then(() => {
+                    testSelect(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);
+                        }
+                    });
+                }).catch(() => {
+                    this.$message({
+                        type: 'info',
+                        message: '已取消复制'
+                    });
+                });
+            },
+            // 发布课程表
+            openLessonTable(row){
+                this.dialogVisible = true;
+                this.form.name = row.name;
+                this.form.Id = row.Id;
+                this.form.week = '';
+            },
+            // 发布
+            public() {
+                let that = this;
+                if (!this.form.week) {
+                    this.$message({
+                        showClose: true,
+                        message: '错了哦,发布周期不能空',
+                        type: 'error'
+                    });
+                    return false
+                }
+
+                let param = {
+                    token: localStorage.token,
+                    detectorid: this.form.Id,
+                    week: this.form.week,
+                    wechat: this.form.wechat,
+                    appoint: this.form.appoint,
+                };
+                let postdata = qs.stringify(param);
+                testSelect(postdata).then(res => {
+                    let json = res;
+                    if (json.Code == 0) {
+                        that.$message({
+                            showClose: true,
+                            message: this.form.name + '已发布!',
+                            type: 'success'
+                        });
+                        // 重载列表
+                        that.getTableQuery();
+                        this.dialogVisible = false;
+                    } else {
+                        that.$message.error(json.Memo);
+                    }
+                });
+            },
+            // 取消发布
+            unpubilc(row) {
+                let that = this;
+                let param = {
+                    token: localStorage.token,
+                    detectorid: row.Id,
+                    status: 4,//0禁用1启用9删除
+                };
+                let postdata = qs.stringify(param);
+                testSelect(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);
+                    }
+                });
+            },
+            // 编辑课程表模板
+            goEdit(row) {
+                this.$router.push({
+                    path: '/editLessonTable', query: {
+                        id: row.id
+                    }
+                });
+            },
+            handleSelectionChange(val) {
+                this.multipleSelection = val;
+            },
+            // 查询按钮
+            query() {
+                // this.getTableQuery();
+                this.$message.success('查询完毕');
+            },
+            // 页面数据查询
+            getTableQuery() {
+                let that = this;
+                // this.getGetChildRegionSelect(0, 1);
+                that.loading = true;
+                // 查询检测设备。上级区域id,区域id必传。regionid传0,查询supregionid对应所有子区域的检测设备。 如果supregionid,regionid都传0,默认查询企业ID下所有检测设备
+                let param = {
+                    token: localStorage.token,
+                    start: 1,//
+                    tableMax: 9999,//
+                };
+                let postdata = qs.stringify(param);
+                testTable(postdata).then(res => {
+                    let json = res;
+                    if (json.Code == 0) {
+                        that.loading = false;
+                        if (json.Rs) {
+                            that.allTableData = json.Rs;
+                            that.recordsTotal = json.Rs.length;
+                        } else {
+                            that.allTableData = [];
+                            that.recordsTotal = 0;
+                        }
+
+                        // 设置分页数据
+                        that.setPaginations();
+                    } else {
+                        that.$message.error(json.Memo);
+                    }
+                })
+            },
+            // 设置分页数据
+            setPaginations() {
+                // 分页属性
+                let that = this;
+                that.pageination.total = that.recordsTotal;
+                // 默认分页
+                that.tableData = that.allTableData.filter((item, index) => {
+                    return index < that.pageination.pageItem;
+                });
+            },
+            // 每页显示数量
+            handleSizeChange() {
+                let that = this;
+                that.tableData = that.allTableData.filter((item, index) => {
+                    return index < that.pageination.pageItem;
+                });
+                that.draw = that.pageination.pageItem;
+                that.getTableQuery();
+            },
+            // 翻页
+            pageChange(pageIndex) {
+                let that = this;
+                // 获取当前页
+                let index = that.pageination.pageItem * (pageIndex - 1);
+                // 数据总数
+                let nums = that.pageination.pageItem * pageIndex;
+                // 容器
+                let tables = [];
+                for (var i = index; i < nums; i++) {
+                    if (that.allTableData[i]) {
+                        tables.push(that.allTableData[i])
+                    }
+                    this.tableData = tables;
+                }
+                that.start = index * that.draw;
+                that.getTableQuery();
+            },
+            // 自动排序
+            sortChange(params) {
+                console.log(params)
+            },
+            // 过滤时间
+            filterFmtDate(value, row, column) {
+                let that = this;
+                return globalfmtDate(column, 11);
+            },
+            // 过滤金额
+            filterMoney(value, row, column) {
+                let that = this;
+                return parseFloat(column).toFixed(2);
+            },
+        },
+    }
+</script>
+
+<style scoped>
+    @import "../assets/css/panel.css";
+
+    .context {
+        overflow: hidden;
+        display: block;
+        margin: 0 auto;
+        background-color: #fff !important;
+        padding: 30px;
+    }
+
+    .panel-body {
+        padding: 20px;
+        background: #F0F2F5;
+    }
+
+    .change {
+        width: 100%;
+        overflow: hidden;
+        display: block;
+        margin: 0 auto;
+        padding-top: 10px;
+        padding-bottom: 10px;
+    }
+
+    .change button {
+        float: left;
+    }
+
+    .change button.pull-right {
+        float: right;
+    }
+
+    .dialogTitle {
+        width: 100%;
+        overflow: hidden;
+        display: block;
+        margin: 0 auto;
+        color: #000000;
+        font-size: 18px;
+        text-align: center;
+    }
+
+    .dialogTitle span {
+        width: 169px;
+        height: 40px;
+        line-height: 40px;
+        text-align: center;
+        color: #fff;
+        background: #3799FF;
+        border-radius: 250px;
+        font-size: 18px;
+        overflow: hidden;
+        display: block;
+        margin: 0 auto;
+        margin-bottom: 30px;
+    }
+
+    .dialogTitle em {
+        float: none;
+        font-style: normal;
+        color: #3799FF;
+        margin: 0;
+    }
+
+    /deep/ .el-transfer-panel__item .el-checkbox__input {
+        left: 40px;
+    }
+
+    .dialogFooter {
+        width: 90%;
+        overflow: hidden;
+        display: block;
+        margin: 0 auto;
+        margin-top: 10px;
+    }
+
+    .dialogFooter button {
+        float: right;
+        margin-left: 10px;
+    }
+
+    .link {
+        color: #03B1FF;
+        text-decoration: underline;
+    }
+    .readyTime {
+        width: 90%;
+        overflow: hidden;
+        display: block;
+        margin: 0 auto;
+        border: 1px solid #FFC769;
+        border-radius: 4px;
+        background: #FFF0D6;
+    }
+    .CurTime {
+        width: 90%;
+        overflow: hidden;
+        display: block;
+        margin: 0 auto;
+        border: 1px solid #3799FF;
+        border-radius: 4px;
+        background: #D9ECFF;
+        padding: 3px 6px;
+    }
+    .runTime {
+        width: 90%;
+        overflow: hidden;
+        display: block;
+        margin: 0 auto;
+        border: 1px solid #3799FF;
+        border-radius: 4px;
+        background: #D9ECFF;
+        padding: 3px 6px;
+    }
+    .curIcon {
+        position: relative;
+        left: 13px;
+        top: -30px;
+        width: 24px;
+        height: 24px;
+        float: left;
+        background: url("../assets/img/lessonTable/star.png")top center no-repeat;
+        background-size: 100% 100%;
+
+    }
+</style>

+ 2 - 2
pc/vue.config.js

@@ -3,7 +3,7 @@ module.exports = {
     devServer: {
         proxy: {
             '/api': {
-                target: 'http://192.168.0.162:19080/',
+                target: 'http://192.168.0.162:19095/',
                 changeOrigin: true,
                 pathRewrite: {
                     '^/api': '',
@@ -12,5 +12,5 @@ module.exports = {
         }
     },
     // 输出文件目录
-    outputDir: 'D:/wwwroot/test/new_back/static_pc',
+    outputDir: 'D:/wwwroot/flyLongStaticPc/build',
 };