diff --git a/src/api/indexOvervoew.js b/src/api/indexOvervoew.js index 1d4353c8..8eafa8a5 100644 --- a/src/api/indexOvervoew.js +++ b/src/api/indexOvervoew.js @@ -8,7 +8,7 @@ export const boeuExamPageList = (obj) => http.post('/boeu/exam/pageList', obj) //概览页面案例列表请求接口 export const boeuCasePageList = (obj) => http.post('/boeu/case/pageList', obj) // 请求组织接口 -export const userGetUserOrg = (obj) => http.post('/org/getUserOrg', obj) +export const userGetUserOrg = (obj) => https.get(`/organization/all/tree`,obj) // 请求所属组织接口 export const userInfo = (obj) => https.post('/user/info', obj) // 课程列表接口 @@ -21,6 +21,8 @@ export const boeuRoterPageList = (obj) => http.post('/boeu/router/pageList', obj export const boeuProjectPageList = (obj) => http.post('/boeu/project/pageList', obj) // 学习数据列表 export const boeuStudyDataPageList = (obj) => http.post('/boeu/studyData/pageList', obj) +// 考试列表分页 +export const boeuExamPageListV2 = (obj) => http.post('/boeu/exam/pageList/v2', obj ) // 概览页面 tab头数据 export const boeuAllTotal = (obj) => http.get('/boeu/all/total', obj) // 路径图列表 diff --git a/src/api/indexProject.js b/src/api/indexProject.js index e3aafe5f..7807ef11 100644 --- a/src/api/indexProject.js +++ b/src/api/indexProject.js @@ -1,7 +1,7 @@ import http from "./configz"; import https from './confign' // 请求组织接口 -export const userGetUserOrg = (obj) => https.post('/user/getUserOrg', obj) +export const userGetUserOrg = (obj) => https.get('/organization/all/tree', obj) // 请求所属组织接口 export const userInfo = (obj) => https.post('/user/info', obj) // 项目列表 diff --git a/src/components/NavLeft.vue b/src/components/NavLeft.vue index b5f391b2..4d2fa72d 100644 --- a/src/components/NavLeft.vue +++ b/src/components/NavLeft.vue @@ -423,7 +423,7 @@ 下载中心 - + - + 运营数据概览 - + - + 学习路径图 - + 项目 - + 课程 - + 案例 - + 文章 - + 问答 - + 考试 - + - + 概览 - + 问答 - 旧版 + + 旧版 + 业务 diff --git a/src/views/report/Caseess.vue b/src/views/report/Caseess.vue index 3c82db44..fee940ef 100644 --- a/src/views/report/Caseess.vue +++ b/src/views/report/Caseess.vue @@ -3,6 +3,22 @@
+
+ + +
+
+ +
@@ -100,9 +125,11 @@ import * as api from "../../api/indexOvervoew"; import downLoad from "../../utils/downLoad"; import Cookies from "vue-cookies"; import axios from "axios"; +import {useStore} from 'vuex' export default { name: "CaseesS", setup() { + const store = useStore(); const state = reactive({ tableLoading: false, // table加载图标 tableDataTotal: 0, // 数据总条数 @@ -112,7 +139,12 @@ export default { title: "", author: "", authorName: "", + publishTime: "", // 发布时间 selectedRowKeys: [], + orgId: null, // 状态值 + option: [], // 组织列表 + allowClear: true, + resetOrgId: [], }); // 表格数据 let tableData = ref([]); @@ -123,15 +155,54 @@ export default { return item.id; }); }; + //请求组织接口 + const getOrgList = async () => { + //todo 获取用户角色列表,判断里面是否有system-admin + // let roleList = store.state.userInfo.roleList; + var manageFlag = false; + for(let i=0;i { @@ -207,15 +299,19 @@ export default { const res = await api.boeuCasePlatePageList({ page: state.pageNo, size: state.pageSize, + orgId: state.orgId ? state.orgId[state.orgId.length - 1] : null, title: state.title, author: state.author, authorName: state.authorName, + // publishTime: state.publishTime, + startTime: typeof state.publishTime[0] === 'undefined' ? null : state.publishTime[0]+ " 00:00:00", + endTime: typeof state.publishTime[0] === 'undefined' ? null : state.publishTime[1]+ " 23:59:59", boeRouterInfoName: state.boeRouterInfoName, }); if (res) { console.log(res.data, "res.data"); - state.tableDataTotal = res.data.total; - const list = res.data.rows?.map((item) => { + state.tableDataTotal = res.data.result.total; + const list = res.data.result.rows?.map((item) => { return { key: item.id, ...item, @@ -232,6 +328,7 @@ export default { state.title = ""; state.authorName = ""; state.author = ""; + state.publishTime = []; getTableData(); }; const searchData = async () => { @@ -262,6 +359,9 @@ export default { size: state.pageSize, title: state.title, author: state.author, + // publishTime: state.publishTime, + startTime: typeof state.publishTime[0] === 'undefined' ? null : state.publishTime[0]+ " 00:00:00", + endTime: typeof state.publishTime[0] === 'undefined' ? null : state.publishTime[1]+ " 23:59:59", }; axios({ method: "post", @@ -280,7 +380,8 @@ export default { } }; onMounted(() => { - getTableData(); + getOrgList(); + // getTableData(); state.tableLoading = true; }); return { @@ -313,7 +414,7 @@ export default { .select { margin-right: 20px; margin-bottom: 20px; - width: calc((100% - 76px - 200px) / 2); + width: calc((100% - 76px - 240px) / 4); } .btnz { diff --git a/src/views/report/Curriculum.vue b/src/views/report/Curriculum.vue index f12da051..36586e46 100644 --- a/src/views/report/Curriculum.vue +++ b/src/views/report/Curriculum.vue @@ -3,6 +3,22 @@
+
+ + +
- - +
- - +
@@ -141,9 +151,11 @@ import axios from "axios"; import Cookies from "vue-cookies"; import downLoad from "../../utils/downLoad"; import { message } from "ant-design-vue"; +import {useStore} from 'vuex' export default { name: "CurriculuM", setup() { + const store = useStore(); const state = reactive({ tableLoading: false, // table加载图标 tableDataTotal: 0, // 数据总条数 @@ -154,7 +166,8 @@ export default { name: "", type: null, createName: "", - allowClear: true, + publishTime: "", // 发布时间 + allowClear: false, option: [], selectedRowKeys: [], typeOption:[] @@ -168,15 +181,43 @@ export default { const getOption = async () => {}; //请求组织接口 const getOrgList = async () => { - const result = await api.userGetUserOrg({}); - - if (result) { - state.option = result.data?.result?.list; - state.orgId = result.data?.result?.treeNodeList; - state.resetOrgId = result.data?.result?.treeNodeList; - result.data?.result?.userType === 1 - ? (state.allowClear = true) - : (state.allowClear = false); + var manageFlag = false; + for(let i=0;i { @@ -426,6 +471,9 @@ export default { pageSize: state.pageSize, type: state.type ? state.type[state.type.length - 1]:null, createName: state.createName, + // publishTime: state.publishTime, + startTime: typeof state.publishTime[0] === 'undefined' ? null : state.publishTime[0]+ " 00:00:00", + endTime: typeof state.publishTime[0] === 'undefined' ? null : state.publishTime[1]+ " 23:59:59", }; axios({ method: "post", @@ -473,6 +521,9 @@ export default { pageSize: state.pageSize, type: state.type ? state.type[state.type.length - 1]:null, createName: state.createName, + // publishTime: state.publishTime, + startTime: typeof state.publishTime[0] === 'undefined' ? null : state.publishTime[0]+ " 00:00:00", + endTime: typeof state.publishTime[0] === 'undefined' ? null : state.publishTime[1]+ " 23:59:59", }; axios({ method: "post", @@ -538,6 +589,9 @@ export default { pageSize: state.pageSize, type: state.type ? state.type[state.type.length - 1]:null, createName: state.createName, + // publishTime: state.publishTime, + startTime: typeof state.publishTime[0] === 'undefined' ? null : state.publishTime[0]+ " 00:00:00", + endTime: typeof state.publishTime[0] === 'undefined' ? null : state.publishTime[1]+ " 23:59:59", }; axios({ method: "post", @@ -614,7 +668,7 @@ export default { .select { margin-right: 20px; margin-bottom: 20px; - width: calc((100% - 76px - 240px) / 4); + width: calc((100% - 76px - 220px) / 3); } .btnz { diff --git a/src/views/report/Employeelearning.vue b/src/views/report/Employeelearning.vue index 4a53c9ea..12744ff2 100644 --- a/src/views/report/Employeelearning.vue +++ b/src/views/report/Employeelearning.vue @@ -12,17 +12,18 @@ allowClear > --> + >
@@ -46,14 +47,35 @@
- +
+
+ +
@@ -120,9 +142,11 @@ import { message } from "ant-design-vue"; import Cookies from "vue-cookies"; import axios from "axios"; import downLoad from "../../utils/downLoad"; +import { useStore } from "vuex"; export default { name: "EmployeelearninG", setup() { + const store = useStore(); const state = reactive({ tableLoading: false, // table加载图标 tableDataTotal: 0, // 数据总条数 @@ -136,25 +160,96 @@ export default { selectedRowKeys: [], // 选中的列 ids: [], allowClear:true, - resetOrgId:[] + resetOrgId:[], + valueBand: null, + valueCourseType: null, + optionsBand:[ + {value: 'Band1',label: 'Band1',}, + {value: 'Band2',label: 'Band2',}, + {value: 'Band3',label: 'Band3',}, + {value: 'Band4',label: 'Band4',}, + {value: 'Band5',label: 'Band5',}, + {value: 'Band6',label: 'Band6',}, + {value: 'Band7',label: 'Band7',}, + {value: 'Band8',label: 'Band8',}, + {value: 'Band9',label: 'Band9',}, + {value: 'Band10',label: 'Band10',}, + {value: 'Band11',label: 'Band11',}, + {value: 'Band12',label: 'Band12',}, + {value: 'Band13',label: 'Band13',}, + {value: 'Band14',label: 'Band14',}, + {value: 'Band15',label: 'Band15',}, + {value: 'Band16',label: 'Band16',}, + {value: 'Band17',label: 'Band17',}, + {value: 'Band18',label: 'Band18',}, + {value: 'Band19',label: 'Band19',}, + {value: 'Band20',label: 'Band20',}, + ], + optionsCourseType: [ + { + value: true, + label: '是', + }, + { + value: false, + label: '否', + }, + ], }); + + const focusBand = () => { + console.log('focus band'); + }; + + const handleBandChange = (value) => { + console.log(`selected handleBandChange ${value}`); + state.valueBand = value; + }; + const handleCourseTypeChange = (value) => { + console.log(`selected handleCourseTypeChange ${value}`); + state.valueCourseType = value; + }; // table选中 const onSelectChange = (selectedRowKeys, record) => { state.selectedRowKeys = selectedRowKeys; state.ids = record?.map((item) => { - return item.basicBoeUserId; + return item.id; }); }; //请求组织接口 const getOrgList = async () => { + var manageFlag = false; + for(let i=0;i { axios({ method: "get", - url: "/report/boeu/studyData/export", - params: { ids: `${record.record.basicBoeUserId}` }, + url: "/report/boeu/studyData/exportDetailed", + params: { ids: `${record.record.userId}` }, responseType: "blob", headers: { token: Cookies.get("token"), @@ -325,11 +420,12 @@ export default { userNo: state.userNo, name: state.name, departmentId: state.orgId ? state.orgId[state.orgId.length - 1] : null, - bandCode: state.band, + bandCode: state.valueBand, + hasTeach: state.valueCourseType, }); if (res) { - state.tableDataTotal = res.data.total; - const list = res.data.rows?.map((item) => { + state.tableDataTotal = res.data.result.total; + const list = res.data.result.rows?.map((item) => { return { key: item.id, ...item, @@ -345,6 +441,8 @@ export default { state.name = ""; state.band = ""; state.userNo = ""; + state.valueBand = null; + state.valueCourseType = null; state.orgId = state.resetOrgId; getTableData(); }; @@ -358,7 +456,8 @@ export default { userNo: state.userNo, name: state.name, departmentId: state.orgId ? state.orgId[state.orgId.length - 1] : null, - bandCode: state.band, + bandCode: state.valueBand, + hasTeach: state.valueCourseType, }, responseType: "blob", headers: { @@ -373,6 +472,9 @@ export default { state.tableLoading = true; }); return { + focusBand, + handleBandChange, + handleCourseTypeChange, exportAllbtnz, onSelectChange, exportbtnz, @@ -401,7 +503,7 @@ export default { .select { margin-right: 20px; margin-bottom: 20px; - width: calc((100% - 76px - 240px) / 4); + width: calc((100% - 76px - 220px) / 3); } .btnz { diff --git a/src/views/report/Examination.vue b/src/views/report/Examination.vue index 0ae8ebe3..f0dac1fe 100644 --- a/src/views/report/Examination.vue +++ b/src/views/report/Examination.vue @@ -28,7 +28,7 @@ :options="option" placeholder="请选择组织" v-model:value="orgId" - :allowClear="allowClear" + :allowClear= false style="width: 100%" :fieldNames="{ label: 'name', diff --git a/src/views/report/Learningpathmap.vue b/src/views/report/Learningpathmap.vue index 6f040d21..71ef40fe 100644 --- a/src/views/report/Learningpathmap.vue +++ b/src/views/report/Learningpathmap.vue @@ -5,11 +5,12 @@
+
+ +
@@ -149,6 +159,7 @@ export default { createName: "", // 创建者名称 startTime: "", // 开始时间 endTime: "", // 结束时间 + publishTime: "", // 创建时间 option: [], // 组织列表 boeRouterInfoName: "", // 路径名称 selectedRowKeys: [], // 选中的列 @@ -173,32 +184,60 @@ export default { } //请求组织接口 const getOrgList = async () => { - let params = { - roleList: store.state.userInfo.roleList, - userId: store.state.userInfo.userId + //todo 获取用户角色列表,判断里面是否有system-admin + // let roleList = store.state.userInfo.roleList; + var manageFlag = false; + for(let i=0;i { state.tableLoading = true; state.createName = ""; + state.publishTime = []; state.routerName = ""; state.orgId = state.resetOrgId; state.selectedRowKeys = []; @@ -388,6 +453,9 @@ export default { } else { const params = { createName: state.createName, + // publishTime: state.publishTime, + startTime: typeof state.publishTime[0] === 'undefined' ? null : state.publishTime[0] + " 00:00:01", + endTime: typeof state.publishTime[1] == 'undefined' ? null : state.publishTime[1] + " 23:59:59", routerName: state.routerName, orgId: state.orgId ? state.orgId[state.orgId.length - 1] : null, }; @@ -427,6 +495,9 @@ export default { } else { const params = { createName: state.createName, + // publishTime: state.publishTime, + startTime: typeof state.publishTime[0] === 'undefined' ? null : state.publishTime[0] + " 00:00:01", + endTime: typeof state.publishTime[1] == 'undefined' ? null : state.publishTime[1] + " 23:59:59", routerName: state.routerName, orgId: state.orgId ? state.orgId[state.orgId.length - 1] : null, }; @@ -481,7 +552,7 @@ export default { .select { margin-right: 20px; margin-bottom: 20px; - width: calc((100% - 76px - 220px) / 3); + width: calc((100% - 76px - 240px) / 4); } .btnz { diff --git a/src/views/report/Operational.vue b/src/views/report/Operational.vue index 0afc7969..e7afb448 100644 --- a/src/views/report/Operational.vue +++ b/src/views/report/Operational.vue @@ -68,7 +68,7 @@
学习情况
-
+
导出学习情况
@@ -83,27 +83,27 @@ @change="modalChange" :options="[ { - label: '项目', + label: '课程', value: 1, }, { - label: '学习路径图', + label: '案例', value: 2, }, { - label: '课程', + label: '文章', value: 3, }, { - label: '案例', + label: '问答', value: 4, }, { - label: '文章', + label: '项目', value: 5, }, { - label: '问答', + label: '学习路径图', value: 6, }, ]" @@ -115,8 +115,8 @@ placeholder="请选择日期格式" @change="twoSelectChange" :options="[ - { label: '按日查找', value: 0 }, - { label: '按月查找', value: 1 }, + { label: '按日查找', value: 1 }, + { label: '按月查找', value: 2 }, ]" v-model:value="towParmasn.dateType" > @@ -124,7 +124,7 @@
+
+ +
@@ -152,19 +155,19 @@
-
总学习人数
-
-
-
-
-
-
人均学习时长
+
{{chartLabel.one}}
-
总学习时长
+
{{chartLabel.two}}
+
+
+
+
+
+
{{chartLabel.three}}
@@ -334,11 +337,19 @@ export default { forDay: [], towParmasn: { type: 1, - dateType: 1, + dateType: 2, time: [], day: [], }, modalFlag: false, + checkedList: ['学习人数', '总学习时长'], + limitCheckedList: ['学习人数', '总学习时长'], + plainOptions: ['学习人数', '总学习时长', '人均学习时长'], + chartLabel: { + one: "学习人数", + two: "总学习时长", + three: "人均学习时长", + } }); const surfaceRef = ref(null); const surface1Ref = ref(null); @@ -350,6 +361,24 @@ export default { const datess = ref(); const hackValues = ref(); + + const checkboxChange = (event) => { + console.log("checkboxChange event:",event); + if(event.length>2){ + message.warning("最多选两个"); + console.log("checkboxChange checkedList:",state.checkedList); + state.checkedList = state.limitCheckedList; + }else{ + state.limitCheckedList = event; + // modalChange(); + if (state.towParmasn.dateType == 2) { + twoMonthChange(state.towParmasn.time); + } else if (state.towParmasn.dateType == 1) { + twoDatChange(state.towParmasn.day); + } + } + }; + const eChartClickRight = async () => { state.modalFlag = true; @@ -371,7 +400,7 @@ export default { const course = []; const project = []; const router = []; - res?.data?.forEach((item) => { + res?.data?.result.forEach((item) => { xData.push(item.xdata.slice(item.xdata.indexOf("-") + 1)); item?.list?.forEach((iten) => { if (iten.name == "case") { @@ -406,7 +435,7 @@ export default { const course = []; const project = []; const router = []; - res?.data?.forEach((item) => { + res?.data?.result.forEach((item) => { xData.push(item.xdata); item?.list?.forEach((iten) => { if (iten.name == "case") { @@ -445,7 +474,7 @@ export default { const course = []; const project = []; const router = []; - res?.data?.forEach((item) => { + res?.data?.result.forEach((item) => { xData.push(item.xdata); item?.list?.forEach((iten) => { if (iten.name == "course") { @@ -481,7 +510,7 @@ export default { const course = []; const project = []; const router = []; - res?.data?.forEach((item) => { + res?.data?.result.forEach((item) => { xData.push(item.xdata.slice(item.xdata.indexOf("-") + 1)); item?.list?.forEach((iten) => { if (iten.name == "course") { @@ -504,7 +533,7 @@ export default { } }; const exportTwoData = async () => { - if (state.towParmasn.dateType == 0) { + if (state.towParmasn.dateType == 1) { if (!state.towParmasn.day?.length || state.towParmasn.day?.length < 1) { message.error("请选择要导出的时间日期后再进行导出"); } else { @@ -536,7 +565,7 @@ export default { } ); } - } else if (state.towParmasn.dateType == 1) { + } else if (state.towParmasn.dateType == 2) { if ( !state.towParmasn.time?.length || state.towParmasn.time?.length < 1 @@ -573,9 +602,35 @@ export default { } }; const modalChange = async () => { - if (state.towParmasn.dateType == 1) { + console.log("modalChange type:",state.towParmasn.type); + if(state.towParmasn.type==2 || state.towParmasn.type==3){ + state.chartLabel.one = "总阅读人数"; + state.chartLabel.two = "总阅读时长"; + state.chartLabel.three = "人均阅读时长"; + state.plainOptions = ["总阅读人数","总阅读时长","人均阅读时长"]; + state.checkedList = ["总阅读人数","总阅读时长"]; + state.limitCheckedList = ["总阅读人数","总阅读时长"]; + }else if(state.towParmasn.type==4){ + state.chartLabel.one = "总查看人数"; + state.chartLabel.two = "总提问人数"; + state.chartLabel.three = "总回答人数"; + state.plainOptions = ["总查看人数","总提问人数","总回答人数"]; + state.checkedList = ["总查看人数","总提问人数"]; + state.limitCheckedList = ["总查看人数","总提问人数"]; + }else { + state.chartLabel.one = "学习人数"; + state.chartLabel.two = "总学习时长"; + state.chartLabel.three = "人均学习时长"; + state.plainOptions = ["学习人数","总学习时长","人均学习时长"]; + state.checkedList = ["学习人数","总学习时长"]; + state.limitCheckedList = ["学习人数","总学习时长"]; + } + option.value.series[0].name = state.chartLabel.one; + option.value.series[1].name = state.chartLabel.two; + option.value.series[2].name = state.chartLabel.two; + if (state.towParmasn.dateType == 2) { twoMonthChange(state.towParmasn.time); - } else if (state.towParmasn.dateType == 0) { + } else if (state.towParmasn.dateType == 1) { twoDatChange(state.towParmasn.day); } }; @@ -622,20 +677,22 @@ export default { return tooEarly || tooLate; }; const twoSelectChange = async (e) => { - if (e == 1) { + if (e == 2) { twoMonthChange(state.towParmasn.time); - } else if (e == 0) { + } else if (e == 1) { twoDatChange(state.towParmasn.day); } }; // 获取图表2月份数据 const twoMonthChange = async (e) => { - if (e?.length > 0) { - const monthEnd = dayjs(e[1]) + console.log("twoMonthChange e:",e); + // if (e?.length > 0) { + if (true) { + const monthEnd = dayjs(state.towParmasn.time[1]) .endOf("month") - .format("YYYY-MM-DD hh:mm:ss"); + .format("YYYY-MM-DD 23:59:59"); const res = await api.boeuStudyDataGetStudyStaisticsList({ - beginTime: dayjs(e[0]).format("YYYY-MM-01 00:00:01"), + beginTime: dayjs(state.towParmasn.time[0]).format("YYYY-MM-01 00:00:01"), endTime: monthEnd, dateType: state.towParmasn.dateType, type: state.towParmasn.type, @@ -650,47 +707,91 @@ export default { const avgDuration = []; const count = []; const duration = []; - res?.data?.forEach((item) => { - xData.push(item.month); - avgDuration.push(item.viewCount); - count.push(item.count); - duration.push(item.duration); - }); - option.value.xAxis.data = xData; - // 右侧坐标轴数据 - option.value.series[0].data = count; - //左侧坐标轴数据 - option.value.series[1].data = avgDuration; - option.value.series[2].data = duration; - createEcharts2(); - } else { - const xData = []; - const avgDuration = []; - const count = []; - const duration = []; - res?.data?.forEach((item) => { - xData.push(item.month); + res?.data?.result.forEach((item) => { + xData.push(item.day); avgDuration.push(item.avgDuration); count.push(item.count); duration.push(item.duration); }); option.value.xAxis.data = xData; // 右侧坐标轴数据 - option.value.series[0].data = count; - //左侧坐标轴数据 - option.value.series[1].data = avgDuration; - option.value.series[2].data = duration; + // option.value.series[0].data = count; + // //左侧坐标轴数据 + // option.value.series[1].data = avgDuration; + // option.value.series[2].data = duration; + option.value.series[0].data = []; + option.value.series[1].data = []; + option.value.series[2].data = []; + console.log("checkedList:",state.checkedList); + for(let i=0;i { + xData.push(item.day); + avgDuration.push(item.avgDuration); + count.push(item.count); + duration.push(item.duration); + }); + option.value.xAxis.data = xData; + // 右侧坐标轴数据 + // option.value.series[0].data = count; + // //左侧坐标轴数据 + // option.value.series[1].data = avgDuration; + // option.value.series[2].data = duration; + option.value.series[0].data = []; + option.value.series[1].data = []; + option.value.series[2].data = []; + console.log("checkedList:",state.checkedList); + console.log("666 duration:",duration); + for(let i=0;i { - if (e?.length > 0) { + console.log("twoDatChange e:",e); + // if (e?.length > 0) { + if (true) { const dayStart = dayjs(e[0]) .startOf("day") .format("YYYY-MM-DD 00:00:01"); - const dayEnd = dayjs(e[1]).endOf("day").format("YYYY-MM-DD hh:mm:ss"); + const dayEnd = dayjs(e[1]).endOf("day").format("YYYY-MM-DD 23:59:59"); const res = await api.boeuStudyDataGetStudyStaisticsList({ beginTime: dayStart, endTime: dayEnd, @@ -707,25 +808,7 @@ export default { const avgDuration = []; const count = []; const duration = []; - res?.data?.forEach((item) => { - xData.push(item.day); - avgDuration.push(item.viewCount); - count.push(item.count); - duration.push(item.duration); - }); - option.value.xAxis.data = xData; - // 右侧坐标轴数据 - option.value.series[0].data = count; - //左侧坐标轴数据 - option.value.series[1].data = avgDuration; - option.value.series[2].data = duration; - createEcharts2(); - } else { - const xData = []; - const avgDuration = []; - const count = []; - const duration = []; - res?.data?.forEach((item) => { + res?.data?.result.forEach((item) => { xData.push(item.day); avgDuration.push(item.avgDuration); count.push(item.count); @@ -733,10 +816,68 @@ export default { }); option.value.xAxis.data = xData; // 右侧坐标轴数据 - option.value.series[0].data = count; - //左侧坐标轴数据 - option.value.series[1].data = avgDuration; - option.value.series[2].data = duration; + // option.value.series[0].data = count; + // //左侧坐标轴数据 + // option.value.series[1].data = avgDuration; + // option.value.series[2].data = duration; + option.value.series[0].data = []; + option.value.series[1].data = []; + option.value.series[2].data = []; + console.log("checkedList:",state.checkedList); + for(let i=0;i { + xData.push(item.day); + avgDuration.push(item.avgDuration); + count.push(item.count); + duration.push(item.duration); + }); + option.value.xAxis.data = xData; + // 右侧坐标轴数据 + // option.value.series[0].data = count; + // //左侧坐标轴数据 + // option.value.series[1].data = avgDuration; + // option.value.series[2].data = duration; + option.value.series[0].data = []; + option.value.series[1].data = []; + option.value.series[2].data = []; + console.log("checkedList:",state.checkedList); + for(let i=0;i { + res?.data?.result.forEach((item) => { xData.push(item.xdata); item?.list?.forEach((iten) => { if (iten.name == "course") { @@ -794,7 +935,7 @@ export default { const course = []; const project = []; const router = []; - res?.data?.forEach((item) => { + res?.data?.result.forEach((item) => { xData.push(item.xdata.slice(item.xdata.indexOf("-") + 1)); item?.list?.forEach((iten) => { if (iten.name == "course") { @@ -909,7 +1050,7 @@ export default { const course = []; const project = []; const router = []; - res?.data?.forEach((item) => { + res?.data?.result.forEach((item) => { xData.push(item.xdata); item?.list?.forEach((iten) => { if (iten.name == "case") { @@ -945,7 +1086,7 @@ export default { const course = []; const project = []; const router = []; - res?.data?.forEach((item) => { + res?.data?.result.forEach((item) => { xData.push(item.xdata.slice(item.xdata.indexOf("-") + 1)); item?.list?.forEach((iten) => { if (iten.name == "case") { @@ -1406,11 +1547,27 @@ export default { }); }; const initTime = () => { - const monthEnd = dayjs(new Date()).endOf("year").format("YYYY-MM"); - const start = dayjs(new Date()).startOf("year").format("YYYY-MM"); + // console.log("initTime:",dayjs(new Date()).year()+"-"+(dayjs(new Date()).month())); + // const monthEnd = dayjs(new Date()).endOf("year").format("YYYY-MM"); + var year = dayjs(new Date()).year(); + var month = dayjs(new Date()).month()+1; + console.log("initTime year:",year,"month:",month); + var year1 = year; + var month1 = parseInt(month) - 5; + if(month1<=0){ + year1 = parseInt(year1) - 1; + month1 = 12 - (Math.abs(month1)%12); + } + console.log("initTime year1:",year1,"month1:",month1); + const monthEnd = dayjs(new Date()).year()+"-"+(dayjs(new Date()).month()+1); + // const start = dayjs(new Date()).startOf("year").format("YYYY-MM"); + const start = year1 + "-" + month1; state.threeTime = [dayjs(start), dayjs(monthEnd)]; state.forTime = [dayjs(start), dayjs(monthEnd)]; state.towParmasn.time = [dayjs(start), dayjs(monthEnd)]; + state.towParmasn.day = [dayjs( year + "-" + month + "-" + "01" ), dayjs(monthEnd)]; + state.threeDay = [dayjs( year + "-" + month + "-" + "01" ), dayjs(monthEnd)]; + state.forDay = [dayjs( year + "-" + month + "-" + "01" ), dayjs(monthEnd)]; leftMonthChange([dayjs(start), dayjs(monthEnd)]); rightMonthChange([dayjs(start), dayjs(monthEnd)]); twoMonthChange([dayjs(start), dayjs(monthEnd)]); @@ -1425,6 +1582,7 @@ export default { }); return { ...toRefs(state), + checkboxChange, eChartClickRight, rightMonthChange, rightChange, @@ -1540,7 +1698,7 @@ export default { } } .item1 { - margin-right: 15px; + // margin-right: 15px; display: flex; align-items: center; .start, @@ -1561,6 +1719,7 @@ export default { } } .item2 { + margin-right: 15px; display: flex; align-items: center; .start, diff --git a/src/views/report/Overvoew.vue b/src/views/report/Overvoew.vue index 0e0cde69..fda5f95d 100644 --- a/src/views/report/Overvoew.vue +++ b/src/views/report/Overvoew.vue @@ -12,17 +12,19 @@ allowClear > --> + > +
+
+ +
@@ -64,7 +75,13 @@ :class="currentTab === index ? 'tabActive' : 'tabItem'" @click="tabClick(index)" > - {{ item.text }} ({{ item.num }}) + + + {{ item.text }} ({{ item.num }}) + + {{ item.text }} ({{ item.num }})
@@ -289,9 +306,11 @@ import axios from "axios"; import dayjs from "dayjs"; import { message } from "ant-design-vue"; import Cookies from "vue-cookies"; +import {useStore} from "vuex"; export default { name: "OvervoeW", setup() { + const store = useStore(); const state = reactive({ tableLoading: false, // table加载图标 tableDataTotal: 0, // 数据总条数 @@ -306,25 +325,42 @@ export default { resetOrgId: [], allowClear: true, type: null, + publishTime: [], // 创建时间 }); // 获取tab数据 const getTabData = async () => { - console.log(state.type); + console.log("getTabData 111111:",state.type); + console.log("getTabData 222222:",store.state.userInfo.roleList); + var manageFlag = false; + for(let i=0;i { const list = [ - { text: "项目", num: res.data.data?.projectTotal }, - { text: "学习路径图", num: res.data.data?.routerTotal }, - { text: "授课", num: res.data.data?.teachingTotal }, - { text: "课程", num: res.data.data?.courseTotal }, - { text: "考试", num: res.data.data?.examTotal }, - { text: "案例", num: res.data.data?.caseTotal }, + { text: "项目", num: res.data.result?.projectTotal }, + { text: "学习路径图", num: res.data.result?.routerTotal }, + { text: "授课", num: res.data.result?.teachingTotal }, + { text: "课程", num: res.data.result?.courseTotal }, + { text: "考试", num: res.data.result?.examTotal }, + { text: "案例", num: res.data.result?.caseTotal }, ]; tabData.value = list; }); @@ -333,17 +369,46 @@ export default { const reset = async () => { state.tableLoading = true; state.creator = ""; + state.publishTime = []; state.name = ""; state.orgId = state.resetOrgId; getTableData(); + getTabData(); }; //请求组织接口 const getOrgList = async () => { + var manageFlag = false; + for(let i=0;i { + state.tableDataTotal = res.data.result.total; + const list = res.data.result.rows?.map((item) => { return { key: item.id, ...item, @@ -574,14 +653,16 @@ export default { //案例列表 const res = await api.boeuCasePageList({ author: state.creator, + startTime: typeof state.publishTime[0] === 'undefined' ? null : state.publishTime[0] +" 00:00:01", + endTime: typeof state.publishTime[1] === 'undefined' ? null : state.publishTime[1]+" 23:59:59", orgId: state.orgId ? state.orgId[state.orgId.length - 1] : null, title: state.name, page: state.pageNo, size: state.pageSize, }); if (res) { - state.tableDataTotal = res.data.total; - const list = res.data.rows?.map((item) => { + state.tableDataTotal = res.data.result.total; + const list = res.data.result.rows?.map((item) => { return { key: item.id, ...item, @@ -599,15 +680,17 @@ export default { ? state.orgId[state.orgId.length - 1] : null, createName: state.creator, + startTime: typeof state.publishTime[0] === 'undefined' ? null : state.publishTime[0] +" 00:00:01", + endTime: typeof state.publishTime[1] === 'undefined' ? null : state.publishTime[1]+" 23:59:59", }); - const list = res.data.rows.map((item) => { + const list = res.data.result.rows.map((item) => { return { key: item.boeCourseId, ...item, }; }); tableData.value = list; - state.tableDataTotal = res.data.total; + state.tableDataTotal = res.data.result.total; state.tableLoading = false; } else if (state.currentTab === 2) { const res = await api.boeuTeachingPageList({ @@ -616,15 +699,17 @@ export default { teachingName: state.name, orgId: state.orgId ? state.orgId[state.orgId.length - 1] : null, createName: state.creator, + startTime: typeof state.publishTime[0] === 'undefined' ? null : state.publishTime[0] +" 00:00:01", + endTime: typeof state.publishTime[1] === 'undefined' ? null : state.publishTime[1]+" 23:59:59", }); - const list = res.data.rows?.map((item) => { + const list = res.data.result.rows?.map((item) => { return { key: item.boeOffcoursePlanId, ...item, }; }); tableData.value = list; - state.tableDataTotal = res.data.total; + state.tableDataTotal = res.data.result.total; state.tableLoading = false; } else if (state.currentTab === 1) { const res = await api.boeuRoterPageList({ @@ -633,8 +718,10 @@ export default { routerName: state.name, orgId: state.orgId ? state.orgId[state.orgId.length - 1] : null, createName: state.creator, + startTime: typeof state.publishTime[0] === 'undefined' ? null : state.publishTime[0] +" 00:00:01", + endTime: typeof state.publishTime[1] === 'undefined' ? null : state.publishTime[1]+" 23:59:59", }); - const list = res.data.rows?.map((item) => { + const list = res.data.result.rows?.map((item) => { return { key: item.boeRouterInfoId, ...item, @@ -642,7 +729,7 @@ export default { }); tableData.value = list; state.tableLoading = false; - state.tableDataTotal = res.data.total; + state.tableDataTotal = res.data.result.total; } else if (state.currentTab === 0) { const res = await api.boeuProjectPageList({ page: state.pageNo, @@ -650,6 +737,8 @@ export default { orgId: state.orgId ? state.orgId[state.orgId.length - 1] : null, createName: state.creator, projectName: state.name, + startCreateTime: typeof state.publishTime[0] === 'undefined' ? null : state.publishTime[0] +" 00:00:01", + endCreateTime: typeof state.publishTime[1] === 'undefined' ? null : state.publishTime[1]+" 23:59:59", }); if (res) { const fun = (arr) => { @@ -666,8 +755,8 @@ export default { }); return list; }; - tableData.value = fun(res.data.rows); - state.tableDataTotal = res.data.total; + tableData.value = fun(res.data.result.rows); + state.tableDataTotal = res.data.result.total; state.tableLoading = false; } } @@ -677,6 +766,7 @@ export default { state.pageSize = 10; state.tableDataTotal = 0; getTableData(); + getTabData(); }; // cloumns 表头 const columns = ref([ @@ -798,7 +888,7 @@ export default { if (index === 0) { columns.value = [ { - title: "名称", + title: "项目名称", dataIndex: "projectName", key: "projectName", width: 120, @@ -816,7 +906,7 @@ export default { fixed: "left", }, { - title: "分类", + title: "项目分类", dataIndex: "trainingType", ellipsis: true, key: "trainingType", @@ -840,6 +930,14 @@ export default { width: 120, align: "center", }, + { + title: "学习人数", + dataIndex: "startLearnerTotal", + ellipsis: true, + key: "startLearnerTotal", + width: 120, + align: "center", + }, { title: "参与人数", dataIndex: "participantsTotal", @@ -849,10 +947,10 @@ export default { align: "center", }, { - title: "学习人数", - dataIndex: "startLearnerTotal", + title: "参与率", + dataIndex: "participantsRate", ellipsis: true, - key: "startLearnerTotal", + key: "participantsRate", width: 120, align: "center", }, @@ -864,6 +962,14 @@ export default { width: 120, align: "center", }, + { + title: "完成率", + dataIndex: "completedRate", + ellipsis: true, + key: "completedRate", + width: 120, + align: "center", + }, { title: "项目时间", dataIndex: "proTime", @@ -872,6 +978,14 @@ export default { width: 120, align: "center", }, + { + title: "创建时间", + dataIndex: "createTime", + ellipsis: true, + key: "createTime", + width: 120, + align: "center", + }, { title: "发布时间", dataIndex: "publishTime", @@ -900,7 +1014,7 @@ export default { } else if (index === 4) { columns.value = [ { - title: "名称", + title: "考试名称", dataIndex: "testName", key: "id", width: 120, @@ -918,8 +1032,8 @@ export default { fixed: "left", }, { - title: "参加人数", - dataIndex: "totalNumber", + title: "题量", + dataIndex: "numOfQuest", ellipsis: true, width: 120, @@ -934,13 +1048,22 @@ export default { align: "center", }, { - title: "题量", - dataIndex: "numOfQuest", + title: "参加人数", + dataIndex: "totalNumber", ellipsis: true, width: 120, align: "center", }, + { + title: "参与率", + dataIndex: "answerRate", + ellipsis: true, + + width: 120, + align: "center", + }, + { title: "通过人数", dataIndex: "numOfPass", @@ -957,6 +1080,14 @@ export default { width: 120, align: "center", }, + { + title: "创建时间", + dataIndex: "createTime", + ellipsis: true, + key: "createTime", + width: 120, + align: "center", + }, { title: "发布时间", dataIndex: "publishTime", @@ -985,7 +1116,7 @@ export default { } else if (index === 5) { columns.value = [ { - title: "名称", + title: "案例名称", dataIndex: "title", ellipsis: true, }, @@ -995,6 +1126,12 @@ export default { ellipsis: true, align: "center", }, + // { + // title: "案例分类", + // dataIndex: "majorType", + // ellipsis: true, + // align: "center", + // }, { title: "专业分类", dataIndex: "majorType", @@ -1002,47 +1139,47 @@ export default { align: "center", }, { - title: "浏览量", + title: "浏览数", dataIndex: "views", ellipsis: true, align: "center", }, { - title: "点赞量", + title: "点赞数", dataIndex: "praises", ellipsis: true, align: "center", }, { - title: "收藏量", - dataIndex: "favorites", - ellipsis: true, - align: "center", - }, - { - title: "评论量", + title: "评论数", dataIndex: "comments", ellipsis: true, align: "center", }, { - title: "发布时间", + title: "收藏数", + dataIndex: "favorites", + ellipsis: true, + align: "center", + }, + { + title: "创建时间", dataIndex: "sysCreateTime", key: "sysCreateTime", ellipsis: true, align: "center", }, - { - title: "创建人/作者", - dataIndex: "authorName", - ellipsis: true, - align: "center", - }, + // { + // title: "创建人/作者", + // dataIndex: "authorName", + // ellipsis: true, + // align: "center", + // }, ]; } else if (index === 3) { columns.value = [ { - title: "名称", + title: "课程名称", dataIndex: "name", key: "name", width: 120, @@ -1060,19 +1197,19 @@ export default { fixed: "left", }, { - title: "类型", - dataIndex: "courseType", + title: "课程分类", + dataIndex: "type", ellipsis: true, - key: "courseType", + key: "type", width: 120, align: "center", fixed: "left", }, { - title: "分类", - dataIndex: "type", + title: "类型", + dataIndex: "courseType", ellipsis: true, - key: "type", + key: "courseType", width: 120, align: "center", fixed: "left", @@ -1095,22 +1232,6 @@ export default { align: "center", fixed: "left", }, - { - title: "评论数", - dataIndex: "commentTotal", - ellipsis: true, - key: "commentTotal", - width: 120, - align: "center", - }, - { - title: "浏览量", - dataIndex: "viewTotal", - ellipsis: true, - key: "viewTotal", - width: 120, - align: "center", - }, { title: "开课次数", dataIndex: "classTotal", @@ -1119,6 +1240,14 @@ export default { width: 120, align: "center", }, + { + title: "浏览次数", + dataIndex: "viewTotal", + ellipsis: true, + key: "viewTotal", + width: 120, + align: "center", + }, { title: "学习人数", dataIndex: "learnerNumber", @@ -1143,6 +1272,30 @@ export default { width: 120, align: "center", }, + { + title: "完成率", + dataIndex: "completedRate", + ellipsis: true, + key: "completedRate", + width: 120, + align: "center", + }, + { + title: "评论数", + dataIndex: "commentTotal", + ellipsis: true, + key: "commentTotal", + width: 120, + align: "center", + }, + { + title: "创建时间", + dataIndex: "createTime", + ellipsis: true, + key: "createTime", + width: 120, + align: "center", + }, { title: "发布时间", dataIndex: "publishTime", @@ -1171,7 +1324,7 @@ export default { } else if (index === 2) { columns.value = [ { - title: "开课名称", + title: "课程名称", dataIndex: "name", key: "name", width: 120, @@ -1189,7 +1342,7 @@ export default { fixed: "left", }, { - title: "分类", + title: "课程分类", dataIndex: "typeName", ellipsis: true, key: "typeName", @@ -1198,19 +1351,11 @@ export default { fixed: "left", }, { - title: "授课时长(分钟)", + title: "授课时长(小时)", dataIndex: "teachingLength", ellipsis: true, key: "teachingLength", - width: 120, - align: "center", - }, - { - title: "授课教师", - dataIndex: "teacher", - ellipsis: true, - key: "teacher", - width: 120, + width: 150, align: "center", }, { @@ -1222,21 +1367,13 @@ export default { align: "center", }, { - title: "评分", + title: "课程评分", dataIndex: "score", ellipsis: true, key: "score", width: 120, align: "center", }, - { - title: "授课时间", - dataIndex: "teachingTime", - ellipsis: true, - key: "teachingTime", - width: 120, - align: "center", - }, { title: "创建时间", dataIndex: "createTime", @@ -1245,6 +1382,14 @@ export default { width: 120, align: "center", }, + { + title: "授课时间", + dataIndex: "teachingTime", + ellipsis: true, + key: "teachingTime", + width: 120, + align: "center", + }, { title: "状态", dataIndex: "status", @@ -1261,11 +1406,19 @@ export default { width: 120, align: "center", }, + // { + // title: "授课教师", + // dataIndex: "teacher", + // ellipsis: true, + // key: "teacher", + // width: 120, + // align: "center", + // }, ]; } else if (index === 1) { columns.value = [ { - title: "名称", + title: "路径图名称", dataIndex: "boeRouterInfoName", key: "boeRouterInfoName", width: 120, @@ -1317,6 +1470,14 @@ export default { width: 120, align: "center", }, + { + title: "参与率", + dataIndex: "participantsRate", + ellipsis: true, + key: "participantsRate", + width: 120, + align: "center", + }, { title: "完成人数", dataIndex: "completionNumber", @@ -1326,13 +1487,29 @@ export default { align: "center", }, { - title: "发布时间", + title: "完成率", + dataIndex: "completedRate", + ellipsis: true, + key: "completedRate", + width: 120, + align: "center", + }, + { + title: "创建时间", dataIndex: "createTime", ellipsis: true, key: "createTime", width: 120, align: "center", }, + { + title: "发布时间", + dataIndex: "publishTime", + ellipsis: true, + key: "publishTime", + width: 120, + align: "center", + }, { title: "状态", dataIndex: "status", diff --git a/src/views/report/Questionsandanswers.vue b/src/views/report/Questionsandanswers.vue index fce76518..c633e39a 100644 --- a/src/views/report/Questionsandanswers.vue +++ b/src/views/report/Questionsandanswers.vue @@ -23,6 +23,15 @@ >
+
+ +
@@ -104,11 +113,13 @@ export default { pageSize: 10, // 每页条数 pageNo: 1, //当前页码 createName: "", + publishTime: "", // 发布时间 title: "", selectedRowKeys: [], }); const reset = async () => { state.createName = ""; + state.publishTime = []; state.title = ""; state.selectedRowKeys = [] getTableData(); @@ -118,13 +129,16 @@ export default { const params = { title: state.title, createName: state.createName, + // publishTime: state.publishTime, + startTime: typeof state.publishTime[0] === 'undefined' ? null : state.publishTime[0] +" 00:00:01", + endTime: typeof state.publishTime[1] === 'undefined' ? null : state.publishTime[1]+" 23:59:59", pageNo: state.pageNo, pageSize: state.pageSize, }; const res = await api.boeuQuestionPageList(params); if (res) { - tableData.value = res.data.rows; - state.tableDataTotal = res.data.total; + tableData.value = res.data.result.rows; + state.tableDataTotal = res.data.result.total; state.tableLoading = false; } }; @@ -133,46 +147,50 @@ export default { // cloumns 表头 const columns = ref([ { - title: "问答标题", + title: "问答名称", dataIndex: "title", ellipsis: true, key: "title", align: "center", }, + // { + // title: "归属组织", + // dataIndex: "organizationName", + // ellipsis: true, + // key: "organizationName", + // align: "center", + // }, { - title: "归属组织", - dataIndex: "organizationName", - ellipsis: true, - key: "organizationName", - align: "center", - }, - { - title: "浏览量", + title: "浏览数", dataIndex: "views", ellipsis: true, key: "views", align: "center", + width: 100, }, { - title: "评论数", - dataIndex: "answers", - ellipsis: true, - key: "answers", - align: "center", - }, - { - title: "分享量", - dataIndex: "shares", - ellipsis: true, - key: "shares", - align: "center", - }, - { - title: "点赞量", + title: "点赞数", dataIndex: "praises", ellipsis: true, key: "praises", align: "center", + width: 100, + }, + { + title: "回答数", + dataIndex: "answers", + ellipsis: true, + key: "answers", + align: "center", + width: 100, + }, + { + title: "分享数", + dataIndex: "shares", + ellipsis: true, + key: "shares", + align: "center", + width: 100, }, { title: "收藏数", @@ -180,6 +198,7 @@ export default { ellipsis: true, key: "favorites", align: "center", + width: 100, }, { title: "发布时间", @@ -187,20 +206,22 @@ export default { ellipsis: true, key: "sysCreateTime", align: "center", + width: 140, }, - { - title: "问答状态", - dataIndex: "status", - ellipsis: true, - key: "status", - align: "center", - }, + // { + // title: "问答状态", + // dataIndex: "status", + // ellipsis: true, + // key: "status", + // align: "center", + // }, { title: "创建人", dataIndex: "sysCreateBy", ellipsis: true, key: "sysCreateBy", align: "center", + width: 140, }, ]); // 导出事件 @@ -227,6 +248,9 @@ export default { const params = { title: state.title, createName: state.createName, + // publishTime: state.publishTime, + startTime: typeof state.publishTime[0] === 'undefined' ? null : state.publishTime[0] +" 00:00:01", + endTime: typeof state.publishTime[1] === 'undefined' ? null : state.publishTime[1]+" 23:59:59", pageNo: state.pageNo, pageSize: state.pageSize, }; @@ -294,7 +318,7 @@ export default { .select { margin-right: 20px; margin-bottom: 20px; - width: calc((100% - 76px - 200px) / 2); + width: calc((100% - 76px - 220px) / 3); } .btnz { padding: 0px 26px 0px 26px; diff --git a/src/views/report/ReportArticle.vue b/src/views/report/ReportArticle.vue index e7fce52e..a210253c 100644 --- a/src/views/report/ReportArticle.vue +++ b/src/views/report/ReportArticle.vue @@ -23,6 +23,15 @@ >
+
+ +
@@ -127,6 +136,7 @@ export default { pageSize: 10, // 每页条数 pageNo: 1, //当前页码 createName: "", //创建者名称 + publishTime: "", // 发布时间 title: "", // 文章名称 selectedRowKeys: [], // 选中的列 }); @@ -157,6 +167,11 @@ export default { if (state.createName) { params.createName = state.createName; } + if (state.publishTime.length>0) { + // params.publishTime = state.publishTime; + params.startTime = typeof state.publishTime[0] === 'undefined' ? null : state.publishTime[0]+" 00:00:00"; + params.endTime = typeof state.publishTime[1] === 'undefined' ? null : state.publishTime[1]+" 23:59:59"; + } axios({ method: "post", url: "/report/boeu/article/exportAll", @@ -183,19 +198,31 @@ export default { } const getTableData = async () => { state.tableLoading = true; - const params = { page: state.pageNo, size: state.pageSize }; + const params = { + title: state.title, + createName: state.createName, + // publishTime: state.publishTime, + startTime: typeof state.publishTime[0] === 'undefined' ? null : state.publishTime[0]+" 00:00:00", + endTime: typeof state.publishTime[1] === 'undefined' ? null : state.publishTime[1]+" 23:59:59", + page: state.pageNo, + size: state.pageSize + }; if (state.title) { params.title = state.title; } if (state.createName) { params.createName = state.createName; } - + if (state.publishTime.length>0) { + // params.publishTime = state.publishTime; + params.startTime = state.publishTime[0]+" 00:00:00"; + params.endTime = state.publishTime[1]+" 23:59:59"; + } const res = await api.boeuArticlePageList(params); if (res) { state.tableLoading = false; - state.tableDataTotal = res.data.total; - const list = res.data.rows?.map((item) => { + state.tableDataTotal = res.data.result.total; + const list = res.data.result.rows?.map((item) => { return { ...item, key: item.id, @@ -207,6 +234,7 @@ export default { const resetClick = () => { state.selectedRowKeys = []; state.createName = ""; + state.publishTime = []; state.title = ""; getTableData(); }; @@ -220,19 +248,28 @@ export default { key: "title", align: "center", }, + // { + // title: "归属组织", + // dataIndex: "orgName", + // ellipsis: true, + // key: "orgName", + // align: "center", + // }, { - title: "归属组织", - dataIndex: "orgName", - ellipsis: true, - key: "orgName", - align: "center", - }, - { - title: "浏览量", + title: "浏览数", dataIndex: "views", ellipsis: true, key: "views", align: "center", + width: 100, + }, + { + title: "点赞数", + dataIndex: "praises", + ellipsis: true, + key: "praises", + align: "center", + width: 100, }, { title: "评论数", @@ -240,20 +277,15 @@ export default { ellipsis: true, key: "comments", align: "center", + width: 100, }, { - title: "分享量", + title: "分享数", dataIndex: "shares", ellipsis: true, key: "shares", align: "center", - }, - { - title: "点赞量", - dataIndex: "praises", - ellipsis: true, - key: "praises", - align: "center", + width: 100, }, { title: "收藏数", @@ -261,6 +293,7 @@ export default { ellipsis: true, key: "favorites", align: "center", + width: 100, }, { title: "发布时间", @@ -268,20 +301,22 @@ export default { ellipsis: true, key: "publishTime", align: "center", + width: 140, }, - { - title: "文章状态", - dataIndex: "status", - ellipsis: true, - key: "status", - align: "center", - }, + // { + // title: "文章状态", + // dataIndex: "status", + // ellipsis: true, + // key: "status", + // align: "center", + // }, { title: "创建人", dataIndex: "sysCreateBy", ellipsis: true, key: "sysCreateBy", align: "center", + width: 120, }, ]); // table选中 @@ -327,7 +362,7 @@ export default { .select { margin-right: 20px; margin-bottom: 20px; - width: calc((100% - 76px - 200px) / 2); + width: calc((100% - 76px - 220px) / 3); } .btnz { diff --git a/src/views/report/ReportExamination.vue b/src/views/report/ReportExamination.vue index 4a53c9ea..d2ece006 100644 --- a/src/views/report/ReportExamination.vue +++ b/src/views/report/ReportExamination.vue @@ -12,24 +12,25 @@ allowClear > --> + >
@@ -38,22 +39,21 @@
- - +
@@ -94,6 +94,38 @@ onChange: onSelectChange, }" > +
@@ -120,9 +152,11 @@ import { message } from "ant-design-vue"; import Cookies from "vue-cookies"; import axios from "axios"; import downLoad from "../../utils/downLoad"; +import { useStore } from 'vuex'; export default { name: "EmployeelearninG", setup() { + const store = useStore(); const state = reactive({ tableLoading: false, // table加载图标 tableDataTotal: 0, // 数据总条数 @@ -136,22 +170,52 @@ export default { selectedRowKeys: [], // 选中的列 ids: [], allowClear:true, - resetOrgId:[] + resetOrgId:[], + creator: "", + testName: "", + publishTime: [], }); // table选中 const onSelectChange = (selectedRowKeys, record) => { state.selectedRowKeys = selectedRowKeys; state.ids = record?.map((item) => { - return item.basicBoeUserId; + return item.id; }); }; //请求组织接口 const getOrgList = async () => { + var manageFlag = false; + for(let i=0;i { - downLoad(res.data, "学习员工数据.xlsx"); + downLoad(res.data, "考试列表.xlsx"); }); } }; @@ -181,98 +245,162 @@ export default { // cloumns 表头 const columns = ref([ { - title: "工号", - dataIndex: "userNo", - key: "userNo", + title: "考试名称", + dataIndex: "testName", + key: "testName", width: 120, ellipsis: true, align: "center", }, { - title: "姓名", - dataIndex: "name", + title: "归属组织", + dataIndex: "resOwner", ellipsis: true, - key: "name", + key: "resOwner", width: 120, align: "center", }, { - title: "组织信息", - dataIndex: "departmentName", + title: "归属课程", + dataIndex: "pertainCourse", ellipsis: true, - key: "departmentName", + key: "pertainCourse", width: 120, align: "center", }, { - title: "岗位", - dataIndex: "jobName", + title: "归属项目", + dataIndex: "pertainProject", ellipsis: true, - key: "jobName", + key: "pertainProject", + align: "center", + width: 120, + }, + { + title: "归属路径", + dataIndex: "pertainRouter", + ellipsis: true, + key: "pertainRouter", + align: "center", + width: 120, + }, + { + title: "题量", + dataIndex: "numOfQuest", + ellipsis: true, + key: "numOfQuest", width: 120, align: "center", }, { - title: "Band", - dataIndex: "bandCode", + title: "考试人数", + dataIndex: "totalNumber", ellipsis: true, - key: "bandCode", + key: "totalNumber", width: 120, align: "center", }, { - title: "授课次数", - dataIndex: "teachingTotal", + title: "参加人数", + dataIndex: "numOfAnswer", ellipsis: true, - key: "teachingTotal", + key: "numOfAnswer", width: 120, align: "center", }, { - title: "授课时长(分钟)", - dataIndex: "teachingTime", + title: "参与率", + dataIndex: "answerRate", ellipsis: true, - key: "teachingTime", + key: "answerRate", width: 120, align: "center", }, { - title: "案例数", - dataIndex: "caseTotal", + title: "考试次数", + dataIndex: "testTimes", ellipsis: true, - key: "caseTotal", + key: "testTimes", width: 120, align: "center", }, { - title: "学习项目", - dataIndex: "studyProject", + title: "考试时长", + dataIndex: "testDuration", ellipsis: true, - key: "studyProject", + key: "testDuration", width: 120, align: "center", }, { - title: "学习路径", - dataIndex: "studyRouter", + title: "考试满分", + dataIndex: "totalScore", ellipsis: true, - key: "studyRouter", + key: "totalScore", width: 120, align: "center", }, { - title: "学习课程", - dataIndex: "studyClass", + title: "考试合格分", + dataIndex: "passLine", ellipsis: true, - key: "studyClass", + key: "passLine", width: 120, align: "center", }, { - title: "累计学习时长(分钟)", - dataIndex: "studyTimeSum", + title: "平均答题时长", + dataIndex: "averageAnswerTime", ellipsis: true, - key: "studyTimeSum", + key: "averageAnswerTime", + width: 120, + align: "center", + }, + { + title: "平均得分", + dataIndex: "averageScore", + ellipsis: true, + key: "averageScore", + width: 120, + align: "center", + }, + { + title: "通过人数", + dataIndex: "numOfPass", + ellipsis: true, + key: "numOfPass", + width: 120, + align: "center", + }, + { + title: "通过率", + dataIndex: "passRate", + ellipsis: true, + key: "passRate", + width: 120, + align: "center", + }, + { + title: "发布时间", + dataIndex: "publishTime", + ellipsis: true, + key: "publishTime", + width: 140, + align: "center", + }, + { + title: "考试状态", + dataIndex: "published", + ellipsis: true, + key: "published", + width: 120, + align: "center", + }, + { + title: "创建人", + dataIndex: "creator", + ellipsis: true, + key: "creator", width: 120, align: "center", }, @@ -300,15 +428,15 @@ export default { // 行内单条下载 const oneExport = (record) => { axios({ - method: "get", - url: "/report/boeu/studyData/export", - params: { ids: `${record.record.basicBoeUserId}` }, + method: "post", + url: "/report/boeu/exam/export/detail/v2", + data: { ids: [`${record.record.id}`] }, responseType: "blob", headers: { token: Cookies.get("token"), }, }).then((res) => { - downLoad(res.data, "学习员工数据.xlsx"); + downLoad(res.data, "考试详细数据.xlsx"); }); }; //table 分页事件 @@ -319,17 +447,21 @@ export default { // 获取数据 const getTableData = async () => { state.tableLoading = true; - const res = await api.boeuStudyDataPageList({ + const res = await api.boeuExamPageListV2({ page: state.pageNo, size: state.pageSize, - userNo: state.userNo, - name: state.name, - departmentId: state.orgId ? state.orgId[state.orgId.length - 1] : null, - bandCode: state.band, + // userNo: state.userNo, + testName: state.testName, + createName: state.creator, + startTime: typeof state.publishTime[0] === 'undefined' ? null : state.publishTime[0]+ " 00:00:00", + endTime: typeof state.publishTime[0] === 'undefined' ? null : state.publishTime[1]+ " 23:59:59", + // name: state.name, + orgId: state.orgId ? state.orgId[state.orgId.length - 1] : null, + // bandCode: state.band, }); if (res) { - state.tableDataTotal = res.data.total; - const list = res.data.rows?.map((item) => { + state.tableDataTotal = res.data.result.total; + const list = res.data.result.rows?.map((item) => { return { key: item.id, ...item, @@ -342,9 +474,12 @@ export default { // 重置按钮 const reset = async () => { state.tableLoading = true; - state.name = ""; - state.band = ""; - state.userNo = ""; + // state.name = ""; + // state.band = ""; + // state.userNo = ""; + state.testName = ""; + state.creator = ""; + state.publishTime = []; state.orgId = state.resetOrgId; getTableData(); }; @@ -353,19 +488,23 @@ export default { const exportAllbtnz = async () => { axios({ method: "post", - url: "/report/boeu/studyData/exportAll", + url: "/report/boeu/exam/export/list/v2", data: { - userNo: state.userNo, - name: state.name, - departmentId: state.orgId ? state.orgId[state.orgId.length - 1] : null, - bandCode: state.band, + // userNo: state.userNo, + // name: state.name, + testName: state.testName, + createName: state.creator, + startTime: typeof state.publishTime[0] === 'undefined' ? null : state.publishTime[0]+ " 00:00:00", + endTime: typeof state.publishTime[0] === 'undefined' ? null : state.publishTime[1]+ " 23:59:59", + orgId: state.orgId ? state.orgId[state.orgId.length - 1] : null, + // bandCode: state.band, }, responseType: "blob", headers: { token: Cookies.get("token"), }, }).then((res) => { - downLoad(res.data, "学习员工数据.xlsx"); + downLoad(res.data, "考试列表.xlsx"); }); }; onMounted(() => { diff --git a/src/views/report/ReportProject.vue b/src/views/report/ReportProject.vue index e426a46f..2f198864 100644 --- a/src/views/report/ReportProject.vue +++ b/src/views/report/ReportProject.vue @@ -3,6 +3,22 @@
+
+ + +
- - +
+ +
+
@@ -169,9 +179,11 @@ import axios from "axios"; import Cookies from "vue-cookies"; import downLoad from "../../utils/downLoad"; import { message } from "ant-design-vue"; +import { useStore } from "vuex"; export default { name: "reportProject", setup() { + const store = useStore(); const state = reactive({ tableLoading: false, // table加载图标 tableDataTotal: 0, // 数据总条数 @@ -183,6 +195,7 @@ export default { resetOrgId: [], projectName: "", createName: "", + publishTime: [], // 发布时间 selectedRowKeys: [], // 选中的列 status: null, stateOptions: [ @@ -215,6 +228,9 @@ export default { params.orgId = state.orgId; params.createName = state.createName; params.projectName = state.projectName; + // params.publishTime = state.publishTime; + params.startPublishTime =typeof state.publishTime[0] === 'undefined' ? null : state.publishTime[0]+" 00:00:01"; + params.endPublishTime = typeof state.publishTime[1] === 'undefined' ? null : state.publishTime[1]+" 23:59:59"; params.page = state.pageNo; params.size = state.pageSize; params.orgId = state.orgId ? state.orgId[state.orgId.length - 1] : null; @@ -261,6 +277,9 @@ export default { params.orgId = state.orgId; params.createName = state.createName; params.projectName = state.projectName; + // params.publishTime = state.publishTime; + params.startPublishTime =typeof state.publishTime[0] === 'undefined' ? null : state.publishTime[0]+" 00:00:01"; + params.endPublishTime = typeof state.publishTime[1] === 'undefined' ? null : state.publishTime[1]+" 23:59:59"; params.page = state.pageNo; params.size = state.pageSize; params.orgId = state.orgId ? state.orgId[state.orgId.length - 1] : null; @@ -290,14 +309,43 @@ export default { }; //请求组织接口 const getOrgList = async () => { - const res = await api.userGetUserOrg({}); + var manageFlag = false; + for(let i=0;i