fix:面授课分类显示及红色错误弹框修改

This commit is contained in:
wyx
2022-12-30 13:31:33 +08:00
parent 81f7a0e2ca
commit 19bcde539c
3 changed files with 29 additions and 24 deletions

View File

@@ -420,7 +420,7 @@ export default {
const getClassData = (tabledata) => {
let data = tabledata;
let array = [];
let options = state.options2222;
// let options = state.options2222;
data.map((value) => {
let obj = {
key: value.offcourseId,
@@ -430,30 +430,31 @@ export default {
creator: value.createName || "-",
time: value.publishTime,
categoryId: value.categoryId,
category: "",
category: changeTreeSelectValue(String(value.categoryId)),
//需要判断content
};
console.log("obj", obj);
var breaked = false;
// var breaked = false;
// obj.category = changeTreeSelectValue(String(value.categoryId))
for (let i = 0; i < options.length; i++) {
for (let j = 0; j < options[i].children.length; j++) {
if (
String(options[i].children[j].value) ===
String(obj.categoryId)
) {
obj.category = changeTreeSelectValue(String(obj.categoryId))
// console.log("obj.categoryId", obj.categoryId);
// obj.category = options[i].children[j].title;
// console.log("obj. obj.category ", obj.category);
breaked = true;
break;
}
}
if (breaked) {
break;
}
}
// for (let i = 0; i < options.length; i++) {
// for (let j = 0; j < options[i].children.length; j++) {
// if (
// String(options[i].children[j].value) ===
// String(obj.categoryId)
// ) {
// obj.category = changeTreeSelectValue(String(obj.categoryId))
// // console.log("obj.categoryId", obj.categoryId);
// // obj.category = options[i].children[j].title;
// // console.log("obj. obj.category ", obj.category);
// breaked = true;
// break;
// }
// }
// if (breaked) {
// break;
// }
// }
if (!obj.category) {
obj.category = "-";
}