diff --git a/src/api/indexOvervoew.js b/src/api/indexOvervoew.js index 327bf0aa..e638f734 100644 --- a/src/api/indexOvervoew.js +++ b/src/api/indexOvervoew.js @@ -10,7 +10,8 @@ export const boeuExamPageList = (obj) => http.post('/boeu/exam/pageList', obj) export const boeuCasePageList = (obj) => http.post('/boeu/case/pageList', obj) // 请求组织接口 export const userGetUserOrg = (obj) => https.post('/user/getUserOrg', obj) - +// 请求所属组织接口 +export const userInfo = (obj) => https.post('/user/info', obj) // 课程列表接口 export const boeuCoursePageList = (obj) => http.post('/boeu/course/pageList', obj) // 授课列表 diff --git a/src/views/report/Employeelearning.vue b/src/views/report/Employeelearning.vue index bbffe540..c1840acf 100644 --- a/src/views/report/Employeelearning.vue +++ b/src/views/report/Employeelearning.vue @@ -129,6 +129,7 @@ export default { }; }); state.option = list; + getOrgId() } }; //导出 @@ -270,19 +271,19 @@ export default { }, }, ]); - // 行内单条下载 - const oneExport = (record) => { + // 行内单条下载 + const oneExport = (record) => { axios({ - method: "get", - url: "/report/boeu/studyData/export", - params: { ids: `${record.record.id}` }, - responseType: "blob", - headers: { - token: Cookies.get("token"), - }, - }).then((res) => { - downLoad(res.data, "案例.xlsx"); - }); + method: "get", + url: "/report/boeu/studyData/export", + params: { ids: `${record.record.id}` }, + responseType: "blob", + headers: { + token: Cookies.get("token"), + }, + }).then((res) => { + downLoad(res.data, "案例.xlsx"); + }); }; //table 分页事件 const changePagination = (page) => { @@ -291,7 +292,7 @@ export default { }; // 获取数据 const getTableData = async () => { - state.tableLoading=true + state.tableLoading = true; const res = await api.boeuStudyDataPageList({ page: state.pageNo, size: state.pageSize, @@ -309,7 +310,7 @@ export default { }; }); tableData.value = list; - state.tableLoading=false + state.tableLoading = false; } }; // 重置按钮 @@ -320,9 +321,17 @@ export default { state.userNo = ""; getTableData(); }; + // 获取登录人员组织 + const getOrgId = async () => { + const res = await api.userInfo({}); + if (res) { + state.orgId = res.data.result.departId; + getTableData(); + } + }; onMounted(() => { - getTableData(); getOrgList(); + state.tableLoading=true }); return { onSelectChange, diff --git a/src/views/report/Overvoew.vue b/src/views/report/Overvoew.vue index ca0923d8..dfa0fd15 100644 --- a/src/views/report/Overvoew.vue +++ b/src/views/report/Overvoew.vue @@ -95,10 +95,25 @@ record.status == "0" ? "草稿" : record.status == "1" - ? "已发布" + ? "提交待审核" + : record.status == "2" + ? "审核通过" + : record.status == "3" + ? '已经发布' + : record.status == "4" + ? '发布' : record.status == "-1" - ? "已结束" - : "" + ? '已结束' + : record.status == "-2" + ? '删除' + : record.status == "-3" + ? '撤回审核' + : record.status == "-4" + ? '撤回发布' + : record.status == "-5" + ? '拒绝' + : record.status == "-6" + ? '撤回已结束':'' }} @@ -128,9 +143,9 @@ + +
@@ -265,6 +293,7 @@ export default { }; }); state.option = list; + getOrgId() } }; // 导出按钮 @@ -469,7 +498,6 @@ export default { }); return list; }; - console.log(fun(res.data.rows)); tableData.value = fun(res.data.rows); state.tableDataTotal = res.data.total; state.tableLoading = false; @@ -756,7 +784,7 @@ export default { title: "状态", dataIndex: "examStatus", ellipsis: true, - key: "classStatus", + key: "examStatus", width: 120, align: "center", }, @@ -812,6 +840,13 @@ export default { ellipsis: true, align: "center", }, + { + title: "发布时间", + dataIndex: "sysCreateTime", + key:'sysCreateTime', + ellipsis: true, + align: "center", + }, { title: "创建人/作者", dataIndex: "authorName", @@ -848,6 +883,15 @@ export default { align: "center", fixed: "left", }, + { + title: "授课教师", + dataIndex: "teacher", + ellipsis: true, + key: "teacher", + width: 120, + align: "center", + fixed: "left", + }, { title: "评论数", dataIndex: "commentTotal", @@ -1065,6 +1109,14 @@ export default { } getTableData(); }; + // 获取登录人员组织 + const getOrgId=async()=>{ + const res =await api.userInfo({}) + if(res){ + state.orgId=res.data.result.departId + getTableData(); + } + } //table 分页事件 const changePagination = (page) => { state.selectedRowKeys = []; @@ -1076,9 +1128,9 @@ export default { console.log("e", e, a); }; onMounted(() => { + state.tableLoading=true getTabData(); getOrgList(); - getTableData(); }); return { getTabData, @@ -1218,7 +1270,7 @@ export default { .tab { margin-left: 38px; display: flex; - background: #ebeaea; + background: #ecf5ff; height: 40px; line-height: 40px; border-radius: 8px;