|
@@ -175,7 +175,7 @@
|
|
|
</div>
|
|
|
<div class="three_bottom">
|
|
|
<!-- v-if="role == '1'" @click="get(item)"-->
|
|
|
- <div @click="open(item.courseId)">授课</div>
|
|
|
+ <div @click="open(item.courseId, item.userid)">授课</div>
|
|
|
<!-- <div @click="jump(item.courseId)" v-else>评课</div> -->
|
|
|
<!-- <div v-if="((item.userid == userid) ||
|
|
|
(item.course_teacher &&
|
|
@@ -191,9 +191,10 @@
|
|
|
" @click="goToCourse2(item.courseId)">
|
|
|
修改
|
|
|
</div> -->
|
|
|
- <div v-if="((item.userid == userid) ||
|
|
|
+ <!-- ||
|
|
|
(item.course_teacher &&
|
|
|
- item.course_teacher.indexOf(userid) !== -1) || role == '1') &&
|
|
|
+ item.course_teacher.indexOf(userid) !== -1) || role == '1' -->
|
|
|
+ <div v-if="((item.userid == userid)) &&
|
|
|
item.state == 1
|
|
|
" @click="goToCourse3(item.courseId)">
|
|
|
修改
|
|
@@ -214,10 +215,11 @@
|
|
|
">
|
|
|
评价
|
|
|
</div> -->
|
|
|
- <div @click="copyCourse(item.courseId)">
|
|
|
+ <div v-if="((item.userid == userid))" @click="copyCourse(item.courseId)">
|
|
|
复制
|
|
|
</div>
|
|
|
- <div v-if="item.isCourseType == 1 || role == '1'" @click="deleteCourse(item.courseId)">
|
|
|
+ <!-- v-if="item.isCourseType == 1 || role == '1'" -->
|
|
|
+ <div v-if="((item.userid == userid))" @click="deleteCourse(item.courseId)">
|
|
|
删除
|
|
|
</div>
|
|
|
<!-- <div class="more">
|
|
@@ -510,7 +512,18 @@ export default {
|
|
|
return "";
|
|
|
}
|
|
|
},
|
|
|
- open(cid) {
|
|
|
+ open(cid, uid) {
|
|
|
+ if (uid == this.userid) {
|
|
|
+ window.parent.postMessage(
|
|
|
+ {
|
|
|
+ tools: "opencCscl",
|
|
|
+ cid: cid,
|
|
|
+ gid: '',
|
|
|
+ },
|
|
|
+ "*"
|
|
|
+ );
|
|
|
+ return;
|
|
|
+ }
|
|
|
let params = {
|
|
|
cid: cid,
|
|
|
classid: '1',
|
|
@@ -521,40 +534,44 @@ export default {
|
|
|
if (res.data && res.data[1].length) {
|
|
|
let groupPerson = res.data[1]
|
|
|
let groupCid = ''
|
|
|
- for(var i = 0; i <groupPerson.length;i++){
|
|
|
- if(groupPerson[i].userid == this.userid){
|
|
|
+ for (var i = 0; i < groupPerson.length; i++) {
|
|
|
+ if (groupPerson[i].userid == this.userid) {
|
|
|
groupCid = groupPerson[i].groupCid
|
|
|
break;
|
|
|
}
|
|
|
}
|
|
|
- if(groupCid){
|
|
|
+ if (groupCid) {
|
|
|
window.parent.postMessage(
|
|
|
- {
|
|
|
+ {
|
|
|
tools: "opencCscl",
|
|
|
cid: cid,
|
|
|
gid: groupCid,
|
|
|
- },
|
|
|
+ },
|
|
|
"*"
|
|
|
);
|
|
|
} else {
|
|
|
- window.parent.postMessage(
|
|
|
- {
|
|
|
- tools: "opencCscl",
|
|
|
- cid: cid,
|
|
|
- gid: '',
|
|
|
- },
|
|
|
- "*"
|
|
|
- );
|
|
|
+ this.$message.error("没有加入分组请先加入分组");
|
|
|
+ this.goToCourse3(cid)
|
|
|
+ // window.parent.postMessage(
|
|
|
+ // {
|
|
|
+ // tools: "opencCscl",
|
|
|
+ // cid: cid,
|
|
|
+ // gid: '',
|
|
|
+ // },
|
|
|
+ // "*"
|
|
|
+ // );
|
|
|
}
|
|
|
} else {
|
|
|
- window.parent.postMessage(
|
|
|
- {
|
|
|
- tools: "opencCscl",
|
|
|
- cid: cid,
|
|
|
- gid: '',
|
|
|
- },
|
|
|
- "*"
|
|
|
- );
|
|
|
+ this.$message.error("没有加入分组请先加入分组");
|
|
|
+ this.goToCourse3(cid)
|
|
|
+ // window.parent.postMessage(
|
|
|
+ // {
|
|
|
+ // tools: "opencCscl",
|
|
|
+ // cid: cid,
|
|
|
+ // gid: '',
|
|
|
+ // },
|
|
|
+ // "*"
|
|
|
+ // );
|
|
|
}
|
|
|
})
|
|
|
.catch((err) => {
|