|
@@ -21,7 +21,29 @@
|
|
|
<el-option label="工具" value="tool"> </el-option>
|
|
|
<el-option label="字数" value="font"> </el-option>
|
|
|
</el-select>
|
|
|
- <el-input v-model="search" class="student_input" placeholder="请输入教师名称或学校名称" @input="getData"></el-input>
|
|
|
+ <el-input v-model="search" class="student_input" placeholder="请输入教师名称或学校名称" @input="getTypeName"></el-input>
|
|
|
+ <div
|
|
|
+ class="student_input"
|
|
|
+ v-for="(item, index) in CourseType[0]"
|
|
|
+ :key="index"
|
|
|
+ >
|
|
|
+ <el-select
|
|
|
+ v-if="CourseTypeJson[item.id].length"
|
|
|
+ v-model="courseTypeId[item.id]"
|
|
|
+ :placeholder="'请选择'+item.name"
|
|
|
+ @change="getTypeName"
|
|
|
+ >
|
|
|
+ <el-option label="全部" value="1">全部</el-option>
|
|
|
+ <el-option
|
|
|
+ v-for="item1 in CourseTypeJson[item.id]"
|
|
|
+ :key="item1.id"
|
|
|
+ :label="item1.name"
|
|
|
+ :value="item1.id"
|
|
|
+ >
|
|
|
+ </el-option>
|
|
|
+ </el-select>
|
|
|
+ </div>
|
|
|
+ <el-button type="primary" class="bgColor" style="margin-left: 10px;" @click="reset">重置</el-button>
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
@@ -71,6 +93,9 @@
|
|
|
<div>
|
|
|
<span>{{ scope.row.jdz.fontC }}</span><span>字</span>
|
|
|
</div>
|
|
|
+ <div>
|
|
|
+ <span>{{ scope.row.jdz.ziyuanC }}</span><span>资源</span>
|
|
|
+ </div>
|
|
|
</div>
|
|
|
</div>
|
|
|
</template>
|
|
@@ -288,6 +313,10 @@ export default {
|
|
|
total: 0,
|
|
|
page: 1,
|
|
|
pageSize: 10,
|
|
|
+ CourseType: [],
|
|
|
+ CourseType2: [],
|
|
|
+ courseTypeId: [],
|
|
|
+ CourseTypeJson: [],
|
|
|
};
|
|
|
},
|
|
|
methods: {
|
|
@@ -304,16 +333,139 @@ export default {
|
|
|
return "";
|
|
|
}
|
|
|
},
|
|
|
+ reset(){
|
|
|
+ this.choose = ''
|
|
|
+ this.search = ''
|
|
|
+ for (var i = 0; i < this.CourseType[0].length; i++) {
|
|
|
+ this.courseTypeId[this.CourseType[0][i].id] = ''
|
|
|
+ }
|
|
|
+ this.page = 1;
|
|
|
+ this.isLoading = true
|
|
|
+ this.getData();
|
|
|
+ },
|
|
|
+ getTypeName() {
|
|
|
+ this.$forceUpdate();
|
|
|
+ this.page = 1;
|
|
|
+ this.isLoading = true
|
|
|
+ this.getData();
|
|
|
+ },
|
|
|
+ selectAllType() {
|
|
|
+ let params = {
|
|
|
+ org: this.org && this.org != "" ? this.org : "",
|
|
|
+ oid: this.oid && this.oid != "" ? this.oid : "",
|
|
|
+ };
|
|
|
+ this.ajax
|
|
|
+ .get(this.$store.state.api + "selectAllType", params)
|
|
|
+ .then((res) => {
|
|
|
+ if (this.oid == "69893dca-1d47-11ed-8c78-005056b86db5") {
|
|
|
+ res.data[0] = [...res.data[0], ...res.data[4]]
|
|
|
+ }
|
|
|
+ this.CourseType = res.data;
|
|
|
+ this.CourseType2 = [
|
|
|
+ { name: "智见课程", id: [] },
|
|
|
+ { name: "智行课程", id: [] },
|
|
|
+ { name: "智创课程", id: [] },
|
|
|
+ ];
|
|
|
+
|
|
|
+ for (var cti = 0; cti < res.data[0].length; cti++) {
|
|
|
+ if (
|
|
|
+ res.data[0][cti].id == "34628934-d02f-11ec-8c78-005056b86db5" ||
|
|
|
+ res.data[0][cti].id == "34629907-d02f-11ec-8c78-005056b86db5"
|
|
|
+ ) {
|
|
|
+ this.CourseType2[0].id.push(res.data[0][cti].id);
|
|
|
+ } else if (res.data[0][cti].id == "34628934-d02f-11ec-8c78-005056b86ac5" ||
|
|
|
+ res.data[0][cti].id == "34629907-d02f-11ec-8c78-005056b86ac5") {
|
|
|
+ this.CourseType2[1].id.push(res.data[0][cti].id);
|
|
|
+ } else if (res.data[0][cti].id == "34629bcc-d02f-11ec-8c78-005056b86db5") {
|
|
|
+ this.CourseType2[2].id.push(res.data[0][cti].id);
|
|
|
+ }
|
|
|
+ if (res.data[0][cti].id == "34628934-d02f-11ec-8c78-005056b86db5" || res.data[0][cti].id == "34628934-d02f-11ec-8c78-005056b86ac5") {
|
|
|
+ res.data[0][cti].name = "年级";
|
|
|
+ } else if (res.data[0][cti].id == "34629907-d02f-11ec-8c78-005056b86db5" || res.data[0][cti].id == "34629907-d02f-11ec-8c78-005056b86ac5") {
|
|
|
+ res.data[0][cti].name = "学科";
|
|
|
+ } else if (res.data[0][cti].id == "34629bcc-d02f-11ec-8c78-005056b86db5") {
|
|
|
+ res.data[0][cti].name = "主题";
|
|
|
+ }
|
|
|
+ }
|
|
|
+ for (var i = 0; i < res.data[0].length; i++) {
|
|
|
+ if (!this.cid) {
|
|
|
+ this.courseTypeId[res.data[0][i].id] = [];
|
|
|
+ }
|
|
|
+ if (!this.CourseTypeJson[res.data[0][i].id]) {
|
|
|
+ this.CourseTypeJson[res.data[0][i].id] = [];
|
|
|
+ }
|
|
|
+ if (this.oid == "69893dca-1d47-11ed-8c78-005056b86db5") {
|
|
|
+ if (res.data[0][i].name == "栏目") {
|
|
|
+ this.CourseType[0][i].name = "主题";
|
|
|
+ }
|
|
|
+ }
|
|
|
+ if (res.data[2].length == 0 && res.data[3].length == 0) {
|
|
|
+ for (var j = 0; j < res.data[1].length; j++) {
|
|
|
+ if (res.data[0][i].id == res.data[1][j].pid) {
|
|
|
+ this.CourseTypeJson[res.data[0][i].id].push(res.data[1][j]); // 去除公共分类
|
|
|
+ }
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ if (res.data[2].length > 0) {
|
|
|
+ for (var j = 0; j < res.data[2].length; j++) {
|
|
|
+ if (res.data[0][i].id == res.data[2][j].pid) {
|
|
|
+ this.CourseTypeJson[res.data[0][i].id].push(res.data[2][j]); // 去除公共分类
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ if (res.data[3].length > 0) {
|
|
|
+ for (var j = 0; j < res.data[3].length; j++) {
|
|
|
+ if (res.data[0][i].id == res.data[3][j].pid) {
|
|
|
+ this.CourseTypeJson[res.data[0][i].id].push(res.data[3][j]); // 去除公共分类
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ this.getData();
|
|
|
+ })
|
|
|
+ .catch((err) => {
|
|
|
+ console.error(err);
|
|
|
+ });
|
|
|
+ },
|
|
|
getData() {
|
|
|
+ var typeE = [];
|
|
|
+ var typea = '', typeb = '', typec = '', typed = '';
|
|
|
+ for (var i = 0; i < this.CourseType[0].length; i++) {
|
|
|
+ if (this.courseTypeId[this.CourseType[0][i].id] == "1") {
|
|
|
+ typeE.push(this.CourseType[0][i].id);
|
|
|
+ } else if (this.courseTypeId[this.CourseType[0][i].id] != "") {
|
|
|
+ if (this.CourseType[0][i].name == "年级") {
|
|
|
+ typea = this.courseTypeId[this.CourseType[0][i].id];
|
|
|
+ } else if (this.CourseType[0][i].name == "专栏") {
|
|
|
+ typeb = this.courseTypeId[this.CourseType[0][i].id];
|
|
|
+ } else if (this.CourseType[0][i].name == "栏目") {
|
|
|
+ typeb = this.courseTypeId[this.CourseType[0][i].id];
|
|
|
+ } else if (this.CourseType[0][i].name == "学院") {
|
|
|
+ typeb = this.courseTypeId[this.CourseType[0][i].id];
|
|
|
+ } else if (this.CourseType[0][i].name == "主题") {
|
|
|
+ typeb = this.courseTypeId[this.CourseType[0][i].id];
|
|
|
+ } else if (this.CourseType[0][i].name == "新技能") {
|
|
|
+ typec = this.courseTypeId[this.CourseType[0][i].id];
|
|
|
+ } else if (this.CourseType[0][i].name == "学科") {
|
|
|
+ typed = this.courseTypeId[this.CourseType[0][i].id];
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
let params = {
|
|
|
org: this.org,
|
|
|
oid: this.oid,
|
|
|
+ typeA: typea,
|
|
|
+ typeB: typeb,
|
|
|
+ typeC: typec,
|
|
|
+ typeD: typed,
|
|
|
+ typeE: typeE.join(","),
|
|
|
page: this.page,
|
|
|
pageSize: this.pageSize
|
|
|
// this.org
|
|
|
};
|
|
|
this.ajax
|
|
|
- .get(this.$store.state.api + "selectCase3", params)
|
|
|
+ .get(this.$store.state.api + "selectCase4", params)
|
|
|
.then((res) => {
|
|
|
this.isLoading = false;
|
|
|
let _res = res.data[0];
|
|
@@ -326,6 +478,7 @@ export default {
|
|
|
let toolC = 0;
|
|
|
let evalC = 0;
|
|
|
let fontC = 0;
|
|
|
+ let ziyuanC = 0;
|
|
|
let course = [];
|
|
|
if (_user.indexOf(_res[i].tuid) == -1) {
|
|
|
_res[i].course = []
|
|
@@ -333,6 +486,14 @@ export default {
|
|
|
_user.push(_res[i].tuid)
|
|
|
}
|
|
|
for (var j = 0; j < _res2.length; j++) {
|
|
|
+ if(!_res2[j]["jdz"]){
|
|
|
+ _res2[j]["jdz"] = {};
|
|
|
+ _res2[j]["jdz"].taskC = 0;
|
|
|
+ _res2[j]["jdz"].toolC = 0;
|
|
|
+ _res2[j]["jdz"].evalC = 0;
|
|
|
+ _res2[j]["jdz"].fontC = 0;
|
|
|
+ _res2[j]["jdz"].ziyuanC = 0;
|
|
|
+ }
|
|
|
if (_res[i].tuid == _res2[j].tuid) {
|
|
|
if (_res[i].userid) {
|
|
|
_res2[j].course.push({
|
|
@@ -345,6 +506,7 @@ export default {
|
|
|
let toolC2 = 0;
|
|
|
let evalC2 = 0;
|
|
|
let fontC2 = 0;
|
|
|
+ let ziyuanC2 = 0;
|
|
|
fontC2 += _chapter[k].dyName ? _chapter[k].dyName.length : 0;
|
|
|
taskC2 = _chapter[k].chapterInfo[0].taskJson.length;
|
|
|
let _tasks = _chapter[k].chapterInfo[0].taskJson;
|
|
@@ -355,6 +517,9 @@ export default {
|
|
|
if (_tasks[task].toolChoose[0].tool.length > 0) {
|
|
|
toolC2 += _tasks[task].toolChoose.length;
|
|
|
}
|
|
|
+ if(_tasks[task].chapterData.length){
|
|
|
+ ziyuanC2 += _tasks[task].chapterData.length;
|
|
|
+ }
|
|
|
console.log(_tasks[task].task);
|
|
|
fontC2 += _tasks[task].task ? _tasks[task].task.length : 0;
|
|
|
console.log(_tasks[task].taskDetail);
|
|
@@ -371,30 +536,35 @@ export default {
|
|
|
_res2[j]["jd" + (k + 1)].toolC += toolC2;
|
|
|
_res2[j]["jd" + (k + 1)].evalC += evalC2;
|
|
|
_res2[j]["jd" + (k + 1)].fontC += fontC2;
|
|
|
+ _res2[j]["jd" + (k + 1)].ziyuanC += ziyuanC2;
|
|
|
} else {
|
|
|
_res2[j]["jd" + (k + 1)] = {};
|
|
|
_res2[j]["jd" + (k + 1)].taskC = taskC2;
|
|
|
_res2[j]["jd" + (k + 1)].toolC = toolC2;
|
|
|
_res2[j]["jd" + (k + 1)].evalC = evalC2;
|
|
|
_res2[j]["jd" + (k + 1)].fontC = fontC2;
|
|
|
+ _res2[j]["jd" + (k + 1)].ziyuanC = ziyuanC2;
|
|
|
}
|
|
|
taskC += taskC2;
|
|
|
toolC += toolC2;
|
|
|
evalC += evalC2;
|
|
|
fontC += fontC2;
|
|
|
+ ziyuanC += ziyuanC2;
|
|
|
}
|
|
|
- _res2[j]["jdz"] = {};
|
|
|
- _res2[j]["jdz"].taskC = taskC;
|
|
|
- _res2[j]["jdz"].toolC = toolC;
|
|
|
- _res2[j]["jdz"].evalC = evalC;
|
|
|
- _res2[j]["jdz"].fontC = fontC;
|
|
|
+ // _res2[j]["jdz"] = {};
|
|
|
+ _res2[j]["jdz"].taskC += taskC;
|
|
|
+ _res2[j]["jdz"].toolC += toolC;
|
|
|
+ _res2[j]["jdz"].evalC += evalC;
|
|
|
+ _res2[j]["jdz"].fontC += fontC;
|
|
|
+ _res2[j]["jdz"].ziyuanC += ziyuanC;
|
|
|
// _res2[j].course = course;
|
|
|
}else{
|
|
|
- _res2[j]["jdz"] = {};
|
|
|
- _res2[j]["jdz"].taskC = 0;
|
|
|
- _res2[j]["jdz"].toolC = 0;
|
|
|
- _res2[j]["jdz"].evalC = 0;
|
|
|
- _res2[j]["jdz"].fontC = 0;
|
|
|
+ // _res2[j]["jdz"] = {};
|
|
|
+ // _res2[j]["jdz"].taskC = 0;
|
|
|
+ // _res2[j]["jdz"].toolC = 0;
|
|
|
+ // _res2[j]["jdz"].evalC = 0;
|
|
|
+ // _res2[j]["jdz"].fontC = 0;
|
|
|
+ // _res2[j]["jdz"].ziyuanC = 0;
|
|
|
}
|
|
|
|
|
|
}
|
|
@@ -467,7 +637,7 @@ export default {
|
|
|
},
|
|
|
mounted() {
|
|
|
this.isLoading = true;
|
|
|
- this.getData();
|
|
|
+ this.selectAllType();
|
|
|
this.timer = setInterval(() => {
|
|
|
this.getData();
|
|
|
}, 60000);
|
|
@@ -479,7 +649,7 @@ export default {
|
|
|
.student_input {
|
|
|
width: 190px;
|
|
|
font-size: 13px;
|
|
|
- padding: 0 10px;
|
|
|
+ padding: 0 0 0 10px;
|
|
|
}
|
|
|
|
|
|
.cd_body {
|
|
@@ -609,6 +779,11 @@ export default {
|
|
|
color: #3887fe;
|
|
|
}
|
|
|
|
|
|
+.cd_d_span div:nth-child(5) span:nth-child(1) {
|
|
|
+ color: #f900ff;
|
|
|
+}
|
|
|
+
|
|
|
+
|
|
|
.cd_d_span div span:nth-child(1) {
|
|
|
margin-right: 5px;
|
|
|
}
|