Merge branch 'zcwy_0802_pingcode' into dev_master

This commit is contained in:
nisen
2024-09-19 18:13:44 +08:00

View File

@@ -3,6 +3,37 @@
<div class="curriculum">
<!-- 以下为顶部搜索框 -->
<div class="filter">
<div class="select">
<a-input
style="width: 100%; height: 40px; border-radius: 8px"
placeholder="请输入课程名称"
allowClear
showSearch
v-model:value="name"
@pressEnter="searchData"
>
</a-input>
</div>
<div class="select">
<a-input
style="width: 100%; height: 40px; border-radius: 8px"
placeholder="请输入创建者"
allowClear
showSearch
v-model:value="createName"
@pressEnter="searchData"
>
</a-input>
</div>
<div class="select">
<a-select
v-model:value="searchStatus"
style="width: 100%; height: 40px; border-radius: 8px"
placeholder="请选择类型"
:options="StateList"
allowClear
></a-select>
</div>
<div class="select">
<a-cascader
change-on-select
@@ -19,27 +50,22 @@
>
</a-cascader>
</div>
<div class="select">
<a-input
style="width: 100%; height: 40px; border-radius: 8px"
placeholder="请输入课程名称"
allowClear
showSearch
v-model:value="name"
>
</a-input>
<div style="display: flex; margin-bottom: 20px">
<div class="btnzx btnzx1" @click="searchData">
<div class="search"></div>
<div class="btnzText">搜索</div>
</div>
<div class="select">
<a-input
style="width: 100%; height: 40px; border-radius: 8px"
placeholder="请输入创建者"
allowClear
showSearch
v-model:value="createName"
>
</a-input>
<div class="btnz btnzx2" @click="resetClick">
<div class="search"></div>
<div class="btnzText">重置</div>
</div>
<div class="select">
</div>
<div @click="()=>{isShowChange = !isShowChange}" class="right_btn">
<span class="text">{{isShowChange?'展开':'收起'}}</span>
<DownOutlined v-if="isShowChange" style="color:#4ea6ff;" />
<UpOutlined v-else style="color:#4ea6ff;" />
</div>
<div v-if="!isShowChange" class="select">
<a-cascader
style="width: 100%"
placeholder="请选择分类"
@@ -55,7 +81,7 @@
}"
></a-cascader>
</div>
<div class="select">
<div v-if="!isShowChange" class="select" style="min-width: 300px">
<a-range-picker
v-model:value="publishTime"
type="date"
@@ -64,16 +90,7 @@
style="width: 100%; margin-right: 0px"
/>
</div>
<div style="display: flex; margin-bottom: 20px">
<div class="btnzx btnzx1" @click="searchData">
<div class="search"></div>
<div class="btnzText">搜索</div>
</div>
<div class="btnz btnzx2" @click="resetClick">
<div class="search"></div>
<div class="btnzText">重置</div>
</div>
</div>
</div>
<!-- 以下为导出按钮 -->
<div class="btnzs">
@@ -152,8 +169,16 @@ import Cookies from "vue-cookies";
import downLoad from "../../utils/downLoad";
import { message } from "ant-design-vue";
import {useStore} from 'vuex'
import {
DownOutlined,
UpOutlined,
} from '@ant-design/icons-vue';
export default {
name: "CurriculuM",
components: {
DownOutlined,
UpOutlined,
},
setup() {
const store = useStore();
const state = reactive({
@@ -166,12 +191,19 @@ export default {
name: "",
type: null,
createName: "",
searchStatus: null,
publishTime: "", // 发布时间
allowClear: false,
option: [],
selectedRowKeys: [],
typeOption:[]
typeOption:[],
isShowChange: true,
});
const StateList = ref([
{value:'',label:'全部'},
{value:'1',label:'面授'},
{value:'0',label:'在线'},
])
const searchData=async()=>{
state.pageNo=1
state.pageSize=10
@@ -235,11 +267,14 @@ export default {
// publishTime: state.publishTime,
startTime: typeof state.publishTime[0] === 'undefined' ? null : state.publishTime[0]+ " 00:00:00",
endTime: typeof state.publishTime[0] === 'undefined' ? null : state.publishTime[1]+ " 23:59:59",
courseType: state.searchStatus,
};
const res = await api.boeuCourseListPageV2(params);
if (res) {
if(res.data.status == 200){
tableData.value = res.data.result.rows;
state.tableDataTotal = res.data.result.total;
}
state.tableLoading = false;
}
};
@@ -266,6 +301,17 @@ export default {
align: "center",
width: 120,
},
{
title: "内容分类",
dataIndex: "oneType",
ellipsis: true,
key: "oneType",
align: "center",
width: 300,
customRender({record:{oneType,twoType,threeType,type}}){
return type.split('-').join(' / ');
}
},
{
title: "课程类型",
dataIndex: "courseType",
@@ -282,110 +328,102 @@ export default {
align: "center",
width: 120,
},
{
title: "归属项目",
dataIndex: "projectName",
ellipsis: true,
key: "projectName",
align: "center",
width: 120,
},
{
title: "归属路径图",
dataIndex: "routerName",
ellipsis: true,
key: "routerName",
align: "center",
width: 120,
},
{
title: "一级分类",
dataIndex: "oneType",
ellipsis: true,
key: "oneType",
align: "center",
width: 120,
},
{
title: "二级分类",
dataIndex: "twoType",
ellipsis: true,
key: "twoType",
align: "center",
width: 120,
},
{
title: "三级分类",
dataIndex: "threeType",
ellipsis: true,
key: "threeType",
align: "center",
width: 120,
},
{
title: "授课教师",
dataIndex: "teacher",
ellipsis: true,
key: "teacher",
align: "center",
width: 120,
},
{
title: "开课次数",
dataIndex: "classTotal",
ellipsis: true,
key: "classTotal",
align: "center",
width: 120,
},
{
title: "学习人数",
dataIndex: "learnerNumber",
ellipsis: true,
key: "learnerNumber",
align: "center",
width: 120,
},
{
title: "评论数",
dataIndex: "commentTotal",
ellipsis: true,
key: "commentTotal",
align: "center",
width: 120,
},
{
title: "点赞数",
dataIndex: "likesTotal",
ellipsis: true,
key: "likesTotal",
align: "center",
width: 120,
},
{
title: "收藏数",
dataIndex: "collectionsTotal",
ellipsis: true,
key: "collectionsTotal",
align: "center",
width: 120,
},
{
title: "平均评分",
dataIndex: "score",
ellipsis: true,
key: "score",
align: "center",
width: 120,
},
{
title: "发布时间",
dataIndex: "publishTime",
ellipsis: true,
key: "publishTime",
align: "center",
width: 140,
},
// {
// title: "归属项目",
// dataIndex: "projectName",
// ellipsis: true,
// key: "projectName",
// align: "center",
// width: 120,
// },
// {
// title: "归属路径图",
// dataIndex: "routerName",
// ellipsis: true,
// key: "routerName",
// align: "center",
// width: 120,
// },
// {
// title: "一级分类",
// dataIndex: "oneType",
// ellipsis: true,
// key: "oneType",
// align: "center",
// width: 120,
// },
// {
// title: "二级分类",
// dataIndex: "twoType",
// ellipsis: true,
// key: "twoType",
// align: "center",
// width: 120,
// },
// {
// title: "三级分类",
// dataIndex: "threeType",
// ellipsis: true,
// key: "threeType",
// align: "center",
// width: 120,
// },
// {
// title: "授课教师",
// dataIndex: "teacher",
// ellipsis: true,
// key: "teacher",
// align: "center",
// width: 120,
// },
// {
// title: "开课次数",
// dataIndex: "classTotal",
// ellipsis: true,
// key: "classTotal",
// align: "center",
// width: 120,
// },
// {
// title: "学习人数",
// dataIndex: "learnerNumber",
// ellipsis: true,
// key: "learnerNumber",
// align: "center",
// width: 120,
// },
// {
// title: "评论数",
// dataIndex: "commentTotal",
// ellipsis: true,
// key: "commentTotal",
// align: "center",
// width: 120,
// },
// {
// title: "点赞数",
// dataIndex: "likesTotal",
// ellipsis: true,
// key: "likesTotal",
// align: "center",
// width: 120,
// },
// {
// title: "收藏数",
// dataIndex: "collectionsTotal",
// ellipsis: true,
// key: "collectionsTotal",
// align: "center",
// width: 120,
// },
// {
// title: "平均评分",
// dataIndex: "score",
// ellipsis: true,
// key: "score",
// align: "center",
// width: 120,
// },
{
title: "发布状态",
dataIndex: "publishStatus",
@@ -394,14 +432,6 @@ export default {
align: "center",
width: 120,
},
{
title: "启用状态",
dataIndex: "enabled",
ellipsis: true,
key: "enabled",
align: "center",
width: 120,
},
{
title: "创建人",
dataIndex: "createName",
@@ -410,6 +440,38 @@ export default {
align: "center",
width: 120,
},
{
title: "发布时间",
dataIndex: "publishTime",
ellipsis: true,
key: "publishTime",
align: "center",
width: 140,
},
// {
// title: "发布状态",
// dataIndex: "publishStatus",
// ellipsis: true,
// key: "publishStatus",
// align: "center",
// width: 120,
// },
{
title: "启用状态",
dataIndex: "enabled",
ellipsis: true,
key: "enabled",
align: "center",
width: 120,
},
// {
// title: "创建人",
// dataIndex: "createName",
// ellipsis: true,
// key: "createName",
// align: "center",
// width: 120,
// },
{
title: "操作",
dataIndex: "operation",
@@ -449,6 +511,7 @@ export default {
state.type = null;
state.createName = "";
state.publishTime = [];
state.searchStatus = null;
getTableData();
};
const exportList = () => {
@@ -663,6 +726,7 @@ export default {
exportDetailClick,
getOption,
searchData,
StateList,
};
},
};
@@ -679,10 +743,22 @@ export default {
margin-top: 30px;
display: flex;
flex-wrap: wrap;
position: relative;
.select {
margin-right: 20px;
margin-bottom: 20px;
width: calc((100% - 76px - 220px) / 3);
width: calc((100% - 76px - 220px) / 5);
}
.right_btn{
position: absolute;
right: 20px;
height: 40px;
line-height: 40px;
cursor: pointer;
.text{
margin-right: 14px;
color:#4ea6ff;
}
}
.btnz {