mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/fe-manage.git
synced 2025-12-23 17:55:39 +08:00
feat: 报表管理接口联调
This commit is contained in:
@@ -73,13 +73,14 @@
|
||||
:scroll="{ x: 700 }"
|
||||
:pagination="false"
|
||||
@expand="expandTable"
|
||||
childrenColumnName="children"
|
||||
:row-selection="{
|
||||
selectedRowKeys: selectedRowKeys,
|
||||
onChange: onSelectChange,
|
||||
}"
|
||||
>
|
||||
<template #bodyCell="{ column, record }">
|
||||
<template v-if="column.key === 'courseType'">
|
||||
<template v-if="column.key === 'courseType'">
|
||||
<span>{{
|
||||
record.courseType == "0"
|
||||
? "在线"
|
||||
@@ -89,56 +90,59 @@
|
||||
}}</span>
|
||||
</template>
|
||||
<!-- 项目状态 -->
|
||||
<template v-if="column.key === 'projectStatus'">
|
||||
<template v-if="column.key === 'projectStatus'">
|
||||
<span>{{
|
||||
record.status == "0"
|
||||
? "草稿"
|
||||
: record.status == "1"
|
||||
? "已发布"
|
||||
: record.status == "-1"
|
||||
? "已结束":''
|
||||
: record.status == "-1"
|
||||
? "已结束"
|
||||
: ""
|
||||
}}</span>
|
||||
</template>
|
||||
<!-- 学习路径图状态 -->
|
||||
<template v-if="column.key === 'boeRouterStatus'">
|
||||
<!-- 学习路径图状态 -->
|
||||
<template v-if="column.key === 'boeRouterStatus'">
|
||||
<span>{{
|
||||
record.status == "0"
|
||||
? "草稿"
|
||||
: record.status == "1"
|
||||
? "已发布"
|
||||
: record.status == "-1"
|
||||
? "已停用":''
|
||||
: record.status == "-1"
|
||||
? "已停用"
|
||||
: ""
|
||||
}}</span>
|
||||
</template>
|
||||
<!-- 授课状态 -->
|
||||
<template v-if="column.key === 'teachingStatus'">
|
||||
<!-- 授课状态 -->
|
||||
<template v-if="column.key === 'teachingStatus'">
|
||||
<span>{{
|
||||
record.status == "0"
|
||||
? "未开始"
|
||||
: record.status == "1"
|
||||
? "进行中"
|
||||
: record.status == "2"
|
||||
? "已完成":''
|
||||
: record.status == "2"
|
||||
? "已完成"
|
||||
: ""
|
||||
}}</span>
|
||||
</template>
|
||||
<!-- 课程状态 -->
|
||||
<template v-if="column.key === 'classStatus'">
|
||||
<!-- 课程状态 -->
|
||||
<template v-if="column.key === 'classStatus'">
|
||||
<span>{{
|
||||
record.publishStatus == "0"
|
||||
? "未发布"
|
||||
: record.publishStatus == "1"
|
||||
? "已发布"
|
||||
: ''
|
||||
: ""
|
||||
}}</span>
|
||||
</template>
|
||||
<!-- 考试状态 -->
|
||||
<template v-if="column.key === 'classStatus'">
|
||||
<template v-if="column.key === 'classStatus'">
|
||||
<span>{{
|
||||
record.publishStatus == "0"
|
||||
? "未发布"
|
||||
: record.publishStatus == "1"
|
||||
? "已发布"
|
||||
: ''
|
||||
: ""
|
||||
}}</span>
|
||||
</template>
|
||||
|
||||
@@ -335,7 +339,7 @@ export default {
|
||||
// 表格数据
|
||||
let tableData = ref([]);
|
||||
const getTableData = async () => {
|
||||
state.tableLoading=true
|
||||
state.tableLoading = true;
|
||||
if (state.currentTab === 4) {
|
||||
//考试列表
|
||||
const res = await api.boeuExamPageList({
|
||||
@@ -354,7 +358,7 @@ export default {
|
||||
};
|
||||
});
|
||||
tableData.value = list;
|
||||
state.tableLoading=false
|
||||
state.tableLoading = false;
|
||||
}
|
||||
} else if (state.currentTab === 5) {
|
||||
//案例列表
|
||||
@@ -374,7 +378,7 @@ export default {
|
||||
};
|
||||
});
|
||||
tableData.value = list;
|
||||
state.tableLoading=false
|
||||
state.tableLoading = false;
|
||||
}
|
||||
} else if (state.currentTab === 3) {
|
||||
const res = await api.boeuCoursePageList({
|
||||
@@ -392,7 +396,7 @@ export default {
|
||||
});
|
||||
tableData.value = list;
|
||||
state.tableDataTotal = res.data.total;
|
||||
state.tableLoading=false
|
||||
state.tableLoading = false;
|
||||
} else if (state.currentTab === 2) {
|
||||
const res = await api.boeuTeachingPageList({
|
||||
page: state.pageNo,
|
||||
@@ -409,7 +413,7 @@ export default {
|
||||
});
|
||||
tableData.value = list;
|
||||
state.tableDataTotal = res.data.total;
|
||||
state.tableLoading=false
|
||||
state.tableLoading = false;
|
||||
} else if (state.currentTab === 1) {
|
||||
const res = await api.boeuRoterPageList({
|
||||
page: state.pageNo,
|
||||
@@ -425,25 +429,37 @@ export default {
|
||||
};
|
||||
});
|
||||
tableData.value = list;
|
||||
state.tableLoading=false
|
||||
state.tableLoading = false;
|
||||
state.tableDataTotal = res.data.total;
|
||||
} else if (state.currentTab === 0) {
|
||||
const res = await api.boeuProjectPageList({
|
||||
page: state.pageNo,
|
||||
size: state.pageSize,
|
||||
org: state.orgId,
|
||||
orgId: state.orgId,
|
||||
createName: state.creator,
|
||||
projectName: state.name,
|
||||
});
|
||||
const list = res.data.rows?.map((item) => {
|
||||
return {
|
||||
key: item.boeProjectInfoId,
|
||||
...item,
|
||||
};
|
||||
});
|
||||
tableData.value = list;
|
||||
// const list = res.data.rows?.map((item) => {
|
||||
// return {
|
||||
// key: item.boeProjectInfoId,
|
||||
// ...item,
|
||||
// };
|
||||
// });
|
||||
// tableData.value = list;
|
||||
const fun = (arr) => {
|
||||
const list = arr.map((item) => {
|
||||
return {
|
||||
key: item.boeProjectInfoId,
|
||||
children: fun(item.reportProjectOverview),
|
||||
...item,
|
||||
};
|
||||
});
|
||||
return list;
|
||||
};
|
||||
console.log(fun(res.data.rows));
|
||||
tableData.value = fun(res.data.rows);
|
||||
state.tableDataTotal = res.data.total;
|
||||
state.tableLoading=false
|
||||
state.tableLoading = false;
|
||||
}
|
||||
};
|
||||
const searchClick = () => {
|
||||
@@ -453,99 +469,99 @@ export default {
|
||||
getTableData();
|
||||
};
|
||||
// cloumns 表头
|
||||
const columns = ref( [
|
||||
{
|
||||
title: "名称",
|
||||
dataIndex: "projectName",
|
||||
key: "projectName",
|
||||
width: 120,
|
||||
ellipsis: true,
|
||||
align: "left",
|
||||
fixed: "left",
|
||||
},
|
||||
{
|
||||
title: "归属组织",
|
||||
dataIndex: "sourceBelongName",
|
||||
ellipsis: true,
|
||||
key: "sourceBelongName",
|
||||
width: 120,
|
||||
align: "center",
|
||||
fixed: "left",
|
||||
},
|
||||
{
|
||||
title: "分类",
|
||||
dataIndex: "trainingType",
|
||||
ellipsis: true,
|
||||
key: "trainingType",
|
||||
width: 120,
|
||||
align: "center",
|
||||
fixed: "left",
|
||||
},
|
||||
{
|
||||
title: "阶段总数",
|
||||
dataIndex: "stageTotal",
|
||||
ellipsis: true,
|
||||
key: "stageTotal",
|
||||
width: 120,
|
||||
align: "center",
|
||||
},
|
||||
{
|
||||
title: "任务总数",
|
||||
dataIndex: "taskTotal",
|
||||
ellipsis: true,
|
||||
key: "taskTotal",
|
||||
width: 120,
|
||||
align: "center",
|
||||
},
|
||||
{
|
||||
title: "学习人数",
|
||||
dataIndex: "startLearnerTotal",
|
||||
ellipsis: true,
|
||||
key: "startLearnerTotal",
|
||||
width: 120,
|
||||
align: "center",
|
||||
},
|
||||
{
|
||||
title: "完成人数",
|
||||
dataIndex: "peopleCompletedTotal",
|
||||
ellipsis: true,
|
||||
key: "peopleCompletedTotal",
|
||||
width: 120,
|
||||
align: "center",
|
||||
},
|
||||
{
|
||||
title: "项目时间",
|
||||
dataIndex: "proTime",
|
||||
ellipsis: true,
|
||||
key: "proTime",
|
||||
width: 120,
|
||||
align: "center",
|
||||
},
|
||||
{
|
||||
title: "发布时间",
|
||||
dataIndex: "publishTime",
|
||||
ellipsis: true,
|
||||
key: "publishTime",
|
||||
width: 120,
|
||||
align: "center",
|
||||
},
|
||||
{
|
||||
title: "状态",
|
||||
dataIndex: "status",
|
||||
ellipsis: true,
|
||||
key: "projectStatus",
|
||||
width: 120,
|
||||
align: "center",
|
||||
},
|
||||
{
|
||||
title: "创建人",
|
||||
dataIndex: "createName",
|
||||
ellipsis: true,
|
||||
key: "manager",
|
||||
width: 120,
|
||||
align: "center",
|
||||
},
|
||||
]);
|
||||
const columns = ref([
|
||||
{
|
||||
title: "名称",
|
||||
dataIndex: "projectName",
|
||||
key: "projectName",
|
||||
width: 120,
|
||||
ellipsis: true,
|
||||
align: "left",
|
||||
fixed: "left",
|
||||
},
|
||||
{
|
||||
title: "归属组织",
|
||||
dataIndex: "sourceBelongName",
|
||||
ellipsis: true,
|
||||
key: "sourceBelongName",
|
||||
width: 120,
|
||||
align: "center",
|
||||
fixed: "left",
|
||||
},
|
||||
{
|
||||
title: "分类",
|
||||
dataIndex: "trainingType",
|
||||
ellipsis: true,
|
||||
key: "trainingType",
|
||||
width: 120,
|
||||
align: "center",
|
||||
fixed: "left",
|
||||
},
|
||||
{
|
||||
title: "阶段总数",
|
||||
dataIndex: "stageTotal",
|
||||
ellipsis: true,
|
||||
key: "stageTotal",
|
||||
width: 120,
|
||||
align: "center",
|
||||
},
|
||||
{
|
||||
title: "任务总数",
|
||||
dataIndex: "taskTotal",
|
||||
ellipsis: true,
|
||||
key: "taskTotal",
|
||||
width: 120,
|
||||
align: "center",
|
||||
},
|
||||
{
|
||||
title: "学习人数",
|
||||
dataIndex: "startLearnerTotal",
|
||||
ellipsis: true,
|
||||
key: "startLearnerTotal",
|
||||
width: 120,
|
||||
align: "center",
|
||||
},
|
||||
{
|
||||
title: "完成人数",
|
||||
dataIndex: "peopleCompletedTotal",
|
||||
ellipsis: true,
|
||||
key: "peopleCompletedTotal",
|
||||
width: 120,
|
||||
align: "center",
|
||||
},
|
||||
{
|
||||
title: "项目时间",
|
||||
dataIndex: "proTime",
|
||||
ellipsis: true,
|
||||
key: "proTime",
|
||||
width: 120,
|
||||
align: "center",
|
||||
},
|
||||
{
|
||||
title: "发布时间",
|
||||
dataIndex: "publishTime",
|
||||
ellipsis: true,
|
||||
key: "publishTime",
|
||||
width: 120,
|
||||
align: "center",
|
||||
},
|
||||
{
|
||||
title: "状态",
|
||||
dataIndex: "status",
|
||||
ellipsis: true,
|
||||
key: "projectStatus",
|
||||
width: 120,
|
||||
align: "center",
|
||||
},
|
||||
{
|
||||
title: "创建人",
|
||||
dataIndex: "createName",
|
||||
ellipsis: true,
|
||||
key: "manager",
|
||||
width: 120,
|
||||
align: "center",
|
||||
},
|
||||
]);
|
||||
const tabData = ref([
|
||||
{ text: "项目", num: "2" },
|
||||
{ text: "学习路径图", num: "6" },
|
||||
|
||||
Reference in New Issue
Block a user