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

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

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