fix:添加在线、添加考试、添加案例、添加测评功能完善

This commit is contained in:
Ggysh-7
2022-11-29 23:12:48 +08:00
parent b4b8d46fa1
commit f2647bf11f
6 changed files with 68 additions and 94 deletions

View File

@@ -160,7 +160,6 @@ export default {
currentPage: 1,
tableDataTotal: 0,
pageSize: 10,
searching:false,
selectedRowKeys: [],
apiTaskList: [],
inputV1: "",
@@ -222,23 +221,6 @@ export default {
const getTableDate = (tableData) => {
let data = tableData;
let array = [];
if(state.searching){
data.map((value, index) => {
let obj = {
key: index,
authorId: value.authorId,
authorName: value.authorName,
companyId: value.companyId,
coverUrl: value.coverUrl,
id: value.id,
casesId: value.casesId,
title: value.title,
};
if(obj.title == state.inputV1){
array.push(obj);
}
});
} else {
data.map((value, index) => {
let obj = {
key: index,
@@ -252,7 +234,6 @@ export default {
};
array.push(obj);
});
}
state.tableData = array;
};
//获取全部案例信息接口
@@ -264,7 +245,7 @@ export default {
orderField: "",
pageIndex: state.currentPage,
pageSize: state.pageSize,
top: true,
isTop: "",
})
.then((res) => {
if (res.status === 200) {
@@ -349,17 +330,14 @@ export default {
//搜索案例列表
const searchList = ()=> {
if(state.inputV1 !== ''){
state.searching = true
getAllCaseText()
}else {
state.searching = false
resetCase()
}
}
//重置案例信息
const resetCase = () => {
state.inputV1 = ""
state.searching = false
state.selectedRowKeys=[]
state.currentPage = 1
getAllCaseText();