This commit is contained in:
BOE\10867418
2023-08-18 17:49:38 +08:00
parent 7ce5070e88
commit f902de8044
5 changed files with 43 additions and 36 deletions

View File

@@ -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)
// 课程列表接口

View File

@@ -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)
// 项目列表

View File

@@ -21,9 +21,9 @@
:allowClear="allowClear"
style="width: 100%"
:fieldNames="{
label: 'name',
value: 'id',
children: 'treeChildList',
label: 'orgName',
value: 'organizationId',
children: 'childList',
}"
>
</a-cascader>
@@ -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;
}
};

View File

@@ -5,6 +5,7 @@
<div class="filter">
<div class="select">
<a-cascader
change-on-select
:options="option"
v-model:value="orgId"
style="width: 100%"
@@ -173,16 +174,14 @@ export default {
}
//请求组织接口
const getOrgList = async () => {
let params = {
roleList: store.state.userInfo.roleList,
userId: store.state.userInfo.userId
}
const res = await api.userGetUserOrg(params);
//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 = false
state.orgId = [state.option[0]?.organizationId];
state.resetOrgId = [state.option[0]?.organizationId];
state.allowClear = true;
getTableData();
}
};

View File

@@ -21,9 +21,9 @@
:allowClear="allowClear"
style="width: 100%"
:fieldNames="{
label: 'name',
value: 'id',
children: 'treeChildList',
label: 'orgName',
value: 'organizationId',
children: 'childList',
}"
>
</a-cascader>
@@ -169,9 +169,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: "reportProject",
setup() {
const store = useStore();
const state = reactive({
tableLoading: false, // table加载图标
tableDataTotal: 0, // 数据总条数
@@ -290,14 +292,16 @@ export default {
};
//请求组织接口
const getOrgList = async () => {
const res = await api.userGetUserOrg({});
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?.list;
state.orgId = res.data?.result?.treeNodeList;
state.resetOrgId = res.data?.result?.treeNodeList;
res.data?.result?.userType === 1
? (state.allowClear = true)
: (state.allowClear = false);
state.option = res.data?.result;
state.orgId = [state.option[0]?.organizationId];
state.resetOrgId = [state.option[0]?.organizationId];
state.allowClear = true
getTableData();
}
};
@@ -343,8 +347,9 @@ export default {
});
return list;
};
tableData.value = fun(res.data.rows);
state.tableDataTotal = res.data.total;
tableData.value = fun(res.data.result.rows);
state.tableDataTotal = res.data.result.total;
console.log("safgaga"+res.data.result.total)
state.tableLoading = false;
}
};