dusenyao преди 3 години
родител
ревизия
d903e3c1b8

Файловите разлики са ограничени, защото са твърде много
+ 22 - 22683
package-lock.json


+ 8 - 6
package.json

@@ -39,18 +39,20 @@
     "eslint-plugin-prettier": "^3.4.1",
     "eslint-plugin-vue": "^7.9.0",
     "html-webpack-plugin": "^5.3.1",
-    "node-sass": "^5.0.0",
     "prettier": "2.3.2",
     "sass": "^1.32.13",
     "sass-loader": "^10.2.0",
     "script-ext-html-webpack-plugin": "^2.1.5",
-    "stylelint": "^13.13.1",
+    "postcss": "^8.3.11",
+    "postcss-html": "^1.2.0",
+    "stylelint": "^14.0.1",
+    "stylelint-config-prettier": "^9.0.3",
     "stylelint-config-recess-order": "^2.5.0",
-    "stylelint-config-sass-guidelines": "^8.0.0",
-    "stylelint-config-standard": "^22.0.0",
+    "stylelint-config-recommended-vue": "^1.0.0",
+    "stylelint-config-sass-guidelines": "^9.0.1",
+    "stylelint-config-standard-scss": "^2.0.1",
     "stylelint-declaration-block-no-ignored-properties": "^2.4.0",
-    "stylelint-scss": "^3.20.1",
-    "stylelint-webpack-plugin": "^2.2.2",
+    "stylelint-webpack-plugin": "^3.1.0",
     "svg-sprite-loader": "^6.0.9",
     "svgo": "^2.5.0",
     "vue-loader": "^15.9.7",

+ 15 - 0
src/api/list.js

@@ -44,3 +44,18 @@ export function pageQueryOrgList(data) {
     data
   });
 }
+
+/**
+ * 分页查询机构学员用户列表
+ * @param {Object} data
+ */
+export function PageQueryOrgStudentUserList(data) {
+  let params = getRequestParameter('user_manager-PageQueryOrgStudentUserList');
+
+  return request({
+    method: 'post',
+    url: process.env.VUE_APP_FileServer,
+    params,
+    data
+  });
+}

+ 16 - 0
src/api/student.js

@@ -0,0 +1,16 @@
+import { request, getRequestParameter } from '@/utils/request';
+
+/**
+ * 审核机构学员用户
+ * @param {Object} data
+ */
+export function AuditOrgStudentUser(data) {
+  let params = getRequestParameter('user_manager-AuditOrgStudentUser');
+
+  return request({
+    method: 'post',
+    url: process.env.VUE_APP_FileServer,
+    params,
+    data
+  });
+}

+ 1 - 1
src/api/user.js

@@ -28,7 +28,7 @@ export function UpdateMyPassword(data) {
 }
 
 /**
- * .重置机构管理员密码
+ * 重置机构管理员密码
  * @param {Object} data { user_id 用户ID password 密码 }
  */
 export function ResetOrgAdminPassword(data) {

+ 7 - 2
src/layouts/components/LayoutHeader.vue

@@ -78,6 +78,11 @@ export default {
           isShow: popedomList.includes(1000003)
         },
         {
+          path: '/student_manager',
+          name: '机构学生',
+          isShow: popedomList.includes(1000003)
+        },
+        {
           path: '/vocabulary',
           name: '多语言词汇',
           isShow: is_inner
@@ -88,7 +93,7 @@ export default {
           isShow: is_inner
         },
         {
-          path: '/settings/LiveRoomConfig',
+          path: '/settings/index/LiveRoomConfig',
           name: '系统配置',
           isShow: is_inner
         }
@@ -142,7 +147,7 @@ export default {
     background-color: #fff;
 
     &-logo {
-      margin-top: -15px;
+      margin-top: -5px;
     }
 
     &-tab {

+ 19 - 3
src/router/index.js

@@ -110,6 +110,22 @@ const routes = [
     ]
   },
   {
+    path: '/student_manager',
+    component: Layout,
+    meta: { title: '机构学生' },
+    redirect: { name: 'StudentManager' },
+    children: [
+      {
+        path: '/student_manager/index',
+        name: 'StudentManager',
+        component: () => import('@/views/student_manager'),
+        beforeEnter: (to, form, next) => {
+          beforeRouterPopedom(1000003, next);
+        }
+      }
+    ]
+  },
+  {
     path: '/vocabulary',
     component: Layout,
     meta: { title: '多语言词汇' },
@@ -146,14 +162,14 @@ const routes = [
     path: '/settings',
     component: Layout,
     meta: { title: '系统配置' },
-    redirect: '/settings/index',
+    redirect: '/settings/index/LiveRoomConfig',
     children: [
       {
         path: '/settings/index',
         component: () => import('@/views/settings'),
         children: [
           {
-            path: '/settings/LiveRoomConfig',
+            path: 'LiveRoomConfig',
             meta: {
               name: 'LiveRoomConfig'
             },
@@ -163,7 +179,7 @@ const routes = [
             }
           },
           {
-            path: '/settings/SXYZFConfig',
+            path: 'SXYZFConfig',
             meta: {
               name: 'SXYZFConfig'
             },

+ 2 - 1
src/views/login/index.vue

@@ -125,7 +125,7 @@ export default {
   min-width: 1000px;
   height: 100%;
   padding-top: 55px;
-  background: linear-gradient(rgba(0, 0, 0, 0.45), rgba(0, 0, 0, 0.45)), url('../../assets/login.png');
+  background: linear-gradient(rgba(0, 0, 0, 45%), rgba(0, 0, 0, 45%)), url('../../assets/login.png');
   background-size: cover;
 
   // 主容器
@@ -201,6 +201,7 @@ export default {
       }
     }
   }
+
   // 底部
   &-footer {
     position: fixed;

+ 1 - 0
src/views/org_manager/AddOrg.vue

@@ -131,6 +131,7 @@ export default {
 
 <style lang="scss">
 @import '~@/styles/mixin';
+
 $avatar-width: 310px;
 
 .add-org {

+ 1 - 1
src/views/settings/index.vue

@@ -29,7 +29,7 @@ export default {
   methods: {
     handleSelect(key) {
       if (this.$route.meta.name === key) return;
-      this.$router.push(`/settings/${key}`);
+      this.$router.push(`/settings/index/${key}`);
     }
   }
 };

+ 207 - 0
src/views/student_manager/index.vue

@@ -0,0 +1,207 @@
+<template>
+  <div class="student-manager">
+    <!--搜索-->
+    <div class="student-manager-search">
+      <el-row type="flex" justify="space-between">
+        <el-col :span="20">
+          <span class="search-name">用户名</span>
+          <el-input
+            v-model="user_name"
+            class="account-search"
+            type="text"
+            @keyup.enter.native="pageQueryOrgStudentUserList"
+          />
+          <span class="search-name">姓名</span>
+          <el-input
+            v-model="user_real_name"
+            class="account-search"
+            type="text"
+            @keyup.enter.native="pageQueryOrgStudentUserList"
+          />
+          <span class="search-name">有效</span>
+          <el-select v-model="is_valid" class="account-search">
+            <el-option v-for="item in validList" :key="item.value" :label="item.label" :value="item.value" />
+          </el-select>
+          <span class="search-name">审核</span>
+          <el-select v-model="is_audited" class="account-search">
+            <el-option v-for="item in auditList" :key="item.value" :label="item.label" :value="item.value" />
+          </el-select>
+        </el-col>
+        <el-col :span="2">
+          <el-button class="search-button" icon="el-icon-search" @click="pageQueryOrgStudentUserList"></el-button>
+        </el-col>
+      </el-row>
+    </div>
+    <!-- 表格 -->
+    <div class="student-manager-list">
+      <div class="student-manager-list-title">
+        <div>学生列表</div>
+      </div>
+      <el-table :data="org_student_user_list">
+        <el-table-column prop="user_name" label="用户名" width="180" />
+        <el-table-column prop="user_real_name" label="姓名" width="180" />
+        <el-table-column prop="org_name" label="机构名称" width="180" />
+        <el-table-column prop="user_phone" label="手机号" width="120" />
+        <el-table-column prop="user_email" label="邮箱" width="180" />
+        <el-table-column prop="is_audited" label="已审核">
+          <template slot-scope="{ row }">
+            <div :style="{ 'text-align': 'center', width: '40px' }">{{ row.is_audited === 'true' ? '√' : '' }}</div>
+          </template>
+        </el-table-column>
+        <el-table-column prop="is_valid" label="有效">
+          <template slot-scope="{ row }">
+            <div :style="{ 'text-align': 'center', width: '40px' }">{{ row.is_valid === 'true' ? '√' : '' }}</div>
+          </template>
+        </el-table-column>
+        <el-table-column fixed="right" width="180">
+          <template slot-scope="{ row }">
+            <el-row type="flex" justify="space-between">
+              <el-col>
+                <el-link
+                  :underline="false"
+                  :type="row.is_audited === 'true' ? 'danger' : 'success'"
+                  @click="auditOrgStudentUser(row)"
+                >
+                  审核{{ row.is_audited === 'true' ? '拒绝' : '同意' }}
+                </el-link>
+              </el-col>
+            </el-row>
+          </template>
+        </el-table-column>
+      </el-table>
+    </div>
+    <el-pagination
+      background
+      :page-sizes="[10, 20, 30, 40, 50]"
+      :page-size="page_capacity"
+      layout="prev, pager, next, total, sizes, jumper"
+      :total="total_count"
+      :current-page="cur_page"
+      @prev-click="changePage"
+      @next-click="changePage"
+      @current-change="changePage"
+      @size-change="changePageSize"
+    />
+  </div>
+</template>
+
+<script>
+import { PageQueryOrgStudentUserList } from '@/api/list';
+import { AuditOrgStudentUser } from '@/api/student';
+import { GetOrgList_User } from '@/api/org';
+
+export default {
+  data() {
+    return {
+      user_name: '',
+      user_real_name: '',
+      is_valid: '',
+      validList: [
+        {
+          value: '',
+          label: '所有'
+        },
+        {
+          value: 'true',
+          label: '有效'
+        },
+        {
+          value: 'false',
+          label: '无效'
+        }
+      ],
+      auditList: [
+        {
+          value: '',
+          label: '所有'
+        },
+        {
+          value: 'true',
+          label: '已审核'
+        },
+        {
+          value: 'false',
+          label: '未审核'
+        }
+      ],
+      is_audited: '',
+      org_student_user_list: [],
+      page_capacity: 10,
+      total_count: 0,
+      cur_page: 1
+    };
+  },
+  created() {
+    this.pageQueryOrgStudentUserList();
+  },
+  methods: {
+    pageQueryOrgStudentUserList() {
+      PageQueryOrgStudentUserList({
+        user_name: this.user_name,
+        user_real_name: this.user_real_name,
+        is_valid: this.is_valid,
+        is_audited: this.is_audited,
+        page_capacity: this.page_capacity,
+        cur_page: this.cur_page
+      }).then(({ org_student_user_list, total_page, cur_page, total_count }) => {
+        this.org_student_user_list = org_student_user_list;
+        this.cur_page = cur_page;
+        this.total_page = total_page;
+        this.total_count = total_count;
+      });
+    },
+    changePage(newPage) {
+      this.cur_page = newPage;
+      this.pageQueryOrgStudentUserList();
+    },
+    changePageSize(pageSize) {
+      this.page_capacity = pageSize;
+      this.pageQueryOrgStudentUserList();
+    },
+
+    auditOrgStudentUser(row) {
+      AuditOrgStudentUser({
+        id_list: [row.id],
+        is_audited: row.is_audited !== 'true'
+      }).then(() => {
+        this.$router.go(0);
+      });
+    }
+  }
+};
+</script>
+
+<style lang="scss" scoped>
+@import '~@/styles/mixin';
+
+.student-manager {
+  @include container;
+  @include pagination;
+
+  padding: 24px 0 46px;
+
+  &-search {
+    span.search-name {
+      margin-right: 14px;
+    }
+
+    .account-search {
+      width: 140px;
+      margin-right: 48px;
+    }
+
+    .search-button {
+      float: right;
+    }
+  }
+
+  &-list {
+    @include list;
+
+    &-title {
+      font-size: 20px;
+      font-weight: 400;
+    }
+  }
+}
+</style>

+ 2 - 4
src/views/teacher_manager/index.vue

@@ -132,11 +132,10 @@ export default {
     },
     // 审核教师
     auditOrgTeacher(row) {
-      let data = {
+      auditOrgTeacherUser({
         id_list: [row.id],
         is_audited: row.is_audited !== 'true'
-      };
-      auditOrgTeacherUser(data).then(response => {
+      }).then(response => {
         if (response.status) {
           this.$router.go(0);
         } else {
@@ -157,7 +156,6 @@ export default {
             arr[i] = el;
           });
           this.popedom_list = response.popedom_list;
-          console.log(this.popedom_list);
         } else {
           this.$message({
             type: 'error',

+ 4 - 3
stylelint.config.js

@@ -1,10 +1,11 @@
 module.exports = {
   defaultSeverity: 'warning',
   extends: [
-    'stylelint-config-standard',
-    'stylelint-scss',
+    'stylelint-config-standard-scss',
+    'stylelint-config-recommended-vue',
     'stylelint-config-sass-guidelines',
-    'stylelint-config-recess-order'
+    'stylelint-config-recess-order',
+    'stylelint-config-prettier'
   ],
   plugins: ['stylelint-declaration-block-no-ignored-properties'],
   rules: {

+ 5 - 7
vue.config.js

@@ -34,13 +34,13 @@ module.exports = {
   runtimeCompiler: true,
   productionSourceMap: false,
   devServer: {
-    port: port,
+    port,
     open: true, // 默认false true自动打开网页
     overlay: {
       warnings: false,
       errors: true
     },
-    proxy: proxy
+    proxy
   },
   css: {
     loaderOptions: {
@@ -51,7 +51,7 @@ module.exports = {
     }
   },
   configureWebpack: {
-    name: name,
+    name,
     // 配置路径别名
     resolve: {
       alias: {
@@ -63,10 +63,8 @@ module.exports = {
     plugins: [
       new StyleLintPlugin({
         files: ['**/*.{vue,htm,html,css,sss,less,scss,sass}'],
-        fix: false, // 是否自动修复
-        cache: true, // 是否缓存
-        emitErrors: true,
-        failOnError: false
+        fix: true, // 是否自动修复
+        cache: true // 是否缓存
       })
     ]
   },

Някои файлове не бяха показани, защото твърде много файлове са промени