|
@@ -136,7 +136,7 @@
|
|
|
</div>
|
|
|
<div class="whiteBg" style="margin-top: 10px">
|
|
|
<groupBox :cid="cid" :people="checkboxList3" :classList="classList" :courseDetail="courseDetail"
|
|
|
- :userid="userid" :type="1" classId="" :oid="oid" v-if="cid"></groupBox>
|
|
|
+ :userid="userid" :type="1" classId="" :oid="oid" v-if="cid" @open2="open2"></groupBox>
|
|
|
<div v-else class="tipsBox">请添加课程名称后才能设置分组</div>
|
|
|
</div>
|
|
|
<div class="whiteBg" style="border-radius: 0; background:#F0F2F5;" v-if="false">
|
|
@@ -5117,6 +5117,55 @@ export default {
|
|
|
"*"
|
|
|
);
|
|
|
},
|
|
|
+ open2() {
|
|
|
+ if (this.courseDetail.userid == this.userid || top.US.userInfo.role==1) {
|
|
|
+ window.parent.postMessage(
|
|
|
+ {
|
|
|
+ tools: "opencCscl",
|
|
|
+ cid: this.cid,
|
|
|
+ gid: '',
|
|
|
+ },
|
|
|
+ "*"
|
|
|
+ );
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ let params = {
|
|
|
+ cid: this.cid,
|
|
|
+ classid: '1',
|
|
|
+ };
|
|
|
+ this.ajax
|
|
|
+ .get(this.$store.state.api + "getCourseGroup", params)
|
|
|
+ .then((res) => {
|
|
|
+ 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) {
|
|
|
+ groupCid = groupPerson[i].groupCid
|
|
|
+ break;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ if (groupCid) {
|
|
|
+ window.parent.postMessage(
|
|
|
+ {
|
|
|
+ tools: "opencCscl",
|
|
|
+ cid: cid,
|
|
|
+ gid: groupCid,
|
|
|
+ },
|
|
|
+ "*"
|
|
|
+ );
|
|
|
+ } else {
|
|
|
+ this.$message.error("没有加入分组请先加入分组");
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ this.$message.error("没有加入分组请先加入分组");
|
|
|
+ }
|
|
|
+ })
|
|
|
+ .catch((err) => {
|
|
|
+ this.$message.error("网络不佳");
|
|
|
+ console.error(err);
|
|
|
+ });
|
|
|
+ },
|
|
|
guid() {
|
|
|
var _num,
|
|
|
i,
|