diff --git a/src/api/indexOvervoew.js b/src/api/indexOvervoew.js index 1d4353c8..933110f7 100644 --- a/src/api/indexOvervoew.js +++ b/src/api/indexOvervoew.js @@ -8,7 +8,7 @@ export const boeuExamPageList = (obj) => http.post('/boeu/exam/pageList', obj) //概览页面案例列表请求接口 export const boeuCasePageList = (obj) => http.post('/boeu/case/pageList', obj) // 请求组织接口 -export const userGetUserOrg = (obj) => http.post('/org/getUserOrg', obj) +export const userGetUserOrg = (obj) => https.get(`/organization/all/tree`,obj) // 请求所属组织接口 export const userInfo = (obj) => https.post('/user/info', obj) // 课程列表接口 diff --git a/src/api/indexProject.js b/src/api/indexProject.js index e3aafe5f..1b465964 100644 --- a/src/api/indexProject.js +++ b/src/api/indexProject.js @@ -1,7 +1,7 @@ import http from "./configz"; import https from './confign' // 请求组织接口 -export const userGetUserOrg = (obj) => https.post('/user/getUserOrg', obj) +export const userGetUserOrg = (obj) => http.post('/org/getUserOrg', obj) // 请求所属组织接口 export const userInfo = (obj) => https.post('/user/info', obj) // 项目列表 diff --git a/src/views/report/Curriculum.vue b/src/views/report/Curriculum.vue index f12da051..e22895d8 100644 --- a/src/views/report/Curriculum.vue +++ b/src/views/report/Curriculum.vue @@ -21,9 +21,9 @@ :allowClear="allowClear" style="width: 100%" :fieldNames="{ - label: 'name', - value: 'id', - children: 'treeChildList', + label: 'orgName', + value: 'organizationId', + children: 'childList', }" > @@ -141,9 +141,11 @@ import axios from "axios"; import Cookies from "vue-cookies"; import downLoad from "../../utils/downLoad"; import { message } from "ant-design-vue"; +import {useStore} from 'vuex' export default { name: "CurriculuM", setup() { + const store = useStore(); const state = reactive({ tableLoading: false, // table加载图标 tableDataTotal: 0, // 数据总条数 @@ -168,15 +170,16 @@ export default { const getOption = async () => {}; //请求组织接口 const getOrgList = async () => { - const result = await api.userGetUserOrg({}); - - if (result) { - state.option = result.data?.result?.list; - state.orgId = result.data?.result?.treeNodeList; - state.resetOrgId = result.data?.result?.treeNodeList; - result.data?.result?.userType === 1 - ? (state.allowClear = true) - : (state.allowClear = false); + let params = { + roleList: store.state.userInfo.roleList, + userId: store.state.userInfo.userId + } + const res = await api.userGetUserOrg(params); + if (res) { + state.option = res.data?.result; + state.orgId = [state.option[0]?.organizationId]; + state.resetOrgId = [state.option[0]?.organizationId]; + state.allowClear = true getTableData(); } }; @@ -194,8 +197,8 @@ export default { }; const res = await api.boeuCourseListPageV2(params); if (res) { - tableData.value = res.data.rows; - state.tableDataTotal = res.data.total; + tableData.value = res.data.result.rows; + state.tableDataTotal = res.data.result.total; state.tableLoading = false; } }; diff --git a/src/views/report/Learningpathmap.vue b/src/views/report/Learningpathmap.vue index 6f040d21..9cd646bb 100644 --- a/src/views/report/Learningpathmap.vue +++ b/src/views/report/Learningpathmap.vue @@ -5,6 +5,7 @@