提交 c1effdab 编写于 作者: guangjun.yang's avatar guangjun.yang

Merge branch 'dev-learning-report-0627' into release

......@@ -2306,9 +2306,9 @@
"dev": true
},
"element-ui": {
"version": "2.6.1",
"resolved": "http://192.168.110.93:4873/element-ui/-/element-ui-2.6.1.tgz",
"integrity": "sha1-htt5/13psbzDGHtls3crDFQHRxg=",
"version": "2.10.0",
"resolved": "http://192.168.110.93:4873/element-ui/-/element-ui-2.10.0.tgz",
"integrity": "sha1-5hKfa21v/g260SWkqNF9RHpfY5w=",
"requires": {
"async-validator": "~1.8.1",
"babel-helper-vue-jsx-merge-props": "^2.0.0",
......
......@@ -3,7 +3,8 @@
<el-breadcrumb separator="/">
<el-breadcrumb-item>{{curmbFirst}}</el-breadcrumb-item>
<el-breadcrumb-item v-if="curmbSecond" :to="{ path: jumPathThird }">{{curmbSecond}}</el-breadcrumb-item>
<el-breadcrumb-item v-if="curmbThird">{{curmbThird}}</el-breadcrumb-item>
<el-breadcrumb-item v-if="curmbThird" :to="{ path: jumPathFouth }">{{curmbThird}}</el-breadcrumb-item>
<el-breadcrumb-item v-if="curmbFouth">{{curmbFouth}}</el-breadcrumb-item>
</el-breadcrumb>
</div>
</template>
......@@ -19,8 +20,14 @@ export default {
curmbThird: {
type: String
},
curmbFouth: {
type: String
},
jumPathThird: {
type: String
},
jumPathFouth: {
type: String
}
}
}
......
......@@ -19,7 +19,7 @@ const reportLis = r => require.ensure([], () => r(require('../views/learning/rep
const itemList = r => require.ensure([], () => r(require('../views/learning/item-list.vue')), 'item-list')
const nameList = r => require.ensure([], () => r(require('../views/learning/name-list.vue')), 'name-list')
const dataAlignment = r => require.ensure([], () => r(require('../views/learning/data-alignment.vue')), 'data-alignment')
const courseTraining = r => require.ensure([], () => r(require('../views/learning/course-training.vue')), 'course-training')
const exportDownload = r => require.ensure([], () => r(require('../views/learning/export-download.vue')), 'export-download')
export default [{
path: '/',
......@@ -72,9 +72,10 @@ export default [{
},{
path: '/name-list',
component: nameList
},{
path: '/course-training',
component: courseTraining
},
{
path: '/export-download',
component: exportDownload
},
{
path: '/msg-push',
......
......@@ -7,9 +7,11 @@ export const envConfig = {
// // baseUrl: 'http://192.168.140.14:10201/',
// baseUrl: 'https://test1-sc.yunqueyi.com/',
//baseUrl: 'https://uat-sc.yunqueyi.com/',
// baseUrl: 'https://uat-sc.yunqueyi.com/',
// baseUrl: 'http://10.177.15.150:10401/',
// baseUrl: 'http://10.177.15.150:11905/',
baseUrl: 'https://dev-sc.yunqueyi.com/',
// baseUrl: 'https://dev-sc.yunqueyi.com/',
baseUrl: 'https://test1-sc.yunqueyi.com/',
apiUrl: 'https://dev-api.yunqueyi.com/',
qiniuFileUrl: "https://dev-sc.yunqueyi.com/contents/admin/qiniu/token1",
qiniuResourceUrl: "https://test1-videos.yunqueyi.com",
......@@ -22,6 +24,10 @@ export const envConfig = {
saasDomainUrl: 'https://dev-saas.yunqueyi.com/',
workApiUrl: 'https://dev-work.yunqueyi.com/web',
workApiSrc: 'https://dev-work.yunqueyi.com',
// reportUrl: 'http://10.177.15.150:10401/',
// reportUrl: 'http://192.168.140.13:10401/',
// reportUrl: 'https://dev-sc-report.yunqueyi.com/',
reportUrl: 'https://test1-sc-report.yunqueyi.com/',
},
dev: {
baseUrl: 'https://dev-sc.yunqueyi.com/',
......@@ -36,6 +42,7 @@ export const envConfig = {
saasDomainUrl: 'https://dev-saas.yunqueyi.com/',
workApiUrl: 'https://dev-work.yunqueyi.com/web',
workApiSrc: 'https://dev-work.yunqueyi.com',
reportUrl: 'https://dev-sc-report.yunqueyi.com/',
},
test: {
baseUrl: 'https://test1-sc.yunqueyi.com/',
......@@ -50,6 +57,7 @@ export const envConfig = {
saasDomainUrl: 'https://test1.yunqueyi.com/',
workApiUrl: 'https://test1-work.yunqueyi.com/web',
workApiSrc: 'https://test1-work.yunqueyi.com',
reportUrl: 'https://test1-sc-report.yunqueyi.com/',
},
test2: {
baseUrl: 'https://test2-work.yunqueyi.com/sc/',
......@@ -63,6 +71,7 @@ export const envConfig = {
saasDomainUrl: 'https://test2-work.yunqueyi.com/web/',
workApiUrl: 'https://test2-work.yunqueyi.com/web',
workApiSrc: 'https://test2-work.yunqueyi.com',
reportUrl: 'https://test2-sc-report.yunqueyi.com/',
},
uat: {
baseUrl: 'https://uat-sc.yunqueyi.com/',
......@@ -77,6 +86,7 @@ export const envConfig = {
saasDomainUrl: 'https://uat.yunqueyi.com/',
workApiUrl: 'https://uat-work.yunqueyi.com/web',
workApiSrc: 'https://uat-work.yunqueyi.com',
reportUrl: 'https://uat-sc-report.yunqueyi.com/',
},
pro: {
baseUrl: 'https://sc.yunqueyi.com/',
......@@ -91,5 +101,6 @@ export const envConfig = {
saasDomainUrl: 'https://www.yunqueyi.com/',
workApiUrl: 'https://work.yunqueyi.com/web',
workApiSrc: 'https://work.yunqueyi.com',
reportUrl: 'https://sc-report.yunqueyi.com/',
}
}
......@@ -54,7 +54,7 @@ service.interceptors.request.use(config => {
}
if( process.env.BUILD_ENV == "development" ){ // 本地开发环境
// console.log('环境变量>>>> ', process.env.BUILD_ENV);
config.headers['token'] = '2CD0420B09584AFAA2B6CFD85252E1AB';
config.headers['token'] = 'E5F82EDD958941C29BCDDDED410ACDB3';
}else{
config.headers['token'] = localStorage.getItem('storageToken')
}
......
......@@ -157,13 +157,62 @@ const vueFilter = {
return '普通用户'
}
},
joinTraining: (value) => {
if(value == "1") {
return '是'
joinStatus: (value) => {
if(value == "0") {
return '未参与'
}else if(value == "1") {
return '参与中'
}else {
return '否'
return '已完成'
}
},
reportStatus: (value) => {
if(value == 1) {
return '进行中'
}else if(value == 2) {
return '已结束'
}
},
partJoin: (value) => {
if(value == 1) {
return '未参与'
}else {
return '参与'
}
},
partFinish: (value) => {
if(value == 1) {
return '未完成'
}else {
return '完成'
}
},
projectStatus: (value) => {
if(value == 1) {
return '未参与'
}else if(value == 2) {
return '参与中'
}else if(value == 3) {
return '完成项目'
}
},
recordValue: (value) => {
if(value == 1) {
return '无成绩'
}else if(value == 2) {
return '不通过'
}else if(value == 3) {
return '通过'
}
},
exportStatus: (value) => {
if(value == 0) {
return '数据生成中,请稍后---';
}else if(value == 1) {
return '数据生成完成';
} else {
return '文件生成失败 请重新操作导出';
}
},
}
export default vueFilter
\ No newline at end of file
......@@ -207,3 +207,7 @@ function getConfigByEnvType(urlType) {
}
// 获取report服务器域名地址
export function getReportUrl(url) {
return getConfigByEnvType('reportUrl') + url
}
\ No newline at end of file
import fetch from '@/utils/fetch'
import { getBaseUrl, getWorkApi } from '@/utils/index'
import { getBaseUrl, getReportUrl, getWorkApi } from '@/utils/index'
module.exports = {
data: function () {
......@@ -153,6 +153,16 @@ module.exports = {
data: para
})
},
reportGET(api, para, callback,str) {
// para.token = para.token || this.token || "343BCABC890349ACAF357FA79122F9FE"
let url = api + this.getUrlPara(para)
url = encodeURI(url);
return fetch({
url: getReportUrl(url),
method: 'get',
data: para
})
},
// saas-GET请求
saasGET(api, para) {
// para.token = para.token || this.token || "343BCABC890349ACAF357FA79122F9FE"
......@@ -186,6 +196,14 @@ module.exports = {
data: para
})
},
reportPOST(api, para, callback) {
// para.token = para.token || this.token || "343BCABC890349ACAF357FA79122F9FE"
return fetch({
url: getReportUrl(api),
method: 'post',
data: para
})
},
// 通用saas-POST请求
saasPOST(api, para, cType) {
// para.token = para.token || this.token || "343BCABC890349ACAF357FA79122F9FE"
......
......@@ -273,40 +273,75 @@ export function getEcologySelect(data) {
}
return ecologyist;
}
export function isOverlap(startA,endA,startB,endB) {
let maxStart = Math.max(startA,startB);
let minEnd = Math.min(endA,endB);
console.log('maxStart',maxStart,'minEnd',minEnd);
if(maxStart <= minEnd) {
export function isOverlap(startA, endA, startB, endB) {
let maxStart = Math.max(startA, startB);
let minEnd = Math.min(endA, endB);
console.log('maxStart', maxStart, 'minEnd', minEnd);
if (maxStart <= minEnd) {
return true;
} else {
return false;
}
}
export function setRegionOption(data) {
let option = [];
for (let i = 0; i < data.length; i++) {
let obj = data[i];
obj.label = data[i].provinceName;
obj.value = data[i].provinceId;
option.push(obj);
}
return option;
}
export function getRegionOption() {
let option = [{
value: 'zhejiang',
value: 1,
label: '浙江',
children: [{
value: 'hangzhou',
value: 2,
label: '杭州',
children: [{
value: 'xihu',
value: 120115000000,
label: '西湖区'
}, {
value: 'donghu',
value: 5,
label: '东湖区'
}]
}]
}];
return option;
}
export function getPicOption(title,legendData, colorData, seriesData) {
export function getLearnOrganization(data) {
if(data.length == 0) {
let arr = [];
return arr;
}
let organization = [
{
label: "全部",
value: 0
},
];
for (let i = 0; i < data.length; i++) {
let obj = {
label: data[i].hospital_name,
value: data[i].hospital_id,
index: i,
};
organization.push(obj);
}
return organization;
}
export function getPicOption(title, legendData, colorData, seriesData) {
let option = {
title: {
text: title,
x: "center"
},
tooltip: {
trigger: 'item',
formatter: "{a} <br/>{b} : {c} ({d}%)"
},
legend: {
orient: "vertical",
left: "left",
......@@ -344,6 +379,9 @@ export function getBarOption(xAxisData, seriesData) {
{
type: 'category',
data: xAxisData,
axisLabel: {
interval: 0
}
// axisTick: {
// alignWithLabel: true
// }
......@@ -358,10 +396,162 @@ export function getBarOption(xAxisData, seriesData) {
{
name: '',
type: 'bar',
barWidth: '75%',
barWidth: 30,
data: seriesData,
}
]
};
return option;
}
export function getRank(xAxisData, seriesData) {
let option = {
color: ["#1E90FF", "#32CD32"],
title: {
text: "排行榜",
x: "left",
textStyle: {
//主标题文本样式{"fontSize": 18,"fontWeight": "bolder","color": "#333"}
fontSize: 20,
fontStyle: "normal",
fontWeight: "normal",
color: "#000"
}
},
tooltip: {
trigger: "axis",
formatter: '{b0}<br/>{a0}: {c0}%',
axisPointer: {
// 坐标轴指示器,坐标轴触发有效
type: "shadow" // 默认为直线,可选为:'line' | 'shadow'
}
},
legend: {
data: ["完成人数"],
bottom: 0
},
grid: {
left: "3%",
right: "4%",
bottom: "10%",
containLabel: true
},
xAxis: [
{
type: "category",
data: xAxisData,
}
],
yAxis: [
{
type: "value",
axisLabel: {
show: true,
interval: 'auto',
formatter: '{value}%'
},
}
],
series: [
{
name: "完成通过率",
type: "bar",
stack: "完成通过率",
barMaxWidth: "50",
data: seriesData,
},
// {
// name: "参与人数",
// type: "bar",
// stack: "人数",
// barMaxWidth: "80",
// data: [220, 182, 191, 220, 182, 191]
// }
]
};
return option;
}
export function getSearchType(formData,checkAll) {
let type = 0;
if (formData.region.length == 1 || formData.region.length == 2) {
type = formData.region.length;
} else if (formData.region.length == 3) {
if (formData.organization.length == 0 || checkAll === true) {
type = 3;
} else {
type = 4
}
}
return type;
}
export function hasAll(data) {
let flag = false;
for (let i = 0; i < data.length; i++) {
if (data[i] == 0) {
flag = true;
return flag
}
}
return flag;
}
export function getIds(formData, organizationList, checkAll) {
let ids = '';
if (formData.organization.length == 0) {
//地区id
ids = formData.region[formData.region.length - 1];
} else {
//机构id 选了'全部'
if (checkAll === true) {
// for (let i = 0; i < organizationList.length; i++) {
// if (organizationList[i].value != 0) {
// ids += organizationList[i].value + ',';
// }
// }
ids = formData.region[formData.region.length - 1];
} else {
for (let i = 0; i < formData.organization.length; i++) {
if (formData.organization[i] != 0) {
ids += formData.organization[i] + ',';
}
}
ids = ids.substring(0, ids.length - 1);
}
}
return ids;
}
//获取id的list
export function getDoctorIdList(data) {
let list = [];
if (typeof data === 'undefined') {
return list;
}
if (data.constructor === Array) {
for (let i = 0; i < data.length; i++) {
list.push(data[i].doctorId);
}
}
return list;
}
export function getAjustmentList(data) {
let idList = "";
for (let i = 0; i < data.length; i++) {
idList += data[i] + ',';
}
idList = idList.substring(0, idList.length - 1);
return idList;
}
export function removeZero(data) {
let list = [];
for(let i = 0;i<data.length;i++) {
if(data[i].value != 0) {
list.push(data[i]);
}
}
return list;
}
export function initRank(data) {
let list = [{gradeFlag: -1, gradeName: "全部"}];
for(let i=0;i<data.length;i++) {
list.push(data[i]);
}
return list;
}
\ No newline at end of file
......@@ -713,6 +713,15 @@ export default {
// city: "上海市",
// district: "长宁区"
// };
let checkProjectStr = (rule, value, callback) => {
if(value.indexOf("\\") != -1) {//存在
callback(new Error('请勿输入字符“ \\ ”'));
} else if (value.indexOf(".") != -1) {
callback(new Error('请勿输入字符“ . ”'));
} else {
callback();
}
};
return {
idTypeValue: 1,
idTypeProject: '',
......@@ -916,7 +925,8 @@ export default {
max: 20,
message: "输入长度为2-20的内容,可包含中英文、数字及特殊符号",
trigger: "blur"
}
},
{ validator: checkProjectStr, trigger: 'blur' }
],
duringTime: [
{
......@@ -2354,7 +2364,7 @@ export default {
}
}
} else if (type == "administrativeUpdate") {
//console.log(this.allSelectedKeys.length);
console.log('this.allSelectedKeys',this.allSelectedKeys);
if (this.allSelectedKeys.length > 0) {
for (let i = 0; i < this.allSelectedKeys.length; i++) {
scope +=
......
......@@ -360,28 +360,61 @@ export default {
}
});
} else {
if (type === 8) {
//取消审批值对应2
type = 2;
// if (type === 8) {
// //取消审批值对应2
// type = 2;
// let req = {
// portalProjectId: projectId,
// warnType: 5
// };
// vm.GET("portal/portalCheck/remindPortalCheck", req).then(res => {
// vm.$message.info(res.message);
// if (res.code == "000000") {
// console.log(res);
// vm.getProjectList();
// }
// });
// }
// if (type == 4 || type == 6) {
// //发送消息
// let warnType = "";
// if (type == 4) {
// warnType = 3;
// } else if (type == 6) {
// warnType = 4;
// }
// let req = {
// portalProjectId: projectId,
// warnType: warnType
// };
// vm.GET("portal/portalCheck/remindPortalCheck", req).then(res => {
// vm.$message.info(res.message);
// if (res.code == "000000") {
// console.log(res);
// vm.getProjectList();
// }
// });
// }
let req = {
portalProjectId: projectId,
warnType: 5
projectId: projectId,
changeStatus: vm.getType(type)
};
vm.GET("portal/portalCheck/remindPortalCheck", req).then(res => {
vm.POST("portal/portalInfo/changeStatus", req).then(res => {
vm.$message.info(res.message);
if (res.code == "000000") {
console.log(res);
vm.getProjectList();
}
});
}
if (type == 4 || type == 6) {
//changeStatus之后remindPortalCheck
if (type == 4 || type == 6 || type == 8) {
//发送消息
let warnType = "";
if (type == 4) {
warnType = 3;
} else if (type == 6) {
warnType = 4;
} else if (type == 8) {
warnType = 5;
}
let req = {
portalProjectId: projectId,
......@@ -390,24 +423,21 @@ export default {
vm.GET("portal/portalCheck/remindPortalCheck", req).then(res => {
vm.$message.info(res.message);
if (res.code == "000000") {
console.log(res);
vm.getProjectList();
}
});
}
let req = {
projectId: projectId,
changeStatus: type
};
vm.POST("portal/portalInfo/changeStatus", req).then(res => {
vm.$message.info(res.message);
if (res.code == "000000") {
console.log(res);
vm.getProjectList();
}
});
}
},
getType(value) {
let data = value;
if(data == 8) {
data = 2;
}
return data;
},
//删除项目
delItem(row) {
let req = {};
......
......@@ -124,6 +124,22 @@
index: 'msg-push',
isMessageSend: true,
checkAuth: true,
},{
title: '学情报告',
icon: 'el-icon-tickets',
index: 'report-list',
subs: [
{
title: '项目列表',
icon: 'el-icon-document',
index: 'report-list'
},
{
title: '导出下载',
icon: 'el-icon-document',
index: 'export-download'
}
]
},
]
}
......
<template>
<div class="course-training-wrap">
<bread-crumb :curmbFirst="curmbFirst" :curmbSecond="curmbSecond"></bread-crumb>
<div class="component-content screenSet" id="screenSet">
<p class="course-p">地区:{{ region }}</p>
<p class="course-p">选择机构:{{ organization }}</p>
<div class="course-search">
<el-input placeholder="查询姓名" v-model="formData.name" class="input-with-select">
<el-button class="course-button" type="primary" slot="append" @click="search">查询</el-button>
</el-input>
</div>
<el-table
:data="tableData"
class="course-table">
<el-table-column prop="name" label="姓名" align="center">
</el-table-column>
<el-table-column prop="sex" label="性别" align="center">
</el-table-column>
<el-table-column prop="age" label="年龄" align="center">
</el-table-column>
<el-table-column prop="professional" label="职称" align="center">
</el-table-column>
<el-table-column prop="post" label="职务" align="center">
</el-table-column>
<el-table-column prop="organization" label="机构" align="center">
</el-table-column>
<el-table-column prop="region" label="地区" align="center">
</el-table-column>
<el-table-column prop="join" label="是否参与培训" align="center">
<template slot-scope="scope">
<span>{{ scope.row.join | joinTraining }}</span>
</template>
</el-table-column>
<el-table-column prop="complete" label="是否完成培训" align="center">
<template slot-scope="scope">
<span>{{ scope.row.complete | joinTraining }}</span>
</template>
</el-table-column>
<el-table-column prop="date" label="完成培训日期" align="center">
</el-table-column>
</el-table>
<div class="pagination">
<el-pagination
background
@size-change="handleSizeChange"
@current-change="handleCurrentChange"
:current-page="formData.pageNo"
:page-sizes="[10, 30, 50, 100]"
:page-size="formData.pageSize"
layout="total, sizes, prev, pager, next, jumper"
:total="totalRows"
></el-pagination>
</div>
</div>
</div>
</template>
<script>
import BreadCrumb from "../../components/breadcrumb.vue";
import { create } from "domain";
import { mapGetters } from "vuex";
import { openLoading, closeLoading } from "../../utils/utils";
import * as commonUtil from "../../utils/utils";
let vm = null;
export default {
components: {
BreadCrumb
},
props: {
formInline: {
type: Object
}
},
data() {
return {
curmbFirst: "学情报告",
curmbSecond: "项目管理",
formData: {
name: '',
pageNo: 1,
pageSize: 10,
},
region: '浙江省/杭州市/西湖区',
organization: '杭州市中心医院',
tableData: [],
totalRows: 0,
};
},
// computed: {
// ...mapGetters([
// "_token",
// ])
// },
created() {
vm = this;
// console.log("formInline:", this.formInline);
this.search();
},
mounted: function() {
commonUtil.resizeHeight();
},
methods: {
search() {
console.log(this.formData.name);
this.tableData = [{
name: '张三',
sex: '男',
age: '30',
professional: '主任医师',
post: '医生',
organization: '上海复旦大学附属华山医院',
region: '上海静安区',
join: '1',
complete: '1',
date: '2019-10-11',
}];
},
handleSizeChange(val) {
console.log(`每页 ${val} 条`);
this.formData.pageSize = val;
},
handleCurrentChange(val) {
console.log(`当前页: ${val}`);
this.formData.pageNo = val;
this.search();
},
}
};
</script>
<style lang="scss">
.course-training-wrap {
.component-content {
background: #fff;
padding: 10px;
.header-title {
padding: 10px 12px;
font-size: 12px;
color: #449284;
border-bottom: 1px solid #efefef;
}
.course-p {
margin: 30px 0 20px 30px;
font-size: 13px;
}
.course-search {
margin: 35px auto;
width: 800px;
}
.course-button {
color: #fff;
}
}
}
</style>
\ No newline at end of file
......@@ -6,206 +6,341 @@
<div class="title">数据调整</div>
</el-col>
<el-col :span="3">
<el-button class="add-button" size="small" type="primary">保存修改</el-button>
<el-button class="add-button" size="small" type="primary" @click="saveUpdate">保存修改</el-button>
</el-col>
<el-col :span="3">
<el-button class="add-button" size="small" type="primary">取消</el-button>
<el-button class="add-button" size="small" @click="close">取消</el-button>
</el-col>
</el-row>
</div>
<div class="form">
<el-row :gutter="30" class="row" type="flex" style="margin-top: 10px;">
<el-form ref="serchForm" :model="formInline" label-width="100px" style="width:100%;">
<el-col :span="6">
<el-form-item label="参与项目状态:">
<div class="text">
<p>地区:{{ dialogData.region }}</p>
<p>选择机构:{{ dialogData.organization }}</p>
</div>
<el-form
class="form-update"
ref="serchForm"
:model="formData"
label-width="100px"
style="width:40%;"
>
<el-form-item label="项目成绩:">
<el-select
v-model="formInline.pregStatus"
v-model="formData.achievementStatus"
size="small"
style="width: 100%;"
placeholder="请选择项目状态"
placeholder="请选择项目成绩"
>
<el-option
v-for="(item,index) in preStaSelect"
v-for="(item,index) in achievementList"
:key="index"
:label="item.label"
:value="item.value"
></el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="统计状态:">
<el-select
v-model="formInline.mathStatus"
v-model="formData.status"
size="small"
style="width: 100%;"
placeholder="请选择统计状态"
>
<el-option
v-for="(item,index) in mathStaSelect"
v-for="(item,index) in statusList"
:key="index"
:label="item.label"
:value="item.value"
></el-option>
</el-select>
</el-form-item>
</el-col>
</el-form>
</el-row>
<div class="form-button">
<el-button @click="searchData()" type="primary">查询</el-button>
<el-button @click="resetForm()">重置</el-button>
</div>
<div class="data-main">
<el-row class="select" type="flex" justify="end">
<el-col :span="3">
<div class="title">已选中{{multipleSelection.length}}条数据</div>
</el-col>
<el-col :span="3">
<el-button class="add-button" size="small" @click="includeMath">全部归入统计</el-button>
</el-col>
<el-col :span="3">
<el-button class="add-button" size="small" @click="removeMath">全部移出统计</el-button>
</el-col>
</el-row>
<!-- <div class="line"></div> -->
<p class="explain">说明:只有被勾选中的人才会归入数据统计范围,不勾的不会统计</p>
<el-table
class="data-main"
border
center
ref="multipleTable"
:data="mathDate"
:data="tableData"
tooltip-effect="dark"
style="width: 100%"
@selection-change="handleSelectionChange"
:row-key="getRowKeys"
>
<el-table-column type="selection" width="55"></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="joinStatus" label="项目参与状态" width="120"></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="rank" 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 fixed="right" label="操作" min-width="180">
<template slot-scope="scope">
<el-radio v-model="scope.row.radio" label="1" @change="handleClick(scope.row)">归入统计</el-radio>
<el-radio v-model="scope.row.radio" label="2" @change="handleClick(scope.row)">移除统计</el-radio>
</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="projectResult" label="项目成绩" width="120">
<template slot-scope="scope">{{ scope.row.projectResult | recordValue }}</template>
</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">
<p>没有查询到相关结果</p>
<img src="../../assets/image/no-content1.png" />
<p>没有相关数据,请重新选择查询范围</p>
</div>
</div>
</el-table>
</div>
<!-- 分页 -->
<div class="pagination">
<el-pagination
background
@size-change="handleSizeChange"
@current-change="handleCurrentChange"
:current-page="pageNo"
:page-sizes="[15, 30, 50, 100, 200, 500, 700, 1000, 1500, 2000]"
:page-size="pageSize"
:current-page="formData.pageNo"
:page-sizes="[10, 30, 50]"
:page-size="formData.pageSize"
layout="total, sizes, prev, pager, next, jumper"
:total="totalRows"
></el-pagination>
</div>
<el-dialog title="发布学情报告" :visible.sync="dialogVisible" width="30%" append-to-body>
<p style="color:red">项目【{{ projectName }}】的数据修改</p>
<p>确认需要更新学情报告吗?</p>
<span slot="footer" class="dialog-footer">
<el-button @click="dialogVisible = false">取消</el-button>
<el-button type="primary" @click="updateData()">确定</el-button>
</span>
</el-dialog>
</div>
</template>
<script>
let vm
import { openLoading, closeLoading } from "../../utils/utils";
import * as operationData from "../../utils/operation";
let vm;
export default {
props: {
formInline: {
type: Object
},
organizationList: {
type: Array
},
dialogData: {
type: Object
}
},
data() {
return {
formInline: {
pregStatus: "",
mathStatus: ""
formData: {
achievementStatus: "",
status: 1,
pageNo: 1,
pageSize: 10,
},
preStaSelect: [
achievementList: [
//项目状态
{
label: "未参与项目",
value: "1"
label: "全部",
value: '',
},
{
label: "参与项目",
value: "2"
label: "通过",
value: 1
},
{
label: "完成项目",
value: "3"
label: "不通过",
value: 2
},
{
label: "无成绩",
value: 3
}
],
mathStaSelect: [
statusList: [
//项目状态
{
label: "全部",
value: 1
},
{
label: "归入统计",
value: "1"
value: 2
},
{
label: "移除统计",
value: "2"
}
],
mathDate: [
{
name: "张医生",
joinStatus: "完成项目",
progress: "谈西社区卫生服务站",
desk: "全科",
rank: "一甲",
province: "河北省",
city: "石家庄市",
district: "长安区",
address: "建北街道",
radio: '1'
}
value: 3
},
],
tableData: [],
multipleSelection: [], //被选中的行
totalRows: 0, //数据总数
pageNo: 1, //当前是第几页
pageSize: 20 //页面总数
getRowKeys(row) {
return row.doctorId;
},
selectedData: [],
dialogVisible: false,
projectId: "",
projectName: "",
changedDoctor: [],
changedDoctor2: [],
lookedDoctor: [],
};
},
created() {
vm = this
vm = this;
this.projectId = vm.getUrlSearch(window.location.href, "id");
this.projectName = vm.getUrlSearch(window.location.href, "projectName");
// this.search();
console.log(vm.dialogData);
},
mounted: function() {
//父组件传值
this.$on("search", () => {
// this.lookedDoctor = [];
// this.changedDoctor = [];
// this.changedDoctor2 = [];
// this.$refs.multipleTable.clearSelection();
this.resetForm();
// this.search();
});
},
methods: {
// 将选中行放入数组
handleSelectionChange(val) {
this.multipleSelection = val
console.log(this.multipleSelection)
},
handleClick(row) {
console.log(row);
handleSelectionChange(rows) {
this.changedDoctor = [];
this.changedDoctor2 = [];
this.selectedData = [];
if (rows) {
rows.forEach(row => {
if (row) {
this.changedDoctor.push(row.doctorId);
}
});
}
this.changedDoctor2 = operationData.getDifference(
this.lookedDoctor,
this.changedDoctor
);
console.log(
"选",
this.changedDoctor,
"没",
this.changedDoctor2
);
},
// 更改数据显示数量
handleSizeChange(val) {
console.log(`每页 ${val} 条`);
vm.formData.pageSize = val;
vm.search();
},
// 换页
handleCurrentChange(val) {
console.log(`当前页: ${val}`);
vm.formData.pageNo = val;
vm.search();
},
// 全部统计
includeMath() {
if (!this.multipleSelection) {
return;
close() {
this.$emit("closeDialog");
},
searchData() {
vm.formData.pageNo = 1;
vm.search();
},
search() {
setTimeout(function(){
openLoading(vm);
},20);
let checkAll = operationData.hasAll(vm.formInline.organization);
let req = {
projectId: vm.projectId,
achievementStatus: vm.formData.achievementStatus,
status: vm.formData.status,
ids: operationData.getIds(vm.formInline,vm.organizationList,checkAll),
type: operationData.getSearchType(vm.formInline,checkAll),
pageNo: vm.formData.pageNo,
pageSize: vm.formData.pageSize,
};
vm.reportGET("report/portal/getProjectData", req).then(res => {
// closeLoading(vm);
if (res.code == "000000") {
vm.tableData = res.data.projectData;
vm.totalRows = res.data.count;
let idList = operationData.getDoctorIdList(vm.tableData);
// console.log('idList',idList);
vm.lookedDoctor = operationData.getUnion(
vm.lookedDoctor,
idList
);
vm.initDoctorChoose();
}
this.multipleSelection.forEach(el => {
el.radio = '1'
})
});
},
// 全部不统计
removeMath() {
if (!this.multipleSelection) {
initDoctorChoose() {
let tableStatus = vm.tableData;
if(typeof tableStatus === 'undefined') {
return;
}
this.multipleSelection.forEach(el => {
el.radio = '2'
})
tableStatus.forEach(row => {
let idList = [];
idList[0] = row.doctorId;
let intersect = operationData.getIntersect(idList,this.changedDoctor);
let intersect2 = operationData.getIntersect(idList,this.changedDoctor2);
// console.log('intersect',intersect,'intersect2',intersect2);
//debugger;
if(intersect.length > 0) {
//选中
//this.$refs.multipleOrganization.toggleRowSelection(row);
} else if (intersect2.length > 0) {
//不选
} else {
if (row.status == 1) {
this.$nextTick(function() {
this.$refs.multipleTable.toggleRowSelection(row);
});
}
}
});
},
//重置
resetForm() {
this.lookedDoctor = [];
this.changedDoctor = [];
this.changedDoctor2 = [];
this.$refs.multipleTable.clearSelection();
vm.formData = Object.assign(
{},
{
achievementStatus: "",
status: 1,
pageNo: 1,
pageSize: 10,
}
);
vm.search();
},
saveUpdate() {
this.dialogVisible = true;
},
updateData() {
let req = {
projectId: vm.projectId,
removeDoctorIdList: operationData.getAjustmentList(vm.changedDoctor2),
joinDoctorIdList: operationData.getAjustmentList(vm.changedDoctor),
};
openLoading(vm);
vm.reportPOST("report/portal/peopleAdjustment", req).then(res => {
closeLoading(vm);
vm.$message(res.message);
if (res.code == "000000") {
this.$emit("closeSearch");
}
});
this.dialogVisible = false;
}
}
};
......@@ -217,16 +352,43 @@ export default {
.alignment-header {
padding: 20px;
margin: 0 30px;
border-bottom: 1px solid #000;
border-bottom: 1px solid #606266;
}
.text {
margin-top: 30px;
margin-left: 98px;
font-size: 13px;
color: #606266;
}
.form-update {
margin: 30px 0px 0px 60px;
}
.form {
padding: 30px;
.form-button {
width: 45%;
top: -62px;
position: relative;
left: 50%;
}
.line {
margin: -20px 30px 30px 30px;
width: 100%;
border-bottom: 1px solid #606266;
}
.explain {
margin: 10px 0 10px 38px;
font-size: 13px;
color: #606266;
}
.data-main {
padding: 0 40px;
margin-left: 36px;
width: 90%;
// padding: 0 40px;
.select {
margin-bottom: 30px;
}
}
.pagination {
margin-right: 10px;
}
}
</style>
<template>
<div class="examination-analysis">
<div class="box">
<el-card class="box-card" v-for="(item , index) in cardData" :key="index">
<div slot="header" class="title">
<span class="weight">{{ item.title }}</span>
</div>
<div class="box-content">
<span class="weight">{{ item.num }}</span>
{{ item.unit }}
</div>
</el-card>
</div>
<div class="table">
<el-table :data="tableData" style="width: 100%" border>
<el-table-column prop="name" label="考试名" min-width="200" align="center"></el-table-column>
<el-table-column prop="joinNum" label="参与考试人数" min-width="100" align="center"></el-table-column>
<el-table-column prop="passNum" label="通过考试人数" min-width="80" align="center"></el-table-column>
<el-table-column prop="goodNum" label="成绩优秀人数" min-width="80" align="center"></el-table-column>
<el-table-column prop="startNum" label="成绩合格人数" min-width="80" align="center"></el-table-column>
<el-table-column label="操作" fixed="right" align="center" min-width="200">
<template slot-scope="scope">
<el-button type="text" size="small" @click="go(scope.row)">查看名单</el-button>
</template>
</el-table-column>
<div slot="empty">
<div class="table-empty">
<img src="../../assets/image/no-content1.png">
<p>没有查询到相关结果</p>
</div>
</div>
</el-table>
</div>
<!-- 分页 -->
<div class="pagination">
<el-pagination
background
@size-change="handleSizeChange"
@current-change="handleCurrentChange"
:current-page="searchParam.pageNo"
:page-sizes="[15, 30, 50, 100, 200, 500, 700, 1000, 1500, 2000]"
:page-size="searchParam.pageSize"
layout="total, sizes, prev, pager, next, jumper"
:total="totalRows"
></el-pagination>
</div>
</div>
</template>
<script>
import { log } from 'util';
import { openLoading, closeLoading } from "../../utils/utils";
import * as commonUtil from "../../utils/utils";
let vm
export default {
data() {
return {
tableData: [
{
name: "asd",
joinNum: 123123,
passNum: 123,
goodNum: 12,
startNum: 111
}
],
cardData: [
{
title: "项目所有考试数",
num: 9,
unit: "门考试"
},
{
title: "项目所有考题数",
num: 120,
unit: "道题"
}
],
totalRows: 0, //数据总数
searchParam: {
pageNo: 1, //当前是第几页
pageSize: 20, //页面总数
}
};
},
created() {
vm = this
},
// 挂载到Dom完成时
mounted: function() {
commonUtil.resizeHeight();
},
methods: {
// 搜索列表
search(flag) {
if(flag) vm.searchParam.pageNo = 1
openLoading(vm);
let params = {};
vm.GET(url, params).then(res => {
closeLoading(vm);
if (res.code == "000000") {
} else {
vm.$message.info(res.message);
}
});
},
// 跳转查看名单页面
go(row) {
vm.$router.push('/name-list')
},
// 更改数据显示数量
handleSizeChange(val) {
console.log(`每页 ${val} 条`)
vm.searchParam.pageSize = val
vm.search()
},
// 换页
handleCurrentChange(val) {
console.log(`当前页: ${val}`)
vm.searchParam.pageNo = value
vm.search()
}
}
};
</script>
<style lang='scss' rel='stylesheet/scss'>
.examination-analysis {
background: #fff;
.box {
overflow: hidden;
}
.table {
margin-top: 30px;
}
}
</style>
<template>
<div class="export-download">
<bread-crumb :curmbFirst="curmbFirst" :curmbSecond="curmbSecond"></bread-crumb>
<div class="component-content screenSet" id="screenSet">
<p>导出文件列表</p>
<el-table :data="tableData" style="width: 100%">
<el-table-column
prop="title"
label="名称"
align="center"
min-width="150"
show-overflow-tooltip
></el-table-column>
<el-table-column prop="createdTime" label="时间" align="center" min-width="120">
<template slot-scope="scope">{{ scope.row.createdTime }}</template>
</el-table-column>
<el-table-column prop="status" label="状态" align="center" min-width="150">
<template slot-scope="scope">{{ scope.row.status | exportStatus }}</template>
</el-table-column>
<el-table-column label="操作" fixed="right" align="center" min-width="70">
<template slot-scope="scope">
<el-button
type="primary"
:disabled="scope.row.buttonStatus"
size="small"
@click="update(scope.row)"
>{{ scope.row.buttonText }}</el-button>
</template>
</el-table-column>
<div slot="empty">
<div class="table-empty">
<img src="../../assets/image/no-content1.png" />
<p>没有相关数据,请重新选择查询范围</p>
</div>
</div>
</el-table>
<div class="pagination">
<el-pagination
background
@size-change="handleSizeChange"
@current-change="handleCurrentChange"
:current-page="param.pageNo"
:page-sizes="[10, 30, 50]"
:page-size="param.pageSize"
layout="total, sizes, prev, pager, next, jumper"
:total="totalRows"
></el-pagination>
</div>
</div>
</div>
</template>
<script>
import BreadCrumb from "../../components/breadcrumb.vue";
import * as commonUtil from "../../utils/utils";
import { openLoading, closeLoading } from "../../utils/utils";
import axios from "axios";
let vm = null;
export default {
components: {
BreadCrumb
},
data() {
return {
curmbFirst: "学情报告",
curmbSecond: "导出下载",
projectId: "",
tableData: [],
param: {
pageSize: 10,
pageNo: 1
},
totalRows: 0,
totalTime: 3,
queryData: {}
// buttonText: "刷新",
// buttonStatus: false,
};
},
created() {
vm = this;
this.projectId = vm.getUrlSearch(window.location.href, "projectId");
this.search();
},
mounted: function() {
commonUtil.resizeHeight();
},
methods: {
setButton() {
for (let i = 0; i < vm.tableData.length; i++) {
vm.tableData[i].index = i;
if (vm.tableData[i].status == 1) {
vm.tableData[i].buttonText = "下载";
vm.tableData[i].buttonStatus = false;
} else {
vm.tableData[i].buttonText = "刷新";
vm.tableData[i].buttonStatus = false;
}
}
},
search() {
// this.setButton();
let req = {
projectId: vm.projectId
};
if(req.projectId == null) {
req.projectId = '';
}
vm.reportGET("report/downLoad/getDownloadList", req).then(res => {
if (res.code == "000000") {
vm.tableData = res.data.data;
vm.totalRows = res.data.totalRows;
vm.setButton();
}
});
},
downLoad(row) {
// vm.queryData = this.$route.query;
// let req = vm.queryData;
// openLoading(vm);
// vm.reportGET("report/downLoad/downLoad", req).then(res => {
// closeLoading(vm);
// // console
// if (res.code == "000000") {
// }
// });
setTimeout(() => {
window.open(row.fileUrl);
}, 500);
},
getDownLoadStatus(row) {
let req = {
id: row.id
};
vm.reportGET("report/downLoad/getDownLoadStatus", req).then(res => {
if (res.code == "000000") {
vm.tableData[row.index].status = res.data.data;
// console.log('res.data.data',res.data.data);
if (res.data.data == 1) {
vm.tableData[row.index].title = vm.tableData[row.index].title + " ";
vm.tableData[row.index].buttonText = "下载";
vm.tableData[row.index].fileUrl = res.data.url;
} else {
console.log("res", res, vm.tableData[row.index]);
vm.tableData[row.index].title = vm.tableData[row.index].title + " ";
vm.tableData[row.index].buttonText = "刷新";
}
} else {
vm.$message(res.message);
vm.tableData[row.index].title = vm.tableData[row.index].title + " ";
vm.tableData[row.index].buttonText = "刷新";
}
});
},
update(row) {
if (vm.tableData[row.index].status == 1) {
vm.downLoad(row);
} else {
this.$nextTick(function() {
console.log(vm.tableData[row.index]);
let nowTime = vm.totalTime;
vm.tableData[row.index].title = vm.tableData[row.index].title + " ";
vm.tableData[row.index].buttonText = nowTime + "s后可以刷新";
vm.tableData[row.index].buttonStatus = true;
let clock = window.setInterval(() => {
nowTime--;
vm.tableData[row.index].title = vm.tableData[row.index].title + " ";
vm.tableData[row.index].buttonText = nowTime + "s后可以刷新";
if (nowTime <= 0) {
window.clearInterval(clock);
vm.tableData[row.index].title =
vm.tableData[row.index].title + " ";
// vm.tableData[row.index].buttonText = "刷新";
vm.tableData[row.index].buttonStatus = false; //这里重新开启
vm.getDownLoadStatus(row);
}
}, 1000);
});
}
},
// 更改数据显示数量
handleSizeChange(val) {
vm.param.pageSize = val;
vm.search();
},
// 换页
handleCurrentChange(val) {
vm.param.pageNo = value;
vm.search();
}
}
};
</script>
<style lang="scss">
.export-download {
.component-content {
background: #fff;
padding: 10px;
}
}
</style>
\ No newline at end of file
......@@ -9,38 +9,45 @@
<span class="weight">{{ item.num }} </span> {{ item.unit }}
</div>
</el-card>
<div v-if="index+1 !== cardData.length" class="line"></div>
</div>
<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 prop="courseAvgStudyTime" 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">
<el-button
@click="checkName(scope.row)"
type="primary"
type="text"
size="small"
>查看名单</el-button>
</template>
</el-table-column>
<div slot="empty">
<div class="table-empty">
<img src="../../assets/image/no-content1.png">
<p>没有相关数据,请重新选择查询范围</p>
</div>
</div>
</el-table>
<div class="pagination">
<el-pagination
background
@size-change="handleSizeChange"
@current-change="handleCurrentChange"
:current-page="formInline.pageNo"
:page-sizes="[10, 30, 50, 100]"
:page-size="formInline.pageSize"
:current-page="pageNo"
:page-sizes="[10, 30, 50]"
:page-size="pageSize"
layout="total, sizes, prev, pager, next, jumper"
:total="totalRows"
></el-pagination>
......@@ -49,6 +56,7 @@
</template>
<script>
import { create } from "domain";
import * as operationData from "../../utils/operation";
import { openLoading, closeLoading } from "../../utils/utils";
let vm = null;
export default {
......@@ -58,6 +66,12 @@ export default {
},
activeName: {
type: String
},
dialogData: {
type: Object
},
organizationList: {
type: Array
}
},
data() {
......@@ -65,66 +79,116 @@ export default {
cardData: [],
tableData: [],
totalRows: 0,
projectId: '',
pageNo: 1,
pageSize: 10,
}
},
created() {
vm = this;
this.getCardData();
this.search();
this.projectId = vm.getUrlSearch(window.location.href, "id");
},
mounted: function() {
this.$on('search',()=>{
console.log(this.formInline);
this.getCardData();
// console.log(this.formInline);
this.pageNo = 1;
this.search();
})
});
this.$on("init", () => {
this.$nextTick(function() {
if (vm.formInline.region.length != 0) {
this.search();
}
});
});
this.$on("reset",() =>{
this.pageNo = 1;
this.pageSize = 10;
this.tableData = [];
this.cardData = [];
});
},
methods: {
getCardData() {
this.cardData = [
setCardData(data) {
vm.totalRows = data.projectCourseCount;
vm.cardData = [
{
title: '项目所有课程数',
num: 9,
num: data.projectCourseCount,
unit: '门课程',
},{
title: '项目所有课程总时长',
num: 500,
num: data.projectCourseTotalTime,
unit: '分钟',
},{
title: '项目人均学习时长',
num: 265,
num: data.projectAvgStudyTime,
unit: '分钟',
}
];
// vm.cardData[0].num = data.projectCourseCount;
// vm.cardData[1].num = data.projectCourseTotalTime;
// vm.cardData[2].num = data.projectAvgStudyTime;
},
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,checkAll),
originalFlag: vm.formInline.checked == false ? 0 : 1
};
console.log("3 req", req);
openLoading(vm);
vm.reportGET("report/portalProjectCourse/getTotal", req).then(res => {
closeLoading(vm);
if (res.code == "000000") {
if(res.data.projectCourseCount == 0 ) {
vm.$message("没有相关数据,请重新选择查询范围");
}
vm.setCardData(res.data)
} else {
vm.$message(res.message);
}
});
let reqList = req;
reqList.pageNo = vm.pageNo;
reqList.pageSize = vm.pageSize;
vm.reportGET("report/portalProjectCourse/getCourseList", reqList).then(res => {
closeLoading(vm);
if (res.code == "000000") {
vm.tableData = res.data.list;
}
});
},
checkName(data) {
this.$router.push("course-training");
console.log('dialogData',this.dialogData);
let checkAll = operationData.hasAll(vm.formInline.organization)
let routerData = {};
routerData = this.dialogData;
routerData.projectId = vm.projectId;
routerData.projectName = vm.getUrlSearch(window.location.href, "projectName");
routerData.tableType = 1;
routerData.courseId = data.courseId;
routerData.ids = operationData.getIds(vm.formInline,vm.organizationList,checkAll);
routerData.type = operationData.getSearchType(vm.formInline,checkAll);
routerData.originalFlag = vm.formInline.checked == false ? 0 : 1;
this.$router.push({ path: '/name-list', query: routerData});
},
handleSizeChange(val) {
console.log(`每页 ${val} 条`);
this.formInline.pageSize = val;
vm.pageSize = val;
vm.search();
},
handleCurrentChange(val) {
console.log(`当前页: ${val}`);
this.formInline.pageNo = val;
this.search();
vm.pageNo = val;
vm.search();
},
},
}
......@@ -132,6 +196,7 @@ export default {
<style lang="scss">
.course-analysis-wrap {
background: #fff;
overflow: hidden;
padding: 10px;
.weight {
font-weight: bold;
......@@ -139,10 +204,29 @@ export default {
.title:after {
clear: both
}
.el-card {
border-width: 0px;
}
.el-card.is-always-shadow {
box-shadow: 0 0 0 0 rgba(0, 0, 0, 0.1);
}
.line {
background: #e4e4e4;
height: 80px;
width: 1px;
float: left;
margin-top: 20px;
}
.box-card {
width: 240px;
margin-right: 30px;
width: 32%;
margin-right: 1%;
float: left;
.el-card__header {
border-bottom-width: 0;
}
.title {
text-align: center;
}
.box-content {
text-align: center;
height: 40px;
......@@ -150,6 +234,7 @@ export default {
}
.course-table {
top: 20px;
margin-bottom: 20px;
}
}
</style>
\ No newline at end of file
......@@ -5,14 +5,17 @@
<el-radio-button label="2">参与项目</el-radio-button>
<el-radio-button label="3">通过项目</el-radio-button>
</el-radio-group>
<div class="chart">
<div v-show="!showData" class="empty">
<p>"没有相关数据,请重新选择查询范围"</p>
</div>
<div class="chart" v-show="showData">
<div class="item" id="education" ref="education"></div>
<div class="item item-right" id="job" ref="job"></div>
<div class="item">
<div class="title">用户性别分布</div>
<div class="sex">
<div class="sex-item" v-for="(item , index) in sexData" :key="index">
<img class="sex-img" v-bind:src="item.src">
<img class="sex-img" v-bind:src="item.src" />
<p class="sex-type">{{ item.type }}</p>
<p></p>
<p class="sex-num">{{ item.num }}</p>
......@@ -43,114 +46,151 @@ export default {
},
activeName: {
type: String
},
organizationList: {
type: Array
}
},
data() {
return {
radio: 1,
updateCrowd: false,
sexData: []
sexData: [],
projectId: "",
crowdData: {},
showData: false,
echartsData: {
chart1: {},
chart2: {},
chart3: {},
},
};
},
created() {
vm = this;
this.$nextTick(function() {
this.search();
});
this.projectId = vm.getUrlSearch(window.location.href, "id");
},
mounted: function() {
commonUtil.resizeHeight();
// commonUtil.resizeHeight();
//父组件传值
this.$on("search", () => {
this.updateCrowd = true;
vm.radio = 1;
this.search();
});
this.$on("init", () => {
this.$nextTick(function() {
if (vm.formInline.region.length != 0) {
this.search();
}
});
});
this.$on("reset", () => {
this.showData = false;
this.crowdData = {};
});
if (this.activeName == "second") {
this.updateResize();
}
},
methods: {
search() {
if (this.activeName == "second") {
this.getEducationData();
this.getJobData();
this.getSexData();
this.getAgeData();
if (vm.formInline.region.length == 0) {
vm.$message("请选择地区");
return;
}
let checkAll = operationData.hasAll(vm.formInline.organization);
let req = {
projectId: vm.projectId,
cityOrHospitalId: operationData.getIds(vm.formInline,vm.organizationList,checkAll),
kind: operationData.getSearchType(vm.formInline,checkAll),
type: vm.radio,
originalFlag: vm.formInline.checked == false ? 0 : 1
};
console.log("2 req", req);
openLoading(vm);
vm.reportGET("report/portal/getPeoplesDetails", req).then(res => {
closeLoading(vm);
if (res.code == "000000") {
if(res.data.educationList.length == 0 && res.data.jobTitle.length == 0 ) {
vm.$message("没有相关数据,请重新选择查询范围");
this.showData = false;
} else {
this.showData = true;
}
this.crowdData = res.data;
setTimeout(function() {
vm.educationDivision();
vm.jobDivision();
vm.getSexData();
vm.ageDivision();
},20);
// this.educationDivision();
// this.jobDivision();
// this.getSexData();
// this.ageDivision();
} else {
vm.$message(res.message);
}
});
},
updateResize() {
this.$nextTick(function() {
let chartEducation = echarts.init(document.getElementById("education"));
let chartJob = echarts.init(document.getElementById("job"));
let chartAge = echarts.init(document.getElementById("age"));
window.onresize = function() {
chartEducation.resize();
chartJob.resize();
chartAge.resize();
vm.echartsData.chart1.resize();
vm.echartsData.chart2.resize();
vm.echartsData.chart3.resize();
};
});
},
updateRadio(value) {
console.log(value);
console.log(value,vm.radio);
this.search();
},
//用户学历分布
getEducationData() {
let data = [22, 50, 350, 80, 95];
if (this.updateCrowd == true) {
data = [33, 90, 100, 22, 75];
}
this.educationDivision(data);
},
//用户职务分布
getJobData() {
let data = [27, 70, 65, 50];
this.jobDivision(data);
},
//用户性别分布
getSexData() {
let sexList = this.crowdData.sexList;
// if(sexList.length <3) {
// this.sexData = [];
// return;
// }
this.sexData = [
{
src: require("../../assets/image/man.png"),
type: "男性",
num: 21715
num: 0
},
{
src: require("../../assets/image/weman.png"),
type: "女性",
num: 19715
num: 0
},
{
src: require("../../assets/image/question.png"),
type: "未完善信息",
num: 1715
num: 0
}
];
},
//用户年龄分布
getAgeData() {
let data = [1000, 25000, 15000, 8000, 7000, 500];
this.ageDivision(data);
for(let i=0;i<sexList.length;i++) {
if(sexList[i].name == "男") {
this.sexData[0].num = sexList[i].value;
} else if(sexList[i].name == "女") {
this.sexData[1].num = sexList[i].value;
} else {
this.sexData[2].num = sexList[i].value;
}
}
},
educationDivision(data) {
let myChart = echarts.init(this.$refs.education);
let legendData = ["博士", "硕士", "本科", "大专", "大专以下"];
let colorData = ["#FF9F7F", "#FFDB5C", "#E062AE", "#37A2DA", "#67E0E3"];
let seriesData = [
{ value: 22, name: "博士" },
{ value: 50, name: "硕士" },
{ value: 350, name: "本科" },
{ value: 80, name: "大专" },
{ value: 95, name: "大专以下" }
];
for (let i = 0; i < data.length; i++) {
seriesData[i].value = data[i];
let educationList = operationData.removeZero(this.crowdData.educationList);
let legendData = [];
let seriesData = [];
let colorData = ["#FF9F7F", "#FFDB5C", "#E062AE", "#37A2DA", "#7FFFAA", "#67E0E3", "#8A2BE2"];
// for (let i = 0; i < educationList.length; i++) {
// legendData[i] = educationList[i].name;
// }
if(educationList.length > 0) {
legendData = ['博士后','博士','硕士','本科','大专','中专及以下','其他'];
}
seriesData = educationList;
let option = operationData.getPicOption(
"用户学历分布",
legendData,
......@@ -158,42 +198,51 @@ export default {
seriesData
);
myChart.setOption(option);
vm.echartsData.chart1 = myChart;
vm.updateResize();
},
jobDivision(data) {
let myChart = echarts.init(this.$refs.job);
let legendData = ["医生", "护士", "医护人员", "其他"];
let myChart2 = echarts.init(this.$refs.job);
let jobTitle = operationData.removeZero(this.crowdData.jobTitle);
let legendData = [];
let seriesData = [];
let colorData = ["#FF9F7F", "#37A2DA", "#67E0E3", "#FFDB5C"];
let seriesData = [
{ value: 270, name: "医生" },
{ value: 70, name: "护士" },
{ value: 65, name: "医护人员" },
{ value: 50, name: "其他" }
];
for (let i = 0; i < data.length; i++) {
seriesData[i].value = data[i];
for (let i = 0; i < jobTitle.length; i++) {
legendData[i] = jobTitle[i].name;
}
seriesData = jobTitle;
let option = operationData.getPicOption(
"用户职务分布",
legendData,
colorData,
seriesData
);
myChart.setOption(option);
myChart2.setOption(option);
vm.echartsData.chart2 = myChart2;
vm.updateResize();
},
ageDivision(data) {
let myChart = echarts.init(this.$refs.age);
let xAxisData = [
"16-30",
"30-40",
"40-50",
"50-60",
"60以上",
"未完善信息"
];
let seriesData = data;
let myChart3 = echarts.init(this.$refs.age);
let xAxisData = [];
let seriesData = [];
let ageList = this.crowdData.ageList;
for (let i = 0; i < ageList.length; i++) {
// xAxisData[i] = ageList[i].name;
if(ageList[i].value != 0) {
xAxisData.push(ageList[i].name);
}
}
for (let i = 0; i < ageList.length; i++) {
// seriesData[i] = ageList[i].value;
if(ageList[i].value != 0) {
seriesData.push(ageList[i].value);
}
}
let option = operationData.getBarOption(xAxisData, seriesData);
myChart.setOption(option);
myChart3.setOption(option);
vm.echartsData.chart3 = myChart3;
vm.updateResize();
}
}
};
......@@ -201,6 +250,7 @@ export default {
<style lang="scss">
.crowd-analysis-wrap {
background: #fff;
overflow: hidden;
padding: 10px;
.header-title {
padding: 10px 12px;
......@@ -219,11 +269,17 @@ export default {
}
}
}
.empty {
height: 300px;
line-height: 300px;
color: #FF3399;
text-align: center;
}
.chart {
position: relative;
margin: 20px auto 0 auto;
width: 100%;
overflow: auto;
// overflow: auto;
.item {
position: relative;
float: left;
......
<template>
<div class="examination-analysis">
<div v-for="(item , index) in cardData" :key="index" class="box">
<el-card class="box-card">
<div slot="header" class="title">
<span class="weight">{{ item.title }}</span>
</div>
<div class="box-content">
<span class="weight">{{ item.num }}</span>
{{ item.unit }}
</div>
</el-card>
<div v-if="index+1 !== cardData.length" class="line"></div>
</div>
<div class="table">
<el-table :data="tableData" style="width: 100%" border>
<el-table-column prop="examName" label="考试名" min-width="150" align="center"></el-table-column>
<el-table-column prop="examUserCount" label="参与考试人数" min-width="100" align="center"></el-table-column>
<el-table-column prop="userCountForPassExam" label="通过考试人数" min-width="80" align="center"></el-table-column>
<el-table-column v-if="showTd[0]" prop="userCountList[0]" :label="labelTd[0]" min-width="80" align="center"></el-table-column>
<el-table-column v-if="showTd[1]" prop="userCountList[1]" :label="labelTd[1]" min-width="80" align="center"></el-table-column>
<el-table-column v-if="showTd[2]" prop="userCountList[2]" :label="labelTd[2]" min-width="80" align="center"></el-table-column>
<el-table-column v-if="showTd[3]" prop="userCountList[3]" :label="labelTd[3]" min-width="80" align="center"></el-table-column>
<el-table-column label="操作" fixed="right" align="center" min-width="100">
<template slot-scope="scope">
<el-button type="text" size="small" @click="goPage(scope.row)">查看名单</el-button>
</template>
</el-table-column>
<div slot="empty">
<div class="table-empty">
<img src="../../assets/image/no-content1.png">
<p>没有相关数据,请重新选择查询范围</p>
</div>
</div>
</el-table>
</div>
<!-- 分页 -->
<div class="pagination">
<el-pagination
background
@size-change="handleSizeChange"
@current-change="handleCurrentChange"
:current-page="pageNo"
:page-sizes="[10, 30, 50]"
:page-size="pageSize"
layout="total, sizes, prev, pager, next, jumper"
:total="totalRows"
></el-pagination>
</div>
</div>
</template>
<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
export default {
props: {
formInline: {
type: Object
},
activeName: {
type: String
},
dialogData: {
type: Object
},
organizationList: {
type: Array
}
},
data() {
return {
projectId: '',
tableData: [],
cardData: [],
totalRows: 0, //数据总数
pageNo: 1, //当前是第几页
pageSize: 10, //页面总数
labelTd: [],
showTd: [false,false,false,false],
};
},
created() {
vm = this;
this.projectId = vm.getUrlSearch(window.location.href, "id");
},
// 挂载到Dom完成时
mounted: function() {
this.$on('search',()=>{
// console.log(this.formInline);
this.pageNo = 1;
this.search();
});
this.$on("init", () => {
this.$nextTick(function() {
if (vm.formInline.region.length != 0) {
this.search();
}
});
});
this.$on("reset",() =>{
this.pageNo = 1;
this.pageSize = 10;
this.tableData = [];
this.cardData = [];
});
},
methods: {
setCardData(data) {
vm.totalRows = data.projectExamCount;
vm.cardData = [
{
title: "项目所有考试数",
num: data.projectExamCount,
unit: "门考试"
},
{
title: "项目所有考题数",
num: data.projectExamQuestionCount,
unit: "道题"
}
];
// vm.cardData[0].num = data.projectExamCount;
// vm.cardData[1].num = data.projectExamQuestionCount;
},
// 搜索列表
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,checkAll),
originalFlag: vm.formInline.checked == false ? 0 : 1
};
console.log("4 req", req);
openLoading(vm);
vm.reportGET("report/portalProjectExam/getTotal", req).then(res => {
closeLoading(vm);
if (res.code == "000000") {
if(res.data.projectExamCount == 0 ) {
vm.$message("没有相关数据,请重新选择查询范围");
}
vm.setCardData(res.data);
vm.labelTd = res.data.gradeNameList;
} else {
vm.$message(res.message);
}
});
let reqList = req;
reqList.pageNo = vm.pageNo;
reqList.pageSize = vm.pageSize;
vm.reportGET("report/portalProjectExam/getExamList", req).then(res => {
closeLoading(vm);
if (res.code == "000000") {
vm.tableData = res.data.list;
if(res.data.list.length == 0) {
return;
}
if(res.data.list[0].userCountList == null || res.data.list[0].userCountList.length == 0) {
vm.showTd = [false,false,false,false];
} else if (res.data.list[0].userCountList.length == 1){
vm.showTd = [true,false,false,false];
} else if (res.data.list[0].userCountList.length == 2){
vm.showTd = [true,true,false,false];
} else if (res.data.list[0].userCountList.length == 3){
vm.showTd = [true,true,true,false];
} else if (res.data.list[0].userCountList.length == 4){
vm.showTd = [true,true,true,true];
}
}
});
//
},
// 跳转查看名单页面
goPage(data) {
let checkAll = operationData.hasAll(vm.formInline.organization)
let routerData = {};
routerData = this.dialogData;
routerData.projectId = vm.projectId;
routerData.projectName = vm.getUrlSearch(window.location.href, "projectName");
routerData.tableType = 2;
routerData.examId = data.examId;
routerData.ids = operationData.getIds(vm.formInline,vm.organizationList,checkAll);
routerData.type = operationData.getSearchType(vm.formInline,checkAll),
routerData.originalFlag = vm.formInline.checked == false ? 0 : 1
this.$router.push({ path: '/name-list', query: routerData});
},
// 更改数据显示数量
handleSizeChange(val) {
console.log(`每页 ${val} 条`)
vm.pageSize = val
vm.search()
},
// 换页
handleCurrentChange(val) {
console.log(`当前页: ${val}`)
vm.pageNo = val
vm.search()
}
}
};
</script>
<style lang='scss' rel='stylesheet/scss'>
.examination-analysis {
background: #fff;
overflow: hidden;
padding: 10px;
.weight {
font-weight: bold;
}
.el-card {
border-width: 0px;
}
.el-card.is-always-shadow {
box-shadow: 0 0 0 0 rgba(0, 0, 0, 0.1);
}
.line {
background: #e4e4e4;
height: 80px;
width: 1px;
float: left;
margin-top: 20px;
}
.box {
}
.table {
margin-top: 30px;
}
.box-card {
width: 48%;
margin-right: 1%;
float: left;
.el-card__header {
border-bottom-width: 0;
}
.title {
text-align: center;
}
.box-content {
text-align: center;
height: 40px;
font-size: 15px;
}
}
}
</style>
<template>
<div class="course-analysis-wrap">
<bread-crumb :curmbFirst="curmbFirst" :curmbSecond="curmbSecond"></bread-crumb>
<div class="item-list-wrap">
<bread-crumb :curmbFirst="curmbFirst" :curmbSecond="curmbSecond" :curmbThird="curmbThird" :jumPathThird="jumPathThird"></bread-crumb>
<div class="component-content screenSet" id="screenSet">
<el-row :gutter="30" class="row" type="flex" style="margin-top: 10px;">
<el-form ref="formInline" :model="formInline" label-width="75px" style="width:100%;">
<el-col :span="5">
<el-form class="item-form" ref="formInline" :model="formInline" label-width="80px">
<el-form-item label="选择地区:">
<!-- :props="props" -->
<el-cascader
size="small"
ref="cascaderRegion"
:options="optionsRegion"
:props="props"
v-model="formInline.region"
@change="handleChange"
filterable
change-on-select
style="width:330px"
></el-cascader>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="选择日期:">
<el-date-picker
v-model="formInline.date"
size="small"
type="daterange"
placeholder="请选择开始时间"
range-separator="~"
value-format="yyyy-MM-dd 00:00:00"
></el-date-picker>
</el-form-item>
</el-col>
<el-col :span="8" style="padding:0;text-align:right;padding-right:15px;">
<el-button type="default" size="small" @click="reset">重置</el-button>
<el-button type="primary" size="small" @click="search" style="margin-left:0;">查询</el-button>
</el-col>
</el-form>
</el-row>
<el-row>
<el-col :span="5">
<el-form ref="formInline" :model="formInline" label-width="75px" style="width:100%;">
<el-form-item label="选择机构:">
<el-select
size="small"
v-model="formInline.organization"
placeholder="请选择发布状态"
placeholder="请选择机构"
@change="changeOrganization"
multiple
collapse-tags
:disabled="formInline.region.length !== 3"
style="width:330px"
>
<el-option
v-for="item in organizationList"
:key="item.value"
:key="item.index"
:label="item.label"
:value="item.value"
></el-option>
</el-select>
</el-form-item>
<div class="tag-group">
<el-tag
v-for="tag in tags"
:key="tag.value"
type="info"
closable
@close="handleTagClose(tag)"
>{{ tag.label }}</el-tag>
</div>
<el-form-item label v-if="showOriginal == 1">
<el-checkbox size="small" v-model="formInline.checked">查看原始数据</el-checkbox>
</el-form-item>
</el-form>
</el-col>
</el-row>
<div class="choose">{{ chooseOrganization }}</div>
<div class="form-button">
<el-button @click="search()" type="primary">查询</el-button>
<el-button @click="resetForm()">重置</el-button>
</div>
<div class="button-group">
<el-button type="default" size="small" @click="exportExcel">导出Excel</el-button>
<el-button type="default" size="small" @click="changeDate" v-if="activeName=='first'">数据调整</el-button>
<el-button type="default" size="small" @click="update" v-else>修改范围</el-button>
<el-button type="primary" size="small" @click="release">发布报告</el-button>
<el-button v-if="roleType == 'L1' || roleType == 'L2'" type="default" size="small" @click="changeDate">数据修改</el-button>
<!-- <el-button type="default" size="small" @click="update" v-else>修改范围</el-button> -->
<el-button type="default" size="small" :disabled="exportStatus" @click="exportExcel">导出明细</el-button>
</div>
<el-tabs v-model="activeName" @tab-click="handleClick">
<!-- <div class="item-tab"></div> -->
<el-tabs v-model="activeName" @tab-click="handleClick" :before-leave="beforeLeave">
<el-tab-pane label="参与情况" name="first">
<part-in></part-in>
<part-in
ref="childPart"
:formInline="formInline"
:activeName="activeName"
:organizationNum="organizationNum"
:organizationList="organizationList"
></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"
:organizationList="organizationList"
></crowd-analysis>
</el-tab-pane>
<el-tab-pane label="课程分析" name="third">
<course-analysis ref="childCourse" :formInline="formInline" :activeName="activeName">
</course-analysis>
<course-analysis
ref="childCourse"
:formInline="formInline"
:activeName="activeName"
:dialogData="dialogData"
:organizationList="organizationList"
></course-analysis>
</el-tab-pane>
<el-tab-pane label="考试分析" name="fourth">
<examination-analysisfrom></examination-analysisfrom>
<el-tab-pane label="考试分析" name="fourth" v-if="displayExam == 1">
<examination-analysisfrom
ref="childExam"
:formInline="formInline"
:activeName="activeName"
:dialogData="dialogData"
: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>
<span slot="footer" class="dialog-footer">
<el-button @click="dialogVisible = false">留在当前页</el-button>
<el-button type="primary" @click="toDownload()">去下载</el-button>
</span>
</el-dialog>
<el-dialog title :visible.sync="dialogUpdate" width="80%" center>
<!-- <el-button @click="dialogUpdate = false">取 消</el-button> -->
<data-alignment
ref="childAlignment"
@closeDialog="dialogUpdate = false"
@closeSearch="closeSearch"
:formInline="formInline"
:dialogData="dialogData"
:organizationList="organizationList"
></data-alignment>
</el-dialog>
</div>
</div>
</template>
<script>
import BreadCrumb from "../../components/breadcrumb.vue";
import CourseAnalysis from "./course-analysis.vue";
import CrowdAnalysis from "./crowd-analysis.vue";
import PartIn from './part-in.vue';
import ExaminationAnalysisfrom from './examination-analysis.vue';
import LearningEffect from './learning-effect.vue';
import CourseAnalysis from "./item-course-analysis.vue";
import CrowdAnalysis from "./item-crowd-analysis.vue";
import PartIn from "./item-part-in.vue";
import ExaminationAnalysisfrom from "./item-examination-analysis.vue";
import LearningEffect from "./item-learning-effect.vue";
import DataAlignment from "./data-alignment.vue";
import { create } from "domain";
import { mapGetters } from "vuex";
import { openLoading, closeLoading } from "../../utils/utils";
import * as commonUtil from "../../utils/utils";
import * as operationData from "../../utils/operation";
import { log } from 'util';
import { log } from "util";
let vm = null;
export default {
......@@ -103,97 +144,401 @@ export default {
CrowdAnalysis,
PartIn,
ExaminationAnalysisfrom,
LearningEffect
LearningEffect,
DataAlignment
},
data() {
return {
curmbFirst: "学情报告",
curmbSecond: "项目列表",
organizationList: [
{
label: "西湖区第二人民医院",
value: "1"
},
{
label: "杭州市中医院",
value: "2"
}
],
chooseOrganization: "",
curmbThird: "",
jumPathThird: "/report-list",
projectId: "",
projectName: "",
exportStatus: false,
organizationList: [],
optionsRegion: [],
props: {
lazy: true,
lazyLoad(node, resolve) {
const { level } = node;
console.log("node", node);
if (node.level == 1) {
let req = {
provinceId: node.data.value
};
vm.GET("basic-data/position/cities", req).then(res => {
let newData = vm.setMoreOption(res.data.cityList, "cities");
console.log("newData", newData);
resolve(newData);
});
} else if (node.level == 2) {
let req = {
cityId: node.data.value
};
vm.GET("basic-data/position/counties", req).then(res => {
let newData = vm.setMoreOption(res.data.countyList, "counties");
console.log("newData", newData);
resolve(newData);
});
}
}
},
showOriginal: 2,
roleType: '',
formInline: {
region: [],
date: "",
organization: "",
organization: [],
checked: false,
pageNo: 1,
pageSize: 10
},
activeName: "first"
dialogData: {
region: "",
// regionData: "",
organization: ""
// organizationData: "",
},
tags: [],
activeName: "first",
organizationNum: 0,
dialogVisible: false,
dialogUpdate: false,
displayExam: 2,
};
},
computed: {
...mapGetters([
"_token"
// "idType",
// "masterAdministratorFlag"
])
...mapGetters(["_token"])
},
watch: {
tags: function(val) {
this.setDialogData();
}
},
created() {
vm = this;
this.projectId = vm.getUrlSearch(window.location.href, "id");
this.curmbThird = vm.getUrlSearch(window.location.href, "projectName");
this.getDisplay();
this.getRegionOption();
},
mounted: function() {
commonUtil.resizeHeight();
},
methods: {
getDisplay() {
let req = {
projectId: vm.projectId,
};
openLoading(vm);
vm.reportGET("report/portal/display", req).then(res => {
closeLoading(vm);
if (res.code == "000000") {
console.log('vm.showOriginal',res.data)
vm.showOriginal = res.data.status;
vm.roleType = res.data.roleType;
vm.displayExam = res.data.existExam;
}
});
},
beforeLeave(activeName, oldActiveName) {
console.log('action',activeName,'oldActive',oldActiveName)
},
handleClick(tab, event) {
//console.log(tab, event);
console.log('activeName',this.activeName);
if(tab.name == "second") {
// if(tab.name == this.activeName) {
// return;
// }
console.log("activeName", this.activeName, tab.name);
if (tab.name == "first") {
this.$refs.childPart.$emit("init");
} else if (tab.name == "second") {
this.$refs.childCrowd.$emit("init");
} else if (tab.name == "third") {
this.$refs.childCourse.$emit("init");
} else if (tab.name == "fourth") {
this.$refs.childExam.$emit("init");
}
},
handleChange(value) {
console.log(value);
this.formInline.organization = [];
this.tags = [];
setTimeout(function() {
// console.log(vm.$refs["cascaderRegion"].inputValue);
vm.dialogData.region = vm.$refs["cascaderRegion"].inputValue;
// vm.dialogData.regionData = value[value.length-1];
// console.log('vm.dialogData.region',vm.dialogData.region)
}, 20);
// console.log('region',value,vm.formInline);
if (value.length >= 3) {
this.getOrganizationList();
}
},
setMoreOption(data, type) {
let option = [];
for (let i = 0; i < data.length; i++) {
let obj = data[i];
if (type == "cities") {
obj.label = data[i].cityName;
obj.value = data[i].cityId;
} else if (type == "counties") {
obj.label = data[i].countyName;
obj.value = data[i].countyId;
obj.leaf = true;
}
option.push(obj);
}
return option;
},
changeOrganization(value) {
// console.log('formInline',this.formInline.organization);
this.tags = [];
//选了全部的情况下
for (let a = 0; a < this.formInline.organization.length; a++) {
if (this.formInline.organization[a] == 0) {
//选了全部
let tagItem = {
label: "全部",
value: 0
};
this.tags.push(tagItem);
return;
}
}
//没选全部
for (let i = 0; i < this.organizationList.length; i++) {
if (value == this.organizationList[i].value) {
this.chooseOrganization = this.organizationList[i].label;
for (let j = 0; j < value.length; j++) {
if (value[j] == this.organizationList[i].value) {
// console.log('value[j]',j,value[j],this.organizationList[i].label )
let tagItem = {
label: this.organizationList[i].label,
value: this.organizationList[i].value
};
this.tags.push(tagItem);
}
}
}
},
handleTagClose(tag) {
// console.log(tag);
//选了全部的情况下
if (this.tags.length > 0 && this.tags[0].value == 0) {
this.tags.splice(0, 1);
this.formInline.organization = [];
return;
}
//没全部的情况下
for (let i = 0; i < this.tags.length; i++) {
if (tag.value == this.tags[i].value) {
this.tags.splice(i, 1);
this.formInline.organization.splice(
this.formInline.organization.indexOf(tag.value),
1
);
break;
}
}
},
getMoreRegion() {
let http = new Promise((resolve, reject) => {
let req = {
provinceId: 350
};
vm.GET("basic-data/position/cities", req).then(res => {
resolve(res);
});
});
console.log("http值", http);
return http;
},
//获取地区
getRegionOption() {
this.optionsRegion = operationData.getRegionOption();
// this.optionsRegion = operationData.getRegionOption();
let req = {};
openLoading(vm);
vm.GET("basic-data/position/provinces", req).then(res => {
closeLoading(vm);
if (res.code == "000000") {
this.optionsRegion = operationData.setRegionOption(
res.data.provinceList
);
// console.log("this.optionsRegion", this.optionsRegion);
}
});
},
getOrganizationList() {
this.organizationList = [
// {
// label: "全部",
// value: 0
// },
// {
// label: "西湖区第二人民医院",
// value: 66
// },
// {
// label: "杭州市中医院",
// value: 233
// },
// {
// label: "仁济医院",
// value: 999
// }
];
let countyId = vm.formInline.region[vm.formInline.region.length - 1];
let req = {
projectId: vm.projectId,
countyId: countyId
};
openLoading(vm);
vm.reportGET("report/portal/getOrganizationList", req).then(res => {
closeLoading(vm);
if (res.code == "000000") {
this.organizationList = operationData.getLearnOrganization(
res.data.hospitalList
);
}
});
},
getOrganizationNum() {
//选择全部
let num = 0;
if (this.tags.length == 0) {
return;
}
if (this.tags[0].value == 0) {
num = this.organizationList.length - 1;
return num;
}
//没有选择全部
num = this.tags.length;
return num;
},
closeSearch() {
vm.dialogUpdate = false;
vm.search();
},
search() {
//console.log(this.formInline,this.activeName);
// console.log(this.formInline,this.activeName);
if (this.activeName == "first") {
this.organizationNum = this.getOrganizationNum();
// console.log('this.organizationNum',this.organizationNum)
this.$nextTick(function() {
this.$refs.childPart.$emit("search");
});
} else if (this.activeName == "second") {
this.$refs.childCrowd.$emit("search");
} else if (this.activeName == "third") {
this.$refs.childCourse.$emit("search");
} else if (this.activeName == "fourth") {
} else if (this.activeName == "fifth") {
this.$refs.childExam.$emit("search");
}
},
//重置
resetForm() {
vm.formInline = Object.assign(
{},
{
region: [],
date: "",
organization: [],
checked: false,
pageNo: 1,
pageSize: 10,
}
);
vm.tags = [];
if (this.activeName == "first") {
this.$refs.childPart.$emit("reset");
} else if (this.activeName == "second") {
this.$refs.childCrowd.$emit("reset");
} else if (this.activeName == "third") {
this.$refs.childCourse.$emit("reset");
} else if (this.activeName == "fourth") {
this.$refs.childExam.$emit("reset");
}
},
reset() {},
exportExcel() {
console.log('excel');
if (vm.formInline.region.length == 0) {
vm.$message("请选择地区");
return;
}
//按钮置灰三秒
vm.exportStatus = true;
setTimeout(function() {
vm.exportStatus = false;
},3000);
this.dialogVisible = true;
//download接口
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,checkAll),
originalFlag: vm.formInline.checked == false ? 0 : 1,
projectName: vm.$route.query.projectName,
cityName: vm.getCityName(),
};
openLoading(vm);
vm.reportGET("report/downLoad/downLoad", req).then(res => {
closeLoading(vm);
// console
if (res.code == "000000") {
}
});
},
getCityName() {
let city = '';
let region = vm.dialogData.region;
console.log('region',region,typeof region,region == '');
if(region != '') {
city = region.split(' / ').join('');
console.log('city',city);
}
return city;
},
toDownload() {
let checkAll = operationData.hasAll(vm.formInline.organization)
let routerData = {
// projectId : vm.projectId,
projectId : '',
};
vm.$router.push({ path: "export-download", query: routerData });
},
update() {},
release() {},
setDialogData() {
//传递给dialog数据
this.dialogData.organization = "";
for (let x = 0; x < this.tags.length; x++) {
this.dialogData.organization += this.tags[x].label + "、";
}
let len = this.dialogData.organization.length;
this.dialogData.organization = this.dialogData.organization.substring(
0,
len - 1
);
},
changeDate() {
this.$router.push('/data-alignment')
if (vm.formInline.region.length == 0) {
vm.$message("请选择地区");
return;
}
this.setDialogData();
this.dialogUpdate = true;
this.$nextTick(function() {
this.$refs.childAlignment.$emit("search");
});
}
}
};
</script>
<style lang="scss">
.course-analysis-wrap {
.item-list-wrap {
.component-content {
background: #fff;
// background: #fff;
padding: 10px;
.header-title {
padding: 10px 12px;
......@@ -201,8 +546,20 @@ export default {
color: #449284;
border-bottom: 1px solid #efefef;
}
.item-form {
padding: 10px;
background: #fff;
width:100%;
border-radius: 4px;
}
.form-button {
width: 45%;
top: -120px;
position: relative;
left: 50%;
}
.button-group {
// position: absolute;
position: relative;
// right: 100px;
float: right;
margin-right: 20px;
......@@ -211,11 +568,26 @@ export default {
font-size: 12px;
margin-bottom: 20px;
}
.item-tab {
width: 95%;
height: 46px;
background: #F0F2F5;
position: absolute;
}
.el-tabs__item.is-active {
color: #409eff;
}
.el-tabs__header {
width: 81%;
width: 65%;
}
.el-tabs__nav-wrap::after {
height: 0px;
}
.tag-group {
margin-left: 78px;
.el-tag {
margin-right: 20px;
}
}
}
}
......
<template>
<div class="part-in-wrap">
<div v-show="!showData" class="empty">
<p>"没有相关数据,请重新选择查询范围"</p>
</div>
<div v-for="(item , index) in cardData" :key="index" class>
<el-card class="box-card">
<div slot="header" class="title">
<span class="weight">{{ item.title }}</span>
</div>
<div class="box-content">
<span class="weight">{{ item.num }}</span>
</div>
</el-card>
<div class="line"></div>
</div>
<div v-if="showChart" class="charts" id="rankChart" ref="rankChart"></div>
<!-- <div class="charts" id="age" ref="age"></div> -->
<el-table
v-if="showTable"
v-show="organizationNum < 2"
:data="finishDetail"
class="project-table"
style="width: 100%;margin-bottom: 30px;"
border
>
<el-table-column prop="name" label="姓名" align="center"></el-table-column>
<el-table-column prop="departmentName" label="科室" align="center"></el-table-column>
<el-table-column prop="joinStatus" label="是否参与项目" align="center">
<template slot-scope="scope">{{ scope.row.joinStatus | partJoin }}</template>
</el-table-column>
<el-table-column prop="projectStatus" label="是否完成项目" align="center">
<template slot-scope="scope">{{ scope.row.projectStatus | partFinish }}</template>
</el-table-column>
<el-table-column prop="finishTime" label="完成项目日期" align="center">
<template slot-scope="scope">{{ scope.row.finishTime }}</template>
</el-table-column>
<div slot="empty">
<div class="table-empty">
<img src="../../assets/image/no-content1.png">
<p>没有相关数据,请重新选择查询范围</p>
</div>
</div>
</el-table>
</div>
</template>
<script>
import { openLoading, closeLoading } from "../../utils/utils";
import * as commonUtil from "../../utils/utils";
import * as operationData from "../../utils/operation";
import echarts from "echarts";
import { setTimeout } from "timers";
let vm = null;
export default {
props: {
formInline: {
type: Object
},
activeName: {
type: String
},
organizationNum: {
type: Number
},
organizationList: {
type: Array
}
},
data() {
return {
// 只有一个机构时显示人员完成情况
projectId: "",
finishDetail: [],
cardData: [],
showChart: false,
showTable: false,
showData: false,
};
},
created() {
vm = this;
this.projectId = vm.getUrlSearch(window.location.href, "id");
},
mounted: function() {
// commonUtil.resizeHeight();
this.$on("search", () => {
this.search();
});
this.$on("init", () => {
this.$nextTick(function() {
if (vm.formInline.region.length != 0) {
this.search();
}
});
});
this.$on("reset", () => {
this.showData = false;
this.showChart = false;
this.showTable = false;
this.finishDetail = [];
this.cardData = [];
});
// if (this.activeName == "first") {
// this.updateResize();
// }
},
methods: {
search() {
if (vm.formInline.region.length == 0) {
vm.$message("请选择地区");
return;
}
let checkAll = operationData.hasAll(vm.formInline.organization)
console.log(vm.formInline,checkAll,vm.organizationList);
let req = {
projectId: vm.projectId,
ids: operationData.getIds(vm.formInline,vm.organizationList,checkAll),
type: operationData.getSearchType(vm.formInline,checkAll),
originalFlag: vm.formInline.checked == false ? 0 : 1
};
console.log("1 req", req);
openLoading(vm);
vm.reportGET("report/portal/getParticipateInfo", req).then(res => {
closeLoading(vm);
if (res.code == "000000") {
this.getCardData(res.data);
vm.showData = true;
if(res.data.participateHospitalCount == 0 && res.data.participatePeopleCount == 0) {
vm.$message("没有相关数据,请重新选择查询范围");
}
} else {
vm.$message(res.message);
}
});
vm.reportGET("report/portal/top", req).then(res => {
closeLoading(vm);
if (res.code == "000000") {
this.getRank(res.data);
this.getTableData(res.data);
}
});
},
updateResize() {
this.$nextTick(function() {
let chartRank = echarts.init(document.getElementById("rankChart"));
window.onresize = function() {
chartRank.resize();
};
});
},
getTableData(data) {
if (vm.formInline.region.length == 3 && vm.organizationNum == 1) {
vm.showTable = true;
vm.finishDetail = data.hospitalPeopleList;
} else {
vm.showTable = false;
}
},
getRank(data) {
let xAxisData = [];
let seriesData = [];
for (let i = 0; i < data.top.length; i++) {
xAxisData[i] = data.top[i].name;
seriesData[i] = data.top[i].percentage;
}
if(vm.organizationNum == 1 || xAxisData.length <= 1) {
vm.showChart = false;
}
if (xAxisData.length > 1 && vm.organizationNum !=1) {
vm.showChart = true;
setTimeout(function() {
let myChart = echarts.init(vm.$refs.rankChart);
let optionValue = operationData.getRank(xAxisData, seriesData);
myChart.setOption(optionValue);
vm.updateResize();
}, 200);
}
},
getCardData(data) {
vm.cardData = [
{
title: "应参与机构数",
num: data.participateHospitalCount,
},
{
title: "已参与机构数",
num: data.hasParticipateHospitalCount,
},
{
title: "应参与人数",
num: data.participatePeopleCount,
},
{
title: "已参与人数",
num: data.hasParticipatePeopleCount,
},
{
title: data.type == 1 ? "项目完成人数" : "项目获证人数",
num: data.acquireCertificatePeopleCount,
},
];
if(data.manyCertificate != null) {
for(let i=0;i<data.manyCertificate.length;i++) {
let obj = {
title: data.manyCertificate[i].name,
num: data.manyCertificate[i].value,
}
if(obj.title != null) {
vm.cardData.push(obj);
}
}
}
// vm.cardData[0].num = data.participateHospitalCount;
// vm.cardData[1].num = data.participatePeopleCount;
// vm.cardData[2].num = data.hasParticipatePeopleCount;
// vm.cardData[3].num = data.acquireCertificatePeopleCount;
},
}
};
</script>
<style lang='scss'>
.part-in-wrap {
background: #fff;
overflow: hidden;
// padding: 10px;
.empty {
height: 300px;
line-height: 300px;
color: #FF3399;
text-align: center;
}
.el-card {
border-width: 0px;
}
.el-card.is-always-shadow {
box-shadow: 0 0 0 0 rgba(0, 0, 0, 0.1);
}
.line {
background: #e4e4e4;
height: 80px;
width: 1px;
float: left;
margin-top: 20px;
}
.box-card {
width: 13%;
margin-right: 1%;
font-size: 14px;
float: left;
.el-card__header {
border-bottom-width: 0;
}
.title {
text-align: center;
}
.box-content {
text-align: center;
height: 40px;
font-size: 15px;
}
}
.charts {
top: 20px;
margin-left: 10%;
width: 80%;
border-radius: 4px;
border: 1px solid #ebeef5;
background-color: #fff;
overflow: hidden;
color: #303133;
-webkit-transition: 0.3s;
transition: 0.3s;
box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.1);
height: 600px;
background: #fff;
padding: 20px;
}
.project-table {
top: 15px;
background: #fff;
}
}
</style>
<template>
<div class="name-list">
<el-card class="where">
<p>地区: {{params.address}}</p>
<p>选择机构: {{params.pregress}}</p>
<el-row :gutter="20" class="input-box">
<el-col :span="12" :offset="6">
<el-input placeholder="查询姓名" v-model="name" class="input-search">
<el-button slot="append" class="search-btn" type="primary">查询</el-button>
</el-input>
</el-col>
</el-row>
</el-card>
<el-card>
<el-table :data="joinData" style="width: 100%">
<el-table-column prop="name" label="姓名" min-width="80" align="center"></el-table-column>
<el-table-column prop="sex" label="性别" min-width="100" align="center"></el-table-column>
<el-table-column prop="age" label="年龄" min-width="80" align="center"></el-table-column>
<el-table-column prop="title" label="职称" min-width="80" align="center"></el-table-column>
<el-table-column prop="duty" label="职务" min-width="80" align="center"></el-table-column>
<el-table-column prop="pregress" label="机构" min-width="200" align="center"></el-table-column>
<el-table-column prop="region" label="地区" min-width="80" align="center"></el-table-column>
<el-table-column prop="join" label="是否参与考试" min-width="80" align="center"></el-table-column>
<el-table-column prop="pass" label="是否通过考试" min-width="80" align="center"></el-table-column>
<el-table-column prop="paddTime" label="通过考试日期" min-width="80" align="center"></el-table-column>
<el-table-column prop="level" label="考试成绩等级" min-width="80" align="center"></el-table-column>
<div class="name-list-wrap">
<bread-crumb :curmbFirst="curmbFirst" :curmbSecond="curmbSecond" :curmbThird="curmbThird" :curmbFouth="curmbFouth" :jumPathThird="jumPathThird" :jumPathFouth="jumPathFouth"></bread-crumb>
<div class="component-content screenSet" id="screenSet">
<p class="course-p">地区:{{ queryData.region }}</p>
<p class="course-p">选择机构:{{ queryData.organization }}</p>
<el-form
class="form-update"
ref="serchForm"
:model="formData"
label-width="100px"
style="width:40%;"
>
<el-form-item v-if="tableType == 1" label="课程完成状态:">
<el-select
v-model="formData.learnFlag"
size="small"
style="width: 100%;"
placeholder="请选择状态"
>
<el-option
v-for="(item,index) in statusList"
:key="index"
:label="item.label"
:value="item.value"
></el-option>
</el-select>
</el-form-item>
<el-form-item v-if="tableType == 2" label="考试成绩等级:">
<el-select v-model="formData.gradeFlag" size="small" style="width: 100%;" placeholder="请选择状态">
<el-option
v-for="(item,index) in rankList"
:key="index"
:label="item.gradeName"
:value="item.gradeFlag"
></el-option>
</el-select>
</el-form-item>
<el-form-item label="查询姓名: ">
<el-input size="small" placeholder="查询姓名" v-model="formData.doctorName"></el-input>
</el-form-item>
</el-form>
<div class="form-button">
<el-button @click="searchData()" type="primary">查询</el-button>
<el-button @click="resetForm()">重置</el-button>
</div>
<el-table :data="tableData" class="course-table">
<el-table-column prop="doctorName" label="姓名" align="center"></el-table-column>
<el-table-column prop="sex" label="性别" align="center"></el-table-column>
<el-table-column prop="age" label="年龄" align="center"></el-table-column>
<el-table-column prop="titleName" label="职称" align="center"></el-table-column>
<el-table-column prop="hospitalName" label="机构" align="center"></el-table-column>
<el-table-column prop="addressName" label="地区" align="center"></el-table-column>
<el-table-column v-if="tableType == 1" prop="learnStatus" label="参与课程状态" align="center">
<template slot-scope="scope">
<span>{{ scope.row.learnStatus }}</span>
</template>
</el-table-column>
<el-table-column
v-if="tableType == 1"
prop="finishedTime"
label="完成培训日期"
align="center"
min-width="150"
>
<template slot-scope="scope">
<span>{{ scope.row.finishedTime }}</span>
</template>
</el-table-column>
<el-table-column
v-if="tableType == 2"
prop="passTime"
label="通过考试日期"
min-width="150"
align="center"
>
<template slot-scope="scope">
<span>{{ scope.row.passTime }}</span>
</template>
</el-table-column>
<el-table-column
v-if="tableType == 2"
prop="gradeName"
label="考试成绩等级"
min-width="80"
align="center"
>
<template slot-scope="scope">
<span>{{ scope.row.gradeName }}</span>
</template>
</el-table-column>
<div slot="empty">
<div class="table-empty">
<img src="../../assets/image/no-content1.png">
<p>没有查询到相关结果</p>
<p>没有相关数据,请重新选择查询范围</p>
</div>
</div>
</el-table>
</el-card>
<!-- 分页 -->
<div class="pagination">
<el-pagination
background
@size-change="handleSizeChange"
@current-change="handleCurrentChange"
:current-page="searchParam.pageNo"
:page-sizes="[15, 30, 50, 100, 200, 500, 700, 1000, 1500, 2000]"
:page-size="searchParam.pageSize"
:current-page="formData.pageNo"
:page-sizes="[10, 30, 50]"
:page-size="formData.pageSize"
layout="total, sizes, prev, pager, next, jumper"
:total="totalRows"
></el-pagination>
</div>
</div>
</div>
</template>
<script>
import BreadCrumb from "../../components/breadcrumb.vue";
import { create } from "domain";
import { mapGetters } from "vuex";
import { openLoading, closeLoading } from "../../utils/utils";
import * as commonUtil from "../../utils/utils";
import * as operationData from "../../utils/operation";
let vm = null;
export default {
components: {
BreadCrumb
},
props: {
formInline: {
type: Object
}
},
data() {
return {
params: {
address: "浙江省/杭州市/西湖区",
pregress: "杭州市中医院、杭州市第七人民医院"
curmbFirst: "学情报告",
curmbSecond: "项目管理",
curmbThird: "",
curmbFouth: "",
jumPathThird: "/report-list",
jumPathFouth: "",
formData: {
doctorName: "",
learnFlag: -1,
gradeFlag: -1,
pageNo: 1,
pageSize: 10,
},
region: "",
organization: "",
tableData: [],
tableType: 1,
totalRows: 0,
statusList: [
{
value: -1,
label: "全部"
},
name: "",
joinData: [{
name: 'asd',
sex: '男',
age: 30,
title: '主任医师',
duty: '医生',
pregress: '上海市复旦大学附属华山医院',
region: '上海市徐汇区',
join: '是',
pass: '是',
paddTime: '2019-10-10',
level: '合格'
}],
totalRows: 0, //数据总数
searchParam: {
pageNo: 1, //当前是第几页
pageSize: 20 //页面总数
{
value: 0,
label: "未参与"
},
{
value: 1,
label: "参与中"
},
{
value: 2,
label: "已完成"
}
],
rankList: [],
queryData: {}
};
},
// computed: {
// ...mapGetters([
// "_token",
// ])
// },
created() {
vm = this;
vm.getInitData();
vm.search();
},
mounted: function() {
commonUtil.resizeHeight();
},
methods: {
// 搜索列表
search(flag) {
if(flag) vm.searchParam.pageNo = 1
getHostital() {
let req = {
projectId: vm.queryData.projectId,
hospitalIds: vm.queryData.ids,
};
vm.reportGET("report/portal/getHostitalName", req).then(res => {
if (res.code == "000000") {
}
});
},
getInitData() {
vm.queryData = this.$route.query;
vm.tableType = vm.queryData.tableType;
vm.curmbThird = vm.getUrlSearch(window.location.href, "projectName");
vm.jumPathFouth = '/item-list?id=' + vm.queryData.projectId + '&projectName=' + vm.queryData.projectName;
console.log("queryData", vm.queryData);
if(vm.queryData.type == 4) {
vm.getHostital();
}
},
searchData() {
vm.formData.pageNo = 1;
vm.search();
},
search() {
let query = this.queryData;
if (this.tableType == 1) {
vm.curmbFouth = "课程培训情况";
//课程分析
// console.log('this.tableType',this.tableType)
let req = {
projectId: query.projectId,
originalFlag: query.originalFlag,
ids: query.ids,
type: query.type,
courseId: query.courseId,
learnFlag: vm.formData.learnFlag,
doctorName: vm.formData.doctorName,
pageNo: vm.formData.pageNo,
pageSize: vm.formData.pageSize,
};
console.log("course req", req);
openLoading(vm);
let params = {};
vm.GET(url, params).then(res => {
vm.reportGET("report/portalProjectCourse/getUserList", req).then(res => {
closeLoading(vm);
if (res.code == "000000") {
if(res.data.totalCount == 0 ) {
vm.$message("没有相关数据,请重新选择查询范围");
}
vm.tableData = res.data.list;
vm.totalRows = res.data.totalCount;
} else {
vm.$message.info(res.message);
vm.$message(res.message);
}
});
},
// 重置搜索信息
resetMessage() {
this.selectProgress = {
status: "",
name: ""
} else if (this.tableType == 2) {
vm.curmbFouth = "考试培训情况";
//考试分析
let reqRank = {
projectId: query.projectId,
}
vm.reportGET("report/portalProjectExam/getGradeList", reqRank).then(res => {
if (res.code == "000000") {
vm.rankList = operationData.initRank(res.data.list);
}
});
let req = {
projectId: query.projectId,
originalFlag: query.originalFlag,
ids: query.ids,
type: query.type,
examId: query.examId,
gradeFlag: vm.formData.gradeFlag,
doctorName: vm.formData.doctorName,
pageNo: vm.formData.pageNo,
pageSize: vm.formData.pageSize,
};
console.log("exam req", req);
openLoading(vm);
vm.reportGET("report/portalProjectExam/getUserList", req).then(res => {
closeLoading(vm);
if (res.code == "000000") {
if(res.data.totalCount == 0 ) {
vm.$message("没有相关数据,请重新选择查询范围");
}
vm.tableData = res.data.list;
vm.totalRows = res.data.totalCount;
} else {
vm.$message(res.message);
}
});
}
},
resetForm() {
vm.formData = Object.assign(
{},
{
doctorName: "",
learnFlag: -1,
gradeFlag: -1,
pageNo: 1,
pageSize: 10,
}
);
vm.search();
},
// 更改数据显示数量
handleSizeChange(val) {
console.log(`每页 ${val} 条`);
vm.searchParam.pageSize = val
vm.search()
this.formData.pageSize = val;
this.search();
},
// 换页
handleCurrentChange(val) {
console.log(`当前页: ${val}`)
vm.searchParam.pageNo = value
vm.search()
},
console.log(`当前页: ${val}`);
this.formData.pageNo = val;
this.search();
}
}
};
</script>
<style lang='scss' rel='stylesheet/scss'>
.name-list {
.where {
p {
line-height: 40px;
}
.input-box {
margin-top: 40px;
.search-btn {
color: #fff;
border: none;
<style lang="scss">
.name-list-wrap {
.component-content {
background: #fff;
padding: 10px;
.header-title {
padding: 10px 12px;
font-size: 12px;
color: #449284;
border-bottom: 1px solid #efefef;
}
.course-p {
margin: 30px 0 20px 30px;
font-size: 13px;
color: #606266;
}
.form-update {
margin: 30px 0px 0px 20px;
}
.form-button {
width: 45%;
top: -62px;
position: relative;
left: 50%;
}
}
}
......
<template>
<div class="part-in">
<el-card>
<el-table :data="reportDetail" style="width: 100%">
<el-table-column prop="coverOrganizationNum" label="项目覆盖机构数" align="center"></el-table-column>
<el-table-column prop="coverPeopleNum" label="项目覆盖人数" align="center"></el-table-column>
<el-table-column prop="joinPeopleNum" label="项目参与人数" align="center"></el-table-column>
<el-table-column prop="finishPeopleNum" label="项目完成人数" align="center"></el-table-column>
<el-table-column prop="goodPeopleNum" label="成绩优秀人数" align="center"></el-table-column>
<el-table-column prop="standardPeopleNum" label="成绩合格人数" align="center"></el-table-column>
<div slot="empty">
<div class="table-empty">
<img src="../../assets/image/no-content1.png">
<p>没有查询到相关结果</p>
</div>
</div>
</el-table>
</el-card>
<div class="charts" ref="chartsBox" v-show="isShowEcharts"></div>
<el-card class="finish-table" v-show="!isShowEcharts">
<el-table :data="finishDetail" style="width: 100%" border>
<el-table-column prop="name" label="姓名" align="center"></el-table-column>
<el-table-column prop="desk" label="科室" align="center"></el-table-column>
<el-table-column prop="join" label="是否参与项目" align="center"></el-table-column>
<el-table-column prop="finish" label="是否完成项目" align="center"></el-table-column>
<el-table-column prop="endTime" label="完成项目日期" align="center"></el-table-column>
</el-table>
</el-card>
</div>
</template>
<script>
import { openLoading, closeLoading } from "../../utils/utils"
const echarts = require("echarts")
let vm;
export default {
data() {
return {
reportDetail: [
{
// 报告详情数据
coverOrganizationNum:2,
coverPeopleNum: 0,
joinPeopleNum: 0,
finishPeopleNum: 0,
goodPeopleNum: 0,
standardPeopleNum: 0
}
],
// 图表数据
chartOption: {
xAxisData: ["周一", "周二", "周三", "周一", "周二", "周三"],
seriesPass: [120, 132, 101, 120, 132, 101],
seriesJoin: [220, 182, 191, 220, 182, 191]
},
// 只有一个机构时显示人员完成情况
finishDetail:[{
name: '',
desk: '',
join: '是',
finish: '是',
endTime: '12-12-12'
}],
};
},
computed: {
isShowEcharts() {
return vm.reportDetail[0].coverOrganizationNum > 1
}
},
created() {
vm = this;
},
mounted() {
vm.initEcharts();
},
methods: {
// 初始化图表
initEcharts() {
openLoading(vm);
let myChart = echarts.init(vm.$refs["chartsBox"])
myChart.setOption(vm.initEchartOption(vm.chartOption))
closeLoading(vm)
},
// 图表参数
initEchartOption(params) {
// 图表相关的数据
let option = {
color: ['#1E90FF','#32CD32'],
title: {
text: "排行榜",
x: "left",
textStyle: {
//主标题文本样式{"fontSize": 18,"fontWeight": "bolder","color": "#333"}
fontSize: 20,
fontStyle: "normal",
fontWeight: "normal",
color: "#000"
}
},
tooltip: {
trigger: "axis",
axisPointer: {
// 坐标轴指示器,坐标轴触发有效
type: "shadow" // 默认为直线,可选为:'line' | 'shadow'
}
},
legend: {
data: ["完成人数", "参与人数"],
bottom: 0
},
grid: {
left: "3%",
right: "4%",
bottom: "10%",
containLabel: true
},
xAxis: [
{
type: "category",
data: params.xAxisData
}
],
yAxis: [
{
type: "value"
}
],
series: [
{
name: "完成人数",
type: "bar",
stack: "人数",
barMaxWidth: "80",
data: params.seriesPass
},
{
name: "参与人数",
type: "bar",
stack: "人数",
barMaxWidth: "80",
data: params.seriesJoin
}
]
}
return option
}
}
};
</script>
<style lang='scss' rel='stylesheet/scss'>
.part-in {
.charts {
border-radius: 4px;
border: 1px solid #ebeef5;
background-color: #fff;
overflow: hidden;
color: #303133;
-webkit-transition: 0.3s;
transition: 0.3s;
box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.1);
height: 600px;
background: #fff;
margin-top: 50px;
padding: 20px;
}
.finish-table {
margin-top: 30px;
background: #fff;
}
}
</style>
......@@ -3,11 +3,11 @@
<bread-crumb :curmbFirst="curmbFirst" :curmbSecond="curmbSecond"></bread-crumb>
<div class="itemlist-content screenSet" id="screenSet">
<el-row :gutter="30" class="row" type="flex" style="margin-top: 10px;">
<el-form ref="serchForm" :model="selectProgress" label-width="75px" style="width:100%;">
<el-form ref="serchForm" :model="formData" label-width="75px" style="width:100%;">
<el-col :span="6">
<el-form-item label="项目状态:">
<el-select
v-model="selectProgress.status"
v-model="formData.status"
size="small"
style="width: 100%;"
placeholder="请选择项目状态"
......@@ -23,47 +23,56 @@
</el-col>
<el-col :span="6">
<el-form-item>
<el-input v-model="selectProgress.name" size="small" placeholder="请输入项目名称"></el-input>
<el-input v-model="formData.name" size="small" placeholder="请输入项目名称">
<i slot="suffix" class="el-icon-search"></i>
</el-input>
</el-form-item>
</el-col>
<el-col :span="12" style="padding:0;text-align:right;padding-right:15px;">
<el-button type="default" size="small" @click="resetMessage" style="margin-left:0;">重置</el-button>
<el-button type="primary" size="small" @click="search(1)">查询</el-button>
<el-button type="primary" size="small" @click="searchData()">查询</el-button>
<el-button type="default" size="small" @click="resetForm()" style="margin-left:0;">重置</el-button>
</el-col>
</el-form>
</el-row>
<el-table :data="tableData" style="width: 100%">
<el-table-column prop="name" label="项目名称" min-width="200" align="center"></el-table-column>
<el-table-column prop="status" label="项目状态" min-width="100" align="center"></el-table-column>
<el-table-column prop="startTime" label="开始时间" min-width="80" align="center"></el-table-column>
<el-table-column prop="endTime" label="结束时间" min-width="80" align="center"></el-table-column>
<el-table-column prop="projectName" label="项目名称" min-width="200" align="center"></el-table-column>
<el-table-column prop="timeStatus" label="项目状态" min-width="80" align="center">
<template slot-scope="scope">
{{ scope.row.timeStatus | reportStatus }}
</template>
</el-table-column>
<el-table-column prop="projectBegintime" label="开始时间" min-width="160" align="center">
<template slot-scope="scope">{{ scope.row.projectBegintime }}</template>
</el-table-column>
<el-table-column prop="projectEndtime" label="结束时间" min-width="160" align="center">
<template slot-scope="scope">{{ scope.row.projectEndtime }}</template>
</el-table-column>
<el-table-column label="操作" fixed="right" align="center" min-width="200">
<template slot-scope="scope">
<el-button type="text" size="small" @click="go(scope.row)">查看学情报告</el-button>
<el-button style="color:#509284" type="text" size="small" @click="go(scope.row)">查看学情报告</el-button>
</template>
</el-table-column>
<div slot="empty">
<div class="table-empty">
<img src="../../assets/image/no-content1.png">
<p>没有查询到相关结果</p>
<img src="../../assets/image/no-content1.png" />
<p>没有找到符合的结果</p>
</div>
</div>
</el-table>
</div>
<!-- 分页 -->
<div class="pagination">
<el-pagination
background
@size-change="handleSizeChange"
@current-change="handleCurrentChange"
:current-page="searchParam.pageNo"
:page-sizes="[15, 30, 50, 100, 200, 500, 700, 1000, 1500, 2000]"
:page-size="searchParam.pageSize"
:current-page="formData.pageNo"
:page-sizes="[10, 30, 50]"
:page-size="formData.pageSize"
layout="total, sizes, prev, pager, next, jumper"
:total="totalRows"
></el-pagination>
</div>
</div>
</div>
</template>
<script>
import { mapGetters } from "vuex";
......@@ -77,37 +86,31 @@ export default {
return {
curmbFirst: "学情报告",
curmbSecond: "项目列表",
selectProgress: {
formData: {
//搜索信息
status: "",
name: ""
name: "",
pageNo: 1, //当前是第几页
pageSize: 10 //页面总数
},
statusSelect: [
//项目状态
{
label: "全部",
value: ""
},
{
label: "进行中",
value: "1"
value: 1
},
{
label: "已结束",
value: "2"
}
],
tableData: [
// table数据
{
name: "one",
status: "进行中",
startTime: "12-12-12",
endTime: "23-23-23"
value: 2
}
],
tableData: [],
totalRows: 0, //数据总数
searchParam: {
pageNo: 1, //当前是第几页
pageSize: 20 //页面总数
}
idType: '',
};
},
components: {
......@@ -115,48 +118,65 @@ export default {
},
created() {
vm = this;
vm.idType = localStorage.getItem('storageIdType');
vm.search();
},
// 挂载到Dom完成时
mounted: function() {
commonUtil.resizeHeight();
},
methods: {
searchData() {
vm.formData.pageNo = 1;
vm.search();
},
// 搜索列表
search(flag) {
if(flag) vm.searchParam.pageNo = 1
openLoading(vm)
let params = {}
vm.GET(url, params).then(res => {
search() {
let req = {};
req = this.formData;
openLoading(vm);
vm.GET("portal/portalInfo/getPortalReportProject", req).then(res => {
closeLoading(vm);
if (res.code == "000000") {
if(res.data.totalRows == 0) {
vm.$message("没有找到符合的结果");
}
vm.tableData = res.data.projectList;
vm.totalRows = res.data.totalRows;
} else {
vm.$message.info(res.message)
vm.$message(res.message);
}
})
});
},
// 重置搜索信息
resetMessage() {
this.selectProgress = {
resetForm() {
this.formData = {
status: "",
name: ""
name: "",
pageNo: 1, //当前是第几页
pageSize: 10 //页面总数
};
vm.search()
vm.search();
},
// 更改数据显示数量
handleSizeChange(val) {
console.log(`每页 ${val} 条`)
vm.searchParam.pageSize = val
vm.search()
console.log(`每页 ${val} 条`);
vm.formData.pageSize = val;
vm.search();
},
// 换页
handleCurrentChange(val) {
console.log(`当前页: ${val}`)
vm.searchParam.pageNo = value
vm.search()
console.log(`当前页: ${val}`);
vm.formData.pageNo = val;
vm.search();
},
//跳转到报告详情页
go(row) {
vm.$router.push({path:"/item-list",params: row})
let routerData = {
id: row.id,
projectName: row.projectName,
};
vm.$router.push({ path: "/item-list" , query: routerData });
}
}
};
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册