fix: 概览页面状态更改

This commit is contained in:
mx00085@163.com
2023-03-01 10:36:27 +08:00
parent fff60e7a8c
commit 44028277d4
3 changed files with 87 additions and 25 deletions

View File

@@ -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 boeuCasePageList = (obj) => http.post('/boeu/case/pageList', obj)
// 请求组织接口 // 请求组织接口
export const userGetUserOrg = (obj) => https.post('/user/getUserOrg', 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) export const boeuCoursePageList = (obj) => http.post('/boeu/course/pageList', obj)
// 授课列表 // 授课列表

View File

@@ -129,6 +129,7 @@ export default {
}; };
}); });
state.option = list; state.option = list;
getOrgId()
} }
}; };
//导出 //导出
@@ -291,7 +292,7 @@ export default {
}; };
// 获取数据 // 获取数据
const getTableData = async () => { const getTableData = async () => {
state.tableLoading=true state.tableLoading = true;
const res = await api.boeuStudyDataPageList({ const res = await api.boeuStudyDataPageList({
page: state.pageNo, page: state.pageNo,
size: state.pageSize, size: state.pageSize,
@@ -309,7 +310,7 @@ export default {
}; };
}); });
tableData.value = list; tableData.value = list;
state.tableLoading=false state.tableLoading = false;
} }
}; };
// 重置按钮 // 重置按钮
@@ -320,9 +321,17 @@ export default {
state.userNo = ""; state.userNo = "";
getTableData(); getTableData();
}; };
onMounted(() => { // 获取登录人员组织
const getOrgId = async () => {
const res = await api.userInfo({});
if (res) {
state.orgId = res.data.result.departId;
getTableData(); getTableData();
}
};
onMounted(() => {
getOrgList(); getOrgList();
state.tableLoading=true
}); });
return { return {
onSelectChange, onSelectChange,

View File

@@ -95,10 +95,25 @@
record.status == "0" record.status == "0"
? "草稿" ? "草稿"
: record.status == "1" : record.status == "1"
? "已发布" ? "提交待审核"
: record.status == "2"
? "审核通过"
: record.status == "3"
? '已经发布'
: record.status == "4"
? '发布'
: record.status == "-1" : record.status == "-1"
? "已结束" ? '已结束'
: "" : record.status == "-2"
? '删除'
: record.status == "-3"
? '撤回审核'
: record.status == "-4"
? '撤回发布'
: record.status == "-5"
? '拒绝'
: record.status == "-6"
? '撤回已结束':''
}}</span> }}</span>
</template> </template>
<!-- 学习路径图状态 --> <!-- 学习路径图状态 -->
@@ -128,9 +143,9 @@
<!-- 课程状态 --> <!-- 课程状态 -->
<template v-if="column.key === 'classStatus'"> <template v-if="column.key === 'classStatus'">
<span>{{ <span>{{
record.published == "0" record.publishStatus == "0"
? "未发布" ? "未发布"
: record.published == "1" : record.publishStatus == "1"
? "已发布" ? "已发布"
: "" : ""
}}</span> }}</span>
@@ -188,6 +203,19 @@
}}</span> }}</span>
</a-tooltip> </a-tooltip>
</template> </template>
<template v-if="column.key === 'sysCreateTime'">
<a-tooltip placement="topRight">
<template #title>
<span>{{
record.sysCreateTime&& dayjs(record.sysCreateTime).format("YYYY-MM-DD HH:mm:ss")
}}</span>
</template>
<span>{{
record.sysCreateTime&& dayjs(record.sysCreateTime).format("YYYY-MM-DD HH:mm:ss")
}}</span>
</a-tooltip>
</template>
</template> </template>
</a-table> </a-table>
<div class="tableBox"> <div class="tableBox">
@@ -265,6 +293,7 @@ export default {
}; };
}); });
state.option = list; state.option = list;
getOrgId()
} }
}; };
// 导出按钮 // 导出按钮
@@ -469,7 +498,6 @@ export default {
}); });
return list; return list;
}; };
console.log(fun(res.data.rows));
tableData.value = fun(res.data.rows); tableData.value = fun(res.data.rows);
state.tableDataTotal = res.data.total; state.tableDataTotal = res.data.total;
state.tableLoading = false; state.tableLoading = false;
@@ -756,7 +784,7 @@ export default {
title: "状态", title: "状态",
dataIndex: "examStatus", dataIndex: "examStatus",
ellipsis: true, ellipsis: true,
key: "classStatus", key: "examStatus",
width: 120, width: 120,
align: "center", align: "center",
}, },
@@ -812,6 +840,13 @@ export default {
ellipsis: true, ellipsis: true,
align: "center", align: "center",
}, },
{
title: "发布时间",
dataIndex: "sysCreateTime",
key:'sysCreateTime',
ellipsis: true,
align: "center",
},
{ {
title: "创建人/作者", title: "创建人/作者",
dataIndex: "authorName", dataIndex: "authorName",
@@ -848,6 +883,15 @@ export default {
align: "center", align: "center",
fixed: "left", fixed: "left",
}, },
{
title: "授课教师",
dataIndex: "teacher",
ellipsis: true,
key: "teacher",
width: 120,
align: "center",
fixed: "left",
},
{ {
title: "评论数", title: "评论数",
dataIndex: "commentTotal", dataIndex: "commentTotal",
@@ -1065,6 +1109,14 @@ export default {
} }
getTableData(); getTableData();
}; };
// 获取登录人员组织
const getOrgId=async()=>{
const res =await api.userInfo({})
if(res){
state.orgId=res.data.result.departId
getTableData();
}
}
//table 分页事件 //table 分页事件
const changePagination = (page) => { const changePagination = (page) => {
state.selectedRowKeys = []; state.selectedRowKeys = [];
@@ -1076,9 +1128,9 @@ export default {
console.log("e", e, a); console.log("e", e, a);
}; };
onMounted(() => { onMounted(() => {
state.tableLoading=true
getTabData(); getTabData();
getOrgList(); getOrgList();
getTableData();
}); });
return { return {
getTabData, getTabData,
@@ -1218,7 +1270,7 @@ export default {
.tab { .tab {
margin-left: 38px; margin-left: 38px;
display: flex; display: flex;
background: #ebeaea; background: #ecf5ff;
height: 40px; height: 40px;
line-height: 40px; line-height: 40px;
border-radius: 8px; border-radius: 8px;