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, //列的数量
|
columns: 3, //列的数量
|
||||||
fileBaseUrl: process.env.VUE_APP_FILE_BASE_URL,
|
fileBaseUrl: process.env.VUE_APP_FILE_BASE_URL,
|
||||||
// 查询信息
|
// 查询信息
|
||||||
types: {
|
|
||||||
sysTypesSub: "",
|
|
||||||
subOne: "",
|
|
||||||
subTow: "",
|
|
||||||
sysTypes: null,
|
|
||||||
oneSubList: [],
|
|
||||||
towSubList: []
|
|
||||||
},
|
|
||||||
course: {
|
course: {
|
||||||
orderField: "studys",
|
orderField: "studys",
|
||||||
keywrod:'',//关键词
|
keywrod:'',//关键词
|
||||||
@@ -431,15 +423,8 @@ export default {
|
|||||||
},
|
},
|
||||||
ankingList: [],
|
ankingList: [],
|
||||||
scorelist: [],
|
scorelist: [],
|
||||||
searchTags: [],
|
|
||||||
queryExpand: true, // true更多,false收起
|
queryExpand: true, // true更多,false收起
|
||||||
category: null,
|
//status: 1,
|
||||||
categorySub: 0,
|
|
||||||
type1: 0,
|
|
||||||
type2: [],
|
|
||||||
type3: 0,
|
|
||||||
type4: 0,
|
|
||||||
status: 1,
|
|
||||||
pager: {
|
pager: {
|
||||||
total: 40
|
total: 40
|
||||||
},
|
},
|
||||||
@@ -764,48 +749,6 @@ export default {
|
|||||||
this.totalPages = 1;
|
this.totalPages = 1;
|
||||||
this.search();
|
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() {
|
async getSceneData() {
|
||||||
try {
|
try {
|
||||||
@@ -866,28 +809,11 @@ export default {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
this.isFind = true;
|
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.course.device = 1;
|
this.course.device = 1;
|
||||||
//this.getTags();
|
if(this.course.pageIndex == 1) {
|
||||||
// if(this.course.pageIndex == 1) {
|
this.courseList = [];
|
||||||
// this.courseList = [];
|
}
|
||||||
// }
|
|
||||||
|
|
||||||
let isTopList = [];
|
let isTopList = [];
|
||||||
// 隐藏loadMore
|
// 隐藏loadMore
|
||||||
@@ -928,69 +854,18 @@ export default {
|
|||||||
});
|
});
|
||||||
|
|
||||||
},
|
},
|
||||||
getTags() {
|
// showInApply() {
|
||||||
this.searchTags = [];
|
// this.inapply.show = true;
|
||||||
let courseData = deepClone(this.course);
|
// },
|
||||||
for (let i in courseData) {
|
// pushEnter(type) {
|
||||||
if (
|
// this.type1.push(type);
|
||||||
courseData[i] !== "" &&
|
// },
|
||||||
i !== "pageIndex" &&
|
// deleteOut(type) {
|
||||||
i !== "pageSize" &&
|
// this.type1 = this.type.filter(item => item != type);
|
||||||
i !== "orderField" &&
|
// },
|
||||||
i !== "orderAsc" &&
|
// chooseShow(type) {
|
||||||
i !== "topOrder" &&
|
// return this.type1.some(item => item == type);
|
||||||
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;
|
|
||||||
},
|
|
||||||
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() {
|
getAnkingData() {
|
||||||
apiCourse.ranking().then(res => {
|
apiCourse.ranking().then(res => {
|
||||||
if (res.status == 200) {
|
if (res.status == 200) {
|
||||||
|
|||||||
Reference in New Issue
Block a user