mo 4 年之前
父节点
当前提交
287b33a993

文件差异内容过多而无法显示
+ 1 - 0
dist/index.html


文件差异内容过多而无法显示
+ 1 - 0
dist/static/js/app.9dac76b4.js


文件差异内容过多而无法显示
+ 0 - 0
dist/static/js/chunk-3df431f9.bed97272.js


文件差异内容过多而无法显示
+ 0 - 0
dist/static/js/chunk-5df97301.59cc6540.js


+ 3 - 1
src/router/index.js

@@ -427,7 +427,9 @@ export const asyncRoutes = {
   indexErrDataRecord:()=>import('@/views/indexErrDataRecord'),
   dictionaryManager:()=>import('@/views/dictionaryManager'),
   // 会员排课列表
-  memberClassList:()=>import('@/views/teamDetail/components/memberClassList')
+  memberClassList:()=>import('@/views/teamDetail/components/memberClassList'),
+  // 设备号管理
+  deviceNum:()=>import('@/views/deviceNumManager')
 }
 
 export default router

+ 14 - 0
src/views/deviceNumManager/api.js

@@ -0,0 +1,14 @@
+import request2 from '@/utils/request2'
+
+export const getUserDevice = data => request2({
+  url: '/api-auth/userDevice/queryPage',
+  params: data,
+  method: 'get',
+})
+
+// exercisesSituation/teacherServeRemindPush
+export const unbindUserDevice = data => request2({
+  url: '/api-auth/userDevice/unbind',
+  params: data,
+  method: 'post',
+})

+ 203 - 0
src/views/deviceNumManager/index.vue

@@ -0,0 +1,203 @@
+<!--  -->
+<template>
+  <div class="m-container">
+    <h2>
+      <div class="squrt"></div>
+      设备号管理
+    </h2>
+    <div class="m-core">
+      <save-form
+        :inline="true"
+        :model="searchForm"
+        ref="searchForm"
+        @submit="search"
+        @reset="onReSet"
+      >
+        <el-form-item prop="search">
+          <el-input
+            v-model.trim="searchForm.search"
+            clearable
+            @keyup.enter.native="search"
+            placeholder="姓名、编号、手机号"
+          ></el-input>
+        </el-form-item>
+        <el-form-item prop="deviceNum">
+          <el-input
+            v-model.trim="searchForm.deviceNum"
+            @keyup.enter.native="deviceNum"
+            clearable
+            placeholder="设备号"
+          ></el-input>
+        </el-form-item>
+        <el-form-item prop="timer">
+          <el-date-picker
+            v-model.trim="searchForm.timer"
+            type="daterange"
+            value-format="yyyy-MM-dd"
+            range-separator="至"
+            start-placeholder="绑定开始日期"
+            end-placeholder="绑定结束日期"
+            :picker-options="{
+              firstDayOfWeek: 1,
+            }"
+          >
+          </el-date-picker>
+        </el-form-item>
+        <el-form-item>
+          <el-button native-type="submit" type="primary">搜索</el-button>
+          <el-button native-type="reset" type="danger">重置</el-button>
+        </el-form-item>
+      </save-form>
+      <div class="tableWrap">
+        <el-table
+          style="width: 100%"
+          :header-cell-style="{ background: '#EDEEF0', color: '#444' }"
+          :data="tableList"
+        >
+          <el-table-column align="center" prop="studentId" label="用户编号">
+            <template slot-scope="scope">
+              <div>
+                <copy-text>{{ scope.row.userId }}</copy-text>
+              </div>
+            </template>
+          </el-table-column>
+          <el-table-column align="center" prop="studentId" label="用户姓名">
+            <template slot-scope="scope">
+              <div>
+                <copy-text>{{ scope.row.user.realName }}</copy-text>
+              </div>
+            </template>
+          </el-table-column>
+          <el-table-column align="center" prop="studentId" label="手机号码">
+            <template slot-scope="scope">
+              <div>
+                <copy-text>{{ scope.row.user.phone }}</copy-text>
+              </div>
+            </template>
+          </el-table-column>
+          <el-table-column align="center" prop="studentId" label="设备号" width="280px">
+            <template slot-scope="scope">
+              <div>
+                <copy-text>{{ scope.row.deviceNum }}</copy-text>
+              </div>
+            </template>
+          </el-table-column>
+          <el-table-column align="center" prop="studentId" label="绑定时间">
+            <template slot-scope="scope">
+              <div>
+                {{ scope.row.bindTime }}
+              </div>
+            </template>
+          </el-table-column>
+          <el-table-column align="center" prop="studentId" label="操作">
+            <template slot-scope="scope">
+              <div>
+                <auth auths="userDevice/unbind">
+                  <el-button type="text" @click="unbind(scope.row)"
+                    >解除限制</el-button
+                  >
+                </auth>
+              </div>
+            </template>
+          </el-table-column>
+        </el-table>
+        <pagination
+          sync
+          :total.sync="rules.total"
+          :page.sync="rules.page"
+          :limit.sync="rules.limit"
+          :page-sizes="rules.page_size"
+          @pagination="getList"
+        />
+      </div>
+    </div>
+  </div>
+</template>
+
+<script>
+import pagination from "@/components/Pagination/index";
+import { getUserDevice, unbindUserDevice } from "./api";
+import { getTimes } from "@/utils";
+export default {
+  components: { pagination },
+  data() {
+    return {
+      searchForm: {
+        search: null,
+        deviceNum: null,
+        timer: [],
+      },
+
+      tableList: [],
+      organList: [],
+      rules: {
+        // 分页规则
+        limit: 10, // 限制显示条数
+        page: 1, // 当前页
+        total: 0, // 总条数
+        page_size: [10, 20, 40, 50], // 选择限制显示条数
+      },
+    };
+  },
+  //生命周期 - 创建完成(可以访问当前this实例)
+  created() {},
+  //生命周期 - 挂载完成(可以访问DOM元素)
+  mounted() {
+    // 获取分部
+
+    this.init();
+  },
+  methods: {
+    init() {
+      this.getList();
+    },
+    async getList() {
+      const { timer, ...rest } = this.searchForm;
+      let obj = {
+        ...rest,
+        page: this.rules.page,
+        rows: this.rules.limit,
+        ...getTimes(timer, ["bindStartTime", "bindEndTime"], "YYYY-MM-DD"),
+      };
+      try {
+        const res = await getUserDevice(obj);
+        this.tableList = res.data.rows;
+        this.rules.total = res.data.total;
+      } catch (e) {
+        console.log(e);
+      }
+    },
+    search() {
+      this.rules.page = 1;
+      this.getList();
+    },
+    onReSet() {
+      this.$refs["searchForm"].resetFields();
+      this.search();
+    },
+    unbind(row) {
+      this.$confirm(
+        "请确认是否解除绑定,解除后该设备号可重新绑定账号",
+        "提示",
+        {
+          confirmButtonText: "确定",
+          cancelButtonText: "取消",
+          type: "warning",
+        }
+      )
+        .then(async () => {
+          try {
+            const res = await unbindUserDevice({ id: row.id });
+            this.$message.success("解除绑定成功");
+            this.getList();
+          } catch (e) {
+            console.log(e);
+          }
+        })
+        .catch(() => {});
+    },
+  },
+};
+</script>
+<style lang='scss' scoped>
+</style>

+ 40 - 14
src/views/studentManager/components/studentVip.vue

@@ -28,14 +28,17 @@
         :data="tableList"
       >
         <el-table-column label="VIP课程组编号" align="center" prop="vipGroupId">
-          <template slot-scope="scope" >
-             <el-button type="text" @click="gotoVip(scope.row.vipGroupId)">
-                 <copy-text>{{ scope.row.vipGroupId }}</copy-text>
+          <template slot-scope="scope">
+            <el-button type="text" @click="gotoVip(scope.row.vipGroupId)">
+              <copy-text>{{ scope.row.vipGroupId }}</copy-text>
             </el-button>
-
           </template>
         </el-table-column>
-        <el-table-column label="VIP课程组名称" align="center" prop="vipGroupName">
+        <el-table-column
+          label="VIP课程组名称"
+          align="center"
+          prop="vipGroupName"
+        >
           <template slot-scope="scope">
             <el-button type="text" @click="gotoVip(scope.row.vipGroupName)">
               <copy-text>{{ scope.row.vipGroupName }}</copy-text>
@@ -110,12 +113,11 @@
       />
 
       <el-dialog :title="dialogTitle" :visible.sync="dialogTableVisible">
-        <el-table :data="gridData" :header-cell-style="{ background: '#EDEEF0', color: '#444' }">
-          <el-table-column
-            prop="courseDate"
-            label="时间"
-            align="center"
-          >
+        <el-table
+          :data="gridData"
+          :header-cell-style="{ background: '#EDEEF0', color: '#444' }"
+        >
+          <el-table-column prop="courseDate" label="时间" align="center">
             <template slot-scope="scope">{{
               scope.row.courseDate | dateForMinFormat
             }}</template>
@@ -136,6 +138,13 @@
             }}</template>
           </el-table-column>
         </el-table>
+        <pagination
+          :total="studentInfo.total"
+          :page.sync="studentInfo.page"
+          :limit.sync="studentInfo.limit"
+          :page-sizes="studentInfo.page_size"
+          @pagination="onCourse"
+        />
       </el-dialog>
     </div>
   </div>
@@ -168,9 +177,17 @@ export default {
         total: 0, // 总条数
         page_size: [10, 20, 40, 50], // 选择限制显示条数
       },
+      studentInfo: {
+        // 分页规则
+        limit: 10, // 限制显示条数
+        page: 1, // 当前页
+        total: 0, // 总条数
+        page_size: [10, 20, 40, 50], // 选择限制显示条数
+      },
       dialogTitle: "",
       gridData: [],
       userId: "",
+      activeRow: null,
     };
   },
   created() {
@@ -203,12 +220,18 @@ export default {
       });
     },
     onCourse(row) {
+      if (row.vipGroupId) {
+        this.activeRow = row;
+      }
       findStudentVipGroups({
-        vipGroupId: row.vipGroupId,
+        vipGroupId: this.activeRow.vipGroupId,
         studentId: this.userId,
+        page:this.studentInfo.page,
+        rows:this.studentInfo.limit
       }).then((res) => {
-        this.dialogTitle = row.vipGroupName;
+        this.dialogTitle = this.activeRow.vipGroupName;
         if (res.code == 200) {
+          this.studentInfo.total = res.data.total
           this.gridData = res.data.rows;
           this.dialogTableVisible = true;
         }
@@ -219,7 +242,10 @@ export default {
       this.getCourseList();
     },
     gotoVip(str) {
-       this.$router.push({path:'/vipManager/vipList',query:{search:str}})
+      this.$router.push({
+        path: "/vipManager/vipList",
+        query: { search: str },
+      });
     },
   },
 };

+ 1 - 1
vue.config.js

@@ -18,7 +18,7 @@ const name = defaultSettings.title || '管乐迷后台管理系统' // page titl
 // let target = 'https://online.dayaedu.com' //线上
 // let target = 'http://192.168.3.139:8000' // 箭河
 // let target = 'http://192.168.3.148:8000' //邹璇
-// let target = 'http://192.168.3.57:8000' //勇哥
+// let target = 'http://192.168.3.112:8000' //勇哥
 // let target = 'http://dev.dayaedu.com' // 开发环境
 let target = 'https://test.dayaedu.com' //测试环境
 // let target = 'http://192.168.3.134' // 乔

部分文件因为文件数量过多而无法显示