diff --git a/src/views/report/Caseess.vue b/src/views/report/Caseess.vue index 3c82db44..4f041e93 100644 --- a/src/views/report/Caseess.vue +++ b/src/views/report/Caseess.vue @@ -23,6 +23,31 @@ > +
+ +
+
+ + +
@@ -112,7 +137,12 @@ export default { title: "", author: "", authorName: "", + publishTime: "", // 发布时间 selectedRowKeys: [], + orgId: null, // 状态值 + option: [], // 组织列表 + allowClear: true, + resetOrgId: [], }); // 表格数据 let tableData = ref([]); @@ -123,15 +153,28 @@ export default { return item.id; }); }; + //请求组织接口 + const getOrgList = async () => { + //todo 获取用户角色列表,判断里面是否有system-admin + // let roleList = store.state.userInfo.roleList; + const res = await api.userGetUserOrg(); + if (res) { + state.option = res.data?.result; + state.orgId = [state.option[0]?.organizationId]; + state.resetOrgId = [state.option[0]?.organizationId]; + state.allowClear = true; + // getTableData(); + } + }; // cloumns 表头 const columns = ref([ - { - title: "编号", - dataIndex: "num", - ellipsis: true, - key: "num", - align: "center", - }, + // { + // title: "编号", + // dataIndex: "num", + // ellipsis: true, + // key: "num", + // align: "center", + // }, { title: "案例名称", dataIndex: "title", @@ -146,6 +189,13 @@ export default { key: "orgDomain", align: "center", }, + // { + // title: "案例分类", + // dataIndex: "majorType1", + // ellipsis: true, + // key: "majorType1", + // align: "center", + // }, { title: "专业分类", dataIndex: "majorType", @@ -160,6 +210,13 @@ export default { key: "views", align: "center", }, + { + title: "点赞量", + dataIndex: "praises", + ellipsis: true, + key: "praises", + align: "center", + }, { title: "评论数", dataIndex: "comments", @@ -167,13 +224,13 @@ export default { key: "comments", align: "center", }, - { - title: "分享量", - dataIndex: "shares", - ellipsis: true, - key: "shares", - align: "center", - }, + // { + // title: "分享量", + // dataIndex: "shares", + // ellipsis: true, + // key: "shares", + // align: "center", + // }, { title: "收藏数", dataIndex: "favorites", @@ -189,12 +246,19 @@ export default { align: "center", }, { - title: "状态", - dataIndex: "caseScope", + title: "创建人/作者", + dataIndex: "authorName", ellipsis: true, - key: "caseScope", + key: "authorName", align: "center", }, + // { + // title: "状态", + // dataIndex: "caseScope", + // ellipsis: true, + // key: "caseScope", + // align: "center", + // }, ]); // table 分页事件 const changePagination = (page) => { @@ -207,15 +271,19 @@ export default { const res = await api.boeuCasePlatePageList({ page: state.pageNo, size: state.pageSize, + orgId: state.orgId ? state.orgId[state.orgId.length - 1] : null, title: state.title, author: state.author, authorName: state.authorName, + // publishTime: state.publishTime, + startTime: state.publishTime[0], + endTime: state.publishTime[1], boeRouterInfoName: state.boeRouterInfoName, }); if (res) { console.log(res.data, "res.data"); - state.tableDataTotal = res.data.total; - const list = res.data.rows?.map((item) => { + state.tableDataTotal = res.data.result.total; + const list = res.data.result.rows?.map((item) => { return { key: item.id, ...item, @@ -232,6 +300,7 @@ export default { state.title = ""; state.authorName = ""; state.author = ""; + state.publishTime = []; getTableData(); }; const searchData = async () => { @@ -262,6 +331,9 @@ export default { size: state.pageSize, title: state.title, author: state.author, + // publishTime: state.publishTime, + startTime: state.publishTime[0], + endTime: state.publishTime[1], }; axios({ method: "post", @@ -280,6 +352,7 @@ export default { } }; onMounted(() => { + getOrgList(); getTableData(); state.tableLoading = true; }); @@ -313,7 +386,7 @@ export default { .select { margin-right: 20px; margin-bottom: 20px; - width: calc((100% - 76px - 200px) / 2); + width: calc((100% - 76px - 240px) / 4); } .btnz {