diff --git a/src/views/data/DataStatisticsList.vue b/src/views/data/DataStatisticsList.vue index f1237f8..37c8286 100644 --- a/src/views/data/DataStatisticsList.vue +++ b/src/views/data/DataStatisticsList.vue @@ -26,7 +26,7 @@
- +
- +
+
+ 按累计学时排序 + 按年度学时排序 +
前十统计排名
- 公司排名年度学时前十统计 + 公司排名年度学时前十统计 公司累计学时学时前十统计 -
+ - + - +
@@ -141,7 +145,7 @@ data () { return { // 查询参数 - queryParam: { orgId: undefined, orgName: '' }, + queryParam: { orgId: undefined, orgName: '', asc: 1, type: 1 }, // 表头1 columns1: [ { @@ -150,7 +154,7 @@ }, { title: '学员数量', - dataIndex: 'studentCount' + dataIndex: 'personCount' }, { title: '培训人数', @@ -175,6 +179,10 @@ ], loadData1: parameter => { return dataOrgStatistics(Object.assign(parameter, this.queryParam)).then((res) => { + const data = res.rows + data.forEach(function(val){ + val.trainRate = val.trainRate + '%' + }) return res }) }, @@ -200,10 +208,6 @@ title: '累计学时', dataIndex: 'sumClassHour' }, - { - title: '人均学时', - dataIndex: 'avgClassHour' - } ], loadData2: parameter => { return dataPersonalStatistics(Object.assign(parameter, this.queryParam)).then((res) => { @@ -241,7 +245,7 @@ } ], loadDataTop1: parameter => { - return dataClassHourTop(Object.assign(parameter, {type : 1})).then((res) => { + return dataClassHourTop(Object.assign(parameter, this.queryParam)).then((res) => { return res.data }) }, @@ -276,7 +280,7 @@ } ], loadDataTop2: parameter => { - return dataClassHourTop(Object.assign(parameter, {type : 2})).then((res) => { + return dataClassHourTop(Object.assign(parameter, this.queryParam)).then((res) => { return res.data }) }, @@ -302,7 +306,7 @@ this.getOrgTree() }, mounted () { - + }, methods: { tabsCallback (key) { @@ -347,10 +351,27 @@ } if (this.keyType === '2') { this.$refs.table2.refresh(true) + if (this.topType === 1) { + this.$refs.tableTop1.refresh(true) + } + if (this.topType === 2) { + this.$refs.tableTop2.refresh(true) + } } }, changeTopType (type) { this.topType = type + this.queryParam.type = type + if (this.topType === 1) { + this.$refs.tableTop1.refresh(true) + } + if (this.topType === 2) { + this.$refs.tableTop2.refresh(true) + } + }, + changeSort (type) { + this.queryParam.asc = type + this.$refs.table2.refresh(true) } } } diff --git a/src/views/notice/NoticeForm.vue b/src/views/notice/NoticeForm.vue index 920c840..d21019c 100644 --- a/src/views/notice/NoticeForm.vue +++ b/src/views/notice/NoticeForm.vue @@ -32,14 +32,23 @@ + + - - + + +
+ + + + + +
@@ -136,7 +145,8 @@ export default { rangeId: 0, rangeName: '', isTop: 0, - isCalculate: 0, + isCalculate: 1, + classHour: 0, isNowPublish: false, publishTime: '', type: 1, @@ -144,11 +154,13 @@ export default { }, fileList: [], timeShow: true, + classHourShow: true, rules: { title: [{ required: true, message: '请输入公告标题', trigger: 'blur' }], rangeName: [{ required: true, message: '请选择发布范围', trigger: 'blur' }], isTop: [{ required: true, message: '请选择是否置顶', trigger: 'change' }], isCalculate: [{ required: true, message: '请选择是否计算学时', trigger: 'change' }], + classHour: [{ required: true, message: '请填写学时', trigger: 'change' }], isNowPublish: [{ required: true, message: '请选择即时发布', trigger: 'change' }], publishTime: [{ required: true, message: '请选择发布时间', trigger: 'change' }], type: [{ required: true, message: '请选择发布类型', trigger: 'change' }], @@ -209,6 +221,9 @@ export default { }, onChangeNow(checked) { this.timeShow = !checked + }, + isCalculateFunc(type) { + this.classHourShow = type === 1 } } } diff --git a/src/views/person/PersonForm.vue b/src/views/person/PersonForm.vue index a1682bb..baa699c 100644 --- a/src/views/person/PersonForm.vue +++ b/src/views/person/PersonForm.vue @@ -177,6 +177,20 @@ + + + + + + + + + 上传身份证 @@ -330,7 +344,8 @@ workType: data.workType ? parseInt(data.workType) : undefined, degreeId: data.degreeId, orgId: data.orgId, - orgName: data.orgName + orgName: data.orgName, + planClassHour: data.planClassHour } ) // 动态赋值年龄和性别