Commit 4478d569 authored by 赵茹林's avatar 赵茹林

销售分部 [更新] 组名+10,销售2部type5,销售3部type6

parent 0f857ca8
...@@ -40,11 +40,12 @@ ...@@ -40,11 +40,12 @@
<!--<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
...@@ -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,17 +583,17 @@ ...@@ -561,17 +583,17 @@
}); });
}); });
}, },
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.alias = row.alias;
...@@ -586,54 +608,64 @@ ...@@ -586,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,11 +38,12 @@ ...@@ -38,11 +38,12 @@
<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
...@@ -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,71 +383,71 @@ ...@@ -363,71 +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() {
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
...@@ -435,7 +455,7 @@ ...@@ -435,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) {
...@@ -444,22 +464,22 @@ ...@@ -444,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;
}) })
}, },
...@@ -471,21 +491,21 @@ ...@@ -471,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();
}) })
} }
...@@ -529,27 +549,27 @@ ...@@ -529,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: '删除成功!'
...@@ -558,17 +578,17 @@ ...@@ -558,17 +578,17 @@
}); });
}); });
}, },
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.alias = row.alias;
...@@ -583,54 +603,64 @@ ...@@ -583,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,11 +39,12 @@ ...@@ -39,11 +39,12 @@
</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
...@@ -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'
...@@ -294,9 +313,24 @@ ...@@ -294,9 +313,24 @@
let teacherTypeSource = {} let teacherTypeSource = {}
export default { export default {
name: "userservice", 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,17 +580,17 @@ ...@@ -560,17 +580,17 @@
}); });
}); });
}, },
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.alias = row.alias;
...@@ -585,54 +605,64 @@ ...@@ -585,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;
} }
......
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