瀏覽代碼

'添加跨域代理'

周杰伦 4 年之前
父節點
當前提交
56efbfa2cb
共有 34 個文件被更改,包括 1364 次插入114 次删除
  1. 19 0
      src/api/basics.js
  2. 106 58
      src/config/router.config.js
  3. 7 0
      src/global.less
  4. 3 9
      src/layouts/BasicLayout.vue
  5. 4 5
      src/main.js
  6. 7 7
      src/router/generator-routers.js
  7. 9 7
      src/router/index.js
  8. 5 2
      src/utils/request.js
  9. 15 14
      src/utils/screenLog.js
  10. 0 0
      src/views/account-old/center/index.vue
  11. 0 0
      src/views/account-old/center/page/App.vue
  12. 0 0
      src/views/account-old/center/page/Article.vue
  13. 0 0
      src/views/account-old/center/page/Project.vue
  14. 0 0
      src/views/account-old/center/page/index.js
  15. 0 0
      src/views/account-old/settings/AvatarModal.vue
  16. 0 0
      src/views/account-old/settings/BaseSetting.vue
  17. 0 0
      src/views/account-old/settings/Binding.vue
  18. 0 0
      src/views/account-old/settings/Custom.vue
  19. 0 0
      src/views/account-old/settings/Index.vue
  20. 0 0
      src/views/account-old/settings/Notification.vue
  21. 0 0
      src/views/account-old/settings/Security.vue
  22. 152 0
      src/views/basics/class/index.vue
  23. 182 0
      src/views/basics/sell/index.vue
  24. 154 0
      src/views/basics/tag/index.vue
  25. 4 4
      src/views/markting/seas/list.vue
  26. 0 0
      src/views/role-old/RoleList.vue
  27. 35 0
      src/views/roleIng/role/index.vue
  28. 102 0
      src/views/roleIng/role/roleAdmin.vue
  29. 119 0
      src/views/roleIng/role/roleSetting.vue
  30. 28 0
      src/views/roleIng/staff/edit.vue
  31. 52 0
      src/views/roleIng/staff/index.vue
  32. 195 0
      src/views/roleIng/staff/organiza.vue
  33. 155 0
      src/views/roleIng/staff/staffAdmin.vue
  34. 11 8
      vue.config.js

+ 19 - 0
src/api/basics.js

@@ -0,0 +1,19 @@
+import request from '@/utils/request'
+
+// 查询配置
+export function getConfig (params) {
+    return request({
+      url: '/config',
+      method: 'GET',
+      params
+    })
+  }
+
+// 新增配置
+export function postConfig (data) {
+    return request({
+      url: '/config',
+      method: 'POST',
+      data
+    })
+  }

+ 106 - 58
src/config/router.config.js

@@ -212,61 +212,61 @@ export const asyncRouterMap = [
       },
 
       // account
-      {
-        path: '/account',
-        component: RouteView,
-        redirect: '/account/center',
-        name: 'account',
-        meta: { title: '个人页', icon: 'user', keepAlive: true, permission: [ 'user' ] },
-        children: [
-          {
-            path: '/account/center',
-            name: 'center',
-            component: () => import('@/views/account/center'),
-            meta: { title: '个人中心', keepAlive: true, permission: [ 'user' ] }
-          },
-          {
-            path: '/account/settings',
-            name: 'settings',
-            component: () => import('@/views/account/settings/Index'),
-            meta: { title: '个人设置', hideHeader: true, permission: [ 'user' ] },
-            redirect: '/account/settings/base',
-            hideChildrenInMenu: true,
-            children: [
-              {
-                path: '/account/settings/base',
-                name: 'BaseSettings',
-                component: () => import('@/views/account/settings/BaseSetting'),
-                meta: { title: '基本设置', hidden: true, permission: [ 'user' ] }
-              },
-              {
-                path: '/account/settings/security',
-                name: 'SecuritySettings',
-                component: () => import('@/views/account/settings/Security'),
-                meta: { title: '安全设置', hidden: true, keepAlive: true, permission: [ 'user' ] }
-              },
-              {
-                path: '/account/settings/custom',
-                name: 'CustomSettings',
-                component: () => import('@/views/account/settings/Custom'),
-                meta: { title: '个性化设置', hidden: true, keepAlive: true, permission: [ 'user' ] }
-              },
-              {
-                path: '/account/settings/binding',
-                name: 'BindingSettings',
-                component: () => import('@/views/account/settings/Binding'),
-                meta: { title: '账户绑定', hidden: true, keepAlive: true, permission: [ 'user' ] }
-              },
-              {
-                path: '/account/settings/notification',
-                name: 'NotificationSettings',
-                component: () => import('@/views/account/settings/Notification'),
-                meta: { title: '新消息通知', hidden: true, keepAlive: true, permission: [ 'user' ] }
-              }
-            ]
-          }
-        ]
-      },
+      // {
+      //   path: '/account',
+      //   component: RouteView,
+      //   redirect: '/account/center',
+      //   name: 'account',
+      //   meta: { title: '个人页', icon: 'user', keepAlive: true, permission: [ 'user' ] },
+      //   children: [
+      //     {
+      //       path: '/account/center',
+      //       name: 'center',
+      //       component: () => import('@/views/account/center'),
+      //       meta: { title: '个人中心', keepAlive: true, permission: [ 'user' ] }
+      //     },
+      //     {
+      //       path: '/account/settings',
+      //       name: 'settings',
+      //       component: () => import('@/views/account/settings/Index'),
+      //       meta: { title: '个人设置', hideHeader: true, permission: [ 'user' ] },
+      //       redirect: '/account/settings/base',
+      //       hideChildrenInMenu: true,
+      //       children: [
+      //         {
+      //           path: '/account/settings/base',
+      //           name: 'BaseSettings',
+      //           component: () => import('@/views/account/settings/BaseSetting'),
+      //           meta: { title: '基本设置', hidden: true, permission: [ 'user' ] }
+      //         },
+      //         {
+      //           path: '/account/settings/security',
+      //           name: 'SecuritySettings',
+      //           component: () => import('@/views/account/settings/Security'),
+      //           meta: { title: '安全设置', hidden: true, keepAlive: true, permission: [ 'user' ] }
+      //         },
+      //         {
+      //           path: '/account/settings/custom',
+      //           name: 'CustomSettings',
+      //           component: () => import('@/views/account/settings/Custom'),
+      //           meta: { title: '个性化设置', hidden: true, keepAlive: true, permission: [ 'user' ] }
+      //         },
+      //         {
+      //           path: '/account/settings/binding',
+      //           name: 'BindingSettings',
+      //           component: () => import('@/views/account/settings/Binding'),
+      //           meta: { title: '账户绑定', hidden: true, keepAlive: true, permission: [ 'user' ] }
+      //         },
+      //         {
+      //           path: '/account/settings/notification',
+      //           name: 'NotificationSettings',
+      //           component: () => import('@/views/account/settings/Notification'),
+      //           meta: { title: '新消息通知', hidden: true, keepAlive: true, permission: [ 'user' ] }
+      //         }
+      //       ]
+      //     }
+      //   ]
+      // },
 
       // marting
       {
@@ -280,11 +280,59 @@ export const asyncRouterMap = [
             path: '/markting/seas',
             name: 'Seas',
             component: () => import('@/views/markting/seas/list'),
-            meta: { title: '公海池', hideHeader: true, permission: [ 'user' ] },
+            meta: { title: '公海池', hideHeader: true, permission: [ 'user' ] }
           }
-        ],
+        ]
+      },
+      // 基础设置
+      {
+        path: '/basics',
+        component: RouteView,
+        redirect: '/basics/sell',
+        name: 'basics',
+        meta: { title: '基础配置', icon: 'user', keepAlive: true, permission: [ 'basics' ] },
+        children: [
+          {
+            path: '/basics/sell',
+            name: 'sell',
+            component: () => import('@/views/basics/sell/index'),
+            meta: { title: '销售配置', hideHeader: true, permission: [ 'basics' ] }
+          },
+          {
+            path: '/basics/tag',
+            name: 'tag',
+            component: () => import('@/views/basics/tag/index'),
+            meta: { title: '标签配置', hideHeader: true, permission: [ 'basics' ] }
+          },
+          {
+            path: '/basics/class',
+            name: 'class',
+            component: () => import('@/views/basics/class/index'),
+            meta: { title: '教室配置', hideHeader: true, permission: [ 'basics' ] }
+          }
+        ]
+      },
+      {
+        path: '/roleIng',
+        component: RouteView,
+        name: 'roleIng',
+        redirect: '/account/role',
+        meta: { title: '权限管理', icon: 'user', hideHeader: true, permission: [ 'account' ] },
+        children: [
+          {
+            path: '/roleIng/staff',
+            name: 'staff',
+            component: () => import('@/views/roleIng/staff/index'),
+            meta: { title: '员工管理', hideHeader: true, permission: [ 'roleIng' ] }
+          },
+          {
+            path: '/roleIng/role',
+            name: 'role',
+            component: () => import('@/views/roleIng/role/index'),
+            meta: { title: '角色管理', hideHeader: true, permission: [ 'roleIng' ] }
+          }
+        ]
       }
-
       // other
       /*
       {

+ 7 - 0
src/global.less

@@ -92,3 +92,10 @@ ol {
     }
   }
 }
+
+
+
+// 全局样式
+.cp {
+  cursor: pointer;
+}

+ 3 - 9
src/layouts/BasicLayout.vue

@@ -9,13 +9,6 @@
     :i18nRender="i18nRender"
     v-bind="settings"
   >
-    <!-- Ads begin
-      广告代码 真实项目中请移除
-      production remove this Ads
-    -->
-    <ads v-if="isProPreviewSite && !collapsed"/>
-    <!-- Ads end -->
-
     <!-- 1.0.0+ 版本 pro-layout 提供 API,
           我们推荐使用这种方式进行 LOGO 和 title 自定义
     -->
@@ -48,7 +41,7 @@ import RightContent from '@/components/GlobalHeader/RightContent'
 import GlobalFooter from '@/components/GlobalFooter'
 import Ads from '@/components/Other/CarbonAds'
 import LogoSvg from '../assets/logo.svg?inline'
-
+import { asyncRouterMap } from '@/config/router.config.js'
 export default {
   name: 'BasicLayout',
   components: {
@@ -99,7 +92,8 @@ export default {
     })
   },
   created () {
-    const routes = this.mainMenu.find(item => item.path === '/')
+    const routes = asyncRouterMap.find((item) => item.path === '/')
+    // const routes = this.mainMenu.find(item => item.path === '/')
     this.menus = (routes && routes.children) || []
     // 处理侧栏收起状态
     this.$watch('collapsed', () => {

+ 4 - 5
src/main.js

@@ -17,22 +17,21 @@ import './mock'
 
 import bootstrap from './core/bootstrap'
 import './core/lazy_use' // use lazy load components
-import './permission' // permission control
+// import './permission' // permission control
 import './utils/filter' // global filter
 import './global.less' // global style
 import './core/form_making' // use lazy load components
 
 import {
-  GenerateAntdForm,
+  GenerateAntdForm
 } from '../lib/form-making-advanced'
 import '../lib/form-making-advanced/dist/FormMaking.css'
 
-Vue.component(GenerateAntdForm.name, GenerateAntdForm)
-
 import KFormDesign from 'k-form-design'
 import 'k-form-design/lib/k-form-design.css'
-Vue.use(KFormDesign)
 
+Vue.component(GenerateAntdForm.name, GenerateAntdForm)
+Vue.use(KFormDesign)
 
 Vue.config.productionTip = false
 

+ 7 - 7
src/router/generator-routers.js

@@ -44,13 +44,13 @@ const constantRouterComponents = {
   'Exception500': () => import(/* webpackChunkName: "fail" */ '@/views/exception/500'),
 
   // account
-  'AccountCenter': () => import('@/views/account/center'),
-  'AccountSettings': () => import('@/views/account/settings/Index'),
-  'BaseSettings': () => import('@/views/account/settings/BaseSetting'),
-  'SecuritySettings': () => import('@/views/account/settings/Security'),
-  'CustomSettings': () => import('@/views/account/settings/Custom'),
-  'BindingSettings': () => import('@/views/account/settings/Binding'),
-  'NotificationSettings': () => import('@/views/account/settings/Notification')
+  'AccountCenter': () => import('@/views/account-old/center'),
+  'AccountSettings': () => import('@/views/account-old/settings/Index'),
+  'BaseSettings': () => import('@/views/account-old/settings/BaseSetting'),
+  'SecuritySettings': () => import('@/views/account-old/settings/Security'),
+  'CustomSettings': () => import('@/views/account-old/settings/Custom'),
+  'BindingSettings': () => import('@/views/account-old/settings/Binding'),
+  'NotificationSettings': () => import('@/views/account-old/settings/Notification')
 
   // 'TestWork': () => import(/* webpackChunkName: "TestWork" */ '@/views/dashboard/TestWork')
 }

+ 9 - 7
src/router/index.js

@@ -1,17 +1,19 @@
 import Vue from 'vue'
 import Router from 'vue-router'
-import { constantRouterMap } from '@/config/router.config'
+// import { constantRouterMap } from '@/config/router.config'
+import { constantRouterMap, asyncRouterMap } from '@/config/router.config'
 
 // hack router push callback
-const originalPush = Router.prototype.push
-Router.prototype.push = function push (location, onResolve, onReject) {
-  if (onResolve || onReject) return originalPush.call(this, location, onResolve, onReject)
-  return originalPush.call(this, location).catch(err => err)
-}
+// const originalPush = Router.prototype.push
+// Router.prototype.push = function push (location, onResolve, onReject) {
+//   if (onResolve || onReject) return originalPush.call(this, location, onResolve, onReject)
+//   return originalPush.call(this, location).catch(err => err)
+// }
 
 Vue.use(Router)
 
 export default new Router({
   mode: 'history',
-  routes: constantRouterMap
+  // routes: constantRouterMap
+  routes: constantRouterMap.concat(asyncRouterMap)
 })

+ 5 - 2
src/utils/request.js

@@ -8,7 +8,9 @@ import { ACCESS_TOKEN } from '@/store/mutation-types'
 // 创建 axios 实例
 const request = axios.create({
   // API 请求的默认前缀
-  baseURL: process.env.VUE_APP_API_BASE_URL,
+  // baseURL: process.env.VUE_APP_API_BASE_URL,
+
+  baseURL: '/api',
   timeout: 6000 // 请求超时时间
 })
 
@@ -43,7 +45,8 @@ const errorHandler = (error) => {
 
 // request interceptor
 request.interceptors.request.use(config => {
-  const token = storage.get(ACCESS_TOKEN)
+  // const token = storage.get(ACCESS_TOKEN)
+  const token = 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ0b3duSWQiOjIxMzIxMjEyMzI0NSwiZXhwIjoxNjA5MjI0NTIyLCJ1c2VySWQiOjg1NTEyNTQ0MTU1NH0.p3B0oZGrcVhvGmoRBp6oAqVGW5OcCtraKobO07SO_zc'
   // 如果 token 存在
   // 让每个请求携带自定义 token 请根据实际情况自行修改
   if (token) {

+ 15 - 14
src/utils/screenLog.js

@@ -1,18 +1,19 @@
 /* eslint-disable */
 export const printANSI = () => {
   // console.clear()
-  console.log('[antd pro] created()')
-  // ASCII - ANSI Shadow
-  let text = `
- █████╗ ███╗   ██╗████████╗██████╗     ██████╗ ██████╗  ██████╗ 
-██╔══██╗████╗  ██║╚══██╔══╝██╔══██╗    ██╔══██╗██╔══██╗██╔═══██╗
-███████║██╔██╗ ██║   ██║   ██║  ██║    ██████╔╝██████╔╝██║   ██║
-██╔══██║██║╚██╗██║   ██║   ██║  ██║    ██╔═══╝ ██╔══██╗██║   ██║
-██║  ██║██║ ╚████║   ██║   ██████╔╝    ██║     ██║  ██║╚██████╔╝
-╚═╝  ╚═╝╚═╝  ╚═══╝   ╚═╝   ╚═════╝     ╚═╝     ╚═╝  ╚═╝ ╚═════╝ 
-\t\t\t\t\tPublished ${APP_VERSION}-${GIT_HASH} @ antdv.com
-\t\t\t\t\tBuild date: ${BUILD_DATE}`
-  console.log(`%c${text}`, 'color: #fc4d50')
-  console.log('%c感谢使用 antd pro!', 'color: #000; font-size: 14px;    font-family: Hiragino Sans GB,Microsoft YaHei,\\\\5FAE\\8F6F\\96C5\\9ED1,Droid Sans Fallback,Source Sans,Wenquanyi Micro Hei,WenQuanYi Micro Hei Mono,WenQuanYi Zen Hei,Apple LiGothic Medium,SimHei,ST Heiti,WenQuanYi Zen Hei Sharp,sans-serif;')
-  console.log('%cThanks for using antd pro!', 'color: #fff; font-size: 14px; font-weight: 300; text-shadow:#000 1px 0 0,#000 0 1px 0,#000 -1px 0 0,#000 0 -1px 0;')
+//   console.log('[antd pro] created()')
+//   // ASCII - ANSI Shadow
+//   let text = `
+//  █████╗ ███╗   ██╗████████╗██████╗     ██████╗ ██████╗  ██████╗ 
+// ██╔══██╗████╗  ██║╚══██╔══╝██╔══██╗    ██╔══██╗██╔══██╗██╔═══██╗
+// ███████║██╔██╗ ██║   ██║   ██║  ██║    ██████╔╝██████╔╝██║   ██║
+// ██╔══██║██║╚██╗██║   ██║   ██║  ██║    ██╔═══╝ ██╔══██╗██║   ██║
+// ██║  ██║██║ ╚████║   ██║   ██████╔╝    ██║     ██║  ██║╚██████╔╝
+// ╚═╝  ╚═╝╚═╝  ╚═══╝   ╚═╝   ╚═════╝     ╚═╝     ╚═╝  ╚═╝ ╚═════╝ 
+// \t\t\t\t\tPublished ${APP_VERSION}-${GIT_HASH} @ antdv.com
+// \t\t\t\t\tBuild date: ${BUILD_DATE}`
+//   console.log(`%c${text}`, 'color: #fc4d50')
+//   console.log('%c感谢使用 antd pro!', 'color: #000; font-size: 14px;    font-family: Hiragino Sans GB,Microsoft YaHei,\\\\5FAE\\8F6F\\96C5\\9ED1,Droid Sans Fallback,Source Sans,Wenquanyi Micro Hei,WenQuanYi Micro Hei Mono,WenQuanYi Zen Hei,Apple LiGothic Medium,SimHei,ST Heiti,WenQuanYi Zen Hei Sharp,sans-serif;')
+//   console.log('%cThanks for using antd pro!', 'color: #fff; font-size: 14px; font-weight: 300; text-shadow:#000 1px 0 0,#000 0 1px 0,#000 -1px 0 0,#000 0 -1px 0;')
 }
+

+ 0 - 0
src/views/account/center/index.vue → src/views/account-old/center/index.vue


+ 0 - 0
src/views/account/center/page/App.vue → src/views/account-old/center/page/App.vue


+ 0 - 0
src/views/account/center/page/Article.vue → src/views/account-old/center/page/Article.vue


+ 0 - 0
src/views/account/center/page/Project.vue → src/views/account-old/center/page/Project.vue


+ 0 - 0
src/views/account/center/page/index.js → src/views/account-old/center/page/index.js


+ 0 - 0
src/views/account/settings/AvatarModal.vue → src/views/account-old/settings/AvatarModal.vue


+ 0 - 0
src/views/account/settings/BaseSetting.vue → src/views/account-old/settings/BaseSetting.vue


+ 0 - 0
src/views/account/settings/Binding.vue → src/views/account-old/settings/Binding.vue


+ 0 - 0
src/views/account/settings/Custom.vue → src/views/account-old/settings/Custom.vue


+ 0 - 0
src/views/account/settings/Index.vue → src/views/account-old/settings/Index.vue


+ 0 - 0
src/views/account/settings/Notification.vue → src/views/account-old/settings/Notification.vue


+ 0 - 0
src/views/account/settings/Security.vue → src/views/account-old/settings/Security.vue


+ 152 - 0
src/views/basics/class/index.vue

@@ -0,0 +1,152 @@
+<template>
+  <div class="tag">
+    <page-header-wrapper
+      :title="false"
+      content="用于创建教室"
+    >
+      <a-card
+        :body-style="{padding: '24px 32px'}"
+        :bordered="false"
+        title="教室管理"
+      >
+        <template slot="extra">
+          <a-button type="primary" @click="tagVisible = true">新增教室</a-button>
+        </template>
+        <a-table :columns="columns" :data-source="data" index="">
+          <!-- <template slot="index" >{{  }}</template> -->
+          <a slot="name" slot-scope="text">{{ text }}</a>
+          <span slot="customTitle"><a-icon type="smile-o" /> Name</span>
+          <span slot="tags" slot-scope="tags">
+            <a-tag
+              v-for="tag in tags"
+              :key="tag"
+              :color="tag === 'loser' ? 'volcano' : tag.length > 5 ? 'geekblue' : 'green'"
+            >
+              {{ tag.toUpperCase() }}
+            </a-tag>
+          </span>
+          <span slot="action" slot-scope="text, record" >
+            <a @click="editTag(text, record)">编辑</a>
+            <a-divider type="vertical" />
+            <a-popconfirm
+              title="你确定要删除这个标签吗?"
+              ok-text="Yes"
+              cancel-text="No"
+              @confirm="confirm"
+              @cancel="cancel"
+            >
+              <a>删除</a>
+            </a-popconfirm>
+          </span>
+        </a-table>
+      </a-card>
+    </page-header-wrapper>
+    <!-- 新增标签 -->
+    <a-modal
+      :title="oprationType | filtersModel"
+      v-model="tagVisible"
+      :confirm-loading="confirmLoading"
+      ok-text="确认"
+      cancel-text="取消"
+      @ok="handleOk"
+    >
+      <a-input v-model="tagLabel" placeholder="请输入标签名称" />
+    </a-modal>
+  </div>
+</template>
+
+<script>
+const columns = [
+   {
+    dataIndex: 'index',
+    key: '序号',
+    scopedSlots: { customRender: 'index' }
+  },
+  {
+    dataIndex: 'name',
+    key: 'name',
+    title: '课程名称'
+  },
+  {
+    title: '学员人数',
+    dataIndex: 'age',
+    key: 'age'
+  },
+  {
+    title: '讲师',
+    dataIndex: 'teacher',
+    key: 'teacher'
+  },
+  {
+    title: '创建时间',
+    key: 'createTime',
+    dataIndex: 'createTime'
+  },
+  {
+    title: '操作',
+    key: 'action',
+    scopedSlots: { customRender: 'action' }
+  }
+]
+
+const data = [
+  {
+    key: '1',
+    name: '思维课程',
+    age: 32,
+    teacher: '曹清华',
+    createTime: '2020/12/12',
+    tags: ['nice', 'developer']
+  },
+  {
+    key: '2',
+    name: 'Jim Green',
+    age: 42,
+    address: 'London No. 1 Lake Park',
+    tags: ['loser']
+  },
+  {
+    key: '3',
+    name: 'Joe Black',
+    age: 32,
+    address: 'Sidney No. 1 Lake Park',
+    tags: ['cool', 'teacher']
+  }
+]
+export default {
+  name: 'Tag',
+  filters: {
+      filtersModel (type) {
+          switch (type) {
+              case 'add':
+                  return '新增标签'
+              case 'edit':
+                  return '编辑标签'
+              case 'select':
+                  return '选择学员'
+          }
+      }
+  },
+  data () {
+    return {
+      data,
+      columns,
+      tagLabel: '',
+      oprationType: 'add', // 当前操作的类型, add edit select
+      confirmLoading: false,
+      tagVisible: false // 新增标签 弹窗状态
+    }
+  },
+  methods: {
+    // 编辑当前标签
+    editTag (text, record) {
+        console.log(text, record)
+        this.oprationType = 'edit'
+        this.tagVisible = true
+    }
+  }
+}
+</script>
+<style scoped lang="less">
+
+</style>

+ 182 - 0
src/views/basics/sell/index.vue

@@ -0,0 +1,182 @@
+<template>
+  <div class="Sell">
+    <page-header-wrapper
+      :title="false"
+      content="用于配置销售目录"
+      :tab-list="tabList"
+      :tab-active-key="tabActiveKey"
+      @tabChange="handleTabChange"
+    >
+      <a-card
+        :body-style="{padding: '24px 32px'}"
+        :bordered="false"
+        title="明细"
+      >
+        <template slot="extra">
+          <a-button type="primary" @click="visible = true">新增{{ modalText }}</a-button>
+        </template>
+        <a-table
+          row-key="index"
+          size="small"
+          :columns="searchTableColumns"
+          :dataSource="searchData"
+          :pagination="{ pageSize: 5 }"
+        >
+          <span slot="range" slot-scope="text, record">
+            <trend :flag="record.status === 0 ? 'up' : 'down'">
+              {{ text }}%
+            </trend>
+          </span>
+          <template slot="action" >
+            <a>编辑</a>
+            <a-divider type="vertical" />
+            <a-popconfirm
+              title="你确定要删除这个标签吗?"
+              ok-text="Yes"
+              cancel-text="No"
+              @confirm="() => {}"
+              @cancel="() => {}"
+            >
+              <a>删除</a>
+            </a-popconfirm>
+          </template>
+        </a-table>
+        <!-- <a-row> -->
+        <!-- <a-col :xs="24" :sm="24" :md="12" :lg="8" > -->
+        <!-- <div class="cate-item" v-for="(item, index) in cateList" :key="index">
+              <div><span class="sort">{{ index + 1 }}</span> <span></span> {{ item.label }}</div>
+              <div class="opration"><a-icon type="form" /> <a-icon type="delete" /></div>
+            </div> -->
+        <!-- </a-col> -->
+        <!-- </a-row> -->
+      </a-card>
+    </page-header-wrapper>
+
+    <!-- 新建各种类目 -->
+    <a-modal
+      :title="'新增' + modalText"
+      v-model="visible"
+      :confirm-loading="confirmLoading"
+      ok-text="确认"
+      cancel-text="取消"
+      @ok="handleOk"
+    >
+      <a-input v-model="cateValue" :placeholder="'请输入' + modalText" />
+    </a-modal>
+  </div>
+</template>
+
+<script>
+import { getConfig } from '@/api/basics'
+const searchTableColumns = [
+  {
+    dataIndex: 'index',
+    title: '序号',
+    width: 90
+  },
+  {
+    dataIndex: 'keyword',
+    title: '类目名'
+  },
+  {
+    title: '操作',
+    key: 'action',
+    scopedSlots: { customRender: 'action' }
+  }
+]
+const searchData = []
+for (let i = 0; i < 50; i += 1) {
+  searchData.push({
+    index: i + 1,
+    keyword: `搜索关键词-${i}`,
+    count: Math.floor(Math.random() * 1000),
+    range: Math.floor(Math.random() * 100),
+    status: Math.floor((Math.random() * 10) % 2)
+  })
+}
+
+export default {
+  name: 'Sell',
+  computed: {
+    modalText () {
+      return this.tabList[this.tabActiveKey].tab
+    }
+  },
+  created () {
+    this.getConfig()
+  },
+  data () {
+      return {
+        searchTableColumns,
+        searchData,
+        tabList: [
+            { key: '0', tab: '意向度' },
+            { key: '1', tab: '来源渠道' },
+            { key: '2', tab: '意向课程' },
+            { key: '3', tab: '年级' },
+            { key: '4', tab: '流失原因' }
+        ],
+        tabActiveKey: '0',
+        visible: false,
+        confirmLoading: false,
+        cateValue: '', // 各种类目的名称
+        cateList: [
+          {
+            label: '客户不满意'
+          }
+        ], //  类目集合
+        queryParams: {
+          curPage: 1,
+          type: 'INTENTION'
+        }
+      }
+  },
+  methods: {
+    // 获取销售配置
+    async getConfig () {
+      console.log('helorenwenhao')
+      const { curPage, type } = this.queryParams
+      const $par = {
+        curPage,
+        type
+      }
+      const { code, data } = await getConfig($par)
+      if (code === 0) {
+        console.log(data)
+      }
+    },
+    handleTabChange (key) {
+      this.tabActiveKey = key
+    },
+    handleOk (e) {
+      this.ModalText = 'The modal will be closed after two seconds'
+      this.confirmLoading = true
+      setTimeout(() => {
+        this.visible = false
+        this.confirmLoading = false
+      }, 2000)
+    }
+  }
+}
+</script>
+<style scoped lang="less">
+.sort {
+    background-color: #f5f5f5;
+    border-radius: 20px;
+    display: inline-block;
+    font-size: 12px;
+    font-weight: 600;
+    margin-right: 24px;
+    height: 20px;
+    line-height: 20px;
+    width: 20px;
+    text-align: center;
+}
+.cate-item {
+  height: 40px;
+  border: 1px solid #f3f3f3;
+  display: flex;
+  justify-content: space-between;
+  align-items: center;
+}
+</style>

+ 154 - 0
src/views/basics/tag/index.vue

@@ -0,0 +1,154 @@
+<template>
+  <div class="tag">
+    <page-header-wrapper
+      :title="false"
+      content="用于配置课程标签"
+    >
+      <a-card
+        :body-style="{padding: '24px 32px'}"
+        :bordered="false"
+        title="标签管理"
+      >
+        <template slot="extra">
+          <a-button type="primary" @click="tagVisible = true">新增标签</a-button>
+        </template>
+        <a-table :columns="columns" :data-source="data" index="">
+          <!-- <template slot="index" >{{  }}</template> -->
+          <a slot="name" slot-scope="text">{{ text }}</a>
+          <span slot="customTitle"><a-icon type="smile-o" /> Name</span>
+          <span slot="tags" slot-scope="tags">
+            <a-tag
+              v-for="tag in tags"
+              :key="tag"
+              :color="tag === 'loser' ? 'volcano' : tag.length > 5 ? 'geekblue' : 'green'"
+            >
+              {{ tag.toUpperCase() }}
+            </a-tag>
+          </span>
+          <span slot="action" slot-scope="text, record" >
+            <a>选择学员</a>
+            <a-divider type="vertical" />
+            <a @click="editTag(text, record)">编辑</a>
+            <a-divider type="vertical" />
+            <a-popconfirm
+              title="你确定要删除这个标签吗?"
+              ok-text="Yes"
+              cancel-text="No"
+              @confirm="confirm"
+              @cancel="cancel"
+            >
+              <a>删除</a>
+            </a-popconfirm>
+          </span>
+        </a-table>
+      </a-card>
+    </page-header-wrapper>
+    <!-- 新增标签 -->
+    <a-modal
+      :title="oprationType | filtersModel"
+      v-model="tagVisible"
+      :confirm-loading="confirmLoading"
+      ok-text="确认"
+      cancel-text="取消"
+      @ok="handleOk"
+    >
+      <a-input v-model="tagLabel" placeholder="请输入标签名称" />
+    </a-modal>
+  </div>
+</template>
+
+<script>
+const columns = [
+   {
+    dataIndex: 'index',
+    key: '序号',
+    scopedSlots: { customRender: 'index' }
+  },
+  {
+    dataIndex: 'name',
+    key: 'name',
+    title: '课程名称'
+  },
+  {
+    title: '学员人数',
+    dataIndex: 'age',
+    key: 'age'
+  },
+  {
+    title: '讲师',
+    dataIndex: 'teacher',
+    key: 'teacher'
+  },
+  {
+    title: '创建时间',
+    key: 'createTime',
+    dataIndex: 'createTime'
+  },
+  {
+    title: '操作',
+    key: 'action',
+    scopedSlots: { customRender: 'action' }
+  }
+]
+
+const data = [
+  {
+    key: '1',
+    name: '思维课程',
+    age: 32,
+    teacher: '曹清华',
+    createTime: '2020/12/12',
+    tags: ['nice', 'developer']
+  },
+  {
+    key: '2',
+    name: 'Jim Green',
+    age: 42,
+    address: 'London No. 1 Lake Park',
+    tags: ['loser']
+  },
+  {
+    key: '3',
+    name: 'Joe Black',
+    age: 32,
+    address: 'Sidney No. 1 Lake Park',
+    tags: ['cool', 'teacher']
+  }
+]
+export default {
+  name: 'Tag',
+  filters: {
+      filtersModel (type) {
+          switch (type) {
+              case 'add':
+                  return '新增标签'
+              case 'edit':
+                  return '编辑标签'
+              case 'select':
+                  return '选择学员'
+          }
+      }
+  },
+  data () {
+    return {
+      data,
+      columns,
+      tagLabel: '',
+      oprationType: 'add', // 当前操作的类型, add edit select
+      confirmLoading: false,
+      tagVisible: false // 新增标签 弹窗状态
+    }
+  },
+  methods: {
+    // 编辑当前标签
+    editTag (text, record) {
+        console.log(text, record)
+        this.oprationType = 'edit'
+        this.tagVisible = true
+    }
+  }
+}
+</script>
+<style scoped lang="less">
+
+</style>

+ 4 - 4
src/views/markting/seas/list.vue

@@ -4,19 +4,19 @@
 
 <script>
 export default {
-  data() {
+  data () {
     return {
 
     }
   },
-  created() {
+  created () {
 
   },
-  mounted() {
+  mounted () {
 
   },
   methods: {
-    
+
   }
 }
 </script>

+ 0 - 0
src/views/role/RoleList.vue → src/views/role-old/RoleList.vue


+ 35 - 0
src/views/roleIng/role/index.vue

@@ -0,0 +1,35 @@
+<template>
+  <div class="role">
+    <page-header-wrapper
+      :title="false"
+      content="用于角色与页面的权限配置"
+      :tab-list="tabList"
+      :tab-active-key="tabActiveKey"
+      @tabChange="handleTabChange"
+    >
+      <a-row :gutter="24">
+        <a-col :md="24" :lg="5">
+          <role-admin />
+        </a-col>
+        <a-col :md="24" :lg="19">
+          <role-setting />
+        </a-col>
+      </a-row>
+    </page-header-wrapper>
+  </div>
+</template>
+
+<script>
+import RoleAdmin from './roleAdmin'
+import RoleSetting from './roleSetting'
+export default {
+  name: 'Role',
+  components: {
+    RoleAdmin,
+    RoleSetting
+  }
+}
+</script>
+<style scoped lang="less">
+
+</style>

+ 102 - 0
src/views/roleIng/role/roleAdmin.vue

@@ -0,0 +1,102 @@
+<template>
+  <div class="role-admin">
+    <!--       :body-style="{padding: '24px 10px 24px 32px'}" -->
+    <a-card
+      :bordered="false"
+      title="角色面板"
+    >
+      <template slot="extra">
+        <a-button type="primary" @click="visible = true ; modalType = 'add'">新增</a-button>
+      </template>
+      <div class="role-list">
+        <div v-for="(item, index) in roleList" :key="item.id">
+          <div class="role-item" >
+            <a-row>
+              <a-col :span="14">
+                {{ item.label }}
+              </a-col>
+              <a-col :span="10">
+                <a @click="openModal(item, index)">重命名</a>
+                <a-divider type="vertical" />
+                <a> 删除</a>
+              </a-col>
+            </a-row>
+          </div>
+          <a-divider />
+        </div>
+
+      </div>
+    </a-card>
+
+    <!-- 重命名 or 新增 角色弹窗 -->
+    <a-modal
+      :title="modalType | filtersModalType"
+      :visible="visible"
+      :confirm-loading="confirmLoading"
+      @ok="handleOk"
+      @cancel="visible = flase"
+    >
+      <a-input v-model="form.label" :placeholder="modalType | filtersModalType " ></a-input>
+    </a-modal>
+  </div>
+</template>
+
+<script>
+const roleList = []
+
+for (let i = 0; i < 10; i++) {
+    roleList.push({
+        label: `校长${i}`,
+        id: i
+    })
+}
+export default {
+  name: 'RoleAdmin',
+  filters: {
+      filtersModalType (type) {
+          switch (type) {
+              case 'add':
+                  return '新增标签名'
+              case 'edit':
+                  return '编辑角色名'
+          }
+      }
+  },
+  data () {
+      return {
+        modalType: 'edit', // 编辑 edit 或者 新增 add
+        visible: false,
+        confirmLoading: false,
+        roleList,
+        form: {
+            label: '', // 新增或者修改的字段
+            id: ''
+        }
+      }
+  },
+  methods: {
+    handleOk (e) {
+      this.confirmLoading = true
+      setTimeout(() => {
+        this.visible = false
+        this.confirmLoading = false
+      }, 2000)
+    },
+       // 打开弹窗
+    openModal (record, index) {
+        this.modalType = 'edit'
+        this.visible = true
+        this.form.label = record.label
+        this.form.id = record.id
+    }
+  }
+}
+</script>
+<style scoped lang="less">
+// .role-admin {
+//     min-height: 100vh;
+// }
+.role-item {
+    margin-bottom: 30px;
+}
+</style>

+ 119 - 0
src/views/roleIng/role/roleSetting.vue

@@ -0,0 +1,119 @@
+<template>
+  <div class="role-setting">
+    <a-card
+      :body-style="{padding: '24px 32px'}"
+      :bordered="false"
+      title="权限配置"
+    >
+      <a-row :gutter="[18]">
+        <a-col :span="8">
+          <a-card
+            :body-style="{padding: '24px 32px'}"
+            title="菜单权限"
+          >
+            <tree
+              checkable
+              :tree-data="treeData"
+              :default-expanded-keys="['0-0-0', '0-0-1']"
+              :default-selected-keys="['0-0-0', '0-0-1']"
+              :default-checked-keys="['0-0-0', '0-0-1']"
+              @select="onSelect"
+              @check="onCheck"
+            />
+          </a-card>
+
+        </a-col>
+        <!-- <a-col :span="1">
+          <a-divider type="vertical"/>
+        </a-col> -->
+        <a-col :span="12">
+          <a-card
+            :body-style="{padding: '24px 32px'}"
+            title="操作权限"
+          >
+            <template slot="extra">
+              <a-checkbox :indeterminate="indeterminate" :checked="checkAll" @change="onCheckAllChange">
+                全选
+              </a-checkbox>
+            </template>
+
+            <br />
+            <a-checkbox-group v-model="checkedList" :options="plainOptions" @change="onChange" />
+          </a-card>
+        </a-col>
+      </a-row>
+    </a-card>
+
+    <!-- 重命名 -->
+  </div>
+</template>
+
+<script>
+import { Tree } from 'ant-design-vue'
+const treeData = [
+  {
+    title: '全校区1',
+    key: '0-0',
+    slots: { title: '0-0' },
+    children: [
+      {
+        title: '教练部',
+        key: '0-0-0',
+        slots: { title: '0-0-0' },
+        disabled: true,
+        children: [
+          { title: '销售一部', key: '0-0-0-0', slots: { title: '0-0-0-0' }, disableCheckbox: true },
+          { title: '销售二部', key: '0-0-0-1', slots: { title: '0-0-0-1' } }
+        ]
+      },
+      {
+        title: '市场部',
+        key: '0-0-1',
+        slots: { title: '0-0-1' },
+        children: [{ key: '0-0-1-0', title: '市场大王', slots: { title: '0-0-1-0' } }]
+      }
+    ]
+  }
+]
+const plainOptions = ['Apple', 'Pear', 'Orange', 'Apple', 'Pear', 'Orange', 'Apple', 'Pear', 'Orange']
+const defaultCheckedList = ['Apple', 'Orange']
+export default {
+  name: 'RoleSetting',
+  components: {
+      Tree
+  },
+  data () {
+      return {
+          treeData,
+          checkedList: defaultCheckedList,
+          indeterminate: true,
+          checkAll: false,
+          plainOptions
+      }
+  },
+  methods: {
+    onChange (checkedList) {
+      this.indeterminate = !!checkedList.length && checkedList.length < plainOptions.length
+      this.checkAll = checkedList.length === plainOptions.length
+    },
+    onCheckAllChange (e) {
+      Object.assign(this, {
+        checkedList: e.target.checked ? plainOptions : [],
+        indeterminate: false,
+        checkAll: e.target.checked
+      })
+    },
+    // 当前选中的树节点的key
+    onSelect (selectedKeys, info) {
+      console.log('selected', selectedKeys, info)
+      this.currentClickNode = selectedKeys[0]
+    },
+    onCheck (checkedKeys, info) {
+      console.log('onCheck', checkedKeys, info)
+    }
+  }
+}
+</script>
+<style scoped lang="less">
+
+</style>

文件差異過大導致無法顯示
+ 28 - 0
src/views/roleIng/staff/edit.vue


+ 52 - 0
src/views/roleIng/staff/index.vue

@@ -0,0 +1,52 @@
+<template>
+  <div class="role">
+    <page-header-wrapper
+      :title="false"
+      content="用于员工的新增及分配权限"
+      :tab-list="tabList"
+      :tab-active-key="tabActiveKey"
+      @tabChange="handleTabChange"
+    >
+      <a-row :gutter="24">
+        <a-col :md="24" :lg="5">
+          <organiza />
+        </a-col>
+        <a-col :md="24" :lg="19">
+          <staff-admin />
+        </a-col>
+      </a-row>
+    </page-header-wrapper>
+  </div>
+</template>
+
+<script>
+
+import Organiza from './organiza'
+import StaffAdmin from './staffAdmin'
+export default {
+  name: 'Role',
+  components: {
+      Organiza,
+      StaffAdmin
+  },
+  data () {
+      return {
+        addType: 'staff', // 员工和部门  staff  department
+        tabList: [
+            { key: '0', tab: '员工管理' },
+            { key: '1', tab: '角色管理' }
+        ],
+        tabActiveKey: '0'
+      }
+  },
+  methods: {
+
+    handleTabChange (key) {
+      this.tabActiveKey = key
+    }
+  }
+}
+</script>
+<style scoped lang="less">
+
+</style>

+ 195 - 0
src/views/roleIng/staff/organiza.vue

@@ -0,0 +1,195 @@
+<template>
+  <div>
+    <a-card
+      :body-style="{padding: '24px 32px'}"
+      :bordered="false"
+      title="组织架构"
+    >
+      <template slot="extra">
+        <a-button type="primary" @click="departmentVisible = true">新增</a-button>
+      </template>
+      <tree
+        checkable
+        :tree-data="treeData"
+        :default-expanded-keys="['0-0-0', '0-0-1']"
+        :default-selected-keys="['0-0-0', '0-0-1']"
+        :default-checked-keys="['0-0-0', '0-0-1']"
+        @select="onSelect"
+        @check="onCheck"
+      >
+        <span :slot="item.key" v-for="item in aa" :key="item.key">
+          <div>
+            <span>{{ item.title }}</span>
+            <span style="margin-left: 10px" v-if="item.key === currentClickNode">
+              <a @click.stop="handclick(item)">编辑</a>
+              <a-divider type="vertical" />
+              <a>删除</a>
+            </span>
+          </div>
+        </span>
+      </tree>
+    </a-card>
+    <a-modal v-model="departmentVisible" :width="500" title="Basic Modal" @ok="handleOk">
+      <div>
+        <a-row class="department">
+          <a-col :span="4">
+            上级部门
+          </a-col>
+          <a-col
+            :span="18"
+          >
+            <a-tree-select
+              v-model="value"
+              treeNodeFilterProp="title"
+              show-search
+              style="width: 100%"
+              :dropdown-style="{ maxHeight: '400px', overflow: 'auto' }"
+              placeholder="Please select"
+              allow-clear
+              :tree-data="treeData"
+              tree-default-expand-all
+              :replaceFields="replaceFields"
+            />
+            <!-- <a-tree-select-node>
+
+              </a-tree-select-node> -->
+            <!-- <a-tree-select-node key="0-1" value="parent 1" title="parent 1">
+                <a-tree-select-node key="0-1-1" value="parent 1-0" title="parent 1-0">
+                  <a-tree-select-node key="random" :selectable="false" value="leaf1" title="my leaf" />
+                  <a-tree-select-node key="random1" value="leaf2" title="your leaf" />
+                </a-tree-select-node>
+                <a-tree-select-node key="random2" value="parent 1-1" title="parent 1-1">
+                  <a-tree-select-node key="random3" value="sss">
+                    <b slot="title" style="color: #08c">sss</b>
+                  </a-tree-select-node>
+                </a-tree-select-node>
+              </a-tree-select-node> -->
+
+          </a-col>
+        </a-row>
+
+        <a-row class="department">
+          <a-col :span="4">
+            部门名称
+          </a-col>
+          <a-col
+            :span="18"
+          >
+            <a-input
+              placeholder="Basic usage" />
+          </a-col>
+        </a-row>
+      </div>
+    </a-modal>
+    <a-modal v-model="editTreeNodeVisabled" title="Basic Modal">
+      <a-input v-model="editTreeNodeValue" ></a-input>
+    </a-modal>
+  </div>
+
+</template>
+
+<script>
+import { Tree } from 'ant-design-vue'
+const treeData = [
+  {
+    title: '全校区1',
+    key: '0-0',
+    slots: { title: '0-0' },
+    children: [
+      {
+        title: '教练部',
+        key: '0-0-0',
+        lots: { title: '0-0-0' },
+        disabled: true,
+        children: [
+          { title: '销售一部', key: '0-0-0-0', slots: { title: '0-0-0-0' }, disableCheckbox: true },
+          { title: '销售二部', key: '0-0-0-1', slots: { title: '0-0-0-1' } }
+        ]
+      },
+      {
+        title: '市场部',
+        key: '0-0-1',
+        slots: { title: '0-0-1' },
+        children: [{ key: '0-0-1-0', title: '市场大王', slots: { title: '0-0-1-0' } }]
+      }
+    ]
+  }
+]
+export default {
+  name: 'Organiza',
+  components: {
+    Tree
+  },
+  computed: {
+      replaceFields () {
+          return { children: 'children', title: 'title', key: 'key', value: 'title' }
+      }
+  },
+  created () {
+      this.transferTreeData()
+  },
+  watch: {
+    value (value) {
+      console.log(value)
+    }
+  },
+  data () {
+      return {
+        editTreeNodeValue: '',
+        editTreeNodeVisabled: false,
+        aa: [ '0-0', '0-0-0', '0-0-0-0', '0-0-0-0', '0-0-1', '0-0-1-0' ],
+        // tree选择
+        treeExpandedKeys: [],
+        value: undefined,
+        // ---------------------------
+        departmentVisible: false,
+        treeData,
+        currentClickNode: ''
+      }
+  },
+  methods: {
+
+    //  将树节点拍平, 便于使用slot自定义渲染树
+    transferTreeData () {
+        const a = []
+        const recursionTreeData = (treeData) => {
+            console.log(treeData, 1)
+                return treeData.forEach(item => {
+                    if (item.hasOwnProperty('children')) {
+                        recursionTreeData(item.children)
+                    }
+                    const { title, key, slots } = item
+                    a.push({ title, key, slots })
+                })
+            }
+         recursionTreeData(this.treeData)
+        this.aa = a
+    },
+    handleOk () {},
+    handclick (item) {
+        this.editTreeNodeValue = item.title
+
+        this.editTreeNodeVisabled = true
+    },
+    // 当前选中的树节点的key
+    onSelect (selectedKeys, info) {
+      console.log('selected', selectedKeys, info)
+      this.currentClickNode = selectedKeys[0]
+    },
+    onCheck (checkedKeys, info) {
+      console.log('onCheck', checkedKeys, info)
+    }
+  }
+}
+</script>
+<style scoped lang="less">
+.department {
+  display: flex;
+  align-items: center;
+  margin-top: 10px;
+}
+
+::v-deep  .ant-tree li .ant-tree-node-content-wrapper.ant-tree-node-selected {
+    background-color: #fff;
+}
+</style>

+ 155 - 0
src/views/roleIng/staff/staffAdmin.vue

@@ -0,0 +1,155 @@
+<template>
+  <div>
+    <a-card
+      :body-style="{padding: '24px 32px'}"
+      :bordered="false"
+      :tabList="operationTabList"
+      :activeTabKey="operationActiveTabKey"
+      @tabChange="(key) => {this.operationActiveTabKey = key}"
+    >
+      <div class="opraiont">
+        <div class="left">
+          <span>已选用&nbsp; {{ selectedRowKeys.length }} &nbsp;条数据</span>
+          <a-button size="small">
+            停用
+          </a-button>
+          <a-button size="small">
+            删除
+          </a-button>
+        </div>
+        <div class="right">
+          <a-button type="primary" @click="visible = true">新增员工</a-button>
+          <a-button type="primary">筛选</a-button>
+        </div>
+      </div>
+      <a-table
+        :row-selection="{ selectedRowKeys: selectedRowKeys, onChange: onSelectChange }"
+        :columns="columns"
+        :data-source="data"
+      >
+        <template slot="action" slot-scope="text, record">
+          <a @click="editRow(text, record)">编辑</a>
+        </template>
+      </a-table>
+    </a-card>
+    <a-modal v-model="visible" :width="1000" title="Basic Modal" @ok="handleOk">
+      <edit/>
+    </a-modal>
+  </div>
+
+</template>
+
+<script>
+
+import edit from './edit'
+const columns = [
+  {
+    title: '员工编号',
+    dataIndex: 'code'
+  },
+  {
+    title: '姓名',
+    dataIndex: 'name'
+  },
+  {
+    title: '部门',
+    dataIndex: 'department'
+  },
+  {
+    title: '手机号',
+    dataIndex: 'phone'
+  },
+  {
+    title: '邮箱',
+    dataIndex: 'emall'
+  },
+  {
+    title: '微信绑定',
+    dataIndex: 'wechat'
+  },
+  {
+    title: '角色',
+    dataIndex: 'role'
+  },
+  {
+    title: '数据权限',
+    dataIndex: 'static'
+  },
+  {
+    title: '汇报对象',
+    dataIndex: 'object'
+  },
+  {
+    title: '操作',
+    dataIndex: 'action',
+    key: 'action',
+    scopedSlots: { customRender: 'action' }
+  }
+]
+
+const data = []
+for (let i = 0; i < 46; i++) {
+  data.push({
+    key: i,
+    code: Math.random() * 100000000000000000,
+    name: `雷老师 ${i}`,
+    age: 32,
+    department: `销售${i}部`,
+    phone: 18811361102,
+    emall: '1549630250@qq.com',
+    wechat: '',
+    role: `老板${1}号`,
+    static: '全部',
+    object: '所有'
+  })
+}
+
+export default {
+  name: 'StaffAdmin',
+  components: {
+      edit
+  },
+  data () {
+      return {
+        columns,
+        data,
+        visible: false,
+        operationTabList: [
+            {
+            key: '0',
+            tab: '使用中'
+            },
+            {
+            key: '1',
+            tab: '已停用'
+            }
+        ],
+        operationActiveTabKey: '0',
+        selectedRowKeys: [], // Check here to configure the default column
+        loading: false
+      }
+  },
+  methods: {
+      handleOk () {},
+    // 选中行
+    onSelectChange (selectedRowKeys) {
+      console.log('selectedRowKeys changed: ', selectedRowKeys)
+      this.selectedRowKeys = selectedRowKeys
+    }
+  }
+}
+</script>
+<style scoped lang="less">
+.opraiont {
+  margin-bottom: 10px;
+  display: flex;
+  justify-content: space-between;
+  align-items: center;
+  span {
+    margin-right: 10px;
+  }
+  .ant-btn {
+    margin-right: 10px;
+  }
+}
+</style>

+ 11 - 8
vue.config.js

@@ -102,15 +102,18 @@ const vueConfig = {
 
   devServer: {
     // development server port 8000
-    port: 8000
+    port: 8000,
     // If you want to turn on the proxy, please remove the mockjs /src/main.jsL11
-    // proxy: {
-    //   '/api': {
-    //     target: 'https://mock.ihx.me/mock/5baf3052f7da7e07e04a5116/antd-pro',
-    //     ws: false,
-    //     changeOrigin: true
-    //   }
-    // }
+    proxy: {
+      '/api': {
+        target: 'http://192.168.1.21:39090',
+        ws: false,
+        changeOrigin: true,
+        pathRewrite: {
+          '^/api': ''
+        }
+      }
+    }
   },
 
   // disable source map in production

部分文件因文件數量過多而無法顯示