Browse Source

实现后台首页通用组件以及用户管理首页

huxz 8 years ago
parent
commit
b5ee99b286
24 changed files with 1016 additions and 20 deletions
  1. 1 1
      sso-manage-console-web/index.html
  2. 1 0
      sso-manage-console-web/package.json
  3. 33 9
      sso-manage-console-web/src/App.vue
  4. 23 0
      sso-manage-console-web/src/Constant.js
  5. 28 0
      sso-manage-console-web/src/components/accounts/AccountIndex.vue
  6. 48 0
      sso-manage-console-web/src/components/accounts/AccountMenu.vue
  7. 114 0
      sso-manage-console-web/src/components/accounts/appeals/AppealHome.vue
  8. 5 0
      sso-manage-console-web/src/components/accounts/appeals/index.js
  9. 269 0
      sso-manage-console-web/src/components/accounts/common/CommonHome.vue
  10. 102 0
      sso-manage-console-web/src/components/accounts/enterprises/EnterpriseHome.vue
  11. 5 0
      sso-manage-console-web/src/components/accounts/enterprises/index.js
  12. 196 0
      sso-manage-console-web/src/components/accounts/users/UserHome.vue
  13. 5 0
      sso-manage-console-web/src/components/accounts/users/index.js
  14. 72 0
      sso-manage-console-web/src/components/common/NavHeader.vue
  15. 3 1
      sso-manage-console-web/src/components/common/index.js
  16. 1 1
      sso-manage-console-web/src/components/user/UserHome.vue
  17. 5 1
      sso-manage-console-web/src/main.js
  18. 32 2
      sso-manage-console-web/src/router/index.js
  19. BIN
      sso-manage-console-web/static/images/data.png
  20. BIN
      sso-manage-console-web/static/images/logo/uas.png
  21. 25 2
      sso-manage-console-web/yarn.lock
  22. 12 1
      sso-manage-console/src/main/java/com/uas/sso/sso/backend/api/UserManageController.java
  23. 4 1
      sso-manage-console/src/main/java/com/uas/sso/sso/backend/service/UserService.java
  24. 32 1
      sso-manage-console/src/main/java/com/uas/sso/sso/backend/service/impl/UserServiceImpl.java

+ 1 - 1
sso-manage-console-web/index.html

@@ -5,7 +5,7 @@
     <meta name="viewport" content="width=device-width,initial-scale=1.0">
     <title>sso-manage-console-web</title>
   </head>
-  <body class="home-template">
+  <body>
     <div id="app"></div>
     <!-- built files will be auto injected -->
   </body>

+ 1 - 0
sso-manage-console-web/package.json

@@ -13,6 +13,7 @@
   "dependencies": {
     "axios": "^0.17.1",
     "bootstrap": "3",
+    "element-ui": "^2.0.11",
     "font-awesome": "^4.7.0",
     "lodash": "^4.17.4",
     "mini-toastr": "^0.7.2",

+ 33 - 9
sso-manage-console-web/src/App.vue

@@ -1,24 +1,48 @@
 <template>
   <div id="app">
-    <nav-bar/>
-    <!--<img src="./assets/logo.png">-->
-    <router-view/>
+    <nav-header></nav-header>
+
+    <!--<div class="container">
+      <div class="row">
+        <div class="col-lg-2">
+          ABC
+        </div>
+        <div class="col-lg-10">
+          1234
+        </div>
+      </div>
+    </div>-->
+    <router-view></router-view>
   </div>
 </template>
 
 <script>
-import NavBar from '@/components/common/NavBar'
+  import NavBar from '@/components/common/NavBar'
+  import {NavHeader} from '@/components/common'
 
-export default {
+  export default {
   name: 'app',
   components: {
-    NavBar
+    NavBar,
+    NavHeader
   }
 }
 </script>
 
+<!-- Global CSS for all vue components -->
 <style>
-a:hover, a:visited, a:focus {
-  text-decoration: none;
-}
+  html, body {
+    /* TODO 1920 * 880 */
+    width: 100%;
+    height: 100%;
+    font-family: "Microsoft YaHei", "Microsoft YaHei UI", sans-serif;
+  }
+  a:hover, a:visited, a:focus {
+    text-decoration: none;
+  }
+</style>
+
+<!-- scoped CSS -->
+<style scoped>
+
 </style>

+ 23 - 0
sso-manage-console-web/src/Constant.js

@@ -0,0 +1,23 @@
+const ValidCode = [
+  {
+    label: '未申请',
+    key: 'NOT_APPLYING',
+    value: 0
+  }, {
+    label: '待认证',
+    key: 'TO_BE_CERTIFIED',
+    value: 1
+  }, {
+    label: '已认证',
+    key: 'AUTHENTICATED',
+    value: 2
+  }, {
+    label: '未通过',
+    key: 'NOT_PASSED',
+    value: 3
+  }
+]
+
+export {
+  ValidCode
+}

+ 28 - 0
sso-manage-console-web/src/components/accounts/AccountIndex.vue

@@ -0,0 +1,28 @@
+<template>
+  <div class="container-fluid">
+    <div class="row">
+      <account-menu></account-menu>
+
+      <div class="col-lg-10 main-content">
+        <router-view></router-view>
+      </div>
+    </div>
+  </div>
+</template>
+
+<script>
+  import AccountMenu from './AccountMenu'
+
+  export default {
+    name: 'account-index',
+    components: {
+      AccountMenu
+    }
+  }
+</script>
+
+<style scoped>
+  .main-content {
+    padding: 0;
+  }
+</style>

+ 48 - 0
sso-manage-console-web/src/components/accounts/AccountMenu.vue

@@ -0,0 +1,48 @@
+<template>
+  <div class="col-lg-2 menu-column">
+    <ul class="nav nav-pills nav-stacked">
+      <router-link tag="li" active-class="active" :to="{ name: 'EnterpriseHome' }">
+        <a><img src="/static/images/data.png" alt="Data">企业管理</a>
+      </router-link>
+      <router-link tag="li" active-class="active" :to="{ name: 'UserHome' }">
+        <a><img src="/static/images/data.png" alt="Data">用户管理</a>
+      </router-link>
+      <router-link tag="li" active-class="active" :to="{ name: 'AppealHome' }">
+        <a><img src="/static/images/data.png" alt="Data">申诉管理</a>
+      </router-link>
+    </ul>
+  </div>
+</template>
+
+<script>
+  export default {
+    name: 'account-menu'
+  }
+</script>
+
+<style scoped>
+  .menu-column {
+    padding: 16px 0 0;
+    min-height: 583px;
+    background-color: #303743;
+  }
+  .nav li>a {
+    padding: 15px 15px 15px 48px;
+    height: 44px;
+    line-height: 14px;
+    color: #FFFFFF;
+    font-size: 14px;
+    font-family: "SimHei", "黑体", sans-serif;
+  }
+  .nav li.active>a,
+  .nav li>a:focus,
+  .nav li>a:hover {
+    background-color: #4E8EFc;
+    border-radius: 0;
+  }
+  .nav li>a img {
+    display: block;
+    float: left;
+    margin-right: 10px;
+  }
+</style>

+ 114 - 0
sso-manage-console-web/src/components/accounts/appeals/AppealHome.vue

@@ -0,0 +1,114 @@
+<template>
+  <common-home>
+    <div slot="screen-type">
+      <!-- 申诉类型 -->
+      <label>申诉类型</label>
+      <el-select v-model="value" placeholder="不限">
+        <el-option
+          v-for="item in options"
+          :key="item.value"
+          :label="item.label"
+          :value="item.value">
+        </el-option>
+      </el-select>
+
+      <!-- 申诉来源 -->
+      <label>申诉来源</label>
+      <el-select v-model="value" placeholder="不限">
+        <el-option
+          v-for="item in options"
+          :key="item.value"
+          :label="item.label"
+          :value="item.value">
+        </el-option>
+      </el-select>
+
+      <!-- 申诉状态 -->
+      <label>申诉状态</label>
+      <el-select v-model="value" placeholder="不限">
+        <el-option
+          v-for="item in options"
+          :key="item.value"
+          :label="item.label"
+          :value="item.value">
+        </el-option>
+      </el-select>
+    </div>
+
+    <el-table
+      :data="tableData"
+      stripe
+      style="width: 100%">
+      <el-table-column
+        label="操作"
+        width="130"
+        align="center">
+        <template slot-scope="scope">
+          <el-button @click="handleClick(scope.row)" type="text" size="small">查看</el-button>
+        </template>
+      </el-table-column>
+      <el-table-column
+        prop="name"
+        label="姓名"
+        width="180">
+      </el-table-column>
+      <el-table-column
+        prop="address"
+        label="地址">
+      </el-table-column>
+    </el-table>
+  </common-home>
+</template>
+
+<script>
+  import CommonHome from '../common/CommonHome'
+
+  export default {
+    name: 'user-home',
+    components: {
+      CommonHome
+    },
+    data () {
+      return {
+        tableData: [{
+          date: '查看',
+          name: '王小虎',
+          address: '上海市普陀区金沙江路 1518 弄'
+        }, {
+          date: '查看',
+          name: '王小虎',
+          address: '上海市普陀区金沙江路 1517 弄'
+        }, {
+          date: '查看',
+          name: '王小虎',
+          address: '上海市普陀区金沙江路 1519 弄'
+        }, {
+          date: '查看',
+          name: '王小虎',
+          address: '上海市普陀区金沙江路 1516 弄'
+        }],
+        options: [{
+          value: '选项1',
+          label: '黄金糕'
+        }, {
+          value: '选项2',
+          label: '双皮奶'
+        }, {
+          value: '选项3',
+          label: '蚵仔煎'
+        }, {
+          value: '选项4',
+          label: '龙须面'
+        }, {
+          value: '选项5',
+          label: '北京烤鸭'
+        }],
+        value: ''
+      }
+    }
+  }
+</script>
+
+<style scoped>
+
+</style>

+ 5 - 0
sso-manage-console-web/src/components/accounts/appeals/index.js

@@ -0,0 +1,5 @@
+import AppealHome from './AppealHome'
+
+export {
+  AppealHome
+}

+ 269 - 0
sso-manage-console-web/src/components/accounts/common/CommonHome.vue

@@ -0,0 +1,269 @@
+<template>
+  <div>
+    <el-container>
+      <el-header>
+        <el-row type="flex" class="row-bg" justify="space-between">
+          <!-- 认证状态 -->
+          <div class="select-group appeal-conditions">
+            <slot name="screen-type"></slot>
+          </div>
+
+          <!-- 搜索 -->
+          <div class="select-group search-conditions">
+            <el-row type="flex" class="row-bg">
+              <el-select v-model="commonKey" placeholder="请选择">
+                <el-option
+                  v-for="item in searchKeys"
+                  :key="item.value"
+                  :label="item.label"
+                  :value="item.value">
+                </el-option>
+              </el-select>
+              <div class="input-group" style="width: 242px;margin-left: 5px;">
+                <input type="text" class="form-control search-keyword" title="keyword" v-model="commonKeyword">
+                <span class="input-group-btn">
+                  <button class="btn btn-default btn-search" type="button" @click="() => $emit('search', commonKey, commonKeyword)">搜索</button>
+                </span>
+              </div>
+            </el-row>
+          </div>
+        </el-row>
+      </el-header>
+      <el-main>
+        <slot></slot>
+      </el-main>
+      <el-footer>
+        <el-row type="flex" class="row-bg">
+          <button
+            type="button"
+            class="btn btn-default btn-refresh"
+            @click="() => $emit('refresh-data')">
+            刷新
+          </button>
+
+          <div class="pagination-area">
+            <el-pagination
+              background
+              layout="prev, pager, next"
+              prev-text="< 上一页"
+              next-text="下一页 >"
+              :page-size="pageSize"
+              :total="total"
+              @current-change="currentPage => $emit('current-change', currentPage)">
+            </el-pagination>
+          </div>
+        </el-row>
+      </el-footer>
+    </el-container>
+  </div>
+</template>
+
+<script>
+  export default {
+    name: 'common-home',
+    props: {
+      pageSize: Number,
+      total: Number,
+      searchKeys: Array,
+      searchKey: String,
+      searchKeyword: String
+    },
+    data () {
+      return {
+        commonKey: this.searchKey,
+        commonKeyword: this.searchKeyword
+      }
+    },
+    watch: {
+      searchKey: function (value) {
+        this.commonKey = value
+      },
+      commonKey: function (value) {
+        this.$emit('update:searchKey', value)
+      },
+      searchKeyword: function (value) {
+        this.commonKeyword = value
+      },
+      commonKeyword: function (value) {
+        this.$emit('update:searchKeyword', value)
+      }
+    }
+  }
+</script>
+
+<style scoped>
+  .el-header {
+    height: 60px;
+    padding-right: 10px;
+    padding-left: 22px;
+    background-color: #E6EDF1;
+    justify-content: space-between;
+  }
+  .el-main {
+    height: 463px;
+    padding: 0;
+  }
+  .el-footer {
+    height: 64px;
+    background-color: #E8EDF1;
+  }
+  .select-group {
+    padding: 15px 0;
+  }
+  .input-group-btn:before{
+    content: '';
+    position: absolute;
+    top: 10px;
+    left: 0;
+    width: 1px;
+    height: 13px;
+    background: #D2D2D2;
+    z-index: 5;
+  }
+  .search-keyword {
+    width: 186px;
+    height: 32px;
+    border-radius: 0;
+    border-right-style: none;
+    box-shadow: none;
+    -webkit-box-shadow: none;
+  }
+  .search-keyword:focus,
+  .search-keyword:active,
+  .search-keyword:visited {
+    border-color: #CCCCCC;
+  }
+  .btn-search {
+    width: 58px;
+    height: 32px;
+    border-radius: 0;
+    border-left-style: none;
+    outline: none;
+    box-shadow: none;
+    -webkit-box-shadow: none;
+
+    color: #2281E1;
+    font-size: 13px;
+    font-family: "Microsoft YaHei", sans-serif;
+  }
+  .btn-search:active,
+  .btn-search:hover,
+  .btn-search:focus,
+  .btn-search:visited {
+    outline: none;
+    background-color: #FFFFFF;
+    border-color: #CCCCCC;
+  }
+  .btn-refresh {
+    margin: 17px 0;
+    width: 50px;
+    height: 28px;
+    border-radius: 0;
+
+    color: #000000;
+    font-size: 13px;
+    font-family: "Microsoft YaHei", sans-serif;
+  }
+  .pagination-area {
+    padding: 17px 0 17px 150px;
+  }
+</style>
+
+<style>
+  /* screen select */
+  .appeal-conditions div label {
+    margin: 0 14px 0 28px;
+    color: #000000;
+    font-size: 13px;
+    font-family: "Microsoft YaHei", sans-serif;
+  }
+  .appeal-conditions div label:first-child {
+    margin-left: 0;
+  }
+  /* element ui */
+  .el-select .el-input .el-input__inner {
+    color: #505050;
+    font-size: 13px;
+    font-family: "Microsoft YaHei", sans-serif;
+  }
+  .el-select .el-input input.el-input__inner::-webkit-input-placeholder {
+    color: #505050;
+    font-size: 13px;
+    font-family: "Microsoft YaHei", sans-serif;
+  }
+  .el-select .el-input input.el-input__inner:-moz-placeholder {
+    color: #505050;
+    font-size: 13px;
+    font-family: "Microsoft YaHei", sans-serif;
+  }
+  .el-select .el-input input.el-input__inner::-moz-placeholder {
+    color: #505050;
+    font-size: 13px;
+    font-family: "Microsoft YaHei", sans-serif;
+  }
+  .el-select .el-input input.el-input__inner:-ms-input-placeholder {
+    color: #505050;
+    font-size: 13px;
+    font-family: "Microsoft YaHei", sans-serif;
+  }
+  .appeal-conditions .el-input .el-input__inner {
+    height: 32px;
+    width: 100px;
+    border-radius: 0;
+  }
+  .search-conditions .el-input .el-input__inner {
+    height: 32px;
+    width: 120px;
+    border-radius: 0;
+  }
+  .el-pagination button, .el-pagination span:not([class*=suffix]) {
+    color: #000000;
+    font-weight: normal;
+  }
+  .el-pagination.is-background .btn-next, .el-pagination.is-background .btn-prev, .el-pagination.is-background .el-pager li {
+    font-weight: normal;
+  }
+  .el-pagination.is-background .el-pager li.active {
+    background-color: #303743;
+    color: #fff;
+  }
+  .el-table th.is-leaf:first-child {
+    padding-left: 40px;
+  }
+  .el-table--enable-row-transition .el-table__body td:first-child {
+    padding-left: 40px;
+  }
+  .el-table th>.cell {
+    color: #000000;
+    font-size: 13px;
+    font-weight: normal;
+    font-family: "Microsoft YaHei", sans-serif;
+  }
+  .el-table th {
+    padding: 9px 8px 8px;
+  }
+  .el-table--enable-row-hover .el-table__body tr:hover>td {
+    background-color: #D0E5F5;
+
+    color: #000000;
+    font-size: 13px;
+    font-family: "Microsoft YaHei", sans-serif;
+  }
+  /* striped row */
+  .el-table--enable-row-hover .el-table__body tr.el-table__row--striped:hover>td {
+    background-color: #D0E5F5;
+
+    color: #000000;
+    font-size: 13px;
+    font-family: "Microsoft YaHei", sans-serif;
+  }
+  .el-table td {
+    padding: 4px 0;
+
+    font-size: 13px;
+    font-family: "Microsoft YaHei", sans-serif;
+  }
+  .el-table--striped .el-table__body tr.el-table__row--striped td {
+    background: #F4F4F4;
+  }
+</style>

+ 102 - 0
sso-manage-console-web/src/components/accounts/enterprises/EnterpriseHome.vue

@@ -0,0 +1,102 @@
+<template>
+  <common-home>
+    <div slot="screen-type">
+      <label>认证状态</label>
+      <el-select v-model="value" placeholder="不限">
+        <el-option
+          v-for="item in options"
+          :key="item.value"
+          :label="item.label"
+          :value="item.value">
+        </el-option>
+      </el-select>
+
+      <!-- 注册来源 -->
+      <label>注册来源</label>
+      <el-select v-model="value" placeholder="不限">
+        <el-option
+          v-for="item in options"
+          :key="item.value"
+          :label="item.label"
+          :value="item.value">
+        </el-option>
+      </el-select>
+    </div>
+
+    <el-table
+      :data="tableData"
+      stripe
+      style="width: 100%">
+      <el-table-column
+        label="操作"
+        width="130"
+        align="center">
+        <template slot-scope="scope">
+          <el-button @click="handleClick(scope.row)" type="text" size="small">查看</el-button>
+        </template>
+      </el-table-column>
+      <el-table-column
+        prop="name"
+        label="姓名"
+        width="180">
+      </el-table-column>
+      <el-table-column
+        prop="address"
+        label="地址">
+      </el-table-column>
+    </el-table>
+  </common-home>
+</template>
+
+<script>
+  import CommonHome from '../common/CommonHome'
+
+  export default {
+    name: 'enterprise-home',
+    components: {
+      CommonHome
+    },
+    data () {
+      return {
+        tableData: [{
+          date: '查看',
+          name: '王小虎',
+          address: '上海市普陀区金沙江路 1518 弄'
+        }, {
+          date: '查看',
+          name: '王小虎',
+          address: '上海市普陀区金沙江路 1517 弄'
+        }, {
+          date: '查看',
+          name: '王小虎',
+          address: '上海市普陀区金沙江路 1519 弄'
+        }, {
+          date: '查看',
+          name: '王小虎',
+          address: '上海市普陀区金沙江路 1516 弄'
+        }],
+        options: [{
+          value: '选项1',
+          label: '黄金糕'
+        }, {
+          value: '选项2',
+          label: '双皮奶'
+        }, {
+          value: '选项3',
+          label: '蚵仔煎'
+        }, {
+          value: '选项4',
+          label: '龙须面'
+        }, {
+          value: '选项5',
+          label: '北京烤鸭'
+        }],
+        value: ''
+      }
+    }
+  }
+</script>
+
+<style scoped>
+
+</style>

+ 5 - 0
sso-manage-console-web/src/components/accounts/enterprises/index.js

@@ -0,0 +1,5 @@
+import EnterpriseHome from './EnterpriseHome'
+
+export {
+  EnterpriseHome
+}

+ 196 - 0
sso-manage-console-web/src/components/accounts/users/UserHome.vue

@@ -0,0 +1,196 @@
+<template>
+  <common-home
+    :pageSize="pageParams.size"
+    :total="total"
+    :searchKeys="searchKeys"
+    :searchKey="pageParams.key"
+    :searchKeyword="pageParams.keyword"
+    @current-change="handleCurrentChange"
+    @refresh-data="handleRefreshData"
+    @search="handleSearchAction">
+    <div slot="screen-type">
+      <!-- 注册来源 -->
+      <label>注册来源</label>
+      <el-select v-model="pageParams.fromApp" clearable placeholder="不限" @change="handleRefreshData">
+        <el-option
+          v-for="item in fromAppOptions"
+          :key="item.value"
+          :label="item.label"
+          :value="item.value">
+        </el-option>
+      </el-select>
+
+      <!-- 手机认证状态 -->
+      <label>手机认证状态</label>
+      <el-select v-model="pageParams.mobileValidCode" clearable placeholder="不限" @change="handleRefreshData">
+        <el-option
+          v-for="item in mobileValidCodeOptions"
+          :key="item.value"
+          :label="item.label"
+          :value="item.value">
+        </el-option>
+      </el-select>
+    </div>
+
+    <el-table
+      :data="tableData"
+      stripe
+      style="width: 100%">
+      <el-table-column
+        label="操作">
+        <template slot-scope="scope">
+          <el-button @click="handleClick(scope.row)" type="text" size="small">查看</el-button>
+        </template>
+      </el-table-column>
+      <el-table-column
+        prop="realName"
+        label="用户名称">
+      </el-table-column>
+      <el-table-column
+        prop="userUU"
+        label="个人UU">
+      </el-table-column>
+      <el-table-column
+        prop="mobile"
+        label="手机号"
+        width="170">
+        <template slot-scope="scope">
+          {{ scope.row.mobile }}
+          <span class="valid-code1" v-if="scope.row.mobileValidCode === 2">(已认证)</span>
+          <span class="valid-code0" v-if="scope.row.mobileValidCode !== 2">(未认证)</span>
+        </template>
+      </el-table-column>
+      <el-table-column
+        prop="email"
+        label="邮箱"
+        width="250">
+        <template slot-scope="scope" v-if="scope.row.email">
+          {{ scope.row.email }}
+          <span class="valid-code1" v-if="scope.row.emailValidCode === 2">(已认证)</span>
+          <span class="valid-code0" v-if="scope.row.emailValidCode !== 2">(未认证)</span>
+        </template>
+      </el-table-column>
+      <el-table-column
+        prop="registerDate"
+        label="注册时间">
+      </el-table-column>
+      <el-table-column
+        prop="lastLogin"
+        label="上次登录">
+      </el-table-column>
+      <el-table-column
+        prop="fromApp"
+        label="注册来源">
+      </el-table-column>
+    </el-table>
+  </common-home>
+</template>
+
+<script>
+  import _ from 'lodash'
+  import axios from '@/assets/js/axios'
+  import {ValidCode} from '@/Constant'
+  import CommonHome from '../common/CommonHome'
+
+  const fromApps = [
+    {
+      label: 'B2B',
+      value: 'b2b'
+    }, {
+      label: 'UAS',
+      value: 'uas'
+    }, {
+      label: '优软商城',
+      value: 'mall'
+    }
+  ]
+  const searchKeys = [
+    {
+      label: '用户名称',
+      value: 'realName'
+    }
+  ]
+
+  export default {
+    name: 'user-home',
+    components: {
+      CommonHome
+    },
+    data () {
+      return {
+        pageParams: {
+          page: 1,
+          size: 8,
+          fromApp: null,
+          mobileValidCode: null,
+          key: 'realName',
+          keyword: null
+        },
+        pageContent: [],
+        total: 0,
+        fromAppOptions: fromApps,
+        mobileValidCodeOptions: ValidCode,
+        searchKeys: searchKeys
+      }
+    },
+    created () {
+      this.fetchData()
+    },
+    computed: {
+      tableData () {
+        return this.pageContent
+      }
+    },
+    watch: {
+      '$route': 'fetchData'
+    },
+    methods: {
+      fetchData () {
+        const params = _.defaultsDeep({}, this.pageParams)
+        params.page = params.page - 1
+
+        const success = page => {
+          this.pageContent = page.content || []
+          this.total = page.totalElements
+        }
+        const error = response => {
+          this.$message.error(response)
+        }
+
+        axios.get('/api/user//showUserByPagination', { params }).then(success).catch(
+          error)
+      },
+      handleCurrentChange (currentPage) {
+        this.pageParams.page = currentPage
+        this.fetchData()
+      },
+      handleRefreshData () {
+        console.log(this.pageParams)
+        this.fetchData()
+      },
+      handleSearchAction (key, keyword) {
+        console.log(key, keyword)
+        this.pageParams.key = key
+        this.pageParams.keyword = keyword
+
+        this.fetchData()
+      }
+    }
+  }
+</script>
+
+<style scoped>
+  .el-button--text {
+    color: #228EE1;
+    font-size: 13px;
+    font-family: "Microsoft YaHei", sans-serif;
+  }
+  .el-table td span.valid-code0 {
+    color: #E68717;
+  }
+  .el-table td span.valid-code1,
+  .el-table td span.valid-code2,
+  .el-table td span.valid-code3{
+    color: #606266;
+  }
+</style>

+ 5 - 0
sso-manage-console-web/src/components/accounts/users/index.js

@@ -0,0 +1,5 @@
+import UserHome from './UserHome'
+
+export {
+  UserHome
+}

+ 72 - 0
sso-manage-console-web/src/components/common/NavHeader.vue

@@ -0,0 +1,72 @@
+<template>
+  <!-- 静止在顶部 -->
+  <nav class="navbar navbar-default navbar-static-top">
+    <!-- Brand and appName -->
+    <div class="container-fluid">
+      <div class="navbar-header">
+        <a class="navbar-brand" href="javascript:void(0);">
+          <img alt="Brand" src="/static/images/logo/uas.png">
+        </a>
+        <div class="navbar-brand-name">
+          <span>优软云后台管理</span>
+        </div>
+      </div>
+      <!-- Links -->
+      <div class="collapse navbar-collapse">
+        <ul class="nav navbar-nav navbar-left">
+          <router-link tag="li" active-class="active" to="/index"><a>首页</a></router-link>
+          <router-link tag="li" active-class="active" to="/accounts"><a>账户管理</a></router-link>
+          <router-link tag="li" active-class="active" to="/system"><a>系统</a></router-link>
+          <router-link tag="li" active-class="active" to="/content"><a>内容</a></router-link>
+        </ul>
+      </div>
+    </div>
+  </nav>
+</template>
+
+<script>
+  export default {
+    name: 'nav-header'
+  }
+</script>
+
+<style scoped>
+  nav {
+    margin: 0;
+    border: none;
+    background-color: #22252A;
+    color: #FFFFFF;
+    font-size: 14px;
+  }
+  div.navbar-header .navbar-brand {
+    height: 54px;
+    padding: 20px 15px 20px 16px;
+    line-height: 14px;
+  }
+  div.navbar-header .navbar-brand-name {
+    margin-left: -15px;
+    padding: 20px 20px 20px 75px;
+    line-height: 14px;
+  }
+  div.navbar-header .navbar-brand-name>span {
+    padding: 0 14px;
+    border: 1px none white;
+    border-left-style: solid;
+    color: #C5CDD8;
+    font-size: 14px;
+    font-weight: bold;
+    font-family: "Microsoft YaHei", sans-serif;
+  }
+  div.navbar-collapse .navbar-nav li>a {
+    height: 54px;
+    padding: 20px 28px;
+    line-height: 14px;
+    color: #97A1AD;
+    font-size: 14px;
+    font-family: "SimHei", "黑体", sans-serif;
+  }
+  div.navbar-collapse .navbar-nav li.active>a {
+    color: #2CA3FF;
+    background: none;
+  }
+</style>

+ 3 - 1
sso-manage-console-web/src/components/common/index.js

@@ -1,7 +1,9 @@
 import SearchDialog from './SearchDialog'
 import DataList from './DataList'
+import NavHeader from './NavHeader'
 
 export {
   SearchDialog,
-  DataList
+  DataList,
+  NavHeader
 }

+ 1 - 1
sso-manage-console-web/src/components/user/UserHome.vue

@@ -193,7 +193,7 @@
           console.log('error', response)
         }
 
-        axios.get('/api/user//showUserByPagination', { params }).then(success).catch(
+        axios.get('/api/user//showUserByPaginationOld', { params }).then(success).catch(
           error)
       },
       closeSearchDialog (event) {

+ 5 - 1
sso-manage-console-web/src/main.js

@@ -6,7 +6,9 @@ import router from './router'
 import {options, VueNotifications} from '@/assets/js/notifications'
 import 'bootstrap/dist/css/bootstrap.min.css'
 import 'font-awesome/css/font-awesome.min.css'
-import './assets/styles/console.css'
+import ElementUI from 'element-ui'
+import 'element-ui/lib/theme-chalk/index.css'
+// import './assets/styles/console.css'
 
 Vue.config.productionTip = false
 
@@ -23,6 +25,8 @@ Vue.filter('date', function (value) {
   return `${date.getFullYear()}-${date.getMonth() + 1}-${date.getDate()}`
 })
 
+Vue.use(ElementUI)
+
 /* eslint-disable no-new */
 new Vue({
   el: '#app',

+ 32 - 2
sso-manage-console-web/src/router/index.js

@@ -4,11 +4,15 @@ import Index from '@/components/Index'
 import AppHome from '@/components/app/AppHome'
 import AppList from '@/components/app/AppList'
 import UserSpaceHome from '@/components/userspace/UserSpaceHome'
-import UserHome from '@/components/user/UserHome'
+import UserHomeOld from '@/components/user/UserHome'
 import ChangeAdmin from '@/components/admin/ChangeAdmin'
 import AssetHome from '@/components/asset/AssetHome'
 import SettingsHome from '@/components/settings/SettingsHome'
 import {BackHome} from '@/components/back'
+import AccountIndex from '@/components/accounts/AccountIndex'
+import {EnterpriseHome} from '@/components/accounts/enterprises'
+import {UserHome} from '@/components/accounts/users'
+import {AppealHome} from '@/components/accounts/appeals'
 
 Vue.use(Router)
 
@@ -19,6 +23,32 @@ export default new Router({
       name: 'Index',
       component: Index
     },
+    {
+      path: '/accounts',
+      component: AccountIndex,
+      children: [
+        {
+          path: '',
+          redirect: { name: 'EnterpriseHome' }
+        },
+        {
+          // '/path' 会从根路径开始构建路由信息
+          path: 'enterprise',
+          name: 'EnterpriseHome',
+          component: EnterpriseHome
+        },
+        {
+          path: 'user',
+          name: 'UserHome',
+          component: UserHome
+        },
+        {
+          path: 'appeal',
+          name: 'AppealHome',
+          component: AppealHome
+        }
+      ]
+    },
     {
       path: '/app',
       component: AppHome
@@ -39,7 +69,7 @@ export default new Router({
     },
     {
       path: '/user',
-      component: UserHome
+      component: UserHomeOld
     },
     {
       path: '/admin',

BIN
sso-manage-console-web/static/images/data.png


BIN
sso-manage-console-web/static/images/logo/uas.png


+ 25 - 2
sso-manage-console-web/yarn.lock

@@ -204,6 +204,12 @@ async-limiter@~1.0.0:
   version "1.0.0"
   resolved "http://registry.npm.taobao.org/async-limiter/download/async-limiter-1.0.0.tgz#78faed8c3d074ab81f22b4e985d79e8738f720f8"
 
+async-validator@~1.8.1:
+  version "1.8.2"
+  resolved "http://registry.npm.taobao.org/async-validator/download/async-validator-1.8.2.tgz#b77597226e96242f8d531c0d46ae295f62422ba4"
+  dependencies:
+    babel-runtime "6.x"
+
 async@^1.5.2:
   version "1.5.2"
   resolved "http://registry.npm.taobao.org/async/download/async-1.5.2.tgz#ec6a61ae56480c0c3cb241c95618e20892f9672a"
@@ -420,7 +426,7 @@ babel-helper-replace-supers@^6.24.1:
     babel-traverse "^6.24.1"
     babel-types "^6.24.1"
 
-babel-helper-vue-jsx-merge-props@^2.0.3:
+babel-helper-vue-jsx-merge-props@^2.0.0, babel-helper-vue-jsx-merge-props@^2.0.3:
   version "2.0.3"
   resolved "http://registry.npm.taobao.org/babel-helper-vue-jsx-merge-props/download/babel-helper-vue-jsx-merge-props-2.0.3.tgz#22aebd3b33902328e513293a8e4992b384f9f1b6"
 
@@ -796,7 +802,7 @@ babel-register@^6.26.0:
     mkdirp "^0.5.1"
     source-map-support "^0.4.15"
 
-babel-runtime@^6.18.0, babel-runtime@^6.22.0, babel-runtime@^6.26.0:
+babel-runtime@6.x, babel-runtime@^6.18.0, babel-runtime@^6.22.0, babel-runtime@^6.26.0:
   version "6.26.0"
   resolved "http://registry.npm.taobao.org/babel-runtime/download/babel-runtime-6.26.0.tgz#965c7058668e82b55d7bfe04ff2337bc8b5647fe"
   dependencies:
@@ -1626,6 +1632,10 @@ deep-is@~0.1.3:
   version "0.1.3"
   resolved "http://registry.npm.taobao.org/deep-is/download/deep-is-0.1.3.tgz#b369d6fb5dbc13eecf524f91b070feedc357cf34"
 
+deepmerge@^1.2.0:
+  version "1.5.2"
+  resolved "http://registry.npm.taobao.org/deepmerge/download/deepmerge-1.5.2.tgz#10499d868844cdad4fee0842df8c7f6f0c95a753"
+
 define-properties@^1.1.2:
   version "1.1.2"
   resolved "http://registry.npm.taobao.org/define-properties/download/define-properties-1.1.2.tgz#83a73f2fea569898fb737193c8f873caf6d45c94"
@@ -1836,6 +1846,15 @@ electron-to-chromium@^1.2.7, electron-to-chromium@^1.3.30:
   dependencies:
     electron-releases "^2.1.0"
 
+element-ui@^2.0.11:
+  version "2.0.11"
+  resolved "http://registry.npm.taobao.org/element-ui/download/element-ui-2.0.11.tgz#efc19d10270c13aa2b235f65bcb6ced3226550b8"
+  dependencies:
+    async-validator "~1.8.1"
+    babel-helper-vue-jsx-merge-props "^2.0.0"
+    deepmerge "^1.2.0"
+    throttle-debounce "^1.0.1"
+
 elliptic@^6.0.0:
   version "6.4.0"
   resolved "http://registry.npm.taobao.org/elliptic/download/elliptic-6.4.0.tgz#cac9af8762c85836187003c8dfe193e5e2eae5df"
@@ -5192,6 +5211,10 @@ text-table@^0.2.0, text-table@~0.2.0:
   version "0.2.0"
   resolved "http://registry.npm.taobao.org/text-table/download/text-table-0.2.0.tgz#7f5ee823ae805207c00af2df4a84ec3fcfa570b4"
 
+throttle-debounce@^1.0.1:
+  version "1.0.1"
+  resolved "http://registry.npm.taobao.org/throttle-debounce/download/throttle-debounce-1.0.1.tgz#dad0fe130f9daf3719fdea33dc36a8e6ba7f30b5"
+
 through2@^2.0.0:
   version "2.0.3"
   resolved "http://registry.npm.taobao.org/through2/download/through2-2.0.3.tgz#0004569b37c7c74ba39c43f3ced78d1ad94140be"

+ 12 - 1
sso-manage-console/src/main/java/com/uas/sso/sso/backend/api/UserManageController.java

@@ -33,10 +33,21 @@ public class UserManageController {
     @RequestMapping(method = RequestMethod.GET, path = "//showUserByPagination",
             produces = MediaType.APPLICATION_JSON_UTF8_VALUE)
     public ResultBean<org.springframework.data.domain.Page<User>> showUserByPagination(Pageable page,
+            @RequestParam(required = false) String fromApp,
+            @RequestParam(required = false) Short mobileValidCode,
+            @RequestParam(required = false) String key,
+            @RequestParam(required = false) String keyword) {
+
+        return new ResultBean<>(userService.showUserByPagination(page, fromApp, mobileValidCode, key, keyword));
+    }
+
+    @RequestMapping(method = RequestMethod.GET, path = "//showUserByPaginationOld",
+            produces = MediaType.APPLICATION_JSON_UTF8_VALUE)
+    public ResultBean<org.springframework.data.domain.Page<User>> showUserByPaginationOld(Pageable page,
             @RequestParam(required = false) String name,
             @RequestParam(required = false) String phone) {
         // Controller中的Pageable类型参数默认根据查询参数 page 和 size 注入并实例化
-        return new ResultBean<>(userService.showUserByPagination(page, name, phone));
+        return new ResultBean<>(userService.showUserByPaginationOld(page, name, phone));
     }
 
     @RequestMapping(method = RequestMethod.GET, path = "/{userUU}/findSpacesByUser",

+ 4 - 1
sso-manage-console/src/main/java/com/uas/sso/sso/backend/service/UserService.java

@@ -16,7 +16,10 @@ public interface UserService {
 
     List<User> showAllUsers();
 
-    Page<User> showUserByPagination(Pageable page, String name, String phone);
+    Page<User> showUserByPaginationOld(Pageable page, String name, String phone);
 
     Set<Userspace> findSpacesByUser(Long userUu);
+
+    Page<User> showUserByPagination(Pageable page, String fromApp, Short mobileValidCode, String key,
+            String keyword);
 }

+ 32 - 1
sso-manage-console/src/main/java/com/uas/sso/sso/backend/service/impl/UserServiceImpl.java

@@ -43,7 +43,7 @@ public class UserServiceImpl implements UserService {
     }
 
     @Override
-    public Page<User> showUserByPagination(final Pageable page, String name, String phone) {
+    public Page<User> showUserByPaginationOld(final Pageable page, String name, String phone) {
 
         return userDao.findAll((root, query, builder) -> {
             List<Predicate> predicates = new ArrayList<>();
@@ -80,4 +80,35 @@ public class UserServiceImpl implements UserService {
 
         return user.getUserSpaces();
     }
+
+    @Override
+    public Page<User> showUserByPagination(Pageable page, String fromApp, Short mobileValidCode,
+            String key, String keyword) {
+
+        return userDao.findAll((root, query, builder) -> {
+            List<Predicate> predicates = new ArrayList<>();
+            if (!StringUtils.isEmpty(fromApp)) {
+                Predicate predicate = builder.equal(root.get("fromApp"), fromApp);
+                predicates.add(predicate);
+            }
+
+            if (!StringUtils.isEmpty(mobileValidCode)) {
+                Predicate predicate = builder.equal(root.get("mobileValidCode"), mobileValidCode);
+                predicates.add(predicate);
+            }
+
+            if (!StringUtils.isEmpty(key) && !StringUtils.isEmpty(keyword)) {
+                Predicate predicate = builder.like(root.get(key), "%" + keyword + "%");
+                predicates.add(predicate);
+            }
+
+            predicates.removeAll(Collections.singletonList(null));
+
+            Predicate[] array = new Predicate[predicates.size()];
+            predicates.toArray(array);
+            Predicate predicate = builder.and(array);
+            query.where(predicate);
+            return null;
+        }, page);
+    }
 }