|
@@ -84,7 +84,7 @@
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="right">
|
|
<div class="right">
|
|
- <div class="top">
|
|
|
|
|
|
+ <div class="top" style="border-radius: 5px">
|
|
<div class="titleBox">
|
|
<div class="titleBox">
|
|
<div class="title">课程分析</div>
|
|
<div class="title">课程分析</div>
|
|
<el-select v-model="cType" @change="typeChange" class="selectBox">
|
|
<el-select v-model="cType" @change="typeChange" class="selectBox">
|
|
@@ -187,68 +187,68 @@ export default {
|
|
this.getData();
|
|
this.getData();
|
|
},
|
|
},
|
|
methods: {
|
|
methods: {
|
|
- openCourse(cid){
|
|
|
|
|
|
+ openCourse(cid) {
|
|
window.parent.postMessage({ cid: cid, screenType: "3" }, "*");
|
|
window.parent.postMessage({ cid: cid, screenType: "3" }, "*");
|
|
},
|
|
},
|
|
- openCourse2(index){
|
|
|
|
|
|
+ openCourse2(index) {
|
|
console.log(index);
|
|
console.log(index);
|
|
// console.log(this.courseNumberArray);
|
|
// console.log(this.courseNumberArray);
|
|
- let id = this.courseNumberArray[index].typeid
|
|
|
|
- let typea = ""
|
|
|
|
- let typeb = ""
|
|
|
|
- let typed = ""
|
|
|
|
|
|
+ let id = this.courseNumberArray[index].typeid;
|
|
|
|
+ let typea = "";
|
|
|
|
+ let typeb = "";
|
|
|
|
+ let typed = "";
|
|
// console.log(this.gradeArray);
|
|
// console.log(this.gradeArray);
|
|
// console.log(this.subjectArray);
|
|
// console.log(this.subjectArray);
|
|
// console.log(this.themeArray);
|
|
// console.log(this.themeArray);
|
|
- let key = 0
|
|
|
|
|
|
+ let key = 0;
|
|
for (key in this.gradeArray) {
|
|
for (key in this.gradeArray) {
|
|
if (this.gradeArray.hasOwnProperty.call(this.gradeArray, key)) {
|
|
if (this.gradeArray.hasOwnProperty.call(this.gradeArray, key)) {
|
|
const element = this.gradeArray[key];
|
|
const element = this.gradeArray[key];
|
|
- if(element.typeid == id){
|
|
|
|
- typea = id
|
|
|
|
|
|
+ if (element.typeid == id) {
|
|
|
|
+ typea = id;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
for (key in this.subjectArray) {
|
|
for (key in this.subjectArray) {
|
|
if (this.subjectArray.hasOwnProperty.call(this.subjectArray, key)) {
|
|
if (this.subjectArray.hasOwnProperty.call(this.subjectArray, key)) {
|
|
const element = this.subjectArray[key];
|
|
const element = this.subjectArray[key];
|
|
- if(element.typeid == id){
|
|
|
|
- typed = id
|
|
|
|
|
|
+ if (element.typeid == id) {
|
|
|
|
+ typed = id;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
for (key in this.themeArray) {
|
|
for (key in this.themeArray) {
|
|
if (this.themeArray.hasOwnProperty.call(this.themeArray, key)) {
|
|
if (this.themeArray.hasOwnProperty.call(this.themeArray, key)) {
|
|
const element = this.themeArray[key];
|
|
const element = this.themeArray[key];
|
|
- if(element.typeid == id){
|
|
|
|
- typeb = id
|
|
|
|
|
|
+ if (element.typeid == id) {
|
|
|
|
+ typeb = id;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
window.parent.postMessage(
|
|
window.parent.postMessage(
|
|
- {
|
|
|
|
|
|
+ {
|
|
tools: "openCourse",
|
|
tools: "openCourse",
|
|
typea: typea || "",
|
|
typea: typea || "",
|
|
typeb: typeb || "",
|
|
typeb: typeb || "",
|
|
typed: typed || "",
|
|
typed: typed || "",
|
|
- },
|
|
|
|
|
|
+ },
|
|
"*"
|
|
"*"
|
|
);
|
|
);
|
|
},
|
|
},
|
|
- typeCourseCountCalu(){
|
|
|
|
- this.courseNumberArray2 = this.allArray
|
|
|
|
- this.typeCount = this.courseNumberArray2.length
|
|
|
|
- let course = []
|
|
|
|
- for(var i = 0;i<this.courseNumberArray2.length;i++){
|
|
|
|
- let _array = this.courseNumberArray2[i].array
|
|
|
|
- for(var j = 0; j <_array.length;j++){
|
|
|
|
|
|
+ typeCourseCountCalu() {
|
|
|
|
+ this.courseNumberArray2 = this.allArray;
|
|
|
|
+ this.typeCount = this.courseNumberArray2.length;
|
|
|
|
+ let course = [];
|
|
|
|
+ for (var i = 0; i < this.courseNumberArray2.length; i++) {
|
|
|
|
+ let _array = this.courseNumberArray2[i].array;
|
|
|
|
+ for (var j = 0; j < _array.length; j++) {
|
|
console.log(_array[j]);
|
|
console.log(_array[j]);
|
|
- if(course.indexOf(_array[j]) == -1){
|
|
|
|
- course.push(_array[j])
|
|
|
|
|
|
+ if (course.indexOf(_array[j]) == -1) {
|
|
|
|
+ course.push(_array[j]);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
- this.typeCourseCount = course.length
|
|
|
|
|
|
+ this.typeCourseCount = course.length;
|
|
},
|
|
},
|
|
typeChange() {
|
|
typeChange() {
|
|
if (this.cType === "") {
|
|
if (this.cType === "") {
|
|
@@ -394,6 +394,11 @@ export default {
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
+ for(var i = 0;i<toolAllArray.length;i++){
|
|
|
|
+ if(toolAllArray[i].value == 0){
|
|
|
|
+ toolAllArray.splice(i,1)
|
|
|
|
+ }
|
|
|
|
+ }
|
|
this.toolList = toolAllArray;
|
|
this.toolList = toolAllArray;
|
|
var courseJson = Object.values(
|
|
var courseJson = Object.values(
|
|
tList.reduce(function (acc, obj) {
|
|
tList.reduce(function (acc, obj) {
|
|
@@ -465,7 +470,7 @@ export default {
|
|
name: _grade[i].name,
|
|
name: _grade[i].name,
|
|
typeid: _grade[i].id,
|
|
typeid: _grade[i].id,
|
|
course: 0,
|
|
course: 0,
|
|
- array:[]
|
|
|
|
|
|
+ array: [],
|
|
});
|
|
});
|
|
for (var z = 0; z < _course.length; z++) {
|
|
for (var z = 0; z < _course.length; z++) {
|
|
if (_course[z].typeid == _grade[i].id) {
|
|
if (_course[z].typeid == _grade[i].id) {
|
|
@@ -480,7 +485,7 @@ export default {
|
|
name: _subject[i].name,
|
|
name: _subject[i].name,
|
|
typeid: _subject[i].id,
|
|
typeid: _subject[i].id,
|
|
course: 0,
|
|
course: 0,
|
|
- array:[]
|
|
|
|
|
|
+ array: [],
|
|
});
|
|
});
|
|
for (var z = 0; z < _course.length; z++) {
|
|
for (var z = 0; z < _course.length; z++) {
|
|
if (_course[z].typeid == _subject[i].id) {
|
|
if (_course[z].typeid == _subject[i].id) {
|
|
@@ -495,7 +500,7 @@ export default {
|
|
name: themeList[i].name,
|
|
name: themeList[i].name,
|
|
typeid: themeList[i].id,
|
|
typeid: themeList[i].id,
|
|
course: 0,
|
|
course: 0,
|
|
- array: []
|
|
|
|
|
|
+ array: [],
|
|
});
|
|
});
|
|
for (var z = 0; z < _course.length; z++) {
|
|
for (var z = 0; z < _course.length; z++) {
|
|
if (_course[z].typeid == themeList[i].id) {
|
|
if (_course[z].typeid == themeList[i].id) {
|
|
@@ -508,7 +513,7 @@ export default {
|
|
this.subjectArray = _subjectArray;
|
|
this.subjectArray = _subjectArray;
|
|
this.themeArray = _themeArray;
|
|
this.themeArray = _themeArray;
|
|
this.allArray = [..._gradeArray, ..._subjectArray, ..._themeArray];
|
|
this.allArray = [..._gradeArray, ..._subjectArray, ..._themeArray];
|
|
- this.typeCourseCountCalu()
|
|
|
|
|
|
+ this.typeCourseCountCalu();
|
|
this.typeChange();
|
|
this.typeChange();
|
|
var wList = [];
|
|
var wList = [];
|
|
for (var i = 0; i < _workCourse.length; i++) {
|
|
for (var i = 0; i < _workCourse.length; i++) {
|