mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/learning-system-portal.git
synced 2025-12-09 02:46:44 +08:00
清理页面变量
This commit is contained in:
@@ -405,14 +405,6 @@ export default {
|
||||
columns: 3, //列的数量
|
||||
fileBaseUrl: process.env.VUE_APP_FILE_BASE_URL,
|
||||
// 查询信息
|
||||
types: {
|
||||
sysTypesSub: "",
|
||||
subOne: "",
|
||||
subTow: "",
|
||||
sysTypes: null,
|
||||
oneSubList: [],
|
||||
towSubList: []
|
||||
},
|
||||
course: {
|
||||
orderField: "studys",
|
||||
keywrod:'',//关键词
|
||||
@@ -431,15 +423,8 @@ export default {
|
||||
},
|
||||
ankingList: [],
|
||||
scorelist: [],
|
||||
searchTags: [],
|
||||
queryExpand: true, // true更多,false收起
|
||||
category: null,
|
||||
categorySub: 0,
|
||||
type1: 0,
|
||||
type2: [],
|
||||
type3: 0,
|
||||
type4: 0,
|
||||
status: 1,
|
||||
//status: 1,
|
||||
pager: {
|
||||
total: 40
|
||||
},
|
||||
@@ -764,48 +749,6 @@ export default {
|
||||
this.totalPages = 1;
|
||||
this.search();
|
||||
},
|
||||
tagsClose(tag, index) {
|
||||
for (let i in this.course) {
|
||||
if (tag.id === this.course[i]) {
|
||||
this.course[i] = "";
|
||||
if (i === "sysType1") {
|
||||
this.types.sysTypes = "";
|
||||
this.types.subOne = "";
|
||||
this.types.subTow = "";
|
||||
this.types.oneSubList = [];
|
||||
this.types.towSubList = [];
|
||||
}
|
||||
if (i === "sysType2") {
|
||||
this.types.subOne = "";
|
||||
this.types.oneSubList = [];
|
||||
}
|
||||
if (i === "sysType3") {
|
||||
this.types.subTow = "";
|
||||
this.types.towSubList = [];
|
||||
}
|
||||
if (i === "type") {
|
||||
this.category = "";
|
||||
this.categorySub = "";
|
||||
}
|
||||
|
||||
this.searchTags.splice(index, 1);
|
||||
if(i === 'type') {
|
||||
this.category = null;
|
||||
this.categorySub = null;
|
||||
}
|
||||
if (i === "sysType1") {
|
||||
this.types.sysTypes = null;
|
||||
}
|
||||
if (i === "sysType2") {
|
||||
this.types.subOne = null;
|
||||
}
|
||||
if (i === "sysType3") {
|
||||
this.types.subTow = null;
|
||||
}
|
||||
}
|
||||
}
|
||||
this.searchData();
|
||||
},
|
||||
//获取场景,保留
|
||||
async getSceneData() {
|
||||
try {
|
||||
@@ -866,28 +809,11 @@ export default {
|
||||
}
|
||||
});
|
||||
|
||||
this.isFind = true;
|
||||
// this.course.type = this.category;
|
||||
// if (this.types.sysTypes == 0 || this.types.sysTypes == null) {
|
||||
// this.course.sysType1 = "";
|
||||
// this.course.sysType2 = "";
|
||||
// this.course.sysType3 = "";
|
||||
// } else {
|
||||
// this.course.sysType1 = this.types.sysTypes;
|
||||
// }
|
||||
// this.course.sysType2 = this.types.subOne;
|
||||
// this.course.sysType3 = this.types.subTow;
|
||||
// if (this.course.sysType2 == 0) {
|
||||
// this.course.sysType2 = "";
|
||||
// }
|
||||
// if (this.course.sysType3 == 0) {
|
||||
// this.course.sysType3 = "";
|
||||
// }
|
||||
this.isFind = true;
|
||||
this.course.device = 1;
|
||||
//this.getTags();
|
||||
// if(this.course.pageIndex == 1) {
|
||||
// this.courseList = [];
|
||||
// }
|
||||
if(this.course.pageIndex == 1) {
|
||||
this.courseList = [];
|
||||
}
|
||||
|
||||
let isTopList = [];
|
||||
// 隐藏loadMore
|
||||
@@ -928,69 +854,18 @@ export default {
|
||||
});
|
||||
|
||||
},
|
||||
getTags() {
|
||||
this.searchTags = [];
|
||||
let courseData = deepClone(this.course);
|
||||
for (let i in courseData) {
|
||||
if (
|
||||
courseData[i] !== "" &&
|
||||
i !== "pageIndex" &&
|
||||
i !== "pageSize" &&
|
||||
i !== "orderField" &&
|
||||
i !== "orderAsc" &&
|
||||
i !== "topOrder" &&
|
||||
i !== "device" &&
|
||||
i !== "audiences" &&
|
||||
i !== "companyId" &&
|
||||
courseData[i] !== null &&
|
||||
courseData[i] !== undefined
|
||||
) {
|
||||
let id = courseData[i];
|
||||
if (i == "type" && courseData[i] !== 0) {
|
||||
courseData[i] = courseType(courseData[i]);
|
||||
}
|
||||
if (i == "sysType1" || i == "sysType2" || i == "sysType3") {
|
||||
if (courseData[i] !== "0") {
|
||||
courseData[i] = this.sysTypeName(courseData[i]);
|
||||
}
|
||||
}
|
||||
if (i == "type" && courseData[i] === 0) {
|
||||
courseData[i] = "在线课";
|
||||
}
|
||||
if (i == "openCourse") {
|
||||
if(courseData[i] === 0){
|
||||
courseData[i] = "0";
|
||||
}else{
|
||||
courseData[i] = "公开课";
|
||||
}
|
||||
}
|
||||
if (courseData[i] !== "0") {
|
||||
this.searchTags.push({
|
||||
id: id,
|
||||
name: courseData[i]
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
// goTarget(href) {
|
||||
// window.open(this.webBaseUrl+href, "_blank");
|
||||
// showInApply() {
|
||||
// this.inapply.show = true;
|
||||
// },
|
||||
// pushEnter(type) {
|
||||
// this.type1.push(type);
|
||||
// },
|
||||
// deleteOut(type) {
|
||||
// this.type1 = this.type.filter(item => item != type);
|
||||
// },
|
||||
// chooseShow(type) {
|
||||
// return this.type1.some(item => item == type);
|
||||
// },
|
||||
showInApply() {
|
||||
this.inapply.show = true;
|
||||
},
|
||||
findOrg() {
|
||||
//
|
||||
},
|
||||
pushEnter(type) {
|
||||
this.type1.push(type);
|
||||
},
|
||||
deleteOut(type) {
|
||||
this.type1 = this.type.filter(item => item != type);
|
||||
},
|
||||
chooseShow(type) {
|
||||
return this.type1.some(item => item == type);
|
||||
},
|
||||
getAnkingData() {
|
||||
apiCourse.ranking().then(res => {
|
||||
if (res.status == 200) {
|
||||
|
||||
Reference in New Issue
Block a user