|
@@ -20,11 +20,27 @@
|
|
|
<input class="sInput" type="text" placeholder="请输入关键字" v-model="sCourse" @keyup.enter="search"/>
|
|
|
</div>
|
|
|
</div>
|
|
|
+ <div class="pType_box all_choose" v-if="oid == '69893dca-1d47-11ed-8c78-005056b86db5'">
|
|
|
+ <span>类型</span>
|
|
|
+ <el-radio-group v-model="pTypeCheckName" style="display: flex; align-items: center">
|
|
|
+ <div class="all_choose" style="width: 100px" v-for="(item, index) in CourseType3" :key="index">
|
|
|
+ <el-radio :label="item.name" @click.native.prevent="CourseType2Click(item.name)">{{
|
|
|
+ item.name
|
|
|
+ }}</el-radio>
|
|
|
+ </div>
|
|
|
+ </el-radio-group>
|
|
|
+ </div>
|
|
|
<div class="choose">
|
|
|
<div class="all_choose" v-for="(item, index) in CourseType[0]" :key="index"
|
|
|
:style="{ margin: !CourseTypeJson[item.id].length && 0 }">
|
|
|
- <span v-if="CourseTypeJson[item.id].length">{{ item.name }}:</span>
|
|
|
- <div class="typeCss" v-if="CourseTypeJson[item.id].length">
|
|
|
+ <span v-if="CourseTypeJson[item.id].length &&
|
|
|
+ (oid == '69893dca-1d47-11ed-8c78-005056b86db5'
|
|
|
+ ? pTypeCheck.indexOf(item.id) != -1
|
|
|
+ : true)">{{ item.name }}:</span>
|
|
|
+ <div class="typeCss" v-if="CourseTypeJson[item.id].length &&
|
|
|
+ (oid == '69893dca-1d47-11ed-8c78-005056b86db5'
|
|
|
+ ? pTypeCheck.indexOf(item.id) != -1
|
|
|
+ : true)">
|
|
|
<div class="cName" @click="getCourse(item.name, '', item.id, 1)"
|
|
|
:class="typeE.indexOf(item.id) != -1 ? 'isCType' : ''">
|
|
|
全部
|
|
@@ -230,7 +246,10 @@ export default {
|
|
|
typed: "",
|
|
|
typeE: [],
|
|
|
loading: "",
|
|
|
- typeCheck: false
|
|
|
+ typeCheck: false,
|
|
|
+ CourseType3: [],
|
|
|
+ pTypeCheck:[],
|
|
|
+ pTypeCheckName: [],
|
|
|
};
|
|
|
},
|
|
|
watch: {
|
|
@@ -284,7 +303,11 @@ export default {
|
|
|
if (typeName == "年级") {
|
|
|
if (type == 1) {
|
|
|
if (this.typeE.indexOf(typeid) != -1) {
|
|
|
- this.typeE.splice(this.typeE.indexOf(typeid), 1);
|
|
|
+ if(this.oid == '69893dca-1d47-11ed-8c78-005056b86db5'){
|
|
|
+ return
|
|
|
+ }else{
|
|
|
+ this.typeE.splice(this.typeE.indexOf(typeid), 1);
|
|
|
+ }
|
|
|
} else {
|
|
|
this.typeE.push(typeid);
|
|
|
if (this.typea != "") {
|
|
@@ -294,6 +317,9 @@ export default {
|
|
|
} else {
|
|
|
if (this.typea == typeid) {
|
|
|
this.typea = "";
|
|
|
+ if(this.oid == '69893dca-1d47-11ed-8c78-005056b86db5'){
|
|
|
+ this.typeE.push(ftypeId);
|
|
|
+ }
|
|
|
} else {
|
|
|
this.typea = typeid;
|
|
|
if (this.typeE.indexOf(ftypeId) != -1) {
|
|
@@ -304,7 +330,11 @@ export default {
|
|
|
} else if (typeName == "专栏") {
|
|
|
if (type == 1) {
|
|
|
if (this.typeE.indexOf(typeid) != -1) {
|
|
|
- this.typeE.splice(this.typeE.indexOf(typeid), 1);
|
|
|
+ if(this.oid == '69893dca-1d47-11ed-8c78-005056b86db5'){
|
|
|
+ return
|
|
|
+ }else{
|
|
|
+ this.typeE.splice(this.typeE.indexOf(typeid), 1);
|
|
|
+ }
|
|
|
} else {
|
|
|
this.typeE.push(typeid);
|
|
|
if (this.typeb != "") {
|
|
@@ -314,6 +344,9 @@ export default {
|
|
|
} else {
|
|
|
if (this.typeb == typeid) {
|
|
|
this.typeb = "";
|
|
|
+ if(this.oid == '69893dca-1d47-11ed-8c78-005056b86db5'){
|
|
|
+ this.typeE.push(ftypeId);
|
|
|
+ }
|
|
|
} else {
|
|
|
this.typeb = typeid;
|
|
|
if (this.typeE.indexOf(ftypeId) != -1) {
|
|
@@ -324,7 +357,11 @@ export default {
|
|
|
} else if (typeName == "栏目") {
|
|
|
if (type == 1) {
|
|
|
if (this.typeE.indexOf(typeid) != -1) {
|
|
|
- this.typeE.splice(this.typeE.indexOf(typeid), 1);
|
|
|
+ if(this.oid == '69893dca-1d47-11ed-8c78-005056b86db5'){
|
|
|
+ return
|
|
|
+ }else{
|
|
|
+ this.typeE.splice(this.typeE.indexOf(typeid), 1);
|
|
|
+ }
|
|
|
} else {
|
|
|
this.typeE.push(typeid);
|
|
|
if (this.typeb != "") {
|
|
@@ -334,6 +371,9 @@ export default {
|
|
|
} else {
|
|
|
if (this.typeb == typeid) {
|
|
|
this.typeb = "";
|
|
|
+ if(this.oid == '69893dca-1d47-11ed-8c78-005056b86db5'){
|
|
|
+ this.typeE.push(ftypeId);
|
|
|
+ }
|
|
|
} else {
|
|
|
this.typeb = typeid;
|
|
|
if (this.typeE.indexOf(ftypeId) != -1) {
|
|
@@ -344,7 +384,11 @@ export default {
|
|
|
} else if (typeName == "主题") {
|
|
|
if (type == 1) {
|
|
|
if (this.typeE.indexOf(typeid) != -1) {
|
|
|
- this.typeE.splice(this.typeE.indexOf(typeid), 1);
|
|
|
+ if(this.oid == '69893dca-1d47-11ed-8c78-005056b86db5'){
|
|
|
+ return
|
|
|
+ }else{
|
|
|
+ this.typeE.splice(this.typeE.indexOf(typeid), 1);
|
|
|
+ }
|
|
|
} else {
|
|
|
this.typeE.push(typeid);
|
|
|
if (this.typeb != "") {
|
|
@@ -354,6 +398,9 @@ export default {
|
|
|
} else {
|
|
|
if (this.typeb == typeid) {
|
|
|
this.typeb = "";
|
|
|
+ if(this.oid == '69893dca-1d47-11ed-8c78-005056b86db5'){
|
|
|
+ this.typeE.push(ftypeId);
|
|
|
+ }
|
|
|
} else {
|
|
|
this.typeb = typeid;
|
|
|
if (this.typeE.indexOf(ftypeId) != -1) {
|
|
@@ -364,7 +411,11 @@ export default {
|
|
|
} else if (typeName == "学院") {
|
|
|
if (type == 1) {
|
|
|
if (this.typeE.indexOf(typeid) != -1) {
|
|
|
- this.typeE.splice(this.typeE.indexOf(typeid), 1);
|
|
|
+ if(this.oid == '69893dca-1d47-11ed-8c78-005056b86db5'){
|
|
|
+ return
|
|
|
+ }else{
|
|
|
+ this.typeE.splice(this.typeE.indexOf(typeid), 1);
|
|
|
+ }
|
|
|
} else {
|
|
|
this.typeE.push(typeid);
|
|
|
if (this.typeb != "") {
|
|
@@ -374,6 +425,9 @@ export default {
|
|
|
} else {
|
|
|
if (this.typeb == typeid) {
|
|
|
this.typeb = "";
|
|
|
+ if(this.oid == '69893dca-1d47-11ed-8c78-005056b86db5'){
|
|
|
+ this.typeE.push(ftypeId);
|
|
|
+ }
|
|
|
} else {
|
|
|
this.typeb = typeid;
|
|
|
if (this.typeE.indexOf(ftypeId) != -1) {
|
|
@@ -384,7 +438,11 @@ export default {
|
|
|
} else if (typeName == "学科") {
|
|
|
if (type == 1) {
|
|
|
if (this.typeE.indexOf(typeid) != -1) {
|
|
|
- this.typeE.splice(this.typeE.indexOf(typeid), 1);
|
|
|
+ if(this.oid == '69893dca-1d47-11ed-8c78-005056b86db5'){
|
|
|
+ return
|
|
|
+ }else{
|
|
|
+ this.typeE.splice(this.typeE.indexOf(typeid), 1);
|
|
|
+ }
|
|
|
} else {
|
|
|
this.typeE.push(typeid);
|
|
|
if (this.typed != "") {
|
|
@@ -394,6 +452,9 @@ export default {
|
|
|
} else {
|
|
|
if (this.typed == typeid) {
|
|
|
this.typed = "";
|
|
|
+ if(this.oid == '69893dca-1d47-11ed-8c78-005056b86db5'){
|
|
|
+ this.typeE.push(ftypeId);
|
|
|
+ }
|
|
|
} else {
|
|
|
this.typed = typeid;
|
|
|
if (this.typeE.indexOf(ftypeId) != -1) {
|
|
@@ -409,6 +470,32 @@ export default {
|
|
|
this.selectAll2();
|
|
|
}
|
|
|
},
|
|
|
+ CourseType2Click(val){
|
|
|
+ this.pTypeCheck = [];
|
|
|
+ this.typeE = []
|
|
|
+ if(val === this.pTypeCheckName){
|
|
|
+ this.pTypeCheckName = ''
|
|
|
+ }else{
|
|
|
+ this.pTypeCheckName = val
|
|
|
+ for (var i = 0; i < this.CourseType3.length; i++) {
|
|
|
+ let typeA = this.CourseType3[i];
|
|
|
+ if (val.indexOf(typeA.name) != -1) {
|
|
|
+ this.pTypeCheck.push(...typeA.id);
|
|
|
+ this.typeE = [...typeA.id]
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ this.typea = ""
|
|
|
+ this.typeb = ""
|
|
|
+ this.typed = ""
|
|
|
+ this.loading = true;
|
|
|
+ if (this.typeCheck) {
|
|
|
+ this.selectAll();
|
|
|
+ } else {
|
|
|
+ this.selectAll2();
|
|
|
+ }
|
|
|
+ },
|
|
|
selectAll() {
|
|
|
this.zoneListId = 0;
|
|
|
this.isListAjax = true;
|
|
@@ -587,6 +674,23 @@ export default {
|
|
|
.then((res) => {
|
|
|
this.CourseTypeJson = {};
|
|
|
this.CourseType = res.data;
|
|
|
+ this.CourseType3 = [
|
|
|
+ { name: "智见课程", id: [] },
|
|
|
+ { name: "智行课程", id: [] },
|
|
|
+ { name: "智创课程", id: [] },
|
|
|
+ ];
|
|
|
+
|
|
|
+ for (var cti = 0; cti < res.data[0].length; cti++) {
|
|
|
+ if (
|
|
|
+ res.data[0][cti].name == "年级" ||
|
|
|
+ res.data[0][cti].name == "学科"
|
|
|
+ ) {
|
|
|
+ this.CourseType3[1].id.push(res.data[0][cti].id);
|
|
|
+ this.CourseType3[0].id.push(res.data[0][cti].id);
|
|
|
+ } else if (res.data[0][cti].name == "主题") {
|
|
|
+ this.CourseType3[2].id.push(res.data[0][cti].id);
|
|
|
+ }
|
|
|
+ }
|
|
|
for (var i = 0; i < res.data[0].length; i++) {
|
|
|
if (!this.cid) {
|
|
|
this.courseTypeId[res.data[0][i].id] = "";
|
|
@@ -911,7 +1015,7 @@ export default {
|
|
|
display: flex;
|
|
|
flex-direction: row;
|
|
|
align-items: baseline;
|
|
|
- margin: 10px 0;
|
|
|
+ margin: 2px 0;
|
|
|
width: 100%;
|
|
|
}
|
|
|
|
|
@@ -1094,4 +1198,13 @@ export default {
|
|
|
.typeCheck>span {
|
|
|
margin-left: 10px;
|
|
|
}
|
|
|
+
|
|
|
+.pType_box {
|
|
|
+ margin-top: 10px;
|
|
|
+}
|
|
|
+.pType_box >>> .el-radio:focus:not(.is-focus):not(:active):not(.is-disabled) .el-radio__inner {
|
|
|
+ -webkit-box-shadow: none !important;
|
|
|
+ box-shadow: none !important;
|
|
|
+}
|
|
|
+
|
|
|
</style>
|