feat: 报表管理接口联调

This commit is contained in:
mx00085@163.com
2023-02-20 16:00:13 +08:00
parent d19aba8623
commit e0a18e1e4d
3 changed files with 159 additions and 132 deletions

View File

@@ -677,55 +677,63 @@ export default {
{
href: "/learningpathmap",
openKeys: "sub17",
// openKeyss:'sub17-2',
openKeys2: "sub17-2",
selectedKeys: "sub17-2-1",
pagename: "学习路径图",
},
{
href: "/project",
openKeys: "sub17",
openKeys2: "sub17-2",
selectedKeys: "sub17-2-2",
pagename: "项目",
},
{
href: "/curriculum",
openKeys: "sub17",
openKeys2: "sub17-2",
selectedKeys: "sub17-2-3",
pagename: "课程",
},
{
href: "/caseess",
openKeys: "sub17",
openKeys2: "sub17-2",
selectedKeys: "sub17-2-4",
pagename: "案例",
},
{
href: "/article",
openKeys: "sub17",
openKeys2: "sub17-2",
selectedKeys: "sub17-2-5",
pagename: "文章",
},
{
href: "/questionsandanswers",
openKeys: "sub17",
openKeys2: "sub17-2",
selectedKeys: "sub17-2-6",
pagename: "问答",
},
{
href: "/examination",
openKeys: "sub17",
openKeys2: "sub17-2",
selectedKeys: "sub17-2-7",
pagename: "考试",
},
{
href: "/overvoew",
openKeys: "sub17",
openKeys2: "sub17-3",
selectedKeys: "sub17-3-1",
pagename: "概览",
},
{
href: "/employeelearning",
openKeys: "sub17",
openKeys2: "sub17-3",
selectedKeys: "sub17-3-2",
pagename: "员工学习数据",
},
@@ -738,12 +746,13 @@ export default {
);
if (state.rootSubmenuKeys.indexOf(latestOpenKey) === -1) {
state.openKeys = openKeys;
console.log('111',openKeys)
} else {
state.openKeys = latestOpenKey ? [latestOpenKey] : [];
console.log('222222222222222')
}
};
const selectItem = (e) => {
// console.log("onSelect", e, );
let arr = state.keysList;
arr.map((value) => {
if (e.key === value.selectedKeys) {
@@ -752,9 +761,11 @@ export default {
"selectedKeys",
JSON.stringify([value.selectedKeys])
);
state.openKeys = [value.openKeys];
// console.log('2222',[value.openKeys,value.openKeys2])
state.openKeys = [value.openKeys,value.openKeys2];
// state.openKeys=['sub17', 'sub17-2']
state.selectedKeys = [value.selectedKeys];
state.openKeys2 = [value.openKeys];
state.openKeys2 = [value.openKeys,value.openKeys2];
state.selectedKeys2 = [value.openKeys];
}
});
@@ -774,9 +785,9 @@ export default {
"selectedKeys",
JSON.stringify([value.selectedKeys])
);
state.openKeys = [value.openKeys];
state.openKeys = [value.openKeys,value.openKeys2];
state.selectedKeys = [value.selectedKeys];
state.openKeys2 = [value.openKeys];
state.openKeys2 = [value.openKeys2];
state.selectedKeys2 = [value.openKeys];
}
});

View File

@@ -145,7 +145,7 @@ export default {
token: Cookies.get("token"),
},
}).then((res) => {
downLoad(res.data, "案例.xlsx");
downLoad(res.data, "学习员工数据.xlsx");
});
}
};

View File

@@ -73,6 +73,7 @@
:scroll="{ x: 700 }"
:pagination="false"
@expand="expandTable"
childrenColumnName="children"
:row-selection="{
selectedRowKeys: selectedRowKeys,
onChange: onSelectChange,
@@ -96,7 +97,8 @@
: record.status == "1"
? "已发布"
: record.status == "-1"
? "已结束":''
? "已结束"
: ""
}}</span>
</template>
<!-- 学习路径图状态 -->
@@ -107,7 +109,8 @@
: record.status == "1"
? "已发布"
: record.status == "-1"
? "已停用":''
? "已停用"
: ""
}}</span>
</template>
<!-- 授课状态 -->
@@ -118,7 +121,8 @@
: record.status == "1"
? "进行中"
: record.status == "2"
? "已完成":''
? "已完成"
: ""
}}</span>
</template>
<!-- 课程状态 -->
@@ -128,7 +132,7 @@
? "未发布"
: record.publishStatus == "1"
? "已发布"
: ''
: ""
}}</span>
</template>
<!-- 考试状态 -->
@@ -138,7 +142,7 @@
? "未发布"
: 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) => {
// 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,
};
});
tableData.value = list;
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 = () => {