接待人页面

caozong
qsh 1 year ago
parent 0ba4d3fe26
commit ac798f3f94
  1. 24
      src/permission.js
  2. 382
      src/router/index.js
  3. 57
      src/views/sch/coach/count/detail.vue
  4. 63
      src/views/sch/coach/count/index.vue

@ -7,23 +7,27 @@
*/ */
import router from './router'; import router from './router';
import store from './store'; import store from './store';
import { import { Message } from 'element-ui';
Message
} from 'element-ui';
import NProgress from 'nprogress'; import NProgress from 'nprogress';
import 'nprogress/nprogress.css'; import 'nprogress/nprogress.css';
import { import { getToken } from '@/utils/auth';
getToken import { isRelogin } from '@/utils/request';
} from '@/utils/auth';
import {
isRelogin
} from '@/utils/request';
NProgress.configure({ NProgress.configure({
showSpinner: false showSpinner: false
}); });
const whiteList = ['/login', '/auth-redirect', '/bind', '/register', '/question', '/clue/feedback/follow', '/clue/feedback/arrival']; const whiteList = [
'/login',
'/auth-redirect',
'/bind',
'/register',
'/question',
'/clue/feedback/follow',
'/clue/feedback/arrival',
'/coach/count',
'/coach/count/detail'
];
router.beforeEach((to, from, next) => { router.beforeEach((to, from, next) => {
NProgress.start(); NProgress.start();

@ -29,186 +29,214 @@ import Layout from '@/layout';
*/ */
// 公共路由 // 公共路由
export const constantRoutes = [{ export const constantRoutes = [
path: '/redirect', {
component: Layout, path: '/redirect',
hidden: true, component: Layout,
children: [{ hidden: true,
path: '/redirect/:path(.*)', children: [
component: () => import('@/views/redirect') {
}] path: '/redirect/:path(.*)',
}, component: () => import('@/views/redirect')
{ }
path: '/login', ]
component: () => import('@/views/login'), },
hidden: true {
}, path: '/login',
{ component: () => import('@/views/login'),
path: '/register', hidden: true
component: () => import('@/views/register'), },
hidden: true {
}, path: '/register',
{ component: () => import('@/views/register'),
path: '/question', hidden: true
component: () => import('@/views/question'), },
hidden: true {
}, path: '/question',
{ component: () => import('@/views/question'),
path: '/clue/feedback/follow', hidden: true
component: () => import('@/views/zs/feedback/follow'), },
hidden: true {
}, path: '/clue/feedback/follow',
{ component: () => import('@/views/zs/feedback/follow'),
path: '/clue/feedback/arrival', hidden: true
component: () => import('@/views/zs/feedback/arrival'), },
hidden: true {
}, path: '/clue/feedback/arrival',
{ component: () => import('@/views/zs/feedback/arrival'),
path: '/404', hidden: true
component: () => import('@/views/error/404'), },
hidden: true {
}, path: '/coach/count',
{ component: () => import('@/views/sch/coach/count'),
path: '/401', hidden: true
component: () => import('@/views/error/401'), },
hidden: true {
}, path: '/coach/count/detail',
{ component: () => import('@/views/sch/coach/count/detail'),
path: '', hidden: true
component: Layout, },
redirect: 'index', {
children: [{ path: '/404',
path: 'index', component: () => import('@/views/error/404'),
component: () => import('@/views/index'), hidden: true
name: 'Index', },
meta: { {
title: '首页', path: '/401',
icon: 'dashboard', component: () => import('@/views/error/401'),
affix: true hidden: true
} },
}] {
}, path: '',
// { component: Layout,
// path: '/demo', redirect: 'index',
// component: Layout, children: [
// redirect: 'noredirect', {
// meta: { path: 'index',
// title: 'Demo', component: () => import('@/views/index'),
// icon: 'xx' name: 'Index',
// }, meta: {
// children: [{ title: '首页',
// path: '/base-page', icon: 'dashboard',
// component: () => import('@/views/demo/basePage/index'), affix: true
// name: 'BasePage', }
// meta: { }
// title: 'BasePage', ]
// icon: 'xx' },
// } // {
// }, // path: '/demo',
// { // component: Layout,
// path: '/base-components', // redirect: 'noredirect',
// component: () => import('@/views/demo/baseComponents/index'), // meta: {
// name: 'BaseComponents', // title: 'Demo',
// meta: { // icon: 'xx'
// title: 'BaseComponents', // },
// icon: 'xx' // children: [{
// } // path: '/base-page',
// } // component: () => import('@/views/demo/basePage/index'),
// ] // name: 'BasePage',
// }, // meta: {
{ // title: 'BasePage',
path: '/user', // icon: 'xx'
component: Layout, // }
hidden: true, // },
redirect: 'noredirect', // {
children: [{ // path: '/base-components',
path: 'profile', // component: () => import('@/views/demo/baseComponents/index'),
component: () => import('@/views/system/user/profile/index'), // name: 'BaseComponents',
name: 'Profile', // meta: {
meta: { // title: 'BaseComponents',
title: '个人中心', // icon: 'xx'
icon: 'user' // }
} // }
}] // ]
} // },
{
path: '/user',
component: Layout,
hidden: true,
redirect: 'noredirect',
children: [
{
path: 'profile',
component: () => import('@/views/system/user/profile/index'),
name: 'Profile',
meta: {
title: '个人中心',
icon: 'user'
}
}
]
}
]; ];
// 动态路由,基于用户权限动态去加载 // 动态路由,基于用户权限动态去加载
export const dynamicRoutes = [{ export const dynamicRoutes = [
path: '/system/user-auth', {
component: Layout, path: '/system/user-auth',
hidden: true, component: Layout,
permissions: ['system:user:edit'], hidden: true,
children: [{ permissions: ['system:user:edit'],
path: 'role/:userId(\\d+)', children: [
component: () => import('@/views/system/user/authRole'), {
name: 'AuthRole', path: 'role/:userId(\\d+)',
meta: { component: () => import('@/views/system/user/authRole'),
title: '分配角色', name: 'AuthRole',
activeMenu: '/system/user' meta: {
} title: '分配角色',
}] activeMenu: '/system/user'
}, }
{ }
path: '/system/role-auth', ]
component: Layout, },
hidden: true, {
permissions: ['system:role:edit'], path: '/system/role-auth',
children: [{ component: Layout,
path: 'user/:roleId(\\d+)', hidden: true,
component: () => import('@/views/system/role/authUser'), permissions: ['system:role:edit'],
name: 'AuthUser', children: [
meta: { {
title: '分配用户', path: 'user/:roleId(\\d+)',
activeMenu: '/system/role' component: () => import('@/views/system/role/authUser'),
} name: 'AuthUser',
}] meta: {
}, title: '分配用户',
{ activeMenu: '/system/role'
path: '/system/dict-data', }
component: Layout, }
hidden: true, ]
permissions: ['system:dict:list'], },
children: [{ {
path: 'index/:dictId(\\d+)', path: '/system/dict-data',
component: () => import('@/views/system/dict/data'), component: Layout,
name: 'Data', hidden: true,
meta: { permissions: ['system:dict:list'],
title: '字典数据', children: [
activeMenu: '/system/dict' {
} path: 'index/:dictId(\\d+)',
}] component: () => import('@/views/system/dict/data'),
}, name: 'Data',
{ meta: {
path: '/monitor/job-log', title: '字典数据',
component: Layout, activeMenu: '/system/dict'
hidden: true, }
permissions: ['monitor:job:list'], }
children: [{ ]
path: 'index', },
component: () => import('@/views/monitor/job/log'), {
name: 'JobLog', path: '/monitor/job-log',
meta: { component: Layout,
title: '调度日志', hidden: true,
activeMenu: '/monitor/job' permissions: ['monitor:job:list'],
} children: [
}] {
}, path: 'index',
{ component: () => import('@/views/monitor/job/log'),
path: '/zs/clue-form', name: 'JobLog',
component: Layout, meta: {
hidden: true, title: '调度日志',
permissions: ['zs:clue:add', 'zs:clue:edit'], activeMenu: '/monitor/job'
children: [{ }
path: 'index/:clueId(\\d+)', }
component: () => import('@/views/zs/clue/ClueForm'), ]
name: 'ClueForm', },
meta: { {
title: '线索详情', path: '/zs/clue-form',
activeMenu: '/zs/clue' component: Layout,
} hidden: true,
}] permissions: ['zs:clue:add', 'zs:clue:edit'],
} children: [
{
path: 'index/:clueId(\\d+)',
component: () => import('@/views/zs/clue/ClueForm'),
name: 'ClueForm',
meta: {
title: '线索详情',
activeMenu: '/zs/clue'
}
}
]
}
]; ];
// 防止连续点击多次路由报错 // 防止连续点击多次路由报错

@ -0,0 +1,57 @@
<!-- 接待人员详情页 -->
<template>
<div class="app-container">
<el-form v-show="showSearch" ref="queryForm" :model="queryParams" size="small" :inline="true" label-width="68px">
<el-form-item>
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
</el-form-item>
</el-form>
<el-table v-loading="loading" :data="coachList">
<el-table-column type="index" width="55" align="center" />
<el-table-column label="学员姓名" align="center" prop="schoolName" />
<el-table-column label="联系方式" align="center" prop="placeName" />
<el-table-column label="到场状态" align="center" prop="coachName" />
<el-table-column label="备注" align="center" prop="phone" />
<!-- <el-table-column label="操作" align="center" class-name="small-padding fixed-width">
<template slot-scope="scope">
<el-button v-hasPermi="['sch:coach:edit']" size="mini" type="text" icon="el-icon-edit" @click="handleAddAndUpdate(scope.row)">修改</el-button>
<el-button v-hasPermi="['sch:coach:remove']" size="mini" type="text" icon="el-icon-delete" @click="handleDelete(scope.row)">删除</el-button>
</template>
</el-table-column> -->
</el-table>
</div>
</template>
<script>
import { listCoach, getCoach, delCoach } from '@/api/sch/coach';
export default {
data() {
return {
//
loading: true,
//
showSearch: true,
//
total: 0,
//
coachList: [],
//
queryParams: {
type: null, // 1 2
placeId: null,
coachName: null,
phone: null
}
};
},
created() {
},
methods: {
/** 查询教练列表 */
getList() {
}
}
};
</script>

@ -0,0 +1,63 @@
<template>
<!-- 接待人统计页面 -->
<div class="app-container" style="max-width: 600px; margin: auto;">
<el-form v-show="showSearch" ref="queryForm" :model="queryParams" size="small" :inline="true" label-width="68px">
<el-form-item label="联系方式" prop="phone">
<el-input v-model="queryParams.phone" placeholder="请输入联系方式" clearable @keyup.enter.native="handleQuery" />
</el-form-item>
<el-form-item label="验证码" prop="code">
<el-input v-model="queryParams.code" placeholder="请输入验证码" clearable @keyup.enter.native="handleQuery" />
</el-form-item>
<el-form-item>
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">查询</el-button>
</el-form-item>
</el-form>
<el-card class="box-card">
<div slot="header" class="clearfix">
<span>接待统计</span>
</div>
<div>
<div><span>今日接到人数100</span></div>
<div><span>今日成交人数69</span></div>
<div><span>今日未成交人数31</span>
<router-link :to="'/coach/count/detail'"> 详情</router-link>
</div>
</div>
<div>
<div><span>本月接到人数200</span></div>
<div><span>本月成交人数169</span></div>
<div><span>本月未成交人数31</span></div>
</div>
</el-card>
</div>
</template>
<script>
import { listCoach, delCoach } from '@/api/sch/coach';
export default {
name: 'Count',
data() {
return {
//
loading: true,
//
queryParams: {
phone: null,
code: null
},
countInfo: {}
};
},
created() {
},
methods: {
/** 查询统计结果 */
getList() {
this.loading = true;
}
}
};
</script>
Loading…
Cancel
Save