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 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)
// 授课列表

View File

@@ -129,6 +129,7 @@ export default {
};
});
state.option = list;
getOrgId()
}
};
//导出
@@ -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();
};
onMounted(() => {
// 获取登录人员组织
const getOrgId = async () => {
const res = await api.userInfo({});
if (res) {
state.orgId = res.data.result.departId;
getTableData();
}
};
onMounted(() => {
getOrgList();
state.tableLoading=true
});
return {
onSelectChange,

View File

@@ -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"
? '撤回已结束':''
}}</span>
</template>
<!-- 学习路径图状态 -->
@@ -128,9 +143,9 @@
<!-- 课程状态 -->
<template v-if="column.key === 'classStatus'">
<span>{{
record.published == "0"
record.publishStatus == "0"
? "未发布"
: record.published == "1"
: record.publishStatus == "1"
? "已发布"
: ""
}}</span>
@@ -188,6 +203,19 @@
}}</span>
</a-tooltip>
</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>
</a-table>
<div class="tableBox">
@@ -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;