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

新增 团队概况、小时动态 权限控制

parent daac14c2
......@@ -385,7 +385,6 @@
}
},
mounted(){
// console.log(s)
let data = localStorage.getItem("phoneNum");
console.log(data)
// debugger
......@@ -405,7 +404,7 @@
obj[item.type]=item.name
})
teacherTypeSource = obj
console.log(obj)
// console.log(obj)
});
},
methods:{
......
......@@ -406,7 +406,7 @@
obj[item.type]=item.name
})
teacherTypeSource = obj
console.log(obj)
// console.log(obj)
});
},
methods:{
......
......@@ -8,7 +8,7 @@
:picker-options="pickerOptions" @change="getData">
</el-date-picker>
<el-tabs v-model="search.team" type="card" class="tabs-refresh" @tab-click="getData">
<el-tabs v-if="teacherType == ''" v-model="search.team" type="card" class="tabs-refresh" @tab-click="getData">
<!--<el-tab-pane label="总计" name="1,2,3,4,5,6,7,8,9,10"/>-->
<el-tab-pane v-for="i in 10" :key="i" :label="'T'+i" :name="i.toString()"/>
</el-tabs>
......@@ -137,11 +137,21 @@
dialogObj: {
show: false,
type: '', // callback, class
}
},
teacherType: '' // 'teacher_leader' // 'teacher' // ''
}
},
mounted() {
var phoneNum = localStorage.getItem("phoneNum");
this.teacherType = phoneNum && JSON.parse(phoneNum) && JSON.parse(phoneNum).teacher_type ? JSON.parse(phoneNum).teacher_type : '';
if (this.teacherType == '') { // 总监
this.getData();
} else if (this.teacherType == 'teacher_leader') { // 组长
this.search.team = JSON.parse(phoneNum).squad;
this.getData();
} else if (this.teacherType == 'teacher') { // 组员
console.log('组员无权限!')
}
},
methods: {
transStaff(row) {
......
......@@ -8,7 +8,7 @@
:picker-options="pickerOptions">
</el-date-picker>
<el-tabs v-model="search.team" type="card" class="tabs-refresh" @tab-click="getData">
<el-tabs v-if="teacherType == ''" v-model="search.team" type="card" class="tabs-refresh" @tab-click="getData">
<el-tab-pane label="总计" name="1,2,3,4,5,6,7,8,9,10"/>
<el-tab-pane v-for="i in 10" :key="i" :label="'T'+i" :name="i.toString()"/>
</el-tabs>
......@@ -259,11 +259,21 @@
dialogObj: {
show: false,
type: '', // callback, class
}
},
teacherType: '' // 'teacher_leader' // 'teacher' // ''
}
},
mounted() {
var phoneNum = localStorage.getItem("phoneNum");
this.teacherType = phoneNum && JSON.parse(phoneNum) && JSON.parse(phoneNum).teacher_type ? JSON.parse(phoneNum).teacher_type : '';
if (this.teacherType == '') { // 总监
this.getData();
} else if (this.teacherType == 'teacher_leader') { // 组长
this.search.team = JSON.parse(phoneNum).squad;
this.getData();
} else if (this.teacherType == 'teacher') { // 组员
console.log('组员无权限!')
}
},
methods: {
transStaff(row) {
......@@ -277,7 +287,7 @@
},
transRate(child, mother) {
if (mother) {
return `${Math.floor(child * 1000 / mother)/10}%`
return `${Math.floor(child * 1000 / mother) / 10}%`
} else {
return '-'
}
......
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