|
|
@@ -854,7 +854,8 @@ export default {
|
|
|
this.allView()
|
|
|
}
|
|
|
},
|
|
|
- mounted() {},
|
|
|
+ mounted() {
|
|
|
+ },
|
|
|
beforeDestroy() {
|
|
|
if (this.interval) {
|
|
|
clearInterval(this.interval)
|
|
|
@@ -1192,7 +1193,6 @@ export default {
|
|
|
getPositionPeopleIds(positionId) {
|
|
|
const { userList } = this.$store.getters
|
|
|
// return userList.filter(user => user.positionId.indexOf(positionId) > -1)
|
|
|
-
|
|
|
return userList.filter(
|
|
|
(user) =>
|
|
|
user.positionId.indexOf(positionId) > -1 &&
|
|
|
@@ -1204,8 +1204,12 @@ export default {
|
|
|
},
|
|
|
// 根据部门和时间获取考试统计数据
|
|
|
async getExamStatisticsData() {
|
|
|
- if (this.positionsIdArr.length) {
|
|
|
- const users = this.getPositionPeopleIds(this.positionsIdArr[0])
|
|
|
+
|
|
|
+ //if (this.positionsIdArr.length) {
|
|
|
+ let users = this.getPositionPeopleIds(this.positionsIdArr[0])
|
|
|
+ if(this.depth3){
|
|
|
+ users = this.getPositionPeopleIds(this.depth3)
|
|
|
+ }
|
|
|
const userIds = users.map((user) => user.userId)
|
|
|
const renyuan =
|
|
|
userIds.map((i) => `'${i}'`).join(',') !== ''
|
|
|
@@ -1275,7 +1279,7 @@ export default {
|
|
|
this.optionExamStatisticsConfig.series[2].data = resultData.map(
|
|
|
(item) => item.passRate
|
|
|
)
|
|
|
- }
|
|
|
+ //}
|
|
|
},
|
|
|
// 根据部门和时间获取培训统计数据
|
|
|
async getTrainingStatisticsData() {
|
|
|
@@ -1284,9 +1288,14 @@ export default {
|
|
|
params.startTime = this.startDate
|
|
|
params.endTime = this.endDate
|
|
|
}
|
|
|
- if (this.positionsIdArr.length) {
|
|
|
- params.deptId = this.positionsIdArr[0]
|
|
|
+ if (this.depth3) {
|
|
|
+ params.deptId = this.depth3
|
|
|
+ }else{
|
|
|
+ if (this.positionsIdArr.length) {
|
|
|
+ params.deptId = this.positionsIdArr[0]
|
|
|
+ }
|
|
|
}
|
|
|
+
|
|
|
const { data } = await getUserStatisticList(params)
|
|
|
data.sort((a, b) => {
|
|
|
return a.id_ - b.id_
|
|
|
@@ -1314,7 +1323,11 @@ export default {
|
|
|
handleFunc(e) {
|
|
|
// console.log(e, 'eeeeeeeeee')
|
|
|
const { selection, selectionDept, filterDept } = e
|
|
|
- this.depth3 = filterDept.filter((i) => i.depth === 3)[0].positionId
|
|
|
+ if (selection) {
|
|
|
+ this.depth3 = selection
|
|
|
+ }else{
|
|
|
+ this.depth3 = filterDept.filter((i) => i.depth === 3)[0].positionId
|
|
|
+ }
|
|
|
this.sqlPositionsDatasIni = filterDept
|
|
|
const arr = selectionDept.path.split('.')
|
|
|
const selArr =
|