|
@@ -83,6 +83,9 @@
|
|
|
<!-- <div class="now_study" @click="dialogVisible = true">
|
|
|
立即学习
|
|
|
</div> -->
|
|
|
+ <div class="now_study" @click="setQr(courseDetail.courseId)">
|
|
|
+ 生成二维码
|
|
|
+ </div>
|
|
|
<div class="now_study" @click="dialogVisibleGroup = true">
|
|
|
{{(courseDetail.userid != userid && courseDetail.course_teacher.indexOf(userid) == -1) ? '加入分组' : '设置分组'}}
|
|
|
</div>
|
|
@@ -105,7 +108,7 @@
|
|
|
</div>
|
|
|
<div v-if="((tType == 1 || tType == 4) && type == 2) || tType == 2"
|
|
|
:class="courseDetail.brief != '' ? 'rightTd' : 'noBRight'" style="width: 100%">
|
|
|
- <div class="blue_box_one" v-for="(item, index) in chapInfo" :key="index" @click="addUserRate(index)">
|
|
|
+ <div class="blue_box_one" v-for="(item, index) in chapInfo" :key="index" @click="addUserRate(index)" :class="{disabled:isFollow == 2 && tType == 2 && followC != index}">
|
|
|
<div>第{{ index + 1 }}阶段</div>
|
|
|
<div :title="item.dyName">{{ item.dyName }}</div>
|
|
|
<div>{{ item.chapterInfo[0].taskJson.length }}个任务</div>
|
|
@@ -549,12 +552,16 @@
|
|
|
<Group :dialogVisibleGroup.sync="dialogVisibleGroup" :classList="classList" :cid="id" :courseDetail="courseDetail" :userid="userid" :oid="oid" :type="tType" :classId="classId" @getGroup="getGroup"></Group>
|
|
|
</div>
|
|
|
</div>
|
|
|
+ <el-dialog title="课程二维码" :visible.sync="dialogVisibleQR" width="400px">
|
|
|
+ <div class="qrcode" ref="qrCodeUrl"></div>
|
|
|
+ </el-dialog>
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
import Heatmap from "./tools/heatmap.vue";
|
|
|
import Group from "./group/group.vue"
|
|
|
+import QRCode from 'qrcodejs2'
|
|
|
export default {
|
|
|
components: {
|
|
|
Heatmap,
|
|
@@ -586,13 +593,30 @@ export default {
|
|
|
chaptersJson: {},
|
|
|
type: 2,
|
|
|
inviteCode: [],
|
|
|
- groupInfo:""
|
|
|
+ groupInfo:"",
|
|
|
+ isFollow:"",
|
|
|
+ followC:"",
|
|
|
+ dialogVisibleQR:false
|
|
|
};
|
|
|
},
|
|
|
methods: {
|
|
|
handleClose(done) {
|
|
|
done();
|
|
|
},
|
|
|
+ setQr(cid){
|
|
|
+ this.dialogVisibleQR = true
|
|
|
+ setTimeout(()=>{
|
|
|
+ this.$refs.qrCodeUrl.innerHTML = ''
|
|
|
+ var qrcode = new QRCode(this.$refs.qrCodeUrl, {
|
|
|
+ text: 'https://beta.cloud.cocorobo.cn/#/course?courseid='+cid, // 需要转换为二维码的内容
|
|
|
+ width: 350,
|
|
|
+ height: 350,
|
|
|
+ colorDark: '#000000',
|
|
|
+ colorLight: '#ffffff',
|
|
|
+ correctLevel: QRCode.CorrectLevel.H
|
|
|
+ })
|
|
|
+ },500)
|
|
|
+ },
|
|
|
goTo(path) {
|
|
|
this.$router.push(path);
|
|
|
},
|
|
@@ -663,6 +687,9 @@ export default {
|
|
|
// }
|
|
|
// }
|
|
|
// }
|
|
|
+ if(this.isFollow == 2 && this.tType == 2 && this.followC != i){
|
|
|
+ return
|
|
|
+ }
|
|
|
let params = {
|
|
|
uid: this.userid,
|
|
|
cid: this.id,
|
|
@@ -743,6 +770,9 @@ export default {
|
|
|
loading.close();
|
|
|
// this.total = res.data[0].length > 0 ? res.data[0][0].num : 0;
|
|
|
this.courseDetail = res.data[0][0];
|
|
|
+ this.isFollow = res.data[0][0].follow
|
|
|
+ this.followC = res.data[0][0].followC ? res.data[0][0].followC.split("-")[0] : ''
|
|
|
+
|
|
|
this.classList = res.data[3];
|
|
|
let groupData = res.data[5];
|
|
|
var a = res.data[0];
|
|
@@ -1957,4 +1987,8 @@ export default {
|
|
|
justify-content: center;
|
|
|
align-items: center;
|
|
|
}
|
|
|
+
|
|
|
+.disabled{
|
|
|
+ background: rgba(210,210,210,1);
|
|
|
+}
|
|
|
</style>
|