提交 4611c1ff 编写于 作者: zhentian.jia's avatar zhentian.jia

对接课程分析 考试分析的接口

上级 e1e1e191
......@@ -189,7 +189,7 @@ const vueFilter = {
if(value == 1) {
return '完成项目'
}else {
return '归入统计'
return '未完成'
}
},
recordValue: (value) => {
......
......@@ -66,25 +66,25 @@
border
center
ref="multipleTable"
:data="mathDate"
:data="tableData"
tooltip-effect="dark"
@selection-change="handleSelectionChange"
:row-key="getRowKeys"
>
<el-table-column type="selection" width="55" :reserve-selection="true"></el-table-column>
<el-table-column prop="name" label="姓名" min-width="80"></el-table-column>
<el-table-column prop="joinStatus" label="项目状态" width="120">
<template slot-scope="scope">{{ scope.row.joinStatus | projectStatus }}</template>
<el-table-column prop="projectStatus" label="项目状态" width="120">
<template slot-scope="scope">{{ scope.row.projectStatus | projectStatus }}</template>
</el-table-column>
<el-table-column prop="record" label="项目成绩" width="120">
<template slot-scope="scope">{{ scope.row.record | recordValue }}</template>
<el-table-column prop="projectResult" label="项目成绩" width="120">
<template slot-scope="scope">{{ scope.row.projectResult | recordValue }}</template>
</el-table-column>
<el-table-column prop="progress" label="机构" min-width="120" show-overflow-tooltip></el-table-column>
<el-table-column prop="desk" label="科室" show-overflow-tooltip></el-table-column>
<el-table-column prop="province" label="省/直辖市" show-overflow-tooltip></el-table-column>
<el-table-column prop="city" label="市" show-overflow-tooltip></el-table-column>
<el-table-column prop="district" label="区/县" show-overflow-tooltip></el-table-column>
<el-table-column prop="address" label="乡镇/街道" show-overflow-tooltip></el-table-column>
<el-table-column prop="hospitalName" label="机构" min-width="120" show-overflow-tooltip></el-table-column>
<el-table-column prop="departmentName" label="科室" show-overflow-tooltip></el-table-column>
<el-table-column prop="provinceName" label="省/直辖市" show-overflow-tooltip></el-table-column>
<el-table-column prop="cityName" label="市" show-overflow-tooltip></el-table-column>
<el-table-column prop="countyName" label="区/县" show-overflow-tooltip></el-table-column>
<el-table-column prop="townName" label="乡镇/街道" show-overflow-tooltip></el-table-column>
<div slot="empty">
<div class="table-empty">
<img src="../../assets/image/no-content1.png" />
......@@ -98,9 +98,9 @@
background
@size-change="handleSizeChange"
@current-change="handleCurrentChange"
:current-page="pageNo"
:current-page="formInline.pageNo"
:page-sizes="[10, 30, 50]"
:page-size="pageSize"
:page-size="formInline.pageSize"
layout="total, sizes, prev, pager, next, jumper"
:total="totalRows"
></el-pagination>
......@@ -130,7 +130,9 @@ export default {
return {
formInline: {
record: "",
mathStatus: ""
mathStatus: "",
pageNo: 1,
pageSize: 2,
},
recordSelect: [
//项目状态
......@@ -158,7 +160,7 @@ export default {
value: 2
}
],
mathDate: [],
tableData: [],
multipleSelection: [], //被选中的行
totalRows: 0, //数据总数
pageNo: 1, //当前是第几页
......@@ -196,16 +198,18 @@ export default {
// 更改数据显示数量
handleSizeChange(val) {
console.log(`每页 ${val} 条`);
vm.formInline.pageSize = val;
},
// 换页
handleCurrentChange(val) {
console.log(`当前页: ${val}`);
vm.formInline.pageNo = val;
},
close() {
this.$emit("closeDialog");
},
search() {
this.mathDate = [
this.tableData = [
{
id: 1,
name: "张医生",
......@@ -251,7 +255,7 @@ export default {
];
let req = {
pageNo: 1,
pageSize: 10,
pageSize: 2,
projectId: 1,
achievementStatus: 1,
status: 1,
......@@ -260,6 +264,7 @@ export default {
vm.GET("report/portal/getProjectData", req).then(res => {
closeLoading(vm);
if (res.code == "000000") {
vm.tableData = res.data;
}
});
},
......
......@@ -13,15 +13,15 @@
<el-table
:data="tableData"
class="course-table">
<el-table-column prop="name" label="课程名" align="center">
<el-table-column prop="courseName" label="课程名" align="center">
</el-table-column>
<el-table-column prop="courseTime" label="课程时长" align="center">
<el-table-column prop="courseTotalTime" label="课程时长" align="center">
</el-table-column>
<el-table-column prop="personTime" label="人均学习时长" align="center">
</el-table-column>
<el-table-column prop="joinNum" label="参与培训人数" align="center">
<el-table-column prop="courseLearnerCount" label="参与培训人数" align="center">
</el-table-column>
<el-table-column prop="completeNum" label="完成培训人数" align="center">
<el-table-column prop="courseFinishedCount" label="完成培训人数" align="center">
</el-table-column>
<el-table-column fixed="right" label="操作" min-width="50" align="center">
<template slot-scope="scope">
......@@ -38,9 +38,9 @@
background
@size-change="handleSizeChange"
@current-change="handleCurrentChange"
:current-page="formInline.pageNo"
:current-page="pageNo"
:page-sizes="[10, 30, 50]"
:page-size="formInline.pageSize"
:page-size="pageSize"
layout="total, sizes, prev, pager, next, jumper"
:total="totalRows"
></el-pagination>
......@@ -49,6 +49,7 @@
</template>
<script>
import { create } from "domain";
import * as operationData from "../../utils/operation";
import { openLoading, closeLoading } from "../../utils/utils";
let vm = null;
export default {
......@@ -62,72 +63,95 @@ export default {
dialogData: {
type: Object
},
organizationNum: {
type: Number
},
organizationList: {
type: Array
}
},
data() {
return {
cardData: [],
tableData: [],
totalRows: 0,
projectId: '',
pageNo: 1,
pageSize: 1,
}
},
created() {
vm = this;
this.getCardData();
this.search();
this.projectId = vm.getUrlSearch(window.location.href, "id");
// this.search();
},
mounted: function() {
this.$on('search',()=>{
console.log(this.formInline);
this.getCardData();
this.search();
})
},
methods: {
getCardData() {
getCardData(data) {
this.cardData = [
{
title: '项目所有课程数',
num: 9,
num: data.projectCourseTotalTime,
unit: '门课程',
},{
title: '项目所有课程总时长',
num: 500,
num: data.projectCourseCount,
unit: '分钟',
},{
title: '项目人均学习时长',
num: 265,
num: data.projectAvgStudyTime,
unit: '分钟',
}
];
},
search() {
this.tableData = [{
id: 1,
name: '科学诊治高血压',
courseTime: '120分钟',
personTime: '90分钟',
joinNum: '9892',
completeNum: '5992',
},{
id: 2,
name: '科学诊心脏病',
courseTime: '120分钟',
personTime: '90分钟',
joinNum: '9892',
completeNum: '5992',
}];
if (vm.formInline.region.length == 0) {
vm.$message("请选择地区");
return;
}
let checkAll = operationData.hasAll(vm.formInline.organization)
let req = {
projectId: vm.projectId,
ids: operationData.getIds(vm.formInline,vm.organizationList,checkAll),
type: operationData.getSearchType(vm.formInline),
OriginalFlag: vm.formInline.checked == false ? 0 : 1
};
console.log("3 req", req);
openLoading(vm);
vm.GET("report/portalProjectCourse/getTotal", req).then(res => {
closeLoading(vm);
if (res.code == "000000") {
vm.getCardData(res.data)
}
});
let reqList = req;
reqList.pageNo = vm.pageNo;
reqList.pageSize = vm.pageSize;
vm.GET("report/portalProjectCourse/getCourseList", reqList).then(res => {
closeLoading(vm);
if (res.code == "000000") {
vm.tableData = res.data.list;
}
});
},
checkName(data) {
console.log('dialogData',this.dialogData);
this.$router.push("course-training?tableType=1&id="+data.id+"&region="+this.dialogData.region+"&organization="+this.dialogData.organization);
this.$router.push("course-training?tableType=1&courseId="+data.courseId+"&region="+this.dialogData.region+"&organization="+this.dialogData.organization);
},
handleSizeChange(val) {
console.log(`每页 ${val} 条`);
this.formInline.pageSize = val;
this.vm.pageSize = val;
},
handleCurrentChange(val) {
console.log(`当前页: ${val}`);
this.formInline.pageNo = val;
this.vm.pageNo = val;
this.search();
},
},
......@@ -157,6 +181,7 @@ export default {
}
.course-table {
top: 20px;
margin-bottom: 20px;
}
}
</style>
\ No newline at end of file
......@@ -43,6 +43,12 @@ export default {
},
activeName: {
type: String
},
organizationNum: {
type: Number
},
organizationList: {
type: Array
}
},
data() {
......@@ -82,9 +88,10 @@ export default {
if (this.activeName != "second") {
return;
}
let checkAll = operationData.hasAll(vm.formInline.organization);
let req = {
projectId: vm.projectId,
cityOrHospitalId: operationData.getIds(vm.formInline),
cityOrHospitalId: operationData.getIds(vm.formInline,vm.organizationList,checkAll),
kind: operationData.getSearchType(vm.formInline),
type: this.radio,
};
......
......@@ -37,9 +37,9 @@
background
@size-change="handleSizeChange"
@current-change="handleCurrentChange"
:current-page="searchParam.pageNo"
:current-page="pageNo"
:page-sizes="[10, 30, 50]"
:page-size="searchParam.pageSize"
:page-size="pageSize"
layout="total, sizes, prev, pager, next, jumper"
:total="totalRows"
></el-pagination>
......@@ -49,6 +49,7 @@
<script>
import { log } from 'util';
import * as operationData from "../../utils/operation";
import { openLoading, closeLoading } from "../../utils/utils";
import * as commonUtil from "../../utils/utils";
let vm
......@@ -63,40 +64,78 @@ export default {
dialogData: {
type: Object
},
organizationNum: {
type: Number
},
organizationList: {
type: Array
}
},
data() {
return {
projectId: '',
tableData: [],
cardData: [
{
title: "项目所有考试数",
num: 9,
num: 0,
unit: "门考试"
},
{
title: "项目所有考题数",
num: 120,
num: 0,
unit: "道题"
}
],
totalRows: 0, //数据总数
searchParam: {
pageNo: 1, //当前是第几页
pageSize: 20, //页面总数
}
pageNo: 1, //当前是第几页
pageSize: 2, //页面总数
};
},
created() {
vm = this;
vm.search();
this.projectId = vm.getUrlSearch(window.location.href, "id");
// vm.search();
},
// 挂载到Dom完成时
mounted: function() {
commonUtil.resizeHeight();
this.$on('search',()=>{
console.log(this.formInline);
this.search();
})
},
methods: {
// 搜索列表
search() {
if (vm.formInline.region.length == 0) {
vm.$message("请选择地区");
return;
}
let checkAll = operationData.hasAll(vm.formInline.organization)
let req = {
projectId: vm.projectId,
ids: operationData.getIds(vm.formInline,vm.organizationList,checkAll),
type: operationData.getSearchType(vm.formInline),
OriginalFlag: vm.formInline.checked == false ? 0 : 1
};
console.log("4 req", req);
openLoading(vm);
vm.GET("report/portalProjectExam/getTotal", req).then(res => {
closeLoading(vm);
if (res.code == "000000") {
}
});
let reqList = req;
reqList.pageNo = vm.pageNo;
reqList.pageSize = vm.pageSize;
vm.GET("report/portalProjectExam/getExamList", req).then(res => {
closeLoading(vm);
if (res.code == "000000") {
// vm.tableData = res.data.list;
}
});
//
vm.tableData= [
{
id: 22,
......@@ -115,13 +154,13 @@ export default {
// 更改数据显示数量
handleSizeChange(val) {
console.log(`每页 ${val} 条`)
vm.searchParam.pageSize = val
vm.pageSize = val
vm.search()
},
// 换页
handleCurrentChange(val) {
console.log(`当前页: ${val}`)
vm.searchParam.pageNo = value
vm.pageNo = value
vm.search()
}
}
......
......@@ -13,7 +13,6 @@
@change="handleChange"
filterable
change-on-select
style="width:330px"
></el-cascader>
</el-form-item>
......@@ -69,7 +68,13 @@
></part-in>
</el-tab-pane>
<el-tab-pane label="人群分析" name="second">
<crowd-analysis ref="childCrowd" :formInline="formInline" :activeName="activeName"></crowd-analysis>
<crowd-analysis
ref="childCrowd"
:formInline="formInline"
:activeName="activeName"
:organizationNum="organizationNum"
:organizationList="organizationList"
></crowd-analysis>
</el-tab-pane>
<el-tab-pane label="课程分析" name="third">
<course-analysis
......@@ -77,19 +82,23 @@
:formInline="formInline"
:activeName="activeName"
:dialogData="dialogData"
:organizationNum="organizationNum"
:organizationList="organizationList"
></course-analysis>
</el-tab-pane>
<el-tab-pane label="考试分析" name="fourth">
<examination-analysisfrom
ref="childCourse"
ref="examCourse"
:formInline="formInline"
:activeName="activeName"
:dialogData="dialogData"
:organizationNum="organizationNum"
:organizationList="organizationList"
></examination-analysisfrom>
</el-tab-pane>
<el-tab-pane label="学习效果分析" name="fifth" lazy>
<!-- <el-tab-pane label="学习效果分析" name="fifth" lazy>
<learning-effect></learning-effect>
</el-tab-pane>
</el-tab-pane> -->
</el-tabs>
<el-dialog title="提示" :visible.sync="dialogVisible" width="30%" center>
<p style="text-align:center">文件正在生成,你可以去“我的导出下载”页,下载文件</p>
......@@ -220,7 +229,7 @@ export default {
} else if (tab.name == "second") {
this.$refs.childCrowd.$emit("init");
} else if (tab.name == "third") {
// this.setDialogData();
this.$refs.childCourse.$emit("search");
} else if (tab.name == "fourth") {
}
},
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册