Browse Source

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

Changpeng Duan 5 năm trước cách đây
mục cha
commit
5921d45062

+ 18 - 0
pc/src/Global.js

@@ -50,6 +50,24 @@ globalfmtDate = function (datetime, length) {
     return (datetime != null) ? datetime.substr(0, length) : '';
 };
 
+getHoursAndMin = function (datetime) {
+    let date = new Date(datetime);
+    h = date.getHours() < 10 ? '0' + date.getHours() + ':' : date.getHours() + ':';
+    m = date.getMinutes() < 10 ? '0' + date.getMinutes() + ':' : date.getMinutes();
+    return h + m;
+}
+
+// 格式化时间去掉T
+nonTfmtDate = function (datetime, length) {
+    if ((datetime == '') || (datetime == undefined))
+        return '';
+    if ((datetime == '1900-01-01') || (datetime == '1900-01-01 00:00:00.000'))
+        return '';
+    length = !length ? 10 : length;//缺省参数
+    datetime = new Date(+new Date(datetime) + 8 * 3600 * 1000).toISOString().replace(/T/g, ' ').replace(/\.[\d]{3}Z/, '');
+    return datetime
+};
+
 // 获取当前时间
 globalcurrent = function () {
     let date = new Date();

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

@@ -65,6 +65,48 @@ let testTable = function () {
     };
     return res;
 };
+let testTableLong = function () {
+    let item = [];
+
+    let members = [
+        {id: 1, name: '霍元甲', userCode: '15253135600', vipType: 1},
+        {id: 2, name: '陈真', userCode: '15253135602', vipType: 2},
+        {id: 3, name: '成龙', userCode: '15253135604', vipType: 1},
+    ]
+
+    for (var i = 0; i < 70; i++) {
+        item.push({
+            "id": "@guid",
+            "userCode": "@integer(15253135600, 15253135699)",
+            "name": "@region",
+            "tel": "@integer(15253135600, 15253135699)",
+            "shop": "@region",
+            "create": "@datetime",
+            "expTime": "@datetime",
+            "valid": "@datetime",
+            "Confirmed": "@integer(36844, 368449)",
+            "Deaths": "@integer(1099, 10993)",
+            "Recovered": "@integer(1986, 9999)",
+            "kick": "@integer(1986, 9999)",
+            "Status": "@integer(1, 2)",
+            "color": "@hex",
+            "memo": "@paragraph(1, 1)",
+            "dialogValue": "@range(1, 3)",
+            "vipType": "@integer(1, 2)",
+            "members": members,
+            "wxVisible": "@integer(0, 1)",
+            "timeLong": "12:00-14:00",
+            "timeScope":  [new Date(2016, 9, 10, 8, 40), new Date(2016, 9, 10, 9, 40)],
+        })
+    }
+
+    let res = {
+        Rs: item,
+        Code: 0,
+        Memo: ''
+    };
+    return res;
+};
 
 let testSelect = function () {
     let item = [];
@@ -123,6 +165,7 @@ let logout = function () {
 
 Mock.mock('/api/testSelect', 'post', testSelect());
 Mock.mock('/api/testTable', 'post', testTable());
+Mock.mock('/api/testTableLong', 'post', testTableLong());
 Mock.mock('/api/worldDetail', 'post', worldDetail());
 Mock.mock('/api/SignIn', 'post', SignIn());//用户登录
 Mock.mock('/api/editbasicinfo', 'post', editbasicinfo());//用户设置修改

+ 8 - 4
pc/src/api/Navs.js

@@ -103,7 +103,8 @@ let navs = [{
     "clmname": "管理员管理",
     "clmurl": "/adminManage",
     "prname": "",
-    "show": 2,
+    "show": 1,
+    // "show": 2,
     "grouplist": "2,5",
     "icon": "el-icon-user",
 }, {
@@ -112,7 +113,8 @@ let navs = [{
     "clmname": "店面管理",
     "clmurl": "/shopManage",
     "prname": "",
-    "show": 2,
+    "show": 1,
+    // "show": 2,
     "grouplist": "2,5",
     "icon": "el-icon-s-shop",
 }, {
@@ -121,7 +123,8 @@ let navs = [{
     "clmname": "操作日志",
     "clmurl": "/log",
     "prname": "",
-    "show": 2,
+    "show": 1,
+    // "show": 2,
     "grouplist": "2,5",
     "icon": "el-icon-s-claim",
 }, {
@@ -130,7 +133,8 @@ let navs = [{
     "clmname": "系统设置",
     "clmurl": "/adminSetting",
     "prname": "",
-    "show": 2,
+    "show": 1,
+    // "show": 2,
     "grouplist": "2,5",
     "icon": "el-icon-setting",
 }

+ 130 - 11
pc/src/api/getApiRes.js

@@ -17,10 +17,7 @@ export function worldDetail(postdata) {
     return getApiBasic(url, postdata);
 }
 
-export function GenVerifyPic(postdata) {
-    let url = headapi + '/v1/Auth/GenVerifyPic';
-    return getApiBasic(url, postdata);
-}
+
 
 export function editbasicinfo(postdata) {
     let url = headapi + 'editbasicinfo';
@@ -42,6 +39,10 @@ export function testTable(postdata) {
     let url = headapi + 'testTable';
     return getApiBasic(url, postdata);
 }
+export function testTableLong(postdata) {
+    let url = headapi + 'testTableLong';
+    return getApiBasic(url, postdata);
+}
 
 export function testSelect(postdata) {
     let url = headapi + 'testSelect';
@@ -49,66 +50,183 @@ export function testSelect(postdata) {
 }
 
 // Auth
+
+// 获取验证图片
+export function GenVerifyPic(postdata) {
+    let url = headapi + '/v1/Auth/GenVerifyPic';
+    return getApiBasic(url, postdata);
+}
+// 修改密码 √
 export function PassEdit(postdata) {
     let url = headapi + '/v1/Auth/PassEdit';
     return getApiBasic(url, postdata);
 }
-
+// 用户登录 √
 export function SignIn(postdata) {
     let url = headapi + '/v1/Auth/SignIn';
     return getApiBasic(url, postdata);
 }
 
+// 用户退出
 export function SignOut(postdata) {
     let url = headapi + '/v1/Auth/SignOut';
     return getApiBasic(url, postdata);
 }
 
+// 用户添加
 export function SignUp(postdata) {
     let url = headapi + '/v1/Auth/SignUp';
     return getApiBasic(url, postdata);
 }
+
+// 用户微信登录
 export function WXSignIn(postdata) {
     let url = headapi + '/v1/Auth/WXSignIn';
     return getApiBasic(url, postdata);
 }
 
 // class
-// √
+// √ 课程添加
 export function ClassAdd(postdata) {
     let url = headapi + '/v1/Class/ClassAdd';
     return getApiBasic(url, postdata);
 }
-// √
+// √ 课程颜色修改
+export function ClassColorEdit(postdata) {
+    let url = headapi + '/v1/Class/ClassColorEdit';
+    return getApiBasic(url, postdata);
+}
+// 课程单条查询
+export function ClassDetailOne(postdata) {
+    let url = headapi + '/v1/Class/ClassDetailOne';
+    return getApiBasic(url, postdata);
+}// √ 课程基本信息修改
 export function ClassEdit(postdata) {
     let url = headapi + '/v1/Class/ClassEdit';
     return getApiBasic(url, postdata);
 }
-// √
+// √ 课程列表查询
 export function ClassListQuery(postdata) {
     let url = headapi + '/v1/Class/ClassListQuery';
     return getApiBasic(url, postdata);
 }
 
+// √ 课程状态修改
+export function ClassStatusEdit(postdata) {
+    let url = headapi + '/v1/Class/ClassStatusEdit';
+    return getApiBasic(url, postdata);
+}
+// 课程会员增删
+export function ClassVipuserEdit(postdata) {
+    let url = headapi + '/v1/Class/ClassVipuserEdit';
+    return getApiBasic(url, postdata);
+}
+// 课程会员查询
+export function ClassVipuserQuery(postdata) {
+    let url = headapi + '/v1/Class/ClassVipuserQuery';
+    return getApiBasic(url, postdata);
+}
+// 课程微信可见状态修改
+export function ClassVisibleStatusEdit(postdata) {
+    let url = headapi + '/v1/Class/ClassVisibleStatusEdit';
+    return getApiBasic(url, postdata);
+}
+
+
 // shop
-// √
+// √ 店铺添加
 export function ShopAdd(postdata) {
-    let url = headapi + '/v1/Shop/ShopAdd\n';
+    let url = headapi + '/v1/Shop/ShopAdd';
+    return getApiBasic(url, postdata);
+}
+
+// √ 店铺详情查询
+export function ShopDetailQuery(postdata) {
+    let url = headapi + '/v1/User/ShopDetailQuery';
+    return getApiBasic(url, postdata);
+}
+
+
+// 店铺修改
+export function ShopEdit(postdata) {
+    let url = headapi + '/v1/Shop/ShopEdit';
+    return getApiBasic(url, postdata);
+}
+// 店铺列表查询
+export function ShopListQuery(postdata) {
+    let url = headapi + '/v1/Shop/ShopListQuery';
+    return getApiBasic(url, postdata);
+}
+
+// 店铺状态修改
+export function ShopStatusEdit(postdata) {
+    let url = headapi + '/v1/Shop/ShopStatusEdit';
+    return getApiBasic(url, postdata);
+}
+
+// SttPlan
+// 课程表模板基本信息添加
+export function SttPlanBasicAdd(postdata) {
+    let url = headapi + '/v1/SttPlan/SttPlanBasicAdd';
+    return getApiBasic(url, postdata);
+}
+// 课程表模板基本信息修改
+export function SttPlanBasicEdit(postdata) {
+    let url = headapi + '/v1/SttPlan/SttPlanBasicEdit';
+    return getApiBasic(url, postdata);
+}
+
+// 课程表模板基本信息列表查询
+export function SttPlanBasicListQuery(postdata) {
+    let url = headapi + '/v1/SttPlan/SttPlanBasicListQuery';
+    return getApiBasic(url, postdata);
+}
+
+// 课程表模板基本信息状态修改
+export function SttPlanBasicStatusEdit(postdata) {
+    let url = headapi + '/v1/SttPlan/SttPlanBasicStatusEdit';
+    return getApiBasic(url, postdata);
+}
+// 课程表模板详情列表查询
+export function SttPlanDetailListQuery(postdata) {
+    let url = headapi + '/v1/SttPlan/SttPlanDetailListQuery';
+    return getApiBasic(url, postdata);
+}
+// 课程表模板详情批量保存
+export function SttPlanDetailBatchSave(postdata) {
+    let url = headapi + '/v1/SttPlan/SttPlanDetailBatchSave';
     return getApiBasic(url, postdata);
 }
 
 // User
 // √
+export function ManagerSelfQuery(postdata) {
+    let url = headapi + '/v1/User/ManagerSelfQuery';
+    return getApiBasic(url, postdata);
+}
+
+// √ 店铺管理员添加
 export function ShopManagerAdd(postdata) {
     let url = headapi + '/v1/User/ShopManagerAdd';
     return getApiBasic(url, postdata);
 }
 
+// 店铺管理员修改
+export function ShopManagerEdit(postdata) {
+    let url = headapi + '/v1/User/ShopManagerEdit';
+    return getApiBasic(url, postdata);
+}
+// 店铺管理员列表查询
 export function ShopManagerListQuery(postdata) {
     let url = headapi + '/v1/User/ShopManagerListQuery';
     return getApiBasic(url, postdata);
 }
-
+// 店铺管理员状态修改
+export function ShopManagerStatusEdit(postdata) {
+    let url = headapi + '/v1/User/ShopManagerStatusEdit';
+    return getApiBasic(url, postdata);
+}
+// 会员用户列表
 export function VipUserListQuery(postdata) {
     let url = headapi + '/v1/User/VipUserListQuery';
     return getApiBasic(url, postdata);
@@ -117,3 +235,4 @@ export function VipUserListQuery(postdata) {
 
 
 
+

+ 33 - 7
pc/src/components/Headside.vue

@@ -30,7 +30,7 @@
 </template>
 <script>
     import axios from 'axios';
-
+    import {SignOut,ManagerSelfQuery} from '../api/getApiRes.js'
     let qs = require('qs');
     export default {
         data() {
@@ -49,6 +49,7 @@
         },
         mounted() {
             this.readNewNum();
+            this.getManagerSelfQuery();
 //            定时轮询news
             //设置10s刷新一次数据
             // if (this.timer) {
@@ -71,6 +72,21 @@
                 //     this.$emit('right_hide_func');
                 // }
             },
+            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;
+                    } else {
+                        that.$message.error(json.Memo);
+                    }
+                })
+            },
 //            打开消息提示
             checkNews: function () {
                 let that = this;
@@ -104,13 +120,23 @@
                     cancelButtonText: '取消',
                     type: 'warning'
                 }).then(() => {
-                    let url = headapi + '?ctl=ajax&mod=index&act=logout';
-                    let param = {};
+                    let that = this;
+                    let param = {
+                    token: localStorage.token,
+                    };
                     let postdata = qs.stringify(param);
-                    axios.post(url, postdata).then(function (data) {
-                        that.$router.push({path: '/login', query: {status: 1}});
-                    }, function (response) {
-                        console.info(response);
+                    SignOut(postdata).then(res => {
+                        let json = res;
+                        if (json.Code == 0) {
+                            that.$router.push({path: '/login', query: {status: 1}});
+                            that.$message({
+                                showClose: true,
+                                message: '当前用户已退出登陆!',
+                                type: 'success'
+                            });
+                        } else {
+                            that.$message.error(json.Memo);
+                        }
                     })
                 }).catch(() => {
 

+ 23 - 4
pc/src/components/Navside.vue

@@ -32,7 +32,7 @@
 </template>
 <script>
     import Navs from '../api/Navs';
-    import {SignOut} from '../api/getApiRes.js'
+    import {ManagerSelfQuery} from '../api/getApiRes.js'
 
     let qs = require('qs');
     export default {
@@ -40,15 +40,16 @@
             return {
                 wildState: 0,
                 navs: [],
-                shopName: '高新店',
-                userLevelText: '店面管理员',
-                userLevel: 2,
+                shopName: 'xx店',
+                userLevelText: '',
+                userLevel: 0,
                 userLevelDeafult: "11",
             }
         },
         props: ['isCollapse'],
         mounted() {
             this.getTableQuery();
+            this.getManagerSelfQuery();
         },
         methods: {
             handleSelect(i, s, t) {
@@ -58,6 +59,23 @@
                 // 菜单
                 this.navs = Navs;
             },
+            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.userLevelText = json.Rs.Role.Name;
+                        that.userLevel = json.Rs.Role.State;
+                        localStorage.shopId = json.Rs.ShopId;
+                    } else {
+                        that.$message.error(json.Memo);
+                    }
+                })
+            },
             handleOpen(key, keyPath) {
                 // console.log(key, keyPath);
             },
@@ -80,6 +98,7 @@
         overflow: hidden;
         display: block;
         margin: 0 auto;
+        overflow-y: scroll;
         background-color: #fff;
     }
     .logoContainer {

+ 85 - 29
pc/src/views/AdminManage.vue

@@ -15,7 +15,7 @@
                         </el-col>
                         <el-col :span="4">
                             <em>店面:</em>
-                            <el-select v-model="panel.shopList">
+                            <el-select v-model="panel.shopId">
                                 <el-option
                                         v-for="item in panel.options"
                                         :key="item.value"
@@ -45,7 +45,6 @@
                     element-loading-background="rgba(0, 0, 0, 0.8)"
                     class=""
                     @selection-change="handleSelectionChange"
-
             >
                 <el-table-column
                         type="selection"
@@ -57,31 +56,32 @@
                         width="50">
                 </el-table-column>
                 <el-table-column
-                        prop="userCode"
+                        prop="Usercode"
                         label="用户名"
                         sortable
                 >
                 </el-table-column>
                 <el-table-column
-                        prop="name"
+                        prop="Name"
                         label="姓名"
                         sortable
                 >
                 </el-table-column>
                 <el-table-column
-                        prop="tel"
+                        prop="Phone"
                         label="手机号"
                 >
                 </el-table-column>
                 <el-table-column
-                        prop="shop"
+                        prop="ShopId"
                         label="所属门店"
                         sortable
                 >
                 </el-table-column>
                 <el-table-column
-                        prop="create"
-                        label="创建时间"
+                        prop="LastLoginTime"
+                        label="上次登陆时间"
+                        :formatter="filterFmtDate"
                         sortable
                 >
                 </el-table-column>
@@ -90,8 +90,10 @@
                         label="操作"
                 >
                     <template slot-scope="scope">
-                        <el-button type="text" v-if="scope.row.status == 1" @click="runAndPause(scope.row,0)">禁用</el-button>
-                        <el-button type="text" v-if="scope.row.status == 0" @click="runAndPause(scope.row,1)">启用</el-button>
+                        <el-button type="danger" size="mini"   v-if="scope.row.Status == 1" @click="runAndPause(scope.row,0)">禁用
+                        </el-button>
+                        <el-button type="success" size="mini" v-if="scope.row.Status == 0" @click="runAndPause(scope.row,1)">启用
+                        </el-button>
                     </template>
                 </el-table-column>
             </el-table>
@@ -108,13 +110,16 @@
             <div>
                 <el-form ref="form" :model="form" label-width="80px">
                     <el-form-item label="手机号">
+                        <el-input v-model="form.phone"></el-input>
+                    </el-form-item>
+                    <el-form-item label="登陆账号">
                         <el-input v-model="form.userCode"></el-input>
                     </el-form-item>
                     <el-form-item label="姓名">
                         <el-input v-model="form.name"></el-input>
                     </el-form-item>
                     <el-form-item label="密码">
-                        <el-input v-model="form.pwd"></el-input>
+                        <el-input v-model="form.password" type="password"></el-input>
                     </el-form-item>
                     <el-form-item label="所属门店">
                         <el-select v-model="form.shopId" placeholder="请选择所属门店">
@@ -126,10 +131,14 @@
                             ></el-option>
                         </el-select>
                     </el-form-item>
+                    <el-form-item label="备注">
+                        <el-input v-model="form.memo"></el-input>
+                    </el-form-item>
                 </el-form>
             </div>
             <div class="dialogFooter">
-                <el-button type="primary" size="small" @click="confirmAdmin">确定</el-button>
+                <el-button type="primary" size="small" @click="confirmAdmin" v-if="form.btnState == 0">确定</el-button>
+                <el-button type="primary" size="small" @click="confirmEdit" v-if="form.btnState == 1">确定</el-button>
                 <el-button @click="dialogVisible = false" size="small">取消</el-button>
             </div>
         </el-dialog>
@@ -140,6 +149,8 @@
     import Global from '../Global.js'
     import {
         ShopManagerListQuery,
+        ShopManagerAdd,
+        ShopManagerEdit,
         testTable,
         testSelect
     } from "../api/getApiRes";
@@ -154,7 +165,7 @@
                 panel: {
                     userCode: '',
                     tel: '',
-                    shopList: 0,
+                    shopId: 0,
                     options: [],
                     draw: 1,
                     start: 0,
@@ -177,10 +188,13 @@
                     pageIndex: 1,
                 },
                 form: {
-                    name: '',
-                    userCode: '',
                     shopId: '',
-                    pwd: '',
+                    userCode: '',
+                    password: '',
+                    name: '',
+                    phone: '',
+                    memo: '',
+                    btnState: 0,
                 },
                 shops: [],
                 tableData: []
@@ -196,11 +210,23 @@
                 let that = this;
                 // checkNum
                 if (!that.form.userCode) {
-                    this.$message.error('错了哦,手机号不能为空');
+                    this.$message.error('错了哦,登陆账号不能为空');
                     return false
                 }
-                if (!globalCheckPhone(that.form.userCode)) {
-                    this.$message.error('错了哦,手机号格式不正确');
+                if (that.form.name.length > 20) {
+                    this.$message.error('错了哦,登陆账号字数超过20个字');
+                    return false
+                }
+                if (!that.form.password) {
+                    this.$message.error('错了哦,密码不能为空');
+                    return false
+                }
+                if (that.form.password.length < 6) {
+                    this.$message.error('错了哦,密码字数小于6个字');
+                    return false
+                }
+                if (that.form.password.length > 8) {
+                    this.$message.error('错了哦,密码字数超过8个字');
                     return false
                 }
                 if (!that.form.name) {
@@ -211,11 +237,29 @@
                     this.$message.error('错了哦,姓名字数超过8个字');
                     return false
                 }
+                if (!that.form.phone) {
+                    this.$message.error('错了哦,手机号码不能为空');
+                    return false
+                }
+                if (!globalCheckPhone(that.form.phone)) {
+                    this.$message.error('错了哦,手机号格式不正确');
+                    return false
+                }
+                if (that.form.memo) {
+                    if (that.form.name.memo > 200) {
+                        this.$message.error('错了哦,备注字数超过200个字');
+                        return false
+                    }
+                }
+
                 let param = {
                     token: localStorage.token,
+                    shopid: that.form.shopid,
                     userCode: that.form.userCode,
+                    password: that.form.password,
                     name: that.form.name,
-                    shopid: that.form.shopid,
+                    phone: that.form.phone,
+                    memo: that.form.memo,
                 };
                 let postdata = qs.stringify(param);
                 testSelect(postdata).then(res => {
@@ -236,6 +280,10 @@
                     }
                 })
             },
+            confirmEdit() {
+                // ShopManagerEdit
+
+            },
             // 加载选项
             panelSelect() {
                 let that = this;
@@ -248,7 +296,6 @@
                     if (json.Code == 0) {
                         that.shops = json.Rs;
                         that.form.shopId = json.Rs[0].value;
-                        console.log(that.form.shopId);
                         that.panel.options = json.Rs;
                         that.panel.options.unshift({value: 0, label: "全部"});
                     } else {
@@ -312,10 +359,10 @@
                     });
                 });
             },
-            runAndPause(row,status){
+            runAndPause(row, status) {
                 let that = this;
                 let param = {
-                token: localStorage.token,
+                    token: localStorage.token,
                     userId: row.userId,
                     status: status,
                 };
@@ -337,20 +384,25 @@
             },
             clearForm() {
                 // clear
+                this.form.shopId = '0';
                 this.form.name = '';
                 this.form.userCode = '';
-                this.form.shopId = '';
+                this.form.password = '';
+                this.form.phone = '';
+                this.form.memo = '';
             },
             // 新增管理员
             addAdmin() {
                 this.clearForm();
                 this.dialogVisible = true
                 this.dialogTitle = '新增管理员'
+                this.form.btnState = 0;
             },
             // 编辑管理员
-            editList(){
+            editList() {
                 let that = this;
                 this.clearForm();
+
                 // checkNum
                 if (!this.multipleSelection.length) {
                     that.$message({
@@ -369,11 +421,15 @@
                     return false
                 }
                 let row = that.multipleSelection[0];
-                this.form.name =row.name;
-                this.form.userCode = row.userCode;
-                this.form.shopId = row.Id;
+                this.form.shopid = row.ShopId;
+                this.form.name = row.Name;
+                this.form.userCode = row.Usercode;
+                this.form.password = '';
+                this.form.phone = row.Phone;
+                this.form.memo = row.Memo;
                 this.dialogVisible = true
                 this.dialogTitle = '编辑管理员'
+                this.form.btnState = 1;
             },
             handleSelectionChange(val) {
                 this.multipleSelection = val;
@@ -461,7 +517,7 @@
             // 过滤时间
             filterFmtDate(value, row, column) {
                 let that = this;
-                return globalfmtDate(column, 11);
+                return nonTfmtDate(column, 11);
             },
             // 过滤金额
             filterMoney(value, row, column) {

+ 3 - 2
pc/src/views/AdminSetting.vue

@@ -29,6 +29,8 @@
 </template>
 
 <script>
+    import {PassEdit} from "../api/getApiRes";
+
     let qs = require('qs');
     import Global from '../Global.js'
     import {
@@ -157,10 +159,9 @@
                     newpass: that.form.newpwd,
                 };
                 let postdata = qs.stringify(param);
-                testTable(postdata).then(res => {
+                PassEdit(postdata).then(res => {
                     let json = res;
                     // 无论成功与否都重载验证码
-                    this.CurenttestTable();
                     if (json.Code == 0) {
                         that.$message({
                             showClose: true,

+ 230 - 107
pc/src/views/EditLessonTable.vue

@@ -1,6 +1,5 @@
 <template>
     <div class="context">
-        todo
         <div class="panel">
             <h5>{{pageTitle}}</h5>
         </div>
@@ -9,43 +8,45 @@
                 <el-row :gutter="20">
                     <el-col :span="9">
                         <em>课程表模板名称:</em>
-                        <span>{{panel.name}}</span>
-<!--                        <el-input v-model="panel.name" placeholder="请输入课程表模板名称"></el-input>-->
+                        <el-input v-model="panel.name" placeholder="请输入课程表模板名称"></el-input>
                     </el-col>
+                    <!--                    默认不通用-->
                 </el-row>
             </div>
         </div>
         <br>
         <el-tabs v-model="activeName" type="card" @tab-click="handleClick">
-            <el-tab-pane label="星期一" name="Monday"></el-tab-pane>
-            <el-tab-pane label="星期二" name="Tuesday"></el-tab-pane>
-            <el-tab-pane label="星期三" name="Wednesday"></el-tab-pane>
-            <el-tab-pane label="星期四" name="Thursday"></el-tab-pane>
-            <el-tab-pane label="星期五" name="Friday"></el-tab-pane>
-            <el-tab-pane label="星期六" name="Saturday"></el-tab-pane>
-            <el-tab-pane label="星期天" name="Sunday"></el-tab-pane>
+            <el-tab-pane label="星期一" name="1"></el-tab-pane>
+            <el-tab-pane label="星期二" name="2"></el-tab-pane>
+            <el-tab-pane label="星期三" name="3"></el-tab-pane>
+            <el-tab-pane label="星期四" name="4"></el-tab-pane>
+            <el-tab-pane label="星期五" name="5"></el-tab-pane>
+            <el-tab-pane label="星期六" name="6"></el-tab-pane>
+            <el-tab-pane label="星期天" name="7"></el-tab-pane>
         </el-tabs>
         <el-button class="seeTemp">预览模板</el-button>
         <div class="table">
             <el-table
-                    :data="tableData"
+                    v-for="tab in tabs"
+                    :data="tab.tableData"
+                    v-if="tab.days == activeName"
                     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
                         prop="timeScope"
                         label="时间"
                         width="260px"
+                        align="center"
                 >
                     <template slot-scope="scope">
                         <el-time-picker
                                 is-range
-                                v-model="scope.row.timeScope"
+                                v-model="scope.row.timeLong"
                                 range-separator="至"
                                 start-placeholder="开始时间"
                                 end-placeholder="结束时间"
@@ -54,11 +55,12 @@
                     </template>
                 </el-table-column>
                 <el-table-column
-                        prop="name"
+                        prop="ClassId"
                         label="课程"
+                        align="center"
                 >
                     <template slot-scope="scope">
-                        <el-select v-model="scope.row.vipType">
+                        <el-select v-model="scope.row.ClassId">
                             <el-option
                                     v-for="item in panel.options"
                                     :key="item.value"
@@ -69,46 +71,47 @@
                     </template>
                 </el-table-column>
                 <el-table-column
-                        prop="Recovered"
+                        prop="TopLimit"
                         label="预约名额"
+                        align="center"
                 >
                     <template slot-scope="scope">
-                        <el-input-number v-model="scope.row.Recovered"  :min="1" :max="9999" label=""></el-input-number>
+                        <el-input-number v-model="scope.row.TopLimit" :min="1" :max="9999" label=""></el-input-number>
                     </template>
                 </el-table-column>
                 <el-table-column
-                        prop="Recovered"
+                        prop="ConsumeHour"
                         label="消耗课时"
+                        align="center"
                 >
                     <template slot-scope="scope">
-                        <el-input-number v-model="scope.row.Recovered"  :min="1" :max="9999" label=""></el-input-number>
+                        <el-input-number v-model="scope.row.ConsumeHour" :min="1" :max="9999"
+                                         label=""></el-input-number>
                     </template>
                 </el-table-column>
-
                 <el-table-column
                         prop="Status"
                         label="操作"
                         width="100px"
+                        align="center"
                 >
                     <template slot-scope="scope">
-                        <el-button type="text" class="red">删除</el-button>
+                        <el-button type="text" class="red" @click="delRow(scope)">删除</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 class="rowBottom">
-                <el-button type="primary">新增课表</el-button>
-                <el-button type="primary">提交</el-button>
+                <el-button type="primary" @click="addRow">新增课表</el-button>
+                <!--                ID为0是新建,不为0是修改-->
+                <el-button type="primary" @click="confirmLessonTable" v-if="this.$route.query.id == 0">提交</el-button>
+                <el-button type="primary" @click="EditLessonTable" v-if="this.$route.query.id != 0">提交</el-button>
+                <em class="red wrning">
+                    *所有操作提交后生效
+                </em>
             </div>
         </div>
+        <br>
+
 
         <el-dialog title="增删课程会员" :visible.sync="dialogVisible">
             <div class="dialogTitle">
@@ -128,7 +131,12 @@
 <script>
     import Global from '../Global.js'
     import {
+        SttPlanBasicAdd,
+        SttPlanDetailListQuery,
+        SttPlanDetailBatchSave,
+        SttPlanBasicEdit,
         testTable,
+        testTableLong,
         testSelect
     } from "../api/getApiRes";
 
@@ -141,7 +149,8 @@
                 dialogdata: [],
                 dialogValue: [],
                 temId: '',
-                activeName: 'Monday',
+                activeName: '1',
+                tableData: [],
                 // panel 配置项目
                 panel: {
                     usercode: '',
@@ -175,21 +184,170 @@
                     total: 100,
                     pageIndex: 1,
                 },
-                tableData: []
+                testRow: {
+                    timeLong:[new Date(2016, 9, 10, 8, 40), new Date(2016, 9, 10, 9, 40)],
+                    BeginStr: '08:30',
+                    EndStr: '09:30',
+                    ClassId: 1,
+                    TopLimit: 0,
+                    ConsumeHour: 0,
+                },
+                tabs: [
+                    {
+                        tableData: [], days: '1'
+                    },
+                    {
+                        tableData: [
+                            // {name:'1'},
+                        ], days: '2'
+                    },
+                    {
+                        tableData: [], days: '3'
+                    },
+                    {
+                        tableData: [], days: '4'
+                    },
+                    {
+                        tableData: [], days: '5'
+                    },
+                    {
+                        tableData: [], days: '6'
+                    },
+                    {
+                        tableData: [], days: '7'
+                    },
+                ]
             }
         },
         mounted() {
-            this.getTableQuery();
+            if (this.$route.query.id == 0) {
+                //  深拷贝赋初始值
+                this.deepValue();
+            } else {
+                // 读取赋值
+                this.getTableQuery();
+            }
         },
         methods: {
-            handleClick(){
-                console.log(123);
+            // 删除
+            delRow(scope){
+                let delIndex = parseInt(scope.$index)
+                let curIndex = parseInt(this.activeName) -1;
+                this.tabs[curIndex].tableData.splice(delIndex, 1)
+            },
+            // 提交课程模板
+            confirmLessonTable() {
+                if (!this.panel.name) {
+                    this.$message.error('模板名称不能为空');
+                    return false
+                }
+                if (this.panel.name.length < 3) {
+                    this.$message.error('模板名称不能小于3个字符');
+                    return false
+                }
+                if (this.panel.name.length > 20) {
+                    this.$message.error('模板名称不能大于20个字符');
+                    return false
+                }
+                let that = this;
+                let param = {
+                    token: localStorage.token,
+                    planName: this.panel.name,
+                };
+                let postdata = qs.stringify(param);
+                SttPlanBasicAdd(postdata).then(res => {
+                    let json = res;
+                    if (json.Code == 0) {
+                        that.panel.tabId = json.Id;
+                        console.log(json.Id);
+                    } else {
+                        that.$message.error(json.Memo);
+                    }
+                })
+            },
+            // 修改课程模板
+            EditLessonTable() {
+                let that = this;
+                // if (this.checkData()) {
+                //     this.$message.error('数据内容不完整,请检查后重新输入');
+                //     return false
+                // }
+                // 提交数据
+
+                let planRs = [];
+                let thisRow = {};
+                let timeLong = []
+                for (let i = 0; i < this.tabs.length; i++) {
+                    for (let j = 0; j < this.tabs[i].tableData.length; j++) {
+                        thisRow = this.tabs[i].tableData[j];
+                        thisRow.PlanId = parseInt(this.$route.query.id);
+                        thisRow.WeekDay = parseInt(i + 1);
+                        thisRow.BeginStr = getHoursAndMin(thisRow.timeLong[0]);
+                        thisRow.EndStr = getHoursAndMin(thisRow.timeLong[1]);
+                        this.$delete(thisRow, 'Base');
+                        this.$delete(thisRow, 'SpdId');
+                        // this.$delete(thisRow, 'timeLong');
+                        planRs.push(thisRow)
+                    }
+                }
+                let res = JSON.stringify(planRs);
+                let param = {
+                    token: localStorage.token,
+                    planId: this.$route.query.id,
+                    planRs: res,
+                };
+                let postdata = qs.stringify(param);
+                SttPlanDetailBatchSave(postdata).then(res => {
+                    let json = res;
+                    if (json.Code == 0) {
+                        that.$message({
+                            showClose: true,
+                            message: '课程模板上传成功!',
+                            type: 'success'
+                        });
+                        this.getTableQuery();
+                    } else {
+                        that.$message.error(json.Memo);
+                    }
+                })
+            },
+            // 检查数据
+            checkData() {
+                // todo
+                let tableDate = this.tabs;
+                tableDate.map(function (item) {
+                    console.log(item.tableData);
+                })
+            },
+            // 新增一行
+            addRow() {
+                // 读取当前周几
+                let index = parseInt(this.activeName) - 1;
+                let rows = this.testRow;
+                let res = this.deepClone(rows);
+                this.tabs[index].tableData.push(res);
+            },
+            //  深拷贝赋初始值
+            deepValue() {
+                let that = this;
+                let valus = [
+                    {BeginStr: '08:30', EndStr: '09:30', ClassId: 0, TopLimit: 0, ConsumeHour: 0},
+                ];
+                this.tabs.map(function (item) {
+                    let res = that.deepClone(valus);
+                    item.tableData = res;
+                })
+            },
+            deepClone(obj) {
+                let _obj = JSON.stringify(obj),
+                    objClone = JSON.parse(_obj);
+                return objClone
+            },
+            handleClick() {
             },
             changeWechat(e, row) {
-                console.log(e);
-                console.log(row);
+                // todo
                 this.$message.success('当前用户微信已可见');
-                // this.$message.success('当前用户微信已不可见');
             },
             // 增删会员课程
             lessonStudenChange() {
@@ -198,92 +356,48 @@
             handleSelectionChange(val) {
                 this.multipleSelection = val;
             },
-            // 查询按钮
-            query() {
-                // this.getTableQuery();
-                this.$message.success('查询完毕');
-            },
             // 页面数据查询
             getTableQuery() {
                 let that = this;
-                // this.getGetChildRegionSelect(0, 1);
                 that.loading = true;
-                // 查询检测设备。上级区域id,区域id必传。regionid传0,查询supregionid对应所有子区域的检测设备。 如果supregionid,regionid都传0,默认查询企业ID下所有检测设备
                 let param = {
                     token: localStorage.token,
-                    supregionid: 0,//
-                    regionid: this.panel.regionid,//
-                    comid: 1,//
-                    tagname: that.panel.tagname,//标签名
-                    start: 1,//
-                    tableMax: 9999,//
+                    planId: this.$route.query.id,//
                 };
+                this.panel.name = this.$route.query.name;
                 let postdata = qs.stringify(param);
-                testTable(postdata).then(res => {
+                SttPlanDetailListQuery(postdata).then(res => {
                     let json = res;
+                    let Rs = json.Rs
+                    let bt = '';
+                    let et = '';
                     if (json.Code == 0) {
                         that.loading = false;
-                        if (json.Rs) {
-                            that.allTableData = json.Rs;
-                            that.recordsTotal = json.Rs.length;
+                        // 清掉上次的记录
+                        for (let i = 0; i <  that.tabs.length; i++) {
+                            that.tabs[i].tableData = []
+                        }
+                        if (Rs) {
+                            // 遍历分配
+                            Rs.map(function (item) {
+                                for (let i = 0; i < 7; i++) {
+                                    if (item.WeekDay == i) {
+                                        bt = new Date(2016, 9, 10, item.BeginStr.substr(0, 2), item.BeginStr.substr(3, 2));
+                                        et = new Date(2016, 9, 10, item.EndStr.substr(0, 2), item.EndStr.substr(3, 2));
+                                        item.timeLong = [bt, et];
+                                        that.tabs[i - 1].tableData.push(item);
+                                    }
+                                }
+                            })
                         } else {
                             that.allTableData = [];
                             that.recordsTotal = 0;
                         }
-
-                        // 设置分页数据
-                        that.setPaginations();
                     } else {
                         that.$message.error(json.Memo);
                     }
                 })
             },
-            // 设置分页数据
-            setPaginations() {
-                // 分页属性
-                let that = this;
-                that.pageination.total = that.recordsTotal;
-                // 默认分页
-                that.tableData = that.allTableData.filter((item, index) => {
-                    return index < that.pageination.pageItem;
-                });
-            },
-            // 每页显示数量
-            handleSizeChange() {
-                let that = this;
-                that.tableData = that.allTableData.filter((item, index) => {
-                    return index < that.pageination.pageItem;
-                });
-                that.draw = that.pageination.pageItem;
-                that.getTableQuery();
-            },
-            // 翻页
-            pageChange(pageIndex) {
-                let that = this;
-                // 获取当前页
-                let index = that.pageination.pageItem * (pageIndex - 1);
-                // 数据总数
-                let nums = that.pageination.pageItem * pageIndex;
-                // 容器
-                let tables = [];
-                for (var i = index; i < nums; i++) {
-                    if (that.allTableData[i]) {
-                        tables.push(that.allTableData[i])
-                    }
-                    this.tableData = tables;
-                }
-                that.start = index * that.draw;
-                that.getTableQuery();
-            },
-            // 自动排序
-            sortChange(params) {
-                console.log(params)
-            },
-            // 过滤时间
-            filterFmtDate(value, row, column) {
-                let that = this;
-                return globalfmtDate(column, 11);
-            },
         },
         watch: {
             $route() {
@@ -386,7 +500,7 @@
         margin-left: 10px;
     }
 
-    /deep/  .panel_control .el-input {
+    /deep/ .panel_control .el-input {
         width: 200px;
         float: left;
     }
@@ -398,19 +512,23 @@
         line-height: 45px;
         margin-right: 10px;
     }
+
     .seeTemp {
         position: relative;
         float: right;
         bottom: 60px;
     }
+
     .table {
         position: relative;
         top: -50px;
     }
+
     .el-range-editor.el-input__inner {
         width: 220px;
         padding: 3px 6px;
     }
+
     .rowBottom {
         width: 100%;
         overflow: hidden;
@@ -418,8 +536,13 @@
         margin: 0 auto;
         margin-top: 10px;
     }
+
     .rowBottom button {
         float: left;
         margin-right: 10px;
     }
+    .wrning {
+        float: right;
+        font-size: 12px;
+    }
 </style>

+ 439 - 0
pc/src/views/EditLessonTable2.vue

@@ -0,0 +1,439 @@
+<template>
+    <div class="context">
+        <div class="panel">
+            <h5>{{pageTitle}}</h5>
+        </div>
+        <div class="panel-body">
+            <div class="panel_control">
+                <el-row :gutter="20">
+                    <el-col :span="9">
+                        <em>课程表模板名称:</em>
+                        <el-input v-model="panel.name" placeholder="请输入课程表模板名称"></el-input>
+                    </el-col>
+                </el-row>
+            </div>
+        </div>
+        <br>
+        <el-tabs v-model="activeName" type="card" @tab-click="handleClick">
+            <el-tab-pane label="星期一" name="Monday"></el-tab-pane>
+            <el-tab-pane label="星期二" name="Tuesday"></el-tab-pane>
+            <el-tab-pane label="星期三" name="Wednesday"></el-tab-pane>
+            <el-tab-pane label="星期四" name="Thursday"></el-tab-pane>
+            <el-tab-pane label="星期五" name="Friday"></el-tab-pane>
+            <el-tab-pane label="星期六" name="Saturday"></el-tab-pane>
+            <el-tab-pane label="星期天" name="Sunday"></el-tab-pane>
+        </el-tabs>
+        <el-button class="seeTemp">预览模板</el-button>
+        <div class="table">
+            <el-table
+                    :data="tableData"
+                    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
+                        prop="timeScope"
+                        label="时间"
+                        width="260px"
+                        align="center"
+                >
+                    <template slot-scope="scope">
+                        <el-time-picker
+                                is-range
+                                v-model="scope.row.timeScope"
+                                range-separator="至"
+                                start-placeholder="开始时间"
+                                end-placeholder="结束时间"
+                                placeholder="选择时间范围">
+                        </el-time-picker>
+                    </template>
+                </el-table-column>
+                <el-table-column
+                        prop="name"
+                        label="课程"
+                        align="center"
+                >
+                    <template slot-scope="scope">
+                        <el-select v-model="scope.row.vipType">
+                            <el-option
+                                    v-for="item in panel.options"
+                                    :key="item.value"
+                                    :label="item.label"
+                                    :value="item.value">
+                            </el-option>
+                        </el-select>
+                    </template>
+                </el-table-column>
+                <el-table-column
+                        prop="Recovered"
+                        label="预约名额"
+                        align="center"
+                >
+                    <template slot-scope="scope">
+                        <el-input-number v-model="scope.row.Recovered" :min="1" :max="9999" label=""></el-input-number>
+                    </template>
+                </el-table-column>
+                <el-table-column
+                        prop="Recovered"
+                        label="消耗课时"
+                        align="center"
+                >
+                    <template slot-scope="scope">
+                        <el-input-number v-model="scope.row.Recovered" :min="1" :max="9999" label=""></el-input-number>
+                    </template>
+                </el-table-column>
+                <el-table-column
+                        prop="Status"
+                        label="操作"
+                        width="100px"
+                        align="center"
+                >
+                    <template slot-scope="scope">
+                        <el-button type="text" class="red">删除</el-button>
+                    </template>
+                </el-table-column>
+            </el-table>
+            <div class="rowBottom">
+                <el-button type="primary">新增课表</el-button>
+                <el-button type="primary">提交</el-button>
+            </div>
+        </div>
+        <br>
+        <div v-show="true">
+            <el-pagination :total="pageination.total" :page-size="pageination.pageItem"
+                           @current-change="pageChange"></el-pagination>
+        </div>
+
+
+        <el-dialog title="增删课程会员" :visible.sync="dialogVisible">
+            <div class="dialogTitle">
+                <span>基础功能</span>
+            </div>
+            <div>
+                <el-transfer filterable v-model="dialogValue" :data="dialogdata"></el-transfer>
+            </div>
+            <div class="dialogFooter">
+                <el-button type="primary" size="small">确定</el-button>
+                <el-button @click="dialogVisible = false" size="small">取消</el-button>
+            </div>
+        </el-dialog>
+    </div>
+</template>
+
+<script>
+    import Global from '../Global.js'
+    import {
+        testTable,
+        testTableLong,
+        testSelect
+    } from "../api/getApiRes";
+
+    let qs = require('qs');
+    export default {
+        data() {
+            return {
+                pageTitle: '新增课程表模板',
+                dialogVisible: false,
+                dialogdata: [],
+                dialogValue: [],
+                temId: '',
+                activeName: 'Monday',
+                tableData: [],
+                // panel 配置项目
+                panel: {
+                    usercode: '',
+                    username: '',
+                    compname: '',
+                    keyword: '',
+                    USERCODE: '',
+                    taskstatus: 99,
+                    draw: 1,
+                    start: 0,
+                    recordsTotal: 0,
+                    tableData: [],
+                    allTableData: [],
+                    limit: '10',
+                    multipleSort: false,
+                    loading: false,
+                    fileList: [],
+                    multipleSelection: [],
+                    detectedmac: '',
+                    options: [
+                        {value: 99, label: '全部'},
+                        {value: 1, label: '进行中'},
+                        {value: 2, label: '已完成'},
+                    ],
+                    time1: globalBt(),
+                },
+                multipleSelection: [],
+                pageination: {
+                    pageItem: 7,
+                    pageoptions: pageOptions(),
+                    total: 70,
+                    pageIndex: 1,
+                },
+            }
+        },
+        mounted() {
+            this.getTableQuery();
+        },
+        methods: {
+            handleClick() {
+            },
+            changeWechat(e, row) {
+                // todo
+                this.$message.success('当前用户微信已可见');
+            },
+            // 增删会员课程
+            lessonStudenChange() {
+                this.dialogVisible = true
+            },
+            handleSelectionChange(val) {
+                this.multipleSelection = val;
+            },
+            // 页面数据查询
+            getTableQuery() {
+                let that = this;
+                that.loading = true;
+                let param = {
+                    token: localStorage.token,
+                    supregionid: 0,//
+                };
+                let postdata = qs.stringify(param);
+                testTableLong(postdata).then(res => {
+                    let json = res;
+                    if (json.Code == 0) {
+                        that.loading = false;
+                        if (json.Rs) {
+                            that.allTableData = json.Rs;
+                            that.recordsTotal = json.Rs.length;
+                        } else {
+                            that.allTableData = [];
+                            that.recordsTotal = 0;
+                        }
+
+                        // 设置分页数据
+                        that.setPaginations();
+
+                    } else {
+                        that.$message.error(json.Memo);
+                    }
+                })
+            },
+            // 设置分页数据
+            setPaginations() {
+                // 分页属性
+                let that = this;
+                that.pageination.total = that.recordsTotal;
+                // 默认分页
+                that.tableData = that.allTableData.filter((item, index) => {
+                    return index < that.pageination.pageItem;
+                });
+            },
+            // 每页显示数量
+            handleSizeChange() {
+                let that = this;
+                that.tableData = that.allTableData.filter((item, index) => {
+                    return index < that.pageination.pageItem;
+                });
+                that.draw = that.pageination.pageItem;
+                that.getTableQuery();
+            },
+            // 翻页
+            pageChange(pageIndex) {
+                let that = this;
+                // 获取当前页
+                let index = that.pageination.pageItem * (pageIndex - 1);
+                // 数据总数
+                let nums = that.pageination.pageItem * pageIndex;
+                // 容器
+                let tables = [];
+                for (var i = index; i < nums; i++) {
+                    if (that.allTableData[i]) {
+                        tables.push(that.allTableData[i])
+                    }
+                    this.tableData = tables;
+                }
+                that.start = index * that.draw;
+            },
+            // 自动排序
+            sortChange(params) {
+                console.log(params)
+            },
+            // 过滤时间
+            filterFmtDate(value, row, column) {
+                let that = this;
+                return nonTfmtDate(column, 11);
+            },
+        },
+        watch: {
+            $route() {
+                this.temId = this.$route.query.id
+            },
+            temId(e) {
+                if (parseInt(e) == 0) {
+                    this.pageTitle = '新增课程表模板'
+                } else {
+                    this.pageTitle = '编辑课程表模板'
+                }
+            },
+            activeName(e) {
+                switch (e) {
+                    case "Monday":
+                        this.pageChange(1);
+                        break;
+                    case "Tuesday":
+                        this.pageChange(2);
+                        break;
+                    case "Wednesday":
+                        this.pageChange(3);
+                        break;
+                    case "Thursday":
+                        this.pageChange(4);
+                        break;
+                    case "Friday":
+                        this.pageChange(5);
+                        break;
+                    case "Saturday":
+                        this.pageChange(6);
+                        break;
+                    case "Sunday":
+                        this.pageChange(7);
+                        break;
+                }
+            }
+        },
+    }
+</script>
+
+<style scoped>
+    @import "../assets/css/panel.css";
+
+    em {
+        font-style: normal;
+    }
+
+    .context {
+        overflow: hidden;
+        display: block;
+        margin: 0 auto;
+        background-color: #fff !important;
+        padding: 30px;
+    }
+
+    .panel-body {
+        padding: 20px;
+        background: #F0F2F5;
+    }
+
+    .change {
+        width: 100%;
+        overflow: hidden;
+        display: block;
+        margin: 0 auto;
+        padding-top: 10px;
+        padding-bottom: 10px;
+    }
+
+    .change button {
+        float: left;
+    }
+
+    .change button.pull-right {
+        float: right;
+    }
+
+    .dialogTitle {
+        width: 100%;
+        overflow: hidden;
+        display: block;
+        margin: 0 auto;
+        color: #000000;
+        font-size: 18px;
+        text-align: center;
+    }
+
+    .dialogTitle span {
+        width: 169px;
+        height: 40px;
+        line-height: 40px;
+        text-align: center;
+        color: #fff;
+        background: #3799FF;
+        border-radius: 250px;
+        font-size: 18px;
+        overflow: hidden;
+        display: block;
+        margin: 0 auto;
+        margin-bottom: 30px;
+    }
+
+    .dialogTitle em {
+        float: none;
+        font-style: normal;
+        color: #3799FF;
+        margin: 0;
+    }
+
+    /deep/ .el-transfer-panel__item .el-checkbox__input {
+        left: 40px;
+    }
+
+    .dialogFooter {
+        width: 90%;
+        overflow: hidden;
+        display: block;
+        margin: 0 auto;
+        margin-top: 10px;
+    }
+
+    .dialogFooter button {
+        float: right;
+        margin-left: 10px;
+    }
+
+    /deep/ .panel_control .el-input {
+        width: 200px;
+        float: left;
+    }
+
+    .panel_control em {
+        float: left;
+        font-size: 14px;
+        color: #545454;
+        line-height: 45px;
+        margin-right: 10px;
+    }
+
+    .seeTemp {
+        position: relative;
+        float: right;
+        bottom: 60px;
+    }
+
+    .table {
+        position: relative;
+        top: -50px;
+    }
+
+    .el-range-editor.el-input__inner {
+        width: 220px;
+        padding: 3px 6px;
+    }
+
+    .rowBottom {
+        width: 100%;
+        overflow: hidden;
+        display: block;
+        margin: 0 auto;
+        margin-top: 10px;
+    }
+
+    .rowBottom button {
+        float: left;
+        margin-right: 10px;
+    }
+</style>

+ 1 - 1
pc/src/views/Equip.vue

@@ -495,7 +495,7 @@
             },
             // 过滤时间
             filterFmtDate(value, row, column) {
-                return globalfmtDate(column, 11);
+                return nonTfmtDate(column, 11);
             },
             addList() {
                 this.dialog_state = true;

+ 68 - 58
pc/src/views/Lesson.vue

@@ -7,6 +7,7 @@
             <el-button type="primary" @click="addLesson">新增课程</el-button>
             <el-button @click="lessonStudenChange">增删课程会员</el-button>
             <el-button @click="delList">删除</el-button>
+            <el-button @click="query">刷新</el-button>
         </div>
         <div class="table">
             <el-table
@@ -27,42 +28,42 @@
                         width="50">
                 </el-table-column>
                 <el-table-column
-                        prop="ClassName"
+                        prop="ClassSelf.ClassName"
                         label="课程名称"
                 >
                 </el-table-column>
                 <el-table-column
-                        prop="ClassType"
+                        prop="ClassSelf.ClassType"
                         label="是否通用"
                         width="110"
                         align="center"
                         sortable
                 >
                     <template slot-scope="scope">
-                        <span v-if="scope.row.ClassType == 1">是</span>
-                        <span v-if="scope.row.ClassType == 0">否</span>
+                        <span v-if="scope.row.ClassSelf.ClassType == 1">是</span>
+                        <span v-if="scope.row.ClassSelf.ClassType == 0">否</span>
                     </template>
                 </el-table-column>
                 <el-table-column
-                        prop="ShopId"
+                        prop="ClassSelf.ShopId"
                         label="课程类型"
                         width="110"
                         align="center"
                         sortable
                 >
                     <template slot-scope="scope">
-                        <span v-if="scope.row.ShopId == 1">占用课时</span>
-                        <span v-if="scope.row.ShopId == 0">不占课时</span>
+                        <span v-if="scope.row.ClassSelf.ShopId != 0">占用课时</span>
+                        <span v-if="scope.row.ClassSelf.ShopId == 0">不占课时</span>
                     </template>
                 </el-table-column>
                 <el-table-column
-                        prop="ConsumeHour"
+                        prop="ClassSelf.ConsumeHour"
                         label="消耗课时"
                         sortable
                 >
                 </el-table-column>
                 <el-table-column
-                        prop="TopLimit"
+                        prop="ClassSelf.TopLimit"
                         label="建议上课人数"
                         sortable
                 >
@@ -74,40 +75,41 @@
                 <!--                >-->
                 <!--                </el-table-column>-->
                 <el-table-column
-                        prop="wxVisible"
+                        prop="ClassSelf.WxVisible"
                         label="微信可见"
                 >
                     <template slot-scope="scope">
                         <el-switch
-                                v-model="scope.row.wxVisible"
-                                active-value="1"
-                                inactive-value="0"
+                                v-model="scope.row.ClassSelf.WxVisible"
+                                :active-value="1"
+                                :inactive-value="0"
                                 active-color="#409EFF"
                                 inactive-color="#D9D9D9"
-                                @change=changeWechat($event,scope.row)
+                                @change=changeWechat($event,scope.row.ClassSelf)
                         >
                         </el-switch>
                     </template>
                 </el-table-column>
                 <el-table-column
-                        prop="ClassColor"
+                        prop="ClassSelf.ClassColor"
                         label="课程颜色"
                         width="110"
                 >
                     <template slot-scope="scope">
-                        <el-color-picker v-model="scope.row.ClassColor"
-                                         @change="changeColor(scope.row.ClassColor,scope.row)"></el-color-picker>
+                        <el-color-picker v-model="scope.row.ClassSelf.ClassColor"
+                                         @change="changeColor(scope.row.ClassSelf.ClassColor,scope.row.ClassSelf)"></el-color-picker>
                     </template>
                 </el-table-column>
                 <el-table-column
-                        prop="CreatedAt"
+                        prop="ClassSelf.CreatedAt"
                         label="创建时间"
                         width="210"
+                        :formatter="filterFmtDate"
                         sortable
                 >
                 </el-table-column>
                 <el-table-column
-                        prop="Memo"
+                        prop="ClassSelf.Memo"
                         label="备注">
                     <template slot-scope="scope">
                         <el-popover
@@ -115,20 +117,20 @@
                                 title="标题"
                                 width="200"
                                 trigger="hover"
-                                :content="scope.row.Memo">
+                                :content="scope.row.ClassSelf.Memo">
                             <span slot="reference"
-                                  v-if="scope.row.Memo.length > 6">{{scope.row.Memo.substr(0,6)}} ....</span>
+                                  v-if="scope.row.ClassSelf.Memo.length > 6">{{scope.row.ClassSelf.Memo.substr(0,6)}} ....</span>
                         </el-popover>
-                        <span v-if="scope.row.Memo.length <= 6">{{scope.row.Memo}}</span>
+                        <span v-if="scope.row.ClassSelf.Memo.length <= 6">{{scope.row.ClassSelf.Memo}}</span>
                     </template>
                 </el-table-column>
                 <el-table-column
-                        prop="ClassId"
+                        prop="ClassSelf.ClassId"
                         label="操作"
                 >
                     <template slot-scope="scope">
-                        <el-button type="text" @click="editLesson(scope.row)">编辑</el-button>
-                        <el-button type="text" @click="Lessonmember(scope.row)">课程会员</el-button>
+                        <el-button type="text" @click="editLesson(scope.row.ClassSelf)">编辑</el-button>
+                        <el-button type="text" @click="Lessonmember(scope.row.ClassSelf)">课程会员</el-button>
                     </template>
                 </el-table-column>
 
@@ -142,7 +144,7 @@
             ></el-pagination>
         </div>
 
-        <el-dialog title="新增课程" :visible.sync="dialogLesson" width="1200px">
+        <el-dialog :title="dialogTitle" :visible.sync="dialogLesson" width="1200px">
             <div>
                 <div class="pull-left">
                     <el-form ref="form" :model="form" label-width="160px">
@@ -160,8 +162,8 @@
                         <el-form-item label="微信可见">
                             <el-switch
                                     v-model="form.wxVisible"
-                                    active-value="1"
-                                    inactive-value="0"
+                                    :active-value="1"
+                                    :inactive-value="0"
                                     active-color="#409EFF"
                                     inactive-color="#D9D9D9">
                             </el-switch>
@@ -169,8 +171,8 @@
                         <el-form-item label="是否占课时">
                             <el-switch
                                     v-model="form.classType"
-                                    active-value="1"
-                                    inactive-value="0"
+                                    :active-value="1"
+                                    :inactive-value="0"
                                     active-color="#409EFF"
                                     inactive-color="#D9D9D9">
                             </el-switch>
@@ -178,8 +180,8 @@
                         <el-form-item label="是否通用">
                             <el-switch
                                     v-model="form.allUse"
-                                    active-value="1"
-                                    inactive-value="0"
+                                    :active-value="1"
+                                    :inactive-value="0"
                                     active-color="#409EFF"
                                     inactive-color="#D9D9D9">
                             </el-switch>
@@ -242,6 +244,10 @@
         ClassAdd,
         ClassEdit,
         ClassListQuery,
+        ClassColorEdit,
+        ClassStatusEdit,
+        VipUserListQuery,
+        ClassVisibleStatusEdit,
         testTable,
         testSelect
     } from "../api/getApiRes";
@@ -253,6 +259,7 @@
                 dialogLesson: false,//新增课程
                 dialogVisible: false,
                 dialogTableVisible: false,
+                dialogTitle: '',
                 dialogdata: [],
                 gridData: [],
                 dialogValue: [],
@@ -308,7 +315,7 @@
             }
         },
         mounted() {
-            this.panelSelect();
+            // this.panelSelect();
             this.getTableQuery();
         },
         methods: {
@@ -336,14 +343,15 @@
                 let param = {
                     token: localStorage.token,
                     shopId: localStorage.shopId,
-                    ClassName: that.form.ClassName,
-                    ConsumeHour: that.form.ConsumeHour,
-                    TopLimit: that.form.TopLimit,
+                    className: that.form.ClassName,
+                    consumeHour: that.form.ConsumeHour,
+                    topLimit: that.form.TopLimit,
                     classType: that.form.classType,
                     wxVisible: that.form.wxVisible,
-                    ClassColor: that.form.ClassColor,
+                    classColor: that.form.ClassColor,
+                    userlist: '',
                     teacherId: teacherId,
-                    Memo: that.form.Memo,
+                    memo: that.form.Memo,
                 };
                 let postdata = qs.stringify(param);
                 ClassAdd(postdata).then(res => {
@@ -355,7 +363,7 @@
                         that.getTableQuery();
                         that.$message({
                             showClose: true,
-                            message: '会员课程调整成功!',
+                            message: '添加课程成功!',
                             type: 'success'
                         });
                     } else {
@@ -382,7 +390,7 @@
                     }
                 }
 
-                let teacherId = that.form.dialogValue ? that.form.dialogValue.toString() :'';
+                let teacherId = that.form.dialogValue ? that.form.dialogValue.toString() : '';
                 let param = {
                     token: localStorage.token,
                     shopId: localStorage.shopId,
@@ -426,19 +434,18 @@
                 this.form.Memo = "";
                 this.form.dialogValue = [];
                 this.dialogLesson = true;
-
-
+                this.dialogTitle = '新增课程'
             },
             // 改色
             changeColor(c, row) {
                 let that = this;
                 let param = {
                     token: localStorage.token,
-                    id: row.id,//
-                    color: c,//
+                    classId: row.ClassId,//
+                    classColor: c,//
                 };
                 let postdata = qs.stringify(param);
-                testTable(postdata).then(res => {
+                ClassColorEdit(postdata).then(res => {
                     let json = res;
                     if (json.Code == 0) {
                         that.$message({
@@ -474,11 +481,11 @@
                     return false
                 }
 
-                let detectorid = that.multipleSelection[0].Id;
-
+                let row = that.multipleSelection[0];
+                console.log(row);
                 let param = {
                     token: localStorage.token,
-                    detectorid: detectorid,
+                    classId : row.ClassSelf.ClassId,
                     status: 9,//0禁用1启用9删除
                 };
                 let postdata = qs.stringify(param);
@@ -488,7 +495,7 @@
                     cancelButtonText: '取消',
                     type: 'warning'
                 }).then(() => {
-                    testSelect(postdata).then(res => {
+                    ClassStatusEdit(postdata).then(res => {
                         let json = res;
                         if (json.Code == 0) {
                             that.$message({
@@ -514,9 +521,13 @@
                 let that = this;
                 let param = {
                     token: localStorage.token,
+                    vipType : 0,
+                    phone : '',
+                    name : '',
+                    expDay : '365',
                 };
                 let postdata = qs.stringify(param);
-                testSelect(postdata).then(res => {
+                VipUserListQuery(postdata).then(res => {
                     let json = res;
                     if (json.Code == 0) {
                         that.dialogdata = json.Rs;
@@ -528,14 +539,15 @@
             },
             // 微信可见与否
             changeWechat(e, row) {
+                console.log(row);
                 let that = this;
                 let param = {
                     token: localStorage.token,
-                    id: row.id,//
+                    classId : row.ClassId,//
                     wxVisible: e,//
                 };
                 let postdata = qs.stringify(param);
-                testTable(postdata).then(res => {
+                ClassVisibleStatusEdit(postdata).then(res => {
                     let json = res;
                     if (json.Code == 0) {
                         that.$message({
@@ -590,11 +602,10 @@
                 let that = this;
                 this.clearForm();
                 this.form.btnType = 1; //编辑
-
                 this.form.ClassName = row.ClassName;
                 this.form.ConsumeHour = row.ConsumeHour;
                 this.form.TopLimit = row.TopLimit;
-                this.form.wxVisible = row.wxVisible;
+                this.form.wxVisible = row.WxVisible;
                 this.form.ClassColor = row.ClassColor;
                 this.form.Memo = row.Memo;
                 this.form.dialogValue = row.teacherId;
@@ -605,12 +616,11 @@
             },
             Lessonmember(row) {
                 this.dialogTableVisible = true;
-                this.gridData = row.members;
-
+                this.gridData = row.Userlist;
             },
             // 查询按钮
             query() {
-                // this.getTableQuery();
+                this.getTableQuery();
                 this.$message.success('查询完毕');
             },
             // 页面数据查询
@@ -701,7 +711,7 @@
             // 过滤时间
             filterFmtDate(value, row, column) {
                 let that = this;
-                return globalfmtDate(column, 11);
+                return nonTfmtDate(column, 11);
             },
             // 过滤金额
             filterMoney(value, row, column) {

+ 32 - 30
pc/src/views/LessonTable.vue

@@ -4,7 +4,7 @@
             <h5>课程表模板</h5>
         </div>
         <div class="change">
-            <el-button type="primary" @click="addLessonTable">新增课程表</el-button>
+            <el-button type="primary" @click="addLessonTable">新增课程表模板</el-button>
             <el-button type="" @click="copy">复制</el-button>
             <el-button type="" @click="delList">删除</el-button>
         </div>
@@ -28,38 +28,45 @@
                         width="50">
                 </el-table-column>
                 <el-table-column
-                        prop="name"
+                        prop="PlanName"
                         label="课程表模板名称"
                 >
                     <template slot-scope="scope">
-                        <span class="link" @click="goEdit(scope.row.id)">
-                               {{scope.row.name}}
+                        <span class="link" @click="goEdit(scope.row)">
+                               {{scope.row.PlanName}}
                         </span>
 
                     </template>
                 </el-table-column>
                 <el-table-column
-                        prop="name"
-                        label="课程表名称"
+                        prop="CreateColumn.CreatedAt"
+                        label="最后编辑时间"
+                        :formatter="filterFmtDate"
                         sortable
                 >
                 </el-table-column>
                 <el-table-column
-                        prop="create"
-                        label="最后编辑时间"
+                        prop="ShopId"
+                        label="是否通用"
+                        width="110"
+                        align="center"
                         sortable
                 >
+                    <template slot-scope="scope">
+                        <span v-if="scope.row.ShopId == 0">通用</span>
+                        <span v-else>不通用</span>
+                    </template>
                 </el-table-column>
                 <el-table-column
-                        prop="vipType"
-                        label="是否通用"
+                        prop="Status"
+                        label="状态"
                         width="110"
                         align="center"
                         sortable
                 >
                     <template slot-scope="scope">
-                        <span v-if="scope.row.vipType == 1">是</span>
-                        <span v-if="scope.row.vipType == 0">否</span>
+                        <span v-if="scope.row.Status == 1">已发布</span>
+                        <span v-if="scope.row.Status == 0">未发布</span>
                     </template>
                 </el-table-column>
                 <el-table-column
@@ -67,8 +74,8 @@
                         label="操作"
                 >
                     <template slot-scope="scope">
-                        <el-button type="text" @click="Edit(scope.row)">编辑</el-button>
-                        <el-button type="text" @click="goEdit(scope.row)">详情</el-button>
+                        <el-button type="text" @click="goEdit(scope.row)">编辑</el-button>
+<!--                        <el-button type="text" @click="goEdit(scope.row)">详情</el-button>-->
                         <el-button type="text" @click="goEdit(scope.row)">预览本周</el-button>
                         <el-button type="success" size="mini" v-if="scope.row.Status == 1" @click="openLessonTable(scope.row)">发布</el-button>
                         <el-button type="warning" size="mini" v-if="scope.row.Status == 2" @click="unpubilc(scope.row)">取消发布</el-button>
@@ -108,8 +115,8 @@
                 </span>
                 <el-switch
                         v-model="form.wechat"
-                        active-value="1"
-                        inactive-value="0"
+                        :active-value="1"
+                        :inactive-value="0"
                         active-color="#409EFF"
                         inactive-color="#D9D9D9">
                 </el-switch>
@@ -118,8 +125,8 @@
                 </span>
                 <el-switch
                         v-model="form.appoint"
-                        active-value="1"
-                        inactive-value="0"
+                        :active-value="1"
+                        :inactive-value="0"
                         active-color="#409EFF"
                         inactive-color="#D9D9D9">
                 </el-switch>
@@ -135,6 +142,7 @@
 <script>
     import Global from '../Global.js'
     import {
+        SttPlanBasicListQuery,
         testTable,
         testSelect
     } from "../api/getApiRes";
@@ -171,7 +179,7 @@
             addLessonTable() {
                 this.$router.push({
                     path: '/editLessonTable', query: {
-                        id: 0
+                        id: 0,
                     }
                 });
             },
@@ -356,14 +364,11 @@
                 });
             },
             // 编辑课程表模板
-            Edit(row) {
-               console.log(row);
-            },
-            // 编辑课程表模板
             goEdit(row) {
                 this.$router.push({
                     path: '/editLessonTable', query: {
-                        id: row.id
+                        id: row.PlanId,
+                        name:row.PlanName
                     }
                 });
             },
@@ -378,16 +383,12 @@
             // 页面数据查询
             getTableQuery() {
                 let that = this;
-                // this.getGetChildRegionSelect(0, 1);
                 that.loading = true;
-                // 查询检测设备。上级区域id,区域id必传。regionid传0,查询supregionid对应所有子区域的检测设备。 如果supregionid,regionid都传0,默认查询企业ID下所有检测设备
                 let param = {
                     token: localStorage.token,
-                    start: 1,//
-                    tableMax: 9999,//
                 };
                 let postdata = qs.stringify(param);
-                testTable(postdata).then(res => {
+                SttPlanBasicListQuery(postdata).then(res => {
                     let json = res;
                     if (json.Code == 0) {
                         that.loading = false;
@@ -450,7 +451,7 @@
             // 过滤时间
             filterFmtDate(value, row, column) {
                 let that = this;
-                return globalfmtDate(column, 11);
+                return nonTfmtDate(column, 11);
             },
             // 过滤金额
             filterMoney(value, row, column) {
@@ -546,5 +547,6 @@
     .link {
         color: #03B1FF;
         text-decoration: underline;
+        cursor: pointer;
     }
 </style>

+ 1 - 1
pc/src/views/Log.vue

@@ -396,7 +396,7 @@
             // 过滤时间
             filterFmtDate(value, row, column) {
                 let that = this;
-                return globalfmtDate(column, 11);
+                return nonTfmtDate(column, 11);
             },
             // 过滤金额
             filterMoney(value, row, column) {

+ 28 - 23
pc/src/views/Login.vue

@@ -15,12 +15,12 @@
                                 <el-input v-model="form.name" placeholder="用户名"></el-input>
                             </el-form-item>
                             <el-form-item label="">
-                                <el-input v-model="form.pwd" placeholder="密码"></el-input>
+                                <el-input v-model="form.pwd" placeholder="密码" type="password"></el-input>
                             </el-form-item>
                             <el-form-item label="">
                                 <el-input v-model="form.valid" placeholder="验证码"></el-input>
                                 <img id="validImg" :src="valImgSrc" alt="" width="100px" height="30px"
-                                     title="看不清?刷一下试试!">
+                                     title="看不清?刷一下试试!" @click="getGenVerifyPic" @keyup.enter="onSubmit">
                             </el-form-item>
                             <br>
                             <br>
@@ -53,6 +53,7 @@
                     name: '',
                     pwd: '',
                     valid: '',
+                    picId: '',
                 },
                 valImgSrc: '',
                 valImgId: '',
@@ -71,26 +72,28 @@
             }
         },
         methods: {
-            getGenVerifyPic(){
+            getGenVerifyPic() {
+                let that = this;
                 let param = {
                     token: localStorage.token,
+                    width: 100,
+                    height: 30,
+                    noiseCount: 10,
+                    length: 4,
+                    source: 123456789,
                 };
                 let postdata = qs.stringify(param);
                 GenVerifyPic(postdata).then(res => {
                     let json = res;
-                    if (json.Code == 0) {
-                        console.log(json);
-                        that.valImgSrc = json.pic;
-                        that.valImgId = json.id;
-                    } else {
-                        that.$message.error(json.Memo);
-                    }
+                    that.valImgSrc = json.Pic;
+                    that.valImgId = json.Id;
+                    that.form.picId = json.Id;
                 })
             },
             //            点击验证码切换
             changeValImg: function () {
-                let that = this;
-                that.valImgSrc = that.valImgSrc + '?' + Math.random();
+                // 刷新验证图
+                this.getGenVerifyPic();
             },
             // 登陆
             onSubmit() {
@@ -125,23 +128,21 @@
                     return false
                 }
                 let param = {
-                    'usercode': username,
-                    'passwd': userpwd,
-                    'vcode': uservalid,
-                    'logintype': 1,
-                    'accounttype': 3,
-                    'src': 'pc'
+                    verifyName: username,
+                    verifyCode: userpwd,
+                    picCode: uservalid,
+                    picId: this.form.picId,
+                    channel: 2
                 };
                 let postdata = qs.stringify(param);
                 SignIn(postdata).then(res => {
                     if (res.Code == 0) {
                         that.res = res.Rs;
-                        that.userName = res.Rs.userName;
-                        localStorage.userName = res.Rs.username;
+                        localStorage.userName = username;
                         localStorage.token = res.Rs.token;
                         that.$router.push({path: '/'});
                     } else {
-                        if (json.code == 10005) {
+                        if (res.Code == 10005) {
                             that.$refs.userpwd.value = '';
                             that.$notify({
                                 title: '警告',
@@ -151,7 +152,7 @@
                         } else {
                             that.$notify({
                                 title: '警告',
-                                message: json.memo,
+                                message: res.Memo + ',错误代码:' + res.Code,
                                 type: 'warning'
                             });
                             that.form.valid = '';
@@ -172,7 +173,7 @@
         display: block;
         margin: 0 auto;
         background-color: #F0F2F5;
-        background: url("../assets/img/login/bg.png")top center no-repeat;
+        background: url("../assets/img/login/bg.png") top center no-repeat;
         background-size: 100% 100%;
     }
 
@@ -183,6 +184,7 @@
         margin-top: 3%;
         margin-bottom: 5px;
     }
+
     .title img {
         width: 362px;
         overflow: hidden;
@@ -220,18 +222,21 @@
         float: right;
         bottom: 45px;
     }
+
     /deep/ .el-form {
         width: 422px;
         overflow: hidden;
         display: block;
         margin: 0 auto;
     }
+
     /deep/ .el-input__inner {
         height: 44px;
         background: #F0F2F5;
         border-radius: 0;
         margin-bottom: 10px;
     }
+
     /deep/ .el-button--primary {
         width: 100%;
         height: 52px;

+ 0 - 5
pc/src/views/Main.vue

@@ -139,11 +139,6 @@
         mounted() {
             let that = this;
 
-            // test
-            localStorage.token = 'f4106343326bca181a19ef806c88cd4c';
-            localStorage.shopId = 0;
-
-
             // 下课管理
             this.ClassQuery();
             this.appointQuery();

+ 1 - 1
pc/src/views/Member.vue

@@ -943,7 +943,7 @@
             // 过滤时间
             filterFmtDate(value, row, column) {
                 let that = this;
-                return globalfmtDate(column, 11);
+                return nonTfmtDate(column, 11);
             },
             // 过滤金额
             filterMoney(value, row, column) {

+ 34 - 25
pc/src/views/ShopManage.vue

@@ -5,13 +5,17 @@
             <div class="panel-body">
                 <div class="panel_control">
                     <el-row :gutter="20">
+                        <el-col :span="4">
+                            <em>店铺名称:</em>
+                            <el-input v-model="panel.shopName" placeholder="请输入店铺名称"></el-input>
+                        </el-col>
                         <el-col :span="4">
                             <em>负责人:</em>
-                            <el-input v-model="panel.userCode" placeholder="请输入负责人"></el-input>
+                            <el-input v-model="panel.contacts" placeholder="请输入负责人"></el-input>
                         </el-col>
                         <el-col :span="4">
                             <em>手机号:</em>
-                            <el-input v-model="panel.tel" placeholder="请输入手机号"></el-input>
+                            <el-input v-model="panel.phone" placeholder="请输入手机号"></el-input>
                         </el-col>
                         <el-col :span="4">
                             <el-button size="" type="primary" @click="query" plain>查询</el-button>
@@ -46,25 +50,25 @@
                         width="50">
                 </el-table-column>
                 <el-table-column
-                        prop="userCode"
+                        prop="ShopName"
                         label="店面名称"
                         sortable
                 >
                 </el-table-column>
                 <el-table-column
-                        prop="name"
+                        prop="Addr"
                         label="位置"
                         sortable
                 >
                 </el-table-column>
                 <el-table-column
-                        prop="shop"
+                        prop="Contacts"
                         label="负责人"
                         sortable
                 >
                 </el-table-column>
                 <el-table-column
-                        prop="tel"
+                        prop="Phone"
                         label="手机号"
                 >
                 </el-table-column>
@@ -108,6 +112,10 @@
     import Global from '../Global.js'
     import {
         ShopAdd,
+        ShopDetailQuery,
+        ShopEdit,
+        ShopListQuery,
+        ShopStatusEdit,
         testTable,
         testSelect
     } from "../api/getApiRes";
@@ -120,6 +128,9 @@
                 dialogTitle: '新增店面',
                 // panel 配置项目
                 panel: {
+                    shopName: '',
+                    contacts: '',
+                    phone: '',
                     userCode: '',
                     tel: '',
                     shopList: 0,
@@ -266,10 +277,10 @@
                     addr: that.form.addr,
                     contacts: that.form.contacts,
                     phone: that.form.phone,
-                    shopid: that.form.shopid,
+                    shopId: that.form.shopId,
                 };
                 let postdata = qs.stringify(param);
-                ShopAdd(postdata).then(res => {
+                ShopEdit(postdata).then(res => {
                     let json = res;
                     if (json.Code == 0) {
                         // 关闭弹窗
@@ -279,7 +290,7 @@
                         that.getTableQuery();
                         that.$message({
                             showClose: true,
-                            message: '店面添加成功!',
+                            message: '店面编辑成功!',
                             type: 'success'
                         });
                     } else {
@@ -307,11 +318,11 @@
                     });
                     return false
                 }
-                let detectorid = that.multipleSelection[0].Id;
+                let ShopID = that.multipleSelection[0].ShopID;
 
                 let param = {
                     token: localStorage.token,
-                    detectorid: detectorid,
+                    shopId : ShopID,
                     status: 9,//0禁用1启用9删除
                 };
                 let postdata = qs.stringify(param);
@@ -321,7 +332,7 @@
                     cancelButtonText: '取消',
                     type: 'warning'
                 }).then(() => {
-                    testSelect(postdata).then(res => {
+                    ShopStatusEdit(postdata).then(res => {
                         let json = res;
                         if (json.Code == 0) {
                             that.$message({
@@ -382,11 +393,12 @@
                 this.clearForm();
                 this.form.btnState = 1; //编辑
                 let row = that.multipleSelection[0];
-                this.form.shopName = row.shopName;
-                this.form.addr = row.addr;
-                this.form.name = row.name;
-                this.form.userCode = row.userCode;
-                this.form.shopId = row.Id;
+                this.form.shopId = row.ShopID;
+                this.form.shopName = row.ShopName;
+                this.form.addr = row.Addr;
+                this.form.contacts = row.Contacts;
+                this.form.phone = row.Phone;
+
                 this.dialogVisible = true
                 this.dialogTitle = '编辑店面'
             },
@@ -405,15 +417,12 @@
                 // 查询检测设备。上级区域id,区域id必传。regionid传0,查询supregionid对应所有子区域的检测设备。 如果supregionid,regionid都传0,默认查询企业ID下所有检测设备
                 let param = {
                     token: localStorage.token,
-                    shopId: 0,//
-                    regionid: this.panel.regionid,//
-                    comid: 1,//
-                    tagname: that.panel.tagname,//标签名
-                    start: 1,//
-                    tableMax: 9999,//
+                    shopName: this.panel.shopName,//
+                    contacts: this.panel.contacts,//
+                    phone: this.panel.phone,//
                 };
                 let postdata = qs.stringify(param);
-                testTable(postdata).then(res => {
+                ShopListQuery(postdata).then(res => {
                     let json = res;
                     if (json.Code == 0) {
                         that.loading = false;
@@ -475,7 +484,7 @@
             // 过滤时间
             filterFmtDate(value, row, column) {
                 let that = this;
-                return globalfmtDate(column, 11);
+                return nonTfmtDate(column, 11);
             },
             // 过滤金额
             filterMoney(value, row, column) {

+ 1 - 1
pc/src/views/Yhgl.vue

@@ -222,7 +222,7 @@
             // 过滤时间
             filterFmtDate(value, row, column) {
                 let that = this;
-                return globalfmtDate(column, 11);
+                return nonTfmtDate(column, 11);
             },
             // 过滤金额
             filterMoney(value, row, column) {

+ 3 - 3
pc/src/views/appoint.vue

@@ -70,8 +70,8 @@
                                 <template slot-scope="scope">
                                     <el-switch
                                             v-model="scope.row.wxVisible"
-                                            active-value="1"
-                                            inactive-value="0"
+                                            :active-value="1"
+                                            :inactive-value="0"
                                             active-color="#409EFF"
                                             inactive-color="#D9D9D9"
                                             @change=changeWechat($event,scope.row)
@@ -995,7 +995,7 @@
             // 过滤时间
             filterFmtDate(value, row, column) {
                 let that = this;
-                return globalfmtDate(column, 11);
+                return nonTfmtDate(column, 11);
             },
             // 过滤金额
             filterMoney(value, row, column) {

+ 1 - 1
pc/src/views/coach.vue

@@ -802,7 +802,7 @@
             // 过滤时间
             filterFmtDate(value, row, column) {
                 let that = this;
-                return globalfmtDate(column, 11);
+                return nonTfmtDate(column, 11);
             },
             // 过滤金额
             filterMoney(value, row, column) {

+ 1 - 1
pc/src/views/cost.vue

@@ -913,7 +913,7 @@
             // 过滤时间
             filterFmtDate(value, row, column) {
                 let that = this;
-                return globalfmtDate(column, 11);
+                return nonTfmtDate(column, 11);
             },
             // 过滤金额
             filterMoney(value, row, column) {

+ 1 - 1
pc/src/views/finish.vue

@@ -241,7 +241,7 @@
             // 过滤时间
             filterFmtDate(value, row, column) {
                 let that = this;
-                return globalfmtDate(column, 11);
+                return nonTfmtDate(column, 11);
             },
             // 过滤金额
             filterMoney(value, row, column) {

+ 1 - 1
pc/src/views/finishDetail.vue

@@ -844,7 +844,7 @@
             // 过滤时间
             filterFmtDate(value, row, column) {
                 let that = this;
-                return globalfmtDate(column, 11);
+                return nonTfmtDate(column, 11);
             },
             // 过滤金额
             filterMoney(value, row, column) {

+ 7 - 7
pc/src/views/lessonManage.vue

@@ -66,8 +66,8 @@
                     <template slot-scope="scope">
                         <el-switch
                                 v-model="scope.row.wxVisible"
-                                active-value="1"
-                                inactive-value="0"
+                                :active-value="1"
+                                :inactive-value="0"
                                 active-color="#409EFF"
                                 inactive-color="#D9D9D9"
                                 @change=changeWechat($event,scope.row)
@@ -117,8 +117,8 @@
                 </span>
                 <el-switch
                         v-model="form.wechat"
-                        active-value="1"
-                        inactive-value="0"
+                        :active-value="1"
+                        :inactive-value="0"
                         active-color="#409EFF"
                         inactive-color="#D9D9D9">
                 </el-switch>
@@ -127,8 +127,8 @@
                 </span>
                 <el-switch
                         v-model="form.appoint"
-                        active-value="1"
-                        inactive-value="0"
+                        :active-value="1"
+                        :inactive-value="0"
                         active-color="#409EFF"
                         inactive-color="#D9D9D9">
                 </el-switch>
@@ -454,7 +454,7 @@
             // 过滤时间
             filterFmtDate(value, row, column) {
                 let that = this;
-                return globalfmtDate(column, 11);
+                return nonTfmtDate(column, 11);
             },
             // 过滤金额
             filterMoney(value, row, column) {

+ 1 - 1
pc/src/views/record.vue

@@ -912,7 +912,7 @@
             // 过滤时间
             filterFmtDate(value, row, column) {
                 let that = this;
-                return globalfmtDate(column, 11);
+                return nonTfmtDate(column, 11);
             },
             // 过滤金额
             filterMoney(value, row, column) {

+ 4 - 4
pc/src/views/setting.vue

@@ -12,8 +12,8 @@
                        </span>
                                 <el-switch
                                         v-model="appoint"
-                                        active-value="1"
-                                        inactive-value="0"
+                                        :active-value="1"
+                                        :inactive-value="0"
                                         active-color="#409EFF"
                                         inactive-color="#D9D9D9"
                                         @change=changeWechat($event,appoint)
@@ -53,6 +53,7 @@
     let qs = require('qs');
     import Global from '../Global.js'
     import {
+        PassEdit,
         testTable,
     } from '../api/getApiRes.js'
 
@@ -178,10 +179,9 @@
                     newpass: that.form.newpwd,
                 };
                 let postdata = qs.stringify(param);
-                testTable(postdata).then(res => {
+                PassEdit(postdata).then(res => {
                     let json = res;
                     // 无论成功与否都重载验证码
-                    this.CurenttestTable();
                     if (json.Code == 0) {
                         that.$message({
                             showClose: true,