mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/fe-manage.git
synced 2025-12-09 10:56:46 +08:00
课程推荐弹窗列表实现
This commit is contained in:
@@ -10,7 +10,7 @@
|
|||||||
width="80%"
|
width="80%"
|
||||||
@cancel="handleCancel"
|
@cancel="handleCancel"
|
||||||
@ok="handleCancel"
|
@ok="handleCancel"
|
||||||
style="overflow-y:auto"
|
class="modal"
|
||||||
>
|
>
|
||||||
<div class="title">项目管理系列课</div>
|
<div class="title">项目管理系列课</div>
|
||||||
<dl>
|
<dl>
|
||||||
@@ -26,7 +26,7 @@
|
|||||||
<!-- 表格 -->
|
<!-- 表格 -->
|
||||||
<div class="tableBox">
|
<div class="tableBox">
|
||||||
<a-table style="border: 1px solid #f2f6fe" :columns="column" :data-source="data"
|
<a-table style="border: 1px solid #f2f6fe" :columns="column" :data-source="data"
|
||||||
:scroll="{ x: 1100 }" :pagination="false">
|
:scroll="{ x: 1100 }" :pagination="false" :loading="!tableLoading">
|
||||||
|
|
||||||
<template #operation="{ record }">
|
<template #operation="{ record }">
|
||||||
<a-space style="padding-right: 10px">
|
<a-space style="padding-right: 10px">
|
||||||
@@ -81,7 +81,8 @@ export default defineComponent({
|
|||||||
data:{
|
data:{
|
||||||
type:Array,
|
type:Array,
|
||||||
default:()=>([])
|
default:()=>([])
|
||||||
}
|
},
|
||||||
|
|
||||||
},
|
},
|
||||||
components: {
|
components: {
|
||||||
// OrgClassCheck,
|
// OrgClassCheck,
|
||||||
@@ -90,9 +91,6 @@ export default defineComponent({
|
|||||||
},
|
},
|
||||||
setup(props, { emit }) {
|
setup(props, { emit }) {
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// const loading = ref(false);
|
|
||||||
// // 查询数据
|
// // 查询数据
|
||||||
const searchData = ref({
|
const searchData = ref({
|
||||||
pageIndex: 1,
|
pageIndex: 1,
|
||||||
@@ -101,7 +99,7 @@ const searchData = ref({
|
|||||||
recommendTimeList: [],
|
recommendTimeList: [],
|
||||||
});
|
});
|
||||||
const handelChangePage = (page, pageSize) => {
|
const handelChangePage = (page, pageSize) => {
|
||||||
loading.value = false;
|
state.tableLoading = false;
|
||||||
searchData.value.pageSize = pageSize;
|
searchData.value.pageSize = pageSize;
|
||||||
searchData.value.pageIndex = page;
|
searchData.value.pageIndex = page;
|
||||||
getList();
|
getList();
|
||||||
@@ -110,15 +108,15 @@ const getList = (num) => {
|
|||||||
// if (num === 1) searchData.value.pageIndex = 1;
|
// if (num === 1) searchData.value.pageIndex = 1;
|
||||||
boeRequest(RECOMMEND_PAGE, searchData.value)
|
boeRequest(RECOMMEND_PAGE, searchData.value)
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
// loading.value = true;
|
state.tableLoading = true;
|
||||||
state.data = res?.result?.list || [];
|
state.data = res?.result?.list || [];
|
||||||
state.total = res?.result?.count || 0;
|
state.total = res?.result?.count || 0;
|
||||||
console.log(state.data)
|
console.log(state.data)
|
||||||
|
|
||||||
})
|
})
|
||||||
// .catch(() => {
|
.catch(() => {
|
||||||
// loading.value = false;
|
state.tableLoading = false;
|
||||||
// });
|
});
|
||||||
};
|
};
|
||||||
getList()
|
getList()
|
||||||
|
|
||||||
@@ -127,6 +125,7 @@ getList()
|
|||||||
const store = useStore();
|
const store = useStore();
|
||||||
|
|
||||||
const state = reactive({
|
const state = reactive({
|
||||||
|
tableLoading:false,
|
||||||
imgList: [],
|
imgList: [],
|
||||||
categoryName: "",
|
categoryName: "",
|
||||||
locationHref:
|
locationHref:
|
||||||
@@ -315,11 +314,15 @@ getList()
|
|||||||
value,
|
value,
|
||||||
searchData,
|
searchData,
|
||||||
getList,
|
getList,
|
||||||
|
handelChangePage,
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
<style lang="scss">
|
<style lang="scss">
|
||||||
|
.modal{
|
||||||
|
overflow-y: auto;
|
||||||
|
}
|
||||||
.title{
|
.title{
|
||||||
// background-color: rgba(255, 255, 255, 0);
|
// background-color: rgba(255, 255, 255, 0);
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
|
|||||||
Reference in New Issue
Block a user