mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/fe-manage.git
synced 2025-12-11 11:56:46 +08:00
学习路径图、案例页面接口联调
This commit is contained in:
@@ -23,3 +23,7 @@ export const boeuProjectPageList = (obj) => http.post('/boeu/project/pageList',
|
|||||||
export const boeuStudyDataPageList = (obj) => http.post('/boeu/studyData/pageList', obj)
|
export const boeuStudyDataPageList = (obj) => http.post('/boeu/studyData/pageList', obj)
|
||||||
// 概览页面 tab头数据
|
// 概览页面 tab头数据
|
||||||
export const boeuAllTotal = (obj) => http.get('/boeu/all/total', obj)
|
export const boeuAllTotal = (obj) => http.get('/boeu/all/total', obj)
|
||||||
|
// 路径图列表
|
||||||
|
export const boeuRouterPlatePageList = (obj) => http.post('/boeu/routerPlate/pageList', obj)
|
||||||
|
// 案例列表
|
||||||
|
export const boeuCasePlatePageList = (obj) => http.post('/boeu/case/pageList', obj)
|
||||||
|
|||||||
6
src/api/indexWay.js
Normal file
6
src/api/indexWay.js
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
import http from "./configz";
|
||||||
|
import https from './confign'
|
||||||
|
// 请求组织接口
|
||||||
|
export const userGetUserOrg = (obj) => https.post('/user/getUserOrg', obj)
|
||||||
|
// 路径图列表
|
||||||
|
export const boeuRouterPlatePageList = (obj) => http.post('/boeu/routerPlate/pageList', obj)
|
||||||
@@ -9,6 +9,7 @@
|
|||||||
placeholder="请输入案例名称"
|
placeholder="请输入案例名称"
|
||||||
allowClear
|
allowClear
|
||||||
showSearch
|
showSearch
|
||||||
|
v-model:value="title"
|
||||||
>
|
>
|
||||||
</a-input>
|
</a-input>
|
||||||
</div>
|
</div>
|
||||||
@@ -18,23 +19,16 @@
|
|||||||
placeholder="请输入作者名称"
|
placeholder="请输入作者名称"
|
||||||
allowClear
|
allowClear
|
||||||
showSearch
|
showSearch
|
||||||
|
v-model:value="author"
|
||||||
>
|
>
|
||||||
</a-input>
|
</a-input>
|
||||||
</div>
|
</div>
|
||||||
<div class="select addTimeBox">
|
|
||||||
<a-range-picker
|
|
||||||
style="width: 100%"
|
|
||||||
format="YYYY-MM-DD"
|
|
||||||
separator="至"
|
|
||||||
:placeholder="[' 开始时间', ' 结束时间']"
|
|
||||||
/>
|
|
||||||
</div>
|
|
||||||
<div style="display: flex; margin-bottom: 20px">
|
<div style="display: flex; margin-bottom: 20px">
|
||||||
<div class="btnn btn1">
|
<div class="btnn btn1" @click="getTableData">
|
||||||
<div class="search"></div>
|
<div class="search"></div>
|
||||||
<div class="btnText">搜索</div>
|
<div class="btnText">搜索</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="btn btn2">
|
<div class="btn btn2" @click="reset">
|
||||||
<div class="search"></div>
|
<div class="search"></div>
|
||||||
<div class="btnText">重置</div>
|
<div class="btnText">重置</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -42,7 +36,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<!-- 以下为导出按钮 -->
|
<!-- 以下为导出按钮 -->
|
||||||
<div class="btns">
|
<div class="btns">
|
||||||
<div class="btn btn3">
|
<div class="btn btn3" @click="exportAllbtnz">
|
||||||
<div><img src="../../assets/svg/export.png" alt="" /></div>
|
<div><img src="../../assets/svg/export.png" alt="" /></div>
|
||||||
<div class="btnText">导出</div>
|
<div class="btnText">导出</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -50,11 +44,16 @@
|
|||||||
<!-- 以下为table表格 -->
|
<!-- 以下为table表格 -->
|
||||||
<div class="tableBox">
|
<div class="tableBox">
|
||||||
<a-table
|
<a-table
|
||||||
|
rowKey="id"
|
||||||
:columns="columns"
|
:columns="columns"
|
||||||
:data-source="tableData"
|
:data-source="tableData"
|
||||||
:loading="tableLoading"
|
:loading="tableLoading"
|
||||||
:scroll="{ x: 700 }"
|
:scroll="{ x: 700 }"
|
||||||
:pagination="false"
|
:pagination="false"
|
||||||
|
:row-selection="{
|
||||||
|
selectedRowKeys: selectedRowKeys,
|
||||||
|
onChange: onSelectChange,
|
||||||
|
}"
|
||||||
>
|
>
|
||||||
</a-table>
|
</a-table>
|
||||||
<div class="tableBox">
|
<div class="tableBox">
|
||||||
@@ -76,116 +75,196 @@
|
|||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
import { ref, toRefs, reactive } from "vue";
|
import { ref, toRefs, reactive, onMounted } from "vue";
|
||||||
|
import { message } from "ant-design-vue";
|
||||||
|
import * as api from "../../api/indexOvervoew";
|
||||||
|
import downLoad from "../../utils/downLoad";
|
||||||
|
import Cookies from "vue-cookies";
|
||||||
|
import axios from "axios";
|
||||||
export default {
|
export default {
|
||||||
name: "CaseesS",
|
name: "CaseesS",
|
||||||
setup() {
|
setup() {
|
||||||
const state = reactive({
|
const state = reactive({
|
||||||
tableLoading: false, // table加载图标
|
tableLoading: false, // table加载图标
|
||||||
tableDataTotal: 12, // 数据总条数
|
tableDataTotal: 0, // 数据总条数
|
||||||
pageSize: 10, // 每页条数
|
pageSize: 10, // 每页条数
|
||||||
pageNo: 1, //当前页码
|
pageNo: 1, //当前页码
|
||||||
|
idList: [],
|
||||||
|
title: "",
|
||||||
|
author: "",
|
||||||
|
authorName: ""
|
||||||
});
|
});
|
||||||
// 表格数据
|
// 表格数据
|
||||||
// 表格数据
|
let tableData = ref([]);
|
||||||
|
// table选中
|
||||||
let tableData = ref([
|
const onSelectChange = (selectedRowKeys, record) => {
|
||||||
{ name: "0000255", manager: "565656" },
|
state.selectedRowKeys = selectedRowKeys;
|
||||||
{ name: "0000255", manager: "565656" },
|
state.id = record?.map((item) => {
|
||||||
{ name: "0000255", manager: "565656" },
|
return item.id;
|
||||||
{ name: "0000255", manager: "565656" },
|
});
|
||||||
{ name: "0000255", manager: "565656" },
|
};
|
||||||
{ name: "0000255", manager: "565656" },
|
|
||||||
{ name: "0000255", manager: "565656" },
|
|
||||||
{ name: "0000255", manager: "565656" },
|
|
||||||
{ name: "0000255", manager: "565656" },
|
|
||||||
{ name: "0000255", manager: "565656" },
|
|
||||||
{ name: "0000255", manager: "565656" },
|
|
||||||
{ name: "0000255", manager: "565656" },
|
|
||||||
]);
|
|
||||||
// cloumns 表头
|
// cloumns 表头
|
||||||
const columns = ref([
|
const columns = ref([
|
||||||
{
|
{
|
||||||
title: "编号",
|
title: "编号",
|
||||||
dataIndex: "age",
|
dataIndex: "num",
|
||||||
ellipsis: true,
|
ellipsis: true,
|
||||||
key: "manager",
|
key: "num",
|
||||||
align: "center",
|
align: "center",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: "案例名称",
|
title: "案例名称",
|
||||||
dataIndex: "age",
|
dataIndex: "title",
|
||||||
ellipsis: true,
|
ellipsis: true,
|
||||||
key: "manager",
|
key: "title",
|
||||||
align: "center",
|
align: "center",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: "归属组织",
|
title: "归属组织",
|
||||||
dataIndex: "manager",
|
dataIndex: "orgDomain",
|
||||||
ellipsis: true,
|
ellipsis: true,
|
||||||
key: "manager",
|
key: "orgDomain",
|
||||||
align: "center",
|
align: "center",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: "专业分类",
|
title: "专业分类",
|
||||||
dataIndex: "manager",
|
dataIndex: "majorType",
|
||||||
ellipsis: true,
|
ellipsis: true,
|
||||||
key: "manager",
|
key: "majorType",
|
||||||
align: "center",
|
align: "center",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: "浏览量",
|
title: "浏览量",
|
||||||
dataIndex: "manager",
|
dataIndex: "views",
|
||||||
ellipsis: true,
|
ellipsis: true,
|
||||||
key: "manager",
|
key: "views",
|
||||||
align: "center",
|
align: "center",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: "评分数",
|
title: "评论数",
|
||||||
dataIndex: "manager",
|
dataIndex: "comments",
|
||||||
ellipsis: true,
|
ellipsis: true,
|
||||||
key: "manager",
|
key: "comments",
|
||||||
align: "center",
|
align: "center",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: "分享量",
|
title: "分享量",
|
||||||
dataIndex: "manager",
|
dataIndex: "shares",
|
||||||
ellipsis: true,
|
ellipsis: true,
|
||||||
key: "manager",
|
key: "shares",
|
||||||
align: "center",
|
align: "center",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: "收藏数",
|
title: "收藏数",
|
||||||
dataIndex: "manager",
|
dataIndex: "favorites",
|
||||||
ellipsis: true,
|
ellipsis: true,
|
||||||
key: "manager",
|
key: "favorites",
|
||||||
align: "center",
|
align: "center",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: "发布时间",
|
title: "发布时间",
|
||||||
dataIndex: "manager",
|
dataIndex: "sysCreateTime",
|
||||||
ellipsis: true,
|
ellipsis: true,
|
||||||
key: "manager",
|
key: "sysCreateTime",
|
||||||
align: "center",
|
align: "center",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: "状态",
|
title: "状态",
|
||||||
dataIndex: "manager",
|
dataIndex: "caseScope",
|
||||||
ellipsis: true,
|
ellipsis: true,
|
||||||
key: "manager",
|
key: "caseScope",
|
||||||
align: "center",
|
align: "center",
|
||||||
},
|
},
|
||||||
]);
|
]);
|
||||||
//table 分页事件
|
// table 分页事件
|
||||||
const changePagination = (page) => {
|
const changePagination = (page) => {
|
||||||
state.pageNo = page;
|
state.pageNo = page;
|
||||||
|
getTableData();
|
||||||
};
|
};
|
||||||
|
// 获取数据
|
||||||
|
const getTableData = async () => {
|
||||||
|
state.tableLoading = true;
|
||||||
|
const res = await api.boeuCasePlatePageList({
|
||||||
|
page: state.pageNo,
|
||||||
|
size: state.pageSize,
|
||||||
|
title: state.title,
|
||||||
|
author: state.author,
|
||||||
|
authorName: state.authorName,
|
||||||
|
boeRouterInfoName: state.boeRouterInfoName,
|
||||||
|
});
|
||||||
|
if (res) {
|
||||||
|
console.log(res.data, "res.data");
|
||||||
|
state.tableDataTotal = res.data.total;
|
||||||
|
const list = res.data.rows?.map((item) => {
|
||||||
|
return {
|
||||||
|
key: item.id,
|
||||||
|
...item,
|
||||||
|
};
|
||||||
|
});
|
||||||
|
tableData.value = list;
|
||||||
|
state.tableLoading = false;
|
||||||
|
}
|
||||||
|
};
|
||||||
|
// 重置按钮
|
||||||
|
const reset = async () => {
|
||||||
|
state.tableLoading = true;
|
||||||
|
state.title = "";
|
||||||
|
state.authorName = "";
|
||||||
|
state.author = "";
|
||||||
|
getTableData();
|
||||||
|
};
|
||||||
|
// 导出列表信息
|
||||||
|
const exportAllbtnz = async () => {
|
||||||
|
if (state.selectedRowKeys?.length > 0) {
|
||||||
|
axios({
|
||||||
|
method: "post",
|
||||||
|
url: "/report/boeu/case/exportList",
|
||||||
|
data: { idList: state.selectedRowKeys },
|
||||||
|
responseType: "blob",
|
||||||
|
headers: {
|
||||||
|
token: Cookies.get("token"),
|
||||||
|
},
|
||||||
|
}).then((res) => {
|
||||||
|
downLoad(res.data, "案例列表.xlsx");
|
||||||
|
}),(err) => {
|
||||||
|
message.error(err)
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
const params = {
|
||||||
|
page: state.pageNo,
|
||||||
|
size: state.pageSize,
|
||||||
|
title: state.title,
|
||||||
|
author: state.author,
|
||||||
|
};
|
||||||
|
axios({
|
||||||
|
method: "post",
|
||||||
|
url: "/report/boeu/case/exportList",
|
||||||
|
data: params,
|
||||||
|
responseType: "blob",
|
||||||
|
headers: {
|
||||||
|
token: Cookies.get("token"),
|
||||||
|
},
|
||||||
|
}).then((res) => {
|
||||||
|
downLoad(res.data, "案例列表.xlsx");
|
||||||
|
}),(err) => {
|
||||||
|
message.error(err)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
};
|
||||||
|
onMounted(() => {
|
||||||
|
getTableData();
|
||||||
|
state.tableLoading = true;
|
||||||
|
});
|
||||||
return {
|
return {
|
||||||
...toRefs(state),
|
...toRefs(state),
|
||||||
tableData,
|
tableData,
|
||||||
columns,
|
columns,
|
||||||
changePagination,
|
changePagination,
|
||||||
|
exportAllbtnz,
|
||||||
|
onSelectChange,
|
||||||
|
getTableData,
|
||||||
|
reset,
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -3,26 +3,25 @@
|
|||||||
<div class="learningpathmap">
|
<div class="learningpathmap">
|
||||||
<!-- 以下为顶部搜索框 -->
|
<!-- 以下为顶部搜索框 -->
|
||||||
<div class="filter">
|
<div class="filter">
|
||||||
<div class="select addTimeBox">
|
|
||||||
<div class="addTime">创建时间:</div>
|
|
||||||
<a-range-picker
|
|
||||||
style="width: 100%"
|
|
||||||
format="YYYY-MM-DD"
|
|
||||||
separator="至"
|
|
||||||
:placeholder="[' 开始时间', ' 结束时间']"
|
|
||||||
/>
|
|
||||||
</div>
|
|
||||||
<div class="select">
|
<div class="select">
|
||||||
<a-select
|
<a-cascader
|
||||||
|
:options="option"
|
||||||
|
v-model:value="orgId"
|
||||||
style="width: 100%"
|
style="width: 100%"
|
||||||
placeholder="请选择归属组织"
|
placeholder="请选择归属组织"
|
||||||
allowClear
|
:allowClear="allowClear"
|
||||||
></a-select>
|
:fieldNames="{
|
||||||
|
label: 'name',
|
||||||
|
value: 'id',
|
||||||
|
children: 'treeChildList',
|
||||||
|
}"
|
||||||
|
></a-cascader>
|
||||||
</div>
|
</div>
|
||||||
<div class="select">
|
<div class="select">
|
||||||
<a-input
|
<a-input
|
||||||
style="width: 100%; height: 40px; border-radius: 8px"
|
style="width: 100%; height: 40px; border-radius: 8px"
|
||||||
placeholder="请输入路径名称"
|
placeholder="请输入路径名称"
|
||||||
|
v-model:value="boeRouterInfoName"
|
||||||
allowClear
|
allowClear
|
||||||
showSearch
|
showSearch
|
||||||
>
|
>
|
||||||
@@ -33,16 +32,17 @@
|
|||||||
style="width: 100%; height: 40px; border-radius: 8px"
|
style="width: 100%; height: 40px; border-radius: 8px"
|
||||||
placeholder="请输入创建者"
|
placeholder="请输入创建者"
|
||||||
allowClear
|
allowClear
|
||||||
|
v-model:value="createName"
|
||||||
showSearch
|
showSearch
|
||||||
>
|
>
|
||||||
</a-input>
|
</a-input>
|
||||||
</div>
|
</div>
|
||||||
<div style="display: flex; margin-bottom: 20px">
|
<div style="display: flex; margin-bottom: 20px">
|
||||||
<div class="btnn btn1">
|
<div class="btnn btn1" @click="getTableData">
|
||||||
<div class="search"></div>
|
<div class="search"></div>
|
||||||
<div class="btnText">搜索</div>
|
<div class="btnText">搜索</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="btn btn2">
|
<div class="btn btn2" @click="reset">
|
||||||
<div class="search"></div>
|
<div class="search"></div>
|
||||||
<div class="btnText">重置</div>
|
<div class="btnText">重置</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -50,23 +50,32 @@
|
|||||||
</div>
|
</div>
|
||||||
<!-- 以下为导出按钮 -->
|
<!-- 以下为导出按钮 -->
|
||||||
<div class="btns">
|
<div class="btns">
|
||||||
<div class="btn btn3">
|
<div class="btn btn3" @click="exportAllbtnz">
|
||||||
<div><img src="../../assets/images/coursewareManage/export1.png" alt="" /></div>
|
<div>
|
||||||
|
<img src="../../assets/images/coursewareManage/export1.png" alt="" />
|
||||||
|
</div>
|
||||||
<div class="btnText">导出列表信息</div>
|
<div class="btnText">导出列表信息</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="btn btn3" style="margin-left: 20px">
|
<div class="btn btn3" @click="exportbtnz" style="margin-left: 20px">
|
||||||
<div><img src="../../assets/images/coursewareManage/export1.png" alt="" /></div>
|
<div>
|
||||||
|
<img src="../../assets/images/coursewareManage/export1.png" alt="" />
|
||||||
|
</div>
|
||||||
<div class="btnText">导出详细信息</div>
|
<div class="btnText">导出详细信息</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<!-- 以下为table表格 -->
|
<!-- 以下为table表格 -->
|
||||||
<div class="tableBox">
|
<div class="tableBox">
|
||||||
<a-table
|
<a-table
|
||||||
|
rowKey="boeRouterInfoId"
|
||||||
:columns="columns"
|
:columns="columns"
|
||||||
:data-source="tableData"
|
:data-source="tableData"
|
||||||
:loading="tableLoading"
|
:loading="tableLoading"
|
||||||
:scroll="{ x: 700 }"
|
:scroll="{ x: 700 }"
|
||||||
:pagination="false"
|
:pagination="false"
|
||||||
|
:row-selection="{
|
||||||
|
selectedRowKeys: selectedRowKeys,
|
||||||
|
onChange: onSelectChange,
|
||||||
|
}"
|
||||||
>
|
>
|
||||||
</a-table>
|
</a-table>
|
||||||
<div class="tableBox">
|
<div class="tableBox">
|
||||||
@@ -88,95 +97,131 @@
|
|||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
import { ref, toRefs, reactive } from "vue";
|
import { message } from "ant-design-vue";
|
||||||
|
import * as api from "../../api/indexOvervoew";
|
||||||
|
// import * as api from "../../api/indexWay";
|
||||||
|
import { ref, toRefs, reactive, onMounted } from "vue";
|
||||||
|
import downLoad from "../../utils/downLoad";
|
||||||
|
import Cookies from "vue-cookies";
|
||||||
|
import axios from "axios";
|
||||||
export default {
|
export default {
|
||||||
name: "LearningPathMap",
|
name: "LearningPathMap",
|
||||||
setup() {
|
setup() {
|
||||||
const state = reactive({
|
const state = reactive({
|
||||||
tableLoading: false, // table加载图标
|
tableLoading: false, // table加载图标
|
||||||
tableDataTotal: 12, // 数据总条数
|
tableDataTotal: 0, // 数据总条数
|
||||||
pageSize: 10, // 每页条数
|
pageSize: 10, // 每页条数
|
||||||
pageNo: 1, //当前页码
|
pageNo: 1, //当前页码
|
||||||
|
name: "", // 名称
|
||||||
|
orgId: null, // 状态值
|
||||||
|
routerName: "", // 路径图名称
|
||||||
|
createName: "", // 创建者名称
|
||||||
|
startTime: "", // 开始时间
|
||||||
|
endTime: "", // 结束时间
|
||||||
|
option: [], // 组织列表
|
||||||
|
boeRouterInfoName: "", // 路径名称
|
||||||
|
selectedRowKeys: [], // 选中的列
|
||||||
|
routerId: [],
|
||||||
|
allowClear: true,
|
||||||
|
resetOrgId: [],
|
||||||
|
routerIdList: [],
|
||||||
});
|
});
|
||||||
// 表格数据
|
// 表格数据
|
||||||
let tableData = ref([
|
let tableData = ref([]);
|
||||||
{ name: "0000255", manager: "565656" },
|
// table选中
|
||||||
{ name: "0000255", manager: "565656" },
|
const onSelectChange = (selectedRowKeys, record) => {
|
||||||
{ name: "0000255", manager: "565656" },
|
state.selectedRowKeys = selectedRowKeys;
|
||||||
{ name: "0000255", manager: "565656" },
|
state.routerId = record?.map((item) => {
|
||||||
{ name: "0000255", manager: "565656" },
|
return item.boeRouterInfoId;
|
||||||
{ name: "0000255", manager: "565656" },
|
});
|
||||||
{ name: "0000255", manager: "565656" },
|
};
|
||||||
{ name: "0000255", manager: "565656" },
|
//请求组织接口
|
||||||
{ name: "0000255", manager: "565656" },
|
const getOrgList = async () => {
|
||||||
{ name: "0000255", manager: "565656" },
|
const res = await api.userGetUserOrg({});
|
||||||
{ name: "0000255", manager: "565656" },
|
if (res) {
|
||||||
{ name: "0000255", manager: "565656" },
|
state.option = res.data?.result?.list;
|
||||||
]);
|
state.orgId = res.data?.result?.treeNodeList;
|
||||||
|
state.resetOrgId = res.data?.result?.treeNodeList;
|
||||||
|
res.data?.result?.userType === 1
|
||||||
|
? (state.allowClear = true)
|
||||||
|
: (state.allowClear = false);
|
||||||
|
getTableData();
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
// cloumns 表头
|
// cloumns 表头
|
||||||
const columns = ref([
|
const columns = ref([
|
||||||
{
|
{
|
||||||
title: "编号",
|
title: "编号",
|
||||||
dataIndex: "name",
|
dataIndex: "num",
|
||||||
key: "name",
|
key: "num",
|
||||||
ellipsis: true,
|
ellipsis: true,
|
||||||
align: "center",
|
align: "center",
|
||||||
|
width: 120,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: "路径名称",
|
title: "路径名称",
|
||||||
dataIndex: "manager",
|
dataIndex: "boeRouterInfoName",
|
||||||
ellipsis: true,
|
ellipsis: true,
|
||||||
key: "manager",
|
key: "boeRouterInfoName",
|
||||||
align: "center",
|
align: "center",
|
||||||
|
width: 120,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: "归属组织",
|
title: "归属组织",
|
||||||
dataIndex: "manager",
|
dataIndex: "organizationName",
|
||||||
ellipsis: true,
|
ellipsis: true,
|
||||||
key: "manager",
|
key: "organizationName",
|
||||||
align: "center",
|
align: "center",
|
||||||
|
width: 120,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: "关卡数",
|
title: "关卡数",
|
||||||
dataIndex: "manager",
|
dataIndex: "levelTotal",
|
||||||
ellipsis: true,
|
ellipsis: true,
|
||||||
key: "manager",
|
key: "levelTotal",
|
||||||
align: "center",
|
align: "center",
|
||||||
|
width: 120,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: "任务数",
|
title: "任务数",
|
||||||
dataIndex: "manager",
|
dataIndex: "taskTotal",
|
||||||
ellipsis: true,
|
ellipsis: true,
|
||||||
key: "manager",
|
key: "taskTotal",
|
||||||
align: "center",
|
align: "center",
|
||||||
|
width: 120,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: "学习人数",
|
title: "学习人数",
|
||||||
dataIndex: "manager",
|
dataIndex: "learnerNumber",
|
||||||
ellipsis: true,
|
ellipsis: true,
|
||||||
key: "manager",
|
key: "learnerNumber",
|
||||||
align: "center",
|
align: "center",
|
||||||
|
width: 120,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: "完成人数",
|
title: "完成人数",
|
||||||
dataIndex: "manager",
|
dataIndex: "completionNumber",
|
||||||
ellipsis: true,
|
ellipsis: true,
|
||||||
key: "manager",
|
key: "completionNumber",
|
||||||
align: "center",
|
align: "center",
|
||||||
|
width: 120,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: "发布时间",
|
title: "发布时间",
|
||||||
dataIndex: "manager",
|
dataIndex: "createTime",
|
||||||
ellipsis: true,
|
ellipsis: true,
|
||||||
key: "manager",
|
key: "createTime",
|
||||||
align: "center",
|
align: "center",
|
||||||
|
width: 120,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: "路径状态",
|
title: "路径状态",
|
||||||
dataIndex: "manager",
|
dataIndex: "status",
|
||||||
ellipsis: true,
|
ellipsis: true,
|
||||||
key: "manager",
|
key: "status",
|
||||||
align: "center",
|
align: "center",
|
||||||
|
width: 120,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: "操作",
|
title: "操作",
|
||||||
@@ -185,17 +230,189 @@ export default {
|
|||||||
width: 150,
|
width: 150,
|
||||||
align: "center",
|
align: "center",
|
||||||
fixed: "right",
|
fixed: "right",
|
||||||
customRender: () => {
|
customRender: (record) => {
|
||||||
return <a>导出历史记录</a>;
|
return (
|
||||||
|
<div>
|
||||||
|
<a
|
||||||
|
key="export"
|
||||||
|
onClick={() => {
|
||||||
|
oneExport(record);
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
导出历史记录
|
||||||
|
</a>
|
||||||
|
|
||||||
|
<a
|
||||||
|
key="export"
|
||||||
|
onClick={() => {
|
||||||
|
oneCurrentExport(record);
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
导出当前数据
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
|
);
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
]);
|
]);
|
||||||
|
// 导出历史记录
|
||||||
|
const oneExport = (record) => {
|
||||||
|
axios({
|
||||||
|
method: "post",
|
||||||
|
url: "/report/boeu/router/exportHistoryRecord",
|
||||||
|
data: { routerId: `${record.record.boeRouterInfoId}` },
|
||||||
|
responseType: "blob",
|
||||||
|
headers: {
|
||||||
|
token: Cookies.get("token"),
|
||||||
|
},
|
||||||
|
}).then((res) => {
|
||||||
|
downLoad(res.data, "历史学习数据.xlsx");
|
||||||
|
});
|
||||||
|
};
|
||||||
|
// 导出当前数据
|
||||||
|
const oneCurrentExport = (record) => {
|
||||||
|
axios({
|
||||||
|
method: "post",
|
||||||
|
url: "/report/boeu/router/exportCurrentRecord",
|
||||||
|
data: { routerId: `${record.record.boeRouterInfoId}` },
|
||||||
|
responseType: "blob",
|
||||||
|
headers: {
|
||||||
|
token: Cookies.get("token"),
|
||||||
|
},
|
||||||
|
}).then((res) => {
|
||||||
|
downLoad(res.data, "当前学习数据.xlsx");
|
||||||
|
});
|
||||||
|
};
|
||||||
//table 分页事件
|
//table 分页事件
|
||||||
const changePagination = (page) => {
|
const changePagination = (page) => {
|
||||||
state.pageNo = page;
|
state.pageNo = page;
|
||||||
|
getTableData();
|
||||||
};
|
};
|
||||||
|
// 获取数据
|
||||||
|
const getTableData = async () => {
|
||||||
|
state.tableLoading = true;
|
||||||
|
const res = await api.boeuRouterPlatePageList({
|
||||||
|
page: state.pageNo,
|
||||||
|
size: state.pageSize,
|
||||||
|
orgId: state.orgId ? state.orgId[state.orgId.length - 1] : null,
|
||||||
|
routerName: state.routerName,
|
||||||
|
createName: state.createName,
|
||||||
|
startTime: state.startTime,
|
||||||
|
endTime: state.endTime,
|
||||||
|
name: state.name,
|
||||||
|
boeRouterInfoName: state.boeRouterInfoName,
|
||||||
|
});
|
||||||
|
if (res) {
|
||||||
|
state.tableDataTotal = res.data.total;
|
||||||
|
const list = res.data.rows?.map((item) => {
|
||||||
|
return {
|
||||||
|
key: item.id,
|
||||||
|
...item,
|
||||||
|
};
|
||||||
|
});
|
||||||
|
tableData.value = list;
|
||||||
|
state.tableLoading = false;
|
||||||
|
}
|
||||||
|
};
|
||||||
|
// 重置按钮
|
||||||
|
const reset = async () => {
|
||||||
|
state.tableLoading = true;
|
||||||
|
state.createName = "";
|
||||||
|
state.boeRouterInfoName = "";
|
||||||
|
state.orgId = state.resetOrgId;
|
||||||
|
getTableData();
|
||||||
|
};
|
||||||
|
//导出详细信息
|
||||||
|
const exportbtnz = async () => {
|
||||||
|
if (state.selectedRowKeys?.length > 0) {
|
||||||
|
axios({
|
||||||
|
method: "post",
|
||||||
|
url: "/report/boeu/router/exportCurrentRecord",
|
||||||
|
data: { routerIdList: state.selectedRowKeys },
|
||||||
|
responseType: "blob",
|
||||||
|
headers: {
|
||||||
|
token: Cookies.get("token"),
|
||||||
|
},
|
||||||
|
}).then((res) => {
|
||||||
|
downLoad(res.data, "详细信息.xlsx");
|
||||||
|
}),(err) => {
|
||||||
|
message.error(err)
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
const params = {
|
||||||
|
createName: state.createName,
|
||||||
|
boeRouterInfoName: state.boeRouterInfoName,
|
||||||
|
orgId: state.orgId ? state.orgId[state.orgId.length - 1] : null,
|
||||||
|
};
|
||||||
|
axios({
|
||||||
|
method: "post",
|
||||||
|
url: "/report/boeu/router/exportCurrentRecord",
|
||||||
|
data: params,
|
||||||
|
responseType: "blob",
|
||||||
|
headers: {
|
||||||
|
token: Cookies.get("token"),
|
||||||
|
},
|
||||||
|
}).then((res) => {
|
||||||
|
downLoad(res.data, "详细信息.xlsx");
|
||||||
|
}),(err) => {
|
||||||
|
message.error(err)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
|
// 导出列表信息
|
||||||
|
const exportAllbtnz = async () => {
|
||||||
|
if (state.selectedRowKeys?.length > 0) {
|
||||||
|
axios({
|
||||||
|
method: "post",
|
||||||
|
url: "/report/boeu/router/exportList",
|
||||||
|
data: { routerIdList: state.selectedRowKeys },
|
||||||
|
responseType: "blob",
|
||||||
|
headers: {
|
||||||
|
token: Cookies.get("token"),
|
||||||
|
},
|
||||||
|
}).then((res) => {
|
||||||
|
downLoad(res.data, "学习路径图信息.xlsx");
|
||||||
|
}),(err) => {
|
||||||
|
message.error(err)
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
const params = {
|
||||||
|
page: state.pageNo,
|
||||||
|
size: state.pageSize,
|
||||||
|
orgId: state.orgId ? state.orgId[state.orgId.length - 1] : null,
|
||||||
|
router: state.routerId,
|
||||||
|
routerName: state.routerName,
|
||||||
|
createName: state.createName,
|
||||||
|
startTime: state.startTime,
|
||||||
|
endTime: state.endTime,
|
||||||
|
name: state.name,
|
||||||
|
};
|
||||||
|
axios({
|
||||||
|
method: "post",
|
||||||
|
url: "/report/boeu/router/exportList",
|
||||||
|
data: params,
|
||||||
|
responseType: "blob",
|
||||||
|
headers: {
|
||||||
|
token: Cookies.get("token"),
|
||||||
|
},
|
||||||
|
}).then((res) => {
|
||||||
|
downLoad(res.data, "学习路径图信息.xlsx");
|
||||||
|
}),(err) => {
|
||||||
|
message.error(err)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
};
|
||||||
|
onMounted(() => {
|
||||||
|
getOrgList();
|
||||||
|
state.tableLoading = true;
|
||||||
|
});
|
||||||
return {
|
return {
|
||||||
|
exportAllbtnz,
|
||||||
|
onSelectChange,
|
||||||
|
exportbtnz,
|
||||||
|
reset,
|
||||||
|
getTableData,
|
||||||
...toRefs(state),
|
...toRefs(state),
|
||||||
tableData,
|
tableData,
|
||||||
columns,
|
columns,
|
||||||
@@ -219,7 +436,7 @@ export default {
|
|||||||
.select {
|
.select {
|
||||||
margin-right: 20px;
|
margin-right: 20px;
|
||||||
margin-bottom: 20px;
|
margin-bottom: 20px;
|
||||||
width: calc((100% - 76px - 360px) / 4);
|
width: calc((100% - 56px) / 4);
|
||||||
}
|
}
|
||||||
|
|
||||||
.addTimeBox {
|
.addTimeBox {
|
||||||
|
|||||||
Reference in New Issue
Block a user