Commit 3c310c5a authored by 赵茹林's avatar 赵茹林

线上 [更新] 销售1、2、3部

parent 4112fa45
...@@ -89,6 +89,12 @@ ...@@ -89,6 +89,12 @@
padding: 0; padding: 0;
} }
ol, ul {
margin: 0;
padding: 0;
list-style: none;
}
.el-collapse-item__arrow { .el-collapse-item__arrow {
margin-left: 0; margin-left: 0;
} }
...@@ -277,6 +283,38 @@ ...@@ -277,6 +283,38 @@
border-radius: 50%; border-radius: 50%;
height: 50px; height: 50px;
} }
.table-refresh-header {
display: inline-block;
cursor: help;
i {
color: #409eff;
}
}
.cell-link {
display: inline-block;
margin: 0 -6px;
padding: 0px 8px;
border-radius: 3px;
text-decoration: underline;
transition: color 240ms, background-color 240ms;
color: #444;
& + .cell-link {
margin-left: 0;
}
a {
color: #444;
transition: color 240ms, background-color 240ms;
}
&:hover {
background-color: #cce4ff;
color: #007fff;
a {
color: #007fff;
}
}
}
} }
.update-time { .update-time {
...@@ -288,4 +326,60 @@ ...@@ -288,4 +326,60 @@
font-size: 14px; font-size: 14px;
color: #606266; color: #606266;
} }
.tabs-refresh {
margin-top: 10px;
&.el-tabs--card > .el-tabs__header {
margin-bottom: 10px;
/*margin-top: 10px;*/
margin-left: 10px;
/*padding-left: 10px;*/
/* background-color: #fff; */
/*padding-top: 10px;*/
padding-bottom: 1px;
}
&.el-tabs--card > .el-tabs__header .el-tabs__nav {
overflow: hidden;
}
&.el-tabs--card > .el-tabs__header .el-tabs__item.is-active {
background-color: #fff;
}
}
// 修复样式
.el-tree-node__content {
.el-checkbox {
margin-right: 8px !important;
}
}
.custom-table {
margin-top: 20px;
width: 100%;
border: solid 1px #EBEEF5;
border-spacing: 0;
border-collapse: collapse;
thead {
color: #909399;
font-weight: 500;
th {
padding: 12px 10px;
border: 1px solid #EBEEF5;
}
}
tbody {
tr {
transition: background-color 240ms;
&:hover {
background-color: #F5F7FA;
}
td {
padding: 12px 10px;
border: 1px solid #EBEEF5;
}
}
}
}
</style> </style>
...@@ -6,12 +6,10 @@ ...@@ -6,12 +6,10 @@
:visible.sync="show" :visible.sync="show"
width="800px"> width="800px">
<div v-loading="loading"> <div v-loading="loading">
<el-form ref="form" :model="form" :rules="rules" > <el-form ref="form" :model="form" :rules="rules">
<el-row v-if="type===1"> <el-row v-if="type===1">
<el-col :span="4"><label>ID</label></el-col> <el-col :span="4"><label>ID</label></el-col>
<el-col :span="8"> <el-col :span="8">{{teacherDetail.id}}</el-col>
{{teacherDetail.id}}
</el-col>
<el-col :span="4"><label>创建时间</label></el-col> <el-col :span="4"><label>创建时间</label></el-col>
<el-col :span="8">{{teacherDetail.created_at}}</el-col> <el-col :span="8">{{teacherDetail.created_at}}</el-col>
</el-row> </el-row>
...@@ -61,10 +59,10 @@ ...@@ -61,10 +59,10 @@
<!--<el-input v-model="form.qr"></el-input>--> <!--<el-input v-model="form.qr"></el-input>-->
<el-upload <el-upload
action="/api/public/upload/zone" action="/api/public/upload/zone"
list-type="picture-card"
:http-request="uploadFile" :http-request="uploadFile"
:class="{disabled:!uploadShow}" :class="{disabled:!uploadShow}"
:before-upload="beforeAvatarUpload" :before-upload="beforeAvatarUpload"
list-type="picture-card"
:file-list="imageList" :file-list="imageList"
:on-success="handleAvatarSuccess" :on-success="handleAvatarSuccess"
:on-remove="handleRemove"> :on-remove="handleRemove">
...@@ -84,46 +82,45 @@ ...@@ -84,46 +82,45 @@
<el-select v-model="form.squad" placeholder="请选择"> <el-select v-model="form.squad" placeholder="请选择">
<el-option <el-option
v-for="i in 10" v-for="i in 10"
:key="i" :key="i+(index-1)*10"
:label="'T'+i" :label="'T'+(i+(index-1)*10)"
:value="i"> :value="i+(index-1)*10">
</el-option> </el-option>
</el-select> </el-select>
</el-col> </el-col>
</el-row> </el-row>
</el-form> </el-form>
<span slot="footer" class="dialog-footer" v-if="type !== 1"> <div slot="footer" class="dialog-footer" v-if="type !== 1">
<el-button @click="show = false">取 消</el-button> <el-button @click="show = false">取 消</el-button>
<el-button type="primary" @click="sub">确 定</el-button> <el-button type="primary" @click="sub">确 定</el-button>
</span> </div>
</div> </div>
</el-dialog> </el-dialog>
</template> </template>
<script> <script>
import {getTeacherDetailApi,addTeacherApi,editTeacherApi,uploadFileApi} from "../../service/api"; import {getTeacherDetailApi, addTeacherApi, editTeacherApi, uploadFileApi} from "../../service/api";
export default { export default {
name: "dialogObj", name: "dialogObj",
props:[ props: [
'dialogObj' 'dialogObj',
'index'
], ],
data(){ data() {
return{ return {
show:false, show: false,
id: '', id: '',
statusOption:[ statusOption: [{
{ label: '带班',
label:'带班', value: 0
value:0 }, {
}, label: '不带班',
{ value: 1
label:'不带班', }],
value:1 /*typeOption:[
}
],
typeOption:[
{ {
label:'老师', label:'老师',
value:0 value:0
...@@ -137,48 +134,44 @@ ...@@ -137,48 +134,44 @@
label:'市场', label:'市场',
value:3 value:3
} }
], ],*/
loading:true, loading: true,
type:0, type: 0,
typeList: [], typeList: [],
title:'', title: '',
form:{ form: {
name:'', name: '',
type:0, type: 0,
squad:'', squad: '',
qr:'', qr: '',
alias:'', alias: '',
status:0, status: 0,
media_id:'' media_id: ''
}, },
rules:{ rules: {
name:[ name: [ {required: true, message: '请输入名称', trigger: 'change'} ],
{ required: true, message: '请输入名称', trigger: 'change' } qr: [ {required: true, message: '请输入二维码', trigger: 'change'} ]
],
qr:[
{ required: true, message: '请输入二维码', trigger: 'change' }
]
}, },
teacherDetail:{}, teacherDetail: {},
imageList: [], imageList: [],
uploadShow: true uploadShow: true
} }
}, },
methods:{ methods: {
sub(){ sub() {
if(this.imageList.length > 0){ if (this.imageList.length > 0) {
this.form.qr = this.imageList[0].url; this.form.qr = this.imageList[0].url;
} }
let json = { let json = {
name:this.form.name, name: this.form.name,
type:this.form.type, type: this.form.type,
qr:this.form.qr, qr: this.form.qr,
squad:this.form.squad, squad: this.form.squad,
alias:this.form.alias, alias: this.form.alias,
status:this.form.status, status: this.form.status,
media_id: this.form.media_id media_id: this.form.media_id
}; };
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) {
...@@ -195,8 +188,8 @@ ...@@ -195,8 +188,8 @@
break; break;
case 0: case 0:
this.$refs['form'].validate((valid) => { this.$refs['form'].validate((valid) => {
if(valid){ if (valid) {
addTeacherApi(json).then(res=>{ addTeacherApi(json).then(res => {
this.$message({ this.$message({
type: 'success', type: 'success',
message: '新增成功!' message: '新增成功!'
...@@ -209,29 +202,29 @@ ...@@ -209,29 +202,29 @@
break break
} }
}, },
beforeAvatarUpload(){ beforeAvatarUpload() {
this.uploadShow = false this.uploadShow = false
}, },
handleRemove(){ handleRemove() {
this.uploadShow = true this.uploadShow = true
}, },
handleAvatarSuccess(res) { handleAvatarSuccess(res) {
this.imageList = [{name:res.data.url,url:process.env.IMAGE_URL_HEAD + res.data.url}] this.imageList = [{name: res.data.url, url: process.env.IMAGE_URL_HEAD + res.data.url}]
}, },
uploadFile(a) { uploadFile(a) {
this.loading = true; this.loading = true;
this.$store.dispatch('setProgress',{type:'new',id:a.file.uid}); this.$store.dispatch('setProgress', {type: 'new', id: a.file.uid});
this.fileUid = a.file.uid; this.fileUid = a.file.uid;
uploadFileApi({file:a.file,type:'all'}).then(res=>{ uploadFileApi({file: a.file, type: 'all'}).then(res => {
this.form.media_id = res.wechat_info ? res.wechat_info.media_id : ''; this.form.media_id = res.wechat_info ? res.wechat_info.media_id : '';
this.imageList = [{name:res.url,url:process.env.IMAGE_URL_HEAD + res.url}]; this.imageList = [{name: res.url, url: process.env.IMAGE_URL_HEAD + res.url}];
this.uploadShow = false; this.uploadShow = false;
this.loading = false; this.loading = false;
this.$message({ this.$message({
type: 'success', type: 'success',
message: '上传成功!' message: '上传成功!'
}); });
}).catch(()=>{ }).catch(() => {
this.loading = false; this.loading = false;
}) })
}, },
...@@ -247,7 +240,8 @@ ...@@ -247,7 +240,8 @@
} }
}) })
this.typeList = arr; this.typeList = arr;
} else if (this.dialogObj.typeAdd == 0 || this.dialogObj.typeAdd == 2) { // } else if (this.dialogObj.typeAdd == 0 || this.dialogObj.typeAdd == 2) {
} else {
let idx = this.dialogObj.teacherTypeList.findIndex(i => i.type == this.dialogObj.typeAdd); let idx = this.dialogObj.teacherTypeList.findIndex(i => i.type == this.dialogObj.typeAdd);
if (idx > -1) { if (idx > -1) {
this.typeList = [this.dialogObj.teacherTypeList[idx]] this.typeList = [this.dialogObj.teacherTypeList[idx]]
...@@ -255,11 +249,11 @@ ...@@ -255,11 +249,11 @@
} }
} }
}, },
initDialog(){ initDialog() {
// console.log(this.dialogObj) // console.log(this.dialogObj)
this.initType(); 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;
...@@ -269,7 +263,7 @@ ...@@ -269,7 +263,7 @@
this.form.qr = ""; this.form.qr = "";
this.form.squad = ""; this.form.squad = "";
this.form.type = String(this.dialogObj.typeAdd).indexOf(',')>-1 ? 3 : this.dialogObj.typeAdd; 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;
...@@ -308,48 +302,53 @@ ...@@ -308,48 +302,53 @@
} }
}, },
watch:{ watch: {
'dialogObj.teacherTypeList'() { 'dialogObj.teacherTypeList'() {
console.log('listUpdate'); // todo 似乎无用? console.log('listUpdate'); // todo 似乎无用?
this.initType(); this.initType();
}, },
dialogObj:{ dialogObj: {
handler: function () { handler: function () {
this.loading = true; this.loading = true;
this.initDialog() this.initDialog()
}, },
deep: true deep: true
}, },
show(value){ show(value) {
this.$emit("changeShow",value); this.$emit("changeShow", value);
} }
} }
} }
</script> </script>
<style scoped lang="less"> <style scoped lang="less">
.el-col{ .el-col {
min-height: 50px; min-height: 50px;
text-align: center; text-align: center;
margin-bottom: 20px; margin-bottom: 20px;
line-height: 40px; line-height: 40px;
.el-select{
.el-select {
width: 100%; width: 100%;
} }
img{
img {
width: 50px; width: 50px;
border-radius: 100px; border-radius: 100px;
} }
label{
label {
color: #5982e6; color: #5982e6;
} }
} }
.qr-img { .qr-img {
width: 148px !important; width: 148px !important;
border: none !important; border: none !important;
border-radius: 0 !important; border-radius: 0 !important;
} }
.dialog-footer{
.dialog-footer {
display: block; display: block;
text-align: center; text-align: center;
} }
......
...@@ -40,17 +40,18 @@ ...@@ -40,17 +40,18 @@
<!--<el-form-item v-if="$store.state.orderRefund">--> <!--<el-form-item v-if="$store.state.orderRefund">-->
<!--<el-button type="success" plain @click="add">新增教师</el-button>--> <!--<el-button type="success" plain @click="add">新增教师</el-button>-->
<el-form-item v-if="!$store.state.readonly"> <el-form-item v-if="!$store.state.readonly">
<el-button type="success" plain @click="add">新增增长运营</el-button> <!--<el-button type="success" plain @click="add">新增增长运营</el-button>-->
<el-button type="success" plain @click="add">新增</el-button>
</el-form-item> </el-form-item>
</el-form> </el-form>
<el-tabs v-model="searchFrom.squad" type="card" style="background: white;padding-top: 10px" @tab-click="getUser"> <el-tabs v-model="searchFrom.squad" type="card" style="background: white;padding-top: 10px" @tab-click="getUser">
<el-tab-pane v-if="phoneNumObj.teacher_type!='teacher_leader'" v-for="i in 10" :key="i" :label="'T'+i" :name="i.toString()"/> <el-tab-pane v-if="phoneNumObj.teacher_type!='teacher_leader'" v-for="i in 10" :key="i+(index-1)*10" :label="'T'+(i+(index-1)*10)" :name="(i+(index-1)*10).toString()"/>
<!-- <el-tab-pane v-if="phoneNumObj.teacher_type=='teacher_leader'" :key="phoneNumObj.squad" :label="'T'+phoneNumObj.squad" :name="phoneNumObj.squad.toString()"/> --> <!-- <el-tab-pane v-if="phoneNumObj.teacher_type=='teacher_leader'" :key="phoneNumObj.squad" :label="'T'+phoneNumObj.squad" :name="phoneNumObj.squad.toString()"/> -->
</el-tabs> </el-tabs>
<el-table <el-table
size="mini" size="mini"
:data="userList" :data="userList"
height="calc(100vh - 335px)" height="calc(100vh - 322px)"
style="width: 100%"> style="width: 100%">
<el-table-column <el-table-column
prop="name" prop="name"
...@@ -66,7 +67,7 @@ ...@@ -66,7 +67,7 @@
<br> <br>
微信号:{{scope.row.alias}} 微信号:{{scope.row.alias}}
<br> <br>
类别:{{scope.row.type | teacherType}} 类别:{{scope.row.type | teacherType}} 老师
<br> <br>
顾问:{{scope.row.adviser}} 顾问:{{scope.row.adviser}}
<br> <br>
...@@ -82,7 +83,8 @@ ...@@ -82,7 +83,8 @@
进班人数:{{scope.row.into_class_num}}<br> 进班人数:{{scope.row.into_class_num}}<br>
加老师处理数:{{scope.row.add_teacher_exec_num}}<br> 加老师处理数:{{scope.row.add_teacher_exec_num}}<br>
加老师成功数:{{scope.row.add_teacher_success_num}}<br> 加老师成功数:{{scope.row.add_teacher_success_num}}<br>
成功率:<el-progress 成功率:
<el-progress
style="display: inline-block;width: calc(90% - 50px)" style="display: inline-block;width: calc(90% - 50px)"
:text-inside="true" :text-inside="true"
:stroke-width="18" :stroke-width="18"
...@@ -90,7 +92,8 @@ ...@@ -90,7 +92,8 @@
:percentage="Number(scope.row.add_teacher_success_rate)?Number(scope.row.add_teacher_success_rate):0"> :percentage="Number(scope.row.add_teacher_success_rate)?Number(scope.row.add_teacher_success_rate):0">
</el-progress> </el-progress>
<br> <br>
处理率:<el-progress 处理率:
<el-progress
style="display: inline-block;width: calc(90% - 50px)" style="display: inline-block;width: calc(90% - 50px)"
:text-inside="true" :text-inside="true"
:stroke-width="18" :stroke-width="18"
...@@ -106,7 +109,8 @@ ...@@ -106,7 +109,8 @@
需召回人数:{{scope.row.need_recall_num}}<br> 需召回人数:{{scope.row.need_recall_num}}<br>
已沟通人数:{{scope.row.recall_desc_exec_num}}<br> 已沟通人数:{{scope.row.recall_desc_exec_num}}<br>
用户回复数:{{scope.row.recall_desc_reply_num}}<br> 用户回复数:{{scope.row.recall_desc_reply_num}}<br>
达标率:<el-progress 达标率:
<el-progress
style="display: inline-block;width: calc(90% - 50px)" style="display: inline-block;width: calc(90% - 50px)"
:text-inside="true" :text-inside="true"
:stroke-width="18" :stroke-width="18"
...@@ -114,7 +118,8 @@ ...@@ -114,7 +118,8 @@
:percentage="Number(scope.row.recall_watch_rate)?Number(scope.row.recall_watch_rate):0"> :percentage="Number(scope.row.recall_watch_rate)?Number(scope.row.recall_watch_rate):0">
</el-progress> </el-progress>
<br> <br>
处理率:<el-progress 处理率:
<el-progress
style="display: inline-block;width: calc(90% - 50px)" style="display: inline-block;width: calc(90% - 50px)"
:text-inside="true" :text-inside="true"
:stroke-width="18" :stroke-width="18"
...@@ -130,7 +135,8 @@ ...@@ -130,7 +135,8 @@
意向用户数:{{scope.row.intention_num}}<br> 意向用户数:{{scope.row.intention_num}}<br>
完课沟通用户数{{scope.row.over_desc_exec_num}}<br> 完课沟通用户数{{scope.row.over_desc_exec_num}}<br>
往期活跃用户沟通数:{{scope.row.past_desc_exec_num}}<br> 往期活跃用户沟通数:{{scope.row.past_desc_exec_num}}<br>
标记率:<el-progress 标记率:
<el-progress
style="display: inline-block;width: calc(90% - 50px)" style="display: inline-block;width: calc(90% - 50px)"
:text-inside="true" :text-inside="true"
:stroke-width="18" :stroke-width="18"
...@@ -138,7 +144,8 @@ ...@@ -138,7 +144,8 @@
:percentage="Number(scope.row.over_intention_rate)?Number(scope.row.over_intention_rate):0"> :percentage="Number(scope.row.over_intention_rate)?Number(scope.row.over_intention_rate):0">
</el-progress> </el-progress>
<br> <br>
处理率:<el-progress 处理率:
<el-progress
style="display: inline-block;width: calc(90% - 50px)" style="display: inline-block;width: calc(90% - 50px)"
:text-inside="true" :text-inside="true"
:stroke-width="18" :stroke-width="18"
...@@ -170,7 +177,8 @@ ...@@ -170,7 +177,8 @@
<div>总计</div> <div>总计</div>
<div> <div>
<div> <div>
成功率:<el-progress 成功率:
<el-progress
style="display: inline-block;width: calc(90% - 50px)" style="display: inline-block;width: calc(90% - 50px)"
:text-inside="true" :text-inside="true"
:stroke-width="16" :stroke-width="16"
...@@ -178,7 +186,8 @@ ...@@ -178,7 +186,8 @@
:percentage="Number(res.add_teacher_success_rate)?Number(res.add_teacher_success_rate):0"> :percentage="Number(res.add_teacher_success_rate)?Number(res.add_teacher_success_rate):0">
</el-progress> </el-progress>
<br> <br>
处理率:<el-progress 处理率:
<el-progress
style="display: inline-block;width: calc(90% - 50px)" style="display: inline-block;width: calc(90% - 50px)"
:text-inside="true" :text-inside="true"
:stroke-width="16" :stroke-width="16"
...@@ -189,7 +198,8 @@ ...@@ -189,7 +198,8 @@
</div> </div>
<div> <div>
<div> <div>
达标率:<el-progress 达标率:
<el-progress
style="display: inline-block;width: calc(90% - 50px)" style="display: inline-block;width: calc(90% - 50px)"
:text-inside="true" :text-inside="true"
:stroke-width="16" :stroke-width="16"
...@@ -197,7 +207,8 @@ ...@@ -197,7 +207,8 @@
:percentage="Number(res.recall_watch_rate)?Number(res.recall_watch_rate):0"> :percentage="Number(res.recall_watch_rate)?Number(res.recall_watch_rate):0">
</el-progress> </el-progress>
<br> <br>
处理率:<el-progress 处理率:
<el-progress
style="display: inline-block;;width: calc(90% - 50px)" style="display: inline-block;;width: calc(90% - 50px)"
:text-inside="true" :text-inside="true"
:stroke-width="16" :stroke-width="16"
...@@ -208,7 +219,8 @@ ...@@ -208,7 +219,8 @@
</div> </div>
<div> <div>
<div> <div>
标记率:<el-progress 标记率:
<el-progress
style="display: inline-block;width: calc(90% - 50px)" style="display: inline-block;width: calc(90% - 50px)"
:text-inside="true" :text-inside="true"
:stroke-width="16" :stroke-width="16"
...@@ -216,7 +228,8 @@ ...@@ -216,7 +228,8 @@
:percentage="Number(res.over_intention_rate)?Number(res.over_intention_rate):0"> :percentage="Number(res.over_intention_rate)?Number(res.over_intention_rate):0">
</el-progress> </el-progress>
<br> <br>
处理率:<el-progress 处理率:
<el-progress
style="display: inline-block;width: calc(90% - 50px)" style="display: inline-block;width: calc(90% - 50px)"
:text-inside="true" :text-inside="true"
:stroke-width="16" :stroke-width="16"
...@@ -234,7 +247,7 @@ ...@@ -234,7 +247,7 @@
<div></div> <div></div>
</div> </div>
<page :total="total" :limit="limit" @pageChange="onPageChange" @sizeChange="onSizeChange"/> <page :total="total" :limit="limit" @pageChange="onPageChange" @sizeChange="onSizeChange"/>
<dialog-com :dialogObj="dialogObj" @changeShow="changeShow" @reflash="getUser"/> <dialog-com :index="index" :dialogObj="dialogObj" @changeShow="changeShow" @reflash="getUser"/>
<el-dialog width="90%" top="5vh" :visible.sync="dialogDetail.show"> <el-dialog width="90%" top="5vh" :visible.sync="dialogDetail.show">
<div v-if="dialogDetail.show"> <div v-if="dialogDetail.show">
<teacher-detail :parentDetail="dialogDetail"></teacher-detail> <teacher-detail :parentDetail="dialogDetail"></teacher-detail>
...@@ -286,7 +299,13 @@ ...@@ -286,7 +299,13 @@
</template> </template>
<script> <script>
import {getTeacherListApi,delTeacherApi,getStaffListApi,postTransferTeacherApi,getTeacherTypeListApi} from "../../service/api"; import {
getTeacherListApi,
delTeacherApi,
getStaffListApi,
postTransferTeacherApi,
getTeacherTypeListApi
} from "../../service/api";
import {TEACHERTYPE} from "../../util/wordbook"; import {TEACHERTYPE} from "../../util/wordbook";
import page from '../framework/page' import page from '../framework/page'
import teacherDetail from '../teacherDetail/index' import teacherDetail from '../teacherDetail/index'
...@@ -295,9 +314,26 @@ ...@@ -295,9 +314,26 @@
let teacherTypeSource = {} let teacherTypeSource = {}
export default { export default {
name: "growth", name: "growth",
data(){ data() {
let nowDate = this.formatTime(new Date()); let nowDate = this.formatTime(new Date());
return { return {
index: 2, // 部名,从1开始
searchFrom: {
name: '',
alias: "",
status: '0',
task_date: nowDate,
squad: ((2-1)*10+1).toString(),
// type: '3,4', // 3、4 增长运营 tmk
type: 5,
},
dialogObj: {
// typeAdd: '3,4', // 与searchFrom.type一致
typeAdd: 5, // 与searchFrom.type一致
type: 0,
show: false,
id: ''
},
transfer: { transfer: {
show: false, show: false,
form: { form: {
...@@ -319,43 +355,29 @@ ...@@ -319,43 +355,29 @@
reasonList: [{ reasonList: [{
id: 0, id: 0,
name: '人员入职', name: '人员入职',
},{ }, {
id: 1, id: 1,
name: '人员离职', name: '人员离职',
},{ }, {
id: 2, id: 2,
name: '请假', name: '请假',
},{ }, {
id: 3, id: 3,
name: '其它', name: '其它',
},] },]
}, },
searchFrom:{ dialogDetail: {
name:'', show: false,
alias:"", id: ''
status:'0',
task_date:nowDate,
squad:"1",
type: '3,4', // 3、4 增长运营 tmk
},
dialogObj:{
typeAdd: '3,4', // 与searchFrom.type一致
type:0,
show:false,
id:''
},
dialogDetail:{
show:false,
id:''
}, },
userList:[], userList: [],
total:0, total: 0,
nowPage:1, nowPage: 1,
limit: 20, limit: 20,
res:null, res: null,
dialogDetailObj:{ dialogDetailObj: {
show:false, show: false,
title:'班级列表', title: '班级列表',
id: '' id: ''
}, },
teacherTypeOption: [{ teacherTypeOption: [{
...@@ -365,72 +387,72 @@ ...@@ -365,72 +387,72 @@
id: 1, id: 1,
label: '新星妈妈' label: '新星妈妈'
}], }],
phoneNumObj:{} phoneNumObj: {}
} }
}, },
watch:{ watch: {
'dialogDetail.show'(value){ 'dialogDetail.show'(value) {
if(!value){ if (!value) {
this.getUser() this.getUser()
} }
} }
}, },
components:{ components: {
// Dialog, // Dialog,
page, page,
dialogCom, dialogCom,
teacherDetail teacherDetail
}, },
filters:{ filters: {
teacherType(value){ teacherType(value) {
return teacherTypeSource[value] return teacherTypeSource[value]
} }
}, },
mounted(){ mounted() {
// console.log(s) // console.log(s)
let data = localStorage.getItem("phoneNum"); let data = localStorage.getItem("phoneNum");
console.log(data) console.log(data)
// debugger // debugger
if(data){ if (data) {
data = JSON.parse(data) data = JSON.parse(data)
this.phoneNumObj=data; this.phoneNumObj = data;
} }
if(data&&data.teacher_type!='teacher_leader'){ if (data && data.teacher_type != 'teacher_leader') {
this.$router.push('/teacher/'+ data.id); this.$router.push('/teacher/' + data.id);
}else{ } else {
this.getUser() this.getUser()
} }
getTeacherTypeListApi().then(res=>{ getTeacherTypeListApi().then(res => {
this.dialogObj.teacherTypeList = res this.dialogObj.teacherTypeList = res
let obj = {} let obj = {}
res.forEach((item,index)=>{ res.forEach((item, index) => {
obj[item.type]=item.name obj[item.type] = item.name
}) })
teacherTypeSource = obj teacherTypeSource = obj
console.log(obj) console.log(obj)
}); });
}, },
methods:{ methods: {
onPageChange(val){ onPageChange(val) {
this.nowPage = val; this.nowPage = val;
this.getUser() this.getUser()
}, },
formatTime(date){ formatTime(date) {
let year = date.getFullYear(); let year = date.getFullYear();
let Month = date.getMonth()+1; let Month = date.getMonth() + 1;
if(Month < 10){ if (Month < 10) {
Month = `0${Month}` Month = `0${Month}`
} }
let Day = date.getDate(); let Day = date.getDate();
if(Day<10)Day = `0${Day}`; if (Day < 10) Day = `0${Day}`;
return `${year}-${Month}-${Day}`; return `${year}-${Month}-${Day}`;
}, },
onSizeChange(val){ onSizeChange(val) {
this.limit = val this.limit = val
this.nowPage = 1; this.nowPage = 1;
this.getUser() this.getUser()
}, },
getUser(){ getUser() {
let json = { let json = {
limit: this.limit, limit: this.limit,
page: this.nowPage page: this.nowPage
...@@ -438,7 +460,7 @@ ...@@ -438,7 +460,7 @@
if (this.searchFrom.type || this.searchFrom.type === 0) { if (this.searchFrom.type || this.searchFrom.type === 0) {
json.type = this.searchFrom.type json.type = this.searchFrom.type
} }
if (this.searchFrom.status){ if (this.searchFrom.status) {
json.status = this.searchFrom.status json.status = this.searchFrom.status
} }
if (this.searchFrom.name) { if (this.searchFrom.name) {
...@@ -447,22 +469,22 @@ ...@@ -447,22 +469,22 @@
if (this.searchFrom.alias) { if (this.searchFrom.alias) {
json.alias = this.searchFrom.alias json.alias = this.searchFrom.alias
} }
if (this.searchFrom.task_date){ if (this.searchFrom.task_date) {
json.task_date = this.searchFrom.task_date json.task_date = this.searchFrom.task_date
} }
let data = localStorage.getItem("phoneNum"); let data = localStorage.getItem("phoneNum");
if(data){ if (data) {
data = JSON.parse(data) data = JSON.parse(data)
} }
if(data&&data.teacher_type=='teacher_leader'){ if (data && data.teacher_type == 'teacher_leader') {
json.squad = data.squad json.squad = data.squad
}else{ } else {
json.squad = this.searchFrom.squad json.squad = this.searchFrom.squad
} }
getTeacherListApi(json).then(res=>{ getTeacherListApi(json).then(res => {
this.userList = res.list; this.userList = res.list;
this.total = res.total; this.total = res.total;
this.res=res; this.res = res;
}) })
}, },
...@@ -474,21 +496,21 @@ ...@@ -474,21 +496,21 @@
}, },
transferToggle(data) { transferToggle(data) {
this.transfer.show = !this.transfer.show; this.transfer.show = !this.transfer.show;
if (this.transfer.show){ if (this.transfer.show) {
if (this.transfer.staff[0] === 0) { if (this.transfer.staff[0] === 0) {
let json = { limit: 1000, page: 1, status: 0 }; // status 0 在职 let json = {limit: 1000, page: 1, status: 0}; // status 0 在职
getStaffListApi(json).then(res => { getStaffListApi(json).then(res => {
this.transfer.staff = res.list; this.transfer.staff = res.list;
}); });
} }
this.$nextTick(()=>{ this.$nextTick(() => {
this.$refs['transferForm'].resetFields(); this.$refs['transferForm'].resetFields();
this.transfer.form.teacher_name = data.name; this.transfer.form.teacher_name = data.name;
this.transfer.form.teacher_id = data.id; this.transfer.form.teacher_id = data.id;
this.transfer.form.staff_current_name = data.adviser; this.transfer.form.staff_current_name = data.adviser;
}) })
} else { } else {
this.$nextTick(()=>{ this.$nextTick(() => {
this.$refs['transferForm'].resetFields(); this.$refs['transferForm'].resetFields();
}) })
} }
...@@ -532,27 +554,27 @@ ...@@ -532,27 +554,27 @@
}); });
}, },
edit(data){ edit(data) {
this.dialogObj.id = data.id; this.dialogObj.id = data.id;
this.dialogObj.type = 2; this.dialogObj.type = 2;
this.dialogObj.show = true this.dialogObj.show = true
}, },
add(){ add() {
this.dialogObj.type = 0; this.dialogObj.type = 0;
this.dialogObj.show = true this.dialogObj.show = true
}, },
detail(data){ detail(data) {
this.dialogObj.id = data.id; this.dialogObj.id = data.id;
this.dialogObj.type = 1; this.dialogObj.type = 1;
this.dialogObj.show = true this.dialogObj.show = true
}, },
delTeacher(data){ delTeacher(data) {
this.$confirm('此操作将删除该账号?', '提示', { this.$confirm('此操作将删除该账号?', '提示', {
confirmButtonText: '确定', confirmButtonText: '确定',
cancelButtonText: '取消', cancelButtonText: '取消',
type: 'warning' type: 'warning'
}).then(() => { }).then(() => {
delTeacherApi(data.id).then(res=>{ delTeacherApi(data.id).then(res => {
this.$message({ this.$message({
type: 'success', type: 'success',
message: '删除成功!' message: '删除成功!'
...@@ -561,19 +583,22 @@ ...@@ -561,19 +583,22 @@
}); });
}); });
}, },
changeShow(data){ changeShow(data) {
this.dialogObj.show=data this.dialogObj.show = data
}, },
classDetail(row){ classDetail(row) {
this.dialogDetailObj = { this.dialogDetailObj = {
show:true, show: true,
title:row.name + '班级详情', title: row.name + '班级详情',
id: row.id id: row.id
} }
}, },
goToTeacherDetail(row){ goToTeacherDetail(row) {
// this.$router.push('/teacher/'+ row.id); // this.$router.push('/teacher/'+ row.id);
this.dialogDetail.id = row.id; this.dialogDetail.id = row.id;
this.dialogDetail.alias = row.alias;
this.dialogDetail.name = row.name;
this.dialogDetail.adviser = row.adviser;
this.dialogDetail.show = true this.dialogDetail.show = true
} }
...@@ -583,54 +608,64 @@ ...@@ -583,54 +608,64 @@
<style scoped lang="less"> <style scoped lang="less">
@import "../../util/public"; @import "../../util/public";
.user{
.user {
/*height: 100%;*/ /*height: 100%;*/
overflow: auto; overflow: auto;
padding: 20px 0; padding: 20px 0;
.btn-content{
.btn-content {
text-align: center; text-align: center;
} }
} }
/deep/.el-progress-bar__outer{
/deep/ .el-progress-bar__outer {
background: #cccccc; background: #cccccc;
} }
.total-tab{
.total-tab {
display: table; display: table;
background: #dfedff; background: #dfedff;
width: 100%; width: 100%;
vertical-align: middle; vertical-align: middle;
font-size: 12px; font-size: 12px;
&>div{
& > div {
display: table-cell; display: table-cell;
vertical-align: middle; vertical-align: middle;
padding: 10px; padding: 10px;
} }
&>div:nth-child(1){
& > div:nth-child(1) {
width: 230px; width: 230px;
min-width: 230px; min-width: 230px;
text-align: center; text-align: center;
} }
&>div:nth-child(5){
& > div:nth-child(5) {
min-width: 80px; min-width: 80px;
width: 80px; width: 80px;
} }
&>div:nth-child(7){
& > div:nth-child(7) {
min-width: 320px + 12px; min-width: 320px + 12px;
width: 320px + 12px; width: 320px + 12px;
} }
&>div:nth-child(2), & > div:nth-child(2),
&>div:nth-child(3), & > div:nth-child(3),
&>div:nth-child(4){ & > div:nth-child(4) {
min-width: 60px; min-width: 60px;
} }
} }
.avatar{
.avatar {
width: 70px; width: 70px;
margin-right: 5px; margin-right: 5px;
height: 70px; height: 70px;
float: left; float: left;
} }
.shortcut { .shortcut {
width: 50px; width: 50px;
} }
......
...@@ -38,17 +38,18 @@ ...@@ -38,17 +38,18 @@
<el-button type="primary" plain @click="getUser">搜索</el-button> <el-button type="primary" plain @click="getUser">搜索</el-button>
</el-form-item> </el-form-item>
<el-form-item v-if="!$store.state.readonly"> <el-form-item v-if="!$store.state.readonly">
<el-button type="success" plain @click="add">新增教师</el-button> <!--<el-button type="success" plain @click="add">新增教师</el-button>-->
<el-button type="success" plain @click="add">新增</el-button>
</el-form-item> </el-form-item>
</el-form> </el-form>
<el-tabs v-model="searchFrom.squad" type="card" style="background: white;padding-top: 10px" @tab-click="getUser"> <el-tabs v-model="searchFrom.squad" type="card" style="background: white;padding-top: 10px" @tab-click="getUser">
<el-tab-pane v-if="phoneNumObj.teacher_type!='teacher_leader'" v-for="i in 10" :key="i" :label="'T'+i" :name="i.toString()"/> <el-tab-pane v-if="phoneNumObj.teacher_type!='teacher_leader'" v-for="i in 10" :key="i+(index-1)*10" :label="'T'+(i+(index-1)*10)" :name="(i+(index-1)*10).toString()"/>
<!-- <el-tab-pane v-if="phoneNumObj.teacher_type=='teacher_leader'" :key="phoneNumObj.squad" :label="'T'+phoneNumObj.squad" :name="phoneNumObj.squad.toString()"/> --> <!-- <el-tab-pane v-if="phoneNumObj.teacher_type=='teacher_leader'" :key="phoneNumObj.squad" :label="'T'+phoneNumObj.squad" :name="phoneNumObj.squad.toString()"/> -->
</el-tabs> </el-tabs>
<el-table <el-table
size="mini" size="mini"
:data="userList" :data="userList"
height="calc(100vh - 335px)" height="calc(100vh - 322px)"
style="width: 100%"> style="width: 100%">
<el-table-column <el-table-column
prop="name" prop="name"
...@@ -64,7 +65,7 @@ ...@@ -64,7 +65,7 @@
<br> <br>
微信号:{{scope.row.alias}} 微信号:{{scope.row.alias}}
<br> <br>
类别:{{scope.row.type | teacherType}} 类别:{{scope.row.type | teacherType}} 老师
<br> <br>
顾问:{{scope.row.adviser}} 顾问:{{scope.row.adviser}}
<br> <br>
...@@ -80,7 +81,8 @@ ...@@ -80,7 +81,8 @@
进班人数:{{scope.row.into_class_num}}<br> 进班人数:{{scope.row.into_class_num}}<br>
加老师处理数:{{scope.row.add_teacher_exec_num}}<br> 加老师处理数:{{scope.row.add_teacher_exec_num}}<br>
加老师成功数:{{scope.row.add_teacher_success_num}}<br> 加老师成功数:{{scope.row.add_teacher_success_num}}<br>
成功率:<el-progress 成功率:
<el-progress
style="display: inline-block;width: calc(90% - 50px)" style="display: inline-block;width: calc(90% - 50px)"
:text-inside="true" :text-inside="true"
:stroke-width="18" :stroke-width="18"
...@@ -88,7 +90,8 @@ ...@@ -88,7 +90,8 @@
:percentage="Number(scope.row.add_teacher_success_rate)?Number(scope.row.add_teacher_success_rate):0"> :percentage="Number(scope.row.add_teacher_success_rate)?Number(scope.row.add_teacher_success_rate):0">
</el-progress> </el-progress>
<br> <br>
处理率:<el-progress 处理率:
<el-progress
style="display: inline-block;width: calc(90% - 50px)" style="display: inline-block;width: calc(90% - 50px)"
:text-inside="true" :text-inside="true"
:stroke-width="18" :stroke-width="18"
...@@ -104,7 +107,8 @@ ...@@ -104,7 +107,8 @@
需召回人数:{{scope.row.need_recall_num}}<br> 需召回人数:{{scope.row.need_recall_num}}<br>
已沟通人数:{{scope.row.recall_desc_exec_num}}<br> 已沟通人数:{{scope.row.recall_desc_exec_num}}<br>
用户回复数:{{scope.row.recall_desc_reply_num}}<br> 用户回复数:{{scope.row.recall_desc_reply_num}}<br>
达标率:<el-progress 达标率:
<el-progress
style="display: inline-block;width: calc(90% - 50px)" style="display: inline-block;width: calc(90% - 50px)"
:text-inside="true" :text-inside="true"
:stroke-width="18" :stroke-width="18"
...@@ -112,7 +116,8 @@ ...@@ -112,7 +116,8 @@
:percentage="Number(scope.row.recall_watch_rate)?Number(scope.row.recall_watch_rate):0"> :percentage="Number(scope.row.recall_watch_rate)?Number(scope.row.recall_watch_rate):0">
</el-progress> </el-progress>
<br> <br>
处理率:<el-progress 处理率:
<el-progress
style="display: inline-block;width: calc(90% - 50px)" style="display: inline-block;width: calc(90% - 50px)"
:text-inside="true" :text-inside="true"
:stroke-width="18" :stroke-width="18"
...@@ -128,7 +133,8 @@ ...@@ -128,7 +133,8 @@
意向用户数:{{scope.row.intention_num}}<br> 意向用户数:{{scope.row.intention_num}}<br>
完课沟通用户数{{scope.row.over_desc_exec_num}}<br> 完课沟通用户数{{scope.row.over_desc_exec_num}}<br>
往期活跃用户沟通数:{{scope.row.past_desc_exec_num}}<br> 往期活跃用户沟通数:{{scope.row.past_desc_exec_num}}<br>
标记率:<el-progress 标记率:
<el-progress
style="display: inline-block;width: calc(90% - 50px)" style="display: inline-block;width: calc(90% - 50px)"
:text-inside="true" :text-inside="true"
:stroke-width="18" :stroke-width="18"
...@@ -136,7 +142,8 @@ ...@@ -136,7 +142,8 @@
:percentage="Number(scope.row.over_intention_rate)?Number(scope.row.over_intention_rate):0"> :percentage="Number(scope.row.over_intention_rate)?Number(scope.row.over_intention_rate):0">
</el-progress> </el-progress>
<br> <br>
处理率:<el-progress 处理率:
<el-progress
style="display: inline-block;width: calc(90% - 50px)" style="display: inline-block;width: calc(90% - 50px)"
:text-inside="true" :text-inside="true"
:stroke-width="18" :stroke-width="18"
...@@ -168,7 +175,8 @@ ...@@ -168,7 +175,8 @@
<div>总计</div> <div>总计</div>
<div> <div>
<div> <div>
成功率:<el-progress 成功率:
<el-progress
style="display: inline-block;width: calc(90% - 50px)" style="display: inline-block;width: calc(90% - 50px)"
:text-inside="true" :text-inside="true"
:stroke-width="16" :stroke-width="16"
...@@ -176,7 +184,8 @@ ...@@ -176,7 +184,8 @@
:percentage="Number(res.add_teacher_success_rate)?Number(res.add_teacher_success_rate):0"> :percentage="Number(res.add_teacher_success_rate)?Number(res.add_teacher_success_rate):0">
</el-progress> </el-progress>
<br> <br>
处理率:<el-progress 处理率:
<el-progress
style="display: inline-block;width: calc(90% - 50px)" style="display: inline-block;width: calc(90% - 50px)"
:text-inside="true" :text-inside="true"
:stroke-width="16" :stroke-width="16"
...@@ -187,7 +196,8 @@ ...@@ -187,7 +196,8 @@
</div> </div>
<div> <div>
<div> <div>
达标率:<el-progress 达标率:
<el-progress
style="display: inline-block;width: calc(90% - 50px)" style="display: inline-block;width: calc(90% - 50px)"
:text-inside="true" :text-inside="true"
:stroke-width="16" :stroke-width="16"
...@@ -195,7 +205,8 @@ ...@@ -195,7 +205,8 @@
:percentage="Number(res.recall_watch_rate)?Number(res.recall_watch_rate):0"> :percentage="Number(res.recall_watch_rate)?Number(res.recall_watch_rate):0">
</el-progress> </el-progress>
<br> <br>
处理率:<el-progress 处理率:
<el-progress
style="display: inline-block;;width: calc(90% - 50px)" style="display: inline-block;;width: calc(90% - 50px)"
:text-inside="true" :text-inside="true"
:stroke-width="16" :stroke-width="16"
...@@ -206,7 +217,8 @@ ...@@ -206,7 +217,8 @@
</div> </div>
<div> <div>
<div> <div>
标记率:<el-progress 标记率:
<el-progress
style="display: inline-block;width: calc(90% - 50px)" style="display: inline-block;width: calc(90% - 50px)"
:text-inside="true" :text-inside="true"
:stroke-width="16" :stroke-width="16"
...@@ -214,7 +226,8 @@ ...@@ -214,7 +226,8 @@
:percentage="Number(res.over_intention_rate)?Number(res.over_intention_rate):0"> :percentage="Number(res.over_intention_rate)?Number(res.over_intention_rate):0">
</el-progress> </el-progress>
<br> <br>
处理率:<el-progress 处理率:
<el-progress
style="display: inline-block;width: calc(90% - 50px)" style="display: inline-block;width: calc(90% - 50px)"
:text-inside="true" :text-inside="true"
:stroke-width="16" :stroke-width="16"
...@@ -232,7 +245,7 @@ ...@@ -232,7 +245,7 @@
<div></div> <div></div>
</div> </div>
<page :total="total" :limit="limit" @pageChange="onPageChange" @sizeChange="onSizeChange"/> <page :total="total" :limit="limit" @pageChange="onPageChange" @sizeChange="onSizeChange"/>
<dialog-com :dialogObj="dialogObj" @changeShow="changeShow" @reflash="getUser"/> <dialog-com :index="index" :dialogObj="dialogObj" @changeShow="changeShow" @reflash="getUser"/>
<el-dialog width="90%" top="5vh" :visible.sync="dialogDetail.show"> <el-dialog width="90%" top="5vh" :visible.sync="dialogDetail.show">
<div v-if="dialogDetail.show"> <div v-if="dialogDetail.show">
<teacher-detail :parentDetail="dialogDetail"></teacher-detail> <teacher-detail :parentDetail="dialogDetail"></teacher-detail>
...@@ -284,7 +297,13 @@ ...@@ -284,7 +297,13 @@
</template> </template>
<script> <script>
import {getTeacherListApi,delTeacherApi,getStaffListApi,postTransferTeacherApi,getTeacherTypeListApi} from "../../service/api"; import {
getTeacherListApi,
delTeacherApi,
getStaffListApi,
postTransferTeacherApi,
getTeacherTypeListApi
} from "../../service/api";
import {TEACHERTYPE} from "../../util/wordbook"; import {TEACHERTYPE} from "../../util/wordbook";
import page from '../framework/page' import page from '../framework/page'
import teacherDetail from '../teacherDetail/index' import teacherDetail from '../teacherDetail/index'
...@@ -293,9 +312,24 @@ ...@@ -293,9 +312,24 @@
let teacherTypeSource = {} let teacherTypeSource = {}
export default { export default {
name: "index", name: "index",
data(){ data() {
let nowDate = this.formatTime(new Date()); let nowDate = this.formatTime(new Date());
return { return {
index: 1, // 部名,从1开始
searchFrom: {
name: '',
alias: "",
status: '0',
task_date: nowDate,
squad: ((1 - 1) * 10 + 1).toString(),
type: 0,
},
dialogObj: {
typeAdd: 0, // 与searchFrom.type一致
type: 0,
show: false,
id: ''
},
transfer: { transfer: {
show: false, show: false,
form: { form: {
...@@ -317,43 +351,29 @@ ...@@ -317,43 +351,29 @@
reasonList: [{ reasonList: [{
id: 0, id: 0,
name: '人员入职', name: '人员入职',
},{ }, {
id: 1, id: 1,
name: '人员离职', name: '人员离职',
},{ }, {
id: 2, id: 2,
name: '请假', name: '请假',
},{ }, {
id: 3, id: 3,
name: '其它', name: '其它',
},] },]
}, },
searchFrom:{ dialogDetail: {
name:'', show: false,
alias:"", id: ''
status:'0',
task_date:nowDate,
squad:"1",
type:0,
},
dialogObj:{
typeAdd: 0, // 与searchFrom.type一致
type:0,
show:false,
id:''
},
dialogDetail:{
show:false,
id:''
}, },
userList:[], userList: [],
total:0, total: 0,
nowPage:1, nowPage: 1,
limit: 20, limit: 20,
res:null, res: null,
dialogDetailObj:{ dialogDetailObj: {
show:false, show: false,
title:'班级列表', title: '班级列表',
id: '' id: ''
}, },
teacherTypeOption: [{ teacherTypeOption: [{
...@@ -363,72 +383,71 @@ ...@@ -363,72 +383,71 @@
id: 1, id: 1,
label: '新星妈妈' label: '新星妈妈'
}], }],
phoneNumObj:{} phoneNumObj: {}
} }
}, },
watch:{ watch: {
'dialogDetail.show'(value){ 'dialogDetail.show'(value) {
if(!value){ if (!value) {
this.getUser() this.getUser()
} }
} }
}, },
components:{ components: {
// Dialog, // Dialog,
page, page,
dialogCom, dialogCom,
teacherDetail teacherDetail
}, },
filters:{ filters: {
teacherType(value){ teacherType(value) {
return teacherTypeSource[value] return teacherTypeSource[value]
} }
}, },
mounted(){ mounted() {
// console.log(s)
let data = localStorage.getItem("phoneNum"); let data = localStorage.getItem("phoneNum");
console.log(data) console.log(data)
// debugger // debugger
if(data){ if (data) {
data = JSON.parse(data) data = JSON.parse(data)
this.phoneNumObj=data; this.phoneNumObj = data;
} }
if(data&&data.teacher_type!='teacher_leader'){ if (data && data.teacher_type != 'teacher_leader') {
this.$router.push('/teacher/'+ data.id); this.$router.push('/teacher/' + data.id);
}else{ } else {
this.getUser() this.getUser()
} }
getTeacherTypeListApi().then(res=>{ getTeacherTypeListApi().then(res => {
this.dialogObj.teacherTypeList = res this.dialogObj.teacherTypeList = res
let obj = {} let obj = {}
res.forEach((item,index)=>{ res.forEach((item, index) => {
obj[item.type]=item.name obj[item.type] = item.name
}) })
teacherTypeSource = obj teacherTypeSource = obj
console.log(obj) // console.log(obj)
}); });
}, },
methods:{ methods: {
onPageChange(val){ onPageChange(val) {
this.nowPage = val; this.nowPage = val;
this.getUser() this.getUser()
}, },
formatTime(date){ formatTime(date) {
let year = date.getFullYear(); let year = date.getFullYear();
let Month = date.getMonth()+1; let Month = date.getMonth() + 1;
if(Month < 10){ if (Month < 10) {
Month = `0${Month}` Month = `0${Month}`
} }
let Day = date.getDate(); let Day = date.getDate();
if(Day<10)Day = `0${Day}`; if (Day < 10) Day = `0${Day}`;
return `${year}-${Month}-${Day}`; return `${year}-${Month}-${Day}`;
}, },
onSizeChange(val){ onSizeChange(val) {
this.limit = val this.limit = val
this.nowPage = 1; this.nowPage = 1;
this.getUser() this.getUser()
}, },
getUser(){ getUser() {
let json = { let json = {
limit: this.limit, limit: this.limit,
page: this.nowPage page: this.nowPage
...@@ -436,7 +455,7 @@ ...@@ -436,7 +455,7 @@
if (this.searchFrom.type || this.searchFrom.type === 0) { if (this.searchFrom.type || this.searchFrom.type === 0) {
json.type = this.searchFrom.type json.type = this.searchFrom.type
} }
if (this.searchFrom.status){ if (this.searchFrom.status) {
json.status = this.searchFrom.status json.status = this.searchFrom.status
} }
if (this.searchFrom.name) { if (this.searchFrom.name) {
...@@ -445,22 +464,22 @@ ...@@ -445,22 +464,22 @@
if (this.searchFrom.alias) { if (this.searchFrom.alias) {
json.alias = this.searchFrom.alias json.alias = this.searchFrom.alias
} }
if (this.searchFrom.task_date){ if (this.searchFrom.task_date) {
json.task_date = this.searchFrom.task_date json.task_date = this.searchFrom.task_date
} }
let data = localStorage.getItem("phoneNum"); let data = localStorage.getItem("phoneNum");
if(data){ if (data) {
data = JSON.parse(data) data = JSON.parse(data)
} }
if(data&&data.teacher_type=='teacher_leader'){ if (data && data.teacher_type == 'teacher_leader') {
json.squad = data.squad json.squad = data.squad
}else{ } else {
json.squad = this.searchFrom.squad json.squad = this.searchFrom.squad
} }
getTeacherListApi(json).then(res=>{ getTeacherListApi(json).then(res => {
this.userList = res.list; this.userList = res.list;
this.total = res.total; this.total = res.total;
this.res=res; this.res = res;
}) })
}, },
...@@ -472,21 +491,21 @@ ...@@ -472,21 +491,21 @@
}, },
transferToggle(data) { transferToggle(data) {
this.transfer.show = !this.transfer.show; this.transfer.show = !this.transfer.show;
if (this.transfer.show){ if (this.transfer.show) {
if (this.transfer.staff[0] === 0) { if (this.transfer.staff[0] === 0) {
let json = { limit: 1000, page: 1, status: 0 }; // status 0 在职 let json = {limit: 1000, page: 1, status: 0}; // status 0 在职
getStaffListApi(json).then(res => { getStaffListApi(json).then(res => {
this.transfer.staff = res.list; this.transfer.staff = res.list;
}); });
} }
this.$nextTick(()=>{ this.$nextTick(() => {
this.$refs['transferForm'].resetFields(); this.$refs['transferForm'].resetFields();
this.transfer.form.teacher_name = data.name; this.transfer.form.teacher_name = data.name;
this.transfer.form.teacher_id = data.id; this.transfer.form.teacher_id = data.id;
this.transfer.form.staff_current_name = data.adviser; this.transfer.form.staff_current_name = data.adviser;
}) })
} else { } else {
this.$nextTick(()=>{ this.$nextTick(() => {
this.$refs['transferForm'].resetFields(); this.$refs['transferForm'].resetFields();
}) })
} }
...@@ -530,27 +549,27 @@ ...@@ -530,27 +549,27 @@
}); });
}, },
edit(data){ edit(data) {
this.dialogObj.id = data.id; this.dialogObj.id = data.id;
this.dialogObj.type = 2; this.dialogObj.type = 2;
this.dialogObj.show = true this.dialogObj.show = true
}, },
add(){ add() {
this.dialogObj.type = 0; this.dialogObj.type = 0;
this.dialogObj.show = true this.dialogObj.show = true
}, },
detail(data){ detail(data) {
this.dialogObj.id = data.id; this.dialogObj.id = data.id;
this.dialogObj.type = 1; this.dialogObj.type = 1;
this.dialogObj.show = true this.dialogObj.show = true
}, },
delTeacher(data){ delTeacher(data) {
this.$confirm('此操作将删除该账号?', '提示', { this.$confirm('此操作将删除该账号?', '提示', {
confirmButtonText: '确定', confirmButtonText: '确定',
cancelButtonText: '取消', cancelButtonText: '取消',
type: 'warning' type: 'warning'
}).then(() => { }).then(() => {
delTeacherApi(data.id).then(res=>{ delTeacherApi(data.id).then(res => {
this.$message({ this.$message({
type: 'success', type: 'success',
message: '删除成功!' message: '删除成功!'
...@@ -559,19 +578,22 @@ ...@@ -559,19 +578,22 @@
}); });
}); });
}, },
changeShow(data){ changeShow(data) {
this.dialogObj.show=data this.dialogObj.show = data
}, },
classDetail(row){ classDetail(row) {
this.dialogDetailObj = { this.dialogDetailObj = {
show:true, show: true,
title:row.name + '班级详情', title: row.name + '班级详情',
id: row.id id: row.id
} }
}, },
goToTeacherDetail(row){ goToTeacherDetail(row) {
// this.$router.push('/teacher/'+ row.id); // this.$router.push('/teacher/'+ row.id);
this.dialogDetail.id = row.id; this.dialogDetail.id = row.id;
this.dialogDetail.alias = row.alias;
this.dialogDetail.name = row.name;
this.dialogDetail.adviser = row.adviser;
this.dialogDetail.show = true this.dialogDetail.show = true
} }
...@@ -581,54 +603,64 @@ ...@@ -581,54 +603,64 @@
<style scoped lang="less"> <style scoped lang="less">
@import "../../util/public"; @import "../../util/public";
.user{
.user {
/*height: 100%;*/ /*height: 100%;*/
overflow: auto; overflow: auto;
padding: 20px 0; padding: 20px 0;
.btn-content{
.btn-content {
text-align: center; text-align: center;
} }
} }
/deep/.el-progress-bar__outer{
/deep/ .el-progress-bar__outer {
background: #cccccc; background: #cccccc;
} }
.total-tab{
.total-tab {
display: table; display: table;
background: #dfedff; background: #dfedff;
width: 100%; width: 100%;
vertical-align: middle; vertical-align: middle;
font-size: 12px; font-size: 12px;
&>div{
& > div {
display: table-cell; display: table-cell;
vertical-align: middle; vertical-align: middle;
padding: 10px; padding: 10px;
} }
&>div:nth-child(1){
& > div:nth-child(1) {
width: 230px; width: 230px;
min-width: 230px; min-width: 230px;
text-align: center; text-align: center;
} }
&>div:nth-child(5){
& > div:nth-child(5) {
min-width: 80px; min-width: 80px;
width: 80px; width: 80px;
} }
&>div:nth-child(7){
& > div:nth-child(7) {
min-width: 320px + 12px; min-width: 320px + 12px;
width: 320px + 12px; width: 320px + 12px;
} }
&>div:nth-child(2), & > div:nth-child(2),
&>div:nth-child(3), & > div:nth-child(3),
&>div:nth-child(4){ & > div:nth-child(4) {
min-width: 60px; min-width: 60px;
} }
} }
.avatar{
.avatar {
width: 70px; width: 70px;
margin-right: 5px; margin-right: 5px;
height: 70px; height: 70px;
float: left; float: left;
} }
.shortcut { .shortcut {
width: 50px; width: 50px;
} }
......
...@@ -39,17 +39,18 @@ ...@@ -39,17 +39,18 @@
</el-form-item> </el-form-item>
<!--<el-form-item v-if="$store.state.orderRefund">--> <!--<el-form-item v-if="$store.state.orderRefund">-->
<el-form-item v-if="!$store.state.readonly"> <el-form-item v-if="!$store.state.readonly">
<el-button type="success" plain @click="add">新增用户服务</el-button> <!--<el-button type="success" plain @click="add">新增用户服务</el-button>-->
<el-button type="success" plain @click="add">新增</el-button>
</el-form-item> </el-form-item>
</el-form> </el-form>
<el-tabs v-model="searchFrom.squad" type="card" style="background: white;padding-top: 10px" @tab-click="getUser"> <el-tabs v-model="searchFrom.squad" type="card" style="background: white;padding-top: 10px" @tab-click="getUser">
<el-tab-pane v-if="phoneNumObj.teacher_type!='teacher_leader'" v-for="i in 10" :key="i" :label="'T'+i" :name="i.toString()"/> <el-tab-pane v-if="phoneNumObj.teacher_type!='teacher_leader'" v-for="i in 10" :key="i+(index-1)*10" :label="'T'+(i+(index-1)*10)" :name="(i+(index-1)*10).toString()"/>
<!-- <el-tab-pane v-if="phoneNumObj.teacher_type=='teacher_leader'" :key="phoneNumObj.squad" :label="'T'+phoneNumObj.squad" :name="phoneNumObj.squad.toString()"/> --> <!-- <el-tab-pane v-if="phoneNumObj.teacher_type=='teacher_leader'" :key="phoneNumObj.squad" :label="'T'+phoneNumObj.squad" :name="phoneNumObj.squad.toString()"/> -->
</el-tabs> </el-tabs>
<el-table <el-table
size="mini" size="mini"
:data="userList" :data="userList"
height="calc(100vh - 335px)" height="calc(100vh - 322px)"
style="width: 100%"> style="width: 100%">
<el-table-column <el-table-column
prop="name" prop="name"
...@@ -65,7 +66,7 @@ ...@@ -65,7 +66,7 @@
<br> <br>
微信号:{{scope.row.alias}} 微信号:{{scope.row.alias}}
<br> <br>
类别:{{scope.row.type | teacherType}} 类别:{{scope.row.type | teacherType}} 老师
<br> <br>
顾问:{{scope.row.adviser}} 顾问:{{scope.row.adviser}}
<br> <br>
...@@ -81,7 +82,8 @@ ...@@ -81,7 +82,8 @@
进班人数:{{scope.row.into_class_num}}<br> 进班人数:{{scope.row.into_class_num}}<br>
加老师处理数:{{scope.row.add_teacher_exec_num}}<br> 加老师处理数:{{scope.row.add_teacher_exec_num}}<br>
加老师成功数:{{scope.row.add_teacher_success_num}}<br> 加老师成功数:{{scope.row.add_teacher_success_num}}<br>
成功率:<el-progress 成功率:
<el-progress
style="display: inline-block;width: calc(90% - 50px)" style="display: inline-block;width: calc(90% - 50px)"
:text-inside="true" :text-inside="true"
:stroke-width="18" :stroke-width="18"
...@@ -89,7 +91,8 @@ ...@@ -89,7 +91,8 @@
:percentage="Number(scope.row.add_teacher_success_rate)?Number(scope.row.add_teacher_success_rate):0"> :percentage="Number(scope.row.add_teacher_success_rate)?Number(scope.row.add_teacher_success_rate):0">
</el-progress> </el-progress>
<br> <br>
处理率:<el-progress 处理率:
<el-progress
style="display: inline-block;width: calc(90% - 50px)" style="display: inline-block;width: calc(90% - 50px)"
:text-inside="true" :text-inside="true"
:stroke-width="18" :stroke-width="18"
...@@ -105,7 +108,8 @@ ...@@ -105,7 +108,8 @@
需召回人数:{{scope.row.need_recall_num}}<br> 需召回人数:{{scope.row.need_recall_num}}<br>
已沟通人数:{{scope.row.recall_desc_exec_num}}<br> 已沟通人数:{{scope.row.recall_desc_exec_num}}<br>
用户回复数:{{scope.row.recall_desc_reply_num}}<br> 用户回复数:{{scope.row.recall_desc_reply_num}}<br>
达标率:<el-progress 达标率:
<el-progress
style="display: inline-block;width: calc(90% - 50px)" style="display: inline-block;width: calc(90% - 50px)"
:text-inside="true" :text-inside="true"
:stroke-width="18" :stroke-width="18"
...@@ -113,7 +117,8 @@ ...@@ -113,7 +117,8 @@
:percentage="Number(scope.row.recall_watch_rate)?Number(scope.row.recall_watch_rate):0"> :percentage="Number(scope.row.recall_watch_rate)?Number(scope.row.recall_watch_rate):0">
</el-progress> </el-progress>
<br> <br>
处理率:<el-progress 处理率:
<el-progress
style="display: inline-block;width: calc(90% - 50px)" style="display: inline-block;width: calc(90% - 50px)"
:text-inside="true" :text-inside="true"
:stroke-width="18" :stroke-width="18"
...@@ -129,7 +134,8 @@ ...@@ -129,7 +134,8 @@
意向用户数:{{scope.row.intention_num}}<br> 意向用户数:{{scope.row.intention_num}}<br>
完课沟通用户数{{scope.row.over_desc_exec_num}}<br> 完课沟通用户数{{scope.row.over_desc_exec_num}}<br>
往期活跃用户沟通数:{{scope.row.past_desc_exec_num}}<br> 往期活跃用户沟通数:{{scope.row.past_desc_exec_num}}<br>
标记率:<el-progress 标记率:
<el-progress
style="display: inline-block;width: calc(90% - 50px)" style="display: inline-block;width: calc(90% - 50px)"
:text-inside="true" :text-inside="true"
:stroke-width="18" :stroke-width="18"
...@@ -137,7 +143,8 @@ ...@@ -137,7 +143,8 @@
:percentage="Number(scope.row.over_intention_rate)?Number(scope.row.over_intention_rate):0"> :percentage="Number(scope.row.over_intention_rate)?Number(scope.row.over_intention_rate):0">
</el-progress> </el-progress>
<br> <br>
处理率:<el-progress 处理率:
<el-progress
style="display: inline-block;width: calc(90% - 50px)" style="display: inline-block;width: calc(90% - 50px)"
:text-inside="true" :text-inside="true"
:stroke-width="18" :stroke-width="18"
...@@ -169,7 +176,8 @@ ...@@ -169,7 +176,8 @@
<div>总计</div> <div>总计</div>
<div> <div>
<div> <div>
成功率:<el-progress 成功率:
<el-progress
style="display: inline-block;width: calc(90% - 50px)" style="display: inline-block;width: calc(90% - 50px)"
:text-inside="true" :text-inside="true"
:stroke-width="16" :stroke-width="16"
...@@ -177,7 +185,8 @@ ...@@ -177,7 +185,8 @@
:percentage="Number(res.add_teacher_success_rate)?Number(res.add_teacher_success_rate):0"> :percentage="Number(res.add_teacher_success_rate)?Number(res.add_teacher_success_rate):0">
</el-progress> </el-progress>
<br> <br>
处理率:<el-progress 处理率:
<el-progress
style="display: inline-block;width: calc(90% - 50px)" style="display: inline-block;width: calc(90% - 50px)"
:text-inside="true" :text-inside="true"
:stroke-width="16" :stroke-width="16"
...@@ -188,7 +197,8 @@ ...@@ -188,7 +197,8 @@
</div> </div>
<div> <div>
<div> <div>
达标率:<el-progress 达标率:
<el-progress
style="display: inline-block;width: calc(90% - 50px)" style="display: inline-block;width: calc(90% - 50px)"
:text-inside="true" :text-inside="true"
:stroke-width="16" :stroke-width="16"
...@@ -196,7 +206,8 @@ ...@@ -196,7 +206,8 @@
:percentage="Number(res.recall_watch_rate)?Number(res.recall_watch_rate):0"> :percentage="Number(res.recall_watch_rate)?Number(res.recall_watch_rate):0">
</el-progress> </el-progress>
<br> <br>
处理率:<el-progress 处理率:
<el-progress
style="display: inline-block;;width: calc(90% - 50px)" style="display: inline-block;;width: calc(90% - 50px)"
:text-inside="true" :text-inside="true"
:stroke-width="16" :stroke-width="16"
...@@ -207,7 +218,8 @@ ...@@ -207,7 +218,8 @@
</div> </div>
<div> <div>
<div> <div>
标记率:<el-progress 标记率:
<el-progress
style="display: inline-block;width: calc(90% - 50px)" style="display: inline-block;width: calc(90% - 50px)"
:text-inside="true" :text-inside="true"
:stroke-width="16" :stroke-width="16"
...@@ -215,7 +227,8 @@ ...@@ -215,7 +227,8 @@
:percentage="Number(res.over_intention_rate)?Number(res.over_intention_rate):0"> :percentage="Number(res.over_intention_rate)?Number(res.over_intention_rate):0">
</el-progress> </el-progress>
<br> <br>
处理率:<el-progress 处理率:
<el-progress
style="display: inline-block;width: calc(90% - 50px)" style="display: inline-block;width: calc(90% - 50px)"
:text-inside="true" :text-inside="true"
:stroke-width="16" :stroke-width="16"
...@@ -233,7 +246,7 @@ ...@@ -233,7 +246,7 @@
<div></div> <div></div>
</div> </div>
<page :total="total" :limit="limit" @pageChange="onPageChange" @sizeChange="onSizeChange"/> <page :total="total" :limit="limit" @pageChange="onPageChange" @sizeChange="onSizeChange"/>
<dialog-com :dialogObj="dialogObj" @changeShow="changeShow" @reflash="getUser"/> <dialog-com :index="index" :dialogObj="dialogObj" @changeShow="changeShow" @reflash="getUser"/>
<el-dialog width="90%" top="5vh" :visible.sync="dialogDetail.show"> <el-dialog width="90%" top="5vh" :visible.sync="dialogDetail.show">
<div v-if="dialogDetail.show"> <div v-if="dialogDetail.show">
<teacher-detail :parentDetail="dialogDetail"></teacher-detail> <teacher-detail :parentDetail="dialogDetail"></teacher-detail>
...@@ -285,7 +298,13 @@ ...@@ -285,7 +298,13 @@
</template> </template>
<script> <script>
import {getTeacherListApi,delTeacherApi,getStaffListApi,postTransferTeacherApi,getTeacherTypeListApi} from "../../service/api"; import {
getTeacherListApi,
delTeacherApi,
getStaffListApi,
postTransferTeacherApi,
getTeacherTypeListApi
} from "../../service/api";
import {TEACHERTYPE} from "../../util/wordbook"; import {TEACHERTYPE} from "../../util/wordbook";
import page from '../framework/page' import page from '../framework/page'
import teacherDetail from '../teacherDetail/index' import teacherDetail from '../teacherDetail/index'
...@@ -293,10 +312,25 @@ ...@@ -293,10 +312,25 @@
// import Dialog from "../class/dialog"; // import Dialog from "../class/dialog";
let teacherTypeSource = {} let teacherTypeSource = {}
export default { export default {
name: "growth", name: "userservice",
data(){ data() {
let nowDate = this.formatTime(new Date()); let nowDate = this.formatTime(new Date());
return { return {
index: 3, // 部名,从1开始
searchFrom: {
name: '',
alias: "",
status: '0',
task_date: nowDate,
squad: ((3 - 1) * 10 + 1).toString(),
type: 6,
},
dialogObj: {
typeAdd: 6, // 用户服务 与searchFrom.type一致
type: 0,
show: false,
id: ''
},
transfer: { transfer: {
show: false, show: false,
form: { form: {
...@@ -318,43 +352,29 @@ ...@@ -318,43 +352,29 @@
reasonList: [{ reasonList: [{
id: 0, id: 0,
name: '人员入职', name: '人员入职',
},{ }, {
id: 1, id: 1,
name: '人员离职', name: '人员离职',
},{ }, {
id: 2, id: 2,
name: '请假', name: '请假',
},{ }, {
id: 3, id: 3,
name: '其它', name: '其它',
},] },]
}, },
searchFrom:{ dialogDetail: {
name:'', show: false,
alias:"", id: ''
status:'0',
task_date:nowDate,
squad:"1",
type:2,
},
dialogObj:{
typeAdd: 2, // 用户服务 与searchFrom.type一致
type:0,
show:false,
id:''
},
dialogDetail:{
show:false,
id:''
}, },
userList:[], userList: [],
total:0, total: 0,
nowPage:1, nowPage: 1,
limit: 20, limit: 20,
res:null, res: null,
dialogDetailObj:{ dialogDetailObj: {
show:false, show: false,
title:'班级列表', title: '班级列表',
id: '' id: ''
}, },
teacherTypeOption: [{ teacherTypeOption: [{
...@@ -364,72 +384,72 @@ ...@@ -364,72 +384,72 @@
id: 1, id: 1,
label: '新星妈妈' label: '新星妈妈'
}], }],
phoneNumObj:{} phoneNumObj: {}
} }
}, },
watch:{ watch: {
'dialogDetail.show'(value){ 'dialogDetail.show'(value) {
if(!value){ if (!value) {
this.getUser() this.getUser()
} }
} }
}, },
components:{ components: {
// Dialog, // Dialog,
page, page,
dialogCom, dialogCom,
teacherDetail teacherDetail
}, },
filters:{ filters: {
teacherType(value){ teacherType(value) {
return teacherTypeSource[value] return teacherTypeSource[value]
} }
}, },
mounted(){ mounted() {
// console.log(s) // console.log(s)
let data = localStorage.getItem("phoneNum"); let data = localStorage.getItem("phoneNum");
console.log(data) console.log(data)
// debugger // debugger
if(data){ if (data) {
data = JSON.parse(data) data = JSON.parse(data)
this.phoneNumObj=data; this.phoneNumObj = data;
} }
if(data&&data.teacher_type!='teacher_leader'){ if (data && data.teacher_type != 'teacher_leader') {
this.$router.push('/teacher/'+ data.id); this.$router.push('/teacher/' + data.id);
}else{ } else {
this.getUser() this.getUser()
} }
getTeacherTypeListApi().then(res=>{ getTeacherTypeListApi().then(res => {
this.dialogObj.teacherTypeList = res this.dialogObj.teacherTypeList = res
let obj = {} let obj = {}
res.forEach((item,index)=>{ res.forEach((item, index) => {
obj[item.type]=item.name obj[item.type] = item.name
}) })
teacherTypeSource = obj teacherTypeSource = obj
console.log(obj) // console.log(obj)
}); });
}, },
methods:{ methods: {
onPageChange(val){ onPageChange(val) {
this.nowPage = val; this.nowPage = val;
this.getUser() this.getUser()
}, },
formatTime(date){ formatTime(date) {
let year = date.getFullYear(); let year = date.getFullYear();
let Month = date.getMonth()+1; let Month = date.getMonth() + 1;
if(Month < 10){ if (Month < 10) {
Month = `0${Month}` Month = `0${Month}`
} }
let Day = date.getDate(); let Day = date.getDate();
if(Day<10)Day = `0${Day}`; if (Day < 10) Day = `0${Day}`;
return `${year}-${Month}-${Day}`; return `${year}-${Month}-${Day}`;
}, },
onSizeChange(val){ onSizeChange(val) {
this.limit = val this.limit = val
this.nowPage = 1; this.nowPage = 1;
this.getUser() this.getUser()
}, },
getUser(){ getUser() {
let json = { let json = {
limit: this.limit, limit: this.limit,
page: this.nowPage page: this.nowPage
...@@ -437,7 +457,7 @@ ...@@ -437,7 +457,7 @@
if (this.searchFrom.type || this.searchFrom.type === 0) { if (this.searchFrom.type || this.searchFrom.type === 0) {
json.type = this.searchFrom.type json.type = this.searchFrom.type
} }
if (this.searchFrom.status){ if (this.searchFrom.status) {
json.status = this.searchFrom.status json.status = this.searchFrom.status
} }
if (this.searchFrom.name) { if (this.searchFrom.name) {
...@@ -446,22 +466,22 @@ ...@@ -446,22 +466,22 @@
if (this.searchFrom.alias) { if (this.searchFrom.alias) {
json.alias = this.searchFrom.alias json.alias = this.searchFrom.alias
} }
if (this.searchFrom.task_date){ if (this.searchFrom.task_date) {
json.task_date = this.searchFrom.task_date json.task_date = this.searchFrom.task_date
} }
let data = localStorage.getItem("phoneNum"); let data = localStorage.getItem("phoneNum");
if(data){ if (data) {
data = JSON.parse(data) data = JSON.parse(data)
} }
if(data&&data.teacher_type=='teacher_leader'){ if (data && data.teacher_type == 'teacher_leader') {
json.squad = data.squad json.squad = data.squad
}else{ } else {
json.squad = this.searchFrom.squad json.squad = this.searchFrom.squad
} }
getTeacherListApi(json).then(res=>{ getTeacherListApi(json).then(res => {
this.userList = res.list; this.userList = res.list;
this.total = res.total; this.total = res.total;
this.res=res; this.res = res;
}) })
}, },
...@@ -473,21 +493,21 @@ ...@@ -473,21 +493,21 @@
}, },
transferToggle(data) { transferToggle(data) {
this.transfer.show = !this.transfer.show; this.transfer.show = !this.transfer.show;
if (this.transfer.show){ if (this.transfer.show) {
if (this.transfer.staff[0] === 0) { if (this.transfer.staff[0] === 0) {
let json = { limit: 1000, page: 1, status: 0 }; // status 0 在职 let json = {limit: 1000, page: 1, status: 0}; // status 0 在职
getStaffListApi(json).then(res => { getStaffListApi(json).then(res => {
this.transfer.staff = res.list; this.transfer.staff = res.list;
}); });
} }
this.$nextTick(()=>{ this.$nextTick(() => {
this.$refs['transferForm'].resetFields(); this.$refs['transferForm'].resetFields();
this.transfer.form.teacher_name = data.name; this.transfer.form.teacher_name = data.name;
this.transfer.form.teacher_id = data.id; this.transfer.form.teacher_id = data.id;
this.transfer.form.staff_current_name = data.adviser; this.transfer.form.staff_current_name = data.adviser;
}) })
} else { } else {
this.$nextTick(()=>{ this.$nextTick(() => {
this.$refs['transferForm'].resetFields(); this.$refs['transferForm'].resetFields();
}) })
} }
...@@ -531,27 +551,27 @@ ...@@ -531,27 +551,27 @@
}); });
}, },
edit(data){ edit(data) {
this.dialogObj.id = data.id; this.dialogObj.id = data.id;
this.dialogObj.type = 2; this.dialogObj.type = 2;
this.dialogObj.show = true this.dialogObj.show = true
}, },
add(){ add() {
this.dialogObj.type = 0; this.dialogObj.type = 0;
this.dialogObj.show = true this.dialogObj.show = true
}, },
detail(data){ detail(data) {
this.dialogObj.id = data.id; this.dialogObj.id = data.id;
this.dialogObj.type = 1; this.dialogObj.type = 1;
this.dialogObj.show = true this.dialogObj.show = true
}, },
delTeacher(data){ delTeacher(data) {
this.$confirm('此操作将删除该账号?', '提示', { this.$confirm('此操作将删除该账号?', '提示', {
confirmButtonText: '确定', confirmButtonText: '确定',
cancelButtonText: '取消', cancelButtonText: '取消',
type: 'warning' type: 'warning'
}).then(() => { }).then(() => {
delTeacherApi(data.id).then(res=>{ delTeacherApi(data.id).then(res => {
this.$message({ this.$message({
type: 'success', type: 'success',
message: '删除成功!' message: '删除成功!'
...@@ -560,19 +580,22 @@ ...@@ -560,19 +580,22 @@
}); });
}); });
}, },
changeShow(data){ changeShow(data) {
this.dialogObj.show=data this.dialogObj.show = data
}, },
classDetail(row){ classDetail(row) {
this.dialogDetailObj = { this.dialogDetailObj = {
show:true, show: true,
title:row.name + '班级详情', title: row.name + '班级详情',
id: row.id id: row.id
} }
}, },
goToTeacherDetail(row){ goToTeacherDetail(row) {
// this.$router.push('/teacher/'+ row.id); // this.$router.push('/teacher/'+ row.id);
this.dialogDetail.id = row.id; this.dialogDetail.id = row.id;
this.dialogDetail.alias = row.alias;
this.dialogDetail.name = row.name;
this.dialogDetail.adviser = row.adviser;
this.dialogDetail.show = true this.dialogDetail.show = true
} }
...@@ -582,54 +605,64 @@ ...@@ -582,54 +605,64 @@
<style scoped lang="less"> <style scoped lang="less">
@import "../../util/public"; @import "../../util/public";
.user{
.user {
/*height: 100%;*/ /*height: 100%;*/
overflow: auto; overflow: auto;
padding: 20px 0; padding: 20px 0;
.btn-content{
.btn-content {
text-align: center; text-align: center;
} }
} }
/deep/.el-progress-bar__outer{
/deep/ .el-progress-bar__outer {
background: #cccccc; background: #cccccc;
} }
.total-tab{
.total-tab {
display: table; display: table;
background: #dfedff; background: #dfedff;
width: 100%; width: 100%;
vertical-align: middle; vertical-align: middle;
font-size: 12px; font-size: 12px;
&>div{
& > div {
display: table-cell; display: table-cell;
vertical-align: middle; vertical-align: middle;
padding: 10px; padding: 10px;
} }
&>div:nth-child(1){
& > div:nth-child(1) {
width: 230px; width: 230px;
min-width: 230px; min-width: 230px;
text-align: center; text-align: center;
} }
&>div:nth-child(5){
& > div:nth-child(5) {
min-width: 80px; min-width: 80px;
width: 80px; width: 80px;
} }
&>div:nth-child(7){
& > div:nth-child(7) {
min-width: 320px + 12px; min-width: 320px + 12px;
width: 320px + 12px; width: 320px + 12px;
} }
&>div:nth-child(2), & > div:nth-child(2),
&>div:nth-child(3), & > div:nth-child(3),
&>div:nth-child(4){ & > div:nth-child(4) {
min-width: 60px; min-width: 60px;
} }
} }
.avatar{
.avatar {
width: 70px; width: 70px;
margin-right: 5px; margin-right: 5px;
height: 70px; height: 70px;
float: left; float: left;
} }
.shortcut { .shortcut {
width: 50px; width: 50px;
} }
......
...@@ -102,7 +102,7 @@ export default [{ ...@@ -102,7 +102,7 @@ export default [{
value: '销售管理', value: '销售管理',
icon: 'icon-laoshi', icon: 'icon-laoshi',
list: [{ list: [{
value: '教师列表', // 老师用 value: '销售1部',
routerName: 'teacher', routerName: 'teacher',
path: '/teacher', path: '/teacher',
cover: '3-1', cover: '3-1',
...@@ -112,7 +112,7 @@ export default [{ ...@@ -112,7 +112,7 @@ export default [{
component: e => require(['@/components/teacher'], e), component: e => require(['@/components/teacher'], e),
} }
}, { }, {
value: '增长运营列表', // 增长运营、TMK用 value: '销售2部', // 增长运营、TMK用
routerName: 'growth', routerName: 'growth',
path: '/growth', path: '/growth',
cover: '3-6', cover: '3-6',
...@@ -122,7 +122,7 @@ export default [{ ...@@ -122,7 +122,7 @@ export default [{
component: e => require(['@/components/teacher/growth'], e), component: e => require(['@/components/teacher/growth'], e),
} }
}, { }, {
value: '用户服务列表', // 用户服务用 value: '销售3部', // 用户服务用
routerName: 'userservice', routerName: 'userservice',
path: '/userservice', path: '/userservice',
cover: '3-7', cover: '3-7',
......
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