zhengwei 4 лет назад
Родитель
Сommit
fb1cfa81a9
50 измененных файлов с 3633 добавлено и 4563 удалено
  1. 20 21
      src/Global.js
  2. 131 140
      src/Mock/index.js
  3. 14 24
      src/api/Navs.js
  4. 50 140
      src/components/Headside.vue
  5. 65 10
      src/components/Navside.vue
  6. 0 332
      src/grpc/base.proto
  7. 1 1
      src/grpc/readme.md
  8. 252 218
      src/router/index.js
  9. 0 0
      src/views/AdminManage/AdminShopSetting.vue
  10. 3 3
      src/views/AdminManage/AdminUserManage.vue
  11. 3 3
      src/views/AdminManage/MemberCross.vue
  12. 1167 0
      src/views/Appointment/AppointManage.vue
  13. 585 0
      src/views/Appointment/AppointRecord.vue
  14. 0 11
      src/views/Auth/Login.vue
  15. 3 3
      src/views/Class/ClassEdit.vue
  16. 2 2
      src/views/Class/ClassFinishDetail.vue
  17. 397 0
      src/views/Class/ClassFinishManage.vue
  18. 6 6
      src/views/Class/ClassHistory.vue
  19. 837 0
      src/views/Class/ClassManage.vue
  20. 1 1
      src/views/Class/ClassOnLine.vue
  21. 7 7
      src/views/Class/LessonManage.vue
  22. 11 4
      src/views/Class/LessonTableManage.vue
  23. 0 1
      src/views/Class/LessonTableManageEdit.vue
  24. 0 0
      src/views/Class/LessonTableTemplateEdit.vue
  25. 0 0
      src/views/Class/VideoClass.vue
  26. 2 2
      src/views/Class/classInfoDetail.vue
  27. 0 15
      src/views/Class/classPrepare.vue
  28. 0 40
      src/views/Class/grpcDemo.vue
  29. 3 3
      src/views/HrSensor/BindRecord.vue
  30. 2 2
      src/views/HrSensor/DemoDevice.vue
  31. 7 7
      src/views/HrSensor/HrSensor.vue
  32. 3 3
      src/views/HrSensor/HrSensorLog.vue
  33. 6 8
      src/views/HrSensor/HrSensorPrivate.vue
  34. 1 1
      src/views/Index/Index.vue
  35. 3 3
      src/views/Member/MemberCost.vue
  36. 3 3
      src/views/Member/MemberFull.vue
  37. 3 3
      src/views/Member/MemberTemporary.vue
  38. 3 3
      src/views/Member/RelevancePhone.vue
  39. 0 1688
      src/views/Order/appoint.vue
  40. 0 552
      src/views/Other/record.vue
  41. 3 3
      src/views/Report/ClassHourStatistics.vue
  42. 3 3
      src/views/Report/CoachHourStatistics.vue
  43. 0 861
      src/views/SchoolTimeTable/courses.vue
  44. 0 400
      src/views/SchoolTimeTable/finish.vue
  45. 11 11
      src/views/SystemManage/AdminShopSetting.vue
  46. 10 10
      src/views/SystemManage/CoachManage.vue
  47. 2 2
      src/views/SystemManage/OperateLog.vue
  48. 2 2
      src/views/SystemManage/ShopDevice.vue
  49. 11 11
      src/views/SystemManage/ShopRegion.vue
  50. 0 0
      src/views/SystemManage/ShopSetting.vue

+ 20 - 21
src/Global.js

@@ -117,8 +117,8 @@ getDate = function (mDate, mYear, mMonth, mDay) {
     let month = date.getMonth() + 1 + mMonth;
     let day = date.getDate() + mDay;
     let hh = new Date().getHours();
-    let mf = new Date().getMinutes()<10 ? '0'+new Date().getMinutes() : new Date().getMinutes();
-    let ss = new Date().getSeconds()<10 ? '0'+new Date().getSeconds() : new Date().getSeconds();
+    let mf = new Date().getMinutes() < 10 ? '0' + new Date().getMinutes() : new Date().getMinutes();
+    let ss = new Date().getSeconds() < 10 ? '0' + new Date().getSeconds() : new Date().getSeconds();
 
     //处理'日'越界
     if (day < 1) {
@@ -139,7 +139,7 @@ getDate = function (mDate, mYear, mMonth, mDay) {
     }
     if (month > 12) {
         year++;
-        month -=12;
+        month -= 12;
     }
 
     //10以下的月数和天数拼接0
@@ -212,21 +212,20 @@ getNowDate = function () {
 
 globalcurrentWeek = function () {
     let weeks = new Date().getDay();
-    let d = new Date().getDate();
     return getNowDate() + ' ' + numberToWeekdays(weeks) + ' 第' + getWeekOfYear() + '周';
 }
 
-getWeekOfYear = function () {
-    var today = new Date();
-    var firstDay = new Date(today.getFullYear(), 0, 1);
-    var dayOfWeek = firstDay.getDay();
-    var spendDay = 1;
+getWeekOfYear = function (date) {
+    let today = new Date(date);
+    let firstDay = new Date(today.getFullYear(), 0, 1);
+    let dayOfWeek = firstDay.getDay();
+    let spendDay = 1;
     if (dayOfWeek != 0) {
         spendDay = 7 - dayOfWeek + 1;
     }
     firstDay = new Date(today.getFullYear(), 0, 1 + spendDay);
-    var d = Math.ceil((today.valueOf() - firstDay.valueOf()) / 86400000);
-    var result = Math.ceil(d / 7);
+    let d = Math.ceil((today.valueOf() - firstDay.valueOf()) / 86400000);
+    let result = Math.ceil(d / 7);
     return result + 1;
 };
 
@@ -334,10 +333,10 @@ turnResToOptionBySimViper = function (data) {
     if (!data) return false;
     let ids = data.map(item => {
         return {
-            label: item.Name + ' ' + item.Usercode,
-            key: parseInt(item.Id),
-            value: parseInt(item.Id),
-            RemainHour: parseInt(item.RemainHour),
+            label: item.user_name + ' ' + item.usercode,
+            key: item.uu_user_id,
+            value: item.uu_user_id,
+            RemainHour: item.remain_hour,
         }
     });
     return ids
@@ -410,11 +409,11 @@ turnStdToOption = function (data) {
     if (!data) return false
     let ids = data.map(item => {
         return {
-            label: item.ClassName + '(' + item.BeginStr + '-' + item.EndStr + ')',
-            key: parseInt(item.StdId),
-            value: parseInt(item.StdId),
-            classId: parseInt(item.ClassId),
-            ConsumeHour: item.ConsumeHour
+            label: item.class_name + '(' + item.begin_str + '-' + item.end_str + ')',
+            key: parseInt(item.std_id),
+            value: item.uu_std_id,
+            classId: parseInt(item.class_id),
+            ConsumeHour: item.consume_hour
         }
     })
     return ids
@@ -465,7 +464,7 @@ getyearOptions = function (val) {
     let res = [];
     let item = {};
     let curYear = new Date().getFullYear();
-    for (var i = 0; i < num; i++) {
+    for (let i = 0; i < num; i++) {
         item[i] = {
             value: curYear - i, label: curYear - i + '年'
         }

+ 131 - 140
src/Mock/index.js

@@ -5,7 +5,7 @@ let Random = Mock.Random;
 // worldDetail
 let worldDetail = function () {
     let item = [];
-    for (var i = 0; i < 30; i++) {
+    for (let i = 0; i < 30; i++) {
         item.push({
             "id": "@guid",
             "name": "@region",
@@ -32,7 +32,7 @@ let testTable = function () {
         {id: 3, name: '成龙', userCode: '15253135604', vipType: 1},
     ]
 
-    for (var i = 0; i < 6; i++) {
+    for (let i = 0; i < 6; i++) {
         item.push({
             "id": "@guid",
             "userCode": "@integer(15253135600, 15253135699)",
@@ -75,7 +75,7 @@ let testTableLong = function () {
         {id: 3, name: '成龙', userCode: '15253135604', vipType: 1},
     ]
 
-    for (var i = 0; i < 70; i++) {
+    for (let i = 0; i < 70; i++) {
         item.push({
             "id": "@guid",
             "userCode": "@integer(15253135600, 15253135699)",
@@ -111,7 +111,7 @@ let testTableLong = function () {
 
 let testSelect = function () {
     let item = [];
-    for (var i = 0; i < 30; i++) {
+    for (let i = 0; i < 30; i++) {
         item.push({
             "key": i + 1,
             "value": i + 1,
@@ -164,6 +164,7 @@ let logout = function () {
     return res;
 };
 
+//控制页面左边导航栏显示
 let getNavListQuery = function () {
     let res = {
         Code: 0,
@@ -185,256 +186,246 @@ let getNavListQuery = function () {
                         clmurl: "/",
                     },
                 ]
-            }, {
+            },{
                 clmid: "2",
+                clmurl: "/",
                 clmcode: "member",
                 clmname: "会员管理",
-                clmurl: "/",
                 prname: "",
                 show: 3,
-                icon: "el-icon-house",
+                icon: "el-icon-s-custom",
                 Childs: [
                     {
-                        clmid: "/member",
-                        clmcode: "member",
-                        clmname: "正式会员",
-                        clmurl: "/member",
+                        clmid: "/memberFull",
+                        clmcode: "memberFull",
+                        clmurl: "/memberFull",
+                        clmname: "正式会员1",
                     }, {
-                        clmid: "/tempMember",
-                        clmcode: "tempMember",
+                        clmid: "/memberTemporary",
+                        clmcode: "memberTemporary",
+                        clmurl: "/memberTemporary",
                         clmname: "临时会员",
-                        clmurl: "/tempMember",
                     }, {
-                        clmid: "/record",
-                        clmcode: "record",
-                        clmname: "消费记录",
-                        clmurl: "/record",
+                        clmid: "/memberCost",
+                        clmcode: "memberCost",
+                        clmurl: "/memberCost",
+                        clmname: "会员消费",
                     }
                 ]
-            }, {
+            },  {
                 clmid: "3",
-                clmcode: "member",
-                clmname: "课程管理",
                 clmurl: "/",
+                clmcode: "lesson",
+                clmname: "课程管理",
                 prname: "",
                 show: 3,
-                icon: "el-icon-house",
+                icon: "el-icon-school",
                 Childs: [
                     {
-                        clmid: "/lesson",
-                        clmcode: "lesson",
+                        clmid: "/classManage",
+                        clmcode: "classManage",
+                        clmurl: "/classManage",
+                        clmname: "上课管理",
+                    },  {
+                        clmid: "/lessonManage",
+                        clmcode: "lessonManage",
+                        clmurl: "/lessonManage",
                         clmname: "课目管理",
-                        clmurl: "/lesson",
                     }, {
                         clmid: "/lessonTableTemplate",
                         clmcode: "lessonTableTemplate",
-                        clmname: "课程表模板",
                         clmurl: "/lessonTableTemplate",
+                        clmname: "课程表模板",
                     }, {
                         clmid: "/lessonTableManage",
                         clmcode: "lessonTableManage",
-                        clmname: "课程表管理",
                         clmurl: "/lessonTableManage",
+                        clmname: "课程表管理",
                     }, {
-                        clmid: "/record",
-                        clmcode: "record",
+                        clmid: "/appointManage",
+                        clmcode: "appointManage",
+                        clmurl: "/appointManage",
                         clmname: "预约管理",
-                        clmurl: "/record",
                     }, {
-                        clmid: "/record",
-                        clmcode: "record",
+                        clmid: "/appointRecord",
+                        clmcode: "appointRecord",
+                        clmurl: "/appointRecord",
                         clmname: "预约记录",
-                        clmurl: "/record",
                     }, {
-                        clmid: "/record",
-                        clmcode: "record",
-                        clmname: "上课管理",
-                        clmurl: "/record",
-                    }, {
-                        clmid: "/record",
-                        clmcode: "record",
-                        clmname: "在线上课",
-                        clmurl: "/record",
-                    }, {
-                        clmid: "/videoClass",
-                        clmcode: "videoClass",
+                        clmid: "/classInVideo",
+                        clmcode: "classInVideo",
+                        clmurl: "/classInVideo",
                         clmname: "视频上课",
-                        clmurl: "/videoClass",
-                    }, {
-                        clmid: "/grpcDemo",
-                        clmcode: "grpcDemo",
-                        clmname: "grpcDemo",
-                        clmurl: "/grpcDemo",
                     }
                 ]
             }, {
                 clmid: "4",
-                clmcode: "member",
-                clmname: "运动评估",
                 clmurl: "/",
+                clmcode: "assessment",
+                clmname: "运动评估",
                 prname: "",
                 show: 3,
-                icon: "el-icon-house",
+                icon: "el-icon-edit",
                 Childs: [
                     {
-                        clmid: "/member",
-                        clmcode: "member",
+                        clmid: "/movementManage",
+                        clmcode: "movementManage",
+                        clmurl: "/movementManage",
                         clmname: "动作管理",
-                        clmurl: "/member",
                     }, {
-                        clmid: "/tempMember",
-                        clmcode: "tempMember",
+                        clmid: "/nodeMange",
+                        clmcode: "nodeMange",
+                        clmurl: "/nodeMange",
                         clmname: "节点管理",
-                        clmurl: "/tempMember",
                     }, {
-                        clmid: "/record",
-                        clmcode: "record",
+                        clmid: "/actionNode",
+                        clmcode: "actionNode",
+                        clmurl: "/actionNode",
                         clmname: "动作节点",
-                        clmurl: "/record",
                     }, {
-                        clmid: "/record",
-                        clmcode: "record",
+                        clmid: "/actionKeyFrame",
+                        clmcode: "actionKeyFrame",
+                        clmurl: "/actionKeyFrame",
                         clmname: "动作关键帧",
-                        clmurl: "/record",
                     }, {
-                        clmid: "/record",
-                        clmcode: "record",
+                        clmid: "/lessonAction",
+                        clmcode: "lessonAction",
+                        clmurl: "/lessonAction",
                         clmname: "课程动作",
-                        clmurl: "/record",
                     }, {
-                        clmid: "/record",
-                        clmcode: "record",
+                        clmid: "/movementScore",
+                        clmcode: "movementScore",
+                        clmurl: "/movementScore",
                         clmname: "动作评分",
-                        clmurl: "/record",
                     }
                 ]
             }, {
                 clmid: "5",
-                clmcode: "member",
-                clmname: "心率管理",
                 clmurl: "/",
+                clmcode: "heartRate",
+                clmname: "心率管理",
                 prname: "",
                 show: 3,
-                icon: "el-icon-house",
+                icon: "el-icon-more",
                 Childs: [
                     {
-                        clmid: "/member",
-                        clmcode: "member",
+                        clmid: "/hrSensor",
+                        clmcode: "hrSensor",
+                        clmurl: "/hrSensor",
                         clmname: "心率设备",
-                        clmurl: "/member",
                     }, {
-                        clmid: "/tempMember",
-                        clmcode: "tempMember",
+                        clmid: "/hrSensorLog",
+                        clmcode: "hrSensorLog",
+                        clmurl: "/hrSensorLog",
                         clmname: "心率记录",
-                        clmurl: "/tempMember",
                     }, {
-                        clmid: "/record",
-                        clmcode: "record",
+                        clmid: "/demoDevice",
+                        clmcode: "demoDevice",
+                        clmurl: "/demoDevice",
                         clmname: "演示设备",
-                        clmurl: "/record",
                     }
                 ]
             }, {
                 clmid: "6",
-                clmcode: "member",
-                clmname: "报表统计",
                 clmurl: "/",
+                clmcode: "report",
+                clmname: "报表统计",
                 prname: "",
                 show: 3,
-                icon: "el-icon-house",
+                icon: "el-icon-s-data",
                 Childs: [
                     {
-                        clmid: "/member",
-                        clmcode: "member",
-                        clmname: "课程统计",
-                        clmurl: "/member",
+                        clmid: "/classHourStatistics",
+                        clmcode: "classHourStatistics",
+                        clmurl: "/classHourStatistics",
+                        clmname: "课时统计",
                     }, {
-                        clmid: "/tempMember",
-                        clmcode: "tempMember",
+                        clmid: "/memberStatistics",
+                        clmcode: "memberStatistics",
+                        clmurl: "/memberStatistics",
                         clmname: "会员统计",
-                        clmurl: "/tempMember",
                     }, {
-                        clmid: "/record",
-                        clmcode: "record",
+                        clmid: "/appointStatistics",
+                        clmcode: "appointStatistics",
+                        clmurl: "/appointStatistics",
                         clmname: "预约统计",
-                        clmurl: "/record",
                     }, {
-                        clmid: "/record",
-                        clmcode: "record",
+                        clmid: "/coachHourStatistics",
+                        clmcode: "coachHourStatistics",
+                        clmurl: "/coachHourStatistics",
                         clmname: "教练课时统计",
-                        clmurl: "/record",
                     }
                 ]
             }, {
                 clmid: "7",
-                clmcode: "member",
-                clmname: "系统管理",
                 clmurl: "/",
+                clmcode: "system",
+                clmname: "系统管理",
                 prname: "",
                 show: 3,
-                icon: "el-icon-house",
+                icon: "el-icon-s-tools",
                 Childs: [
                     {
-                        clmid: "/member",
-                        clmcode: "member",
+                        clmid: "/operateLog",
+                        clmcode: "operateLog",
+                        clmurl: "/operateLog",
                         clmname: "操作日志",
-                        clmurl: "/member",
                     }, {
-                        clmid: "/tempMember",
-                        clmcode: "tempMember",
-                        clmname: "个人信息",
-                        clmurl: "/tempMember",
+                        clmid: "/personSetting",
+                        clmcode: "personSetting",
+                        clmurl: "/personSetting",
+                        clmname: "个人设置",
                     }, {
-                        clmid: "/record",
-                        clmcode: "record",
-                        clmname: "商家信息",
-                        clmurl: "/record",
+                        clmid: "/shopSetting",
+                        clmcode: "shopSetting",
+                        clmurl: "/shopSetting",
+                        clmname: "商家设置",
                     }, {
-                        clmid: "/record",
-                        clmcode: "record",
+                        clmid: "/shopAres",
+                        clmcode: "shopAres",
+                        clmurl: "/shopAres",
                         clmname: "商家区域",
-                        clmurl: "/record",
                     }, {
-                        clmid: "/record",
-                        clmcode: "record",
-                        clmname: "商家设施",
-                        clmurl: "/record",
+                        clmid: "/shopDevice",
+                        clmcode: "shopDevice",
+                        clmurl: "/shopDevice",
+                        clmname: "商家设备",
                     }
                 ]
             }, {
                 clmid: "8",
-                clmcode: "member",
-                clmname: "总店管理",
                 clmurl: "/",
+                clmcode: "admin",
+                clmname: "总店管理",
                 prname: "",
                 show: 3,
-                icon: "el-icon-house",
+                icon: "el-icon-office-building",
                 Childs: [
                     {
-                        clmid: "/member",
-                        clmcode: "member",
+                        clmid: "/adminShopSetting",
+                        clmcode: "adminShopSetting",
+                        clmurl: "/adminShopSetting",
                         clmname: "商家设置",
-                        clmurl: "/member",
                     }, {
-                        clmid: "/tempMember",
-                        clmcode: "tempMember",
+                        clmid: "/administrator",
+                        clmcode: "administrator",
+                        clmurl: "/administrator",
                         clmname: "管理员管理",
-                        clmurl: "/tempMember",
                     }, {
-                        clmid: "/record",
-                        clmcode: "record",
+                        clmid: "/memberCross",
+                        clmcode: "memberCross",
+                        clmurl: "/memberCross",
                         clmname: "跨店会员",
-                        clmurl: "/record",
                     }, {
-                        clmid: "/record",
-                        clmcode: "record",
+                        clmid: "/adminShopArea",
+                        clmcode: "adminShopArea",
+                        clmurl: "/adminShopArea",
                         clmname: "商家区域",
-                        clmurl: "/record",
                     }, {
-                        clmid: "/record",
-                        clmcode: "record",
+                        clmid: "/groupManage",
+                        clmcode: "groupManage",
+                        clmurl: "/groupManage",
                         clmname: "分组管理",
-                        clmurl: "/record",
                     }
                 ]
             },
@@ -443,7 +434,7 @@ let getNavListQuery = function () {
     return res;
 }
 
-var mockState = 1;
+let mockState = 1;
 if (mockState == 1) {
     Mock.mock('/api/testSelect', 'post', testSelect());
     Mock.mock('/api/testTable', 'post', testTable());

+ 14 - 24
src/api/Navs.js

@@ -12,9 +12,9 @@ let navs = [
 	},
 	{
 		clmid: "2",
-		clmcode: "member",
+		clmcode: "Member",
 		clmname: "会员管理",
-		clmurl: "/member",
+		clmurl: "/Member",
 		prname: "",
 		show: 3,
 		grouplist: "2,5",
@@ -82,9 +82,9 @@ let navs = [
 	},
 	{
 		clmid: "9",
-		clmcode: "appoint",
+		clmcode: "appointManage",
 		clmname: "预约管理",
-		clmurl: "/appoint",
+		clmurl: "/appointManage",
 		prname: "",
 		show: 3,
 		grouplist: "2,5",
@@ -102,9 +102,9 @@ let navs = [
 	},
 	{
 		clmid: "11",
-		clmcode: "cost",
+		clmcode: "memberCost",
 		clmname: "消费记录",
-		clmurl: "/cost",
+		clmurl: "/memberCost",
 		prname: "",
 		show: 3,
 		grouplist: "2,5",
@@ -120,16 +120,6 @@ let navs = [
 		grouplist: "2,5",
 		icon: "el-icon-data-analysis",
 	},
-	// {
-	//     "clmid": "10",
-	//     "clmcode": "finish",
-	//     "clmname": "下课管理",
-	//     "clmurl": "/finish",
-	//     "prname": "",
-	//     "show": 3,
-	//     "grouplist": "2,5",
-	//     "icon": "el-icon-bell",
-	// },
 	{
 		clmid: "13",
 		clmcode: "heartEquip",
@@ -252,9 +242,9 @@ let navs = [
 	},
 	{
 		clmid: "23",
-		clmcode: "member",
+		clmcode: "Member",
 		clmname: "会员管理",
-		clmurl: "/member",
+		clmurl: "/Member",
 		prname: "",
 		show: 4,
 		grouplist: "2,5",
@@ -292,9 +282,9 @@ let navs = [
 	},
 	{
 		clmid: "27",
-		clmcode: "appoint",
+		clmcode: "appointManage",
 		clmname: "预约管理",
-		clmurl: "/appoint",
+		clmurl: "/appointManage",
 		prname: "",
 		show: 4,
 		grouplist: "2,5",
@@ -312,9 +302,9 @@ let navs = [
 	},
 	{
 		clmid: "29",
-		clmcode: "cost",
+		clmcode: "memberCost",
 		clmname: "消费记录",
-		clmurl: "/cost",
+		clmurl: "/memberCost",
 		prname: "",
 		show: 4,
 		grouplist: "2,5",
@@ -323,9 +313,9 @@ let navs = [
 
 	{
 		clmid: "30",
-		clmcode: "courses",
+		clmcode: "classCurrent",
 		clmname: "课程管理",
-		clmurl: "/courses",
+		clmurl: "/classCurrent",
 		prname: "",
 		show: 4,
 		grouplist: "2,5",

+ 50 - 140
src/components/Headside.vue

@@ -2,7 +2,7 @@
   <div id="headside">
     <nav class="navbar user-info-navbar" role="navigation">
       <i :class="[{ 'el-icon-s-unfold left_hide_icon': left_panel_state }, { 'el-icon-s-fold left_show_icon': !left_panel_state }]"
-          @click="left_hide"
+         @click="left_hide"
       />
       <span class="title">
 				场馆管理系统
@@ -37,7 +37,10 @@
 <script>
 import axios from "axios";
 import Global from "../Global.js";
-import {SignOut, ManagerSelfQuery, ShopListQuery} from "../api/getApiRes.js";
+import {
+  DefaultRequest,
+  DefaultReply
+} from "@/grpc/base_pb";
 
 let qs = require("qs");
 export default {
@@ -46,21 +49,13 @@ export default {
       user: {
         name: '',
       },
-      time: "8:30-17:30",
-      tel: "0000-0079-000",
-      qq: "0000079000",
-      newnum: "",
-      newnumState: false,
       left_panel_state: true,
-      screen_full: false,
       ShopName: localStorage.shopName,
-      userLevelText: "",
-      current: globalcurrentWeek(),
       // tabs
       editableTabsValue: '',
       editableTabs: [],
       tabIndex: 2,
-      canChange:0
+      canChange: 0
     };
   },
   props: ['tableTabs'],
@@ -68,7 +63,6 @@ export default {
     tableTabs: {
       handler(newName, oldName) {
         let that = this;
-        console.log('newName', newName);
         that.editableTabs = newName;
       },
       deep: true,
@@ -81,9 +75,15 @@ export default {
     this.user.name = localStorage.userName;
     this.canChange = localStorage.canChange;
     console.log(localStorage.canChange);
-    // this.getManagerSelfQuery();// TODO 待重构
   },
   methods: {
+    //隐藏左侧和显示
+    left_hide: function () {
+      let that = this;
+      that.left_panel_state = !that.left_panel_state;
+      this.$emit("lefthide");
+    },
+    //移除顶部菜单标签
     remove(p) {
       let that = this;
       if (p == 1) {
@@ -95,131 +95,7 @@ export default {
         that.$message.error('最后一页咯');
       }
     },
-    //隐藏左侧和显示
-    left_hide: function () {
-      let that = this;
-      that.left_panel_state = !that.left_panel_state;
-      this.$emit("lefthide");
-    },
-    getManagerSelfQuery() {
-      let that = this;
-      let param = {
-        token: localStorage.token,
-      };
-      let postdata = qs.stringify(param);
-      ManagerSelfQuery(postdata).then((res) => {
-        let json = res;
-        if (json.Code == 0) {
-          that.user.name = json.Rs.Name;
-          localStorage.shopId = json.Rs.ShopId;
-          localStorage.userLevel = json.Rs.Role.Id;
-          localStorage.ServiceId = json.Rs.Shop.ServiceId;
-          localStorage.ServiceKey = json.Rs.Shop.ServiceKey;
-
-          that.userLevelText = json.Rs.Role.Name;
-          // 1 会员 2 系统 3 店铺 4 教练
-          switch (parseInt(json.Rs.Role.Id)) {
-            case 1:
-              that.userLevel = 1;
-              break;
-            case 2:
-              that.userLevel = 2;
-              break;
-            case 3:
-              that.userLevel = 3;
-              break;
-            case 4:
-              that.userLevel = 4;
-              break;
-          }
-          localStorage.shopId = json.Rs.ShopId;
-          this.panelSelect(json.Rs.ShopId);
-        } else {
-          if (json.Code == 1010) {
-            that.$message.error(json.Memo + " 错误码:" + json.Code);
-            that.$router.push({path: "/login", query: {status: 1}});
-            return false;
-          } else {
-            that.$message.error(json.Memo + " 错误码:" + json.Code);
-          }
-        }
-      });
-    },
-    // 获取所属店铺
-    panelSelect(ShopId) {
-      let that = this;
-      let param = {
-        token: localStorage.token,
-      };
-      let postdata = qs.stringify(param);
-      ShopListQuery(postdata).then((res) => {
-        let json = res;
-        if (json.Code == 0) {
-          json.Rs.map(function (item) {
-            if (item.ShopID == ShopId) {
-              that.ShopName = item.ShopName;
-            }
-          });
-        } else {
-          that.$message.error(json.Memo + " 错误码:" + json.Code);
-        }
-      });
-    },
-    // 退出登录
-    logoutClick() {
-      let that = this;
-      that
-          .$confirm("此操作将退出当前账号, 是否继续?", "提示", {
-            confirmButtonText: "确定",
-            cancelButtonText: "取消",
-            type: "warning",
-          })
-          .then(() => {
-            let that = this;
-            that.$router.push({path: "/login", query: {status: 10010}});
-            that.$message({
-              showClose: true,
-              message: "当前用户已退出登陆!",
-              type: "success",
-            });
-          })
-          .catch(() => {
-          });
-    },
-    changeShop() {
-      let that = this;
-      that
-          .$confirm("此操作将切换当前店铺, 是否继续?", "提示", {
-            confirmButtonText: "确定",
-            cancelButtonText: "取消",
-            type: "warning",
-          })
-          .then(() => {
-            let that = this;
-            that.$router.push({path: "/login", query: {status: 10011}});
-            let param = {
-              token: localStorage.token,
-            };
-            let postdata = qs.stringify(param);
-            // todo 替换成真实的切换接口
-            SignOut(postdata).then((res) => {
-              let json = res;
-              if (json.Code == 0) {
-                localStorage.clear();
-                // that.$router.push({path: '/login', query: {status: 1}});
-                that.$message({
-                  showClose: true,
-                  message: "当前当前店铺已切换!",
-                  type: "success",
-                });
-              } else {
-                that.$message.error(json.Memo + " 错误码:" + json.Code);
-              }
-            });
-          })
-          .catch(() => {
-          });
-    },
+    //切换顶部菜单
     handleTabsEdit(targetName, action) {
       if (action === 'add') {
         let newTabName = ++this.tabIndex + '';
@@ -247,8 +123,42 @@ export default {
         this.editableTabs = tabs.filter(tab => tab.name !== targetName);
       }
     },
-  },
-  components: {},
+    //切换店铺
+    changeShop() {
+      let that = this;
+      that.$confirm("此操作将切换当前店铺, 是否继续?", "提示", {
+        confirmButtonText: "确定",
+        cancelButtonText: "取消",
+        type: "warning",
+      }).then(() => {
+        let that = this;
+        that.$router.push({path: "/login", query: {status: 10011}});
+      }).catch(() => {
+      });
+    },
+    // 退出登录
+    logoutClick() {
+      let that = this;
+      that.$confirm("此操作将退出当前账号, 是否继续?", "提示", {
+        confirmButtonText: "确定",
+        cancelButtonText: "取消",
+        type: "warning",
+      }).then(() => {
+        let that = this;
+        let paraRequest = new DefaultRequest();
+        console.log(paraRequest);
+        that.client.signOut(paraRequest, {"Token": localStorage.token}, () => {
+          that.$message({
+            showClose: true,
+            message: "当前用户已退出登陆!",
+            type: "success",
+          });
+          localStorage.token = '';
+          that.$router.push({path: "/login", query: {status: 10010}});
+        });
+      });
+    },
+  }
 };
 </script>
 

+ 65 - 10
src/components/Navside.vue

@@ -3,8 +3,8 @@
     <div class="logoContainer">
       <img class="logo" src="../assets/img/nav/logo.png"/>
     </div>
-    <el-menu default-active="1" class="el-menu-vertical-demo" @open="handleOpen" @close="handleClose" router
-             :collapse="isCollapse" @select="selectMenu">
+    <el-menu default-active="1" class="el-menu-vertical-demo" @open="handleOpen"
+             @close="handleClose" router :collapse="isCollapse" @select="selectMenu">
       <el-submenu :index="nav.clmid" v-for="nav in navs">
         <template slot="title">
           <i :class="nav.icon"></i>
@@ -22,7 +22,12 @@ import {
   getNavListQuery
 } from '../api/getApiRes.js'
 
+import {
+  GetShopNaviAllRequest
+} from "@/grpc/base_pb";
+
 let qs = require('qs');
+
 export default {
   data() {
     return {
@@ -46,11 +51,23 @@ export default {
     }
   },
   mounted() {
-    this.userLevelDeafult = this.$route.meta.clmid;
     this.getTableQuery();
   },
   methods: {
+    //展开一级菜单
+    handleOpen(key, keyPath) {
+      console.log('handleOpen', key, keyPath);
+    },
+    //关闭一级菜单
+    handleClose(key, keyPath) {
+      console.log('handleClose', key, keyPath);
+    },
+    //选中二级菜单栏项
     selectMenu(i, t, c) {
+      console.log('selectMenuI', i);
+      console.log('selectMenuT', t);
+      console.log('selectMenuC', c);
+
       // todo 拿不到二级的结果
       let thatNum = parseInt(t[0]);
       let thisNum = parseInt(t[0]) - 1;
@@ -63,17 +80,13 @@ export default {
         clmurl: c.$route.meta.path,
         name: thatNum.toString()
       }
-      console.log('res', res);
+      console.log('selectMenu', res);
       this.$emit('refreshList', res);
     },
-    handleOpen(key, keyPath) {
-      // console.log(key, keyPath);
-    },
-    handleClose(key, keyPath) {
-      // console.log(key, keyPath);
-    },
+    //查询生成菜单栏
     getTableQuery() {
       let that = this;
+
       let param = {
         token: localStorage.token,
       };
@@ -85,6 +98,48 @@ export default {
           that.navs = json.Rs;
         }
       })
+      return;
+
+      let paraRequest = new GetShopNaviAllRequest();
+      paraRequest.setShopid(localStorage.shopId);
+      console.log(localStorage.token);
+      that.client.getShopNaviAll(paraRequest, {"Token": localStorage.token}, (err, GetShopNaviAllReply) => {
+        if (err == null) {
+          let res = JSON.parse(GetShopNaviAllReply.getColumnrs());
+          console.log(res);
+          let naviJson = [];
+          res.forEach((parentItem, i) => {
+
+            let parentList = {};
+            parentList.clmid = parentItem.Sn;
+            parentList.clmurl = parentItem.Url;
+            parentList.clmcode = parentItem.Code;
+            parentList.clmname = parentItem.Name;
+            parentList.prname = "";
+            parentList.show = parentItem.NavShow;
+            parentList.icon = parentItem.Icon;
+            if (parentItem.Second.length > 0) {
+              parentList.Childs = [];
+              parentItem.Second.forEach((secondItem, j) => {
+                let childList = [];
+                childList.clmid = secondItem.Url
+                childList.clmcode = "/" + secondItem.Code
+                childList.clmurl = secondItem.Url
+                childList.clmname = secondItem.Name
+
+                parentList.Childs.push(childList);
+              })
+            }
+            naviJson.push(parentList);
+          })
+          console.log(naviJson);
+          that.navs = naviJson;
+        } else {
+          let res = err;
+          that.$message.error(res.message + ',错误代码:' + res.code);
+          console.log(res);
+        }
+      });
     },
   }
 }

+ 0 - 332
src/grpc/base.proto

@@ -1,332 +0,0 @@
-syntax = "proto3";
-
-option go_package = ".;base";
-
-package base;
-
-enum ErrorCode{
-  OK = 0;
-  PGErr = 100;
-  PmsnError = 110;
-  J2MError = 120;
-  WebStatusError = 121;
-  WebToImStatusError = 122;
-  ImToWebtatusError = 123;
-  PARAM = 150;
-  Token = 200;
-  VerifyCode = 201;
-  PasswordWrongTooMuch = 202;
-}
-
-// metadata 中需要字段 tokefrgen n 用作登录验证
-service Api {
-  rpc SignUp (SignUpRequest) returns (DefaultReply) {}
-  rpc SignIn (SignInRequest) returns (SignInReply)  {}
-  // rpc SignInWithPhone (SignInRequest) returns (SignInReply)  {} // 缺少短信验证码接口
-  rpc SignOut (DefaultRequest) returns (DefaultReply)  {}
-  rpc GenVerifyImage (GenVerifyImageRequest) returns (GenVerifyImageReply)  {}
-
-  // 下拉框接口
-  rpc SelectHrSensors (StandardRequest) returns (StandardReply)  {}
-  rpc AcrossUserSimpleQuery (StandardRequest) returns (StandardReply)  {}
-  rpc VipUserSimpleQuery (StandardRequest) returns (StandardReply)  {}
-  rpc TempVipUserSimpleQuery (StandardRequest) returns (StandardReply)  {}
-  rpc ShopSimpleQuery (StandardRequest) returns (StandardReply)  {}
-  rpc ManageableSimpleQuery (StandardRequest) returns (StandardReply)  {}
-  rpc ClassSimpleQuery (StandardRequest) returns (StandardReply)  {}
-  rpc ScreenSimpleQuery (StandardRequest) returns (StandardReply)  {}
-
-  // 商家信息管理
-  rpc ManageableShopList (ShopListRequest) returns (ShopListReply) {}
-  rpc ManageableGetShopInfo (ShopDetailRequest) returns (ShopInfo) {}
-  rpc ShopLicenseList (ShopDetailRequest) returns (LicenseList) {}
-  rpc ShopLicenseTypeMap (IdList) returns (LicenseTypeMapReply)  {}
-  rpc GetShopNavi (GetShopNaviRequest) returns (GetShopNaviReply) {}
-  rpc ShopGroupQuery (StandardRequest) returns (StandardReply) {}
-  rpc ShopGroupAdd (StandardRequest) returns (StandardReply) {}
-  rpc ShopGroupEdit (StandardRequest) returns (StandardReply) {}
-  rpc ShopGroupStatusEdit (StandardRequest) returns (StandardReply) {}
-  rpc ShopGroupDetailsQuery (StandardRequest) returns (StandardReply) {}
-  rpc ShopGroupDetailsAdd (StandardRequest) returns (StandardReply) {}
-  rpc ShopVenueQuery (StandardRequest) returns (StandardReply) {}
-  rpc ShopVenueAdd (StandardRequest) returns (StandardReply) {}
-  rpc ShopVenueEdit (StandardRequest) returns (StandardReply) {}
-  rpc ShopVenueStatusEdit (StandardRequest) returns (StandardReply) {}
-  rpc ShopVenueEquipQuery (StandardRequest) returns (StandardReply) {}
-  rpc ShopVenueEquipAdd (StandardRequest) returns (StandardReply) {}
-  rpc ShopVenueEquipEdit (StandardRequest) returns (StandardReply) {}
-  rpc ShopVenueEquipStatusEdit (StandardRequest) returns (StandardReply) {}
-  rpc ShopVenueEquipStatusDel (StandardRequest) returns (StandardReply) {}
-  rpc ShopManagerQuery (StandardRequest) returns (StandardReply) {}
-  rpc ShopManagerAdd (StandardRequest) returns (StandardReply) {}
-  rpc ShopManagerEdit (StandardRequest) returns (StandardReply) {}
-  rpc ShopManagerStatusEdit (StandardRequest) returns (StandardReply) {}
-  rpc ShopConfigQuery (StandardRequest) returns (StandardReply) {}
-  rpc ShopConfigEdit (StandardRequest) returns (StandardReply) {}
-  // 商家会员管理
-  rpc ShopVipUserQuery (StandardRequest) returns (StandardReply) {}
-  rpc ShopVipUserAdd (StandardRequest) returns (StandardReply) {}
-  rpc ShopVipUserEdit (StandardRequest) returns (StandardReply) {}
-  rpc ShopVipUserStatusEdit (StandardRequest) returns (StandardReply) {}
-  rpc AcrossVipUserQuery (StandardRequest) returns (StandardReply) {}
-  rpc AcrossVipUserAdd (StandardRequest) returns (StandardReply) {}
-  rpc AcrossVipUserDel (StandardRequest) returns (StandardReply) {}
-  rpc VipPhoneQuery (StandardRequest) returns (StandardReply) {}
-  rpc VipMainPhoneCheck (StandardRequest) returns (StandardReply) {}
-  rpc VipOtherPhoneAdd (StandardRequest) returns (StandardReply) {}
-  rpc VipOtherPhoneEdit (StandardRequest) returns (StandardReply) {}
-  rpc VipOtherPhoneStatusEdit (StandardRequest) returns (StandardReply) {}
-  rpc TempVipUserQuery (StandardRequest) returns (StandardReply) {}
-  rpc TempVipUserAdd (StandardRequest) returns (StandardReply) {}
-  rpc TempVipUserEdit (StandardRequest) returns (StandardReply) {}
-  rpc TempVipUserStatusEdit (StandardRequest) returns (StandardReply) {}
-  rpc VipHourEdit (StandardRequest) returns (StandardReply) {}
-  rpc VipConsumeListQuery (StandardRequest) returns (StandardReply) {}
-  rpc VipConsumeDetailQuery (StandardRequest) returns (StandardReply) {}
-  rpc VipClassRelationEdit (StandardRequest) returns (StandardReply) {}
-  rpc VipHourChgQuery (StandardRequest) returns (StandardReply) {}
-  rpc VipUserClassQuery (StandardRequest) returns (StandardReply) {}
-  rpc GetOverlayImgQiNiuToken (GetOverlayImgRequest) returns (QiNiuTokenReply) {}
-  rpc GetSimpleQiNiuToken (DefaultRequest) returns (QiNiuTokenReply) {}
-
-  // 商家课程管理
-  rpc ClassQuery (StandardRequest) returns (StandardReply) {}
-  rpc ClassAdd (StandardRequest) returns (StandardReply) {}
-  rpc ClassEdit (StandardRequest) returns (StandardReply) {}
-  rpc ClassStatusEdit (StandardRequest) returns (StandardReply) {}
-  rpc ClassColorEdit (StandardRequest) returns (StandardReply) {}
-  rpc ClassWxVisibleEdit (StandardRequest) returns (StandardReply) {}
-  rpc ClassVipEdit (StandardRequest) returns (StandardReply) {}
-  rpc SttPlanBasicQuery (StandardRequest) returns (StandardReply) {}
-  rpc SttPlanBasicAdd (StandardRequest) returns (StandardReply) {}
-  rpc SttPlanBasicEdit (StandardRequest) returns (StandardReply) {}
-  rpc SttPlanBasicShopEdit (StandardRequest) returns (StandardReply) {}
-  rpc SttPlanBasicStatusEdit (StandardRequest) returns (StandardReply) {}
-  rpc SttPlanBasicPublish (StandardRequest) returns (StandardReply) {}
-  rpc SttPlanPreview (StandardRequest) returns (StandardReply) {}
-  rpc SttPlanCopy (StandardRequest) returns (StandardReply) {}
-  rpc SttPlanDetailQuery (StandardRequest) returns (StandardReply) {}
-  rpc SttPlanDetailBatchSave (StandardRequest) returns (StandardReply) {}
-  rpc STTBasicQuery (StandardRequest) returns (StandardReply) {}
-  rpc STTBasicAdd (StandardRequest) returns (StandardReply) {}
-  rpc STTBasicEdit (StandardRequest) returns (StandardReply) {}
-  rpc STTBasicStatusEdit (StandardRequest) returns (StandardReply) {}
-  rpc STTBasicPreview (StandardRequest) returns (StandardReply) {}
-  rpc STTBasicCopy (StandardRequest) returns (StandardReply) {}
-  rpc STTBasicOfflineEdit (StandardRequest) returns (StandardReply) {}
-  rpc STTDetailListQuery (StandardRequest) returns (StandardReply) {}
-  rpc STTBasicDetailBatchSave (StandardRequest) returns (StandardReply) {}
-  rpc STTDetailAllowDelCheck (StandardRequest) returns (StandardReply) {}
-
-  // 商家上下课管理
-  rpc CourseDetailQuery (StandardRequest) returns (StandardReply) {}
-
-  // 商家预约管理
-  rpc OrderListQuery (StandardRequest) returns (StandardReply) {}
-  rpc OrderAddByManager (StandardRequest) returns (StandardReply) {}
-  rpc OrderCancelByManager (StandardRequest) returns (StandardReply) {}
-  rpc OrderStatistics (StandardRequest) returns (StandardReply) {}
-  rpc ClassOrderQuery (StandardRequest) returns (StandardReply) {}
-  rpc VipUserOrderQuery (StandardRequest) returns (StandardReply) {}
-
-  // 心率
-  rpc HrSensorsPublicQuery (StandardRequest) returns (StandardReply) {}
-  rpc HrSensorsPvtQuery (StandardRequest) returns (StandardReply) {}
-  rpc AddHrSensors (StandardRequest) returns (StandardReply) {}
-  rpc AddPvtHrSensors (StandardRequest) returns (StandardReply) {}
-  rpc EditHrSensors (StandardRequest) returns (StandardReply) {}
-  rpc HrSensorsDel (StandardRequest) returns (StandardReply) {}
-  rpc PKGroupChg (StandardRequest) returns (StandardReply) {}
-  rpc BindHrSensor (StandardRequest) returns (StandardReply) {}
-  rpc UnBindHrSensor (StandardRequest) returns (StandardReply) {}
-
-  // 评分管理
-  rpc ActionQuery (StandardRequest) returns (StandardReply) {}
-
-  // 用户微信登陆
-  rpc GenVerifyImageByWinXin(GenVerifyImageRequest)returns(GenVerifyImageReply){}
-  rpc GenPhoneVerifyCode(GenPhoneVerifyCodeRequest)returns(DefaultReply){}
-  rpc CheckVerifyCode(CheckVerifyCodeRequest)returns(DefaultReply){}
-
-}
-message DefaultRequest{
-}
-message DefaultReply{}
-
-message StandardRequest{
-  int64 shopID = 1;
-  string jsonStr = 2;
-  string sign = 3;
-}
-
-message StandardReply{
-  string jsonRst = 1;
-  string sign = 2;
-}
-
-message SignUpRequest {
-  string name = 1;
-  string password = 2;
-}
-
-message SignInReply {
-  string token = 1;
-}
-
-message SignInRequest {
-  string name = 1;
-  string password = 2;
-  string codeId = 3;
-  string verifyCode = 4;
-}
-
-message GenVerifyImageRequest{
-  int32 height = 1;
-  int32 width = 2;
-}
-
-message GenVerifyImageReply{
-  string codeId = 1;
-  string imageBase64 = 2;
-}
-
-message ShopInfo{
-  int64 shopId = 1;
-  string name = 2;
-  int64 sId = 3;
-  string addr = 4;
-  string phone = 5;
-  string contacts = 6;
-  WebStatus status = 7;
-  string  created_at = 8;
-  int64 created_user = 9;
-  string updated_at = 10;
-  int64 updated_user = 11;
-  int64 is_hr = 12;
-  int64 is_score = 13;
-  string shopUUID = 14;
-}
-
-message ShopDetailRequest{
-  int64 shopId = 1;
-}
-
-message ShopListRequest{
-  // 模糊查询
-  string name = 1;
-  // Status_Null查询全部
-  WebStatus status = 2;
-  //上级商家Id, -1 时查询全部
-  int64 sId = 3;
-}
-
-message ShopListReply{
-  repeated ShopInfo list = 1;
-}
-
-enum WebStatus{
-  Ban = 0;
-  On = 1;
-  Delete = 9;
-  All = 99;
-}
-
-message GetShopNaviRequest{
-  int64 shopId = 1;
-  // 最顶层为0
-  int64 parentId = 2;
-}
-
-message Column{
-  string name = 1;
-  string url = 2;
-  string code = 3;
-  // 顺序
-  int32 sn = 4;
-  WebStatus status = 5;
-  bool navShow = 6;
-  string id = 7;
-}
-
-message GetShopNaviReply{
-  repeated Column list = 1;
-}
-
-message GetOverlayImgRequest{
-  string fileName = 1;
-}
-
-message QiNiuTokenReply{
-  string token = 1;
-}
-
-message License{
-  int64 id = 1;
-  int64 shopId = 2;
-  int64 lcsTypeId = 3;
-  string name = 4;
-  // nanoSec
-  int64 validPeriod = 5;
-  // 分
-  int64 lcsPrice = 6;
-  // nanoSec
-  int64 lcsBeginTime = 7;
-  // nanoSec
-  int64 lcsEndTime = 8;
-
-  int64 feeId = 9;
-  WebStatus status = 10;
-  string memo = 11;
-  // nanoSec
-  int64  createdAt = 12;
-  int64 createdUser = 13;
-  // nanoSec
-  int64 updatedAt = 14;
-  int64 updatedUser = 15;
-}
-
-message LicenseList{
-  repeated License list = 1;
-}
-
-message IdList{
-  repeated int64 idList = 1;
-}
-
-message LicenseType{
-  int64 typeId = 1;
-  string name = 2;
-  // 有效期时长,单位毫秒
-  int64 validPeriodMs = 3;
-  // 单位:分
-  int32 price = 4;
-  string memo = 5;
-  int64 execUser = 6;
-  WebStatus status = 7;
-}
-
-message LicenseTypeMapReply{
-  map<int64, LicenseType> licenseMap = 1;
-}
-
-enum VerifyType{
-  Undefined = 0;
-  SignUp = 1;
-  SignIn = 2;
-  ChangePassword = 3;
-}
-
-message GenPhoneVerifyCodeRequest{
-  VerifyType verifyType = 1;
-  string code = 2;
-  string account = 3;
-  string ip = 4;
-  string templateCode = 5;
-  int64 expireDurationNano = 6;
-}
-
-message CheckVerifyCodeRequest{
-  VerifyType verifyType = 1;
-  string code = 2;
-  string account = 3;
-}

+ 1 - 1
src/grpc/readme.md

@@ -88,7 +88,7 @@ const jsonStr = {
 shopId: localStorage.shopId,
 vipType: -99,
 start: that.start,
-tableMax: that.pageination.pageItem
+tableMax: that.pagination.pageItem
 };
 
 let paraRequest = new StandardRequest();

+ 252 - 218
src/router/index.js

@@ -3,18 +3,10 @@ import VueRouter from 'vue-router'
 // 加载条
 import NProgress from 'nprogress'
 import 'nprogress/nprogress.css'
-import VueAMap from 'vue-amap';
 
 Vue.use(VueRouter);
-// Vue.use(VueAMap);
-
-// VueAMap.initAMapApiLoader({
-//     key: 'your amap key',
-//     plugin: ['AMap.Autocomplete', 'AMap.PlaceSearch', 'AMap.Scale', 'AMap.OverView', 'AMap.ToolBar', 'AMap.MapType', 'AMap.PolyEditor', 'AMap.CircleEditor'],
-//     // 默认高德 sdk 版本为 1.4.4
-//     v: '1.4.4'
-// });
 
+//控制的是content中tab页的标题
 const routes = [
     {
         path: '/',
@@ -28,30 +20,44 @@ const routes = [
                     title: "首页",
                     // clmid: "1",
                 }
+            },
+            //会员管理相关页面
+            {
+                path: '/memberFull',
+                name: 'memberFull',
+                component: () => import('@/views/Member/MemberFull.vue'),
+                meta: {
+                    title: "正式会员",
+                }
             }, {
-                path: '/member',
-                name: 'Member',
-                component: () => import('@/views/User/Member.vue'),
+                path: '/relevancePhone',
+                name: 'relevancePhone',
+                component: () => import('@/views/Member/RelevancePhone.vue'),
                 meta: {
-                    title: "会员管理",
-                    // clmid: "2",
+                    title: "关联手机",
                 }
-            },
-            {
-                path: '/tempMember',
-                name: 'tempMember',
-                component: () => import('@/views/User/tempMember.vue'),
+            }, {
+                path: '/memberTemporary',
+                name: 'memberTemporary',
+                component: () => import('@/views/Member/MemberTemporary.vue'),
                 meta: {
                     title: "临时会员",
-                    // clmid: "33",
                 }
-            },{
-                path: '/lesson',
-                name: 'Lesson',
-                component: () => import('@/views/Class/Lesson.vue'),
+            }, {
+                path: '/memberCost',
+                name: 'memberCost',
+                component: () => import('@/views/Member/MemberCost.vue'),
+                meta: {
+                    title: "会员消费",
+                }
+            },
+            //课程管理相关页面
+            {
+                path: '/lessonManage',
+                name: 'lessonManage',
+                component: () => import('@/views/Class/LessonManage.vue'),
                 meta: {
-                    title: "科目管理",
-                    // clmid: "3",
+                    title: "课目管理",
                 }
             }, {
                 path: '/lessonTableTemplate',
@@ -59,15 +65,13 @@ const routes = [
                 component: () => import('@/views/Class/LessonTableTemplate.vue'),
                 meta: {
                     title: "课程表模板",
-                    // clmid: "4",
                 }
             }, {
                 path: '/lessonTableTemplateEdit',
                 name: 'lessonTableTemplateEdit',
-                component: () => import('@/views/SttPlan/LessonTableTemplateEdit.vue'),
+                component: () => import('@/views/Class/LessonTableTemplateEdit.vue'),
                 meta: {
                     title: "编辑课程表模板",
-                    // clmid: "4",
                 }
             }, {
                 path: '/lessonTableManage',
@@ -75,281 +79,311 @@ const routes = [
                 component: () => import('@/views/Class/LessonTableManage.vue'),
                 meta: {
                     title: "课程表管理",
-                    // clmid: "5",
                 }
             }, {
                 path: '/lessonTableManageEdit',
                 name: 'lessonTableManageEdit',
-                component: () => import('@/views/SchoolTimeTable/LessonTableManageEdit.vue'),
+                component: () => import('@/views/Class/LessonTableManageEdit.vue'),
                 meta: {
-                    title: "编辑课程表",
-                    // clmid: "5",
+                    title: "课程表编辑",
                 }
             }, {
-                path: '/adminManage',
-                name: 'AdminManage',
-                component: () => import('@/views/User/AdminManage.vue'),
+                path: '/classManage',
+                name: 'classManage',
+                component: () => import('@/views/Class/ClassManage.vue'),
                 meta: {
-                    title: "管理员管理",
-                    // clmid: "13",
+                    title: "上课管理",
                 }
             }, {
-                path: '/log',
-                name: 'Log',
-                component: () => import('@/views/User/Log.vue'),
+                path: '/classEdit',
+                name: 'classEdit',
+                component: () => import('@/views/Class/ClassEdit.vue'),
                 meta: {
-                    title: "操作日志",
-                    // clmid: "14",
+                    title: "课程管理",
                 }
             }, {
-                path: '/demoDevice',
-                name: 'demoDevice',
-                component: () => import('@/views/Shop/demoDevice.vue'),
+                path: '/classHistory',
+                name: 'classHistory',
+                component: () => import('@/views/Class/ClassHistory.vue'),
                 meta: {
-                    title: "演示设备",
-                    // clmid: "15",
+                    title: "历史记录",
                 }
             }, {
-                path: '/shopManage',
-                name: 'ShopManage',
-                component: () => import('@/views/Shop/ShopManage.vue'),
+                path: '/classInfoDetail',
+                name: 'classInfoDetail',
+                component: () => import('@/views/Class/ClassInfoDetail.vue'),
                 meta: {
-                    title: "店面管理",
-                    // clmid: "12",
+                    title: "课程成绩",
                 }
             }, {
-                path: '/adminSetting',
-                name: 'AdminSetting',
-                component: () => import('@/views/Auth/AdminSetting.vue'),
+                path: '/classFinishManage',
+                name: 'classFinishManage',
+                component: () => import('@/views/Class/ClassFinishManage.vue'),
                 meta: {
-                    title: "系统设置",
-                    // clmid: "22",
+                    title: "下课管理",
                 }
             }, {
-                path: '/coach',
-                name: 'coach',
-                component: () => import('@/views/Teacher/coach.vue'),
+                path: '/classFinishDetail',
+                name: 'classFinishDetail',
+                component: () => import('@/views/Class/ClassFinishDetail.vue'),
                 meta: {
-                    title: "教练管理",
-                    // clmid: "6",
+                    title: "下课详情",
                 }
             }, {
-                path: '/appoint',
-                name: 'appoint',
-                component: () => import('@/views/Order/appoint.vue'),
+                path: '/online',
+                name: 'online',
+                component: () => import('@/views/Class/ClassOnLine.vue'),
                 meta: {
-                    title: "预约管理",
-                    // clmid: "7",
+                    title: "在线上课",
                 }
             }, {
-                path: '/record',
-                name: 'record',
-                component: () => import('@/views/Other/record.vue'),
+                path: '/videoClass',
+                name: 'videoClass',
+                component: () => import('@/views/Class/VideoClass.vue'),
                 meta: {
-                    title: "预约记录",
-                    // clmid: "8",
+                    title: "视频上课",
                 }
-            }, {
-                path: '/cost',
-                name: 'cost',
-                component: () => import('@/views/User/cost.vue'),
+            },
+            //预约管理相关页面
+            {
+                path: '/appointManage',
+                name: 'appointManage',
+                component: () => import('@/views/Appointment/AppointManage.vue'),
                 meta: {
-                    title: "消费记录",
-                    // clmid: "9",
+                    title: "预约管理",
                 }
             }, {
-                path: '/setting',
-                name: 'setting',
-                component: () => import('@/views/Auth/setting.vue'),
+                path: '/appointRecord',
+                name: 'appointRecord',
+                component: () => import('@/views/Appointment/AppointRecord.vue'),
                 meta: {
-                    title: "系统设置",
-                    // clmid: "22",
+                    title: "预约记录",
                 }
-            }, {
-                path: '/finish',
-                name: 'finish',
-                component: () => import('@/views/SchoolTimeTable/finish.vue'),
+            },
+            //运动评估相关页面
+            // {
+            //     path: '/movementManage',
+            //     name: 'movementManage',
+            //     component: () => import('@/views/assessment/movementManage.vue'),
+            //     meta: {
+            //         title: "动作管理",
+            //     }
+            // }, {
+            //     path: '/nodeMange',
+            //     name: 'nodeMange',
+            //     component: () => import('@/views/assessment/nodeMange.vue'),
+            //     meta: {
+            //         title: "节点管理",
+            //     }
+            // }, {
+            //     path: '/actionNode',
+            //     name: 'actionNode',
+            //     component: () => import('@/views/assessment/actionNode.vue'),
+            //     meta: {
+            //         title: "动作节点",
+            //     }
+            // }, {
+            //     path: '/actionKeyFrame',
+            //     name: 'actionKeyFrame',
+            //     component: () => import('@/views/assessment/actionKeyFrame.vue'),
+            //     meta: {
+            //         title: "动作关键帧",
+            //     }
+            // }, {
+            //     path: '/lessonAction',
+            //     name: 'lessonAction',
+            //     component: () => import('@/views/assessment/lessonAction.vue'),
+            //     meta: {
+            //         title: "课程动作",
+            //     }
+            // },{
+            //     path: '/movementScore',
+            //     name: 'movementScore',
+            //     component: () => import('@/views/assessment/movementScore.vue'),
+            //     meta: {
+            //         title: "动作评分",
+            //     }
+            // },
+            //心率管理相关页面
+            {
+                path: '/hrSensor',
+                name: 'hrSensor',
+                component: () => import('@/views/HrSensor/HrSensor.vue'),
                 meta: {
-                    title: "下课管理",
-                    // clmid: "10",
+                    title: "心率设备",
                 }
             }, {
-                path: '/finishDetail',
-                name: 'finishDetail',
-                component: () => import('@/views/SchoolTimeTable/finishDetail.vue'),
+                path: '/hrSensorPrivate',
+                name: 'hrSensorPrivate',
+                component: () => import('@/views/HrSensor/HrSensorPrivate.vue'),
                 meta: {
-                    title: "下课管理",
-                    // clmid: "10",
+                    title: "私有心率设备",
                 }
             }, {
-                path: '/courses',
-                name: 'courses',
-                component: () => import('@/views/SchoolTimeTable/courses.vue'),
-                meta: {
-                    title: "课程管理",
-                    // clmid: "10",
-                }
-            },{
-                path: '/coursesHistory',
-                name: 'coursesHistory',
-                component: () => import('@/views/SchoolTimeTable/coursesHistory.vue'),
+                path: '/hrSensorLog',
+                name: 'hrSensorLog',
+                component: () => import('@/views/HrSensor/HrSensorLog.vue'),
                 meta: {
-                    title: "课程管理 历史记录",
-                    // clmid: "10",
+                    title: "设备记录",
                 }
             }, {
-                path: '/classPrepare',
-                name: 'classPrepare',
-                component: () => import('@/views/Class/classPrepare.vue'),
+                path: '/bindRecord',
+                name: 'bindRecord',
+                component: () => import('@/views/HrSensor/BindRecord.vue'),
                 meta: {
-                    title: "准备上课",
-                    // clmid: "10",
+                    title: "绑定记录",
                 }
             }, {
-                path: '/classInfoDetail',
-                name: 'classInfoDetail',
-                component: () => import('@/views/Class/classInfoDetail.vue'),
+                path: '/demoDevice',
+                name: 'demoDevice',
+                component: () => import('@/views/HrSensor/DemoDevice.vue'),
                 meta: {
-                    title: "课程成绩",
-                    // clmid: "10",
+                    title: "演示设备",
                 }
-            }, {
-                path: '/courseEdit',
-                name: 'courseEdit',
-                component: () => import('@/views/SchoolTimeTable/courseEdit.vue'),
+            },
+            //报表统计相关页面
+            {
+                path: '/classHourStatistics',
+                name: 'classHourStatistics',
+                component: () => import('@/views/Report/ClassHourStatistics.vue'),
                 meta: {
-                    title: "课程管理",
-                    // clmid: "10",
+                    title: "课时统计",
                 }
-            }, {
-                path: '/heartEquip',
-                name: 'heartEquip',
-                component: () => import('@/views/HrSensors/heartEquip.vue'),
+            },
+            // {
+            //     path: '/memberStatistics',
+            //     name: 'memberStatistics',
+            //     component: () => import('@/views/Report/memberStatistics.vue'),
+            //     meta: {
+            //         title: "会员统计",
+            //     }
+            // },{
+            //     path: '/appointStatistics',
+            //     name: 'appointStatistics',
+            //     component: () => import('@/views/Report/appointStatistics.vue'),
+            //     meta: {
+            //         title: "预约统计",
+            //     }
+            // },
+            {
+                path: '/coachHourStatistics',
+                name: 'coachHourStatistics',
+                component: () => import('@/views/Report/CoachHourStatistics.vue'),
                 meta: {
-                    title: "心率设备",
-                    // clmid: "10",
+                    title: "教练课时统计",
                 }
-            }, {
-                path: '/heartEquipPerson',
-                name: 'heartEquipPerson',
-                component: () => import('@/views/HrSensors/heartEquipPerson.vue'),
+            },
+
+            //系统管理相关页面
+            {
+                path: '/operateLog',
+                name: 'operateLog',
+                component: () => import('@/views/SystemManage/OperateLog.vue'),
                 meta: {
-                    title: "私有心率设备",
-                    // clmid: "10",
+                    title: "操作日志",
                 }
-            }, {
-                path: '/heartLog',
-                name: 'heartLog',
-                component: () => import('@/views/Shop/heartLog.vue'),
+            },
+            {
+                path: '/shopSetting',
+                name: 'shopSetting',
+                component: () => import('@/views/SystemManage/ShopSetting.vue'),
                 meta: {
-                    title: "设备记录",
-                    // clmid: "10",
+                    title: "商家设置",
                 }
-            }, {
-                path: '/bindRecord',
-                name: 'bindRecord',
-                component: () => import('@/views/HrSensors/bindRecord.vue'),
+            },
+            // {
+            //     path: '/accountManage',
+            //     name: 'accountManage',
+            //     component: () => import('@/views/SystemManage/accountManage.vue'),
+            //     meta: {
+            //         title: "账号管理",
+            //     }
+            // },
+            {
+                path: '/shopRegion',
+                name: 'shopRegion',
+                component: () => import('@/views/SystemManage/ShopRegion.vue'),
                 meta: {
-                    title: "绑定记录",
-                    // clmid: "10",
+                    title: "商家区域",
                 }
-            }, {
-                path: '/region',
-                name: 'region',
-                component: () => import('@/views/Shop/region.vue'),
+            },
+            {
+                path: '/shopDevice',
+                name: 'shopDevice',
+                component: () => import('@/views/SystemManage/ShopDevice.vue'),
                 meta: {
-                    title: "区域管理",
-                    // clmid: "10",
+                    title: "商家设备",
                 }
-            },{
-                path: '/test',
-                name: 'Test',
-                component: () => import('@/views/Other/Test.vue'),
+            },
+
+            //总店相关页面
+            {
+                path: '/adminShopSetting',
+                name: 'adminShopSetting',
+                component: () => import('@/views/AdminManage/AdminShopSetting.vue'),
                 meta: {
-                    title: "test",
-                    // clmid: "10",
+                    title: "商家设置",
                 }
-            }, {
-                path: '/regionEquip',
-                name: 'regionEquip',
-                component: () => import('@/views/User/regionEquip.vue'),
+            },
+            {
+                path: '/adminUserManage',
+                name: 'adminUserManage',
+                component: () => import('@/views/AdminManage/AdminUserManage.vue'),
                 meta: {
-                    title: "区域设备",
-                    // clmid: "10",
+                    title: "管理员管理",
                 }
             }, {
-                path: '/relevancePhone',
-                name: 'relevancePhone',
-                component: () => import('@/views/User/relevancePhone.vue'),
-                meta: {
-                    title: "关联手机",
-                    // clmid: "2",
-                }
-            },{
-                path: '/AcrossVip',
-                name: 'AcrossVip',
-                component: () => import('@/views/User/AcrossVip.vue'),
+                path: '/memberCross',
+                name: 'memberCross',
+                component: () => import('@/views/AdminManage/MemberCross.vue'),
                 meta: {
                     title: "跨店会员",
-                    // clmid: "11",
                 }
-            },{
-                path: '/online',
-                name: 'online',
-                component: () => import('@/views/Shop/online.vue'),
+            },
+            // {
+            //     path: '/adminShopArea',
+            //     name: 'adminShopArea',
+            //     component: () => import('@/views/AdminManage/adminShopArea.vue'),
+            //     meta: {
+            //         title: "商家区域",
+            //     }
+            // },{
+            //     path: '/groupManage',
+            //     name: 'groupManage',
+            //     component: () => import('@/views/AdminManage/groupManage.vue'),
+            //     meta: {
+            //         title: "分组管理",
+            //     }
+            // },
+            {
+                path: '/coachManage',
+                name: 'coachManage',
+                component: () => import('@/views/SystemManage/CoachManage.vue'),
                 meta: {
-                    title: "在线上课",
-                    // clmid: "3",
+                    title: "教练管理",
                 }
-            },{
+            }, {
                 path: '/versionControlMefisto',
                 name: 'versionControlMefisto',
                 component: () => import('@/views/Other/versionControlMefisto.vue'),
                 meta: {
                     title: "app版本控制",
-                    // clmid: "999",
                 }
-            },{
+            }, {
                 path: '/versionControlVideo',
                 name: 'versionControlVideo',
                 component: () => import('@/views/Other/versionControlVideo.vue'),
                 meta: {
                     title: "视频app版本控制",
-                    // clmid: "999",
-                }
-            },{
-                path: '/classTime',
-                name: 'classTime',
-                component: () => import('@/views/Class/ClassTime.vue'),
-                meta: {
-                    title: "课时管理",
-                    // clmid: "999",
-                }
-            }, {
-                path: '/classChange',
-                name: 'classChange',
-                component: () => import('@/views/Class/classChange.vue'),
-                meta: {
-                    title: "课时调整",
-                    // clmid: "999",
                 }
             }, {
-                path: '/videoClass',
-                name: 'videoClass',
-                component: () => import('@/views/Class/videoClass.vue'),
-                meta: {
-                    title: "视频上课",
-                    // clmid: "999",
-                }
-            }, {
-                path: '/grpcDemo',
-                name: 'grpcDemo',
-                component: () => import('@/views/Class/grpcDemo.vue'),
+                path: '/test',
+                name: 'Test',
+                component: () => import('@/views/Other/Test.vue'),
                 meta: {
-                    title: "grpcDemo",
-                    // clmid: "999",
+                    title: "test",
                 }
-            },
+            }
         ]
     }, {
         path: '/login',

+ 0 - 0
src/views/Auth/AdminSetting.vue → src/views/AdminManage/AdminShopSetting.vue


+ 3 - 3
src/views/User/AdminManage.vue → src/views/AdminManage/AdminUserManage.vue

@@ -566,14 +566,14 @@
               that.recordsTotal = 0;
             }
             // 设置分页数据
-            that.setPaginations();
+            that.setPagination();
           } else {
             that.$message.error(json.Memo + ' 错误码:' + json.Code);
           }
         })
       },
       // 设置分页数据
-      setPaginations() {
+      setPagination() {
         // 分页属性
         let that = this;
         that.pageination.total = that.recordsTotal;
@@ -626,7 +626,7 @@
     },
     watch: {
       $route(to) {
-        if (to.name == 'AdminManage') {
+        if (to.name == 'AdminUserManage') {
           this.getShopListSelect();
           this.getTableQuery();
         }

+ 3 - 3
src/views/User/AcrossVip.vue → src/views/AdminManage/MemberCross.vue

@@ -270,7 +270,7 @@
         },
         watch: {
             $route(to) {
-                if (to.name == 'AcrossVip') {
+                if (to.name == 'memberCross') {
                     // 读取列表
                     this.getTableQuery();
                 }
@@ -500,14 +500,14 @@
                             that.recordsTotal = 0;
                         }
                         // 设置分页数据
-                        that.setPaginations();
+                        that.setPagination();
                     } else {
                         that.$message.error(json.Memo + ' 错误码:' + json.Code);
                     }
                 })
             },
             // 设置分页数据
-            setPaginations() {
+            setPagination() {
                 // 分页属性
                 let that = this;
                 that.pageination.total = that.recordsTotal;

+ 1167 - 0
src/views/Appointment/AppointManage.vue

@@ -0,0 +1,1167 @@
+<template>
+  <div class="context">
+    <div class="">
+      <div class="panel">
+        <h5>预约管理</h5>
+      </div>
+      <div class="timeList">
+        <ul>
+          <li :class="[{'active': i == choiceDate}]" v-for="(day,i) in weeks" @click="choiceTime(i)">
+            <em>{{ day.name }}</em><span>{{ day.data }}</span>
+          </li>
+        </ul>
+      </div>
+      <el-tabs v-model="activeName" type="card">
+
+        <el-tab-pane label="会员预约列表" name="second">
+          <div class="panel-body">
+            <div class="panel_control">
+              <el-row :gutter="1">
+                <el-col :span="4">
+                  <em>会员名:</em>
+                  <el-input v-model="panel.name" placeholder="请输入会员名"></el-input>
+                </el-col>
+                <el-col :span="4">
+                  <em>手机号:</em>
+                  <el-input v-model="panel.phone" placeholder="请输入手机号" type="number"></el-input>
+                </el-col>
+                <el-col :span="4">
+                  <em>预约课程:</em>
+                  <el-select v-model="panel.class_id">
+                    <el-option
+                        v-for="item in panel.classOptions"
+                        :key="item.value"
+                        :label="item.label"
+                        :value="item.value">
+                    </el-option>
+                  </el-select>
+                </el-col>
+                <el-col :span="2">
+                  <el-button size="" type="primary" @click="query" plain :disabled="searchBtnStatus">
+                    查询
+                  </el-button>
+                </el-col>
+                &nbsp;
+                <el-col :span="8">
+                  <el-button class="pull-right acrossAddBtn" type="success" @click="addAppoint(2)">跨店预约</el-button>
+                  <el-button class="pull-right vipAddBtn" type="warning" @click="addAppoint(1)">本店预约</el-button>
+                </el-col>
+              </el-row>
+            </div>
+          </div>
+          <br>
+          <div class="table">
+            <el-table
+                :data="tableDataMember"
+                border
+                is-horizontal-resize
+                :default-sort="{prop: 'date', order: 'descending'}"
+                element-loading-background="rgba(0, 0, 0, 0.8)"
+                class=""
+                @selection-change="handleSelectionChange" @current-change="clickChange"
+            >
+              <el-table-column label="选择" width="55" fixed>
+                <template slot-scope="scope">
+                  <el-radio v-model="tableRadio" :label="scope.row"><i></i></el-radio>
+                </template>
+              </el-table-column>
+              <el-table-column label="序号" type="index" width="50" align="center" fixed>
+                <template scope="scope">
+                  <span>{{ (start) + scope.$index + 1 }}</span>
+                </template>
+              </el-table-column>
+              <el-table-column
+                  prop="user_name"
+                  label="会员名"
+                  fixed
+              >
+              </el-table-column>
+              <el-table-column
+                  prop="usercode"
+                  label="手机号"
+                  width="160"
+                  sortable
+                  fixed
+              >
+              </el-table-column>
+              <el-table-column
+                  prop="class_name"
+                  label="预约课程"
+                  width="120"
+                  sortable
+              >
+                <template slot-scope="scope">
+                  <span class="lessons" :style="{ background:scope.row.class_color }">{{ scope.row.class_name }}</span>
+                </template>
+              </el-table-column>
+              <el-table-column
+                  prop="begin_time"
+                  label="上课时间"
+                  :formatter="filterFmtDate"
+                  width="160"
+                  sortable
+              >
+              </el-table-column>
+              <el-table-column
+                  prop="created_at"
+                  label="会员预约时间"
+                  width="160"
+                  :formatter="filterFmtDate"
+                  sortable
+              >
+              </el-table-column>
+              <el-table-column
+                  prop="consume_hour"
+                  label="消耗课时"
+                  sortable
+              >
+              </el-table-column>
+              <el-table-column
+                  prop="remain_hour"
+                  label="剩余课时"
+                  sortable
+              >
+              </el-table-column>
+              <el-table-column
+                  prop="status"
+                  label="预约状态"
+                  sortable
+              >
+                <template slot-scope="scope">
+                  <span v-if="scope.row.status == 1" style="color: chartreuse">已预约</span>
+                  <span v-if="scope.row.status == 2" style="color: #ccc">已取消</span>
+                  <span v-if="scope.row.status == 3" style="color: red">预约未到</span>
+                  <span v-if="scope.row.status == 4" style="color: #015B9E">已完成</span>
+                </template>
+              </el-table-column>
+              <el-table-column
+                  prop="status"
+                  label="操作"
+              >
+                <template slot-scope="scope">
+                  <el-button type="danger" size="mini" round
+                             @click="cancelMemberReserve(scope.row)">取消预约
+                  </el-button>
+                </template>
+              </el-table-column>
+            </el-table>
+            <br>
+            <el-pagination
+                background
+                :total="pagination.total"
+                :page-size="pagination.pageItem"
+                @current-change="pageChange"
+            ></el-pagination>
+          </div>
+        </el-tab-pane>
+
+        <el-tab-pane label="课程预约列表" name="first">
+          <div class="table">
+            <el-table
+                :data="tableDataLesson"
+                border
+                is-horizontal-resize
+                :default-sort="{prop: 'date', order: 'descending'}"
+                element-loading-background="rgba(0, 0, 0, 0.8)"
+                class=""
+                @selection-change="handleSelectionChange" @current-change="clickChange"
+            >
+              <el-table-column label="序号" type="index" width="50" align="center">
+                <template scope="scope">
+                  <span>{{ (start) + scope.$index + 1 }}</span>
+                </template>
+              </el-table-column>
+              <el-table-column
+                  prop="begin_time"
+                  label="上课时间"
+                  width="160"
+                  :formatter="filterFmtDate"
+              >
+              </el-table-column>
+              <el-table-column
+                  prop="class_name"
+                  label="课程"
+                  width="110"
+                  sortable
+              >
+                <template slot-scope="scope">
+                  <span class="lessons" :style="{ background:scope.row.class_color }">{{ scope.row.class_name }}</span>
+                </template>
+              </el-table-column>
+              <el-table-column
+                  prop="Recovered"
+                  label="预约比例"
+                  width="210px"
+                  sortable
+              >
+                <template slot-scope="scope">
+                  <el-progress
+                      :percentage="parseInt((scope.row.order_count/scope.row.order_toplimit * 100))"
+                      :format="appointPercent"
+                  ></el-progress>
+                </template>
+              </el-table-column>
+              <el-table-column
+                  prop="order_toplimit"
+                  label="预约名额"
+              >
+              </el-table-column>
+              <el-table-column
+                  prop="order_count"
+                  label="预约人数"
+              >
+              </el-table-column>
+              <el-table-column
+                  prop="consume_hour"
+                  label="消耗课时"
+              >
+              </el-table-column>
+              <el-table-column
+                  prop="std_id"
+                  label="操作"
+                  width=70px
+              >
+                <template slot-scope="scope">
+                  <el-button type="text" @click="getAppointDetail(scope.row)">详情</el-button>
+                </template>
+              </el-table-column>
+            </el-table>
+            <br>
+            <el-pagination
+                background
+                :total="pagination.total"
+                :page-size="pagination.pageItem"
+                @current-change="pageChange"
+            ></el-pagination>
+          </div>
+        </el-tab-pane>
+      </el-tabs>
+    </div>
+    <el-dialog :title="dialogTitle" :visible.sync="dialogAppointVisible" width="650px">
+      <div class="dialogContent">
+        <div class="">
+          <el-form ref="form" :model="form" label-width="160px">
+            <el-form-item label="当前日期" :required="true">
+              <el-input v-model="form.displayDay" placeholder="placeholder" :disabled="true"
+                        style="width: 220px"></el-input>
+            </el-form-item>
+            <el-form-item label="课程" :required="true">
+              <el-select v-model="form.stb_id" filterable placeholder="请选择"
+                         @change="getUserByClass(form.stb_id)">
+                <el-option
+                    v-for="item in form.stdList"
+                    :key="item.value"
+                    :label="item.label"
+                    :value="item.value">
+                </el-option>
+              </el-select>
+            </el-form-item>
+            <!-- 课程联动查询userlist by classid-->
+            <el-form-item label="本店会员" :required="true" v-if="form.addType == 1 ">
+              <el-select v-model="form.userId" filterable placeholder="请选择"
+                         @change="checkUserSelect(form.userId)">
+                <el-option
+                    v-for="item in form.userList"
+                    :key="item.value"
+                    :label="item.label"
+                    :value="item.value">
+                </el-option>
+              </el-select>
+            </el-form-item>
+            <el-form-item label="跨店会员" :required="true" v-if="form.addType == 2 ">
+              <el-select v-model="form.userId" filterable placeholder="请选择"
+                         @change="checkUserSelect(form.userId)">
+                <el-option
+                    v-for="item in form.userList"
+                    :key="item.value"
+                    :label="item.label"
+                    :value="item.value">
+                </el-option>
+              </el-select>
+            </el-form-item>
+            <el-form-item label="消耗课时">
+              <el-input v-model="form.ConsumeHour" placeholder="placeholder" :disabled="true"
+                        style="width: 220px"></el-input>
+            </el-form-item>
+            <el-form-item label="会员剩余课时">
+              <el-input v-model="form.remain" placeholder="placeholder" :disabled="true"
+                        style="width: 220px"></el-input>
+            </el-form-item>
+          </el-form>
+        </div>
+      </div>
+      <div class="dialogFooter">
+        <el-button type="primary" size="small" @click="confirmAddAppoint"
+                   :disabeld="BtnConfirmOrderAddByManager">确定
+        </el-button>
+        <el-button size="small" @click="dialogAppointVisible = false">取消</el-button>
+      </div>
+    </el-dialog>
+    <el-dialog title="预约会员" :visible.sync="dialogTableVisible" width="650px">
+      <el-table :data="gridData">
+        <el-table-column property="user_name" label="姓名" width="200"></el-table-column>
+        <el-table-column property="usercode" label="手机"></el-table-column>
+      </el-table>
+    </el-dialog>
+  </div>
+</template>
+
+<script>
+import Global from '../../Global.js'
+import {
+  StandardRequest
+} from "@/grpc/base_pb";
+
+let qs = require('qs');
+export default {
+  data() {
+    return {
+      BtnConfirmOrderAddByManager: false,
+      searchBtnStatus: false,
+      activeName: 'second',
+      choiceDate: 0,//默认为今天
+      dialogTableVisible: false,
+      dialogAppointVisible: false,
+      dialogTitle: '增加预约',
+      weeks: [],
+      gridData: [],
+      //控制分页相关
+      start: 0,
+      draw: 1,
+      // panel 配置项目
+      panel: {
+        name: '',
+        phone: '',
+        class_id: -99,
+        draw: 1,
+        start: 0,
+        recordsTotal: 0,
+        recordsTotal2: 0,
+        allTableData: [],
+        allTableData2: [],
+        multipleSort: false,
+        loading: false,
+        multipleSelection: [],
+      },
+      multipleSelection: [],
+      pagination: {
+        pageItem: 100,
+        pageOptions: pageOptions(),
+        total: 100,
+        pageIndex: 1,
+      },
+      form: {
+        name: '',
+        displayDay: '',
+        userCode: '',
+        shopId: '',
+        stdId: 0,
+        userId: 0,
+        btnType: 0,//0新建,1编辑编辑
+        userList: [],//穿梭已选
+        stdList: [],//穿梭已选
+        remain: 0,
+        ConsumeHour: 0,
+        addType: 0
+      },
+      tableDataLesson: [],
+      tableDataMember: [],
+      tableRadio: [],
+    }
+  },
+  mounted() {
+    if (this.$route.query.page == 'second') {
+      this.panel.name = this.$route.query.name;
+      this.activeName = 'second'
+    } else {
+      this.activeName = 'second'
+    }
+    //加载可查询的课程列表
+    this.panelSelect();
+    //加载会员预约页面右侧的日期
+    this.getFutureDays();
+  },
+  methods: {
+    clickChange(item) {
+      this.tableRadio = item
+    },
+    handleSelectionChange(val) {
+      this.multipleSelection = val;
+    },
+    // 选择右上方日期
+    choiceTime(i) {
+      this.choiceDate = parseInt(i);
+      // 读取当前页
+      if (this.activeName == 'first') {
+        this.lessonAppointTableQuery();
+      } else {
+        // second
+        this.memberAppointTableQuery();
+      }
+    },
+    panelSelect() {
+      let that = this;
+      const jsonStr = {
+        shopId: localStorage.shopId,
+        classId: -99
+      };
+      let paraRequest = new StandardRequest();
+      paraRequest.setShopid(localStorage.shopId);
+      paraRequest.setJsonstr(JSON.stringify(jsonStr));
+      paraRequest.setSign(getSignStr(jsonStr));
+      console.log(paraRequest);
+      that.client.classSimpleQuery(paraRequest, {"Token": localStorage.token}, (err, StandardReply) => {
+        if (err == null) {
+          console.log(StandardReply.getJsonrst());
+          let res = JSON.parse(StandardReply);
+          if (res.code == 0) {
+            if(res.rs){
+              that.panel.classOptions = turnClassResToOption(res.rs);
+              that.panel.classOptions.unshift({value: -99, label: '全部'})
+            }else {
+              return false;
+            }
+          } else {
+            that.$message.error(res.memo + ',错误代码:' + res.code);
+          }
+        } else {
+          let res = err;
+          that.$message.error(res.message + ',错误代码:' + res.code);
+          console.log(res);
+        }
+      });
+    },
+    //获取包含今天未来7天的日期
+    getFutureDays() {
+      let now = new Date();
+      let nowTime = now.getTime();
+      let oneDayTime = 24 * 60 * 60 * 1000;
+      let days = '';
+      let item = [];
+      let month = 0;
+      let day = 0;
+      for (let i = 0; i < 7; i++) {
+        days = new Date(nowTime + (i) * oneDayTime);//显示周日
+        month = days.getMonth() + 1;
+        day = days.getDate();
+        month = month < 10 ? '0' + month : month;
+        day = day < 10 ? '0' + day : day;
+        item = {
+          name: this.numberToWeek(days.getDay()),
+          data: days.getMonth() + 1 + '月' + days.getDate() + '日',
+          orderDate: days.getFullYear() + '-' + month + '-' + day
+        }
+        this.weeks.push(item)
+      }
+      this.memberAppointTableQuery();
+      this.lessonAppointTableQuery();
+    },
+    //获取门店该课程下的人员
+    getUserByClass(stdId) {
+      let that = this;
+      // 筛选相同的stdId的classId
+      that.form.stdList.map(function (item) {
+        if (item.value == stdId) {
+          that.form.ConsumeHour = item.ConsumeHour;
+
+          let paraRequest = new StandardRequest();
+          paraRequest.setShopid(localStorage.shopId);
+
+          //添加本店会员
+          if (that.form.addType == 1) {
+            const jsonStr = {
+              shopId: localStorage.shopId,
+              classId: item.classId,//-99代表查询全部
+              isAcross: 0//0:不跨店 1跨店  -99是全部
+            };
+            paraRequest.setJsonstr(JSON.stringify(jsonStr));
+            paraRequest.setSign(getSignStr(jsonStr));
+          }
+
+          //添加跨店会员
+          if (that.form.addType == 2) {
+            const jsonStr = {
+              shopId: localStorage.shopId,
+              classId: item.classId,//-99代表查询全部
+              isAcross: 0//0:不跨店 1跨店  -99是全部
+            };
+            paraRequest.setJsonstr(JSON.stringify(jsonStr));
+            paraRequest.setSign(getSignStr(jsonStr));
+          }
+
+          console.log(paraRequest);
+          that.client.vipUserSimpleQuery(paraRequest, {"Token": localStorage.token}, (err, StandardReply) => {
+            if (err == null) {
+              console.log(StandardReply.getJsonrst());
+              let res = JSON.parse(StandardReply);
+              if (res.code === 0) {
+                that.form.userId = '';
+                that.form.userList = turnResToOptionBySimViper(res.rs);
+              } else {
+                that.$message.error(res.memo + ',错误代码:' + res.code);
+              }
+            } else {
+              let res = err;
+              that.$message.error(res.message + ',错误代码:' + res.code);
+              console.log(res);
+            }
+          });
+        }
+      })
+    },
+    //更新选中会员的剩余课时
+    checkUserSelect(userId) {
+      let that = this;
+      this.form.userList.filter((v) => {
+        if (v.key == userId) {
+          that.form.remain = v.RemainHour;
+        }
+      })
+
+    },
+    //取消用户预约
+    cancelMemberReserve(row) {
+      let that = this;
+      this.$confirm('是否取消用户  ' + row.user_name + '  的预约?', '取消预约', {
+        confirmButtonText: '确定',
+        cancelButtonText: '取消',
+        type: 'warning'
+      }).then(() => {
+        const jsonStr = {
+          UuOrderId: row.uu_order_id,
+        };
+
+        let paraRequest = new StandardRequest();
+        paraRequest.setShopid(localStorage.shopId);
+        paraRequest.setJsonstr(JSON.stringify(jsonStr));
+        paraRequest.setSign(getSignStr(jsonStr));
+        console.log(paraRequest);
+        that.client.orderCancelByManager(paraRequest, {"Token": localStorage.token}, (err, StandardReply) => {
+          if (err == null) {
+            console.log(StandardReply.getJsonrst());
+            let res = JSON.parse(StandardReply);
+            if (res.code === 0) {
+              that.$message({
+                showClose: true,
+                message: row.user_name + '取消预约成功!',
+                type: 'success'
+              });
+              // table 重载
+              that.memberAppointTableQuery();
+            } else {
+              that.$message.error(res.memo + ',错误代码:' + res.code);
+            }
+          } else {
+            let res = err;
+            that.$message.error(res.message + ',错误代码:' + res.code);
+            console.log(res);
+          }
+        });
+      }).catch(() => {
+        this.$message({
+          type: 'info',
+          message: '已取消操作'
+        });
+      });
+    },
+    clearForm() {
+      // clear
+      this.form.stb_id = '';
+      this.form.userId = '';
+      this.form.name = '';
+      this.form.userCode = '';
+      this.form.shopId = '';
+      this.form.userList = [];
+    },
+    //新增预约
+    addAppoint(addType) {
+      this.clearForm();
+      // 加载当前可选课程
+      this.getClassListByOrderDate();
+      //控制弹出窗口数据
+      this.dialogAppointVisible = true;
+      this.form.displayDay = this.weeks[this.choiceDate].data + ' ' + this.weeks[this.choiceDate].name;
+      this.btnType = 0;
+      this.form.ConsumeHour = 0;
+      this.form.addType = addType
+      this.dialogTitle = '新增预约';
+    },
+    //提交预约
+    confirmAddAppoint() {
+      let that = this;
+      that.BtnConfirmOrderAddByManager = true;
+      const jsonStr = {
+        UUStdId: this.form.stb_id,
+        UuUserId: this.form.userId,
+      };
+
+      let paraRequest = new StandardRequest();
+      paraRequest.setShopid(localStorage.shopId);
+      paraRequest.setJsonstr(JSON.stringify(jsonStr));
+      paraRequest.setSign(getSignStr(jsonStr));
+      console.log(paraRequest);
+      that.client.orderAddByManager(paraRequest, {"Token": localStorage.token}, (err, StandardReply) => {
+        that.BtnConfirmOrderAddByManager = false;
+        if (err == null) {
+          console.log(StandardReply.getJsonrst());
+          let res = JSON.parse(StandardReply);
+          if (res.code === 0) {
+            that.$message({
+              showClose: true,
+              message: '预约添加成功!',
+              type: 'success'
+            });
+            this.memberAppointTableQuery();
+            that.dialogAppointVisible = false;
+          } else {
+            that.$message.error(res.memo + ',错误代码:' + res.code);
+          }
+        } else {
+          let res = err;
+          that.$message.error(res.message + ',错误代码:' + res.code);
+          console.log(res);
+        }
+      });
+    },
+    // 加载当前可选课程
+    getClassListByOrderDate() {
+      let that = this;
+      let dayIndex = parseInt(this.choiceDate);
+
+      const jsonStr = {
+        shopId: localStorage.shopId,
+        orderDate: this.weeks[dayIndex].orderDate
+      };
+
+      let paraRequest = new StandardRequest();
+      paraRequest.setShopid(localStorage.shopId);
+      paraRequest.setJsonstr(JSON.stringify(jsonStr));
+      paraRequest.setSign(getSignStr(jsonStr));
+      console.log(paraRequest);
+      that.client.classListByOrderDate(paraRequest, {"Token": localStorage.token}, (err, StandardReply) => {
+        if (err == null) {
+          console.log(StandardReply.getJsonrst());
+          let res = JSON.parse(StandardReply);
+          if (res.code === 0) {
+            that.form.stdList = turnStdToOption(res.rs);
+          } else {
+            that.$message.error(res.memo + ',错误代码:' + res.code);
+          }
+        } else {
+          let res = err;
+          that.$message.error(res.message + ',错误代码:' + res.code);
+          console.log(res);
+        }
+      });
+    },
+    //查看课程预约详情
+    getAppointDetail(row) {
+      let that = this;
+      const jsonStr = {
+        UUStdId: row.uu_std_id
+      };
+
+      let paraRequest = new StandardRequest();
+      paraRequest.setShopid(localStorage.shopId);
+      paraRequest.setJsonstr(JSON.stringify(jsonStr));
+      paraRequest.setSign(getSignStr(jsonStr));
+      console.log(paraRequest);
+      that.client.userOrderQueryByStd(paraRequest, {"Token": localStorage.token}, (err, StandardReply) => {
+        if (err == null) {
+          console.log(StandardReply.getJsonrst());
+          let res = JSON.parse(StandardReply);
+          if (res.code === 0) {
+            if(res.rs){
+              this.dialogTableVisible = true;
+              this.gridData = res.rs;
+            }else{
+              that.$message.info("当前课程暂无预约");
+            }
+          } else {
+            that.$message.error(res.memo + ',错误代码:' + res.code);
+          }
+        } else {
+          let res = err;
+          that.$message.error(res.message + ',错误代码:' + res.code);
+          console.log(res);
+        }
+      });
+    },
+    appointPercent(percentage) {
+      return percentage === 100 ? '已满' : `${percentage}%`;
+    },
+    //查询按钮
+    query() {
+      let that = this;
+      that.searchBtnStatus = true;
+      let totalTime = 2
+      let clock = window.setInterval(() => {
+        totalTime--
+        if (totalTime < 0) {
+          totalTime = 2;
+          that.searchBtnStatus = false;
+        }
+      }, 1000)
+      this.memberAppointTableQuery();
+      this.$message.success('查询完毕');
+    },
+    //页面数据-课程预约-查询
+    lessonAppointTableQuery() {
+      let that = this;
+      that.loading = true;
+      let dayIndex = parseInt(this.choiceDate);
+      //含参数调用过程
+      const jsonStr = {
+        shopId: localStorage.shopId,
+        orderDate: this.weeks[dayIndex].orderDate,
+        start:that.start,
+        tableMax:that.pagination.pageItem
+      };
+
+      console.log(localStorage.token);
+      let paraRequest = new StandardRequest();
+      paraRequest.setShopid(localStorage.shopId);
+      paraRequest.setJsonstr(JSON.stringify(jsonStr));
+      paraRequest.setSign(getSignStr(jsonStr));
+      console.log(paraRequest);
+      that.client.classOrderQuery(paraRequest, {"Token": localStorage.token}, (err, StandardReply) => {
+        if (err == null) {
+          console.log(StandardReply.getJsonrst());
+          let res = JSON.parse(StandardReply);
+          if (res.code === 0) {
+            that.loading = false;
+            if (res.rs) {
+              that.allTableData = [];
+              that.allTableData = res.rs;
+              that.recordsTotal = res.rs.length;
+            } else {
+              that.allTableData = [];
+              that.recordsTotal = 0;
+            }
+            // 设置分页数据
+            that.setPagination();
+          } else {
+            that.$message.error(res.memo + ',错误代码:' + res.code);
+          }
+        } else {
+          let res = err;
+          that.$message.error(res.message + ',错误代码:' + res.code);
+          console.log(res);
+        }
+      })
+    },
+    //页面数据-用户预约-查询
+    memberAppointTableQuery() {
+      let that = this;
+      that.loading = true;
+      let dayIndex = parseInt(this.choiceDate);
+      const jsonStr = {
+        shopId: localStorage.shopId,
+        classId: this.panel.class_id,
+        name: this.panel.name,
+        phone: this.panel.phone,
+        orderDate: this.weeks[dayIndex].orderDate,
+        start:that.start,
+        tableMax:that.pagination.pageItem
+      };
+      let paraRequest = new StandardRequest();
+      paraRequest.setShopid(localStorage.shopId);
+      paraRequest.setJsonstr(JSON.stringify(jsonStr));
+      paraRequest.setSign(getSignStr(jsonStr));
+      console.log(paraRequest);
+      that.client.vipUserOrderQuery(paraRequest, {"Token": localStorage.token}, (err, StandardReply) => {
+        if (err == null) {
+          console.log(StandardReply.getJsonrst());
+          let res = JSON.parse(StandardReply);
+          if (res.code === 0) {
+            that.loading = false;
+            if (res.rs) {
+              that.allTableData2 = res.rs;
+              that.recordsTotal2 = res.rs.length;
+            } else {
+              that.allTableData2 = [];
+              that.recordsTotal2 = 0;
+            }
+            // 设置分页数据
+            that.setPagination2();
+          } else {
+            that.$message.error(res.memo + ',错误代码:' + res.code);
+          }
+        } else {
+          let res = err;
+          that.$message.error(res.message + ',错误代码:' + res.code);
+          console.log(res);
+        }
+      });
+    },
+    // 设置分页数据
+    setPagination() {
+      // 分页属性
+      let that = this;
+      that.pagination.total = that.recordsTotal;
+
+      // 默认分页
+      that.tableDataLesson = that.allTableData.filter((item, index) => {
+        return index < that.pagination.pageItem;
+      });
+    },
+    // 设置分页数据
+    setPagination2() {
+      // 分页属性
+      let that = this;
+      that.pagination.total = that.recordsTotal2;
+      // 默认分页
+      that.tableDataMember = that.allTableData2.filter((item, index) => {
+        return index < that.pagination.pageItem;
+      });
+    },
+    // 每页显示数量
+    handleSizeChange() {
+      let that = this;
+      that.tableDataLesson = that.allTableData.filter((item, index) => {
+        return index < that.pagination.pageItem;
+      });
+      that.draw = that.pagination.pageItem;
+      that.lessonAppointTableQuery();
+    },
+    // 翻页
+    pageChange(pageIndex) {
+      let that = this;
+      // 获取当前页
+      let index = that.pagination.pageItem * (pageIndex - 1);
+      // 数据总数
+      let nums = that.pagination.pageItem * pageIndex;
+      // 容器
+      let tables = [];
+      for (let i = index; i < nums; i++) {
+        if (that.allTableData[i]) {
+          tables.push(that.allTableData[i])
+        }
+        this.tableDataLesson = tables;
+      }
+      that.start = index * that.draw;
+      // that.lessonAppointTableQuery();
+    },
+    // 自动排序
+    sortChange(params) {
+      console.log(params)
+    },
+    // 过滤时间
+    filterFmtDate(value, row, column) {
+      return nonTfmtDate(column, 11);
+    },
+    // 过滤金额
+    filterMoney(value, row, column) {
+      let that = this;
+      return parseFloat(column).toFixed(2);
+    },
+    numberToWeek(val) {
+      switch (parseInt(val)) {
+        case 1:
+          return '星期一';
+          break;
+        case 2:
+          return '星期二';
+          break;
+        case 3:
+          return '星期三';
+          break;
+        case 4:
+          return '星期四';
+          break;
+        case 5:
+          return '星期五';
+          break;
+        case 6:
+          return '星期六';
+          break;
+        case 0:
+          return '星期天';
+          break;
+      }
+    }
+  },
+  watch: {
+    $route(to) {
+      if (to.name == 'appointManage') {
+        this.panelSelect();
+        if (this.$route.query.page == 'second') {
+          this.activeName = 'second';
+          this.panel.name = this.$route.query.name;
+          this.memberAppointTableQuery();
+        }
+      }
+    },
+    activeName(val) {
+      // 重置一次选择
+      this.tableRadio = [];
+      if (val == 'first') {
+        this.lessonAppointTableQuery();
+      } else {// second
+        this.memberAppointTableQuery();
+        this.panelSelect();
+      }
+    },
+  }
+}
+</script>
+
+<style scoped>
+@import "../../assets/css/panel.css";
+
+.context {
+  /* height: 770px; */
+
+  overflow-y: scroll;
+  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 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;
+}
+
+.dialogContent {
+  width: 100%;
+  overflow: hidden;
+  display: block;
+  margin: 0 auto;
+}
+
+.dialogContent .pull-left {
+  width: 30%;
+  float: left;
+}
+
+.dialogContent .pull-right {
+  width: 70%;
+  float: right;
+}
+
+.current {
+  width: 158px;
+  height: 23px;
+  /*float: left;*/
+  border-radius: 250px;
+  text-align: center;
+  background: #F0F2F5;
+  color: #545454;
+  font-size: 14px;
+  padding: 3px 10px;
+  margin-left: 20px;
+}
+
+.timeList {
+  width: 800px;
+  overflow: hidden;
+  float: right;
+  position: relative;
+  z-index: 100;
+  cursor: pointer;
+}
+
+.timeList ul {
+  width: 100%;
+  overflow: hidden;
+  display: block;
+  margin: 0 auto;
+  list-style: none;
+}
+
+.timeList li {
+  width: 100px;
+  overflow: hidden;
+  list-style: none;
+  float: left;
+  margin-right: 6px;
+  border: 1px solid #ccc;
+  border-bottom: 0;
+  text-align: center;
+  height: 40px;
+  background: #fff;
+  z-index: 222;
+}
+
+em {
+  font-style: normal;
+}
+
+.timeList em {
+  width: 100%;
+  overflow: hidden;
+  display: block;
+  margin: 0 auto;
+  font-size: 14px;
+  text-align: center;
+}
+
+.timeList span {
+  width: 100%;
+  overflow: hidden;
+  display: block;
+  margin: 0 auto;
+  font-size: 12px;
+  text-align: center;
+}
+
+.timeList li.active {
+  border: 1px solid #3799FF;
+  border-bottom: 0;
+}
+
+.timeList li.active em {
+  color: #3799FF;
+}
+
+.timeList li.active span {
+  color: #3799FF;
+}
+
+.panel_control /deep/ .el-input {
+  max-width: 140px;
+  float: left;
+}
+
+.panel-body em {
+  float: left;
+  line-height: 40px;
+  margin-right: 10px;
+}
+
+.gary {
+  border: 1px solid #ccc;
+  border-bottom: 0;
+  color: #ccc;
+}
+
+.pull-right {
+  float: right;
+
+}
+
+.lessons {
+  padding: 1px 7px;
+  border-radius: 250px;
+  float: left;
+  color: #000;
+}
+
+/deep/ .el-progress__text {
+  position: relative;
+  top: 1px;
+  float: right;
+  line-height: 14px;
+  height: 16px;
+}
+
+/deep/ .el-progress-bar {
+  width: 190px;
+  float: left;
+  overflow: hidden;
+  margin-top: 5px;
+}
+
+.timeList li.active {
+  color: #fff;
+  background: #409EFF;
+}
+
+.timeList li.active span, .timeList li.active em {
+  color: #fff;
+}
+
+.vipAddBtn {
+  margin-right: 10px;
+}
+
+/*ipad only*/
+@media only screen and (max-width: 1366px) {
+  .panel-body em {
+    font-size: 12px;
+  }
+
+  .timeList {
+    width: 510px;
+  }
+
+  .timeList li {
+    width: 60px;
+    font-size: 12px;
+  }
+
+  .timeList em {
+    font-size: 12px;
+  }
+
+  .timeList span {
+    font-size: 12px;
+  }
+
+  .panel_control /deep/ .el-input {
+    width: 130px;
+  }
+
+  /deep/ .el-button--warning {
+    margin-bottom: 5px;
+  }
+
+  .acrossAddBtn {
+    margin-right: 0;
+  }
+
+}
+</style>

+ 585 - 0
src/views/Appointment/AppointRecord.vue

@@ -0,0 +1,585 @@
+<template>
+  <div class="context">
+    <div class="panel">
+      <h5>预约记录</h5>
+      <div class="panel-body">
+
+        <div class="panel_control">
+          <el-row :gutter="1">
+
+            <el-col :span=4>
+              <em>姓名:</em>
+              <el-input v-model="panel.name" placeholder="请输入姓名" style="width: 120px"/>
+            </el-col>
+
+            <el-col :span="5">
+              <em>手机号:</em>
+              <el-input v-model="panel.phone" placeholder="请输入手机号" type="number" style="width: 150px"/>
+            </el-col>
+
+            <el-col :span="6">
+              <em>日期:</em>
+              <el-date-picker
+                  v-model="panel.timeScope"
+                  type="daterange"
+                  range-separator="至"
+                  start-placeholder="开始日期"
+                  end-placeholder="结束日期"
+                  style="width: 240px; height: 40px; line-height: 40px"/>
+            </el-col>
+
+            <el-col :span="4">
+              <em>预约课程:</em>
+              <el-select v-model="panel.classId">
+                <el-option
+                    v-for="item in panel.classOptions"
+                    :key="item.value"
+                    :label="item.label"
+                    :value="item.value">
+                </el-option>
+              </el-select>
+            </el-col>
+
+            <el-col :span="4">
+              <em>状态:</em>
+              <el-select v-model="panel.status">
+                <el-option
+                    v-for="item in panel.options"
+                    :key="item.value"
+                    :label="item.label"
+                    :value="item.value">
+                </el-option>
+              </el-select>
+            </el-col>
+
+            <el-col :span="2">
+              <el-button size="" type="primary" @click="query" :disabled="serachBtnStatus" plain>查询</el-button>
+            </el-col>
+
+          </el-row>
+        </div>
+      </div>
+    </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 label="序号" type="index" width="50" align="center">
+          <template scope="scope">
+            <span>{{ (start) + scope.$index + 1 }}</span>
+          </template>
+        </el-table-column>
+        <el-table-column
+            prop="user_name"
+            label="会员名"
+            width="90"
+            align="center"
+        >
+        </el-table-column>
+        <el-table-column
+            prop="usercode"
+            label="手机号"
+            width="110"
+            sortable
+        >
+        </el-table-column>
+        <el-table-column
+            prop="class_name"
+            label="预约课程"
+            align="center"
+            width="110"
+            sortable
+        >
+          <template slot-scope="scope">
+                        <span class="lessons"
+                              :style="{ background:scope.row.class_color }">{{ scope.row.class_name }}</span>
+          </template>
+        </el-table-column>
+        <el-table-column
+            prop="consume_hour"
+            label="消耗课时"
+            align="center"
+            width="120"
+            sortable
+        >
+        </el-table-column>
+        <el-table-column
+            prop="created_at"
+            label="预约日期"
+            width="180"
+            align="center"
+            :formatter="filterFmtDate"
+            sortable
+        >
+        </el-table-column>
+        <el-table-column
+            prop="begin_str"
+            label="上课时间"
+            align="center"
+            width="180"
+            sortable
+        >
+          <template slot-scope="scope">
+            {{ scope.row.begin_time |filterNoTTime }} - {{ scope.row.end_str }}
+          </template>
+        </el-table-column>
+        <el-table-column
+            prop="RemainHour"
+            label="跨店类型"
+            align="center"
+            width="130"
+            sortable
+        >
+          <template slot-scope="scope">
+            <span v-if="scope.row.remain_hour == ''" style="color:red;">跨店</span>
+            <span v-else style="color: #000">本店用户</span>
+          </template>
+        </el-table-column>
+        <el-table-column
+            prop="Status"
+            label="状态"
+            sortable
+        >
+          <template slot-scope="scope">
+            <span v-if="scope.row.status == 1" style="color:yellowgreen;">已预约</span>
+            <span v-if="scope.row.status == 2" style="color: #ccc">已取消</span>
+            <span v-if="scope.row.status == 3" style="color: red">预约未到</span>
+            <span v-if="scope.row.status == 4" style="color:#000;">已完成</span>
+          </template>
+        </el-table-column>
+      </el-table>
+      <br>
+      <el-pagination
+          background
+          :total="pagination.total"
+          :page-size="pagination.pageItem"
+          @current-change="pageChange"
+          :current-page.sync="cur_page"
+      ></el-pagination>
+    </div>
+  </div>
+</template>
+
+<script>
+import Global from '../../Global.js'
+import {
+  OrderListQuery,
+} from "../../api/getApiRes";
+import {
+  StandardRequest
+} from "@/grpc/base_pb";
+
+let qs = require('qs');
+export default {
+  data() {
+    return {
+      serachBtnStatus: false,
+      dialogVisible: false,//其他dialog
+      dialogMemberVisible: false,//新增会员dialog
+      dialogLesson: false,//课时调整
+      dialogGift: false,//赠送课时调整
+      dialogExpTime: false,//有效期调整
+      dialogLessonTable: false,//会员课程
+      dialogTitle: '新增会员',
+      dialogValue: [],
+      start: 0,
+      draw: 1,
+      // panel 配置项目
+      panel: {
+        status: -99,
+        classId: -99,
+        timeScope: globalBt2(7),
+        draw: 1,
+        start: 0,
+        recordsTotal: 0,
+        tableData: [],
+        allTableData: [],
+        limit: '10',
+        multipleSort: false,
+        loading: false,
+        fileList: [],
+        multipleSelection: [],
+        classOptions: [],
+        options: [
+          {value: -99, label: '全部'},
+          {value: 1, label: '已预约'},
+          {value: 2, label: '已取消'},
+          {value: 3, label: '预约未到'},
+          {value: 4, label: '已完成'},
+        ],
+        time1: globalBt(),
+      },
+      multipleSelection: [],
+      pagination: {
+        pageItem: 10,
+        pageoptions: pageOptions(),
+        total: 100,
+        pageIndex: 1,
+      },
+      form: {
+        name: '',
+        userCode: '',
+        shopId: '',
+        memberType: 1,
+        lesson: 1,
+        gift: 1,
+        btnType: 0,//0新建,1编辑编辑
+        memo: '',
+        expTime: '',
+        dialogdata: [],//穿梭待选
+        dialogValue: [],//穿梭已选
+      },
+      memberTypes: [
+        {value: 1, label: '年会员'},
+        {value: 2, label: '充值会员'},
+      ],
+      tableData: []
+    }
+  },
+  mounted() {
+    this.panelSelect();
+    this.getTableQuery();
+  },
+  methods: {
+    // 加载选项
+    panelSelect() {
+      let that = this;
+      const jsonStr = {
+        shopId: localStorage.shopId,
+        classId: -99
+      };
+      let paraRequest = new StandardRequest();
+      paraRequest.setShopid(localStorage.shopId);
+      paraRequest.setJsonstr(JSON.stringify(jsonStr));
+      paraRequest.setSign(getSignStr(jsonStr));
+      console.log(paraRequest);
+      that.client.classSimpleQuery(paraRequest, {"Token": localStorage.token}, (err, StandardReply) => {
+        if (err == null) {
+          console.log(StandardReply.getJsonrst());
+          let res = JSON.parse(StandardReply);
+          if (res.code == 0) {
+            if(res.rs){
+              that.panel.classOptions = turnClassResToOption(res.rs);
+              that.panel.classOptions.unshift({value: -99, label: '全部'})
+            }else {
+              return false;
+            }
+          } else {
+            that.$message.error(res.memo + ',错误代码:' + res.code);
+          }
+        } else {
+          let res = err;
+          that.$message.error(res.message + ',错误代码:' + res.code);
+          console.log(res);
+        }
+      });
+    },
+    handleSelectionChange(val) {
+      this.multipleSelection = val;
+    },
+    // 查询按钮
+    query() {
+      let that = this;
+      that.start = 0;
+      that.cur_page = 1;
+      that.serachBtnStatus = true;
+      let totalTime = 2;
+      let clock = window.setInterval(() => {
+        totalTime--;
+        if (totalTime < 0) {
+          totalTime = 2;
+          that.serachBtnStatus = false;
+        }
+      }, 1000);
+      this.getTableQuery();
+      this.$message.success('查询完毕');
+    },
+    clearForm() {
+      // clear
+      this.form.name = '';
+      this.form.userCode = '';
+      this.form.shopId = '';
+    },
+    // 页面数据查询
+    getTableQuery() {
+      let that = this;
+      that.loading = true;
+      console.log(that.panel.timeScope[0]);
+
+      const jsonStr = {
+        shopId: localStorage.shopId,
+        classId: that.panel.classId,//
+        name: that.panel.name,//
+        phone: that.panel.phone,//
+        beginOrdertime: nonTfmtDatetoLength(that.panel.timeScope[0], 10) + " 00:00:00",//
+        endOrdertime: nonTfmtDatetoLength(that.panel.timeScope[1], 10) + " 23:59:59",//
+        orderStaus: that.panel.status,//标签名
+        start: that.start,
+        tableMax: that.pagination.pageItem
+      };
+
+      let paraRequest = new StandardRequest();
+      paraRequest.setShopid(localStorage.shopId);
+      paraRequest.setJsonstr(JSON.stringify(jsonStr));
+      paraRequest.setSign(getSignStr(jsonStr));
+      console.log(paraRequest);
+      that.client.orderListQuery(paraRequest, {"Token": localStorage.token}, (err, StandardReply) => {
+        if (err == null) {
+          console.log(StandardReply.getJsonrst());
+          let res = JSON.parse(StandardReply);
+          if (res.code === 0) {
+            that.loading = false;
+            if(res.rs){
+              that.allTableData = res.rs;
+              that.recordsTotal = res.rs.length;
+            }else{
+              that.allTableData = [];
+              that.recordsTotal = 0;
+            }
+            // 设置分页数据
+            that.setPagination();
+          } else {
+            that.$message.error(res.memo + ',错误代码:' + res.code);
+          }
+        } else {
+          let res = err;
+          that.$message.error(res.message + ',错误代码:' + res.code);
+          console.log(res);
+        }
+      });
+    },
+
+    // 设置分页数据
+    setPagination() {
+      // 分页属性
+      let that = this;
+      that.pagination.total = that.recordsTotal;
+
+      // 默认分页
+      that.tableData = that.allTableData.filter((item, index) => {
+        return index < that.pagination.pageItem;
+      });
+    },
+    // 每页显示数量
+    handleSizeChange() {
+      let that = this;
+      that.tableData = that.allTableData.filter((item, index) => {
+        return index < that.pagination.pageItem;
+      });
+      that.draw = that.pagination.pageItem;
+      that.getTableQuery();
+    },
+    // 翻页
+    pageChange(pageIndex) {
+      let that = this;
+      // 获取当前页
+      let index = that.pagination.pageItem * (pageIndex - 1);
+      // 数据总数
+      let nums = that.pagination.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 nonTfmtDate(column, 11);
+    },
+    // 过滤金额
+    filterMoney(value, row, column) {
+      let that = this;
+      return parseFloat(column).toFixed(2);
+    },
+  },
+  filters: {
+    filterNoTTime: function (value) {
+      if (!value) {
+        return 0
+      } else {
+        return nonTfmtDatetoLength(value, 16);
+      }
+    },
+  },
+  watch: {
+    $route(to) {
+      if (to.name == 'appointRecord') {
+        this.panelSelect();
+        this.getTableQuery();
+      }
+    },
+  },
+}
+</script>
+
+<style scoped>
+@import "../../assets/css/panel.css";
+
+.context {
+  /* height: 770px; */
+  overflow-y: scroll;
+
+  display: block;
+  margin: 0 auto;
+  background-color: #fff !important;
+  padding: 30px;
+}
+
+.panel-body {
+  padding: 20px;
+  background: #F0F2F5;
+}
+
+.panel-body em {
+  line-height: 40px;
+}
+
+.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;
+}
+
+.table el-table-column{
+  float: right;
+  width: 20px;
+  text-align: center;
+}
+
+.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;
+}
+
+.dialogContent {
+  width: 100%;
+  overflow: hidden;
+  display: block;
+  margin: 0 auto;
+}
+
+.dialogContent .pull-left {
+  width: 30%;
+  float: left;
+}
+
+.dialogContent .pull-right {
+  width: 70%;
+  float: right;
+}
+
+.panel /deep/ .el-date-editor--daterange {
+  /*width: 260px;*/
+}
+
+/deep/ .el-col-4 {
+  width: 15% !important;
+}
+
+.panel /deep/ .el-input__inner {
+  /*width: 130px;*/
+}
+
+.panel /deep/ .el-input {
+  /*width: 130px;*/
+}
+
+.panel /deep/ .el-select {
+  width: 130px;
+}
+
+/deep/ .el-date-editor .el-range-separator {
+  line-height: 22px;
+}
+
+.lessons {
+  padding: 1px 7px;
+  border-radius: 250px;
+  float: left;
+  color: #000;
+}
+
+.el-col-7 {
+  width: 25%;
+}
+
+.panel /deep/ .el-date-editor--daterange {
+  width: 260px;
+}
+
+/*ipad only*/
+@media only screen and (max-width: 1366px) {
+  .panel-body {
+  }
+
+  .panel .el-button {
+    margin-top: 5px;
+  }
+
+  .panel .el-col-4:nth-child(6) {
+    width: 9% !important;
+    float: right;
+    margin-top: 25px;
+  }
+
+  .el-col-7 {
+    width: 29%;
+  }
+}
+
+</style>

+ 0 - 11
src/views/Auth/Login.vue

@@ -66,7 +66,6 @@
 
 import {
   GenVerifyImageRequest,
-  GetShopNaviRequest,
   SignInRequest,
   ShopListRequest
 } from "@/grpc/base_pb";
@@ -274,16 +273,6 @@ export default {
         that.$message.error('该商家当前状态异常\t' + this.currentRow.status);
       }
     },
-    getManagerSelfQuery() {
-      let that = this;
-      let getRequest = new GetShopNaviRequest();
-      getRequest.setShopid(0);
-
-      that.client.getShopNavi(getRequest, {}, (err, response) => {
-        let res = response.toObject()
-        console.log(res);
-      });
-    }
   },
 }
 </script>

+ 3 - 3
src/views/SchoolTimeTable/courseEdit.vue → src/views/Class/ClassEdit.vue

@@ -1504,7 +1504,7 @@ export default {
 						that.recordsTotal = 0;
 					}
 					// 设置分页数据
-					that.setPaginations();
+					that.setPagination();
 				} else {
 					that.$message.error(json.Memo + " 错误码:" + json.Code);
 				}
@@ -1564,7 +1564,7 @@ export default {
 			});
 		},
 		// 设置分页数据
-		setPaginations() {
+		setPagination() {
 			// 分页属性
 			let that = this;
 			that.pageination.total = that.recordsTotal;
@@ -1691,7 +1691,7 @@ export default {
 	},
 	watch: {
 		$route(to) {
-			if (to.name == "courseEdit") {
+			if (to.name == "ClassEdit") {
 				this.getTableQuery();
 				this.FinishClass = this.$route.query.FinishClass;
 				this.ClassType = this.$route.query.ClassType;

+ 2 - 2
src/views/SchoolTimeTable/finishDetail.vue → src/views/Class/ClassFinishDetail.vue

@@ -608,14 +608,14 @@
                         }
 
                         // 设置分页数据
-                        that.setPaginations();
+                        that.setPagination();
                     } else {
                         that.$message.error(json.Memo + ' 错误码:' + json.Code);
                     }
                 })
             },
             // 设置分页数据
-            setPaginations() {
+            setPagination() {
                 // 分页属性
                 let that = this;
                 that.pageination.total = that.recordsTotal;

+ 397 - 0
src/views/Class/ClassFinishManage.vue

@@ -0,0 +1,397 @@
+<template>
+  <div class="context">
+    <div class="panel">
+      <h5>下课管理
+        <!--<span class="current">{{current}}</span>-->
+      </h5>
+    </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="index"
+            label="序号"
+            align="center"
+            width="50">
+        </el-table-column>
+        <el-table-column
+            prop="EndTime"
+            label="下课时间"
+            :formatter="filterFmtDate"
+        >
+        </el-table-column>
+        <el-table-column
+            prop="ClassName"
+            label="课程"
+            sortable>
+          <template slot-scope="scope">
+                        <span class="lessonSpan"
+                              :style="{background:scope.row.ClassColor}">{{ scope.row.ClassName }}</span>
+          </template>
+        </el-table-column>
+        <el-table-column
+            prop="ConsumeHour"
+            label="消耗课时"
+            sortable
+        >
+        </el-table-column>
+        <el-table-column
+            prop="OrderNum"
+            label="实际预约人数"
+            sortable
+        >
+        </el-table-column>
+        <el-table-column
+            prop="Status"
+            label="操作"
+        >
+          <template slot-scope="scope">
+            <el-button type="primary" round size="mini" @click="checkClassOverPrepare(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>
+  </div>
+</template>
+
+<script>
+import Global from '../../Global.js'
+import {
+  ClassPreFinishListQuery,
+  ClassOverPrepare,
+} from "../../api/getApiRes";
+
+let qs = require('qs');
+export default {
+  data() {
+    return {
+      dialogVisible: false,//其他dialog
+      dialogFinishVisible: false,//确认下课dialog
+      dialogLesson: false,//课时调整
+      dialogGift: false,//赠送课时调整
+      dialogExpTime: false,//有效期调整
+      dialogLessonTable: false,//会员课程
+      dialogTitle: '',
+      current: getNowDate(),
+      dialogValue: [],
+      // panel 配置项目
+      panel: {
+        usercode: '',
+        username: '',
+        compname: '',
+        keyword: '',
+        USERCODE: '',
+        endType: '',
+        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: '已完成'},
+        ],
+        endTypeOptions: [
+          {value: 99, label: '全部'},
+          {value: 30, label: '近一个月'},
+          {value: 7, label: '近一周'},
+          {value: 1, label: '当日'},
+        ],
+        time1: globalBt(),
+      },
+      multipleSelection: [],
+      pageination: {
+        pageItem: 10,
+        pageoptions: pageOptions(),
+        total: 100,
+        pageIndex: 1,
+      },
+      form: {
+        name: '',
+        userCode: '',
+        coach: '',
+        coachOptions: [],
+        shopId: '',
+        memberType: 1,
+        lesson: 1,
+        gift: 1,
+        btnType: 0,//0新建,1编辑编辑
+        memo: '',
+        expTime: '',
+        dialogdata: [],//穿梭待选
+        dialogValue: [],//穿梭已选
+      },
+      memberTypes: [
+        {value: 1, label: '年会员'},
+        {value: 2, label: '充值会员'},
+      ],
+      tableData: []
+    }
+  },
+  mounted() {
+    this.getTableQuery();
+  },
+  methods: {
+    // 检测当前课是否处于可改变状态
+    checkClassOverPrepare(row) {
+      let that = this;
+      let param = {
+        token: localStorage.token,
+        stdId: row.StdId,
+      };
+      let postdata = qs.stringify(param);
+      ClassOverPrepare(postdata).then(res => {
+        let json = res;
+        if (json.Code == 0) {
+          that.goFinish(row);
+        } else {
+          that.$message.error(json.Memo + ' 错误码:' + json.Code);
+        }
+      })
+    },
+    goFinish(row) {
+      this.$router.push({
+        path: '/finishDetail', query: {
+          id: row.StdId,
+          classId: row.ClassId,
+          ClassName: row.ClassName,
+          BeginTime: row.BeginTime,
+        }
+      });
+    },
+    handleSelectionChange(val) {
+      this.multipleSelection = val;
+    },
+    // 页面数据查询
+    getTableQuery() {
+      let that = this;
+      that.loading = true;
+      let param = {
+        token: localStorage.token,
+        tagname: that.panel.tagname,//标签名
+        start: 1,//
+        tableMax: 9999,//
+      };
+      let postdata = qs.stringify(param);
+      ClassPreFinishListQuery(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.setPagination();
+        } else {
+          that.$message.error(json.Memo + ' 错误码:' + json.Code);
+        }
+      })
+    },
+    // 设置分页数据
+    setPagination() {
+      // 分页属性
+      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();
+    },
+    // 过滤时间
+    filterFmtDate(value, row, column) {
+      let that = this;
+      return nonTfmtDate(column, 11);
+    },
+  },
+  watch: {
+    $route(to) {
+      if (to.name == 'ClassFinishManage') {
+        this.getTableQuery();
+      }
+    },
+  },
+}
+</script>
+
+<style scoped>
+@import "../../assets/css/panel.css";
+
+.context {
+  /* height: 770px; */
+
+  overflow-y: scroll;
+  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 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;
+}
+
+.dialogContent {
+  width: 100%;
+  overflow: hidden;
+  display: block;
+  margin: 0 auto;
+}
+
+.dialogContent .pull-left {
+  width: 30%;
+  float: left;
+}
+
+.dialogContent .pull-right {
+  width: 70%;
+  float: right;
+}
+
+.blueTitle {
+  width: 200px;
+  overflow: hidden;
+  display: block;
+  margin: 0 auto;
+  margin-top: 10px;
+  margin-bottom: 40px;
+  background: #F0F2F5;
+  border-radius: 19px;
+  text-align: center;
+  color: #3799FF;
+  font-size: 16px;
+  padding: 5px 24px;
+}
+
+.current {
+  width: 158px;
+  height: 23px;
+  /*float: left;*/
+  border-radius: 250px;
+  text-align: center;
+  background: #F0F2F5;
+  color: #545454;
+  font-size: 14px;
+  padding: 3px 10px;
+  margin-left: 20px;
+}
+
+.lessonSpan {
+  width: 78px;
+  height: 22px;
+  border-radius: 11px;
+  margin-right: 5px;
+  float: left;
+  margin-bottom: 3px;
+  text-align: center;
+  color: #000;
+  font-size: 12px;
+}
+</style>

+ 6 - 6
src/views/SchoolTimeTable/coursesHistory.vue → src/views/Class/ClassHistory.vue

@@ -4,8 +4,8 @@
             <h5>课程管理
             </h5>
             <div class="likeTab">
-                <el-button type="" @click="goType('courses')"  size="mini">当前课程</el-button>
-                <el-button type="primary" @click="goType('coursesHistory')"  size="mini">历史记录</el-button>
+                <el-button type="" @click="goType('classManage')"  size="mini">当前课程</el-button>
+                <el-button type="primary" @click="goType('classHistory')"  size="mini">历史记录</el-button>
             </div>
             <div class="panel-body">
                 <div class="panel_control">
@@ -292,7 +292,7 @@
                         that.dialogMemberVisible = false;
                         this.getTableQuery();
                         this.$router.push({
-                            path: '/courseEdit',
+                            path: '/classEdit',
                             query: {
                                 StdId: that.form.StdId,
                                 ClassName: that.form.ClassName,
@@ -502,14 +502,14 @@
                             that.recordsTotal = 0;
                         }
                         // 设置分页数据
-                        that.setPaginations();
+                        that.setPagination();
                     } else {
                         that.$message.error(json.Memo + ' 错误码:' + json.Code);
                     }
                 })
             },
             // 设置分页数据
-            setPaginations() {
+            setPagination() {
                 // 分页属性
                 let that = this;
                 that.pageination.total = that.recordsTotal;
@@ -554,7 +554,7 @@
         },
         watch: {
             $route(to) {
-                if (to.name == 'courses') {
+                if (to.name == 'classHistory') {
                     this.getTableQuery();
                 }
             },

+ 837 - 0
src/views/Class/ClassManage.vue

@@ -0,0 +1,837 @@
+<template>
+  <div class="context">
+    <div class="panel">
+      <h5>课程管理
+      </h5>
+      <div class="likeTab">
+        <el-button type="primary" @click="goType('classManage')" size="mini">当前课程</el-button>
+        <el-button type="" @click="goType('classHistory')" size="mini">历史记录</el-button>
+      </div>
+      <div class="panel-body">
+        <div class="panel_control">
+          <el-row :gutter="20">
+            <el-col :span="7">
+              <el-date-picker v-model="panel.timeScope" type="daterange" range-separator="至"
+                              start-placeholder="开始日期" end-placeholder="结束日期">
+              </el-date-picker>
+            </el-col>
+            <el-col :span="4">
+              <el-button size="" type="primary" @click="query" :disabled="searchBtnStatus" plain>查询
+              </el-button>
+            </el-col>
+          </el-row>
+        </div>
+      </div>
+    </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 label="序号" type="index" width="50" align="center" fixed>
+          <template scope="scope">
+            <span>{{ (start) + scope.$index + 1 }}</span>
+          </template>
+        </el-table-column>
+        <el-table-column prop="BeginTime" label="上课时间" width="160" :formatter="filterFmtDate" fixed>
+        </el-table-column>
+        <el-table-column prop="ClassName" label="课程" sortable width="120" fixed>
+          <template slot-scope="scope">
+                        <span class="lessonSpan"
+                              :style="{background:scope.row.ClassColor}">{{ scope.row.ClassName }}</span>
+          </template>
+        </el-table-column>
+        <el-table-column prop="ConsumeHour" label="消耗课时" width="110" sortable>
+        </el-table-column>
+        <el-table-column prop="OrderNum" label="实际预约" width="110" sortable>
+        </el-table-column>
+        <el-table-column prop="SvName" label="区域" width="110" sortable>
+        </el-table-column>
+        <el-table-column prop="WxOrder" label="预约状态" width="110" sortable>
+          <template slot-scope="scope">
+            <span v-if="scope.row.WxOrder == 1" style="color: yellowgreen">可约</span>
+            <span v-if="scope.row.WxOrder == 0" style="color: red">不可约</span>
+          </template>
+        </el-table-column>
+        <el-table-column prop="ClassType" label="课程类型" width="110" sortable>
+          <template slot-scope="scope">
+            <span v-if="scope.row.ClassType == 1">团课</span>
+            <span v-if="scope.row.ClassType == 3">私教</span>
+            <span v-if="scope.row.ClassType == 2 && scope.row.PkNum == 2">两队PK</span>
+            <span v-if="scope.row.ClassType == 2 && scope.row.PkNum == 3">三队PK</span>
+          </template>
+        </el-table-column>
+        <el-table-column prop="FinishClass" label="当前状态" width="110" sortable>
+          <template slot-scope="scope">
+            <span v-if="scope.row.FinishClass == 0" style="color: red">未上课</span>
+            <span v-if="scope.row.FinishClass == 1">已下课</span>
+            <span v-if="scope.row.FinishClass == 2" style="color: yellowgreen">已上课</span>
+            <span v-if="scope.row.FinishClass == 3">准备上课</span>
+            <span v-if="scope.row.FinishClass == 4">已完成</span>
+          </template>
+        </el-table-column>
+        <el-table-column prop="Status" label="操作">
+          <template slot-scope="scope">
+            <!--<el-button type="primary" round size="mini" @click="checkClassOverPrepare(scope.row)">-->
+            <!--下课-->
+            <!--</el-button>-->
+            <el-button type="primary" round size="mini" v-if="scope.row.FinishClass == 0"
+                       @click="showDialogMemberVisible(scope.row)">
+              上课
+            </el-button>
+            <!--<el-button type="danger" round size="mini" v-if="scope.row.FinishClass == 0"-->
+            <!--@click="closeLesson(scope.row)">-->
+            <!--关课-->
+            <!--</el-button>-->
+            <el-button type="primary" round size="mini"
+                       v-if="scope.row.FinishClass == 3 || scope.row.FinishClass == 2" @click="seeEdit(scope.row)">
+              管理
+            </el-button>
+            <!--修改区域 todo-->
+            <el-button type="primary" round plain size="mini" v-if="scope.row.FinishClass == 3"
+                       @click="changeShopVenue(scope.row)">
+              编辑
+            </el-button>
+            <!--已完成才能看详情-->
+            <el-button type="primary" round plain size="mini"
+                       v-if="scope.row.FinishClass == 1 || scope.row.FinishClass == 4"
+                       @click="seeDetail(scope.row)">
+              详情
+            </el-button>
+
+          </template>
+        </el-table-column>
+      </el-table>
+      <br>
+      <el-pagination background :total="pagination.total" :page-size="pagination.pageItem"
+                     @current-change="pageChange" :current-page.sync="cur_page"></el-pagination>
+    </div>
+    <el-dialog :title="dialogTitle" :visible.sync="dialogMemberVisible" width="650px">
+      <div class="dialogContent">
+        <h5 class="classNames">{{ className }}</h5>
+        <div class="">
+          <el-form ref="form" :model="form" label-width="160px">
+            <el-form-item label="区域" :required="true">
+              <el-select v-model="form.svId" filterable placeholder="请选择" @change="changeLocationValue">
+                <el-option v-for="item in form.svList" :key="item.SvId" :label="item.Name"
+                           :value="item.SvId">
+                </el-option>
+              </el-select>
+            </el-form-item>
+            <el-form-item label="类型" :required="true">
+              <el-select v-model="form.classType" filterable placeholder="请选择">
+                <el-option v-for="item in form.ClassTypeOptions" :key="item.value" :label="item.label"
+                           :value="item.value">
+                </el-option>
+              </el-select>
+            </el-form-item>
+            <el-form-item label="组队方式" v-if="form.classType == 2">
+              <el-select v-model="form.pkNum" filterable placeholder="请选择">
+                <el-option v-for="item in form.PKTypeOptions" :key="item.value" :label="item.label"
+                           :value="item.value">
+                </el-option>
+              </el-select>
+            </el-form-item>
+            <!--选教练,非必选-->
+            <el-form-item label="上课教练">
+              <!--<el-transfer filterable v-model="dialogCoachValue" :data="form.dialogCoachData"-->
+              <!--:titles="['教练列表', '已添加教练']"></el-transfer>-->
+              <el-select v-model="dialogCoachValue" filterable placeholder="请选择">
+                <el-option v-for="item in form.dialogCoachData" :key="item.key" :label="item.label"
+                           :value="item.value">
+                </el-option>
+              </el-select>
+            </el-form-item>
+          </el-form>
+        </div>
+      </div>
+      <div class="dialogFooter">
+        <el-button type="primary" size="small" v-if="form.btnType == 0" :disabled="PrepareBtnStatus"
+                   @click="getClassStartPrepare()">确定
+        </el-button>
+        <el-button type="primary" size="small" v-if="form.btnType == 1" @click="getClassStartPrepareForEdit()">
+          确定
+        </el-button>
+        <el-button size="small" @click="dialogMemberVisible = false">取消</el-button>
+      </div>
+    </el-dialog>
+  </div>
+</template>
+
+<script>
+import Global from '../../Global.js'
+import {
+  ClassOverPrepare,
+  QueryShopVenue,
+  ClassStartPrepare,
+  DispPlanInfoEdit,
+  ShopManagerListQuery,
+} from "../../api/getApiRes";
+
+import {
+  StandardRequest
+} from "@/grpc/base_pb";
+
+let qs = require('qs');
+export default {
+  data() {
+    return {
+      dialogMemberVisible: false,
+      searchBtnStatus: false,
+      PrepareBtnStatus: false,
+      dialogTitle: '上课准备',
+      dialogCoachValue: [],
+      className: '',
+      current: getNowDate(),
+      dialogValue: [],
+      start: 0,
+      draw: 1,
+      cur_page: 1,
+      // panel 配置项目
+      panel: {
+        draw: 1,
+        start: 0,
+        recordsTotal: 0,
+        tableData: [],
+        allTableData: [],
+        limit: '10',
+        multipleSort: false,
+        loading: false,
+        fileList: [],
+        multipleSelection: [],
+        timeScope: globalBt2(0),
+      },
+      multipleSelection: [],
+      pagination: {
+        pageItem: 10,
+        pagOptions: pageOptions(),
+        total: 100,
+        pageIndex: 1,
+      },
+      form: {
+        name: '',
+        svId: '',
+        StdId: '',
+        svName: '',
+        classType: 1,
+        coach: '',
+        coachOptions: [],
+        pkNum: 2,
+        btnType: 0,//0新建,1编辑
+        svList: [],//区域列表
+        dialogCoachData: [],//穿梭已选
+        ClassTypeOptions: [
+          {value: 1, label: '团课'},
+          {value: 2, label: '竞技PK'},
+          {value: 3, label: '私教'},
+        ],
+        PKTypeOptions: [
+          {value: 2, label: '2队PK'},
+          {value: 3, label: '3队PK'},
+        ],
+      },
+      tableData: []
+    }
+  },
+  mounted() {
+    this.getTableQuery();
+  },
+  methods: {
+    goType(url) {
+      this.$router.push({path: '/' + url});
+    },
+    // 更改上课区域
+    changeShopVenue(row) {
+      this.dialogMemberVisible = true;
+      this.form.btnType = 1;//0新建,1编辑
+      // 读取本行信息
+      this.dialogMemberVisible = true;
+      this.className = row.ClassName + ' ' + row.BeginStr + ' - ' + row.EndStr;
+      this.form.StdId = row.StdId;
+      this.getQueryShopVenue();
+      this.form.svId = row.SvId;
+      this.form.classType = row.ClassType;
+      this.form.pkNum = row.PkNum;
+    },
+    // 准备上课
+    getClassStartPrepare() {
+      let that = this;
+      if (!that.form.svId) {
+        that.$message.error('上课区域不能为空');
+        return false
+      }
+      that.PrepareBtnStatus = true;
+      // 不是竞技pk的时候为0
+      let uppkNum = that.form.classType == 2 ? that.form.pkNum : 0;
+      let tid = that.dialogCoachValue.toString();
+      let param = {
+        token: localStorage.token,
+        stdId: that.form.StdId,
+        svId: that.form.svId,
+        svName: that.form.svName,
+        classType: that.form.classType,
+        pkNum: uppkNum,
+        tid: tid,//教练id
+      };
+      that.searchBtnStatus = true;
+      let totalTime = 2;
+      let clock = window.setInterval(() => {
+        totalTime--;
+        if (totalTime < 0) {
+          totalTime = 2;
+          that.searchBtnStatus = false;
+        }
+      }, 1000);
+      let postdata = qs.stringify(param);
+      ClassStartPrepare(postdata).then(res => {
+        that.PrepareBtnStatus = false;
+        let json = res;
+        if (json.Code == 0) {
+          this.$router.push({
+            path: '/classEdit',
+            query: {
+              StdId: that.form.StdId,
+              ClassName: that.form.ClassName,
+              BeginStr: that.form.BeginStr,
+              EndStr: that.form.EndStr,
+              FinishClass: 3,
+              ClassType: that.form.classType,
+              PkNum: uppkNum,
+            }
+          });
+          that.dialogMemberVisible = false;
+          this.getTableQuery();
+
+        } else {
+          that.$message.error(json.Memo + ' 错误码:' + json.Code);
+        }
+      })
+    },
+    // 编辑
+    getClassStartPrepareForEdit() {
+      let that = this;
+      if (!that.form.svId) {
+        that.$message.error('上课区域不能为空');
+        return false
+      }
+      // 不是竞技pk的时候为0
+      let uppkNum = that.form.classType == 2 ? that.form.pkNum : 0;
+
+      let param = {
+        token: localStorage.token,
+        stdId: that.form.StdId,
+        svId: that.form.svId,
+        svName: that.form.svName,
+        classType: that.form.classType,
+        pkNum: uppkNum,
+      };
+      let postdata = qs.stringify(param);
+      DispPlanInfoEdit(postdata).then(res => {
+        let json = res;
+        if (json.Code == 0) {
+          // NewId: 0
+          that.dialogMemberVisible = false;
+          this.getTableQuery();
+        } else {
+          that.$message.error(json.Memo + ' 错误码:' + json.Code);
+        }
+      })
+    },
+    seeDetail(row) {
+      this.$router.push({
+        path: '/classInfoDetail', query: {
+          StdId: row.StdId,
+          ClassName: row.ClassName,
+          BeginStr: row.BeginStr,
+          EndStr: row.EndStr,
+        }
+      });
+    },
+    seeEdit(row) {
+      this.$router.push({
+        path: '/classEdit', query: {
+          StdId: row.StdId,
+          ClassName: row.ClassName,
+          BeginStr: row.BeginStr,
+          EndStr: row.EndStr,
+          FinishClass: row.FinishClass,
+          ClassType: row.ClassType,
+          PkNum: row.PkNum,
+        }
+      });
+    },
+    // 关课
+    closeLesson(row) {
+      that.$message.error('功能未上线,请耐心等候');
+      return false;
+      let that = this;
+      let param = {
+        token: localStorage.token,
+        hrId: row.HrId,
+        status: 9,//
+      };
+      let postdata = qs.stringify(param);
+      this.$confirm('此操作将永久关闭当前课程, 是否继续?', '提示', {
+        confirmButtonText: '确定',
+        cancelButtonText: '取消',
+        type: 'warning'
+      }).then(() => {
+        HrSensorsStatusEdit(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 + ' 错误码:' + json.Code);
+          }
+        });
+      }).catch(() => {
+        this.$message({
+          type: 'info',
+          message: '已取消关课'
+        });
+      });
+    },
+    // 获取select的label
+    changeLocationValue(val) {
+      //locations是v-for里面的也是datas里面的值
+      let obj = {};
+      obj = this.form.svList.find((item) => {
+        return item.SvId === val;
+      });
+      this.form.svName = obj.Name;
+    },
+    // 获取区域列表
+    getQueryShopVenue() {
+      let that = this;
+      let param = {
+        key: localStorage.ServiceKey,
+        shopId: localStorage.ServiceId,
+      };
+      if (!localStorage.ServiceKey) {
+        that.$message.error('还未与心率系统对接,请联系管理员');
+        return false
+      }
+      let postdata = qs.stringify(param);
+      QueryShopVenue(postdata).then(res => {
+        let json = res;
+        if (json.Code == 0) {
+          that.form.svList = json.Rs;
+        } else {
+          that.$message.error(json.Memo + ' 错误码:' + json.Code);
+        }
+      })
+    },
+    vipSelect(stdId) {
+      let that = this;
+      // 筛选相同的stdid的classId
+      that.form.stdList.map(function (item) {
+        if (item.value == stdId) {
+          let param = {
+            token: localStorage.token,
+            // classId: item.classId
+          };
+          let postdata = qs.stringify(param);
+          // VipUserListQuery
+          VipUserSimpleQuery(postdata).then(res => {
+            let json = res;
+            if (json.Code == 0) {
+              that.form.userId = '';
+              that.form.userList = turnResToOptionBySimViper(json.Rs);
+            } else {
+              that.$message.error(json.Memo + ' 错误码:' + json.Code);
+            }
+          })
+        }
+      })
+    },
+    showDialogMemberVisible(row) {
+      this.dialogMemberVisible = true;
+      this.form.btnType = 0;//0新建,1编辑编辑
+      // clear
+      this.form.svList = "";
+      this.form.classType = 1;
+      this.form.pkNum = 2;
+
+      this.form.StdId = row.StdId;
+      this.form.ClassName = row.ClassName;
+      this.form.BeginStr = row.BeginStr;
+      this.form.EndStr = row.EndStr;
+      this.form.FinishClass = row.FinishClass;
+      this.form.ClassType = row.ClassType;
+      this.form.PkNum = row.PkNum;
+
+      this.className = row.ClassName + ' ' + row.BeginStr + ' - ' + row.EndStr;
+      this.form.StdId = row.StdId;
+      this.getCoachOption();
+      this.getQueryShopVenue();
+    },
+    // 获取教练选项
+    getCoachOption() {
+      let that = this;
+      let param = {
+        token: localStorage.token,
+        name: this.panel.name,//
+        phone: this.panel.phone,//
+        shopId: localStorage.ShopId,//
+        adminType: 4,//
+        start: 1,//
+        tableMax: 299,//
+      };
+      let postdata = qs.stringify(param);
+      ShopManagerListQuery(postdata).then(res => {
+        let json = res;
+        if (json.Code == 0) {
+          that.form.dialogCoachData = turnResToOptionByUsers(json.Rs);
+        } else {
+          that.$message.error(json.Memo + ' 错误码:' + json.Code);
+        }
+      })
+    },
+    // 检测当前课是否处于可改变状态
+    // 固定下当前已预约人数列表
+    checkClassOverPrepare(row) {
+      let that = this;
+      let param = {
+        token: localStorage.token,
+        stdId: row.StdId,
+      };
+      let postdata = qs.stringify(param);
+      ClassOverPrepare(postdata).then(res => {
+        let json = res;
+        if (json.Code == 0) {
+          that.goFinish(row);
+        } else {
+          that.$message.error(json.Memo + ' 错误码:' + json.Code);
+        }
+      })
+    },
+    goFinish(row) {
+      this.$router.push({
+        path: '/classFinishDetail', query: {
+          id: row.StdId,
+          classId: row.ClassId,
+          ClassName: row.ClassName,
+          BeginTime: row.BeginTime,
+        }
+      });
+    },
+    handleSelectionChange(val) {
+      this.multipleSelection = val;
+    },
+    // 查询按钮
+    query() {
+      let that = this;
+      that.start = 0;
+      that.cur_page = 1;
+      that.searchBtnStatus = true;
+      let totalTime = 2;
+      let clock = window.setInterval(() => {
+        totalTime--;
+        if (totalTime < 0) {
+          totalTime = 2;
+          that.searchBtnStatus = false;
+        }
+      }, 1000);
+      this.getTableQuery();
+
+      this.$message.success('查询完毕');
+    },
+    // 页面数据查询
+    getTableQuery() {
+      let that = this;
+      that.loading = true;
+
+      const jsonStr = {
+        shopId: localStorage.shopId,
+        bt: nonTfmtDatetoLength(that.panel.timeScope[0], 10) + " 00:00:00",
+        et: nonTfmtDatetoLength(that.panel.timeScope[1], 10) + " 23:59:59",
+        fcStatus: 1,// 0:历史记录(对应finishClass 10,4组合 ) 1:上课中
+        courseType:-99,//-99是全部 1:室内课 2:户外课 3:线上课 4:混合课
+        start: that.start,
+        tableMax: that.pagination.pageItem
+      };
+
+      let paraRequest = new StandardRequest();
+      paraRequest.setShopid(localStorage.shopId);
+      paraRequest.setJsonstr(JSON.stringify(jsonStr));
+      paraRequest.setSign(getSignStr(jsonStr));
+      console.log(paraRequest);
+      console.log(localStorage.token);
+      that.client.courseDetailQuery(paraRequest, {"Token": localStorage.token}, (err, StandardReply) => {
+        if (err == null) {
+          console.log(StandardReply.getJsonrst());
+          let res = JSON.parse(StandardReply);
+          if (res.code === 0) {
+            that.loading = false;
+            if(res.rs){
+              that.allTableData = res.rs;
+              that.recordsTotal = res.rs.length;
+            }else{
+              that.allTableData = [];
+              that.recordsTotal = 0;
+            }
+            // 设置分页数据
+            that.setPagination();
+          } else {
+            that.$message.error(res.memo + ',错误代码:' + res.code);
+          }
+        } else {
+          let res = err;
+          that.$message.error(res.message + ',错误代码:' + res.code);
+          console.log(res);
+        }
+      });
+    },
+    // 设置分页数据
+    setPagination() {
+      // 分页属性
+      let that = this;
+      that.pagination.total = that.recordsTotal;
+
+      // 默认分页
+      that.tableData = that.allTableData.filter((item, index) => {
+        return index < that.pagination.pageItem;
+      });
+    },
+    // 每页显示数量
+    handleSizeChange() {
+      let that = this;
+      that.tableData = that.allTableData.filter((item, index) => {
+        return index < that.pagination.pageItem;
+      });
+      that.draw = that.pagination.pageItem;
+      // that.getTableQuery();
+    },
+    // 翻页
+    pageChange(pageIndex) {
+      let that = this;
+      // 获取当前页
+      let index = that.pagination.pageItem * (pageIndex - 1);
+      // 数据总数
+      let nums = that.pagination.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();
+    },
+    // 过滤时间
+    filterFmtDate(value, row, column) {
+      let that = this;
+      return nonTfmtDate(column, 11);
+    },
+  },
+  watch: {
+    $route(to) {
+      if (to.name == 'classManage') {
+        this.getTableQuery();
+      }
+    },
+  },
+}
+</script>
+
+<style scoped>
+@import "../../assets/css/panel.css";
+
+.context {
+  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 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;
+}
+
+.dialogContent {
+  width: 100%;
+  overflow: hidden;
+  display: block;
+  margin: 0 auto;
+}
+
+.dialogContent .pull-left {
+  width: 30%;
+  float: left;
+}
+
+.dialogContent .pull-right {
+  width: 70%;
+  float: right;
+}
+
+.blueTitle {
+  width: 200px;
+  overflow: hidden;
+  display: block;
+  margin: 0 auto;
+  margin-top: 10px;
+  margin-bottom: 40px;
+  background: #F0F2F5;
+  border-radius: 19px;
+  text-align: center;
+  color: #3799FF;
+  font-size: 16px;
+  padding: 5px 24px;
+}
+
+.current {
+  width: 158px;
+  height: 23px;
+  /*float: left;*/
+  border-radius: 250px;
+  text-align: center;
+  background: #F0F2F5;
+  color: #545454;
+  font-size: 14px;
+  padding: 3px 10px;
+  margin-left: 20px;
+}
+
+.lessonSpan {
+  width: 78px;
+  height: 22px;
+  border-radius: 11px;
+  margin-right: 5px;
+  float: left;
+  margin-bottom: 3px;
+  text-align: center;
+  color: #000;
+  font-size: 12px;
+}
+
+.classNames {
+  width: 211px;
+  height: 25px;
+  background: #f0f2f5;
+  font-family: "Source Han Sans CN";
+  font-weight: normal;
+  font-size: 16px;
+  color: #3799ff;
+  border-radius: 250px;
+  text-align: center;
+  margin: 0 auto;
+  margin-bottom: 10px;
+}
+
+/deep/ .el-date-editor .el-range-separator {
+  line-height: 25px;
+}
+
+.likeTab {
+  width: 100%;
+  overflow: hidden;
+  display: block;
+  margin: 0 auto;
+  padding-top: 10px;
+  padding-bottom: 0;
+  border-bottom: 1px solid #ccc;
+  margin-bottom: 10px;
+}
+
+.likeTab button {
+  float: left;
+  border-radius: 0;
+}
+
+.likeTab button.pull-right {
+  float: right;
+}
+
+.el-dialog__body .el-date-editor.el-input__inner {
+  width: 156px;
+}
+
+.el-transfer-panel__item.el-checkbox .el-checkbox__label {
+  width: 156px;
+}
+
+/deep/ .el-dialog__body .el-transfer-panel__item .el-checkbox__input {
+  left: 10px;
+}
+
+/deep/ .el-dialog__body .el-form-item__content .el-select {
+  float: left;
+  margin-left: 50px;
+}
+
+/deep/ .el-dialog__body .el-transfer {
+  float: left;
+  margin-left: 50px;
+}
+
+@media (min-width: 320px) and (max-width: 1367px) {
+  .panel /deep/ .el-date-editor--daterange {
+    max-width: 240px;
+  }
+
+  .panel /deep/ .el-date-editor .el-range-separator {
+    line-height: 35px;
+  }
+}
+</style>

+ 1 - 1
src/views/Shop/online.vue → src/views/Class/ClassOnLine.vue

@@ -202,7 +202,7 @@ export default {
     },
     watch: {
         $route(to) {
-            if (to.name != 'online') {
+            if (to.name != 'ClassOnLine') {
                 this.clearRem();
                 clearInterval(this.mainTimer);//页面销毁时清除定时器
             } else {

+ 7 - 7
src/views/Class/Lesson.vue → src/views/Class/LessonManage.vue

@@ -1,7 +1,7 @@
 <template>
   <div class="context">
     <div class="panel">
-      <h5>目管理</h5>
+      <h5>目管理</h5>
     </div>
     <div class="change">
       <el-button type="primary" @click="addLesson" size="mini">新增课程</el-button>
@@ -593,7 +593,7 @@ export default {
       const jsonStr = {
         shopId: localStorage.shopId,
         classId: row.class_id,//-99代表查询全部
-        isAcross: -99//0:不跨店 1跨店  -99是全部
+        isAcross: 0 //0:不跨店 1跨店  -99是全部
       };
 
       let paraRequest = new StandardRequest();
@@ -685,7 +685,7 @@ export default {
       const jsonStr = {
         shopId: localStorage.shopId,
         classId: row.class_id,
-        isAcross: -99//0:不跨店 1跨店  -99是全部
+        isAcross: 0//0:不跨店 1跨店  -99是全部
       };
 
       let paraRequest = new StandardRequest();
@@ -735,7 +735,7 @@ export default {
       const jsonStr = {
         shopId: localStorage.shopId,
         classId: -99,//代表查询全部
-        isAcross: -99//0:不跨店 1跨店  -99是全部
+        isAcross: 0//0:不跨店 1跨店  -99是全部
       };
 
       let paraRequest = new StandardRequest();
@@ -793,7 +793,7 @@ export default {
               that.recordsTotal = 0;
             }
             // 设置分页数据
-            that.setPaginations();
+            that.setPagination();
           } else {
             that.$message.error(res.memo + ',错误代码:' + res.code);
           }
@@ -805,7 +805,7 @@ export default {
       });
     },
     // 设置分页数据
-    setPaginations() {
+    setPagination() {
       // 分页属性
       let that = this;
       that.pageination.total = that.recordsTotal;
@@ -854,7 +854,7 @@ export default {
   },
   watch: {
     $route(to) {
-      if (to.name == 'Lesson') {
+      if (to.name == 'lessonManage') {
         this.panelSelect();
         this.getTableQuery();
       }

+ 11 - 4
src/views/Class/LessonTableManage.vue

@@ -77,7 +77,8 @@
         <el-input v-model="copyForm.name" style="width: 220px"/>
         <br>
         <br>
-        <el-date-picker v-model="copyForm.begin_date" type="week" :picker-options="{'firstDayOfWeek': 1}"
+        <el-date-picker v-model="copyForm.begin_date" type="week" :onchange="changeCopyName()"
+                        :picker-options="{'firstDayOfWeek': 1}"
                         format="yyyy 第 WW 周" placeholder="选择周" style="width: 220px"/>
       </div>
       <div class="dialogFooter">
@@ -181,7 +182,13 @@ export default {
       that.dialogCopyVisible = true;
       that.copyForm.name = that.tableRadio.name;
       that.copyForm.stb_id = that.tableRadio.stb_id;
-      that.copyForm.begin_date = that.tableRadio.begin_date;
+      that.copyForm.begin_date = getDate(that.tableRadio.begin_date, 0, 0, 1);
+    },
+    changeCopyName() {
+      let that = this;
+      that.copyForm.name ="\'"+ that.tableRadio.name + "\'  "+ getDate(that.copyForm.begin_date, 0, 0, - 1).substring(5,10) + " 副本";
+      // that.copyForm.name = that.tableRadio.name + "  "+ nonTfmtDate(that.copyForm.begin_date,10).substring(5,10) + " 副本";
+      console.log(that.copyForm.begin_date);
     },
     //确认复制课程表
     confirmCopy() {
@@ -473,7 +480,7 @@ export default {
               that.recordsTotal = 0;
             }
             // 设置分页数据
-            that.setPaginations();
+            that.setPagination();
           } else {
             that.$message.error(res.memo + ',错误代码:' + res.code);
           }
@@ -485,7 +492,7 @@ export default {
       });
     },
     // 设置分页数据
-    setPaginations() {
+    setPagination() {
       // 分页属性
       let that = this;
       that.pageination.total = that.recordsTotal;

+ 0 - 1
src/views/SchoolTimeTable/LessonTableManageEdit.vue → src/views/Class/LessonTableManageEdit.vue

@@ -539,7 +539,6 @@ export default {
           thisRow.week_day = parseInt(i + 1);
           thisRow.begin_str = getHoursAndMin(thisRow.timeLong[0]);
           thisRow.end_str = getHoursAndMin(thisRow.timeLong[1]);
-          console.log(thisRow.last_classon, thisRow.curr_date);
           thisRow.last_classon = nonTfmtDate(thisRow.last_classon);
           thisRow.curr_date = nonTfmtDate(thisRow.curr_date).toString().substring(0, 10);
           this.$delete(thisRow, 'Base');

+ 0 - 0
src/views/SttPlan/LessonTableTemplateEdit.vue → src/views/Class/LessonTableTemplateEdit.vue


+ 0 - 0
src/views/Class/videoClass.vue → src/views/Class/VideoClass.vue


+ 2 - 2
src/views/Class/classInfoDetail.vue

@@ -196,7 +196,7 @@ export default {
             that.recordsTotal = 0;
           }
           // 设置分页数据
-          that.setPaginations();
+          that.setPagination();
         } else {
           that.allTableData = [];
           that.recordsTotal = 0;
@@ -205,7 +205,7 @@ export default {
       })
     },
     // 设置分页数据
-    setPaginations() {
+    setPagination() {
       // 分页属性
       let that = this;
       that.pageination.total = that.recordsTotal;

+ 0 - 15
src/views/Class/classPrepare.vue

@@ -1,15 +0,0 @@
-<template>
-    <div>准备上课</div>
-</template>
-
-<script>
-    export default {
-        methods: {
-
-        }
-    }
-</script>
-
-<style scoped>
-
-</style>

+ 0 - 40
src/views/Class/grpcDemo.vue

@@ -1,40 +0,0 @@
-<template>
-  <h5>
-    grpc DEMO
-    <br>
-    {{ TodayCalcValues }}
-  </h5>
-</template>
-
-<script>
-import {SignInPasswordRequest} from "@/grpc/base_pb";
-
-export default {
-  data() {
-    return {
-      eqSn: '30:9C:23:0C:8B:1E',
-      TodayCalcValues: '11332233',
-    }
-  },
-  mounted() {
-    this.grpcServe();
-  },
-  methods: {
-    grpcServe() {
-      let that = this;
-      let getRequest = new SignInPasswordRequest();
-      getRequest.setPassword("asdf*123");
-      getRequest.setExpirationsec(10000);
-      console.log("getRequest:" + getRequest);
-      that.client.genPhoneVerifyCode(getRequest, {}, (err, response) => {
-        console.log(err)
-        that.TodayCalcValues = response.getToken();
-      });
-    },
-  },
-}
-</script>
-
-<style scoped>
-
-</style>

+ 3 - 3
src/views/HrSensors/bindRecord.vue → src/views/HrSensor/BindRecord.vue

@@ -194,7 +194,7 @@
         methods: {
             goBack(){
                 this.$router.push({
-                    path: '/heartEquip', query: {}
+                    path: '/hrSensor', query: {}
                 });
             },
             // 表格合计
@@ -274,14 +274,14 @@
                             that.recordsTotal = 0;
                         }
                         // 设置分页数据
-                        that.setPaginations();
+                        that.setPagination();
                     } else {
                         that.$message.error(json.Memo + ' 错误码:' + json.Code);
                     }
                 })
             },
             // 设置分页数据
-            setPaginations() {
+            setPagination() {
                 // 分页属性
                 let that = this;
                 that.pageination.total = that.recordsTotal;

+ 2 - 2
src/views/Shop/demoDevice.vue → src/views/HrSensor/DemoDevice.vue

@@ -518,14 +518,14 @@ export default {
                         that.recordsTotal = 0;
                     }
                     // 设置分页数据
-                    that.setPaginations();
+                    that.setPagination();
                 } else {
                     that.$message.error(json.Memo + ' 错误码:' + json.Code);
                 }
             })
         },
         // 设置分页数据
-        setPaginations() {
+        setPagination() {
             // 分页属性
             let that = this;
             that.pageination.total = that.recordsTotal;

+ 7 - 7
src/views/HrSensors/heartEquip.vue → src/views/HrSensor/HrSensor.vue

@@ -3,8 +3,8 @@
         <div class="panel">
             <h5>心率设备</h5>
             <div class="likeTab">
-                <el-button type="primary" @click="goType('heartEquip')" size="mini">场馆心率设备</el-button>
-                <el-button type @click="goType('heartEquipPerson')" size="mini">私有心率设备</el-button>
+                <el-button type="primary" @click="goType('hrSensor')" size="mini">场馆心率设备</el-button>
+                <el-button type @click="goType('hrSensorPrivate')" size="mini">私有心率设备</el-button>
             </div>
             <div class="panel-body">
                 <div class="panel_control">
@@ -264,10 +264,10 @@
 
                 if (tab.name == "personal") {
                     // 私有
-                    that.$router.push({ path: '/heartEquipPerson' });
+                    that.$router.push({ path: '/hrSensorPrivate' });
                 } else {
                     // 公共
-                    that.$router.push({ path: '/heartEquip' });
+                    that.$router.push({ path: '/hrSensor' });
                 }
             },
             // 设备回收
@@ -307,7 +307,7 @@
             },
             goPage(row) {
                 // 查看绑定记录
-                this.$router.push({ path: '/bindRecord', query: { hrId: row.HrId } });
+                this.$router.push({ path: '/hrSensorLog', query: { hrId: row.HrId } });
             },
             goType(url) {
                 this.$router.push({ path: '/' + url });
@@ -763,14 +763,14 @@
                         }
 
                         // 设置分页数据
-                        that.setPaginations();
+                        that.setPagination();
                     } else {
                         that.$message.error(json.Memo + ' 错误码:' + json.Code);
                     }
                 })
             },
             // 设置分页数据
-            setPaginations() {
+            setPagination() {
                 // 分页属性
                 let that = this;
                 that.pageination.total = that.recordsTotal;

+ 3 - 3
src/views/Shop/heartLog.vue → src/views/HrSensor/HrSensorLog.vue

@@ -427,14 +427,14 @@
                             that.recordsTotal = 0;
                         }
                         // 设置分页数据
-                        that.setPaginations();
+                        that.setPagination();
                     } else {
                         that.$message.error(json.Memo + ' 错误码:' + json.Code);
                     }
                 })
             },
             // 设置分页数据
-            setPaginations() {
+            setPagination() {
                 // 分页属性
                 let that = this;
                 that.pageination.total = that.recordsTotal;
@@ -561,7 +561,7 @@
         },
         watch: {
             $route(to) {
-                if (to.name == 'heartLog') {
+                if (to.name == 'hrSensorLog') {
                     this.regionName = this.$route.query.name;
                     this.getTableQuery();
                 }

+ 6 - 8
src/views/HrSensors/heartEquipPerson.vue → src/views/HrSensor/HrSensorPrivate.vue

@@ -4,7 +4,7 @@
             <h5>心率设备</h5>
             <div class="likeTab">
                 <el-button type="" @click="goType('heartEquip')" size="mini">场馆心率设备</el-button>
-                <el-button type="primary" @click="goType('heartEquipPerson')" size="mini">私有心率设备</el-button>
+                <el-button type="primary" @click="goType('hrSensorPrivate')" size="mini">私有心率设备</el-button>
             </div>
             <div class="panel-body">
                 <div class="panel_control">
@@ -278,10 +278,10 @@
 
                 if (tab.name == "personal") {
                     // 私有
-                    that.$router.push({ path: '/heartEquipPerson' });
+                    that.$router.push({ path: '/hrSensorPrivate' });
                 } else {
                     // 公共
-                    that.$router.push({ path: '/heartEquip' });
+                    that.$router.push({ path: '/hrSensor' });
                 }
             },
             // 设备回收
@@ -763,14 +763,14 @@
                         }
 
                         // 设置分页数据
-                        that.setPaginations();
+                        that.setPagination();
                     } else {
                         that.$message.error(json.Memo + ' 错误码:' + json.Code);
                     }
                 })
             },
             // 设置分页数据
-            setPaginations() {
+            setPagination() {
                 // 分页属性
                 let that = this;
                 that.pageination.total = that.recordsTotal;
@@ -824,15 +824,13 @@
         ,
         watch: {
             $route(to) {
-                if (to.name == 'heartEquipPerson') {
+                if (to.name == 'hrSensorPrivate') {
                     if (this.$route.query.page == 'second') {
                         this.getTableQuery();
                         this.vipSelect();
                     }
                 }
-
             }
-            ,
         }
     }
 </script>

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

@@ -12,7 +12,7 @@
           <keep-alive>
             <router-view></router-view>
           </keep-alive>
-        </el-main>
+        </el-main>`
         <el-footer v-if="true">
           <p class="footer">济南佰意兴网络科技有限公司提供技术支持</p>
         </el-footer>

+ 3 - 3
src/views/User/cost.vue → src/views/Member/MemberCost.vue

@@ -1063,7 +1063,7 @@
                             that.recordsTotal = 0;
                         }
                         // 设置分页数据
-                        that.setPaginations();
+                        that.setPagination();
                     } else {
                         that.$message.error(json.Memo + ' 错误码:' + json.Code);
                     }
@@ -1079,7 +1079,7 @@
                 window.location = url + '&bt=' + bt + '&et=' + et + '&usercode=' + usercode;
             },
             // 设置分页数据
-            setPaginations() {
+            setPagination() {
                 // 分页属性
                 let that = this;
                 that.pageination.total = that.recordsTotal;
@@ -1133,7 +1133,7 @@
         },
         watch: {
             $route(to) {
-                if (to.name == 'cost') {
+                if (to.name == 'memberCost') {
                     this.panelSelect();
                     this.getTableQuery();
                 }

+ 3 - 3
src/views/User/Member.vue → src/views/Member/MemberFull.vue

@@ -373,7 +373,7 @@ export default {
   },
   watch: {
     $route(to) {
-      if (to.name == 'Member') {
+      if (to.name == 'memberFull') {
         // 加载课程选项
         this.panelSelect();
         // 读取列表
@@ -1173,7 +1173,7 @@ export default {
             that.recordsTotal = 0;
           }
           // 设置分页数据
-          that.setPaginations();
+          that.setPagination();
         } else {
           let res = err;
           that.$message.error(res.message + ',错误代码:' + res.code);
@@ -1182,7 +1182,7 @@ export default {
       })
     },
     // 设置分页数据
-    setPaginations() {
+    setPagination() {
       // 分页属性
       let that = this;
       that.pageination.total = that.recordsTotal;

+ 3 - 3
src/views/User/tempMember.vue → src/views/Member/MemberTemporary.vue

@@ -242,7 +242,7 @@ export default {
   },
   watch: {
     $route(to) {
-      if (to.name == 'tempMember') {
+      if (to.name == 'memberTemporary') {
         // 读取列表
         this.getTableQuery();
       }
@@ -587,7 +587,7 @@ export default {
               that.recordsTotal = 0;
             }
             // 设置分页数据
-            that.setPaginations();
+            that.setPagination();
           } else {
             that.$message.error(res.memo + ',错误代码:' + res.code);
           }
@@ -620,7 +620,7 @@ export default {
       this.multipleSelection = val;
     },
     // 设置分页数据
-    setPaginations() {
+    setPagination() {
       // 分页属性
       let that = this;
       that.pageination.total = that.recordsTotal;

+ 3 - 3
src/views/User/relevancePhone.vue → src/views/Member/RelevancePhone.vue

@@ -146,7 +146,7 @@ export default {
   methods: {
     goBack() {
       this.$router.push({
-        path: '/member', query: {}
+        path: '/memberFull', query: {}
       });
     },
     clearForm() {
@@ -525,7 +525,7 @@ export default {
               that.recordsTotal = 0;
             }
             // 设置分页数据
-            that.setPaginations();
+            that.setPagination();
           } else {
             that.$message.error(res.memo + ',错误代码:' + res.code);
           }
@@ -537,7 +537,7 @@ export default {
       })
     },
     // 设置分页数据
-    setPaginations() {
+    setPagination() {
       // 分页属性
       let that = this;
       that.pageination.total = that.recordsTotal;

+ 0 - 1688
src/views/Order/appoint.vue

@@ -1,1688 +0,0 @@
-<template>
-  <div class="context">
-    <!--        panel-->
-    <div class="">
-      <div class="panel">
-        <h5>预约管理</h5>
-      </div>
-
-      <div class="timeList">
-        <ul>
-          <li :class="[{'active': i == choiceDate}]" v-for="(day,i) in weeks" @click="choiceTime(i)">
-            <em>{{ day.name }}</em><span>{{ day.data }}</span>
-          </li>
-        </ul>
-      </div>
-      <el-tabs v-model="activeName" type="card">
-        <el-tab-pane label="会员预约列表" name="second">
-          <div class="panel-body">
-            <div class="panel_control">
-              <el-row :gutter="20">
-                <el-col :span="6">
-                  <em>会员名:</em>
-                  <el-input v-model="panel.name" placeholder="请输入会员名"></el-input>
-                </el-col>
-                <el-col :span="6">
-                  <em>手机号:</em>
-                  <el-input v-model="panel.phone" placeholder="请输入手机号" type="number"></el-input>
-                </el-col>
-                <el-col :span="6">
-                  <em>预约课程:</em>
-                  <el-select v-model="panel.classId">
-                    <el-option
-                        v-for="item in panel.classOptions"
-                        :key="item.value"
-                        :label="item.label"
-                        :value="item.value">
-                    </el-option>
-                  </el-select>
-                </el-col>
-                <el-col :span="2">
-                  <el-button size="" type="primary" @click="query" plain :disabled="serachBtnStatus">
-                    查询
-                  </el-button>
-                </el-col>
-                &nbsp;
-                <el-col :span="4">
-                  <el-button class="pull-right vipAddBtn" type="warning" @click="addMember(1)">本店预约</el-button>
-                  <el-button class="pull-right acrossAddBtn" type="success" @click="addMember(2)">跨店预约</el-button>
-                </el-col>
-              </el-row>
-            </div>
-          </div>
-          <br>
-          <div class="table">
-            <el-table
-                :data="tableData2"
-                border
-                is-horizontal-resize
-                :default-sort="{prop: 'date', order: 'descending'}"
-                element-loading-background="rgba(0, 0, 0, 0.8)"
-                class=""
-                @selection-change="handleSelectionChange" @current-change="clickChange"
-            >
-              >
-              <el-table-column label="选择" width="55" fixed>
-                <template slot-scope="scope">
-                  <el-radio v-model="tableRadio" :label="scope.row"><i></i></el-radio>
-                </template>
-              </el-table-column>
-              <el-table-column label="序号" type="index" width="50" align="center" fixed>
-                <template scope="scope">
-                  <span>{{ (start) + scope.$index + 1 }}</span>
-                </template>
-              </el-table-column>
-              <el-table-column
-                  prop="UserName"
-                  label="会员名"
-                  fixed
-              >
-              </el-table-column>
-              <el-table-column
-                  prop="Phone"
-                  label="手机号"
-                  width="160"
-                  sortable
-                  fixed
-              >
-              </el-table-column>
-              <el-table-column
-                  prop="ClassName"
-                  label="预约课程"
-                  width="120"
-                  sortable
-              >
-                <template slot-scope="scope">
-                  <span class="lessons" :style="{ background:scope.row.ClassColor }">{{ scope.row.ClassName }}</span>
-                </template>
-              </el-table-column>
-              <el-table-column
-                  prop="BeginTime"
-                  label="上课时间"
-                  :formatter="filterFmtDate"
-                  width="160"
-                  sortable
-              >
-              </el-table-column>
-              <el-table-column
-                  prop="Base.CreatedAt"
-                  label="会员预约时间"
-                  width="160"
-                  :formatter="filterFmtDate"
-                  sortable
-              >
-              </el-table-column>
-              <el-table-column
-                  prop="ConsumeHour"
-                  label="消耗课时"
-                  sortable
-              >
-              </el-table-column>
-              <el-table-column
-                  prop="RemainHour"
-                  label="剩余课时"
-                  sortable
-              >
-              </el-table-column>
-              <el-table-column
-                  prop="Status"
-                  label="预约状态"
-                  sortable
-              >
-                <template slot-scope="scope">
-                  <span v-if="scope.row.Status == 1" style="color: chartreuse">已预约</span>
-                  <span v-if="scope.row.Status == 2" style="color: #ccc">已取消</span>
-                  <span v-if="scope.row.Status == 3" style="color: red">预约未到</span>
-                  <span v-if="scope.row.Status == 4" style="color: #015B9E">已完成</span>
-                </template>
-              </el-table-column>
-              <el-table-column
-                  prop="Status"
-                  label="操作"
-              >
-                <template slot-scope="scope">
-                  <el-button type="danger" size="mini" round
-                             @click="BtnOrderCancelByManager(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-tab-pane>
-        <el-tab-pane label="课程预约列表" name="first">
-          <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" @current-change="clickChange"
-            >
-              <el-table-column label="序号" type="index" width="50" align="center">
-                <template scope="scope">
-                  <span>{{ (start) + scope.$index + 1 }}</span>
-                </template>
-              </el-table-column>
-              <el-table-column
-                  prop="BeginTime"
-                  label="上课时间"
-                  width="160"
-                  :formatter="filterFmtDate"
-              >
-              </el-table-column>
-              <el-table-column
-                  prop="ClassName"
-                  label="课程"
-                  width="110"
-                  sortable
-              >
-                <template slot-scope="scope">
-                  <span class="lessons" :style="{ background:scope.row.ClassColor }">{{ scope.row.ClassName }}</span>
-                </template>
-              </el-table-column>
-              <el-table-column
-                  prop="Recovered"
-                  label="预约比例"
-                  width="210px"
-                  sortable
-              >
-                <template slot-scope="scope">
-                  <el-progress
-                      :percentage="parseInt((scope.row.OrderCount/scope.row.OrderToplimit * 100))"
-                      :format="format"
-                  ></el-progress>
-                </template>
-              </el-table-column>
-              <el-table-column
-                  prop="OrderToplimit"
-                  label="预约名额"
-              >
-              </el-table-column>
-              <el-table-column
-                  prop="OrderCount"
-                  label="预约人数"
-              >
-              </el-table-column>
-              <el-table-column
-                  prop="ConsumeHour"
-                  label="消耗课时"
-              >
-              </el-table-column>
-              <el-table-column
-                  prop="WxOrder"
-                  label="微信可约"
-              >
-                <template slot-scope="scope">
-                  <!--                                    0:不可预约 1:可预约-->
-                  <el-switch
-                      v-model="scope.row.WxOrder"
-                      :active-value="1"
-                      :inactive-value="0"
-                      active-color="#409EFF"
-                      inactive-color="#D9D9D9"
-                      @change=changeWechat($event,scope.row)
-                  >
-                  </el-switch>
-                </template>
-              </el-table-column>
-              <el-table-column
-                  prop="StdId"
-                  label="操作"
-                  width=70px
-              >
-                <template slot-scope="scope">
-                  <el-button type="text" @click="seeDetail(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-tab-pane>
-      </el-tabs>
-    </div>
-    <el-dialog :title="dialogTitle" :visible.sync="dialogMemberVisible" width="650px">
-      <div class="dialogContent">
-        <div class="">
-          <el-form ref="form" :model="form" label-width="160px">
-            <el-form-item label="当前日期" :required="true">
-              <el-input v-model="form.displayDay" placeholder="placeholder" :disabled="true"
-                        style="width: 220px"></el-input>
-            </el-form-item>
-            <el-form-item label="课程" :required="true">
-              <el-select v-model="form.stdId" filterable placeholder="请选择"
-                         @change="vipSelect(form.stdId)">
-                <el-option
-                    v-for="item in form.stdList"
-                    :key="item.value"
-                    :label="item.label"
-                    :value="item.value">
-                </el-option>
-              </el-select>
-            </el-form-item>
-            <!--     课程联动查询userlist by classid-->
-            <el-form-item label="本店会员" :required="true" v-if="form.addType == 1 ">
-              <el-select v-model="form.userId" filterable placeholder="请选择"
-                         @change="reMainSelect(form.userId)">
-                <el-option
-                    v-for="item in form.userList"
-                    :key="item.value"
-                    :label="item.label"
-                    :value="item.value">
-                </el-option>
-              </el-select>
-            </el-form-item>
-            <el-form-item label="跨店会员" :required="true" v-if="form.addType == 2 ">
-              <el-select v-model="form.userId" filterable placeholder="请选择"
-                         @change="reMainSelect(form.userId)">
-                <el-option
-                    v-for="item in form.userList"
-                    :key="item.value"
-                    :label="item.label"
-                    :value="item.value">
-                </el-option>
-              </el-select>
-            </el-form-item>
-            <el-form-item label="消耗课时">
-              <el-input v-model="form.ConsumeHour" placeholder="placeholder" :disabled="true"
-                        style="width: 220px"></el-input>
-            </el-form-item>
-            <el-form-item label="会员剩余课时">
-              <el-input v-model="form.remain" placeholder="placeholder" :disabled="true"
-                        style="width: 220px"></el-input>
-            </el-form-item>
-          </el-form>
-        </div>
-      </div>
-      <div class="dialogFooter">
-        <el-button type="primary" size="small" @click="ConfirmOrderAddByManager"
-                   :disabeld="BtnConfirmOrderAddByManager">确定
-        </el-button>
-        <el-button size="small" @click="dialogMemberVisible = false">取消</el-button>
-      </div>
-    </el-dialog>
-    <el-dialog title="预约会员" :visible.sync="dialogTableVisible" width="650px">
-      <el-table :data="gridData">
-        <el-table-column property="UserName" label="姓名" width="200"></el-table-column>
-        <el-table-column property="Phone" label="手机"></el-table-column>
-      </el-table>
-    </el-dialog>
-  </div>
-</template>
-
-<script>
-import Global from '../../Global.js'
-import {
-  TodayClassOrderQuery,
-  VipUserListQuery,
-  TodayVipOrderQuery,
-  ClassOrderQuery,
-  OrderAddByManager,
-  ClassListByOrderDate,
-  VipUserOrderQuery,
-  OrderCancelByManager,
-  STTDetailWxOrderEdit,
-  testTable,
-  testSelect,
-  WaitingBeginClassList,
-  ShopWxStatusEdit,
-  ClassListQuery,
-  ClassSimpleQuery,
-  AcrossUserSimpleQuery,
-  VipUserSimpleQuery
-} from "../../api/getApiRes";
-
-let qs = require('qs');
-export default {
-  data() {
-    return {
-      BtnConfirmOrderAddByManager: false,
-      serachBtnStatus: false,
-      activeName: 'second',
-      choiceDate: 0,//默认为今天
-      tableView: true,//其他dialog
-      dialogVisible: false,//其他dialog
-      dialogTableVisible: false,//其他dialog
-      dialogMemberVisible: false,//新增教练dialog
-      dialogLesson: false,//课时调整
-      dialogGift: false,//赠送课时调整
-      dialogExpTime: false,//有效期调整
-      dialogLessonTable: false,//教练课程
-      dialogTitle: '增加预约',
-      current: getNowDate(),
-      dialogValue: [],
-      weeks: [],
-      gridData: [],
-      start: 0,
-      draw: 1,
-      // panel 配置项目
-      panel: {
-        name: '',
-        phone: '',
-        classId: '0',
-        usercode: '',
-        username: '',
-        compname: '',
-        keyword: '',
-        USERCODE: '',
-        endType: '',
-        taskstatus: 99,
-        draw: 1,
-        start: 0,
-        recordsTotal: 0,
-        recordsTotal2: 0,
-        tableData: [],
-        allTableData: [],
-        allTableData2: [],
-        limit: '10',
-        multipleSort: false,
-        loading: false,
-        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: '当日'},
-        ],
-        // time1: globalBt(),
-      },
-      multipleSelection: [],
-      pageination: {
-        pageItem: 100,
-        pageoptions: pageOptions(),
-        total: 100,
-        pageIndex: 1,
-      },
-      form: {
-        name: '',
-        displayDay: '',
-        userCode: '',
-        shopId: '',
-        stdId: 0,
-        userId: 0,
-        memberType: 1,
-        lesson: 1,
-        gift: 1,
-        btnType: 0,//0新建,1编辑编辑
-        memo: '',
-        expTime: '',
-        dialogdata: [],//穿梭待选
-        dialogValue: [],//穿梭已选
-        userList: [],//穿梭已选
-        stdList: [],//穿梭已选
-        remain: 0,
-        ConsumeHour: 0,
-        addType: 0
-      },
-      memberTypes: [
-        {value: 1, label: '年教练'},
-        {value: 2, label: '充值教练'},
-      ],
-      tableData: [],
-      tableData2: [],
-      tableRadio: [],
-    }
-  },
-  mounted() {
-    if (this.$route.query.page == 'second') {
-      this.panel.name = this.$route.query.name;
-      this.activeName = 'second'
-    } else {
-      this.activeName = 'second'
-    }
-    this.ClassSelect();
-    this.panelSelect();
-    // this.getCurrWeekDays();
-    this.getFurtherDays();
-
-  },
-  methods: {
-    clickChange(item) {
-      this.tableRadio = item
-    },
-    // .课程表详情微信可预约状态修改
-    changeWechat(e, appoint) {
-      let that = this;
-      let statusText = appoint.WxOrder == 0 ? "关闭" : "开启";
-      this.$confirm('是否' + statusText + '课程预约?', '微信预约操作', {
-        confirmButtonText: '确定',
-        cancelButtonText: '取消',
-        type: 'warning'
-      }).then(() => {
-        let param = {
-          token: localStorage.token,
-          stdId: appoint.StdId,
-          wxOrder: e,
-        };
-        let postdata = qs.stringify(param);
-        STTDetailWxOrderEdit(postdata).then(res => {
-          let json = res;
-          if (json.Code == 0) {
-            that.$message({
-              showClose: true,
-              message: '预约已' + statusText + '!',
-              type: 'success'
-            });
-            // table 重载
-            that.getTableQuery();
-          } else {
-            // 状态返回
-            appoint.WxOrder = e == 0 ? 1 : 0;
-            that.$message.error(json.Memo + ' 错误码:' + json.Code);
-          }
-        })
-      }).catch(() => {
-        this.appoint = "0";
-        this.$message({
-          type: 'info',
-          message: '已取消当前操作'
-        });
-      });
-    },
-    panelSelect() {
-      let that = this;
-      let param = {
-        token: localStorage.token,
-      };
-      let postdata = qs.stringify(param);
-      ClassSimpleQuery(postdata).then(res => {
-        // ClassListQuery(postdata).then(res => {
-        let json = res;
-        if (json.Code == 0) {
-          if (json.Rs == null) return false;
-          that.panel.classOptions = turnClassResToOption(json.Rs);
-          that.panel.classOptions.unshift({value: '0', label: '全部'})
-        } else {
-          that.$message.error(json.Memo + ' 错误码:' + json.Code);
-        }
-      })
-    },
-    vipSelect(stdId) {
-      let that = this;
-      // 筛选相同的stdid的classId
-      that.form.stdList.map(function (item) {
-        if (item.value == stdId) {
-          that.form.ConsumeHour = item.ConsumeHour;
-          let param = {
-            token: localStorage.token,
-            // classId: item.classId
-          };
-          let postdata = qs.stringify(param);
-          // VipUserListQuery
-
-          // 本店会员添加时
-          if (that.form.addType == 1) {
-            VipUserSimpleQuery(postdata).then(res => {
-              let json = res;
-              if (json.Code == 0) {
-                that.form.userId = '';
-                that.form.userList = turnResToOptionBySimViper(json.Rs);
-              } else {
-                that.$message.error(json.Memo + ' 错误码:' + json.Code);
-              }
-            })
-          }
-          // 跨店会员添加时
-          if (that.form.addType == 2) {
-            AcrossUserSimpleQuery(postdata).then(res => {
-              let json = res;
-              if (json.Code == 0) {
-                that.form.userId = '';
-                that.form.userList = turnResToOptionBySimViper(json.Rs);
-              } else {
-                that.$message.error(json.Memo + ' 错误码:' + json.Code);
-              }
-            })
-          }
-        }
-      })
-    },
-    reMainSelect(userId) {
-      let that = this;
-      this.form.userList.filter((v) => {
-        if (v.key == userId) {
-          that.form.remain = v.RemainHour;
-        }
-      })
-
-    },
-    ClassSelect() {
-      let that = this;
-      let param = {
-        token: localStorage.token,
-        start: 1,//
-        tableMax: 9999,//
-      };
-      let postdata = qs.stringify(param);
-      WaitingBeginClassList(postdata).then(res => {
-        let json = res;
-        if (json.Code == 0) {
-          that.form.stdList = turnStdToOption(json.Rs);
-        } else {
-          that.$message.error(json.Memo + ' 错误码:' + json.Code);
-        }
-      })
-
-    },
-    ConfirmOrderAddByManager() {
-      let that = this;
-      that.BtnConfirmOrderAddByManager = true;
-      let param = {
-        token: localStorage.token,
-        stdId: this.form.stdId,
-        userId: this.form.userId,
-      };
-      let postdata = qs.stringify(param);
-      OrderAddByManager(postdata).then(res => {
-        let json = res;
-        that.BtnConfirmOrderAddByManager = false;
-        if (json.Code == 0) {
-          that.$message({
-            showClose: true,
-            message: '预约添加成功!',
-            type: 'success'
-          });
-          this.getTableQuery2();
-          that.dialogMemberVisible = false;
-        } else {
-          that.$message.error(json.Memo + ' 错误码:' + json.Code);
-        }
-      })
-    },
-    // 选择日期
-    choiceTime(i) {
-      this.choiceDate = parseInt(i);
-      // 读取当前页
-      if (this.activeName == 'first') {
-        this.getTableQuery();
-      } else {
-        // second
-        this.getTableQuery2();
-      }
-    },
-    seeDetail(row) {
-      let that = this;
-      let dayIndex = parseInt(this.choiceDate);
-      let param = {
-        token: localStorage.token,
-        classId: row.ClassId,
-        orderDate: this.weeks[dayIndex].orderDate,
-        stdId: row.StdId,
-      };
-      let postdata = qs.stringify(param);
-      VipUserOrderQuery(postdata).then(res => {
-        let json = res;
-        if (json.Code == 0) {
-          this.dialogTableVisible = true;
-          this.gridData = json.Rs;
-          console.log(123);
-        } else {
-          that.$message.error(json.Memo + ' 错误码:' + json.Code);
-        }
-      })
-    },
-    format(percentage) {
-      return percentage === 100 ? '已满' : `${percentage}%`;
-    },
-    // 编辑
-    BtnOrderCancelByManager(row) {
-      let that = this;
-      this.$confirm('是否取消用户  ' + row.UserName + '  的预约?', '取消预约', {
-        confirmButtonText: '确定',
-        cancelButtonText: '取消',
-        type: 'warning'
-      }).then(() => {
-        let param = {
-          token: localStorage.token,
-          orderId: row.OrderId,
-        };
-        let postdata = qs.stringify(param);
-        OrderCancelByManager(postdata).then(res => {
-          let json = res;
-          if (json.Code == 0) {
-            that.$message({
-              showClose: true,
-              message: row.UserName + '取消预约成功!',
-              type: 'success'
-            });
-            // table 重载
-            that.getTableQuery2();
-          } else {
-            that.$message.error(json.Memo + ' 错误码:' + json.Code);
-          }
-        })
-      }).catch(() => {
-        this.$message({
-          type: 'info',
-          message: '已取消操作'
-        });
-      });
-    },
-    // 禁用
-    pauseRow(row) {
-      let that = this;
-      this.$confirm('是否禁用用户' + row.name + '?', '禁用操作', {
-        confirmButtonText: '确定',
-        cancelButtonText: '取消',
-        type: 'warning'
-      }).then(() => {
-        let param = {
-          token: localStorage.token,
-          Id: row.Id,
-          status: 0,
-        };
-        let postdata = qs.stringify(param);
-        testTable(postdata).then(res => {
-          let json = res;
-          if (json.Code == 0) {
-            that.$message({
-              showClose: true,
-              message: row.name + '禁用成功!',
-              type: 'success'
-            });
-            // table 重载
-            that.getTableQuery();
-          } else {
-            that.$message.error(json.Memo + ' 错误码:' + json.Code);
-          }
-        })
-      }).catch(() => {
-        this.$message({
-          type: 'info',
-          message: '已取消禁用'
-        });
-      });
-    },
-    // 启用
-    runRow(row) {
-      let that = this;
-      this.$confirm('是否启用用户' + row.name + '?', '启用操作', {
-        confirmButtonText: '确定',
-        cancelButtonText: '取消',
-        type: 'warning'
-      }).then(() => {
-        let param = {
-          token: localStorage.token,
-          Id: row.Id,
-          status: 1,
-        };
-        let postdata = qs.stringify(param);
-        testTable(postdata).then(res => {
-          let json = res;
-          if (json.Code == 0) {
-            that.$message({
-              showClose: true,
-              message: row.name + '启用成功!',
-              type: 'success'
-            });
-            // table 重载
-            that.getTableQuery();
-          } else {
-            that.$message.error(json.Memo + ' 错误码:' + json.Code);
-          }
-        })
-      }).catch(() => {
-        this.$message({
-          type: 'info',
-          message: '已取消启用'
-        });
-      });
-    },
-    // 关闭所有
-    allDialogClose() {
-      this.dialogVisible = false;
-      this.dialogGift = false;
-      this.dialogLesson = false;
-      this.dialogExpTime = false;
-      this.dialogLessonTable = false;
-    },
-    // 用户禁用 todo
-    // 用户启用 todo
-    // 有效期调整
-    ExpTimeChange() {
-      // 仅针对年费用户,使用日期格式
-      this.allDialogClose();
-      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
-      }
-      let row = this.tableRadio;
-      if (parseInt(row.vipType) == 2) {
-        this.$message({
-          showClose: true,
-          message: '错了哦,充值教练不能调整有效期',
-          type: 'error'
-        });
-        return false
-      }
-      this.form.expTime = row.expTime;
-      this.form.rowName = row.name;
-      this.dialogVisible = true;
-      this.dialogExpTime = true;
-    },
-    // 课时调整
-    lessonChange() {
-      this.allDialogClose();
-      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
-      }
-      let row = this.tableRadio;
-      this.form.lesson = row.Recovered;
-      this.form.rowName = row.name;
-      this.dialogVisible = true;
-      this.dialogLesson = true;
-
-    },
-    // 赠送调整
-    giftChange() {
-      this.allDialogClose();
-      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
-      }
-      let row = this.tableRadio;
-      this.form.gift = row.Recovered;
-      this.form.rowName = row.name;
-      this.dialogVisible = true;
-      this.dialogGift = true;
-
-    },
-    // 增删教练课程
-    lessonStudenChange() {
-      this.allDialogClose();
-      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
-      }
-      let row = this.tableRadio;
-      this.form.gift = row.Recovered;
-      this.form.rowName = row.name;
-      this.dialogVisible = true;
-      this.dialogLessonTable = true;
-    },
-    // 确认提交新增教练
-    confirmMember() {
-      let that = this;
-      // checkNum
-      if (!that.form.userCode) {
-        this.$message.error('错了哦,手机号不能为空');
-        return false
-      }
-      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 + ' 错误码:' + json.Code);
-        }
-      })
-    },
-    confirmEditMember() {
-      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 + ' 错误码:' + json.Code);
-        }
-      })
-    },
-    // 确认提交课时
-    confirmLesson() {
-      let that = this;
-      // checkNum
-
-      let param = {
-        token: localStorage.token,
-        userCode: that.form.userCode,
-        lesson: that.form.lesson,
-      };
-      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 + ' 错误码:' + json.Code);
-        }
-      })
-    },
-    // 确认提交赠送
-    confirmGift() {
-      let that = this;
-      // checkNum
-
-      let param = {
-        token: localStorage.token,
-        userCode: that.form.userCode,
-        gift: that.form.gift,
-      };
-      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 + ' 错误码:' + json.Code);
-        }
-      })
-    },
-    // 确认提交有效期
-    confirmExpTime() {
-      let that = this;
-      // checkNum
-
-      let param = {
-        token: localStorage.token,
-        userCode: that.form.userCode,
-        expTime: that.form.expTime,
-      };
-      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 + ' 错误码:' + json.Code);
-        }
-      })
-    },
-    // 确认提交教练课程
-    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 + ' 错误码:' + json.Code);
-        }
-      })
-    },
-    // 新增预约
-    addMember(type) {
-      this.clearForm();
-      // 加载当前可选课程
-      this.getClassListByOrderDate();
-      this.dialogMemberVisible = true;
-      this.form.displayDay = this.weeks[this.choiceDate].data + ' ' + this.weeks[this.choiceDate].name;
-      this.btnType = 0;
-      this.form.ConsumeHour = 0;
-      this.form.addType = type
-      this.dialogTitle = '新增预约';
-    },
-    // 加载当前可选课程
-    getClassListByOrderDate() {
-      let that = this;
-      let dayIndex = parseInt(this.choiceDate);
-      let param = {
-        token: localStorage.token,
-        orderDate: this.weeks[dayIndex].orderDate,
-      };
-      let postdata = qs.stringify(param);
-      ClassListByOrderDate(postdata).then(res => {
-        let json = res;
-        if (json.Code == 0) {
-          that.form.stdList = turnStdToOption(json.Rs);
-        } else {
-          that.$message.error(json.Memo + ' 错误码:' + json.Code);
-        }
-      })
-    },
-    // 删除
-    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.tableRadio.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 + ' 错误码:' + json.Code);
-          }
-        });
-      }).catch(() => {
-        this.$message({
-          type: 'info',
-          message: '已取消删除'
-        });
-      });
-    },
-    handleSelectionChange(val) {
-      this.multipleSelection = val;
-    },
-    // 查询按钮
-    query() {
-      let that = this;
-      that.serachBtnStatus = true;
-      let totalTime = 2
-      let clock = window.setInterval(() => {
-        totalTime--
-        if (totalTime < 0) {
-          totalTime = 2;
-          that.serachBtnStatus = false;
-        }
-      }, 1000)
-      this.getTableQuery2();
-      this.$message.success('查询完毕');
-    },
-    clearForm() {
-      // clear
-      this.form.stdId = '';
-      this.form.userId = '';
-      this.form.name = '';
-      this.form.userCode = '';
-      this.form.shopId = '';
-      this.form.userList = [];
-    },
-    // 页面数据查询
-    getTableQuery() {
-      let that = this;
-      that.loading = true;
-      let dayIndex = parseInt(this.choiceDate);
-      let param = {
-        token: localStorage.token,
-        orderDate: this.weeks[dayIndex].orderDate,
-      };
-      let postdata = qs.stringify(param);
-      ClassOrderQuery(postdata).then(res => {
-        let json = res;
-        if (json.Code == 0) {
-          that.loading = false;
-          if (json.Rs) {
-            that.allTableData = [];
-            that.allTableData = json.Rs;
-            that.recordsTotal = json.Rs.length;
-          } else {
-            that.allTableData = [];
-            that.recordsTotal = 0;
-          }
-          // 设置分页数据
-          that.setPaginations();
-        } else {
-          that.$message.error(json.Memo + ' 错误码:' + json.Code);
-        }
-      })
-    },
-    getTableQuery2() {
-      let that = this;
-      that.loading = true;
-      let dayIndex = parseInt(this.choiceDate);
-      let param = {
-        token: localStorage.token,
-        classId: this.panel.classId,//
-        stdId: 0,//
-        name: this.panel.name,//
-        phone: this.panel.phone,//
-        orderDate: this.weeks[dayIndex].orderDate,
-      };
-      let postdata = qs.stringify(param);
-      VipUserOrderQuery(postdata).then(res => {
-        let json = res;
-        if (json.Code == 0) {
-          that.loading = false;
-          if (json.Rs) {
-            that.allTableData2 = json.Rs;
-            that.recordsTotal2 = json.Rs.length;
-          } else {
-            that.allTableData2 = [];
-            that.recordsTotal2 = 0;
-          }
-          // 设置分页数据
-          that.setPaginations2();
-        } else {
-          that.$message.error(json.Memo + ' 错误码:' + json.Code);
-        }
-      })
-    },
-    // 设置分页数据
-    setPaginations() {
-      // 分页属性
-      let that = this;
-      that.pageination.total = that.recordsTotal;
-
-      // 默认分页
-      that.tableData = that.allTableData.filter((item, index) => {
-        return index < that.pageination.pageItem;
-      });
-    },
-    // 设置分页数据
-    setPaginations2() {
-      // 分页属性
-      let that = this;
-      that.pageination.total = that.recordsTotal2;
-
-      // 默认分页
-      that.tableData2 = that.allTableData2.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 nonTfmtDate(column, 11);
-    },
-    // 过滤金额
-    filterMoney(value, row, column) {
-      let that = this;
-      return parseFloat(column).toFixed(2);
-    },
-    // 本周
-    getCurrWeekDays() {
-      let now = new Date();
-      let nowTime = now.getTime();
-      let day = now.getDay();
-      let oneDayTime = 24 * 60 * 60 * 1000;
-      let days = '';
-      let item = [];
-      let month = 0;
-      for (let i = 0; i < 7; i++) {
-        days = new Date(nowTime + (i - day) * oneDayTime);//显示周日
-        month = days.getMonth() + 1;
-        item = {
-          name: this.numberToWeek(days.getDay()),
-          data: month + '月' + days.getDate() + '日',
-          orderDate: new Date().getFullYear() + '-' + month + '-' + days.getDate()
-
-        }
-        this.weeks.push(item)
-      }
-    },
-
-    // 获取未来7天的
-    getFurtherDays() {
-      let now = new Date();
-      let nowTime = now.getTime();
-      let oneDayTime = 24 * 60 * 60 * 1000;
-      let days = '';
-      let item = [];
-      let month = 0;
-      let day = 0;
-      for (let i = 0; i < 7; i++) {
-        days = new Date(nowTime + (i) * oneDayTime);//显示周日
-        month = days.getMonth() + 1;
-        day = days.getDate();
-        month = month < 10 ? '0' + month : month;
-        day = day < 10 ? '0' + day : day;
-        item = {
-          name: this.numberToWeek(days.getDay()),
-          data: days.getMonth() + 1 + '月' + days.getDate() + '日',
-          orderDate: days.getFullYear() + '-' + month + '-' + day
-        }
-        this.weeks.push(item)
-      }
-      this.getTableQuery();
-      this.getTableQuery2();
-    },
-    numberToWeek(val) {
-      switch (parseInt(val)) {
-        case 1:
-          return '星期一';
-          break;
-        case 2:
-          return '星期二';
-          break;
-        case 3:
-          return '星期三';
-          break;
-        case 4:
-          return '星期四';
-          break;
-        case 5:
-          return '星期五';
-          break;
-        case 6:
-          return '星期六';
-          break;
-        case 0:
-          return '星期天';
-          break;
-      }
-    }
-  },
-  watch: {
-    $route(to) {
-      if (to.name == 'appoint') {
-        this.panelSelect();
-        if (this.$route.query.page == 'second') {
-          this.activeName = 'second';
-          this.panel.name = this.$route.query.name;
-          // second
-          this.getTableQuery2();
-        }
-      }
-
-    },
-    activeName(val) {
-      // 重置一次选择
-      this.tableRadio = [];
-      if (val == 'first') {
-        this.getTableQuery();
-      } else {
-        // second
-        this.getTableQuery2();
-        this.panelSelect();
-      }
-    },
-  }
-}
-</script>
-
-<style scoped>
-@import "../../assets/css/panel.css";
-
-.context {
-  /* height: 770px; */
-
-  overflow-y: scroll;
-  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 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;
-}
-
-.dialogContent {
-  width: 100%;
-  overflow: hidden;
-  display: block;
-  margin: 0 auto;
-}
-
-.dialogContent .pull-left {
-  width: 30%;
-  float: left;
-}
-
-.dialogContent .pull-right {
-  width: 70%;
-  float: right;
-}
-
-.current {
-  width: 158px;
-  height: 23px;
-  /*float: left;*/
-  border-radius: 250px;
-  text-align: center;
-  background: #F0F2F5;
-  color: #545454;
-  font-size: 14px;
-  padding: 3px 10px;
-  margin-left: 20px;
-}
-
-.timeList {
-  width: 800px;
-  overflow: hidden;
-  float: right;
-  position: relative;
-  z-index: 100;
-  cursor: pointer;
-}
-
-.timeList ul {
-  width: 100%;
-  overflow: hidden;
-  display: block;
-  margin: 0 auto;
-  list-style: none;
-}
-
-.timeList li {
-  width: 100px;
-  overflow: hidden;
-  list-style: none;
-  float: left;
-  margin-right: 6px;
-  border: 1px solid #ccc;
-  border-bottom: 0;
-  text-align: center;
-  height: 40px;
-  background: #fff;
-  z-index: 222;
-}
-
-em {
-  font-style: normal;
-}
-
-.timeList em {
-  width: 100%;
-  overflow: hidden;
-  display: block;
-  margin: 0 auto;
-  font-size: 14px;
-  text-align: center;
-}
-
-.timeList span {
-  width: 100%;
-  overflow: hidden;
-  display: block;
-  margin: 0 auto;
-  font-size: 12px;
-  text-align: center;
-}
-
-.timeList li.active {
-  border: 1px solid #3799FF;
-  border-bottom: 0;
-}
-
-.timeList li.active em {
-  color: #3799FF;
-}
-
-.timeList li.active span {
-  color: #3799FF;
-}
-
-.panel_control /deep/ .el-input {
-  max-width: 140px;
-  float: left;
-}
-
-.panel-body em {
-  float: left;
-  line-height: 40px;
-  margin-right: 10px;
-}
-
-.gary {
-  border: 1px solid #ccc;
-  border-bottom: 0;
-  color: #ccc;
-}
-
-.pull-right {
-  float: right;
-}
-
-.lessons {
-  padding: 1px 7px;
-  border-radius: 250px;
-  float: left;
-  color: #000;
-}
-
-/deep/ .el-progress__text {
-  position: relative;
-  top: 1px;
-  float: right;
-  line-height: 14px;
-  height: 16px;
-}
-
-/deep/ .el-progress-bar {
-  width: 190px;
-  float: left;
-  overflow: hidden;
-  margin-top: 5px;
-}
-
-.timeList li.active {
-  color: #fff;
-  background: #409EFF;
-}
-
-.timeList li.active span, .timeList li.active em {
-  color: #fff;
-}
-
-.acrossAddBtn {
-  margin-right: 10px;
-}
-
-/*ipad only*/
-@media only screen and (max-width: 1366px) {
-  .panel-body em {
-    font-size: 12px;
-  }
-
-  .timeList {
-    width: 510px;
-  }
-
-  .timeList li {
-    width: 60px;
-    font-size: 12px;
-  }
-
-  .timeList em {
-    font-size: 12px;
-  }
-
-  .timeList span {
-    font-size: 12px;
-  }
-
-  .panel_control /deep/ .el-input {
-    width: 130px;
-  }
-
-  /deep/ .el-button--warning {
-    margin-bottom: 5px;
-  }
-
-  .acrossAddBtn {
-    margin-right: 0;
-  }
-
-}
-</style>

+ 0 - 552
src/views/Other/record.vue

@@ -1,552 +0,0 @@
-<template>
-    <div class="context">
-        <div class="panel">
-            <h5>预约记录</h5>
-            <div class="panel-body">
-                <div class="panel_control">
-                    <el-row :gutter="20">
-                        <el-col :span="4">
-                            <em>姓名:</em>
-                            <el-input v-model="panel.name" placeholder="请输入姓名"></el-input>
-                        </el-col>
-                        <el-col :span="4">
-                            <em>手机号:</em>
-                            <el-input v-model="panel.phone" placeholder="请输入手机号" type="number"></el-input>
-                        </el-col>
-                        <el-col :span="7">
-                            <em>日期:</em>
-                            <el-date-picker
-                                    v-model="panel.timeScope"
-                                    type="daterange"
-                                    range-separator="至"
-                                    start-placeholder="开始日期"
-                                    end-placeholder="结束日期">
-                            </el-date-picker>
-                        </el-col>
-                        <el-col :span="4">
-                            <em>预约课程:</em>
-                            <el-select v-model="panel.classId">
-                                <el-option
-                                        v-for="item in panel.classOptions"
-                                        :key="item.value"
-                                        :label="item.label"
-                                        :value="item.value">
-                                </el-option>
-                            </el-select>
-                        </el-col>
-                        <el-col :span="4">
-                            <em>状态:</em>
-                            <el-select v-model="panel.status">
-                                <el-option
-                                        v-for="item in panel.options"
-                                        :key="item.value"
-                                        :label="item.label"
-                                        :value="item.value">
-                                </el-option>
-                            </el-select>
-                        </el-col>
-                        <el-col :span="2">
-                            <el-button size="" type="primary" @click="query" :disabled="serachBtnStatus" plain>查询
-                            </el-button>
-                        </el-col>
-                    </el-row>
-                </div>
-            </div>
-        </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 label="序号" type="index" width="50" align="center">
-                    <template scope="scope">
-                        <span>{{(start) + scope.$index + 1}}</span>
-                    </template>
-                </el-table-column>
-                <el-table-column
-                        prop="UserName"
-                        label="会员名"
-                        width="90"
-                >
-                </el-table-column>
-                <el-table-column
-                        prop="Phone"
-                        label="手机号"
-                        width="110"
-                        sortable
-                >
-                </el-table-column>
-                <el-table-column
-                        prop="ClassName"
-                        label="预约课程"
-                        width="110"
-                        sortable
-                >
-                    <template slot-scope="scope">
-                        <span class="lessons"
-                              :style="{ background:scope.row.ClassColor }">{{ scope.row.ClassName }}</span>
-                    </template>
-                </el-table-column>
-                <el-table-column
-                        prop="ConsumeHour"
-                        label="课时"
-                        sortable
-                >
-                </el-table-column>
-                <el-table-column
-                        prop="Base.CreatedAt"
-                        label="预约日期"
-                        width="180"
-                        :formatter="filterFmtDate"
-                        sortable
-                >
-                </el-table-column>
-                <el-table-column
-                        prop="BeginStr"
-                        label="上课时间"
-                        width="180"
-                        sortable
-                >
-                    <template slot-scope="scope">
-                        {{ scope.row.BeginTime |filterNoTTime }} - {{ scope.row.EndStr }}
-                    </template>
-                </el-table-column>
-                <el-table-column
-                        prop="RemainHour"
-                        label="是否跨店"
-                        sortable
-                >
-                    <template slot-scope="scope">
-                        <span v-if="scope.row.RemainHour == ''" style="color:red;">跨店</span>
-                        <span v-else style="color: #000">本店用户</span>
-                    </template>
-                </el-table-column>
-                <el-table-column
-                        prop="Status"
-                        label="状态"
-                        sortable
-                >
-                    <template slot-scope="scope">
-                        <span v-if="scope.row.Status == 1" style="color:yellowgreen;">已预约</span>
-                        <span v-if="scope.row.Status == 2" style="color: #ccc">已取消</span>
-                        <span v-if="scope.row.Status == 3" style="color: red">预约未到</span>
-                        <span v-if="scope.row.Status == 4" style="color:#000;">已完成</span>
-                    </template>
-                </el-table-column>
-            </el-table>
-            <br>
-            <el-pagination
-                    background
-                    :total="pageination.total"
-                    :page-size="pageination.pageItem"
-                    @current-change="pageChange"
-                    :current-page.sync="cur_page"
-            ></el-pagination>
-        </div>
-    </div>
-</template>
-
-<script>
-    import Global from '../../Global.js'
-    import {
-        OrderListQuery,
-        ClassListQuery,
-    } from "../../api/getApiRes";
-
-    let qs = require('qs');
-    export default {
-        data() {
-            return {
-                serachBtnStatus: false,
-                dialogVisible: false,//其他dialog
-                dialogMemberVisible: false,//新增会员dialog
-                dialogLesson: false,//课时调整
-                dialogGift: false,//赠送课时调整
-                dialogExpTime: false,//有效期调整
-                dialogLessonTable: false,//会员课程
-                dialogTitle: '新增会员',
-                dialogValue: [],
-                start: 0,
-                draw: 1,
-                // panel 配置项目
-                panel: {
-                    status: '',
-                    classId: '',
-                    usercode: '',
-                    username: '',
-                    timeScope: globalBt2(7),
-                    compname: '',
-                    keyword: '',
-                    USERCODE: '',
-                    endType: '',
-                    taskstatus: 99,
-                    draw: 1,
-                    start: 0,
-                    recordsTotal: 0,
-                    tableData: [],
-                    allTableData: [],
-                    limit: '10',
-                    multipleSort: false,
-                    loading: false,
-                    fileList: [],
-                    multipleSelection: [],
-                    detectedmac: '',
-                    classOptions: [],
-                    options: [
-                        {value: '', label: '全部'},
-                        {value: 1, label: '已预约'},
-                        {value: 2, label: '已取消'},
-                        {value: 3, label: '预约未到'},
-                        {value: 4, label: '已完成'},
-                    ],
-                    endTypeOptions: [
-                        {value: 99, label: '全部'},
-                        {value: 30, label: '近一个月'},
-                        {value: 7, label: '近一周'},
-                        {value: 1, label: '当日'},
-                    ],
-                    time1: globalBt(),
-                },
-                multipleSelection: [],
-                pageination: {
-                    pageItem: 10,
-                    pageoptions: pageOptions(),
-                    total: 100,
-                    pageIndex: 1,
-                },
-                form: {
-                    name: '',
-                    userCode: '',
-                    shopId: '',
-                    memberType: 1,
-                    lesson: 1,
-                    gift: 1,
-                    btnType: 0,//0新建,1编辑编辑
-                    memo: '',
-                    expTime: '',
-                    dialogdata: [],//穿梭待选
-                    dialogValue: [],//穿梭已选
-                },
-                memberTypes: [
-                    {value: 1, label: '年会员'},
-                    {value: 2, label: '充值会员'},
-                ],
-                tableData: []
-            }
-        },
-        mounted() {
-            this.panelSelect();
-            this.getTableQuery();
-        },
-        methods: {
-            // 加载选项
-            panelSelect() {
-                let that = this;
-                let param = {
-                    token: localStorage.token,
-                    classType: 1//去掉午休
-                };
-                let postdata = qs.stringify(param);
-                ClassListQuery(postdata).then(res => {
-                    let json = res;
-                    if (json.Code == 0) {
-                        if (json.Rs == null) return false;
-                        that.panel.classOptions = turnClassResToOption(json.Rs);
-                        that.panel.classOptions.unshift({value: '', label: '全部'})
-                    } else {
-                        that.$message.error(json.Memo + ' 错误码:' + json.Code);
-                    }
-                })
-            },
-            handleSelectionChange(val) {
-                this.multipleSelection = val;
-            },
-            // 查询按钮
-            query() {
-                let that = this;
-                that.start = 0;
-                that.cur_page = 1;
-                that.serachBtnStatus = true;
-                let totalTime = 2;
-                let clock = window.setInterval(() => {
-                    totalTime--;
-                    if (totalTime < 0) {
-                        totalTime = 2;
-                        that.serachBtnStatus = false;
-                    }
-                }, 1000);
-                this.getTableQuery();
-                this.$message.success('查询完毕');
-            },
-            clearForm() {
-                // clear
-                this.form.name = '';
-                this.form.userCode = '';
-                this.form.shopId = '';
-            },
-            // 页面数据查询
-            getTableQuery() {
-                let that = this;
-                // this.getGetChildRegionSelect(0, 1);
-                that.loading = true;
-                console.log(that.panel.timeScope[0]);
-                // let beginOrdertime = parseInt(that.panel.timeScope[0].valueOf() / 1000);
-                // let endOrdertime = parseInt(that.panel.timeScope[1].valueOf() / 1000);
-
-                // beginOrdertime = '';
-                // endOrdertime = '';
-                // 查询检测设备。上级区域id,区域id必传。regionid传0,查询supregionid对应所有子区域的检测设备。 如果supregionid,regionid都传0,默认查询企业ID下所有检测设备
-                let param = {
-                    token: localStorage.token,
-                    classId: that.panel.classId,//
-                    name: that.panel.name,//
-                    phone: that.panel.phone,//
-                    beginOrdertime:nonTfmtDatetoLength(that.panel.timeScope[0], 10) + " 00:00:00",//
-                    endOrdertime: nonTfmtDatetoLength(that.panel.timeScope[1], 10) + " 23:59:59",//
-                    status: that.panel.status,//标签名
-                };
-                let postdata = qs.stringify(param);
-                OrderListQuery(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 + ' 错误码:' + json.Code);
-                    }
-                })
-            },
-
-            // 设置分页数据
-            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 nonTfmtDate(column, 11);
-            },
-            // 过滤金额
-            filterMoney(value, row, column) {
-                let that = this;
-                return parseFloat(column).toFixed(2);
-            },
-        },
-        filters: {
-            filterNoTTime: function (value) {
-                if (!value) {
-                    return 0
-                } else {
-                    return nonTfmtDatetoLength(value, 16);
-                }
-            },
-        },
-        watch: {
-            $route(to) {
-                if (to.name == 'record') {
-                    this.panelSelect();
-                    this.getTableQuery();
-                }
-            },
-        },
-    }
-</script>
-
-<style scoped>
-    @import "../../assets/css/panel.css";
-
-    .context {
-        /* height: 770px; */
-        overflow-y: scroll;
-
-        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 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;
-    }
-
-    .dialogContent {
-        width: 100%;
-        overflow: hidden;
-        display: block;
-        margin: 0 auto;
-    }
-
-    .dialogContent .pull-left {
-        width: 30%;
-        float: left;
-    }
-
-    .dialogContent .pull-right {
-        width: 70%;
-        float: right;
-    }
-
-    .panel /deep/ .el-date-editor--daterange {
-        /*width: 260px;*/
-    }
-
-    /deep/ .el-col-4 {
-        width: 15% !important;
-    }
-
-    .panel /deep/ .el-input__inner {
-        /*width: 130px;*/
-    }
-
-    .panel /deep/ .el-input {
-        /*width: 130px;*/
-    }
-
-    .panel /deep/ .el-select {
-        width: 130px;
-    }
-
-    /deep/ .el-date-editor .el-range-separator {
-        line-height: 22px;
-    }
-
-    .lessons {
-        padding: 1px 7px;
-        border-radius: 250px;
-        float: left;
-        color: #000;
-    }
-
-    .el-col-7 {
-        width: 25%;
-    }
-    .panel /deep/ .el-date-editor--daterange {
-        width: 260px;
-    }
-    /*ipad only*/
-    @media only screen and (max-width: 1366px) {
-        .panel-body {
-        }
-
-        .panel .el-button {
-            margin-top: 5px;
-        }
-
-        .panel .el-col-4:nth-child(6) {
-            width: 9% !important;
-            float: right;
-            margin-top: 25px;
-        }
-
-        .el-col-7 {
-            width: 29%;
-        }
-    }
-
-</style>

+ 3 - 3
src/views/Class/classChange.vue → src/views/Report/ClassHourStatistics.vue

@@ -502,7 +502,7 @@ export default {
 						that.recordsTotal = 0;
 					}
 					// 设置分页数据
-					that.setPaginations();
+					that.setPagination();
 				} else {
 					that.$message.error(json.Memo + " 错误码:" + json.Code);
 				}
@@ -519,7 +519,7 @@ export default {
 				url + "&bt=" + bt + "&et=" + et + "&usercode=" + usercode;
 		},
 		// 设置分页数据
-		setPaginations() {
+		setPagination() {
 			// 分页属性
 			let that = this;
 			that.pageination.total = that.recordsTotal;
@@ -573,7 +573,7 @@ export default {
 	},
 	watch: {
 		$route(to) {
-			if (to.name == "classChange") {
+			if (to.name == "classHourStatistics") {
         // this.panelSelect();
         this.getTableQuery();
       }

+ 3 - 3
src/views/Class/ClassTime.vue → src/views/Report/CoachHourStatistics.vue

@@ -220,7 +220,7 @@ export default {
 	},
 	watch: {
 		$route(to) {
-			if (to.name == "shopManage") {
+			if (to.name == "coachHourStatistics") {
 				this.getTableQuery();
 			}
 		},
@@ -571,14 +571,14 @@ export default {
 						that.recordsTotal = 0;
 					}
 					// 设置分页数据
-					that.setPaginations();
+					that.setPagination();
 				} else {
 					that.$message.error(json.Memo + " 错误码:" + json.Code);
 				}
 			});
 		},
 		// 设置分页数据
-		setPaginations() {
+		setPagination() {
 			// 分页属性
 			let that = this;
 			that.pageination.total = that.recordsTotal;

+ 0 - 861
src/views/SchoolTimeTable/courses.vue

@@ -1,861 +0,0 @@
-<template>
-    <div class="context">
-        <div class="panel">
-            <h5>课程管理
-            </h5>
-            <div class="likeTab">
-                <el-button type="primary" @click="goType('courses')" size="mini">当前课程</el-button>
-                <el-button type="" @click="goType('coursesHistory')" size="mini">历史记录</el-button>
-            </div>
-            <div class="panel-body">
-                <div class="panel_control">
-                    <el-row :gutter="20">
-                        <el-col :span="7">
-                            <el-date-picker v-model="panel.timeScope" type="daterange" range-separator="至"
-                                start-placeholder="开始日期" end-placeholder="结束日期">
-                            </el-date-picker>
-                        </el-col>
-                        <el-col :span="4">
-                            <el-button size="" type="primary" @click="query" :disabled="serachBtnStatus" plain>查询
-                            </el-button>
-                        </el-col>
-                    </el-row>
-                </div>
-            </div>
-        </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 label="序号" type="index" width="50" align="center" fixed>
-                    <template scope="scope">
-                        <span>{{(start) + scope.$index + 1}}</span>
-                    </template>
-                </el-table-column>
-                <el-table-column prop="BeginTime" label="上课时间" width="160" :formatter="filterFmtDate" fixed>
-                </el-table-column>
-                <el-table-column prop="ClassName" label="课程" sortable  width="120" fixed>
-                    <template slot-scope="scope">
-                        <span class="lessonSpan"
-                            :style="{background:scope.row.ClassColor}">{{scope.row.ClassName}}</span>
-                    </template>
-                </el-table-column>
-                <el-table-column prop="ConsumeHour" label="消耗课时" width="110" sortable>
-                </el-table-column>
-                <el-table-column prop="OrderNum" label="实际预约" width="110" sortable>
-                </el-table-column>
-                <el-table-column prop="SvName" label="区域" width="110" sortable>
-                </el-table-column> 
-                 <el-table-column prop="WxOrder" label="预约状态" width="110" sortable>
-                    <template slot-scope="scope">
-                        <span v-if="scope.row.WxOrder == 1" style="color: yellowgreen">可约</span>
-                        <span v-if="scope.row.WxOrder == 0" style="color: red">不可约</span>
-                    </template>
-                </el-table-column>
-                <el-table-column prop="ClassType" label="课程类型"  width="110" sortable>
-                    <template slot-scope="scope">
-                        <span v-if="scope.row.ClassType == 1">团课</span>
-                        <span v-if="scope.row.ClassType == 3">私教</span>
-                        <span v-if="scope.row.ClassType == 2 && scope.row.PkNum == 2">两队PK</span>
-                        <span v-if="scope.row.ClassType == 2 && scope.row.PkNum == 3">三队PK</span>
-                    </template>
-                </el-table-column>
-                <el-table-column prop="FinishClass" label="当前状态" width="110" sortable>
-                    <template slot-scope="scope">
-                        <span v-if="scope.row.FinishClass == 0" style="color: red">未上课</span>
-                        <span v-if="scope.row.FinishClass == 1">已下课</span>
-                        <span v-if="scope.row.FinishClass == 2" style="color: yellowgreen">已上课</span>
-                        <span v-if="scope.row.FinishClass == 3">准备上课</span>
-                        <span v-if="scope.row.FinishClass == 4">已完成</span>
-                    </template>
-                </el-table-column>
-                <el-table-column prop="Status" label="操作" >
-                    <template slot-scope="scope">
-                        <!--<el-button type="primary" round size="mini" @click="checkClassOverPrepare(scope.row)">-->
-                        <!--下课-->
-                        <!--</el-button>-->
-                        <el-button type="primary" round size="mini" v-if="scope.row.FinishClass == 0"
-                            @click="showDialogMemberVisible(scope.row)">
-                            上课
-                        </el-button>
-                        <!--<el-button type="danger" round size="mini" v-if="scope.row.FinishClass == 0"-->
-                        <!--@click="closeLesson(scope.row)">-->
-                        <!--关课-->
-                        <!--</el-button>-->
-                        <el-button type="primary" round size="mini"
-                            v-if="scope.row.FinishClass == 3 || scope.row.FinishClass == 2" @click="seeEdit(scope.row)">
-                            管理
-                        </el-button>
-                        <!--修改区域 todo-->
-                        <el-button type="primary" round plain size="mini" v-if="scope.row.FinishClass == 3"
-                            @click="changeShopVenue(scope.row)">
-                            编辑
-                        </el-button>
-                        <!--已完成才能看详情-->
-                        <el-button type="primary" round plain size="mini"
-                            v-if="scope.row.FinishClass == 1 || scope.row.FinishClass == 4"
-                            @click="seeDetail(scope.row)">
-                            详情
-                        </el-button>
-
-                    </template>
-                </el-table-column>
-            </el-table>
-            <br>
-            <el-pagination background :total="pageination.total" :page-size="pageination.pageItem"
-                @current-change="pageChange" :current-page.sync="cur_page"></el-pagination>
-        </div>
-        <el-dialog :title="dialogTitle" :visible.sync="dialogMemberVisible" width="650px">
-            <div class="dialogContent">
-                <h5 class="classNames">{{className}}</h5>
-                <div class="">
-                    <el-form ref="form" :model="form" label-width="160px">
-                        <el-form-item label="区域" :required="true">
-                            <el-select v-model="form.svId" filterable placeholder="请选择" @change="changeLocationValue">
-                                <el-option v-for="item in form.svList" :key="item.SvId" :label="item.Name"
-                                    :value="item.SvId">
-                                </el-option>
-                            </el-select>
-                        </el-form-item>
-                        <el-form-item label="类型" :required="true">
-                            <el-select v-model="form.classType" filterable placeholder="请选择">
-                                <el-option v-for="item in form.ClassTypeOptions" :key="item.value" :label="item.label"
-                                    :value="item.value">
-                                </el-option>
-                            </el-select>
-                        </el-form-item>
-                        <el-form-item label="组队方式" v-if="form.classType == 2">
-                            <el-select v-model="form.pkNum" filterable placeholder="请选择">
-                                <el-option v-for="item in form.PKTypeOptions" :key="item.value" :label="item.label"
-                                    :value="item.value">
-                                </el-option>
-                            </el-select>
-                        </el-form-item>
-                        <!--选教练,非必选-->
-                        <el-form-item label="上课教练">
-                            <!--<el-transfer filterable v-model="dialogCoachValue" :data="form.dialogCoachdata"-->
-                            <!--:titles="['教练列表', '已添加教练']"></el-transfer>-->
-                            <el-select v-model="dialogCoachValue" filterable placeholder="请选择">
-                                <el-option v-for="item in form.dialogCoachdata" :key="item.key" :label="item.label"
-                                    :value="item.value">
-                                </el-option>
-                            </el-select>
-                        </el-form-item>
-                    </el-form>
-                </div>
-            </div>
-            <div class="dialogFooter">
-                <el-button type="primary" size="small" v-if="form.btnType == 0" :disabled="PrepareBtnStatus"
-                    @click="getClassStartPrepare()">确定
-                </el-button>
-                <el-button type="primary" size="small" v-if="form.btnType == 1" @click="getClassStartPrepareForEdit()">
-                    确定
-                </el-button>
-                <el-button size="small" @click="dialogMemberVisible = false">取消</el-button>
-            </div>
-        </el-dialog>
-    </div>
-</template>
-
-<script>
-    import Global from '../../Global.js'
-    import {
-        ClassPreFinishListQuery,
-        ClassOverPrepare,
-        ClassDetailQuery,
-        QueryShopVenue,
-        ClassStartPrepare,
-        DispPlanInfoEdit,
-        ShopManagerListQuery,
-    } from "../../api/getApiRes";
-
-    let qs = require('qs');
-    export default {
-        data() {
-            return {
-                dialogMemberVisible: false,
-                serachBtnStatus: false,
-                PrepareBtnStatus: false,
-                dialogVisible: false,//其他dialog
-                dialogFinishVisible: false,//确认下课dialog
-                dialogLesson: false,//课时调整
-                dialogGift: false,//赠送课时调整
-                dialogExpTime: false,//有效期调整
-                dialogLessonTable: false,//会员课程
-                dialogTitle: '上课准备',
-                dialogCoachValue: [],
-                className: '',
-                current: getNowDate(),
-                dialogValue: [],
-                start: 0,
-                draw: 1,
-                cur_page: 1,
-                // panel 配置项目
-                panel: {
-                    usercode: '',
-                    username: '',
-                    compname: '',
-                    keyword: '',
-                    USERCODE: '',
-                    endType: '',
-                    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: '已完成' },
-                    ],
-
-                    endTypeOptions: [
-                        { value: 99, label: '全部' },
-                        { value: 30, label: '近一个月' },
-                        { value: 7, label: '近一周' },
-                        { value: 1, label: '当日' },
-                    ],
-                    time1: globalBt(),
-                    timeScope: globalBt2(0),
-                },
-                multipleSelection: [],
-                pageination: {
-                    pageItem: 10,
-                    pageoptions: pageOptions(),
-                    total: 100,
-                    pageIndex: 1,
-                },
-                form: {
-                    name: '',
-                    svId: '',
-                    svName: '',
-                    classType: 1,
-                    userCode: '',
-                    coach: '',
-                    coachOptions: [],
-                    shopId: '',
-                    memberType: 1,
-                    lesson: 1,
-                    gift: 1,
-                    pktype: 1,
-                    pkNum: 2,
-                    btnType: 0,//0新建,1编辑
-                    memo: '',
-                    expTime: '',
-                    StdId: '',
-                    svList: [],//区域列表
-                    dialogdata: [],//穿梭待选
-                    dialogValue: [],//穿梭已选
-                    dialogCoachdata: [],//穿梭已选
-                    ClassTypeOptions: [
-                        { value: 1, label: '团课' },
-                        { value: 2, label: '竞技PK' },
-                        { value: 3, label: '私教' },
-                    ],
-                    PKTypeOptions: [
-                        { value: 2, label: '2队PK' },
-                        { value: 3, label: '3队PK' },
-                    ],
-                },
-                memberTypes: [
-                    { value: 1, label: '年会员' },
-                    { value: 2, label: '充值会员' },
-                ],
-                tableData: []
-            }
-        },
-        mounted() {
-            this.getTableQuery();
-        },
-        methods: {
-            goType(url) {
-                this.$router.push({ path: '/' + url });
-            },
-            // 更改上课区域
-            changeShopVenue(row) {
-                this.dialogMemberVisible = true;
-                this.form.btnType = 1;//0新建,1编辑
-                // 读取本行信息
-                this.dialogMemberVisible = true;
-                this.className = row.ClassName + ' ' + row.BeginStr + ' - ' + row.EndStr;
-                this.form.StdId = row.StdId;
-                this.getQueryShopVenue();
-                this.form.svId = row.SvId;
-                this.form.classType = row.ClassType;
-                this.form.pkNum = row.PkNum;
-            },
-            // 准备上课
-            getClassStartPrepare() {
-                let that = this;
-                if (!that.form.svId) {
-                    that.$message.error('上课区域不能为空');
-                    return false
-                }
-                that.PrepareBtnStatus = true;
-                // 不是竞技pk的时候为0
-                let uppkNum = that.form.classType == 2 ? that.form.pkNum : 0;
-                let tid = that.dialogCoachValue.toString();
-                let param = {
-                    token: localStorage.token,
-                    stdId: that.form.StdId,
-                    svId: that.form.svId,
-                    svName: that.form.svName,
-                    classType: that.form.classType,
-                    pkNum: uppkNum,
-                    tid: tid,//教练id
-                };
-                that.serachBtnStatus = true;
-                let totalTime = 2;
-                let clock = window.setInterval(() => {
-                    totalTime--;
-                    if (totalTime < 0) {
-                        totalTime = 2;
-                        that.serachBtnStatus = false;
-                    }
-                }, 1000);
-                let postdata = qs.stringify(param);
-                ClassStartPrepare(postdata).then(res => {
-                    that.PrepareBtnStatus = false;
-                    let json = res;
-                    if (json.Code == 0) {
-                        this.$router.push({
-                            path: '/courseEdit',
-                            query: {
-                                StdId: that.form.StdId,
-                                ClassName: that.form.ClassName,
-                                BeginStr: that.form.BeginStr,
-                                EndStr: that.form.EndStr,
-                                FinishClass: 3,
-                                ClassType: that.form.classType,
-                                PkNum: uppkNum,
-                            }
-                        });
-                        that.dialogMemberVisible = false;
-                        this.getTableQuery();
-
-                    } else {
-                        that.$message.error(json.Memo + ' 错误码:' + json.Code);
-                    }
-                })
-            },
-            // 编辑
-            getClassStartPrepareForEdit() {
-                let that = this;
-                if (!that.form.svId) {
-                    that.$message.error('上课区域不能为空');
-                    return false
-                }
-                // 不是竞技pk的时候为0
-                let uppkNum = that.form.classType == 2 ? that.form.pkNum : 0;
-
-                let param = {
-                    token: localStorage.token,
-                    stdId: that.form.StdId,
-                    svId: that.form.svId,
-                    svName: that.form.svName,
-                    classType: that.form.classType,
-                    pkNum: uppkNum,
-                };
-                let postdata = qs.stringify(param);
-                DispPlanInfoEdit(postdata).then(res => {
-                    let json = res;
-                    if (json.Code == 0) {
-                        // NewId: 0
-                        that.dialogMemberVisible = false;
-                        this.getTableQuery();
-                    } else {
-                        that.$message.error(json.Memo + ' 错误码:' + json.Code);
-                    }
-                })
-            },
-            seeDetail(row) {
-                this.$router.push({
-                    path: '/classInfoDetail', query: {
-                        StdId: row.StdId,
-                        ClassName: row.ClassName,
-                        BeginStr: row.BeginStr,
-                        EndStr: row.EndStr,
-                    }
-                });
-            },
-            seeEdit(row) {
-                this.$router.push({
-                    path: '/courseEdit', query: {
-                        StdId: row.StdId,
-                        ClassName: row.ClassName,
-                        BeginStr: row.BeginStr,
-                        EndStr: row.EndStr,
-                        FinishClass: row.FinishClass,
-                        ClassType: row.ClassType,
-                        PkNum: row.PkNum,
-                    }
-                });
-            },
-            // 关课
-            closeLesson(row) {
-                that.$message.error('功能未上线,请耐心等候');
-                return false;
-                let that = this;
-                let param = {
-                    token: localStorage.token,
-                    hrId: row.HrId,
-                    status: 9,//
-                };
-                let postdata = qs.stringify(param);
-                this.$confirm('此操作将永久关闭当前课程, 是否继续?', '提示', {
-                    confirmButtonText: '确定',
-                    cancelButtonText: '取消',
-                    type: 'warning'
-                }).then(() => {
-                    HrSensorsStatusEdit(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 + ' 错误码:' + json.Code);
-                        }
-                    });
-                }).catch(() => {
-                    this.$message({
-                        type: 'info',
-                        message: '已取消关课'
-                    });
-                });
-            },
-            // 获取select的label
-            changeLocationValue(val) {
-                //locations是v-for里面的也是datas里面的值
-                let obj = {};
-                obj = this.form.svList.find((item) => {
-                    return item.SvId === val;
-                });
-                this.form.svName = obj.Name;
-            },
-            // 获取区域列表
-            getQueryShopVenue() {
-                let that = this;
-                let param = {
-                    key: localStorage.ServiceKey,
-                    shopId: localStorage.ServiceId,
-                };
-                if (!localStorage.ServiceKey) {
-                    that.$message.error('还未与心率系统对接,请联系管理员');
-                    return false
-                }
-                let postdata = qs.stringify(param);
-                QueryShopVenue(postdata).then(res => {
-                    let json = res;
-                    if (json.Code == 0) {
-                        that.form.svList = json.Rs;
-                    } else {
-                        that.$message.error(json.Memo + ' 错误码:' + json.Code);
-                    }
-                })
-            },
-            vipSelect(stdId) {
-                let that = this;
-                // 筛选相同的stdid的classId
-                that.form.stdList.map(function (item) {
-                    if (item.value == stdId) {
-                        let param = {
-                            token: localStorage.token,
-                            // classId: item.classId
-                        };
-                        let postdata = qs.stringify(param);
-                        // VipUserListQuery
-                        VipUserSimpleQuery(postdata).then(res => {
-                            let json = res;
-                            if (json.Code == 0) {
-                                that.form.userId = '';
-                                that.form.userList = turnResToOptionBySimViper(json.Rs);
-                            } else {
-                                that.$message.error(json.Memo + ' 错误码:' + json.Code);
-                            }
-                        })
-                    }
-                })
-            },
-            showDialogMemberVisible(row) {
-                this.dialogMemberVisible = true;
-                this.form.btnType = 0;//0新建,1编辑编辑
-                // clear
-                this.form.svList = "";
-                this.form.classType = 1;
-                this.form.pkNum = 2;
-
-                this.form.StdId = row.StdId;
-                this.form.ClassName = row.ClassName;
-                this.form.BeginStr = row.BeginStr;
-                this.form.EndStr = row.EndStr;
-                this.form.FinishClass = row.FinishClass;
-                this.form.ClassType = row.ClassType;
-                this.form.PkNum = row.PkNum;
-
-                this.className = row.ClassName + ' ' + row.BeginStr + ' - ' + row.EndStr;
-                this.form.StdId = row.StdId;
-                this.getCoachOption();
-                this.getQueryShopVenue();
-            },
-            // 获取教练选项
-            getCoachOption() {
-                let that = this;
-                let param = {
-                    token: localStorage.token,
-                    name: this.panel.name,//
-                    phone: this.panel.phone,//
-                    shopId: localStorage.ShopId,//
-                    adminType: 4,//
-                    start: 1,//
-                    tableMax: 299,//
-                };
-                let postdata = qs.stringify(param);
-                ShopManagerListQuery(postdata).then(res => {
-                    let json = res;
-                    if (json.Code == 0) {
-                        that.form.dialogCoachdata = turnResToOptionByUsers(json.Rs);
-                    } else {
-                        that.$message.error(json.Memo + ' 错误码:' + json.Code);
-                    }
-                })
-            },
-            // 检测当前课是否处于可改变状态
-            // 固定下当前已预约人数列表
-            checkClassOverPrepare(row) {
-                let that = this;
-                let param = {
-                    token: localStorage.token,
-                    stdId: row.StdId,
-                };
-                let postdata = qs.stringify(param);
-                ClassOverPrepare(postdata).then(res => {
-                    let json = res;
-                    if (json.Code == 0) {
-                        that.goFinish(row);
-                    } else {
-                        that.$message.error(json.Memo + ' 错误码:' + json.Code);
-                    }
-                })
-            },
-            goFinish(row) {
-                this.$router.push({
-                    path: '/finishDetail', query: {
-                        id: row.StdId,
-                        classId: row.ClassId,
-                        ClassName: row.ClassName,
-                        BeginTime: row.BeginTime,
-                    }
-                });
-            },
-            handleSelectionChange(val) {
-                this.multipleSelection = val;
-            },
-            // 查询按钮
-            query() {
-                let that = this;
-                that.start = 0;
-                that.cur_page = 1;
-                that.serachBtnStatus = true;
-                let totalTime = 2;
-                let clock = window.setInterval(() => {
-                    totalTime--;
-                    if (totalTime < 0) {
-                        totalTime = 2;
-                        that.serachBtnStatus = false;
-                    }
-                }, 1000);
-                this.getTableQuery();
-
-                this.$message.success('查询完毕');
-            },
-            // 页面数据查询
-            getTableQuery() {
-                let that = this;
-                that.loading = true;
-                let param = {
-                    token: localStorage.token,
-                    tagname: that.panel.tagname,//标签名
-                    bt: nonTfmtDatetoLength(that.panel.timeScope[0], 10) + " 00:00:00",
-                    et: nonTfmtDatetoLength(that.panel.timeScope[1], 10) + " 23:59:59",
-                    fcStatus: '0,3,2',//状态字符串,空是全部 或 0,3,2 是待上课 或 1,4 已下课
-                    start: 1,//
-                    tableMax: 9999,//
-                };
-                let postdata = qs.stringify(param);
-                ClassDetailQuery(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 + ' 错误码:' + json.Code);
-                    }
-                })
-            },
-            // 设置分页数据
-            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();
-            },
-            // 过滤时间
-            filterFmtDate(value, row, column) {
-                let that = this;
-                return nonTfmtDate(column, 11);
-            },
-        },
-        watch: {
-            $route(to) {
-                if (to.name == 'courses') {
-                    this.getTableQuery();
-                }
-            },
-        },
-    }
-</script>
-
-<style scoped>
-    @import "../../assets/css/panel.css";
-
-    .context {
-        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 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;
-    }
-
-    .dialogContent {
-        width: 100%;
-        overflow: hidden;
-        display: block;
-        margin: 0 auto;
-    }
-
-    .dialogContent .pull-left {
-        width: 30%;
-        float: left;
-    }
-
-    .dialogContent .pull-right {
-        width: 70%;
-        float: right;
-    }
-
-    .blueTitle {
-        width: 200px;
-        overflow: hidden;
-        display: block;
-        margin: 0 auto;
-        margin-top: 10px;
-        margin-bottom: 40px;
-        background: #F0F2F5;
-        border-radius: 19px;
-        text-align: center;
-        color: #3799FF;
-        font-size: 16px;
-        padding: 5px 24px;
-    }
-
-    .current {
-        width: 158px;
-        height: 23px;
-        /*float: left;*/
-        border-radius: 250px;
-        text-align: center;
-        background: #F0F2F5;
-        color: #545454;
-        font-size: 14px;
-        padding: 3px 10px;
-        margin-left: 20px;
-    }
-
-    .lessonSpan {
-        width: 78px;
-        height: 22px;
-        border-radius: 11px;
-        margin-right: 5px;
-        float: left;
-        margin-bottom: 3px;
-        text-align: center;
-        color: #000;
-        font-size: 12px;
-    }
-
-    .classNames {
-        width: 211px;
-        height: 25px;
-        background: #f0f2f5;
-        font-family: "Source Han Sans CN";
-        font-weight: normal;
-        font-size: 16px;
-        color: #3799ff;
-        border-radius: 250px;
-        text-align: center;
-        margin: 0 auto;
-        margin-bottom: 10px;
-    }
-
-    /deep/ .el-date-editor .el-range-separator {
-        line-height: 25px;
-    }
-
-    .likeTab {
-        width: 100%;
-        overflow: hidden;
-        display: block;
-        margin: 0 auto;
-        padding-top: 10px;
-        padding-bottom: 0;
-        border-bottom: 1px solid #ccc;
-        margin-bottom: 10px;
-    }
-
-    .likeTab button {
-        float: left;
-        border-radius: 0;
-    }
-
-    .likeTab button.pull-right {
-        float: right;
-    }
-
-    .el-dialog__body .el-date-editor.el-input__inner {
-        width: 156px;
-    }
-
-    .el-transfer-panel__item.el-checkbox .el-checkbox__label {
-        width: 156px;
-    }
-
-    /deep/ .el-dialog__body .el-transfer-panel__item .el-checkbox__input {
-        left: 10px;
-    }
-
-    /deep/ .el-dialog__body .el-form-item__content .el-select {
-        float: left;
-        margin-left: 50px;
-    }
-
-    /deep/ .el-dialog__body .el-transfer {
-        float: left;
-        margin-left: 50px;
-    }
-
-    @media (min-width: 320px) and (max-width: 1367px) {
-        .panel /deep/ .el-date-editor--daterange {
-            max-width: 240px;
-        }
-        .panel /deep/ .el-date-editor .el-range-separator {
-            line-height: 35px;
-        }
-    }
-</style>

+ 0 - 400
src/views/SchoolTimeTable/finish.vue

@@ -1,400 +0,0 @@
-<template>
-    <div class="context">
-        <div class="panel">
-            <h5>下课管理
-                <!--<span class="current">{{current}}</span>-->
-            </h5>
-        </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="index"
-                        label="序号"
-                        align="center"
-
-                        width="50">
-                </el-table-column>
-                <el-table-column
-                        prop="EndTime"
-                        label="下课时间"
-                        :formatter="filterFmtDate"
-                >
-                </el-table-column>
-                <el-table-column
-                        prop="ClassName"
-                        label="课程"
-                        sortable
-                >
-                    <template slot-scope="scope">
-                        <span class="lessonSpan"
-                              :style="{background:scope.row.ClassColor}">{{scope.row.ClassName}}</span>
-                    </template>
-                </el-table-column>
-                <el-table-column
-                        prop="ConsumeHour"
-                        label="消耗课时"
-                        sortable
-                >
-                </el-table-column>
-                <el-table-column
-                        prop="OrderNum"
-                        label="实际预约人数"
-                        sortable
-                >
-                </el-table-column>
-                <el-table-column
-                        prop="Status"
-                        label="操作"
-                >
-                    <template slot-scope="scope">
-                        <el-button type="primary" round size="mini" @click="checkClassOverPrepare(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>
-    </div>
-</template>
-
-<script>
-    import Global from '../../Global.js'
-    import {
-        ClassPreFinishListQuery,
-        ClassOverPrepare,
-    } from "../../api/getApiRes";
-
-    let qs = require('qs');
-    export default {
-        data() {
-            return {
-                dialogVisible: false,//其他dialog
-                dialogFinishVisible: false,//确认下课dialog
-                dialogLesson: false,//课时调整
-                dialogGift: false,//赠送课时调整
-                dialogExpTime: false,//有效期调整
-                dialogLessonTable: false,//会员课程
-                dialogTitle: '',
-                current: getNowDate(),
-                dialogValue: [],
-                // panel 配置项目
-                panel: {
-                    usercode: '',
-                    username: '',
-                    compname: '',
-                    keyword: '',
-                    USERCODE: '',
-                    endType: '',
-                    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: '已完成'},
-                    ],
-                    endTypeOptions: [
-                        {value: 99, label: '全部'},
-                        {value: 30, label: '近一个月'},
-                        {value: 7, label: '近一周'},
-                        {value: 1, label: '当日'},
-                    ],
-                    time1: globalBt(),
-                },
-                multipleSelection: [],
-                pageination: {
-                    pageItem: 10,
-                    pageoptions: pageOptions(),
-                    total: 100,
-                    pageIndex: 1,
-                },
-                form: {
-                    name: '',
-                    userCode: '',
-                    coach: '',
-                    coachOptions: [],
-                    shopId: '',
-                    memberType: 1,
-                    lesson: 1,
-                    gift: 1,
-                    btnType: 0,//0新建,1编辑编辑
-                    memo: '',
-                    expTime: '',
-                    dialogdata: [],//穿梭待选
-                    dialogValue: [],//穿梭已选
-                },
-                memberTypes: [
-                    {value: 1, label: '年会员'},
-                    {value: 2, label: '充值会员'},
-                ],
-                tableData: []
-            }
-        },
-        mounted() {
-            this.getTableQuery();
-        },
-        methods: {
-            // 检测当前课是否处于可改变状态
-            checkClassOverPrepare(row) {
-                let that = this;
-                let param = {
-                    token: localStorage.token,
-                    stdId: row.StdId,
-                };
-                let postdata = qs.stringify(param);
-                ClassOverPrepare(postdata).then(res => {
-                    let json = res;
-                    if (json.Code == 0) {
-                        that.goFinish(row);
-                    } else {
-                        that.$message.error(json.Memo + ' 错误码:' + json.Code);
-                    }
-                })
-            },
-            goFinish(row) {
-                this.$router.push({
-                    path: '/finishDetail', query: {
-                        id: row.StdId,
-                        classId: row.ClassId,
-                        ClassName:row.ClassName,
-                        BeginTime:row.BeginTime,
-                    }
-                });
-            },
-            handleSelectionChange(val) {
-                this.multipleSelection = val;
-            },
-            // 页面数据查询
-            getTableQuery() {
-                let that = this;
-                that.loading = true;
-                let param = {
-                    token: localStorage.token,
-                    tagname: that.panel.tagname,//标签名
-                    start: 1,//
-                    tableMax: 9999,//
-                };
-                let postdata = qs.stringify(param);
-                ClassPreFinishListQuery(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 + ' 错误码:' + json.Code);
-                    }
-                })
-            },
-            // 设置分页数据
-            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();
-            },
-            // 过滤时间
-            filterFmtDate(value, row, column) {
-                let that = this;
-                return nonTfmtDate(column, 11);
-            },
-        },
-        watch: {
-            $route(to) {
-                if (to.name == 'finish') {
-                    this.getTableQuery();
-                }
-            },
-        },
-    }
-</script>
-
-<style scoped>
-    @import "../../assets/css/panel.css";
-
-    .context {
-        /* height: 770px; */
-
-        overflow-y: scroll;
-        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 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;
-    }
-
-    .dialogContent {
-        width: 100%;
-        overflow: hidden;
-        display: block;
-        margin: 0 auto;
-    }
-
-    .dialogContent .pull-left {
-        width: 30%;
-        float: left;
-    }
-
-    .dialogContent .pull-right {
-        width: 70%;
-        float: right;
-    }
-
-    .blueTitle {
-        width: 200px;
-        overflow: hidden;
-        display: block;
-        margin: 0 auto;
-        margin-top: 10px;
-        margin-bottom: 40px;
-        background: #F0F2F5;
-        border-radius: 19px;
-        text-align: center;
-        color: #3799FF;
-        font-size: 16px;
-        padding: 5px 24px;
-    }
-
-    .current {
-        width: 158px;
-        height: 23px;
-        /*float: left;*/
-        border-radius: 250px;
-        text-align: center;
-        background: #F0F2F5;
-        color: #545454;
-        font-size: 14px;
-        padding: 3px 10px;
-        margin-left: 20px;
-    }
-
-    .lessonSpan {
-        width: 78px;
-        height: 22px;
-        border-radius: 11px;
-        margin-right: 5px;
-        float: left;
-        margin-bottom: 3px;
-        text-align: center;
-        color: #000;
-        font-size: 12px;
-    }
-</style>

+ 11 - 11
src/views/Shop/ShopManage.vue → src/views/SystemManage/AdminShopSetting.vue

@@ -66,7 +66,7 @@
                 </el-table-column>
             </el-table>
             <br>
-            <el-pagination background :total="pageination.total" :page-size="pageination.pageItem"
+            <el-pagination background :total="pagination.total" :page-size="pagination.pageItem"
                 @current-change="pageChange"></el-pagination>
         </div>
 
@@ -149,7 +149,7 @@
                     time1: globalBt(),
                 },
                 multipleSelection: [],
-                pageination: {
+                pagination: {
                     pageItem: 10,
                     pageoptions: pageOptions(),
                     total: 100,
@@ -179,7 +179,7 @@
         },
         watch: {
             $route(to) {
-                if (to.name == 'shopManage') {
+                if (to.name == 'adminShopSetting') {
                     this.getTableQuery();
                 }
             },
@@ -477,38 +477,38 @@
                             that.recordsTotal = 0;
                         }
                         // 设置分页数据
-                        that.setPaginations();
+                        that.setPagination();
                     } else {
                         that.$message.error(json.Memo + ' 错误码:' + json.Code);
                     }
                 })
             },
             // 设置分页数据
-            setPaginations() {
+            setPagination() {
                 // 分页属性
                 let that = this;
-                that.pageination.total = that.recordsTotal;
+                that.pagination.total = that.recordsTotal;
                 // 默认分页
                 that.tableData = that.allTableData.filter((item, index) => {
-                    return index < that.pageination.pageItem;
+                    return index < that.pagination.pageItem;
                 });
             },
             // 每页显示数量
             handleSizeChange() {
                 let that = this;
                 that.tableData = that.allTableData.filter((item, index) => {
-                    return index < that.pageination.pageItem;
+                    return index < that.pagination.pageItem;
                 });
-                that.draw = that.pageination.pageItem;
+                that.draw = that.pagination.pageItem;
                 that.getTableQuery();
             },
             // 翻页
             pageChange(pageIndex) {
                 let that = this;
                 // 获取当前页
-                let index = that.pageination.pageItem * (pageIndex - 1);
+                let index = that.pagination.pageItem * (pageIndex - 1);
                 // 数据总数
-                let nums = that.pageination.pageItem * pageIndex;
+                let nums = that.pagination.pageItem * pageIndex;
                 // 容器
                 let tables = [];
                 for (var i = index; i < nums; i++) {

+ 10 - 10
src/views/Teacher/coach.vue → src/views/SystemManage/CoachManage.vue

@@ -47,7 +47,7 @@
                 </el-table-column>
             </el-table>
             <br>
-            <el-pagination background :total="pageination.total" :page-size="pageination.pageItem"
+            <el-pagination background :total="pagination.total" :page-size="pagination.pageItem"
                 @current-change="pageChange"></el-pagination>
         </div>
 
@@ -131,7 +131,7 @@
                     time1: globalBt(),
                 },
                 multipleSelection: [],
-                pageination: {
+                pagination: {
                     pageItem: 10,
                     pageoptions: pageOptions(),
                     total: 100,
@@ -471,39 +471,39 @@
                         }
 
                         // 设置分页数据
-                        that.setPaginations();
+                        that.setPagination();
                     } else {
                         that.$message.error(json.Memo + ' 错误码:' + json.Code);
                     }
                 })
             },
             // 设置分页数据
-            setPaginations() {
+            setPagination() {
                 // 分页属性
                 let that = this;
-                that.pageination.total = that.recordsTotal;
+                that.pagination.total = that.recordsTotal;
 
                 // 默认分页
                 that.tableData = that.allTableData.filter((item, index) => {
-                    return index < that.pageination.pageItem;
+                    return index < that.pagination.pageItem;
                 });
             },
             // 每页显示数量
             handleSizeChange() {
                 let that = this;
                 that.tableData = that.allTableData.filter((item, index) => {
-                    return index < that.pageination.pageItem;
+                    return index < that.pagination.pageItem;
                 });
-                that.draw = that.pageination.pageItem;
+                that.draw = that.pagination.pageItem;
                 that.getTableQuery();
             },
             // 翻页
             pageChange(pageIndex) {
                 let that = this;
                 // 获取当前页
-                let index = that.pageination.pageItem * (pageIndex - 1);
+                let index = that.pagination.pageItem * (pageIndex - 1);
                 // 数据总数
-                let nums = that.pageination.pageItem * pageIndex;
+                let nums = that.pagination.pageItem * pageIndex;
                 // 容器
                 let tables = [];
                 for (var i = index; i < nums; i++) {

+ 2 - 2
src/views/User/Log.vue → src/views/SystemManage/OperateLog.vue

@@ -251,14 +251,14 @@
               that.recordsTotal = 0;
             }
             // 设置分页数据
-            that.setPaginations();
+            that.setPagination();
           } else {
             that.$message.error(json.Memo + ' 错误码:' + json.Code);
           }
         })
       },
       // 设置分页数据
-      setPaginations() {
+      setPagination() {
         // 分页属性
         let that = this;
         that.pageination.total = that.recordsTotal;

+ 2 - 2
src/views/User/regionEquip.vue → src/views/SystemManage/ShopDevice.vue

@@ -222,14 +222,14 @@ export default {
             that.recordsTotal = 0;
           }
           // 设置分页数据
-          that.setPaginations();
+          that.setPagination();
         } else {
           that.$message.error(json.Memo + ' 错误码:' + json.Code);
         }
       })
     },
     // 设置分页数据
-    setPaginations() {
+    setPagination() {
       // 分页属性
       let that = this;
       that.pageination.total = that.recordsTotal;

+ 11 - 11
src/views/Shop/region.vue → src/views/SystemManage/ShopRegion.vue

@@ -77,8 +77,8 @@
             <br>
             <el-pagination
                     background
-                    :total="pageination.total"
-                    :page-size="pageination.pageItem"
+                    :total="pagination.total"
+                    :page-size="pagination.pageItem"
                     @current-change="pageChange"
             ></el-pagination>
         </div>
@@ -163,7 +163,7 @@
                     time1: globalBt(),
                 },
                 multipleSelection: [],
-                pageination: {
+                pagination: {
                     pageItem: 10,
                     pageoptions: pageOptions(),
                     total: 100,
@@ -620,7 +620,7 @@
                         }
 
                         // 设置分页数据
-                        that.setPaginations();
+                        that.setPagination();
                     } else {
                         if (!localStorage.ServiceKey) {
                             that.$message.error('还未与心率系统对接,请联系管理员');
@@ -631,32 +631,32 @@
                 })
             },
             // 设置分页数据
-            setPaginations() {
+            setPagination() {
                 // 分页属性
                 let that = this;
-                that.pageination.total = that.recordsTotal;
+                that.pagination.total = that.recordsTotal;
 
                 // 默认分页
                 that.tableData = that.allTableData.filter((item, index) => {
-                    return index < that.pageination.pageItem;
+                    return index < that.pagination.pageItem;
                 });
             },
             // 每页显示数量
             handleSizeChange() {
                 let that = this;
                 that.tableData = that.allTableData.filter((item, index) => {
-                    return index < that.pageination.pageItem;
+                    return index < that.pagination.pageItem;
                 });
-                that.draw = that.pageination.pageItem;
+                that.draw = that.pagination.pageItem;
                 // that.getTableQuery();
             },
             // 翻页
             pageChange(pageIndex) {
                 let that = this;
                 // 获取当前页
-                let index = that.pageination.pageItem * (pageIndex - 1);
+                let index = that.pagination.pageItem * (pageIndex - 1);
                 // 数据总数
-                let nums = that.pageination.pageItem * pageIndex;
+                let nums = that.pagination.pageItem * pageIndex;
                 // 容器
                 let tables = [];
                 for (var i = index; i < nums; i++) {

+ 0 - 0
src/views/Auth/setting.vue → src/views/SystemManage/ShopSetting.vue