Compare commits
5 Commits
a2c29e8dda
...
ac798f3f94
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
ac798f3f94 | ||
|
|
0ba4d3fe26 | ||
| ed848edfd9 | |||
| f8eda78cf7 | |||
| 6b22078098 |
@@ -39,5 +39,11 @@ export default {
|
|||||||
url: `/sch/school/${id}`,
|
url: `/sch/school/${id}`,
|
||||||
method: 'delete'
|
method: 'delete'
|
||||||
});
|
});
|
||||||
|
},
|
||||||
|
createCode(id){
|
||||||
|
return request({
|
||||||
|
url: `/sch/school/create/${id}`,
|
||||||
|
method: 'post'
|
||||||
|
});
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|||||||
39
src/api/vip.js
Normal file
39
src/api/vip.js
Normal file
@@ -0,0 +1,39 @@
|
|||||||
|
|
||||||
|
import request from '@/utils/request';
|
||||||
|
|
||||||
|
// 查询车型列表
|
||||||
|
export function getCarList(param) {
|
||||||
|
return request({
|
||||||
|
url: '/driver-api/tdSysUserMember/duima/car/list',
|
||||||
|
method: 'get',
|
||||||
|
params: param
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
// 查询会员列表
|
||||||
|
export function getMemberList(param) {
|
||||||
|
return request({
|
||||||
|
url: '/driver-api/tdSysUserMember/duima/member/list',
|
||||||
|
method: 'get',
|
||||||
|
params: param
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// 查询用户会员列表
|
||||||
|
export function getUserMemberList(param) {
|
||||||
|
return request({
|
||||||
|
url: '/driver-api/tdSysUserMember/duima/user/member/list',
|
||||||
|
method: 'get',
|
||||||
|
params: param
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
//新增会员
|
||||||
|
export function addUserMember(data) {
|
||||||
|
return request({
|
||||||
|
url: '/driver-api/tdSysUserMember/duima/user/member',
|
||||||
|
method: 'post',
|
||||||
|
data: data
|
||||||
|
});
|
||||||
|
}
|
||||||
@@ -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,14 +29,17 @@ import Layout from '@/layout';
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
// 公共路由
|
// 公共路由
|
||||||
export const constantRoutes = [{
|
export const constantRoutes = [
|
||||||
|
{
|
||||||
path: '/redirect',
|
path: '/redirect',
|
||||||
component: Layout,
|
component: Layout,
|
||||||
hidden: true,
|
hidden: true,
|
||||||
children: [{
|
children: [
|
||||||
|
{
|
||||||
path: '/redirect/:path(.*)',
|
path: '/redirect/:path(.*)',
|
||||||
component: () => import('@/views/redirect')
|
component: () => import('@/views/redirect')
|
||||||
}]
|
}
|
||||||
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: '/login',
|
path: '/login',
|
||||||
@@ -63,6 +66,16 @@ export const constantRoutes = [{
|
|||||||
component: () => import('@/views/zs/feedback/arrival'),
|
component: () => import('@/views/zs/feedback/arrival'),
|
||||||
hidden: true
|
hidden: true
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
path: '/coach/count',
|
||||||
|
component: () => import('@/views/sch/coach/count'),
|
||||||
|
hidden: true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
path: '/coach/count/detail',
|
||||||
|
component: () => import('@/views/sch/coach/count/detail'),
|
||||||
|
hidden: true
|
||||||
|
},
|
||||||
{
|
{
|
||||||
path: '/404',
|
path: '/404',
|
||||||
component: () => import('@/views/error/404'),
|
component: () => import('@/views/error/404'),
|
||||||
@@ -77,7 +90,8 @@ export const constantRoutes = [{
|
|||||||
path: '',
|
path: '',
|
||||||
component: Layout,
|
component: Layout,
|
||||||
redirect: 'index',
|
redirect: 'index',
|
||||||
children: [{
|
children: [
|
||||||
|
{
|
||||||
path: 'index',
|
path: 'index',
|
||||||
component: () => import('@/views/index'),
|
component: () => import('@/views/index'),
|
||||||
name: 'Index',
|
name: 'Index',
|
||||||
@@ -86,7 +100,8 @@ export const constantRoutes = [{
|
|||||||
icon: 'dashboard',
|
icon: 'dashboard',
|
||||||
affix: true
|
affix: true
|
||||||
}
|
}
|
||||||
}]
|
}
|
||||||
|
]
|
||||||
},
|
},
|
||||||
// {
|
// {
|
||||||
// path: '/demo',
|
// path: '/demo',
|
||||||
@@ -121,7 +136,8 @@ export const constantRoutes = [{
|
|||||||
component: Layout,
|
component: Layout,
|
||||||
hidden: true,
|
hidden: true,
|
||||||
redirect: 'noredirect',
|
redirect: 'noredirect',
|
||||||
children: [{
|
children: [
|
||||||
|
{
|
||||||
path: 'profile',
|
path: 'profile',
|
||||||
component: () => import('@/views/system/user/profile/index'),
|
component: () => import('@/views/system/user/profile/index'),
|
||||||
name: 'Profile',
|
name: 'Profile',
|
||||||
@@ -129,17 +145,20 @@ export const constantRoutes = [{
|
|||||||
title: '个人中心',
|
title: '个人中心',
|
||||||
icon: 'user'
|
icon: 'user'
|
||||||
}
|
}
|
||||||
}]
|
}
|
||||||
|
]
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
|
|
||||||
// 动态路由,基于用户权限动态去加载
|
// 动态路由,基于用户权限动态去加载
|
||||||
export const dynamicRoutes = [{
|
export const dynamicRoutes = [
|
||||||
|
{
|
||||||
path: '/system/user-auth',
|
path: '/system/user-auth',
|
||||||
component: Layout,
|
component: Layout,
|
||||||
hidden: true,
|
hidden: true,
|
||||||
permissions: ['system:user:edit'],
|
permissions: ['system:user:edit'],
|
||||||
children: [{
|
children: [
|
||||||
|
{
|
||||||
path: 'role/:userId(\\d+)',
|
path: 'role/:userId(\\d+)',
|
||||||
component: () => import('@/views/system/user/authRole'),
|
component: () => import('@/views/system/user/authRole'),
|
||||||
name: 'AuthRole',
|
name: 'AuthRole',
|
||||||
@@ -147,14 +166,16 @@ export const dynamicRoutes = [{
|
|||||||
title: '分配角色',
|
title: '分配角色',
|
||||||
activeMenu: '/system/user'
|
activeMenu: '/system/user'
|
||||||
}
|
}
|
||||||
}]
|
}
|
||||||
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: '/system/role-auth',
|
path: '/system/role-auth',
|
||||||
component: Layout,
|
component: Layout,
|
||||||
hidden: true,
|
hidden: true,
|
||||||
permissions: ['system:role:edit'],
|
permissions: ['system:role:edit'],
|
||||||
children: [{
|
children: [
|
||||||
|
{
|
||||||
path: 'user/:roleId(\\d+)',
|
path: 'user/:roleId(\\d+)',
|
||||||
component: () => import('@/views/system/role/authUser'),
|
component: () => import('@/views/system/role/authUser'),
|
||||||
name: 'AuthUser',
|
name: 'AuthUser',
|
||||||
@@ -162,14 +183,16 @@ export const dynamicRoutes = [{
|
|||||||
title: '分配用户',
|
title: '分配用户',
|
||||||
activeMenu: '/system/role'
|
activeMenu: '/system/role'
|
||||||
}
|
}
|
||||||
}]
|
}
|
||||||
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: '/system/dict-data',
|
path: '/system/dict-data',
|
||||||
component: Layout,
|
component: Layout,
|
||||||
hidden: true,
|
hidden: true,
|
||||||
permissions: ['system:dict:list'],
|
permissions: ['system:dict:list'],
|
||||||
children: [{
|
children: [
|
||||||
|
{
|
||||||
path: 'index/:dictId(\\d+)',
|
path: 'index/:dictId(\\d+)',
|
||||||
component: () => import('@/views/system/dict/data'),
|
component: () => import('@/views/system/dict/data'),
|
||||||
name: 'Data',
|
name: 'Data',
|
||||||
@@ -177,14 +200,16 @@ export const dynamicRoutes = [{
|
|||||||
title: '字典数据',
|
title: '字典数据',
|
||||||
activeMenu: '/system/dict'
|
activeMenu: '/system/dict'
|
||||||
}
|
}
|
||||||
}]
|
}
|
||||||
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: '/monitor/job-log',
|
path: '/monitor/job-log',
|
||||||
component: Layout,
|
component: Layout,
|
||||||
hidden: true,
|
hidden: true,
|
||||||
permissions: ['monitor:job:list'],
|
permissions: ['monitor:job:list'],
|
||||||
children: [{
|
children: [
|
||||||
|
{
|
||||||
path: 'index',
|
path: 'index',
|
||||||
component: () => import('@/views/monitor/job/log'),
|
component: () => import('@/views/monitor/job/log'),
|
||||||
name: 'JobLog',
|
name: 'JobLog',
|
||||||
@@ -192,14 +217,16 @@ export const dynamicRoutes = [{
|
|||||||
title: '调度日志',
|
title: '调度日志',
|
||||||
activeMenu: '/monitor/job'
|
activeMenu: '/monitor/job'
|
||||||
}
|
}
|
||||||
}]
|
}
|
||||||
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: '/zs/clue-form',
|
path: '/zs/clue-form',
|
||||||
component: Layout,
|
component: Layout,
|
||||||
hidden: true,
|
hidden: true,
|
||||||
permissions: ['zs:clue:add', 'zs:clue:edit'],
|
permissions: ['zs:clue:add', 'zs:clue:edit'],
|
||||||
children: [{
|
children: [
|
||||||
|
{
|
||||||
path: 'index/:clueId(\\d+)',
|
path: 'index/:clueId(\\d+)',
|
||||||
component: () => import('@/views/zs/clue/ClueForm'),
|
component: () => import('@/views/zs/clue/ClueForm'),
|
||||||
name: 'ClueForm',
|
name: 'ClueForm',
|
||||||
@@ -207,7 +234,8 @@ export const dynamicRoutes = [{
|
|||||||
title: '线索详情',
|
title: '线索详情',
|
||||||
activeMenu: '/zs/clue'
|
activeMenu: '/zs/clue'
|
||||||
}
|
}
|
||||||
}]
|
}
|
||||||
|
]
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
|
|
||||||
|
|||||||
57
src/views/sch/coach/count/detail.vue
Normal file
57
src/views/sch/coach/count/detail.vue
Normal file
@@ -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>
|
||||||
63
src/views/sch/coach/count/index.vue
Normal file
63
src/views/sch/coach/count/index.vue
Normal file
@@ -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>
|
||||||
@@ -22,6 +22,12 @@
|
|||||||
<el-table-column label="负责人" prop="leader" />
|
<el-table-column label="负责人" prop="leader" />
|
||||||
<el-table-column label="联系方式" prop="phone" />
|
<el-table-column label="联系方式" prop="phone" />
|
||||||
<el-table-column label="备注" prop="remark" />
|
<el-table-column label="备注" prop="remark" />
|
||||||
|
<el-table-column label="小程序二维码" prop="jwlCodePath" >
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<el-image v-if="scope.row.jwlCodePath != undefined" style="width: 100px; height: 100px" :src="baseUrl + scope.row.jwlCodePath" ></el-image>
|
||||||
|
<el-button v-else v-hasPermi="['sch:school:create']" type="text" icon="el-icon-edit" @click="handleCreate(scope.row)">生成</el-button>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
<el-table-column label="创建时间" width="160">
|
<el-table-column label="创建时间" width="160">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<span>{{ parseTime(scope.row.createTime) }}</span>
|
<span>{{ parseTime(scope.row.createTime) }}</span>
|
||||||
@@ -62,7 +68,8 @@ export default {
|
|||||||
loading: {
|
loading: {
|
||||||
tableLoading: false
|
tableLoading: false
|
||||||
},
|
},
|
||||||
dialogVisible: false
|
dialogVisible: false,
|
||||||
|
baseUrl: process.env.VUE_APP_BASE_API
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
@@ -101,6 +108,14 @@ export default {
|
|||||||
this.$refs.dialogForm.init(item);
|
this.$refs.dialogForm.init(item);
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
handleCreate(item){
|
||||||
|
schoolApi.createCode(item.schoolId).then(resp => {
|
||||||
|
if (resp.code === 200) {
|
||||||
|
this.getPageList();
|
||||||
|
this.$modal.msgSuccess('生成成功');
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
// 删除操作
|
// 删除操作
|
||||||
handleDelete(item) {
|
handleDelete(item) {
|
||||||
this.$modal
|
this.$modal
|
||||||
|
|||||||
113
src/views/vip/components/VipForm.vue
Normal file
113
src/views/vip/components/VipForm.vue
Normal file
@@ -0,0 +1,113 @@
|
|||||||
|
<template>
|
||||||
|
<el-dialog title="VIP" :close-on-click-modal="false" append-to-body :visible.sync="visible" width="500px" @close="closeDialog">
|
||||||
|
<div>
|
||||||
|
<el-form ref="dialogForm" :model="dialogForm" :rules="dataRule" @keyup.enter.native="dialogFormSubmit()">
|
||||||
|
<el-row>
|
||||||
|
<el-col :span="24">
|
||||||
|
<el-form-item label="手机号" prop="phone">
|
||||||
|
<el-input v-model="dialogForm.phone" placeholder="请输入" clearable />
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
<el-row>
|
||||||
|
<el-col :span="24">
|
||||||
|
<el-form-item label="车型" prop="carTypeId">
|
||||||
|
<el-select v-model="dialogForm.carTypeId" clearable placeholder="选择车型">
|
||||||
|
<el-option v-for="item in carOptions" :key="item.carTypeId" :label="item.carName" :value="item.carTypeId" />
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
<el-row>
|
||||||
|
<el-col :span="24">
|
||||||
|
<el-form-item label="会员" prop="memberId">
|
||||||
|
<el-select v-model="dialogForm.memberId" clearable placeholder="选择车型">
|
||||||
|
<el-option v-for="item in memberOptions.filter(item => item.carTypeId === dialogForm.carTypeId)" :key="item.memberId" :label="item.memberName" :value="item.memberId" />
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
</el-form>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<span slot="footer" class="dialog-footer">
|
||||||
|
<el-button plain @click="(visible = false)">取消</el-button>
|
||||||
|
<el-button v-jclick type="primary" :disabled="!canSubmit" @click="dialogFormSubmit()">确定</el-button>
|
||||||
|
</span>
|
||||||
|
</el-dialog>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import { addUserMember, getCarList, getMemberList } from '@/api/vip';
|
||||||
|
|
||||||
|
export default {
|
||||||
|
name:"VipForm",
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
visible: false,
|
||||||
|
canSubmit: true,
|
||||||
|
dialogForm: {
|
||||||
|
userId: undefined,
|
||||||
|
memberId: undefined,
|
||||||
|
phone: undefined
|
||||||
|
},
|
||||||
|
dataRule: {
|
||||||
|
phone: [{ required: true, message: '手机号不为空', trigger: 'blur' },
|
||||||
|
{ pattern: /^1[3|4|5|6|7|8|9][0-9]\d{8}$/, message: '请输入正确的手机号码', trigger: 'blur' }], carTypeId: [{ required: true, message: '车型不能为空', trigger: 'blur' }],
|
||||||
|
memberId: [{ required: true, message: '会员不能为空', trigger: 'blur' }]
|
||||||
|
},
|
||||||
|
carOptions:[],
|
||||||
|
memberOptions:[]
|
||||||
|
};
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
init(info = undefined) {
|
||||||
|
// debugger
|
||||||
|
this.visible = true;
|
||||||
|
this.getCarList();
|
||||||
|
this.getMemberList();
|
||||||
|
this.$nextTick(() => {
|
||||||
|
this.resetDialogForm();
|
||||||
|
// this.$refs['dialogForm'].resetFields();
|
||||||
|
if (info) {
|
||||||
|
this.dialogForm = this.deepClone(info);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
},
|
||||||
|
resetDialogForm() {
|
||||||
|
this.dialogForm = {
|
||||||
|
userId: undefined,
|
||||||
|
memberId: undefined,
|
||||||
|
phone: undefined
|
||||||
|
};
|
||||||
|
},
|
||||||
|
closeDialog() {
|
||||||
|
this.$emit('update:dialogVisible', false);
|
||||||
|
},
|
||||||
|
// 表单提交
|
||||||
|
dialogFormSubmit() {
|
||||||
|
this.$refs.dialogForm.validate((valid) => {
|
||||||
|
if (valid) {
|
||||||
|
addUserMember(this.dialogForm).then(response => {
|
||||||
|
if (response.code == 200) {
|
||||||
|
this.$modal.msgSuccess('新增成功');
|
||||||
|
this.$emit('update');
|
||||||
|
this.visible = false;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
});
|
||||||
|
},
|
||||||
|
getCarList(){
|
||||||
|
getCarList().then(resp => {
|
||||||
|
this.carOptions = resp.data;
|
||||||
|
})
|
||||||
|
},
|
||||||
|
getMemberList(){
|
||||||
|
getMemberList().then(resp => {
|
||||||
|
this.memberOptions = resp.data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
|
</script>
|
||||||
96
src/views/vip/index.vue
Normal file
96
src/views/vip/index.vue
Normal file
@@ -0,0 +1,96 @@
|
|||||||
|
<template>
|
||||||
|
<div class="app-container" >
|
||||||
|
<el-form size="small" :inline="true" label-width="68px" @submit.native.prevent>
|
||||||
|
<el-row :gutter="20">
|
||||||
|
<el-form-item label="手机号">
|
||||||
|
<el-input v-model="queryParams.phone" placeholder="请输入" clearable @keyup.enter.native="handleQuery" />
|
||||||
|
</el-form-item>
|
||||||
|
</el-row>
|
||||||
|
<el-form-item>
|
||||||
|
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
|
||||||
|
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
|
||||||
|
<el-button type="primary" icon="el-icon-plus" @click="handleAdd">新增</el-button>
|
||||||
|
|
||||||
|
</el-form-item>
|
||||||
|
</el-form>
|
||||||
|
|
||||||
|
<el-table v-loading="loading" :data="tableList" >
|
||||||
|
<el-table-column type="index" width="55" align="center" />
|
||||||
|
<el-table-column label="手机号" align="center" prop="phone" min-width="140" />
|
||||||
|
<el-table-column label="会员名" align="center" prop="memberName" min-width="140"/>
|
||||||
|
<el-table-column label="车型" align="center" prop="carName" min-width="100" />
|
||||||
|
<el-table-column label="科目" align="center" prop="subjects" min-width="100"/>
|
||||||
|
<el-table-column label="开始时间" align="center" prop="startDate" min-width="100"/>
|
||||||
|
<el-table-column label="结束时间" align="center" prop="endDate" min-width="100"/>
|
||||||
|
|
||||||
|
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<!-- <el-button size="mini" type="text" icon="el-icon-download" @click="handleEdit(scope.row)">编辑</el-button> -->
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
</el-table>
|
||||||
|
|
||||||
|
<!-- <pagination v-show="total>0" :total="total" :page.sync="queryParams.pageNum" :limit.sync="queryParams.pageSize" @pagination="getList" /> -->
|
||||||
|
<VipForm v-if="dialogVisible" ref="dialogForm" :dialog-visible="dialogVisible" @update="getList" />
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import { getUserMemberList } from '@/api/vip';
|
||||||
|
import VipForm from './components/VipForm.vue'
|
||||||
|
|
||||||
|
export default {
|
||||||
|
name: 'Vip',
|
||||||
|
components:{
|
||||||
|
VipForm
|
||||||
|
},
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
// 遮罩层
|
||||||
|
loading: false,
|
||||||
|
// 总条数
|
||||||
|
total: 0,
|
||||||
|
tableList: [],
|
||||||
|
// 查询参数
|
||||||
|
queryParams: {
|
||||||
|
phone: undefined
|
||||||
|
},
|
||||||
|
dialogVisible: false,
|
||||||
|
dialogAddVisible: false
|
||||||
|
};
|
||||||
|
},
|
||||||
|
created() {
|
||||||
|
this.getList();
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
/** 查询文件列表 */
|
||||||
|
getList() {
|
||||||
|
this.loading = true;
|
||||||
|
getUserMemberList(this.queryParams).then(response => {
|
||||||
|
this.tableList = response.data;
|
||||||
|
// this.total = response.total;
|
||||||
|
this.loading = false;
|
||||||
|
});
|
||||||
|
},
|
||||||
|
|
||||||
|
/** 搜索按钮操作 */
|
||||||
|
handleQuery() {
|
||||||
|
this.getList();
|
||||||
|
},
|
||||||
|
/** 重置按钮操作 */
|
||||||
|
resetQuery() {
|
||||||
|
this.queryParams.question = '';
|
||||||
|
this.handleQuery();
|
||||||
|
},
|
||||||
|
|
||||||
|
handleAdd(item) {
|
||||||
|
this.dialogVisible = true;
|
||||||
|
this.$nextTick(() => {
|
||||||
|
this.$refs.dialogForm.init(item);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
|
</script>
|
||||||
|
|
||||||
@@ -34,8 +34,8 @@ module.exports = {
|
|||||||
open: true,
|
open: true,
|
||||||
proxy: {
|
proxy: {
|
||||||
[process.env.VUE_APP_BASE_API + '/driver-api']: {
|
[process.env.VUE_APP_BASE_API + '/driver-api']: {
|
||||||
target: `http://118.31.23.45:8888/driver-api/`,
|
// target: `http://118.31.23.45:8888/driver-api/`,
|
||||||
// target: `http://localhost:8888/driver-api/`,
|
target: `http://localhost:8888/driver-api/`,
|
||||||
changeOrigin: true,
|
changeOrigin: true,
|
||||||
pathRewrite: {
|
pathRewrite: {
|
||||||
['^' + process.env.VUE_APP_BASE_API + '/driver-api']: ''
|
['^' + process.env.VUE_APP_BASE_API + '/driver-api']: ''
|
||||||
|
|||||||
Reference in New Issue
Block a user