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

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

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