Commit abd95d58 authored by 赵茹林's avatar 赵茹林

新增 增长运营列表、用户服务列表

parent 8e2e3494
...@@ -42,10 +42,10 @@ ...@@ -42,10 +42,10 @@
<el-checkbox v-model="data.refund" v-if="data.cover ==='5-1'|| data.cover=== '5-10'|| data.cover=== '5-9'">退款</el-checkbox> <el-checkbox v-model="data.refund" v-if="data.cover ==='5-1'|| data.cover=== '5-10'|| data.cover=== '5-9'">退款</el-checkbox>
<el-checkbox v-model="data.refund" v-if="data.cover ==='10-1' ">类别管理</el-checkbox> <el-checkbox v-model="data.refund" v-if="data.cover ==='10-1' ">类别管理</el-checkbox>
<el-checkbox v-model="data.promoter" v-if="data.cover ==='5-1' ">编辑推广人</el-checkbox> <el-checkbox v-model="data.promoter" v-if="data.cover ==='5-1' ">编辑推广人</el-checkbox>
<el-checkbox v-model="data.refund" v-if="data.cover ==='2-3'|| data.cover=== '3-1'|| data.cover=== '3-2' ">添加观摩班用户</el-checkbox> <el-checkbox v-model="data.refund" v-if="data.cover ==='2-3'|| data.cover=== '3-1'|| data.cover=== '3-2' || data.cover=== '3-6' || data.cover=== '3-7' ">添加观摩班用户</el-checkbox>
<el-checkbox v-model="data.classManage" v-if="data.cover ==='2-3'|| data.cover=== '3-1'|| data.cover=== '3-2' ">添加带班班用户</el-checkbox> <el-checkbox v-model="data.classManage" v-if="data.cover ==='2-3'|| data.cover=== '3-1'|| data.cover=== '3-2' || data.cover=== '3-6' || data.cover=== '3-7' ">添加带班班用户</el-checkbox>
<el-checkbox v-model="data.classManageUnlimited" v-if="data.cover ==='2-3'|| data.cover=== '3-1'|| data.cover=== '3-2' ">添加观摩班(无限制)</el-checkbox> <el-checkbox v-model="data.classManageUnlimited" v-if="data.cover ==='2-3'|| data.cover=== '3-1'|| data.cover=== '3-2' || data.cover=== '3-6' || data.cover=== '3-7' ">添加观摩班(无限制)</el-checkbox>
<el-checkbox v-model="data.classTakeUnlimited" v-if="data.cover ==='2-3'|| data.cover=== '3-1'|| data.cover=== '3-2' ">添加带班班(无限制)</el-checkbox> <el-checkbox v-model="data.classTakeUnlimited" v-if="data.cover ==='2-3'|| data.cover=== '3-1'|| data.cover=== '3-2' || data.cover=== '3-6' || data.cover=== '3-7' ">添加带班班(无限制)</el-checkbox>
<el-checkbox v-model="data.distribution" v-if="data.cover ==='5-9'||data.cover ==='7-9'" @change="distribution">批量分配</el-checkbox> <el-checkbox v-model="data.distribution" v-if="data.cover ==='5-9'||data.cover ==='7-9'" @change="distribution">批量分配</el-checkbox>
<el-checkbox v-model="data.exportFinish" v-if="data.cover === '2-3'">导出完课用户</el-checkbox> <el-checkbox v-model="data.exportFinish" v-if="data.cover === '2-3'">导出完课用户</el-checkbox>
<el-checkbox v-model="data.import" v-if="data.cover ==='6-3'||data.cover ==='5-3'||data.cover ==='5-9'">导入</el-checkbox> <el-checkbox v-model="data.import" v-if="data.cover ==='6-3'||data.cover ==='5-3'||data.cover ==='5-9'">导入</el-checkbox>
...@@ -88,7 +88,7 @@ ...@@ -88,7 +88,7 @@
limit: 10, limit: 10,
roleList: [], roleList: [],
exportMenuList: [ // 导出权限 exportMenuList: [ // 导出权限
'2-3', '5-10', '5-2', '5-1', '5-3', '5-8', '5-9', '6-4', '3-1', '7-9', '6-3', '10-8' '2-3', '5-10', '5-2', '5-1', '5-3', '5-8', '5-9', '6-4', '3-1', '3-6', '3-7', '7-9', '6-3', '10-8'
], ],
dialog: { dialog: {
title: '新增角色', title: '新增角色',
......
...@@ -38,8 +38,7 @@ ...@@ -38,8 +38,7 @@
<span v-if="type===1">{{teacherDetail.status}}</span> <span v-if="type===1">{{teacherDetail.status}}</span>
<el-form-item v-if="type !== 1"> <el-form-item v-if="type !== 1">
<el-select v-model="form.status" placeholder="请选择"> <el-select v-model="form.status" placeholder="请选择">
<el-option v-for="data in statusOption" :key="data.value" :label="data.label" <el-option v-for="data in statusOption" :key="data.value" :label="data.label" :value="data.value"></el-option>
:value="data.value"></el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
</el-col> </el-col>
...@@ -47,9 +46,9 @@ ...@@ -47,9 +46,9 @@
<el-col :span="8"> <el-col :span="8">
<span v-if="type===1">{{teacherDetail.type}}</span> <span v-if="type===1">{{teacherDetail.type}}</span>
<el-form-item v-if="type !== 1"> <el-form-item v-if="type !== 1">
<el-select v-model="form.type" placeholder="请选择"> <!--<el-select v-model="form.type" placeholder="请选择" disabled>-->
<el-option v-for="data in dialogObj.teacherTypeList" :key="data.type" :label="data.name" <el-select v-model="form.type" placeholder="请选择" :disabled="typeList.length < 2">
:value="data.type"></el-option> <el-option v-for="data in typeList" :key="data.type" :label="data.name" :value="data.type"></el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
</el-col> </el-col>
...@@ -141,6 +140,7 @@ ...@@ -141,6 +140,7 @@
], ],
loading:true, loading:true,
type:0, type:0,
typeList: [],
title:'', title:'',
form:{ form:{
name:'', name:'',
...@@ -181,16 +181,16 @@ ...@@ -181,16 +181,16 @@
switch(this.dialogObj.type){ switch(this.dialogObj.type){
case 2: case 2:
this.$refs['form'].validate((valid) => { this.$refs['form'].validate((valid) => {
if(valid){ if (valid) {
editTeacherApi(this.id,json).then(res=>{ editTeacherApi(this.id, json).then(res => {
this.$message({ this.$message({
type: 'success', type: 'success',
message: '修改成功!' message: '修改成功!'
}); });
this.$emit("reflash"); this.$emit("reflash");
this.show = false; this.show = false;
}) })
} }
}); });
break; break;
case 0: case 0:
...@@ -235,41 +235,63 @@ ...@@ -235,41 +235,63 @@
this.loading = false; this.loading = false;
}) })
}, },
initType() {
// debugger
if (this.dialogObj.teacherTypeList && this.dialogObj.teacherTypeList.length) {
if (String(this.dialogObj.typeAdd).indexOf(',') > -1) { // 3,4
let typeAddArr = this.dialogObj.typeAdd.split(','), arr = [];
typeAddArr.forEach(val => {
let idx = this.dialogObj.teacherTypeList.findIndex(i => i.type == val);
if (idx > -1) {
arr.push(this.dialogObj.teacherTypeList[idx])
}
})
this.typeList = arr;
} else if (this.dialogObj.typeAdd == 0 || this.dialogObj.typeAdd == 2) {
let idx = this.dialogObj.teacherTypeList.findIndex(i => i.type == this.dialogObj.typeAdd);
if (idx > -1) {
this.typeList = [this.dialogObj.teacherTypeList[idx]]
}
}
}
},
initDialog(){ initDialog(){
console.log(this.dialogObj) // console.log(this.dialogObj)
this.initType();
switch(this.dialogObj.type){ switch(this.dialogObj.type){
case 0: case 0: // 添加
this.title = '新增教师'; this.title = '新增';
this.show = this.dialogObj.show; this.show = this.dialogObj.show;
this.type = 0; this.type = 0;
this.form.name = ""; this.form.name = "";
this.form.alias = ""; this.form.alias = "";
this.form.qr = ""; this.form.qr = "";
this.form.squad = ""; this.form.squad = "";
this.form.type = 0; this.form.type = String(this.dialogObj.typeAdd).indexOf(',')>-1 ? 3 : this.dialogObj.typeAdd;
this.form.status = 0; this.form.status = 0;
this.imageList = []; this.imageList = [];
this.loading = false; this.loading = false;
this.uploadShow = true; this.uploadShow = true;
this.form.media_id = ''; this.form.media_id = '';
break; break;
case 1: case 1: // 查看
this.title = '教师详情'; this.title = '详情';
this.show = this.dialogObj.show; this.show = this.dialogObj.show;
this.id = this.dialogObj.id; this.id = this.dialogObj.id;
this.type = 1; this.type = 1;
getTeacherDetailApi(this.id).then(res=>{ getTeacherDetailApi(this.id).then(res => {
this.teacherDetail = res; this.teacherDetail = res;
this.loading = false this.loading = false
}); });
break; break;
case 2: case 2: // 编辑
this.title = '编辑'; this.title = '编辑';
this.show = this.dialogObj.show; this.show = this.dialogObj.show;
this.id = this.dialogObj.id; this.id = this.dialogObj.id;
this.type = 2; this.type = 2;
getTeacherDetailApi(this.id).then(res=>{ getTeacherDetailApi(this.id).then(res => {
this.form.name = res.name; this.form.name = res.name;
this.form.squad = res.squad; this.form.squad = res.squad;
this.form.alias = res.alias; this.form.alias = res.alias;
...@@ -277,7 +299,7 @@ ...@@ -277,7 +299,7 @@
this.form.type = res.type; this.form.type = res.type;
this.form.status = res.status; this.form.status = res.status;
this.form.media_id = res.media_id ? res.media_id : ''; this.form.media_id = res.media_id ? res.media_id : '';
this.imageList = [{name:res.qr,url:res.qr}]; this.imageList = [{name: res.qr, url: res.qr}];
this.uploadShow = !res.qr; this.uploadShow = !res.qr;
this.loading = false; this.loading = false;
}); });
...@@ -287,6 +309,10 @@ ...@@ -287,6 +309,10 @@
} }
}, },
watch:{ watch:{
'dialogObj.teacherTypeList'() {
console.log('listUpdate'); // todo 似乎无用?
this.initType();
},
dialogObj:{ dialogObj:{
handler: function () { handler: function () {
this.loading = true; this.loading = true;
......
This diff is collapsed.
...@@ -13,18 +13,18 @@ ...@@ -13,18 +13,18 @@
<el-option label="不带班" value="1"></el-option> <el-option label="不带班" value="1"></el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item label="教师类型"> <!--<el-form-item label="教师类型">
<el-select v-model="searchFrom.type" style="width: 95px" placeholder="请选择" @change="getUser" clearable> <el-select v-model="searchFrom.type" style="width: 95px" placeholder="请选择" @change="getUser" clearable>
<!-- <el-option &lt;!&ndash; <el-option
v-for="item in dialogObj.teacherTypeList" v-for="item in dialogObj.teacherTypeList"
:key="item.id" :key="item.id"
:label="item.label" :label="item.label"
:value="item.id"> :value="item.id">
</el-option> --> </el-option> &ndash;&gt;
<el-option v-for="data in dialogObj.teacherTypeList" :key="data.type" :label="data.name" <el-option v-for="data in dialogObj.teacherTypeList" :key="data.type" :label="data.name"
:value="data.type"></el-option> :value="data.type"></el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>-->
<el-form-item label="任务日期"> <el-form-item label="任务日期">
<el-date-picker <el-date-picker
style="width: 140px;" style="width: 140px;"
...@@ -289,7 +289,7 @@ ...@@ -289,7 +289,7 @@
import page from '../framework/page' import page from '../framework/page'
import teacherDetail from '../teacherDetail/index' import teacherDetail from '../teacherDetail/index'
import dialogCom from './dialog' import dialogCom from './dialog'
import Dialog from "../class/dialog"; // import Dialog from "../class/dialog";
let teacherTypeSource = {} let teacherTypeSource = {}
export default { export default {
name: "index", name: "index",
...@@ -334,7 +334,13 @@ ...@@ -334,7 +334,13 @@
status:'0', status:'0',
task_date:nowDate, task_date:nowDate,
squad:"1", squad:"1",
type:"", type:0,
},
dialogObj:{
typeAdd: 0, // 与searchFrom.type一致
type:0,
show:false,
id:''
}, },
dialogDetail:{ dialogDetail:{
show:false, show:false,
...@@ -344,11 +350,6 @@ ...@@ -344,11 +350,6 @@
total:0, total:0,
nowPage:1, nowPage:1,
limit: 20, limit: 20,
dialogObj:{
type:0,
show:false,
id:''
},
res:null, res:null,
dialogDetailObj:{ dialogDetailObj:{
show:false, show:false,
...@@ -373,7 +374,7 @@ ...@@ -373,7 +374,7 @@
} }
}, },
components:{ components:{
Dialog, // Dialog,
page, page,
dialogCom, dialogCom,
teacherDetail teacherDetail
......
This diff is collapsed.
...@@ -102,7 +102,7 @@ export default [{ ...@@ -102,7 +102,7 @@ export default [{
value: '销售管理', value: '销售管理',
icon: 'icon-laoshi', icon: 'icon-laoshi',
list: [{ list: [{
value: '教师列表', value: '教师列表', // 老师用
routerName: 'teacher', routerName: 'teacher',
path: '/teacher', path: '/teacher',
cover: '3-1', cover: '3-1',
...@@ -111,6 +111,26 @@ export default [{ ...@@ -111,6 +111,26 @@ export default [{
name: 'teacher', name: 'teacher',
component: e => require(['@/components/teacher'], e), component: e => require(['@/components/teacher'], e),
} }
}, {
value: '增长运营列表', // 增长运营、TMK用
routerName: 'growth',
path: '/growth',
cover: '3-6',
router: {
path: '/growth',
name: 'growth',
component: e => require(['@/components/teacher/growth'], e),
}
}, {
value: '用户服务列表', // 用户服务用
routerName: 'userservice',
path: '/userservice',
cover: '3-7',
router: {
path: '/userservice',
name: 'userservice',
component: e => require(['@/components/teacher/userservice'], e),
}
}, { }, {
value: '月课订单列表', value: '月课订单列表',
routerName: 'monthOrder', routerName: 'monthOrder',
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment