lex-xin 5 năm trước cách đây
mục cha
commit
50e62437dd
2 tập tin đã thay đổi với 61 bổ sung6 xóa
  1. 59 4
      src/views/studentManager/studentList.vue
  2. 2 2
      vue.config.js

+ 59 - 4
src/views/studentManager/studentList.vue

@@ -7,6 +7,8 @@
       <div class="newBand"
            v-permission="'studentManage/register'"
            @click="addStudent">新增学员</div>
+      <div class="newBand"
+           @click="onCreateQRCode">学员激活列表</div>
       <!-- 搜索标题 -->
       <el-form :inline="true"
                class="searchForm"
@@ -41,8 +43,8 @@
           <el-input placeholder="学生姓名"
                     @keyup.enter.native='onSearch'
                     v-model="searchForm.studentName"></el-input>
-        </el-form-item>
-        <el-form-item> -->
+        </el-form-item> -->
+        <el-form-item>
         <el-button @click="onSearch"
                    type="danger">搜索</el-button>
         <el-button @click="onReSet"
@@ -180,12 +182,27 @@
                    @click="resetStudentSubmie">确 定</el-button>
       </div>
     </el-dialog>
+
+    <el-dialog :visible.sync="qrcodeStatus"
+               center
+               width="300px">
+      <div class="right-code">
+        <h2 class="title">学员激活列表</h2>
+        <div id="qrcode"
+             class="qrcode code"
+             ref="qrCodeUrl"></div>
+        <!-- <p class="code-url"
+           v-if="codeUrl2">{{ codeUrl2 }}</p> -->
+      </div>
+    </el-dialog>
   </div>
 </template>
 <script>
 import pagination from '@/components/Pagination/index'
 import { queryStudentList, getStudentInfoByPhone, registerStudent, updateStudent } from '@/api/studentManager'
+import { vaildStudentUrl } from '@/utils/validate'
 import { getEmployeeOrgan } from '@/api/buildTeam'
+import QRCode from 'qrcodejs2'
 import store from '@/store'
 export default {
   name: 'studentList',
@@ -227,7 +244,10 @@ export default {
       },
       isNew: false,
       active: null,
-      maskName: '新增学员'
+      maskName: '新增学员',
+      qrcodeStatus: false,
+      qrcodes: true,
+      activeRow: null
     }
   },
   mounted () {
@@ -249,6 +269,28 @@ export default {
       this.pageInfo.page = 1;
       this.getList()
     },
+     onCreateQRCode () { // 生成报名二维码
+      this.qrcodeStatus = true
+      // let id = this.$route.query.id
+      // let teamName = this.$route.query.name
+
+      setTimeout(() => {
+        if (this.qrcodes) {
+          this.qrcodes = false
+          this.qrcode = new QRCode('qrcode', {
+            width: 250,
+            height: 250,
+            colorDark: '#000000',
+            colorLight: '#ffffff',
+            correctLevel: QRCode.CorrectLevel.H
+          })
+        }
+        // vaildStudentUrl() + `/#/sporadicLogin?id=${刷刷刷}`
+        this.qrcode.clear();
+        this.qrcode.makeCode(vaildStudentUrl() + `/#/queryStudentPer`)
+        // this.codeUrl = vaildStudentUrl() + '/#/login?musicGroupId=' + id
+      }, 500)
+    },
     getList () {
       let params = this.searchForm
       params.rows = this.pageInfo.limit
@@ -374,5 +416,18 @@ export default {
   }
 }
 </script>
-<style lang="scss">
+<style lang="scss" scoped>
+.newBand {
+  display: inline-block;
+  margin-right: 10px;
+}
+.right-code {
+  // width: 50%;
+  // float: left;
+  .title {
+    font-size: 18px;
+    text-align: center;
+    padding-bottom: 8px;
+  }
+}
 </style>

+ 2 - 2
vue.config.js

@@ -17,9 +17,9 @@ const name = defaultSettings.title || '管乐迷后台管理系统' // page titl
 // http://47.99.212.176:8000 
 // //  https://online.dayaedu.com
 // let target = 'https://online.dayaedu.com' //线上
-// let target = 'http://testadm.dayaedu.com/' //勇哥迁库
+let target = 'http://testadm.dayaedu.com/' //勇哥迁库
 // let target = 'http://192.168.3.27:8000' // 箭河
-let target = 'http://192.168.3.28:8000' //邹璇
+// let target = 'http://192.168.3.28:8000' //邹璇
 // let target = 'http://192.168.3.8:18000' //勇哥
 // let target = 'http://47.99.212.176:8000' // 测试服
 // let target = 'http://192.168.3.48:8080' // 乔