mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/fe-manage.git
synced 2025-12-25 10:42:54 +08:00
feat: 文章,项目,课程接口联调
This commit is contained in:
@@ -29,12 +29,18 @@
|
||||
</a-cascader>
|
||||
</div>
|
||||
<div class="select">
|
||||
<a-select
|
||||
<a-cascader
|
||||
style="width: 100%"
|
||||
placeholder="请选择分类"
|
||||
allowClear
|
||||
v-model:value="type"
|
||||
></a-select>
|
||||
:options="typeOption"
|
||||
:fieldNames="{
|
||||
label: 'name',
|
||||
value: 'name',
|
||||
children: 'children',
|
||||
}"
|
||||
></a-cascader>
|
||||
</div>
|
||||
<div class="select">
|
||||
<a-input
|
||||
@@ -149,19 +155,19 @@ export default {
|
||||
allowClear: true,
|
||||
option: [],
|
||||
selectedRowKeys: [],
|
||||
typeOption:[]
|
||||
});
|
||||
// 分类选项接口
|
||||
const getOption = async () => {
|
||||
|
||||
};
|
||||
const getOption = async () => {};
|
||||
//请求组织接口
|
||||
const getOrgList = async () => {
|
||||
const res = await api.userGetUserOrg({});
|
||||
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
|
||||
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);
|
||||
getTableData();
|
||||
@@ -176,7 +182,7 @@ export default {
|
||||
: null,
|
||||
pageNo: state.pageNo,
|
||||
pageSize: state.pageSize,
|
||||
type: state.type,
|
||||
type: state.type ? state.type[state.type.length - 1]:null,
|
||||
createName: state.createName,
|
||||
};
|
||||
const res = await api.boeuCourseListPageV2(params);
|
||||
@@ -368,9 +374,10 @@ export default {
|
||||
//table 分页事件
|
||||
const changePagination = (page) => {
|
||||
state.pageNo = page;
|
||||
getTableData()
|
||||
getTableData();
|
||||
};
|
||||
onMounted(() => {
|
||||
getType()
|
||||
getOrgList();
|
||||
state.tableLoading = true;
|
||||
});
|
||||
@@ -409,7 +416,7 @@ export default {
|
||||
: null,
|
||||
pageNo: state.pageNo,
|
||||
pageSize: state.pageSize,
|
||||
type: state.type,
|
||||
type: state.type ? state.type[state.type.length - 1]:null,
|
||||
createName: state.createName,
|
||||
};
|
||||
axios({
|
||||
@@ -456,7 +463,7 @@ export default {
|
||||
: null,
|
||||
pageNo: state.pageNo,
|
||||
pageSize: state.pageSize,
|
||||
type: state.type,
|
||||
type: state.type ? state.type[state.type.length - 1]:null,
|
||||
createName: state.createName,
|
||||
};
|
||||
axios({
|
||||
@@ -521,7 +528,7 @@ export default {
|
||||
: null,
|
||||
pageNo: state.pageNo,
|
||||
pageSize: state.pageSize,
|
||||
type: state.type,
|
||||
type: state.type ? state.type[state.type.length - 1]:null,
|
||||
createName: state.createName,
|
||||
};
|
||||
axios({
|
||||
@@ -542,11 +549,34 @@ export default {
|
||||
);
|
||||
}
|
||||
};
|
||||
const getType = () => {
|
||||
axios({
|
||||
method: "get",
|
||||
url: "/systemapi/xboe/type/tree-list",
|
||||
params: {
|
||||
sysResType: "1",
|
||||
status: "1",
|
||||
},
|
||||
headers: {
|
||||
"XBOR-Access-token": Cookies.get("token"),
|
||||
},
|
||||
}).then(
|
||||
(res) => {
|
||||
console.log(res.data.result)
|
||||
state.typeOption=res.data.result
|
||||
},
|
||||
(err) => {
|
||||
message.error(err);
|
||||
}
|
||||
);
|
||||
};
|
||||
|
||||
return {
|
||||
...toRefs(state),
|
||||
exportPlanList,
|
||||
exportDetail,
|
||||
exportList,
|
||||
getType,
|
||||
getTableData,
|
||||
tableData,
|
||||
columns,
|
||||
|
||||
Reference in New Issue
Block a user