Changpeng Duan пре 4 година
родитељ
комит
480297b58b

+ 3 - 0
app/public/index.html

@@ -6,6 +6,9 @@
 <!--    <meta name="viewport" content="width=device-width,initial-scale=1.0">-->
     <meta content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0" name="viewport"/>
     <link rel="icon" href="<%= BASE_URL %>favicon.ico">
+    <meta http-equiv="pragram" content="no-cache" />
+    <meta http-equiv="cache-control" content="no-cache, no-store, must-revalidate"  />
+    <meta http-equiv="expires" content="0" />
     <title><%= htmlWebpackPlugin.options.title %></title>
     <link rel="stylesheet" href="https://cdn.bootcss.com/material-design-icons/3.0.1/iconfont/material-icons.css">
 </head>

+ 7 - 0
app/vue.config.js

@@ -1,3 +1,4 @@
+const Timestamp = new Date().getTime();
 module.exports = {
     lintOnSave: false,
     devServer: {
@@ -11,6 +12,12 @@ module.exports = {
             }
         }
     },
+    configureWebpack: {
+        output: { // 输出重构  打包编译后的 文件名称  【模块名称.版本号.时间戳】
+          filename: `[name].${process.env.VUE_APP_Version}.${Timestamp}.js`,
+          chunkFilename: `[name].${process.env.VUE_APP_Version}.${Timestamp}.js`
+        }
+      },
     // 输出文件目录
     outputDir: 'D:/wwwroot/flyLongApp/build',
 }

+ 6 - 2
pc/src/App.vue

@@ -1,6 +1,6 @@
 <template>
     <div id="app">
-        <router-view/>
+        <router-view />
     </div>
 </template>
 
@@ -22,4 +22,8 @@
         text-align: center;
         color: #2c3e50;
     }
-</style>
+
+    .el-tooltip__popper.is-dark {
+        display: none !important;
+    }
+</style>

+ 2 - 2
pc/src/components/Headside.vue

@@ -22,10 +22,10 @@
                 <!--                        <img class="lteHead" src="../assets/img/header/lteHead.png" height="26" width="26"/>-->
 
                 <span class="customer_serve" @click="logoutClick"> <i class="el-icon-switch-button"></i> 退出</span>
-                <span class="scrren customer_serve" @click="full_screen" v-if="!screen_full"><i
+                <!-- <span class="scrren customer_serve" @click="full_screen" v-if="!screen_full"><i
                         class="el-icon-full-screen"></i>全屏</span>
                 <span class="scrren customer_serve" @click="cancle_screen" v-if="screen_full"><i
-                        class="el-icon-full-screen"></i>缩小</span>
+                        class="el-icon-full-screen"></i>缩小</span> -->
                 <span class="el-dropdown-link customer_serve">{{ user.name }}</span>
                 <span class="el-dropdown-link customer_serve shopinfo">
                     <span>{{ ShopName }}</span>

+ 9 - 6
pc/src/components/Navside.vue

@@ -14,8 +14,11 @@
             <el-col :span="24">
                 <el-menu :default-active="userLevelDeafult" class="el-menu-vertical-demo" @open="handleOpen"
                     @close="handleClose" @select="handleSelect" :collapse="isCollapse" background-color="#ffffff"
-                    text-color="#777777" active-text-color="#fff" router>
+                    text-color="#777777" active-text-color="#fff"
+                    
+                    router>
                     <el-menu-item :index="nav.clmid" :route="nav.clmurl" v-for="nav in navs"
+                    popper-append-to-body="false"
                         v-if="nav.show == userLevel">
                         <i :class="nav.icon"></i>
                         <span slot="title">{{ nav.clmname }}</span>
@@ -58,6 +61,10 @@
                 this.NavsideClass = 'Navside'
             }
         },
+        watch: {
+            $route(to, from) {
+            },
+        },
         methods: {
             //            隐藏左侧和显示
             left_hide: function () {
@@ -65,6 +72,7 @@
                 that.left_panel_state = !that.left_panel_state;
                 that.isCollapse = !that.isCollapse;
                 this.$emit('lefthide');
+
                 // if (!that.left_panel_state) {
                 //     this.$emit('left_hide_func');
                 // } else {
@@ -143,11 +151,6 @@
                 // console.log(key, keyPath);
             },
         },
-        watch: {
-            $route(to, from) {
-                // this.userLevelDeafult = to.meta.clmid
-            },
-        },
     }
 </script>
 <style scoped>

+ 12 - 12
pc/src/views/AcrossVip.vue

@@ -5,19 +5,19 @@
             <div class="panel-body">
                 <div class="panel_control">
                     <el-row :gutter="20">
-                        <el-col :span="4">
+                        <el-col :span="5">
                             <em>用户名:</em>
                             <el-input v-model="panel.usercode" placeholder="请输入用户名"></el-input>
                         </el-col>
-                        <el-col :span="4">
+                        <el-col :span="5">
                             <em>姓名:</em>
                             <el-input v-model="panel.name" placeholder="请输入姓名"></el-input>
                         </el-col>
-                        <el-col :span="4">
+                        <el-col :span="5">
                             <em>手机号:</em>
                             <el-input v-model="panel.phone" placeholder="请输入手机号" type="number"></el-input>
                         </el-col>
-                        <el-col :span="4">
+                        <el-col :span="3">
                             <el-button size="" type="primary" @click="query" plain :disabled="serachBtnStatus">查询
                             </el-button>
                         </el-col>
@@ -26,8 +26,8 @@
             </div>
         </div>
         <div class="change">
-            <el-button @click="addMember" v-if="userLevel != 4" type="primary">新增跨店会员</el-button>
-            <el-button @click="delList" v-if="userLevel != 4">删除跨店会员</el-button>
+            <el-button @click="addMember" v-if="userLevel != 4" type="primary" size="mini">新增跨店会员</el-button>
+            <el-button @click="delList" v-if="userLevel != 4" size="mini">删除跨店会员</el-button>
         </div>
         <div class="table">
             <el-table
@@ -45,12 +45,10 @@
                         <el-radio v-model="tableRadio" :label="scope.row"><i></i></el-radio>
                     </template>
                 </el-table-column>
-                <el-table-column
-                        type="index"
-                        label="序号"
-                        align="center"
-                        width="50"
-                >
+                <el-table-column label="序号" type="index" width="50" align="center">
+                    <template scope="scope">
+                        <span>{{(start) + scope.$index + 1}}</span>
+                    </template>
                 </el-table-column>
                 <el-table-column
                         prop="Usercode"
@@ -194,6 +192,8 @@
                     {value: 2, label: '女'},
                 ],
                 yearOptions: getyearOptions(15),
+                start: 0,
+                draw: 1,
                 // panel 配置项目
                 panel: {
                     usercode: '',

+ 553 - 620
pc/src/views/AdminManage.vue

@@ -5,33 +5,21 @@
       <div class="panel-body">
         <div class="panel_control">
           <el-row :gutter="20">
-            <el-col :span="4">
+            <el-col :span="5">
               <em>姓名:</em>
               <el-input v-model="panel.name" placeholder="请输入用户名"></el-input>
             </el-col>
-            <!--<el-col :span="4">-->
-              <!--<em>手机号:</em>-->
-              <!--<el-input v-model="panel.phone" placeholder="请输入手机号" type="number" ></el-input>-->
-            <!--</el-col>-->
-            <el-col :span="4">
+            <el-col :span="5">
               <em>店面:</em>
               <el-select v-model="panel.shopId">
-                <el-option
-                    v-for="item in panel.options"
-                    :key="item.value"
-                    :label="item.label"
-                    :value="item.value">
+                <el-option v-for="item in panel.options" :key="item.value" :label="item.label" :value="item.value">
                 </el-option>
               </el-select>
             </el-col>
-            <el-col :span="4">
+            <el-col :span="5">
               <em>类型:</em>
               <el-select v-model="panel.adminType">
-                <el-option
-                    v-for="item in panel.typeList"
-                    :key="item.value"
-                    :label="item.label"
-                    :value="item.value">
+                <el-option v-for="item in panel.typeList" :key="item.value" :label="item.label" :value="item.value">
                 </el-option>
               </el-select>
             </el-col>
@@ -43,55 +31,35 @@
       </div>
     </div>
     <div class="change">
-      <el-button @click="addAdmin"type="primary">新增</el-button>
-      <el-button @click="editList">编辑</el-button>
-      <el-button @click="delList" type="danger">删除</el-button>
+      <el-button @click="addAdmin" type="primary" size="mini">新增</el-button>
+      <el-button @click="editList" size="mini">编辑</el-button>
+      <el-button @click="delList" type="danger" size="mini">删除</el-button>
     </div>
     <div class="table">
-      <el-table
-          :data="tableData"
-          border
-          is-horizontal-resize
-          :default-sort="{prop: 'date', order: 'descending'}"
-          element-loading-background="rgba(0, 0, 0, 0.8)"
-          class=""
-          @selection-change="handleSelectionChange" @current-change="clickChange"
-      >
+      <el-table :data="tableData" border is-horizontal-resize :default-sort="{prop: 'date', order: 'descending'}"
+        element-loading-background="rgba(0, 0, 0, 0.8)" class="" @selection-change="handleSelectionChange"
+        @current-change="clickChange">
         <el-table-column label="选择" width="55">
           <template slot-scope="scope">
             <el-radio v-model="tableRadio" :label="scope.row"><i></i></el-radio>
           </template>
         </el-table-column>
-        <el-table-column
-            type="index"
-            label="序号"
-            align="center"
-
-            width="50">
+        <el-table-column label="序号" type="index" width="50" align="center">
+          <template scope="scope">
+            <span>{{(start) + scope.$index + 1}}</span>
+          </template>
         </el-table-column>
-        <el-table-column
-            prop="Usercode"
-            label="用户名"
-            sortable
-        >
+        <el-table-column prop="Usercode" label="用户名" sortable>
         </el-table-column>
-        <el-table-column
-            prop="Name"
-            label="姓名"
-            sortable
-        >
+        <el-table-column prop="Name" label="姓名" sortable>
         </el-table-column>
         <!--<el-table-column-->
-            <!--prop="Phone"-->
-            <!--label="手机号"-->
-            <!--sortable-->
+        <!--prop="Phone"-->
+        <!--label="手机号"-->
+        <!--sortable-->
         <!--&gt;-->
         <!--</el-table-column>-->
-        <el-table-column
-            prop="AdminType"
-            label="角色"
-            sortable
-        >
+        <el-table-column prop="AdminType" label="角色" sortable>
           <template slot-scope="scope">
             <!--                        // 1 会员 2 系统 3 店铺 4 教练-->
             <span v-if="scope.row.AdminType  == 1" style="color: #005EA2">会员</span>
@@ -101,58 +69,30 @@
           </template>
         </el-table-column>
 
-        <el-table-column
-            prop="ShopName"
-            label="所属门店"
-            sortable
-        >
+        <el-table-column prop="ShopName" label="所属门店" sortable>
         </el-table-column>
-        <el-table-column
-            prop="LastLoginTime"
-            label="上次登陆时间"
-            :formatter="filterFmtDate"
-            sortable
-        >
+        <el-table-column prop="LastLoginTime" label="上次登陆时间" :formatter="filterFmtDate" sortable>
         </el-table-column>
-        <el-table-column
-            prop="Memo"
-            label="备注"
-            sortable
-        >
+        <el-table-column prop="Memo" label="备注" sortable>
           <template slot-scope="scope">
-            <el-popover
-                placement="top"
-                title="备注"
-                width="200"
-                trigger="hover"
-                :content="scope.row.Memo">
-                            <span slot="reference"
-                                  v-if="scope.row.Memo.length > 10">{{ scope.row.Memo.substr(0, 10) }} ....</span>
+            <el-popover placement="top" title="备注" width="200" trigger="hover" :content="scope.row.Memo">
+              <span slot="reference" v-if="scope.row.Memo.length > 10">{{ scope.row.Memo.substr(0, 10) }} ....</span>
             </el-popover>
             <span v-if="scope.row.Memo.length <= 10">{{ scope.row.Memo }}</span>
           </template>
         </el-table-column>
-        <el-table-column
-            prop="Status"
-            label="操作"
-        >
+        <el-table-column prop="Status" label="操作">
           <template slot-scope="scope">
-            <el-button type="danger" size="mini" v-if="scope.row.Status == 1"
-                       @click="runAndPause(scope.row,8)">禁用
+            <el-button type="danger" size="mini" v-if="scope.row.Status == 1" @click="runAndPause(scope.row,8)">禁用
             </el-button>
-            <el-button type="success" size="mini" v-if="scope.row.Status == 8"
-                       @click="runAndPause(scope.row,1)">启用
+            <el-button type="success" size="mini" v-if="scope.row.Status == 8" @click="runAndPause(scope.row,1)">启用
             </el-button>
           </template>
         </el-table-column>
       </el-table>
       <br>
-      <el-pagination
-          background
-          :total="pageination.total"
-          :page-size="pageination.pageItem"
-          @current-change="pageChange"
-      ></el-pagination>
+      <el-pagination background :total="pageination.total" :page-size="pageination.pageItem"
+        @current-change="pageChange"></el-pagination>
     </div>
 
     <el-dialog :title="dialogTitle" :visible.sync="dialogVisible" width="650px">
@@ -168,26 +108,17 @@
             <el-input v-model="form.name"></el-input>
           </el-form-item>
           <!--<el-form-item label="手机号">-->
-            <!--<el-input v-model="form.phone"></el-input>-->
+          <!--<el-input v-model="form.phone"></el-input>-->
           <!--</el-form-item>-->
           <el-form-item label="所属门店">
             <el-select v-model="form.shopId" placeholder="请选择所属门店">
-              <el-option
-                  v-for="item in shops"
-                  :key="item.value"
-                  :label="item.label"
-                  :value="item.value"
-              ></el-option>
+              <el-option v-for="item in shops" :key="item.value" :label="item.label" :value="item.value"></el-option>
             </el-select>
           </el-form-item>
           <el-form-item label="用户角色">
             <el-select v-model="form.adminType " placeholder="请选择用户角色">
-              <el-option
-                  v-for="item in form.adminTypeList"
-                  :key="item.value"
-                  :label="item.label"
-                  :value="item.value"
-              ></el-option>
+              <el-option v-for="item in form.adminTypeList" :key="item.value" :label="item.label" :value="item.value">
+              </el-option>
             </el-select>
           </el-form-item>
           <el-form-item label="备注">
@@ -205,198 +136,125 @@
 </template>
 
 <script>
-import Global from '../Global.js'
-import {
-  ShopManagerListQuery,
-  ShopListQuery,
-  ShopManagerAdd,
-  ShopManagerEdit,
-  ShopManagerStatusEdit,
-  testTable,
-  testSelect
-} from "../api/getApiRes";
+  import Global from '../Global.js'
+  import {
+    ShopManagerListQuery,
+    ShopListQuery,
+    ShopManagerAdd,
+    ShopManagerEdit,
+    ShopManagerStatusEdit,
+    testTable,
+    testSelect
+  } from "../api/getApiRes";
 
-let qs = require('qs');
-export default {
-  data() {
-    return {
-      dialogVisible: false,
-      dialogTitle: '新增',
-      // panel 配置项目
-      panel: {
-        userCode: '',
-        name: '',
-        phone: '',
-        shopId: '',
-        options: [],
-        draw: 1,
+  let qs = require('qs');
+  export default {
+    data() {
+      return {
+        dialogVisible: false,
+        dialogTitle: '新增',
         start: 0,
-        recordsTotal: 0,
-        tableData: [],
-        allTableData: [],
-        limit: '10',
-        multipleSort: false,
-        loading: false,
-        fileList: [],
+        draw: 1,
+        // panel 配置项目
+        panel: {
+          userCode: '',
+          name: '',
+          phone: '',
+          shopId: '',
+          options: [],
+          draw: 1,
+          start: 0,
+          recordsTotal: 0,
+          tableData: [],
+          allTableData: [],
+          limit: '10',
+          multipleSort: false,
+          loading: false,
+          fileList: [],
+          multipleSelection: [],
+          detectedmac: '',
+          time1: globalBt(),
+          type: ' ',
+          adminType: '',
+          typeList: [
+            { value: '', label: '全部' },
+            { value: 3, label: '店铺管理员' },
+            { value: 4, label: '教练' },
+          ],
+        },
         multipleSelection: [],
-        detectedmac: '',
-        time1: globalBt(),
-        type: ' ',
-        adminType: '',
-        typeList: [
-          {value: '', label: '全部'},
-          {value: 3, label: '店铺管理员'},
-          {value: 4, label: '教练'},
-        ],
-      },
-      multipleSelection: [],
-      pageination: {
-        pageItem: 10,
-        pageoptions: pageOptions(),
-        total: 100,
-        pageIndex: 1,
+        pageination: {
+          pageItem: 10,
+          pageoptions: pageOptions(),
+          total: 100,
+          pageIndex: 1,
+        },
+        form: {
+          shopId: '',
+          userId: '',
+          userCode: '',
+          password: '',
+          name: '',
+          phone: '',
+          memo: '',
+          btnState: 0,
+          adminType: 3,
+          adminTypeList: [
+            { value: 3, label: '店铺管理员' },
+            { value: 4, label: '教练' },
+          ],
+        },
+        shops: [],
+        tableData: [],
+        tableRadio: [],
+        serachBtnStatus: false,
+      }
+    },
+    mounted() {
+      this.getShopListSelect();
+      this.getTableQuery();
+    },
+    methods: {
+      // 获取店面列表
+      getShopListSelect() {
+        let that = this;
+        let param = {
+          token: localStorage.token,
+        };
+        let postdata = qs.stringify(param);
+        ShopListQuery(postdata).then(res => {
+          let json = res;
+          if (json.Code == 0) {
+            if (json.Rs == '') {
+              that.$message.error('当前没有可选的店铺,请先在店面管理中添加店铺!');
+              return false
+            }
+            that.panel.options = turnShopResToOption(json.Rs);
+            that.panel.options.unshift({ value: '', label: "全部" });
+          } else {
+            that.$message.error(json.Memo + ' 错误码:' + json.Code);
+          }
+        })
       },
-      form: {
-        shopId: '',
-        userId: '',
-        userCode: '',
-        password: '',
-        name: '',
-        phone: '',
-        memo: '',
-        btnState: 0,
-        adminType: 3,
-        adminTypeList: [
-          {value: 3, label: '店铺管理员'},
-          {value: 4, label: '教练'},
-        ],
+      clickChange(item) {
+        this.tableRadio = item
       },
-      shops: [],
-      tableData: [],
-      tableRadio: [],
-      serachBtnStatus: false,
-    }
-  },
-  mounted() {
-    this.getShopListSelect();
-    this.getTableQuery();
-  },
-  methods: {
-    // 获取店面列表
-    getShopListSelect(){
-      let that = this;
-      let param = {
-        token: localStorage.token,
-      };
-      let postdata = qs.stringify(param);
-      ShopListQuery(postdata).then(res => {
-        let json = res;
-        if (json.Code == 0) {
-          if (json.Rs == '') {
-            that.$message.error('当前没有可选的店铺,请先在店面管理中添加店铺!');
-            return false
-          }
-          that.panel.options = turnShopResToOption(json.Rs);
-          that.panel.options.unshift({value: '', label: "全部"});
-        } else {
-          that.$message.error(json.Memo + ' 错误码:' + json.Code);
+      // 新增 确认提交
+      confirmAdmin() {
+        let that = this;
+        // checkNum
+        if (!that.form.userCode) {
+          this.$message.error('错了哦,登陆账号不能为空');
+          return false
         }
-      })
-    },
-    clickChange(item) {
-      this.tableRadio = item
-    },
-    // 新增 确认提交
-    confirmAdmin() {
-      let that = this;
-      // checkNum
-      if (!that.form.userCode) {
-        this.$message.error('错了哦,登陆账号不能为空');
-        return false
-      }
-      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) {
-        this.$message.error('错了哦,姓名不能为空');
-        return false
-      }
-      if (that.form.name.length > 8) {
-        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个字');
+        if (that.form.name.length > 20) {
+          this.$message.error('错了哦,登陆账号字数超过20个字');
           return false
         }
-      }
-
-      let param = {
-        token: localStorage.token,
-        shopId: that.form.shopId,
-        usercode: that.form.userCode,
-        password: that.form.password,
-        name: that.form.name,
-        // phone: that.form.phone,
-        adminType: that.form.adminType,
-        memo: that.form.memo,
-      };
-      let postdata = qs.stringify(param);
-      ShopManagerAdd(postdata).then(res => {
-        let json = res;
-        if (json.Code == 0) {
-          // 关闭弹窗
-          that.dialogVisible = false;
-          that.$message({
-            showClose: true,
-            message: '管理员添加成功!',
-            type: 'success'
-          });
-
-          // 重载列表
-          that.getTableQuery();
-        } else {
-          that.$message.error(json.Memo + ' 错误码:' + json.Code);
+        if (!that.form.password) {
+          this.$message.error('错了哦,密码不能为空');
+          return false
         }
-      })
-    },
-    confirmEdit() {
-      // ShopManagerEdit
-      let that = this;
-      // checkNum
-      if (!that.form.userCode) {
-        this.$message.error('错了哦,登陆账号不能为空');
-        return false
-      }
-      if (that.form.name.length > 20) {
-        this.$message.error('错了哦,登陆账号字数超过20个字');
-        return false
-      }
-
-      // 密码有输入才检测,没输入默认传空不修改
-      if (that.form.password) {
         if (that.form.password.length < 6) {
           this.$message.error('错了哦,密码字数小于6个字');
           return false
@@ -405,109 +263,213 @@ export default {
           this.$message.error('错了哦,密码字数超过8个字');
           return false
         }
-      }
-      if (!that.form.name) {
-        this.$message.error('错了哦,姓名不能为空');
-        return false
-      }
-      if (that.form.name.length > 8) {
-        this.$message.error('错了哦,姓名字数超过8个字');
-        return false
-      }
-      // if (!that.form.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个字');
+        if (!that.form.name) {
+          this.$message.error('错了哦,姓名不能为空');
           return false
         }
-      }
+        if (that.form.name.length > 8) {
+          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,
-        userId: that.form.userId,
-        shopId: that.form.shopId,
-        usercode: that.form.userCode,
-        password: that.form.password,
-        name: that.form.name,
-        // phone: that.form.phone,
-        memo: that.form.memo,
-      };
-      let postdata = qs.stringify(param);
-      ShopManagerEdit(postdata).then(res => {
-        let json = res;
-        if (json.Code == 0) {
-          // 关闭弹窗
-          that.dialogVisible = false;
-          that.$message({
-            showClose: true,
-            message: '管理员信息修改成功!',
-            type: 'success'
-          });
+        let param = {
+          token: localStorage.token,
+          shopId: that.form.shopId,
+          usercode: that.form.userCode,
+          password: that.form.password,
+          name: that.form.name,
+          // phone: that.form.phone,
+          adminType: that.form.adminType,
+          memo: that.form.memo,
+        };
+        let postdata = qs.stringify(param);
+        ShopManagerAdd(postdata).then(res => {
+          let json = res;
+          if (json.Code == 0) {
+            // 关闭弹窗
+            that.dialogVisible = false;
+            that.$message({
+              showClose: true,
+              message: '管理员添加成功!',
+              type: 'success'
+            });
 
-          // 重载列表
-          that.getTableQuery();
-        } else {
-          that.$message.error(json.Memo + ' 错误码:' + json.Code);
+            // 重载列表
+            that.getTableQuery();
+          } else {
+            that.$message.error(json.Memo + ' 错误码:' + json.Code);
+          }
+        })
+      },
+      confirmEdit() {
+        // ShopManagerEdit
+        let that = this;
+        // checkNum
+        if (!that.form.userCode) {
+          this.$message.error('错了哦,登陆账号不能为空');
+          return false
         }
-      })
-    },
-    // 加载选项
-    panelSelect() {
-      let that = this;
-      let param = {
-        token: localStorage.token,
-      };
-      let postdata = qs.stringify(param);
-      ShopListQuery(postdata).then(res => {
-        let json = res;
-        if (json.Code == 0) {
-          if (json.Rs == '') {
-            that.$message.error('当前没有可选的店铺,请先在店面管理中添加店铺!');
+        if (that.form.name.length > 20) {
+          this.$message.error('错了哦,登陆账号字数超过20个字');
+          return false
+        }
+
+        // 密码有输入才检测,没输入默认传空不修改
+        if (that.form.password) {
+          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) {
+          this.$message.error('错了哦,姓名不能为空');
+          return false
+        }
+        if (that.form.name.length > 8) {
+          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
           }
-          that.panel.options = turnShopResToOption(json.Rs);
-          that.shops = turnShopResToOption(json.Rs);
-          that.form.shopId = json.Rs[0].ShopID;
-          that.panel.options.unshift({value: '', label: "全部"});
-        } else {
-          that.$message.error(json.Memo + ' 错误码:' + json.Code);
         }
-      })
-    },
-    // 删除
-    delList() {
-      let that = this;
-      if (this.tableRadio.length == 0) {
-        this.$message.error("请先选中一条记录");
-        return false
-      }
-      let userId = this.tableRadio.Id;
 
-      let param = {
-        token: localStorage.token,
-        userId: userId,
-        status: 9,//0禁用1启用9删除
-      };
-      let postdata = qs.stringify(param);
+        let param = {
+          token: localStorage.token,
+          userId: that.form.userId,
+          shopId: that.form.shopId,
+          usercode: that.form.userCode,
+          password: that.form.password,
+          name: that.form.name,
+          // phone: that.form.phone,
+          memo: that.form.memo,
+        };
+        let postdata = qs.stringify(param);
+        ShopManagerEdit(postdata).then(res => {
+          let json = res;
+          if (json.Code == 0) {
+            // 关闭弹窗
+            that.dialogVisible = false;
+            that.$message({
+              showClose: true,
+              message: '管理员信息修改成功!',
+              type: 'success'
+            });
 
-      this.$confirm('此操作将永久删除该管理员, 是否继续?', '提示', {
-        confirmButtonText: '确定',
-        cancelButtonText: '取消',
-        type: 'warning'
-      }).then(() => {
+            // 重载列表
+            that.getTableQuery();
+          } else {
+            that.$message.error(json.Memo + ' 错误码:' + json.Code);
+          }
+        })
+      },
+      // 加载选项
+      panelSelect() {
+        let that = this;
+        let param = {
+          token: localStorage.token,
+        };
+        let postdata = qs.stringify(param);
+        ShopListQuery(postdata).then(res => {
+          let json = res;
+          if (json.Code == 0) {
+            if (json.Rs == '') {
+              that.$message.error('当前没有可选的店铺,请先在店面管理中添加店铺!');
+              return false
+            }
+            that.panel.options = turnShopResToOption(json.Rs);
+            that.shops = turnShopResToOption(json.Rs);
+            that.form.shopId = json.Rs[0].ShopID;
+            that.panel.options.unshift({ value: '', label: "全部" });
+          } else {
+            that.$message.error(json.Memo + ' 错误码:' + json.Code);
+          }
+        })
+      },
+      // 删除
+      delList() {
+        let that = this;
+        if (this.tableRadio.length == 0) {
+          this.$message.error("请先选中一条记录");
+          return false
+        }
+        let userId = this.tableRadio.Id;
+
+        let param = {
+          token: localStorage.token,
+          userId: userId,
+          status: 9,//0禁用1启用9删除
+        };
+        let postdata = qs.stringify(param);
+
+        this.$confirm('此操作将永久删除该管理员, 是否继续?', '提示', {
+          confirmButtonText: '确定',
+          cancelButtonText: '取消',
+          type: 'warning'
+        }).then(() => {
+          ShopManagerStatusEdit(postdata).then(res => {
+            let json = res;
+            if (json.Code == 0) {
+              that.$message({
+                showClose: true,
+                message: '选中的管理员已删除!',
+                type: 'success'
+              });
+              // 重载列表
+              that.getTableQuery();
+            } else {
+              that.$message.error(json.Memo + ' 错误码:' + json.Code);
+            }
+          });
+        }).catch(() => {
+          this.$message({
+            type: 'info',
+            message: '已取消删除'
+          });
+        });
+      },
+      runAndPause(row, status) {
+        let that = this;
+        let param = {
+          token: localStorage.token,
+          userId: row.Id,
+          status: status,
+        };
+        let postdata = qs.stringify(param);
         ShopManagerStatusEdit(postdata).then(res => {
           let json = res;
           if (json.Code == 0) {
             that.$message({
               showClose: true,
-              message: '选中的管理员已删除!',
+              message: '管理员状态已修改成功!',
               type: 'success'
             });
             // 重载列表
@@ -515,272 +477,243 @@ export default {
           } else {
             that.$message.error(json.Memo + ' 错误码:' + json.Code);
           }
-        });
-      }).catch(() => {
-        this.$message({
-          type: 'info',
-          message: '已取消删除'
-        });
-      });
-    },
-    runAndPause(row, status) {
-      let that = this;
-      let param = {
-        token: localStorage.token,
-        userId: row.Id,
-        status: status,
-      };
-      let postdata = qs.stringify(param);
-      ShopManagerStatusEdit(postdata).then(res => {
-        let json = res;
-        if (json.Code == 0) {
-          that.$message({
-            showClose: true,
-            message: '管理员状态已修改成功!',
-            type: 'success'
-          });
-          // 重载列表
-          that.getTableQuery();
-        } else {
-          that.$message.error(json.Memo + ' 错误码:' + json.Code);
-        }
-      })
-    },
-    clearForm() {
-      // clear
-      this.form.shopId = 0;
-      this.form.name = '';
-      this.form.userCode = '';
-      this.form.password = '';
-      this.form.phone = '';
-      this.form.memo = '';
-    },
-    // 新增管理员
-    addAdmin() {
-      this.clearForm();
-      // 重载店面列表
-      this.panelSelect();
-      this.dialogVisible = true;
-      this.dialogTitle = '新增';
-      this.form.btnState = 0;
-    },
-    // 编辑管理员
-    editList() {
-      let that = this;
-      this.clearForm();
-      // 重载门店列表
-      this.panelSelect();
-      console.log(this.tableRadio);
-      if (this.tableRadio.length == 0) {
-        this.$message.error("请先选中一条记录");
-        return false
-      }
-      let row = this.tableRadio;
-      this.form.shopid = row.ShopId;
-      this.form.userId = row.Id;
-      this.form.name = row.Name;
-      this.form.userCode = row.Usercode;
-      this.form.password = '';
-      this.form.phone = row.Phone;
-      this.form.memo = row.Memo;
-      this.form.adminType = row.AdminType;
-      this.dialogVisible = true;
-      this.dialogTitle = '编辑';
-      this.form.btnState = 1;
-    },
-    handleSelectionChange(val) {
-      this.multipleSelection = val;
-    },
-    // 查询按钮
-    query() {
-      // 按钮倒计时
-      let that = this;
-      that.serachBtnStatus = true;
-      let totalTime = 2
-      let clock = window.setInterval(() => {
-        totalTime--
-        if (totalTime < 0) {
-          totalTime = 2;
-          that.serachBtnStatus = false;
+        })
+      },
+      clearForm() {
+        // clear
+        this.form.shopId = 0;
+        this.form.name = '';
+        this.form.userCode = '';
+        this.form.password = '';
+        this.form.phone = '';
+        this.form.memo = '';
+      },
+      // 新增管理员
+      addAdmin() {
+        this.clearForm();
+        // 重载店面列表
+        this.panelSelect();
+        this.dialogVisible = true;
+        this.dialogTitle = '新增';
+        this.form.btnState = 0;
+      },
+      // 编辑管理员
+      editList() {
+        let that = this;
+        this.clearForm();
+        // 重载门店列表
+        this.panelSelect();
+        console.log(this.tableRadio);
+        if (this.tableRadio.length == 0) {
+          this.$message.error("请先选中一条记录");
+          return false
         }
-      }, 1000)
-      this.getTableQuery();
-      this.$message.success('查询完毕');
-    },
-    // 页面数据查询
-    getTableQuery() {
-      let that = this;
-      that.loading = true;
-      let param = {
-        token: localStorage.token,
-        shopId: this.panel.shopId,
-        name: this.panel.name,
-        // phone: this.panel.phone,
-        adminType: this.panel.adminType,
-        start: 1,//
-        tableMax: 9999,//
-      };
-      let postdata = qs.stringify(param);
-      ShopManagerListQuery(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;
+        let row = this.tableRadio;
+        this.form.shopid = row.ShopId;
+        this.form.userId = row.Id;
+        this.form.name = row.Name;
+        this.form.userCode = row.Usercode;
+        this.form.password = '';
+        this.form.phone = row.Phone;
+        this.form.memo = row.Memo;
+        this.form.adminType = row.AdminType;
+        this.dialogVisible = true;
+        this.dialogTitle = '编辑';
+        this.form.btnState = 1;
+      },
+      handleSelectionChange(val) {
+        this.multipleSelection = val;
+      },
+      // 查询按钮
+      query() {
+        // 按钮倒计时
+        let that = this;
+        that.serachBtnStatus = true;
+        let totalTime = 2
+        let clock = window.setInterval(() => {
+          totalTime--
+          if (totalTime < 0) {
+            totalTime = 2;
+            that.serachBtnStatus = false;
+          }
+        }, 1000)
+        this.getTableQuery();
+        this.$message.success('查询完毕');
+      },
+      // 页面数据查询
+      getTableQuery() {
+        let that = this;
+        that.loading = true;
+        let param = {
+          token: localStorage.token,
+          shopId: this.panel.shopId,
+          name: this.panel.name,
+          // phone: this.panel.phone,
+          adminType: this.panel.adminType,
+          start: 1,//
+          tableMax: 9999,//
+        };
+        let postdata = qs.stringify(param);
+        ShopManagerListQuery(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.allTableData = [];
-            that.recordsTotal = 0;
+            that.$message.error(json.Memo + ' 错误码:' + json.Code);
           }
-          // 设置分页数据
-          that.setPaginations();
-        } else {
-          that.$message.error(json.Memo + ' 错误码:' + json.Code);
+        })
+      },
+      // 设置分页数据
+      setPaginations() {
+        // 分页属性
+        let that = this;
+        that.pageination.total = that.recordsTotal;
+        // 默认分页
+        that.tableData = that.allTableData.filter((item, index) => {
+          return index < that.pageination.pageItem;
+        });
+      },
+      // 每页显示数量
+      handleSizeChange() {
+        let that = this;
+        that.tableData = that.allTableData.filter((item, index) => {
+          return index < that.pageination.pageItem;
+        });
+        that.draw = that.pageination.pageItem;
+        that.getTableQuery();
+      },
+      // 翻页
+      pageChange(pageIndex) {
+        let that = this;
+        // 获取当前页
+        let index = that.pageination.pageItem * (pageIndex - 1);
+        // 数据总数
+        let nums = that.pageination.pageItem * pageIndex;
+        // 容器
+        let tables = [];
+        for (var i = index; i < nums; i++) {
+          if (that.allTableData[i]) {
+            tables.push(that.allTableData[i])
+          }
+          this.tableData = tables;
         }
-      })
-    },
-    // 设置分页数据
-    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();
+        that.start = index * that.draw;
+        // that.getTableQuery();
+      },
+      // 自动排序
+      sortChange(params) {
+        console.log(params)
+      },
+      // 过滤时间
+      filterFmtDate(value, row, column) {
+        let that = this;
+        return nonTfmtDate(column, 11);
+      },
+      // 过滤金额
+      filterMoney(value, row, column) {
+        let that = this;
+        return parseFloat(column).toFixed(2);
+      },
     },
-    // 翻页
-    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])
+    watch: {
+      $route(to) {
+        if (to.name == 'AdminManage') {
+          this.getShopListSelect();
+          this.getTableQuery();
         }
-        this.tableData = tables;
-      }
-      that.start = index * that.draw;
-      // that.getTableQuery();
-    },
-    // 自动排序
-    sortChange(params) {
-      console.log(params)
-    },
-    // 过滤时间
-    filterFmtDate(value, row, column) {
-      let that = this;
-      return nonTfmtDate(column, 11);
-    },
-    // 过滤金额
-    filterMoney(value, row, column) {
-      let that = this;
-      return parseFloat(column).toFixed(2);
-    },
-  },
-  watch: {
-    $route(to) {
-      if (to.name == 'AdminManage') {
-        this.getShopListSelect();
-        this.getTableQuery();
-      }
+      },
     },
-  },
-}
+  }
 </script>
 
 <style scoped>
-@import "../assets/css/panel.css";
+  @import "../assets/css/panel.css";
 
-.context {
-  /* height: 770px; */
-  overflow-y: scroll;
+  .context {
+    /* height: 770px; */
+    overflow-y: scroll;
 
-  display: block;
-  margin: 0 auto;
-  background-color: #fff !important;
-  padding: 30px;
-  padding-bottom: 60px;
-}
+    display: block;
+    margin: 0 auto;
+    background-color: #fff !important;
+    padding: 30px;
+    padding-bottom: 60px;
+  }
 
-.panel-body {
-  padding: 20px;
-  background: #F0F2F5;
-}
+  .panel-body {
+    padding: 20px;
+    background: #F0F2F5;
+  }
 
-.change {
-  width: 100%;
-  overflow: hidden;
-  display: block;
-  margin: 0 auto;
-  padding-top: 10px;
-  padding-bottom: 10px;
-}
+  .change {
+    width: 100%;
+    overflow: hidden;
+    display: block;
+    margin: 0 auto;
+    padding-top: 10px;
+    padding-bottom: 10px;
+  }
 
-.change button {
-  float: left;
-}
+  .change button {
+    float: left;
+  }
 
-.change button.pull-right {
-  float: right;
-}
+  .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 {
+    width: 100%;
+    overflow: hidden;
+    display: block;
+    margin: 0 auto;
+    color: #000000;
+    font-size: 18px;
+    text-align: center;
+  }
 
-.dialogTitle em {
-  float: none;
-  font-style: normal;
-  color: #3799FF;
-  margin: 0;
-}
+  .dialogTitle em {
+    float: none;
+    font-style: normal;
+    color: #3799FF;
+    margin: 0;
+  }
 
-/deep/ .el-transfer-panel__item .el-checkbox__input {
-  left: 40px;
-}
+  /deep/ .el-transfer-panel__item .el-checkbox__input {
+    left: 40px;
+  }
 
-.dialogFooter {
-  width: 90%;
-  overflow: hidden;
-  display: block;
-  margin: 0 auto;
-  margin-top: 10px;
-}
+  .dialogFooter {
+    width: 90%;
+    overflow: hidden;
+    display: block;
+    margin: 0 auto;
+    margin-top: 10px;
+  }
 
-.dialogFooter button {
-  float: right;
-  margin-left: 10px;
-}
+  .dialogFooter button {
+    float: right;
+    margin-left: 10px;
+  }
 
-/deep/ .el-dialog .el-select .el-input__inner {
-  width: 240px;
-}
+  /deep/ .el-dialog .el-select .el-input__inner {
+    width: 240px;
+  }
 
-/deep/ .el-dialog .el-select {
-  width: 530px;
-}
+  /deep/ .el-dialog .el-select {
+    width: 530px;
+  }
 
-/deep/ .el-dialog .el-select .el-input__inner {
-  width: 530px;
-}
-</style>
+  /deep/ .el-dialog .el-select .el-input__inner {
+    width: 530px;
+  }
+</style>

+ 7 - 6
pc/src/views/Lesson.vue

@@ -25,12 +25,10 @@
                         <el-radio v-model="tableRadio" :label="scope.row"><i></i></el-radio>
                     </template>
                 </el-table-column>
-                <el-table-column
-                        type="index"
-                        label="序号"
-                        align="center"
-
-                        width="50">
+                <el-table-column label="序号" type="index" width="50" align="center">
+                    <template scope="scope">
+                        <span>{{(start) + scope.$index + 1}}</span>
+                    </template>
                 </el-table-column>
                 <el-table-column
                         prop="ClassSelf.ClassName"
@@ -267,6 +265,8 @@
                 gridData: [],
                 dialogValue: [],
                 allTableData: [],
+                start: 0,
+                draw: 1,
                 // panel 配置项目
                 panel: {
                     usercode: '',
@@ -755,6 +755,7 @@
                     }
                     this.tableData = tables;
                 }
+
                 that.start = index * that.draw;
                 // that.getTableQuery();
             },

+ 55 - 104
pc/src/views/LessonTable.vue

@@ -9,81 +9,43 @@
             <el-button type="danger" @click="delList" size="mini">删除</el-button>
         </div>
         <div class="table">
-            <el-table
-                    :data="tableData"
-                    border
-                    is-horizontal-resize
-                    :default-sort="{prop: 'date', order: 'descending'}"
-                    element-loading-background="rgba(0, 0, 0, 0.8)"
-                    class=""
-                    @selection-change="handleSelectionChange"
-                    @current-change="clickChange"
->
-            >
+            <el-table :data="tableData" border is-horizontal-resize :default-sort="{prop: 'date', order: 'descending'}"
+                element-loading-background="rgba(0, 0, 0, 0.8)" class="" @selection-change="handleSelectionChange"
+                @current-change="clickChange">
+                >
                 <el-table-column label="选择" width="55">
-    <template slot-scope="scope">
-        <el-radio  v-model="tableRadio" :label="scope.row"><i></i></el-radio>
-    </template>
-</el-table-column>
-                <el-table-column
-                        type="index"
-                        label="序号"
-                        align="center"
-
-                        width="50">
+                    <template slot-scope="scope">
+                        <el-radio v-model="tableRadio" :label="scope.row"><i></i></el-radio>
+                    </template>
                 </el-table-column>
-                <el-table-column
-                        prop="PlanName"
-                        label="课程表模板名称"
-                >
+                <el-table-column label="序号" type="index" width="50" align="center">
+                    <template scope="scope">
+                        <span>{{(start) + scope.$index + 1}}</span>
+                    </template>
+                </el-table-column>
+                <el-table-column prop="PlanName" label="课程表模板名称">
                     <template slot-scope="scope">
                         <span class="link" @click="goEdit(scope.row)">
-                               {{scope.row.PlanName}}
+                            {{scope.row.PlanName}}
                         </span>
-
                     </template>
                 </el-table-column>
-                <el-table-column
-                        prop="CreateColumn.CreatedAt"
-                        label="最后编辑时间"
-                        :formatter="filterFmtDate"
-                        sortable
-                >
+                <el-table-column prop="CreateColumn.CreatedAt" label="最后编辑时间" :formatter="filterFmtDate" sortable>
                 </el-table-column>
-                <el-table-column
-                        prop="ShopId"
-                        label="是否跨店"
-                        sortable
-                >
+                <el-table-column prop="ShopId" label="是否跨店" sortable>
                     <template slot-scope="scope">
-                        <el-switch
-                                v-model="scope.row.allUse"
-                                :active-value="0"
-                                :inactive-value="switchTurn"
-                                active-color="#409EFF"
-                                inactive-color="#D9D9D9"
-                                @change=changeShopId($event,scope.row)
-                        >
+                        <el-switch v-model="scope.row.allUse" :active-value="0" :inactive-value="switchTurn"
+                            active-color="#409EFF" inactive-color="#D9D9D9" @change=changeShopId($event,scope.row)>
                         </el-switch>
                     </template>
                 </el-table-column>
-                <el-table-column
-                        prop="Status"
-                        label="状态"
-                        width="110"
-                        align="center"
-                        sortable
-                >
+                <el-table-column prop="Status" label="状态" width="110" align="center" sortable>
                     <template slot-scope="scope">
                         <span v-if="scope.row.Status == 2">已发布</span>
                         <span v-if="scope.row.Status == 1">未发布</span>
                     </template>
                 </el-table-column>
-                <el-table-column
-                        prop="Status"
-                        label="操作"
-                        width=220px
-                >
+                <el-table-column prop="Status" label="操作" width=220px>
                     <template slot-scope="scope">
                         <el-button type="text" @click="goEdit(scope.row)">编辑</el-button>
                         <el-button type="text" @click="seeWeek(scope.row)">预览本周</el-button>
@@ -94,12 +56,8 @@
 
             </el-table>
             <br>
-            <el-pagination
-                    background
-                    :total="pageination.total"
-                    :page-size="pageination.pageItem"
-                    @current-change="pageChange"
-            ></el-pagination>
+            <el-pagination background :total="pageination.total" :page-size="pageination.pageItem"
+                @current-change="pageChange"></el-pagination>
         </div>
 
         <el-dialog title="课程表模板复制" :visible.sync="dialogCopyVisible" width="640px">
@@ -123,25 +81,16 @@
                 <span class="demonstration">选择发布日期(按周选取)</span>
                 <br>
                 <br>
-                <el-date-picker
-                        v-model="form.week"
-                        type="week"
-                        :picker-options="{'firstDayOfWeek': 1}"
-                        format="yyyy 第 WW 周"
-                        placeholder="选择周"
-                >
+                <el-date-picker v-model="form.week" type="week" :picker-options="{'firstDayOfWeek': 1}"
+                    format="yyyy 第 WW 周" placeholder="选择周">
                 </el-date-picker>
                 <br>
                 <br>
                 <span>
                     微信可预约
                 </span>
-                <el-switch
-                        v-model="form.appoint"
-                        :active-value="1"
-                        :inactive-value="0"
-                        active-color="#409EFF"
-                        inactive-color="#D9D9D9">
+                <el-switch v-model="form.appoint" :active-value="1" :inactive-value="0" active-color="#409EFF"
+                    inactive-color="#D9D9D9">
                 </el-switch>
             </div>
             <div class="dialogFooter">
@@ -179,7 +128,7 @@
         data() {
             return {
                 previewShow: false,
-                switchTurn:localStorage.shopId,
+                switchTurn: localStorage.shopId,
                 previewDate: {},
                 BigTitle: '',
                 smallTitle: '',
@@ -188,6 +137,8 @@
                 previewVisible: false,//todo
                 dialogdata: [],
                 dialogValue: [],
+                start: 0,
+                draw: 1,
                 // panel 配置项目
                 multipleSelection: [],
                 pageination: {
@@ -215,7 +166,7 @@
             this.getTableQuery();
         },
         methods: {
-            clickChange (item) {
+            clickChange(item) {
                 this.tableRadio = item
             },
             seeWeek(row) {
@@ -244,12 +195,12 @@
             changeShopId(e, row) {
                 let that = this;
                 let shopId = 0;
-                if(e != 0){
-                    shopId =  localStorage.shopId;
-                    row.allUse =  localStorage.shopId;
-                }else{
+                if (e != 0) {
+                    shopId = localStorage.shopId;
+                    row.allUse = localStorage.shopId;
+                } else {
                     shopId = 0;
-                    row.allUse =  0
+                    row.allUse = 0
                 }
 
                 let param = {
@@ -283,7 +234,7 @@
             // 删除
             delList() {
                 let that = this;
-                if(this.tableRadio.length == 0){
+                if (this.tableRadio.length == 0) {
                     this.$message.error("请先选中一条记录");
                     return false
                 }
@@ -324,7 +275,7 @@
             },
             copyDialog() {
                 let that = this;
-                if(this.tableRadio.length == 0){
+                if (this.tableRadio.length == 0) {
                     this.$message.error("请先选中一条记录");
                     return false
                 }
@@ -357,22 +308,22 @@
                 //     cancelButtonText: '取消',
                 //     type: 'warning'
                 // }).then(() => {
-                    SttPlanCopy(postdata).then(res => {
-                        let json = res;
-                        if (json.Code == 0) {
-                            that.$message({
-                                showClose: true,
-                                message: '选中的课程表已复制!',
-                                type: 'success'
-                            });
-                            // 关闭弹窗
-                            that.dialogCopyVisible = false;
-                            // 重载列表
-                            that.getTableQuery();
-                        } else {
-                            that.$message.error(json.Memo + ' 错误码:' + json.Code);
-                        }
-                    });
+                SttPlanCopy(postdata).then(res => {
+                    let json = res;
+                    if (json.Code == 0) {
+                        that.$message({
+                            showClose: true,
+                            message: '选中的课程表已复制!',
+                            type: 'success'
+                        });
+                        // 关闭弹窗
+                        that.dialogCopyVisible = false;
+                        // 重载列表
+                        that.getTableQuery();
+                    } else {
+                        that.$message.error(json.Memo + ' 错误码:' + json.Code);
+                    }
+                });
                 // }).catch(() => {
                 //     this.$message({
                 //         type: 'info',
@@ -472,7 +423,7 @@
                         that.loading = false;
                         if (json.Rs) {
                             json.Rs.map(function (item) {
-                                item.allUse =  item.ShopId > 0 ? 1 :0
+                                item.allUse = item.ShopId > 0 ? 1 : 0
                             })
                             that.allTableData = json.Rs;
                             that.recordsTotal = json.Rs.length;
@@ -638,4 +589,4 @@
     em {
         font-style: normal;
     }
-</style>
+</style>

+ 310 - 373
pc/src/views/Log.vue

@@ -7,39 +7,27 @@
           <el-row :gutter="20">
             <el-col :span="7">
               <em>时间:</em>
-              <el-date-picker
-                  v-model="panel.timeScope"
-                  type="daterange"
-                  range-separator="至"
-                  start-placeholder="开始日期"
-                  end-placeholder="结束日期">
+              <el-date-picker v-model="panel.timeScope" type="daterange" range-separator="至" start-placeholder="开始日期"
+                end-placeholder="结束日期">
               </el-date-picker>
             </el-col>
             <el-col :span="4">
               <em>店面:</em>
               <el-select v-model="panel.shopId">
-                <el-option
-                    v-for="item in panel.shopOptions"
-                    :key="item.value"
-                    :label="item.label"
-                    :value="item.value">
+                <el-option v-for="item in panel.shopOptions" :key="item.value" :label="item.label" :value="item.value">
                 </el-option>
               </el-select>
             </el-col>
             <el-col :span="4">
               <em>操作者:</em>
               <el-select v-model="panel.userId">
-                <el-option
-                    v-for="item in panel.options"
-                    :key="item.value"
-                    :label="item.label"
-                    :value="item.value">
+                <el-option v-for="item in panel.options" :key="item.value" :label="item.label" :value="item.value">
                 </el-option>
               </el-select>
             </el-col>
             <el-col :span="4">
               <em>手机号:</em>
-              <el-input v-model="panel.phone"  placeholder="请输入手机号" type="number" ></el-input>
+              <el-input v-model="panel.phone" placeholder="请输入手机号" type="number"></el-input>
             </el-col>
             <el-col :span="4">
               <el-button size="" type="primary" @click="query" plain :disabled="serachBtnStatus">查询</el-button>
@@ -49,409 +37,358 @@
       </div>
     </div>
     <div class="table">
-      <el-table
-          :data="tableData"
-          border
-          is-horizontal-resize
-          :default-sort="{prop: 'date', order: 'descending'}"
-          element-loading-background="rgba(0, 0, 0, 0.8)"
-          class=""
-      >
-        <el-table-column
-            type="index"
-            label="序号"
-            align="center"
-            width="50">
+      <el-table :data="tableData" border is-horizontal-resize :default-sort="{prop: 'date', order: 'descending'}"
+        element-loading-background="rgba(0, 0, 0, 0.8)" class="">
+        <el-table-column label="序号" type="index" width="50" align="center">
+          <template scope="scope">
+            <span>{{(start) + scope.$index + 1}}</span>
+          </template>
         </el-table-column>
-        <el-table-column
-            prop="CreatedAt"
-            label="日期"
-            :formatter="filterFmtDate"
-            width="180"
-            sortable
-        >
+        <el-table-column prop="CreatedAt" label="日期" :formatter="filterFmtDate" width="180" sortable>
         </el-table-column>
-        <el-table-column
-            prop="OptName"
-            label="操作者"
-            sortable
-            width="120"
-        >
+        <el-table-column prop="OptName" label="操作者" sortable width="120">
         </el-table-column>
-        <el-table-column
-            prop="OptShop"
-            label="所属店铺"
-            sortable
-            width="120"
-        >
+        <el-table-column prop="OptShop" label="所属店铺" sortable width="120">
         </el-table-column>
-        <el-table-column
-            prop="OptPhone"
-            label="手机号"
-            width="120"
-            sortable
-        >
+        <el-table-column prop="OptPhone" label="手机号" width="120" sortable>
         </el-table-column>
-        <el-table-column
-            prop="Parameter"
-            label="执行语句"
-            sortable
-        >
+        <el-table-column prop="Parameter" label="执行语句" sortable>
           <template slot-scope="scope">
-            <el-popover
-                placement="top"
-                title="具体语句"
-                trigger="hover"
-                :content="scope.row.Parameter">
-                            <span slot="reference"
-                                  v-if="scope.row.Parameter.length > 40">{{ scope.row.Parameter.substr(0, 40) }} ....</span>
+            <el-popover placement="top" title="具体语句" trigger="hover" :content="scope.row.Parameter">
+              <span slot="reference" v-if="scope.row.Parameter.length > 40">{{ scope.row.Parameter.substr(0, 40) }}
+                ....</span>
             </el-popover>
             <span v-if="scope.row.Parameter.length <= 40">{{ scope.row.Parameter }}</span>
           </template>
         </el-table-column>
-        <el-table-column
-            prop="OptInfo"
-            label="操作信息"
-            sortable
-        >
-            <template slot-scope="scope">
-                <el-popover
-                        placement="top"
-                        title="具体语句"
-                        trigger="hover"
-                        :content="scope.row.OptInfo">
-                            <span slot="reference"
-                                  v-if="scope.row.OptInfo.length > 30">{{ scope.row.OptInfo.substr(0, 30) }} ....</span>
-                </el-popover>
-                <span v-if="scope.row.OptInfo.length <= 30">{{ scope.row.OptInfo }}</span>
-            </template>
+        <el-table-column prop="OptInfo" label="操作信息" sortable>
+          <template slot-scope="scope">
+            <el-popover placement="top" title="具体语句" trigger="hover" :content="scope.row.OptInfo">
+              <span slot="reference" v-if="scope.row.OptInfo.length > 30">{{ scope.row.OptInfo.substr(0, 30) }}
+                ....</span>
+            </el-popover>
+            <span v-if="scope.row.OptInfo.length <= 30">{{ scope.row.OptInfo }}</span>
+          </template>
         </el-table-column>
-        <el-table-column
-            prop="Result"
-            label="操作结果"
-            width="120"
-            sortable
-        >
+        <el-table-column prop="Result" label="操作结果" width="120" sortable>
         </el-table-column>
       </el-table>
       <br>
-      <el-pagination
-          background
-          :total="pageination.total"
-          :page-size="pageination.pageItem"
-          @current-change="pageChange"
-      ></el-pagination>
+      <el-pagination background :total="pageination.total" :page-size="pageination.pageItem"
+        @current-change="pageChange"></el-pagination>
     </div>
 
   </div>
 </template>
 
 <script>
-import Global from '../Global.js'
-import {
-  OptLogListQuery,
-  testTable,
-  testSelect, ShopManagerListQuery, ShopListQuery
-} from "../api/getApiRes";
+  import Global from '../Global.js'
+  import {
+    OptLogListQuery,
+    testTable,
+    testSelect, ShopManagerListQuery, ShopListQuery
+  } from "../api/getApiRes";
 
-let qs = require('qs');
-export default {
-  data() {
-    return {
-      dialogVisible: false,
-      dialogTitle: '新增管理员',
-      times: globalBt2(7),
-      // panel 配置项目
-      panel: {
-        userCode: '',
-        tel: '',
-        userId: '',
-        shopList: 0,
-        shopId: '',
-        options: [],
-        shopOptions: [],
-        draw: 1,
+  let qs = require('qs');
+  export default {
+    data() {
+      return {
+        dialogVisible: false,
+        dialogTitle: '新增管理员',
+        times: globalBt2(7),
         start: 0,
-        recordsTotal: 0,
-        tableData: [],
-        allTableData: [],
-        limit: '10',
-        multipleSort: false,
-        loading: false,
-        fileList: [],
+        draw: 1,
+        // panel 配置项目
+        panel: {
+          userCode: '',
+          tel: '',
+          userId: '',
+          shopList: 0,
+          shopId: '',
+          options: [],
+          shopOptions: [],
+          draw: 1,
+          start: 0,
+          recordsTotal: 0,
+          tableData: [],
+          allTableData: [],
+          limit: '10',
+          multipleSort: false,
+          loading: false,
+          fileList: [],
+          multipleSelection: [],
+          detectedmac: '',
+          time1: globalBt(),
+          timeScope: globalBt2(0),
+        },
         multipleSelection: [],
-        detectedmac: '',
-        time1: globalBt(),
-        timeScope: globalBt2(0),
+        pageination: {
+          pageItem: 10,
+          pageoptions: pageOptions(),
+          total: 100,
+          pageIndex: 1,
+        },
+        form: {
+          name: '',
+          userCode: '',
+          shopId: '',
+        },
+        shops: [],
+        tableData: [],
+        serachBtnStatus: false,
+      }
+    },
+    mounted() {
+      this.panelSelect();
+      this.shopPanelSelect();
+      this.getTableQuery();
+    },
+    methods: {
+      shopPanelSelect() {
+        let that = this;
+        let param = {
+          token: localStorage.token,
+        };
+        let postdata = qs.stringify(param);
+        ShopListQuery(postdata).then(res => {
+          let json = res;
+          if (json.Code == 0) {
+            if (json.Rs == '') {
+              that.$message.error('当前没有可选的店铺,请先在店面管理中添加店铺!');
+              return false
+            }
+            that.panel.shopOptions = turnShopResToOption(json.Rs);
+            that.panel.shopOptions.unshift({ value: '', label: "全部" });
+          } else {
+            that.$message.error(json.Memo + ' 错误码:' + json.Code);
+          }
+        })
+      },
+      // 加载选项
+      panelSelect() {
+        let that = this;
+        let param = {
+          token: localStorage.token,
+          start: 1,
+          tableMax: 999,
+        };
+        let postdata = qs.stringify(param);
+        ShopManagerListQuery(postdata).then(res => {
+          let json = res;
+          if (json.Code == 0) {
+            that.panel.options = this.turnResToOptionByUsers(json.Rs);
+            that.panel.options.unshift({ value: '', label: "全部" });
+            console.log(that.panel.options);
+          } else {
+            that.$message.error(json.Memo + ' 错误码:' + json.Code);
+          }
+        })
+      },
+      turnResToOptionByUsers(data) {
+        if (!data) return false
+        let ids = data.map(item => {
+          return {
+            label: item.Name + ' ' + item.Phone,
+            key: parseInt(item.Id),
+            value: parseInt(item.Id),
+          }
+        })
+        return ids
       },
-      multipleSelection: [],
-      pageination: {
-        pageItem: 10,
-        pageoptions: pageOptions(),
-        total: 100,
-        pageIndex: 1,
+      clearForm() {
+        // clear
+        this.form.name = '';
+        this.form.userCode = '';
+        this.form.shopId = '';
       },
-      form: {
-        name: '',
-        userCode: '',
-        shopId: '',
+      handleSelectionChange(val) {
+        this.multipleSelection = val;
       },
-      shops: [],
-      tableData: [],
-      serachBtnStatus: false,
-    }
-  },
-  mounted() {
-    this.panelSelect();
-    this.shopPanelSelect();
-    this.getTableQuery();
-  },
-  methods: {
-    shopPanelSelect(){
-      let that = this;
-      let param = {
-        token: localStorage.token,
-      };
-      let postdata = qs.stringify(param);
-      ShopListQuery(postdata).then(res => {
-        let json = res;
-        if (json.Code == 0) {
-          if (json.Rs == '') {
-            that.$message.error('当前没有可选的店铺,请先在店面管理中添加店铺!');
-            return false
+      // 查询按钮
+      query() {
+        // 按钮倒计时
+        let that = this;
+        that.serachBtnStatus = true;
+        let totalTime = 2
+        let clock = window.setInterval(() => {
+          totalTime--
+          if (totalTime < 0) {
+            totalTime = 2;
+            that.serachBtnStatus = false;
           }
-          that.panel.shopOptions = turnShopResToOption(json.Rs);
-          that.panel.shopOptions.unshift({value: '', label: "全部"});
-        } else {
-          that.$message.error(json.Memo + ' 错误码:' + json.Code);
-        }
-      })
-    },
-    // 加载选项
-    panelSelect() {
-      let that = this;
-      let param = {
-        token: localStorage.token,
-        start: 1,
-        tableMax: 999,
-      };
-      let postdata = qs.stringify(param);
-      ShopManagerListQuery(postdata).then(res => {
-        let json = res;
-        if (json.Code == 0) {
-          that.panel.options = this.turnResToOptionByUsers(json.Rs);
-          that.panel.options.unshift({value: '', label: "全部"});
-          console.log(that.panel.options);
-        } else {
-          that.$message.error(json.Memo + ' 错误码:' + json.Code);
-        }
-      })
-    },
-    turnResToOptionByUsers(data) {
-      if (!data) return false
-      let ids = data.map(item => {
-        return {
-          label: item.Name + ' ' + item.Phone,
-          key: parseInt(item.Id),
-          value: parseInt(item.Id),
-        }
-      })
-      return ids
-    },
-    clearForm() {
-      // clear
-      this.form.name = '';
-      this.form.userCode = '';
-      this.form.shopId = '';
-    },
-    handleSelectionChange(val) {
-      this.multipleSelection = val;
-    },
-    // 查询按钮
-    query() {
-      // 按钮倒计时
-      let that = this;
-      that.serachBtnStatus = true;
-      let totalTime = 2
-      let clock = window.setInterval(() => {
-        totalTime--
-        if (totalTime < 0) {
-          totalTime = 2;
-          that.serachBtnStatus = false;
-        }
-      }, 1000)
+        }, 1000)
 
-      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,
-        name: this.panel.name,
-        phone: this.panel.phone,
-        userId: this.panel.userId,
-        bt: nonTfmtDatetoLength(that.panel.timeScope[0], 10) + " 00:00:00",
-        et: nonTfmtDatetoLength(that.panel.timeScope[1], 10) + " 23:59:59",
-        start: 1,//
-        tableMax: 9999,//
-        optShopId:this.panel.shopId,
-      };
-      let postdata = qs.stringify(param);
-      OptLogListQuery(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;
+        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,
+          name: this.panel.name,
+          phone: this.panel.phone,
+          userId: this.panel.userId,
+          bt: nonTfmtDatetoLength(that.panel.timeScope[0], 10) + " 00:00:00",
+          et: nonTfmtDatetoLength(that.panel.timeScope[1], 10) + " 23:59:59",
+          start: 1,//
+          tableMax: 9999,//
+          optShopId: this.panel.shopId,
+        };
+        let postdata = qs.stringify(param);
+        OptLogListQuery(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.allTableData = [];
-            that.recordsTotal = 0;
+            that.$message.error(json.Memo + ' 错误码:' + json.Code);
           }
-          // 设置分页数据
-          that.setPaginations();
-        } else {
-          that.$message.error(json.Memo + ' 错误码:' + json.Code);
-        }
-      })
-    },
-    // 设置分页数据
-    setPaginations() {
-      // 分页属性
-      let that = this;
-      that.pageination.total = that.recordsTotal;
-      // 默认分页
-      that.tableData = that.allTableData.filter((item, index) => {
-        return index < that.pageination.pageItem;
-      });
-    },
-    // 每页显示数量
-    handleSizeChange() {
-      let that = this;
-      that.tableData = that.allTableData.filter((item, index) => {
-        return index < that.pageination.pageItem;
-      });
-      that.draw = that.pageination.pageItem;
-      that.getTableQuery();
-    },
-    // 翻页
-    pageChange(pageIndex) {
-      let that = this;
-      // 获取当前页
-      let index = that.pageination.pageItem * (pageIndex - 1);
-      // 数据总数
-      let nums = that.pageination.pageItem * pageIndex;
-      // 容器
-      let tables = [];
-      for (var i = index; i < nums; i++) {
-        if (that.allTableData[i]) {
-          tables.push(that.allTableData[i])
+        })
+      },
+      // 设置分页数据
+      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;
         }
-        this.tableData = tables;
-      }
-      that.start = index * that.draw;
-      // that.getTableQuery();
-    },
-    // 自动排序
-    sortChange(params) {
-      console.log(params)
-    },
-    // 过滤时间
-    filterFmtDate(value, row, column) {
-      let that = this;
-      return nonTfmtDate(column, 11);
+        that.start = index * that.draw;
+        // that.getTableQuery();
+      },
+      // 自动排序
+      sortChange(params) {
+        console.log(params)
+      },
+      // 过滤时间
+      filterFmtDate(value, row, column) {
+        let that = this;
+        return nonTfmtDate(column, 11);
+      },
     },
-  },
-}
+  }
 </script>
 
 <style scoped>
-@import "../assets/css/panel.css";
+  @import "../assets/css/panel.css";
 
-.context {
-  /* height: 770px; */
-  overflow-y: scroll;
+  .context {
+    /* height: 770px; */
+    overflow-y: scroll;
 
-  display: block;
-  margin: 0 auto;
-  background-color: #fff !important;
-  padding: 30px;
-  padding-bottom: 60px;
-}
+    display: block;
+    margin: 0 auto;
+    background-color: #fff !important;
+    padding: 30px;
+    padding-bottom: 60px;
+  }
 
-.panel-body {
-  padding: 20px;
-  background: #F0F2F5;
-}
+  .panel-body {
+    padding: 20px;
+    background: #F0F2F5;
+  }
 
-.change {
-  width: 100%;
-  overflow: hidden;
-  display: block;
-  margin: 0 auto;
-  padding-top: 10px;
-  padding-bottom: 10px;
-}
+  .change {
+    width: 100%;
+    overflow: hidden;
+    display: block;
+    margin: 0 auto;
+    padding-top: 10px;
+    padding-bottom: 10px;
+  }
 
-.change button {
-  float: left;
-}
+  .change button {
+    float: left;
+  }
 
-.change button.pull-right {
-  float: right;
-}
+  .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 {
+    width: 100%;
+    overflow: hidden;
+    display: block;
+    margin: 0 auto;
+    color: #000000;
+    font-size: 18px;
+    text-align: center;
+  }
 
-.dialogTitle em {
-  float: none;
-  font-style: normal;
-  color: #3799FF;
-  margin: 0;
-}
+  .dialogTitle em {
+    float: none;
+    font-style: normal;
+    color: #3799FF;
+    margin: 0;
+  }
 
-/deep/ .el-transfer-panel__item .el-checkbox__input {
-  left: 40px;
-}
+  /deep/ .el-transfer-panel__item .el-checkbox__input {
+    left: 40px;
+  }
 
-.dialogFooter {
-  width: 90%;
-  overflow: hidden;
-  display: block;
-  margin: 0 auto;
-  margin-top: 10px;
-}
+  .dialogFooter {
+    width: 90%;
+    overflow: hidden;
+    display: block;
+    margin: 0 auto;
+    margin-top: 10px;
+  }
 
-.dialogFooter button {
-  float: right;
-  margin-left: 10px;
-}
+  .dialogFooter button {
+    float: right;
+    margin-left: 10px;
+  }
 
-/deep/ .el-date-editor .el-range__icon {
-  line-height: 22px;
-}
+  /deep/ .el-date-editor .el-range__icon {
+    line-height: 22px;
+  }
 
-.panel /deep/ .el-date-editor .el-range-separator {
-  line-height: 22px;
-}
-/*ipad only*/
-@media only screen and (max-width: 1366px) {
-  .panel /deep/ .el-date-editor--daterange {
-    width: 100%;
+  .panel /deep/ .el-date-editor .el-range-separator {
+    line-height: 22px;
   }
-}
 
-</style>
+  /*ipad only*/
+  @media only screen and (max-width: 1366px) {
+    .panel /deep/ .el-date-editor--daterange {
+      width: 100%;
+    }
+  }
+</style>

+ 95 - 198
pc/src/views/Member.vue

@@ -16,22 +16,16 @@
                         <el-col :span="5">
                             <em>会员类型:</em>
                             <el-select v-model="panel.vipType">
-                                <el-option
-                                        v-for="item in panel.vipOptions"
-                                        :key="item.value"
-                                        :label="item.label"
-                                        :value="item.value">
+                                <el-option v-for="item in panel.vipOptions" :key="item.value" :label="item.label"
+                                    :value="item.value">
                                 </el-option>
                             </el-select>
                         </el-col>
                         <el-col :span="5">
                             <em>到期日:</em>
                             <el-select v-model="panel.expDay">
-                                <el-option
-                                        v-for="item in panel.endTypeOptions"
-                                        :key="item.value"
-                                        :label="item.label"
-                                        :value="item.value">
+                                <el-option v-for="item in panel.endTypeOptions" :key="item.value" :label="item.label"
+                                    :value="item.value">
                                 </el-option>
                             </el-select>
                         </el-col>
@@ -53,128 +47,70 @@
             <!--            <el-button class="pull-right" icon="el-icon-position">导出</el-button>-->
         </div>
         <div class="table">
-            <el-table
-                    :data="tableData"
-                    border
-                    is-horizontal-resize
-                    :default-sort="{prop: 'date', order: 'descending'}"
-                    element-loading-background="rgba(0, 0, 0, 0.8)"
-                    @selection-change="handleSelectionChange" @current-change="clickChange"
-            >
+            <el-table :data="tableData" border is-horizontal-resize :default-sort="{prop: 'date', order: 'descending'}"
+                element-loading-background="rgba(0, 0, 0, 0.8)" @selection-change="handleSelectionChange"
+                @current-change="clickChange">
                 >
                 <el-table-column label="选择" width="55">
                     <template slot-scope="scope">
                         <el-radio v-model="tableRadio" :label="scope.row"><i></i></el-radio>
                     </template>
                 </el-table-column>
-                <el-table-column
+                <!-- <el-table-column
                         type="index"
                         label="序号"
                         align="center"
                         width="50"
                 >
+                </el-table-column> -->
+                <el-table-column label="序号" type="index" width="50" align="center">
+                    <template scope="scope">
+                        <span>{{(start) + scope.$index + 1}}</span>
+                    </template>
                 </el-table-column>
-                <el-table-column
-                        prop="UserInfo.head"
-                        label="头像"
-                        width="50"
-                >
+                <el-table-column prop="UserInfo.Name" label="会员名" width="90">
+                </el-table-column>
+                <el-table-column prop="UserInfo.Phone" label="手机号" width="110" sortable>
+                </el-table-column>
+                <el-table-column prop="UserInfo.head" label="头像" width="50">
                     <template slot-scope="scope">
                         <div class="demo-image__preview" v-if="scope.row.UserInfo.Head">
-                            <el-image
-                                    style="width: 25px; height: 25px"
-                                    :src="scope.row.UserInfo.Head"
-                                    :preview-src-list="[scope.row.UserInfo.Head]"
-
-                            >
+                            <el-image style="width: 25px; height: 25px" :src="scope.row.UserInfo.Head"
+                                :preview-src-list="[scope.row.UserInfo.Head]">
                             </el-image>
                         </div>
                         <img src="../assets/img/nav/head.png" alt="" v-else width="25px" height="25px">
                     </template>
                 </el-table-column>
-                <el-table-column
-                        prop="UserInfo.Name"
-                        label="会员名"
-                        width="90"
-                >
-                </el-table-column>
-                <el-table-column
-                        prop="UserInfo.Phone"
-                        label="手机号"
-                        width="110"
-                        sortable
-                >
-                </el-table-column>
-                <el-table-column
-                        prop="UserInfo.VipType"
-                        label="类型"
-                        align="center"
-                        width="80px"
-                        sortable
-                >
+                <el-table-column prop="UserInfo.VipType" label="类型" align="center" width="80px" sortable>
                     <template slot-scope="scope">
                         <span v-if="scope.row.UserInfo.VipType == 1">年费</span>
                         <span v-if="scope.row.UserInfo.VipType == 2">充值</span>
                     </template>
                 </el-table-column>
-                <el-table-column
-                        prop="UserInfo.ExpTime"
-                        label="会员有效期"
-                        width="115"
-                        :formatter="filterFmtDate"
-                        sortable
-                >
+                <el-table-column prop="UserInfo.ExpTime" label="会员有效期" width="115" :formatter="filterFmtDate" sortable>
                 </el-table-column>
-                <el-table-column
-                        prop="UserInfo.RemainNormalhour"
-                        label="剩余课时"
-                        width="105"
-                        sortable
-                >
+                <el-table-column prop="UserInfo.RemainNormalhour" label="剩余课时" width="105" sortable>
                 </el-table-column>
-                <el-table-column
-                        prop="UserInfo.RemainGifthour"
-                        label="剩余赠送"
-                        width="105"
-                        sortable
-                >
+                <el-table-column prop="UserInfo.RemainGifthour" label="剩余赠送" width="105" sortable>
                 </el-table-column>
-                <el-table-column
-                        prop="UserInfo.ConsumeNormalhour"
-                        label="消费课时"
-                        width="105"
-                        sortable
-                >
+                <el-table-column prop="UserInfo.ConsumeNormalhour" label="消费课时" width="105" sortable>
                 </el-table-column>
-                <el-table-column
-                        prop="UserInfo.ConsumeGifthour"
-                        label="消费赠送"
-                        width="105"
-                        sortable
-                >
+                <el-table-column prop="UserInfo.ConsumeGifthour" label="消费赠送" width="105" sortable>
                 </el-table-column>
-                <el-table-column
-                        prop="ClassInfo"
-                        label="会员课程"
-                        width="220px"
-                >
+                <el-table-column prop="ClassInfo" label="会员课程" width="220px">
                     <template slot-scope="scope">
                         <span class="lessonSpan" :style="{background:lesson.ClassColor}"
-                              v-for="lesson in scope.row.ClassInfo">{{ lesson.ClassName }}</span>
+                            v-for="lesson in scope.row.ClassInfo">{{ lesson.ClassName }}</span>
                     </template>
                 </el-table-column>
-                <el-table-column
-                        prop="UserInfo.IsAcross"
-                        label="跨店会员"
-                        width="105"
-                        sortable
-                >
+                <el-table-column prop="UserInfo.IsAcross" label="跨店会员" width="105" sortable>
                     <template slot-scope="scope">
-                        <span v-if="scope.row.UserInfo.IsAcross == 0"  class="green">本店用户</span>
-                        <span v-else  class="red">跨店用户</span>
+                        <span v-if="scope.row.UserInfo.IsAcross == 0" class="green">本店用户</span>
+                        <span v-else class="red">跨店用户</span>
                     </template>
                 </el-table-column>
-                <el-table-column
+                <!-- <el-table-column
                         prop="TakeId"
                         label="Take绑定"
                         width="105"
@@ -184,63 +120,48 @@
                         <span v-if="scope.row.UserInfo.TakeId == 0" class="red">未绑定</span>
                         <span v-else>已绑定</span>
                     </template>
-                </el-table-column>
-                <el-table-column
-                        prop="UserInfo.Memo"
-                        label="备注">
+                </el-table-column> -->
+                <el-table-column prop="UserInfo.Memo" label="备注">
                     <template slot-scope="scope">
-                        <el-popover
-                                placement="top"
-                                title=""
-                                width="200"
-                                trigger="hover"
-                                :content="scope.row.UserInfo.Memo">
-                            <span slot="reference"
-                                  v-if="scope.row.UserInfo.Memo.length > 6">{{ scope.row.UserInfo.Memo.substr(0, 6) }} ....</span>
+                        <el-popover placement="top" title="" width="200" trigger="hover"
+                            :content="scope.row.UserInfo.Memo">
+                            <span slot="reference" v-if="scope.row.UserInfo.Memo.length > 6">{{
+                                scope.row.UserInfo.Memo.substr(0, 6) }} ....</span>
                         </el-popover>
                         <span v-if="scope.row.UserInfo.Memo.length <= 6">{{ scope.row.UserInfo.Memo }}</span>
                     </template>
                 </el-table-column>
-                <el-table-column
-                        prop="UserInfo.Status"
-                        label="操作"
-                        width="160px"
-                >
+                <el-table-column prop="UserInfo.Status" label="操作" width="120px">
                     <template slot-scope="scope">
                         <el-button class="btn" type="default" size="mini" @click="editMember(scope.row)"
-                                   v-if="userLevel != 4">编辑
+                            v-if="userLevel != 4">编辑
                         </el-button>
                         <el-button class="btn" type="danger" v-if="scope.row.UserInfo.Status == 1" size="mini"
-                                   @click="pauseRow(scope.row)">
+                            @click="pauseRow(scope.row)">
                             禁用
                         </el-button>
                         <el-button class="btn" type="success" v-if="scope.row.UserInfo.Status == 8" size="mini"
-                                   @click="runRow(scope.row)">
+                            @click="runRow(scope.row)">
                             启用
                         </el-button>
-                        <el-button class="btn" type="primary" size="mini"
+                        <!-- <el-button class="btn" type="primary" size="mini"
                                    @click="addTake(scope.row)">Take绑定
-                        </el-button>
-                        <el-button class="btn relevance" type="default" size="mini"
-                                   @click="goRelevance(scope.row)">关联手机号
+                        </el-button> -->
+                        <el-button class="btn relevance" type="default" size="mini" @click="goRelevance(scope.row)">
+                            关联手机号
                         </el-button>
                     </template>
                 </el-table-column>
             </el-table>
             <br>
-            <div  v-if="pageshow">
-            <el-pagination
-                    background
-                    :total="pageination.total"
-                    :page-size="pageination.pageItem"
-                    @current-change="pageChange"
-                    :current-page.sync="cur_page"
-            ></el-pagination>
+            <div v-if="pageshow">
+                <el-pagination background :total="pageination.total" :page-size="pageination.pageItem"
+                    @current-change="pageChange" :current-page.sync="cur_page"></el-pagination>
             </div>
         </div>
 
         <el-dialog :title="dialogTitle" :visible.sync="dialogMemberVisible"
-                   :width="form.btnType == 1 ?'650px':'1200px'">
+            :width="form.btnType == 1 ?'650px':'1200px'">
             <div class="dialogContent">
                 <div :class="['pull-left',{'tabwild':form.btnType == 1}]">
 
@@ -253,21 +174,17 @@
                         </el-form-item>
                         <el-form-item label="会员类型" v-if="form.btnType == 0">
                             <el-select v-model="form.vipType" placeholder="请选择所属门店">
-                                <el-option
-                                        v-for="item in memberTypes"
-                                        :key="item.value"
-                                        :label="item.label"
-                                        :value="item.value"
-                                ></el-option>
+                                <el-option v-for="item in memberTypes" :key="item.value" :label="item.label"
+                                    :value="item.value"></el-option>
                             </el-select>
                         </el-form-item>
                         <el-form-item label="课时" v-if="form.btnType == 0">
-                            <el-input-number v-model="form.normalhour " :min="0" :max="99999"
-                                             label="(天)"></el-input-number>
+                            <el-input-number v-model="form.normalhour " :min="0" :max="99999" label="(天)">
+                            </el-input-number>
                         </el-form-item>
                         <el-form-item label="赠送课时" v-if="form.btnType == 0">
-                            <el-input-number v-model="form.gifthour " :min="0" :max="99999"
-                                             label="(天)"></el-input-number>
+                            <el-input-number v-model="form.gifthour " :min="0" :max="99999" label="(天)">
+                            </el-input-number>
                         </el-form-item>
                         <el-form-item label="备注">
                             <el-input v-model="form.memo"></el-input>
@@ -278,46 +195,33 @@
                         <el-form-item label="体重" :required="true">
                             <el-input v-model="form.weight" placeholder="kg" type="number"></el-input>
                         </el-form-item>
-                        <el-form-item label="静态心率" >
-                        <el-input v-model="form.staticHr" placeholder="请输入" type="number"></el-input>
+                        <el-form-item label="静态心率">
+                            <el-input v-model="form.staticHr" placeholder="请输入" type="number"></el-input>
                         </el-form-item>
                         <el-form-item label="性别" :required="true">
                             <el-select v-model="form.sex " placeholder="">
-                                <el-option
-                                        v-for="item in sexOptions"
-                                        :key="item.value"
-                                        :label="item.label"
-                                        :value="item.value"
-                                ></el-option>
+                                <el-option v-for="item in sexOptions" :key="item.value" :label="item.label"
+                                    :value="item.value"></el-option>
                             </el-select>
                         </el-form-item>
                         <el-form-item label="头像" :required="true">
-<!--                            <div class="upload">-->
-<!--                                <el-upload-->
-<!--                                        class="avatar-uploader"-->
-<!--                                        :action=domain-->
-<!--                                        :http-request=upqiniu-->
-<!--                                        :show-file-list="false"-->
-<!--                                        :before-upload="beforeUpload">-->
-<!--                                    &lt;!&ndash;<i v-else class="el-icon-plus avatar-uploader-icon"></i>&ndash;&gt;-->
-<!--                                </el-upload>-->
-                                <img v-if="imageUrl" :src="imageUrl" class="avatar">
-                                <cropper
-                                        :width="300"
-                                        :height="300"
-                                        :fixed-number="[1,1]"
-                                        @subUploadSucceed="getShopImages"
-                                ></cropper>
-                                <!--<ImgCutter v-on:cutDown="cutDown"></ImgCutter>-->
-<!--                            </div>-->
+                            <!--                            <div class="upload">-->
+                            <!--                                <el-upload-->
+                            <!--                                        class="avatar-uploader"-->
+                            <!--                                        :action=domain-->
+                            <!--                                        :http-request=upqiniu-->
+                            <!--                                        :show-file-list="false"-->
+                            <!--                                        :before-upload="beforeUpload">-->
+                            <!--                                    &lt;!&ndash;<i v-else class="el-icon-plus avatar-uploader-icon"></i>&ndash;&gt;-->
+                            <!--                                </el-upload>-->
+                            <img v-if="imageUrl" :src="imageUrl" class="avatar">
+                            <cropper :width="300" :height="300" :fixed-number="[1,1]" @subUploadSucceed="getShopImages">
+                            </cropper>
+                            <!--<ImgCutter v-on:cutDown="cutDown"></ImgCutter>-->
+                            <!--                            </div>-->
                         </el-form-item>
                         <el-form-item label="出生年份" :required="true">
-                            <el-date-picker
-                                    v-model="form.birthday"
-                                    align="right"
-                                    type="date"
-                                    placeholder="选择日期"
-                            >
+                            <el-date-picker v-model="form.birthday" align="right" type="date" placeholder="选择日期">
                             </el-date-picker>
                         </el-form-item>
                     </el-form>
@@ -326,14 +230,14 @@
                     <el-form ref="form" :model="form" label-width="10px">
                         <el-form-item label="">
                             <el-transfer filterable v-model="form.classlist" :data="form.dialogdata"
-                                         :titles="['全部课程','已选课程']"></el-transfer>
+                                :titles="['全部课程','已选课程']"></el-transfer>
                         </el-form-item>
                     </el-form>
                 </div>
             </div>
             <div class="dialogFooter">
                 <el-button :disabled="addDisabled" type="primary" size="small" v-if="form.btnType == 0"
-                           @click="confirmMember">确定
+                    @click="confirmMember">确定
                 </el-button>
                 <el-button type="primary" size="small" v-if="form.btnType == 1" @click="confirmEditMember">确定
                 </el-button>
@@ -361,15 +265,12 @@
                 <el-input-number v-model="form.newgifthour" :min="-9999" :max="9999" label="赠送课时调整"></el-input-number>
             </div>
             <div v-if="dialogExpTime">
-                <el-date-picker
-                        v-model="form.expTime"
-                        type="date"
-                        placeholder="选择日期">
+                <el-date-picker v-model="form.expTime" type="date" placeholder="选择日期">
                 </el-date-picker>
             </div>
             <div v-if="dialogLessonTable">
-                <el-transfer filterable v-model="form.dialogValue" :data="form.dialogdata"
-                             :titles="['全部课程','已选课程']"></el-transfer>
+                <el-transfer filterable v-model="form.dialogValue" :data="form.dialogdata" :titles="['全部课程','已选课程']">
+                </el-transfer>
             </div>
             <div class="dialogFooter">
                 <!--课时调整-->
@@ -388,11 +289,8 @@
         <el-dialog title="Take绑定" :visible.sync="TakeVisible" width="650px">
             <div>
                 <el-select v-model="Takevalue" placeholder="请选择">
-                    <el-option
-                            v-for="item in Takeoptions"
-                            :key="item.Id"
-                            :label="item.Name + item.PhoneNo"
-                            :value="item.Id">
+                    <el-option v-for="item in Takeoptions" :key="item.Id" :label="item.Name + item.PhoneNo"
+                        :value="item.Id">
                     </el-option>
                 </el-select>
             </div>
@@ -452,8 +350,8 @@
                 cur_page: 1,
                 pageshow: true,
                 sexOptions: [
-                    {value: 1, label: '男'},//性别 1:男, 2:女
-                    {value: 2, label: '女'},
+                    { value: 1, label: '男' },//性别 1:男, 2:女
+                    { value: 2, label: '女' },
                 ],
                 yearOptions: getyearOptions(15),
                 // panel 配置项目
@@ -486,7 +384,7 @@
                 pageination: {
                     pageItem: 10,
                     pageoptions: pageOptions(),
-                    total: 100,
+                    total: 10,
                     pageIndex: 1,
                 },
                 form: {
@@ -573,11 +471,11 @@
                         that.form.head = '';
                         this.form.sex = 1;
                         switch (parseInt(Status)) {
-                            case  1:
+                            case 1:
                                 that.$message.error('用户已存在,手机号不能重复添加');
                                 that.addDisabled = true;
                                 break;
-                            case  2:
+                            case 2:
                                 that.$message.success('已读取到当前用户信息');
                                 // 关掉右侧
                                 that.pullRight = false;
@@ -589,11 +487,11 @@
                                 that.form.head = Info.Head;
                                 this.form.sex = Info.Sex;
                                 break;
-                            case  3:
+                            case 3:
                                 that.$message.error('手机号已经关联其他用户不能重复添加');
                                 that.addDisabled = true;
                                 break;
-                            case  4:
+                            case 4:
                                 // 手机号在本店不存在,在其他店也不存在,前台应允许用户填写
                                 break;
                         }
@@ -604,9 +502,9 @@
             },
             // 关联手机号跳转
             goRelevance(row) {
-                this.$router.push({path: '/relevancePhone', query: {userId: row.UserInfo.Id}});
+                this.$router.push({ path: '/relevancePhone', query: { userId: row.UserInfo.Id } });
             },
-            cutDown(e){
+            cutDown(e) {
                 console.log(e);
                 this.imageUrl = e.dataURL;
                 this.upqiniu(e);
@@ -615,7 +513,7 @@
             upqiniu(req) {
                 let that = this;
                 const config = {
-                    headers: {'Content-Type': 'multipart/form-data'}
+                    headers: { 'Content-Type': 'multipart/form-data' }
                 };
                 let filetype = '';
                 if (req.file.type === 'image/png') {
@@ -1372,7 +1270,7 @@
 
     .context {
         border-radius: 12px;
-      /*  height: 770px;*/
+        /*  height: 770px;*/
         overflow-y: scroll;
         display: block;
         margin: 0 auto;
@@ -1478,7 +1376,7 @@
         margin-right: 5px;
     }
 
-    /deep/ table .el-button + .el-button {
+    /deep/ table .el-button+.el-button {
         margin-left: 0;
         margin-right: 3px;
         /*float: left;*/
@@ -1538,5 +1436,4 @@
     .relevance {
         margin-top: 10px;
     }
-    
-</style>
+</style>

+ 13 - 13
pc/src/views/ShopManage.vue

@@ -5,19 +5,19 @@
             <div class="panel-body">
                 <div class="panel_control">
                     <el-row :gutter="20">
-                        <el-col :span="4">
+                        <el-col :span="5">
                             <em>店面名称:</em>
                             <el-input v-model="panel.shopName" placeholder="请输入店面名称"></el-input>
                         </el-col>
-                        <el-col :span="4">
+                        <el-col :span="5">
                             <em>负责人:</em>
                             <el-input v-model="panel.contacts" placeholder="请输入负责人"></el-input>
                         </el-col>
-                        <el-col :span="4">
+                        <el-col :span="5">
                             <em>联系电话:</em>
                             <el-input v-model="panel.phone" placeholder="请输入联系电话" type="number"></el-input>
                         </el-col>
-                        <el-col :span="4">
+                        <el-col :span="3">
                             <el-button size="" type="primary" @click="query" plain :disabled="serachBtnStatus">查询
                             </el-button>
                         </el-col>
@@ -26,9 +26,9 @@
             </div>
         </div>
         <div class="change">
-            <el-button @click="addAdmin" type="primary">新增店面</el-button>
-            <el-button @click="editList">编辑店面</el-button>
-            <el-button @click="delList" type="danger">删除店面</el-button>
+            <el-button @click="addAdmin" type="primary" size="mini">新增店面</el-button>
+            <el-button @click="editList" size="mini">编辑店面</el-button>
+            <el-button @click="delList" type="danger" size="mini">删除店面</el-button>
         </div>
         <div class="table">
             <el-table
@@ -47,12 +47,10 @@
                         <el-radio v-model="tableRadio" :label="scope.row"><i></i></el-radio>
                     </template>
                 </el-table-column>
-                <el-table-column
-                        type="index"
-                        label="序号"
-                        align="center"
-
-                        width="50">
+                <el-table-column label="序号" type="index" width="50" align="center">
+                    <template scope="scope">
+                        <span>{{(start) + scope.$index + 1}}</span>
+                    </template>
                 </el-table-column>
                 <el-table-column
                         prop="ShopName"
@@ -131,6 +129,8 @@
             return {
                 dialogVisible: false,
                 dialogTitle: '新增店面',
+                start: 0,
+                draw: 1,
                 // panel 配置项目
                 panel: {
                     shopName: '',

+ 11 - 12
pc/src/views/appoint.vue

@@ -65,11 +65,10 @@
                                     <el-radio v-model="tableRadio" :label="scope.row"><i></i></el-radio>
                                 </template>
                             </el-table-column>
-                            <el-table-column
-                                    type="index"
-                                    label="序号"
-                                    align="center"
-                                    width="50">
+                            <el-table-column label="序号" type="index" width="50" align="center">
+                                <template scope="scope">
+                                    <span>{{(start) + scope.$index + 1}}</span>
+                                </template>
                             </el-table-column>
                             <el-table-column
                                     prop="UserName"
@@ -160,13 +159,11 @@
                                 class=""
                                 @selection-change="handleSelectionChange" @current-change="clickChange"
                         >
-                            <el-table-column
-                                    type="index"
-                                    label="序号"
-                                    align="center"
-
-                                    width="50">
-                            </el-table-column>
+                        <el-table-column label="序号" type="index" width="50" align="center">
+                            <template scope="scope">
+                                <span>{{(start) + scope.$index + 1}}</span>
+                            </template>
+                        </el-table-column>
                             <el-table-column
                                     prop="BeginTime"
                                     label="上课时间"
@@ -346,6 +343,8 @@
                 dialogValue: [],
                 weeks: [],
                 gridData: [],
+                start: 0,
+                draw: 1,
                 // panel 配置项目
                 panel: {
                     name: '',

+ 6 - 7
pc/src/views/cost.vue

@@ -65,12 +65,11 @@
                     :summary-method="getSummaries"
                     @selection-change="handleSelectionChange"
             >
-                <el-table-column
-                        type="index"
-                        width="60dp"
-                        label="序号"
-                        align="center">
-                </el-table-column>
+            <el-table-column label="序号" type="index" width="50" align="center">
+                <template scope="scope">
+                    <span>{{(start) + scope.$index + 1}}</span>
+                </template>
+            </el-table-column>
                 <el-table-column
                         prop="Name"
                         label="会员名"
@@ -389,7 +388,7 @@
                 },
                 multipleSelection: [],
                 pageination: {
-                    pageItem: 10,
+                    pageItem: 100,
                     pageoptions: pageOptions(),
                     total: 100,
                     pageIndex: 1,

+ 6 - 6
pc/src/views/courses.vue

@@ -39,12 +39,10 @@
                     @selection-change="handleSelectionChange"
             >
                 >
-                <el-table-column
-                        type="index"
-                        label="序号"
-                        align="center"
-
-                        width="50">
+                <el-table-column label="序号" type="index" width="50" align="center">
+                    <template scope="scope">
+                        <span>{{(start) + scope.$index + 1}}</span>
+                    </template>
                 </el-table-column>
                 <el-table-column
                         prop="BeginTime"
@@ -251,6 +249,8 @@
                 className: '',
                 current: getNowDate(),
                 dialogValue: [],
+                start: 0,
+                draw: 1,
                 // panel 配置项目
                 panel: {
                     usercode: '',

+ 6 - 1
pc/src/views/coursesHistory.vue

@@ -28,7 +28,10 @@
             <el-table :data="tableData" border is-horizontal-resize :default-sort="{prop: 'date', order: 'descending'}"
                 element-loading-background="rgba(0, 0, 0, 0.8)" class="" @selection-change="handleSelectionChange">
                 >
-                <el-table-column type="index" label="序号" align="center" width="50">
+                <el-table-column label="序号" type="index" width="50" align="center">
+                    <template scope="scope">
+                        <span>{{(start) + scope.$index + 1}}</span>
+                    </template>
                 </el-table-column>
                 <el-table-column prop="BeginTime" label="上课时间" :formatter="filterFmtDate" width="180">
                 </el-table-column>
@@ -161,6 +164,8 @@
                 className: '',
                 current: getNowDate(),
                 dialogValue: [],
+                start: 0,
+                draw: 1,
                 // panel 配置项目
                 panel: {
                     usercode: '',

+ 10 - 5
pc/src/views/demoDevice.vue

@@ -6,9 +6,9 @@
             <h5>{{ regionName }}</h5>
         </div>
         <div class="change">
-            <el-button @click="addMember" type="primary">新增演示设备</el-button>
-            <el-button @click="editList">编辑演示设备</el-button>
-            <el-button @click="query" type="success">刷新</el-button>
+            <el-button @click="addMember" type="primary" size="mini">新增演示设备</el-button>
+            <el-button @click="editList" size="mini">编辑演示设备</el-button>
+            <el-button @click="query" type="success" size="mini">刷新</el-button>
 
             <!--<el-button @click="delList" type="danger">删除演示设备</el-button>-->
         </div>
@@ -30,8 +30,11 @@
                         </el-radio>
                     </template>
                 </el-table-column>
-                <el-table-column type="index" label="序号" align="center" width="50"></el-table-column>
-                <el-table-column prop="EqSn" label="序列号"></el-table-column>
+                <el-table-column label="序号" type="index" width="50" align="center">
+                    <template scope="scope">
+                        <span>{{(start) + scope.$index + 1}}</span>
+                    </template>
+                </el-table-column>                <el-table-column prop="EqSn" label="序列号"></el-table-column>
                 <el-table-column prop="Version" label="版本" sortable></el-table-column>
                 <el-table-column prop="ShopName" label="所属门店" sortable></el-table-column>
                 <el-table-column prop="SvName" label="所属区域" sortable></el-table-column>
@@ -138,6 +141,8 @@ export default {
             multipleSelection: [],
             tableRadio: [],
             ShopList: [],
+            start: 0,
+                draw: 1,
             pageination: {
                 pageItem: 10,
                 pageoptions: pageOptions(),

+ 610 - 660
pc/src/views/lessonManage.vue

@@ -10,87 +10,52 @@
       <el-button type="" @click="query" :disabled="serachBtnStatus" size="mini">刷新</el-button>
     </div>
     <div class="table">
-      <el-table
-          :data="tableData"
-          border
-          is-horizontal-resize
-          :default-sort="{prop: 'date', order: 'descending'}"
-          element-loading-background="rgba(0, 0, 0, 0.8)"
-          class=""
-          @selection-change="handleSelectionChange" @current-change="clickChange"
-      >
+      <el-table :data="tableData" border is-horizontal-resize :default-sort="{prop: 'date', order: 'descending'}"
+        element-loading-background="rgba(0, 0, 0, 0.8)" class="" @selection-change="handleSelectionChange"
+        @current-change="clickChange">
         >
         <el-table-column label="选择" width="55">
           <template slot-scope="scope">
             <el-radio v-model="tableRadio" :label="scope.row"><i></i></el-radio>
           </template>
         </el-table-column>
-        <el-table-column
-            type="index"
-            label="序号"
-            align="center"
-
-            width="50">
+        <el-table-column label="序号" type="index" width="50" align="center">
+          <template scope="scope">
+            <span>{{(start) + scope.$index + 1}}</span>
+          </template>
         </el-table-column>
-        <el-table-column
-            prop="Name"
-            label="日期"
-        >
+        <el-table-column prop="Name" label="日期">
           <template slot-scope="scope">
             <div class="rowHeight">
               <!--                            已过期-->
               <span class="readyTime" v-if="scope.row.Diffweek < 0">
-                               {{ scope.row.BeginDate }} - {{ scope.row.EndDate }}
-                        </span>
+                {{ scope.row.BeginDate }} - {{ scope.row.EndDate }}
+              </span>
               <!--                            已上线-->
               <span class="CurTime" v-if="scope.row.Diffweek >= 0">
-                             {{ scope.row.BeginDate }} - {{ scope.row.EndDate }}
-                        </span>
+                {{ scope.row.BeginDate }} - {{ scope.row.EndDate }}
+              </span>
               <!--                            当前进行-->
               <i class="curIcon" v-if="scope.row.Status == 1 && scope.row.Diffweek == 0"></i>
               <span class="runTime" v-if="scope.row.Status == 2 ">
-                              {{ scope.row.BeginDate }} - {{ scope.row.EndDate }}
-                        </span>
+                {{ scope.row.BeginDate }} - {{ scope.row.EndDate }}
+              </span>
             </div>
           </template>
         </el-table-column>
-        <el-table-column
-            prop="Name"
-            label="课程表名称"
-            sortable
-        >
+        <el-table-column prop="Name" label="课程表名称" sortable>
         </el-table-column>
-        <el-table-column
-            prop="CreateColumn.CreatedAt"
-            label="最后编辑时间"
-            :formatter="filterFmtDate"
-            sortable
-        >
+        <el-table-column prop="CreateColumn.CreatedAt" label="最后编辑时间" :formatter="filterFmtDate" sortable>
         </el-table-column>
-        <el-table-column
-            prop="Online"
-            label="是否上线"
-            width=120px
-            sortable
-            v-if="userLevel != 4"
-        >
+        <el-table-column prop="Online" label="是否上线" width=120px sortable v-if="userLevel != 4">
           <!--                    上线状态	0:不上线 1:下线-->
           <template slot-scope="scope">
-            <el-switch
-                v-model="scope.row.Online"
-                :active-value="1"
-                :inactive-value="0"
-                active-color="#409EFF"
-                inactive-color="#D9D9D9"
-                @change=changeWechat($event,scope.row)
-            >
+            <el-switch v-model="scope.row.Online" :active-value="1" :inactive-value="0" active-color="#409EFF"
+              inactive-color="#D9D9D9" @change=changeWechat($event,scope.row)>
             </el-switch>
           </template>
         </el-table-column>
-        <el-table-column
-            prop="Status"
-            label="操作"
-        >
+        <el-table-column prop="Status" label="操作">
           <template slot-scope="scope">
             <el-button type="text" v-if="scope.row.Diffweek >= 0 && userLevel != 4" @click="editName(scope.row)">编辑名称
             </el-button>
@@ -102,12 +67,8 @@
 
       </el-table>
       <br>
-      <el-pagination
-          background
-          :total="pageination.total"
-          :page-size="pageination.pageItem"
-          @current-change="pageChange"
-      ></el-pagination>
+      <el-pagination background :total="pageination.total" :page-size="pageination.pageItem"
+        @current-change="pageChange"></el-pagination>
     </div>
 
     <el-dialog title="发布课程表" :visible.sync="dialogVisible" width="650px">
@@ -118,34 +79,22 @@
         <span class="demonstration">选择发布日期(按周选取)</span>
         <br>
         <br>
-        <el-date-picker
-            v-model="form.week"
-            type="week"
-            :picker-options="{'firstDayOfWeek': 1}"
-            format="yyyy 第 WW 周"
-            placeholder="选择周">
+        <el-date-picker v-model="form.week" type="week" :picker-options="{'firstDayOfWeek': 1}" format="yyyy 第 WW 周"
+          placeholder="选择周">
         </el-date-picker>
         <br>
         <br>
         <span>
-                    微信可见
-                </span>
-        <el-switch
-            v-model="form.wechat"
-            :active-value="1"
-            :inactive-value="0"
-            active-color="#409EFF"
-            inactive-color="#D9D9D9">
+          微信可见
+        </span>
+        <el-switch v-model="form.wechat" :active-value="1" :inactive-value="0" active-color="#409EFF"
+          inactive-color="#D9D9D9">
         </el-switch>
         <span>
-                    微信可预约
-                </span>
-        <el-switch
-            v-model="form.appoint"
-            :active-value="1"
-            :inactive-value="0"
-            active-color="#409EFF"
-            inactive-color="#D9D9D9">
+          微信可预约
+        </span>
+        <el-switch v-model="form.appoint" :active-value="1" :inactive-value="0" active-color="#409EFF"
+          inactive-color="#D9D9D9">
         </el-switch>
       </div>
       <div class="dialogFooter">
@@ -162,12 +111,8 @@
            return date.getTime() <= Date.now()-86400000;
          }
         -->
-        <el-date-picker
-            v-model="copyForm.week"
-            type="week"
-            :picker-options="{'firstDayOfWeek': 1}"
-            format="yyyy 第 WW 周"
-            placeholder="选择周">
+        <el-date-picker v-model="copyForm.week" type="week" :picker-options="{'firstDayOfWeek': 1}" format="yyyy 第 WW 周"
+          placeholder="选择周">
         </el-date-picker>
       </div>
       <div class="dialogFooter">
@@ -196,615 +141,620 @@
 </template>
 
 <script>
-import Global from '../Global.js'
-import preview from '../components/preview'
-import {
-  STTBasicListQuery,
-  STTBasicOfflineEdit,
-  STTBasicStatusEdit,
-  SchoolTimeTableCopy,
-  STTBasicEdit,
-  testSelect,
-  SttPlanPreview,
-  SchoolTimetablePreview,
-} from "../api/getApiRes";
-
-let qs = require('qs');
-export default {
-  data() {
-    return {
-      serachBtnStatus: false,
-      previewShow: false,
-      previewDate: {},
-      BigTitle: '',
-      smallTitle: '',
-      dialogVisible: false,
-      dialogCopyVisible: false,
-      dialogNameVisible: false,
-      dialogdata: [],
-      dialogValue: [],
-      // panel 配置项目
-      multipleSelection: [],
-      pageination: {
-        pageItem: 10,
-        pageoptions: pageOptions(),
-        total: 100,
-        pageIndex: 1,
-      },
-      form: {
-        Id: '',
-        name: '',
-        week: '',
-        wechat: 1,
-        appoint: 1,
-      },
-      copyForm: {
-        stbId: '',
-        Id: '',
-        name: '',
-        week: '',
-        wechat: 1,
-        appoint: 1,
-      },
-      tableData: [],
-      tableRadio: [],
-      userLevel: localStorage.userLevel
-    }
-  },
-  mounted() {
-    this.getTableQuery();
-  },
-  methods: {
-    clickChange(item) {
-      this.tableRadio = item
-    },
-    // 编辑名称
-    editName(row) {
-      this.form.name = row.Name;
-      this.form.stbId = row.StbId;
-      this.dialogNameVisible = true;
-    },
-    // 预览本周
-    seeWeek(row) {
-      let that = this;
-      console.log(row);
-      let param = {
-        token: localStorage.token,
-        stbId: row.StbId,
-      };
-      let postdata = qs.stringify(param);
-      SchoolTimetablePreview(postdata).then(res => {
-        let json = res;
-        if (json.Code == 0) {
-          that.BigTitle = row.Name;
-          that.smallTitle = row.BeginDate + '至' + row.EndDate;
-          that.previewDate = json.Rs;
-          // 前台排序
-          that.previewDate.SttPreviewClassList.sort((a, b) => a.ClassIndex - b.ClassIndex);//升序
-          that.previewShow = true;
-        } else {
-          that.$message.error(json.Memo + ' 错误码:' + json.Code);
-        }
-      })
-    },
-    addLessonTable() {
-      this.$router.push({
-        path: '/editLessonManage', query: {
-          id: 0
-        }
-      });
-    },
-    // 删除
-    delList() {
-      let that = this;
-      if (this.tableRadio.length == 0) {
-        this.$message.error("请先选中一条记录");
-        return false
-      }
-      let row = that.tableRadio;
+  import Global from '../Global.js'
+  import preview from '../components/preview'
+  import {
+    STTBasicListQuery,
+    STTBasicOfflineEdit,
+    STTBasicStatusEdit,
+    SchoolTimeTableCopy,
+    STTBasicEdit,
+    testSelect,
+    SttPlanPreview,
+    SchoolTimetablePreview,
+  } from "../api/getApiRes";
 
-      if (row.Diffweek < 0) {
-        that.$message({
-          showClose: true,
-          message: '已过期的课程表不可删除',
-          type: 'error'
-        });
-        return false
+  let qs = require('qs');
+  export default {
+    data() {
+      return {
+        serachBtnStatus: false,
+        previewShow: false,
+        previewDate: {},
+        BigTitle: '',
+        smallTitle: '',
+        dialogVisible: false,
+        dialogCopyVisible: false,
+        dialogNameVisible: false,
+        dialogdata: [],
+        dialogValue: [],
+        start: 0,
+        draw: 1,
+        // panel 配置项目
+        multipleSelection: [],
+        pageination: {
+          pageItem: 10,
+          pageoptions: pageOptions(),
+          total: 100,
+          pageIndex: 1,
+        },
+        form: {
+          Id: '',
+          name: '',
+          week: '',
+          wechat: 1,
+          appoint: 1,
+        },
+        copyForm: {
+          stbId: '',
+          Id: '',
+          name: '',
+          week: '',
+          wechat: 1,
+          appoint: 1,
+        },
+        tableData: [],
+        tableRadio: [],
+        userLevel: localStorage.userLevel
       }
-
-      let param = {
-        token: localStorage.token,
-        stbId: row.StbId,
-        status: 9,//0禁用1启用9删除
-      };
-      let postdata = qs.stringify(param);
-
-      this.$confirm('此操作将永久删除该课程表, 是否继续?', '提示', {
-        confirmButtonText: '确定',
-        cancelButtonText: '取消',
-        type: 'warning'
-      }).then(() => {
-        STTBasicStatusEdit(postdata).then(res => {
+    },
+    mounted() {
+      this.getTableQuery();
+    },
+    methods: {
+      clickChange(item) {
+        this.tableRadio = item
+      },
+      // 编辑名称
+      editName(row) {
+        this.form.name = row.Name;
+        this.form.stbId = row.StbId;
+        this.dialogNameVisible = true;
+      },
+      // 预览本周
+      seeWeek(row) {
+        let that = this;
+        console.log(row);
+        let param = {
+          token: localStorage.token,
+          stbId: row.StbId,
+        };
+        let postdata = qs.stringify(param);
+        SchoolTimetablePreview(postdata).then(res => {
           let json = res;
           if (json.Code == 0) {
-            that.$message({
-              showClose: true,
-              message: '选中的课程表已删除!',
-              type: 'success'
-            });
-            // 重载列表
-            that.getTableQuery();
+            that.BigTitle = row.Name;
+            that.smallTitle = row.BeginDate + '至' + row.EndDate;
+            that.previewDate = json.Rs;
+            // 前台排序
+            that.previewDate.SttPreviewClassList.sort((a, b) => a.ClassIndex - b.ClassIndex);//升序
+            that.previewShow = true;
           } else {
             that.$message.error(json.Memo + ' 错误码:' + json.Code);
           }
+        })
+      },
+      addLessonTable() {
+        this.$router.push({
+          path: '/editLessonManage', query: {
+            id: 0
+          }
         });
-      }).catch(() => {
-        this.$message({
-          type: 'info',
-          message: '已取消删除'
-        });
-      });
-    },
-    // 提交名称修改
-    confirmName() {
-      let that = this;
-      if (!this.form.name) {
-        this.$message.error('名称不能为空');
-        return false
-      }
-      if (this.form.name.length < 3) {
-        this.$message.error('名称不能小于3个字符');
-        return false
-      }
-      if (this.form.name.length > 20) {
-        this.$message.error('名称不能大于20个字符');
-        return false
-      }
-      let param = {
-        token: localStorage.token,
-        stbId: this.form.stbId,
-        name: this.form.name,
-      };
-      let postdata = qs.stringify(param);
-      STTBasicEdit(postdata).then(res => {
-        let json = res;
-        if (json.Code == 0) {
-          that.$message({
-            showClose: true,
-            message: '名称修改成功!',
-            type: 'success'
-          });
-          this.getTableQuery();
-          this.dialogNameVisible = false;
-        } else {
-          that.$message.error(json.Memo + ' 错误码:' + json.Code);
+      },
+      // 删除
+      delList() {
+        let that = this;
+        if (this.tableRadio.length == 0) {
+          this.$message.error("请先选中一条记录");
+          return false
         }
-      })
-    },
-    confirmCopy() {
-      let that = this;
-      let row = this.copyForm;
+        let row = that.tableRadio;
 
-      if (!row.week) {
-        that.$message.error('没有选择发布周期');
-        return false
-      }
-      let param = {
-        token: localStorage.token,
-        stbId: row.StbId,
-        incomingDate: nonTfmtDatetoLength(row.week, 10),//对应日期 字符串 年-月-日 格式,
-      };
-      let postdata = qs.stringify(param);
-      SchoolTimeTableCopy(postdata).then(res => {
-        let json = res;
-        if (json.Code == 0) {
+        if (row.Diffweek < 0) {
           that.$message({
             showClose: true,
-            message: '课程复制成功!',
-            type: 'success'
+            message: '已过期的课程表不可删除',
+            type: 'error'
           });
-          this.dialogCopyVisible = false;
-          this.getTableQuery();
-        } else {
-          that.$message.error(json.Memo + ' 错误码:' + json.Code);
+          return false
         }
-      })
-    },
-    copy() {
-      let that = this;
-      this.dialogCopyVisible = true;
-      if (this.tableRadio.length == 0) {
-        this.$message.error("请先选中一条记录");
-        return false
-      }
-      this.copyForm = that.tableRadio;
-    },
-    // 发布课程表
-    openLessonTable(row) {
-      this.dialogVisible = true;
-      this.form.name = row.name;
-      this.form.Id = row.Id;
-      this.form.week = '';
-    },
-    // 发布
-    public() {
-      let that = this;
-      if (!this.form.week) {
-        this.$message({
-          showClose: true,
-          message: '错了哦,发布周期不能空',
-          type: 'error'
-        });
-        return false
-      }
 
-      let param = {
-        token: localStorage.token,
-        detectorid: this.form.Id,
-        week: this.form.week,
-        wechat: this.form.wechat,
-        appoint: this.form.appoint,
-      };
-      let postdata = qs.stringify(param);
-      testSelect(postdata).then(res => {
-        let json = res;
-        if (json.Code == 0) {
-          that.$message({
-            showClose: true,
-            message: this.form.name + '已发布!',
-            type: 'success'
+        let param = {
+          token: localStorage.token,
+          stbId: row.StbId,
+          status: 9,//0禁用1启用9删除
+        };
+        let postdata = qs.stringify(param);
+
+        this.$confirm('此操作将永久删除该课程表, 是否继续?', '提示', {
+          confirmButtonText: '确定',
+          cancelButtonText: '取消',
+          type: 'warning'
+        }).then(() => {
+          STTBasicStatusEdit(postdata).then(res => {
+            let json = res;
+            if (json.Code == 0) {
+              that.$message({
+                showClose: true,
+                message: '选中的课程表已删除!',
+                type: 'success'
+              });
+              // 重载列表
+              that.getTableQuery();
+            } else {
+              that.$message.error(json.Memo + ' 错误码:' + json.Code);
+            }
           });
-          // 重载列表
-          that.getTableQuery();
-          this.dialogVisible = false;
-        } else {
-          that.$message.error(json.Memo + ' 错误码:' + json.Code);
-        }
-      });
-    },
-    // 取消发布
-    unpubilc(row) {
-      let that = this;
-      let param = {
-        token: localStorage.token,
-        detectorid: row.Id,
-        status: 4,//0禁用1启用9删除
-      };
-      let postdata = qs.stringify(param);
-      testSelect(postdata).then(res => {
-        let json = res;
-        if (json.Code == 0) {
-          that.$message({
-            showClose: true,
-            message: '选中的课程表已复制!',
-            type: 'success'
+        }).catch(() => {
+          this.$message({
+            type: 'info',
+            message: '已取消删除'
           });
-          // 重载列表
-          that.getTableQuery();
-        } else {
-          that.$message.error(json.Memo + ' 错误码:' + json.Code);
+        });
+      },
+      // 提交名称修改
+      confirmName() {
+        let that = this;
+        if (!this.form.name) {
+          this.$message.error('名称不能为空');
+          return false
         }
-      });
-    },
-    // 编辑课程表
-    goEdit(row) {
-      // 参数???
-      this.$router.push({
-        path: '/editLessonManage', query: {
-          id: row.StbId,
-          name: row.Name
+        if (this.form.name.length < 3) {
+          this.$message.error('名称不能小于3个字符');
+          return false
         }
-      });
-    },
-    handleSelectionChange(val) {
-      this.multipleSelection = val;
-    },
-    // 查询按钮
-    query() {
-      let that = this;
-      that.serachBtnStatus = true;
-      let totalTime = 2
-      let clock = window.setInterval(() => {
-        totalTime--
-        if (totalTime < 0) {
-          totalTime = 2;
-          that.serachBtnStatus = false;
+        if (this.form.name.length > 20) {
+          this.$message.error('名称不能大于20个字符');
+          return false
         }
-      }, 1000)
-      this.getTableQuery();
-      this.$message.success('查询完毕');
-    },
-    // 页面数据查询
-    getTableQuery() {
-      let that = this;
-      that.loading = true;
-      let param = {
-        token: localStorage.token,
-        start: 1,//
-        tableMax: 9999,//
-      };
-      let postdata = qs.stringify(param);
-      STTBasicListQuery(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;
+        let param = {
+          token: localStorage.token,
+          stbId: this.form.stbId,
+          name: this.form.name,
+        };
+        let postdata = qs.stringify(param);
+        STTBasicEdit(postdata).then(res => {
+          let json = res;
+          if (json.Code == 0) {
+            that.$message({
+              showClose: true,
+              message: '名称修改成功!',
+              type: 'success'
+            });
+            this.getTableQuery();
+            this.dialogNameVisible = false;
           } else {
-            that.allTableData = [];
-            that.recordsTotal = 0;
+            that.$message.error(json.Memo + ' 错误码:' + json.Code);
           }
+        })
+      },
+      confirmCopy() {
+        let that = this;
+        let row = this.copyForm;
 
-          // 设置分页数据
-          that.setPaginations();
-        } else {
-          that.$message.error(json.Memo + ' 错误码:' + json.Code);
+        if (!row.week) {
+          that.$message.error('没有选择发布周期');
+          return false
         }
-      })
-    },
-    // 设置分页数据
-    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])
+        let param = {
+          token: localStorage.token,
+          stbId: row.StbId,
+          incomingDate: nonTfmtDatetoLength(row.week, 10),//对应日期 字符串 年-月-日 格式,
+        };
+        let postdata = qs.stringify(param);
+        SchoolTimeTableCopy(postdata).then(res => {
+          let json = res;
+          if (json.Code == 0) {
+            that.$message({
+              showClose: true,
+              message: '课程复制成功!',
+              type: 'success'
+            });
+            this.dialogCopyVisible = false;
+            this.getTableQuery();
+          } else {
+            that.$message.error(json.Memo + ' 错误码:' + json.Code);
+          }
+        })
+      },
+      copy() {
+        let that = this;
+        this.dialogCopyVisible = true;
+        if (this.tableRadio.length == 0) {
+          this.$message.error("请先选中一条记录");
+          return false
         }
-        this.tableData = tables;
-      }
-      that.start = index * that.draw;
-      // that.getTableQuery();
-    },
-    // 自动排序
-    sortChange(params) {
-      console.log(params)
-    },
-    // 过滤时间
-    filterFmtDate(value, row, column) {
-      let that = this;
-      return nonTfmtDate(column, 11);
-    },
-    // 过滤金额
-    filterMoney(value, row, column) {
-      let that = this;
-      return parseFloat(column).toFixed(2);
-    },
-    // 课程表上下线状态修改
-    changeWechat(e, row) {
-      let that = this;
-      let param = {
-        token: localStorage.token,
-        stbId: row.StbId,//
-        online: e,//
-      };
-      let postdata = qs.stringify(param);
-      STTBasicOfflineEdit(postdata).then(res => {
-        let json = res;
-        if (json.Code == 0) {
-          let text = parseInt(e) == 1 ? '上线' : '下线';
-          that.$message({
+        this.copyForm = that.tableRadio;
+      },
+      // 发布课程表
+      openLessonTable(row) {
+        this.dialogVisible = true;
+        this.form.name = row.name;
+        this.form.Id = row.Id;
+        this.form.week = '';
+      },
+      // 发布
+      public() {
+        let that = this;
+        if (!this.form.week) {
+          this.$message({
             showClose: true,
-            message: '当前课程表已' + text,
-            type: 'success'
+            message: '错了哦,发布周期不能空',
+            type: 'error'
           });
-          // 重载列表
-          that.getTableQuery();
-        } else {
-          that.$message.error(json.Memo + ' 错误码:' + json.Code);
-          row.Online = 0;
+          return false
         }
-      })
-    },
-  },
-  watch: {
-    $route(to) {
-      if (to.name == 'lessonManage') {
+
+        let param = {
+          token: localStorage.token,
+          detectorid: this.form.Id,
+          week: this.form.week,
+          wechat: this.form.wechat,
+          appoint: this.form.appoint,
+        };
+        let postdata = qs.stringify(param);
+        testSelect(postdata).then(res => {
+          let json = res;
+          if (json.Code == 0) {
+            that.$message({
+              showClose: true,
+              message: this.form.name + '已发布!',
+              type: 'success'
+            });
+            // 重载列表
+            that.getTableQuery();
+            this.dialogVisible = false;
+          } else {
+            that.$message.error(json.Memo + ' 错误码:' + json.Code);
+          }
+        });
+      },
+      // 取消发布
+      unpubilc(row) {
+        let that = this;
+        let param = {
+          token: localStorage.token,
+          detectorid: row.Id,
+          status: 4,//0禁用1启用9删除
+        };
+        let postdata = qs.stringify(param);
+        testSelect(postdata).then(res => {
+          let json = res;
+          if (json.Code == 0) {
+            that.$message({
+              showClose: true,
+              message: '选中的课程表已复制!',
+              type: 'success'
+            });
+            // 重载列表
+            that.getTableQuery();
+          } else {
+            that.$message.error(json.Memo + ' 错误码:' + json.Code);
+          }
+        });
+      },
+      // 编辑课程表
+      goEdit(row) {
+        // 参数???
+        this.$router.push({
+          path: '/editLessonManage', query: {
+            id: row.StbId,
+            name: row.Name
+          }
+        });
+      },
+      handleSelectionChange(val) {
+        this.multipleSelection = val;
+      },
+      // 查询按钮
+      query() {
+        let that = this;
+        that.serachBtnStatus = true;
+        let totalTime = 2
+        let clock = window.setInterval(() => {
+          totalTime--
+          if (totalTime < 0) {
+            totalTime = 2;
+            that.serachBtnStatus = false;
+          }
+        }, 1000)
         this.getTableQuery();
-      }
+        this.$message.success('查询完毕');
+      },
+      // 页面数据查询
+      getTableQuery() {
+        let that = this;
+        that.loading = true;
+        let param = {
+          token: localStorage.token,
+          start: 1,//
+          tableMax: 9999,//
+        };
+        let postdata = qs.stringify(param);
+        STTBasicListQuery(postdata).then(res => {
+          let json = res;
+          if (json.Code == 0) {
+            that.loading = false;
+            if (json.Rs) {
+              that.allTableData = json.Rs;
+              that.recordsTotal = json.Rs.length;
+            } else {
+              that.allTableData = [];
+              that.recordsTotal = 0;
+            }
+
+            // 设置分页数据
+            that.setPaginations();
+          } else {
+            that.$message.error(json.Memo + ' 错误码:' + json.Code);
+          }
+        })
+      },
+      // 设置分页数据
+      setPaginations() {
+        // 分页属性
+        let that = this;
+        that.pageination.total = that.recordsTotal;
+        // 默认分页
+        that.tableData = that.allTableData.filter((item, index) => {
+          return index < that.pageination.pageItem;
+        });
+      },
+      // 每页显示数量
+      handleSizeChange() {
+        let that = this;
+        that.tableData = that.allTableData.filter((item, index) => {
+          return index < that.pageination.pageItem;
+        });
+        that.draw = that.pageination.pageItem;
+        that.getTableQuery();
+      },
+      // 翻页
+      pageChange(pageIndex) {
+        let that = this;
+        // 获取当前页
+        let index = that.pageination.pageItem * (pageIndex - 1);
+        // 数据总数
+        let nums = that.pageination.pageItem * pageIndex;
+        // 容器
+        let tables = [];
+        for (var i = index; i < nums; i++) {
+          if (that.allTableData[i]) {
+            tables.push(that.allTableData[i])
+          }
+          this.tableData = tables;
+        }
+        that.start = index * that.draw;
+        // that.getTableQuery();
+      },
+      // 自动排序
+      sortChange(params) {
+        console.log(params)
+      },
+      // 过滤时间
+      filterFmtDate(value, row, column) {
+        let that = this;
+        return nonTfmtDate(column, 11);
+      },
+      // 过滤金额
+      filterMoney(value, row, column) {
+        let that = this;
+        return parseFloat(column).toFixed(2);
+      },
+      // 课程表上下线状态修改
+      changeWechat(e, row) {
+        let that = this;
+        let param = {
+          token: localStorage.token,
+          stbId: row.StbId,//
+          online: e,//
+        };
+        let postdata = qs.stringify(param);
+        STTBasicOfflineEdit(postdata).then(res => {
+          let json = res;
+          if (json.Code == 0) {
+            let text = parseInt(e) == 1 ? '上线' : '下线';
+            that.$message({
+              showClose: true,
+              message: '当前课程表已' + text,
+              type: 'success'
+            });
+            // 重载列表
+            that.getTableQuery();
+          } else {
+            that.$message.error(json.Memo + ' 错误码:' + json.Code);
+            row.Online = 0;
+          }
+        })
+      },
+    },
+    watch: {
+      $route(to) {
+        if (to.name == 'lessonManage') {
+          this.getTableQuery();
+        }
+      },
     },
-  },
-  components: {
-    preview
+    components: {
+      preview
+    }
   }
-}
 </script>
 
 <style scoped>
-@import "../assets/css/panel.css";
-
-.context {
-  /* height: 770px; */
-  overflow-y: scroll;
-  display: block;
-  margin: 0 auto;
-  background-color: #fff !important;
-  padding: 30px;
-  padding-bottom: 60px;
-}
-
-.panel-body {
-  padding: 20px;
-  background: #F0F2F5;
-}
-
-.change {
-  width: 100%;
-  overflow: hidden;
-  display: block;
-  margin: 0 auto;
-  padding-top: 10px;
-  padding-bottom: 10px;
-}
-
-.change button {
-  float: left;
-}
-
-.change button.pull-right {
-  float: right;
-}
-
-.dialogTitle {
-  width: 100%;
-  overflow: hidden;
-  display: block;
-  margin: 0 auto;
-  color: #000000;
-  font-size: 18px;
-  text-align: center;
-}
-
-.dialogTitle span {
-  width: 169px;
-  height: 40px;
-  line-height: 40px;
-  text-align: center;
-  color: #fff;
-  background: #3799FF;
-  border-radius: 250px;
-  font-size: 18px;
-  overflow: hidden;
-  display: block;
-  margin: 0 auto;
-  margin-bottom: 30px;
-}
-
-.dialogTitle em {
-  float: none;
-  font-style: normal;
-  color: #3799FF;
-  margin: 0;
-}
-
-/deep/ .el-transfer-panel__item .el-checkbox__input {
-  left: 40px;
-}
-
-.dialogFooter {
-  width: 90%;
-  overflow: hidden;
-  display: block;
-  margin: 0 auto;
-  margin-top: 10px;
-}
-
-.dialogFooter button {
-  float: right;
-  margin-left: 10px;
-}
-
-.link {
-  color: #03B1FF;
-  text-decoration: underline;
-}
-
-.readyTime {
-  width: 90%;
-  height: 30px;
-  line-height: 30px;
-  overflow: hidden;
-  display: block;
-  margin: 0 auto;
-  border: 1px solid #FFC769;
-  border-radius: 4px;
-  background: #FFF0D6;
-  text-indent: 14px;
-}
-
-.CurTime {
-  width: 90%;
-  height: 27px;
-  line-height: 30px;
-  overflow: hidden;
-  display: block;
-  margin: 0 auto;
-  border: 1px solid #3799FF;
-  border-radius: 4px;
-  background: #D9ECFF;
-  padding: 3px 6px;
-  text-indent: 14px;
-}
-
-.runTime {
-  width: 90%;
-  height: 30px;
-  line-height: 30px;
-  overflow: hidden;
-  display: block;
-  margin: 0 auto;
-  border: 1px solid #3799FF;
-  border-radius: 4px;
-  background: #D9ECFF;
-  padding: 3px 6px;
-  text-indent: 14px;
-}
-
-.curIcon {
-  position: relative;
-  left: 4px;
-  top: -34px;
-  width: 24px;
-  height: 24px;
-  float: left;
-  background: url("../assets/img/lessonTable/star.png") top center no-repeat;
-  background-size: 100% 100%;
-}
-
-.rowHeight {
-  width: 220px;
-  overflow: hidden;
-  display: block;
-  height: 35px;
-  float: left;
-  margin: 0;
-}
-
-/*ipad only*/
-@media only screen and (max-width: 1366px) {
-  .CurTime {
-    width: 98%;
-    font-size: 12px;
-    text-align: left;
-    text-indent:3px;
-    padding-left: 0;
-    padding-right: 0;
+  @import "../assets/css/panel.css";
+
+  .context {
+    /* height: 770px; */
+    overflow-y: scroll;
+    display: block;
+    margin: 0 auto;
+    background-color: #fff !important;
+    padding: 30px;
+    padding-bottom: 60px;
   }
-  .rowHeight {
+
+  .panel-body {
+    padding: 20px;
+    background: #F0F2F5;
+  }
+
+  .change {
     width: 100%;
+    overflow: hidden;
+    display: block;
+    margin: 0 auto;
+    padding-top: 10px;
+    padding-bottom: 10px;
+  }
+
+  .change button {
+    float: left;
+  }
+
+  .change button.pull-right {
+    float: right;
+  }
+
+  .dialogTitle {
+    width: 100%;
+    overflow: hidden;
+    display: block;
+    margin: 0 auto;
+    color: #000000;
+    font-size: 18px;
+    text-align: center;
+  }
+
+  .dialogTitle span {
+    width: 169px;
+    height: 40px;
+    line-height: 40px;
+    text-align: center;
+    color: #fff;
+    background: #3799FF;
+    border-radius: 250px;
+    font-size: 18px;
+    overflow: hidden;
+    display: block;
+    margin: 0 auto;
+    margin-bottom: 30px;
+  }
+
+  .dialogTitle em {
+    float: none;
+    font-style: normal;
+    color: #3799FF;
+    margin: 0;
+  }
+
+  /deep/ .el-transfer-panel__item .el-checkbox__input {
+    left: 40px;
+  }
+
+  .dialogFooter {
+    width: 90%;
+    overflow: hidden;
+    display: block;
+    margin: 0 auto;
+    margin-top: 10px;
+  }
+
+  .dialogFooter button {
+    float: right;
+    margin-left: 10px;
+  }
+
+  .link {
+    color: #03B1FF;
+    text-decoration: underline;
   }
+
   .readyTime {
-    width: 98%;
-    font-size: 12px;
-    text-align: left;
-    text-indent:3px;
+    width: 90%;
+    height: 30px;
+    line-height: 30px;
+    overflow: hidden;
+    display: block;
+    margin: 0 auto;
+    border: 1px solid #FFC769;
+    border-radius: 4px;
+    background: #FFF0D6;
+    text-indent: 14px;
+  }
+
+  .CurTime {
+    width: 90%;
+    height: 27px;
+    line-height: 30px;
+    overflow: hidden;
+    display: block;
+    margin: 0 auto;
+    border: 1px solid #3799FF;
+    border-radius: 4px;
+    background: #D9ECFF;
+    padding: 3px 6px;
+    text-indent: 14px;
+  }
+
+  .runTime {
+    width: 90%;
+    height: 30px;
+    line-height: 30px;
+    overflow: hidden;
+    display: block;
+    margin: 0 auto;
+    border: 1px solid #3799FF;
+    border-radius: 4px;
+    background: #D9ECFF;
+    padding: 3px 6px;
+    text-indent: 14px;
   }
+
   .curIcon {
-    left:0
+    position: relative;
+    left: 4px;
+    top: -34px;
+    width: 24px;
+    height: 24px;
+    float: left;
+    background: url("../assets/img/lessonTable/star.png") top center no-repeat;
+    background-size: 100% 100%;
+  }
+
+  .rowHeight {
+    width: 220px;
+    overflow: hidden;
+    display: block;
+    height: 35px;
+    float: left;
+    margin: 0;
+  }
+
+  /*ipad only*/
+  @media only screen and (max-width: 1366px) {
+    .CurTime {
+      width: 98%;
+      font-size: 12px;
+      text-align: left;
+      text-indent: 3px;
+      padding-left: 0;
+      padding-right: 0;
+    }
+
+    .rowHeight {
+      width: 100%;
+    }
+
+    .readyTime {
+      width: 98%;
+      font-size: 12px;
+      text-align: left;
+      text-indent: 3px;
+    }
+
+    .curIcon {
+      left: 0
+    }
   }
-}
-</style>
+</style>

+ 6 - 5
pc/src/views/record.vue

@@ -65,11 +65,10 @@
             >
 
                 >
-                <el-table-column
-                        type="index"
-                        label="序号"
-                        align="center"
-                        width="50">
+                <el-table-column label="序号" type="index" width="50" align="center">
+                    <template scope="scope">
+                        <span>{{(start) + scope.$index + 1}}</span>
+                    </template>
                 </el-table-column>
                 <el-table-column
                         prop="UserName"
@@ -175,6 +174,8 @@
                 dialogLessonTable: false,//会员课程
                 dialogTitle: '新增会员',
                 dialogValue: [],
+                start: 0,
+                draw: 1,
                 // panel 配置项目
                 panel: {
                     status: '',

+ 6 - 5
pc/src/views/region.vue

@@ -24,11 +24,10 @@
                         <el-radio v-model="tableRadio" :label="scope.row"><i></i></el-radio>
                     </template>
                 </el-table-column>
-                <el-table-column
-                        type="index"
-                        label="序号"
-                        align="center"
-                        width="50">
+                <el-table-column label="序号" type="index" width="50" align="center">
+                    <template scope="scope">
+                        <span>{{(start) + scope.$index + 1}}</span>
+                    </template>
                 </el-table-column>
                 <el-table-column
                         prop="Name"
@@ -128,6 +127,8 @@
                 dialogTitle: '新增区域',
                 dialogValue: [],
                 tableRadio: [],
+                start: 0,
+                draw: 1,
                 // panel 配置项目
                 panel: {
                     name: '',

+ 4 - 6
pc/src/views/tempUser.vue

@@ -40,12 +40,10 @@
                         <el-radio v-model="tableRadio" :label="scope.row"><i></i></el-radio>
                     </template>
                 </el-table-column>
-                <el-table-column
-                        type="index"
-                        label="序号"
-                        align="center"
-                        width="50"
-                >
+                <el-table-column label="序号" type="index" width="50" align="center">
+                    <template scope="scope">
+                        <span>{{(start) + scope.$index + 1}}</span>
+                    </template>
                 </el-table-column>
                 <el-table-column
                         prop="UserInfo.head"