lsc 2 years ago
parent
commit
f62cd37adc

+ 1 - 1
dist/index.html

@@ -18,7 +18,7 @@
       border-radius: 10px;
       -webkit-box-shadow: inset 0 0 6px rgba(0, 0, 0, .3);
       background-color: rgba(0, 0, 0, 0.1);
-    }</style><link href=./static/css/app.f0136d4a4f33e4426fd0f721112ac109.css rel=stylesheet></head><body><div id=app></div><script type=text/javascript src=./static/js/manifest.3ad1d5771e9b13dbdad2.js></script><script type=text/javascript src=./static/js/vendor.8d7171b1fe858bda1433.js></script><script type=text/javascript src=./static/js/app.300ab43fbd49e512371b.js></script></body></html><script>function stopSafari() {
+    }</style><link href=./static/css/app.c19f72be4347358d73649cf264dd42cd.css rel=stylesheet></head><body><div id=app></div><script type=text/javascript src=./static/js/manifest.3ad1d5771e9b13dbdad2.js></script><script type=text/javascript src=./static/js/vendor.85c8eaa771172113dc52.js></script><script type=text/javascript src=./static/js/app.9666c199b365ff9fdce3.js></script></body></html><script>function stopSafari() {
     //阻止safari浏览器双击放大功能
     let lastTouchEnd = 0  //更新手指弹起的时间
     document.documentElement.addEventListener("touchstart", function (event) {

File diff suppressed because it is too large
+ 0 - 0
dist/static/css/app.c19f72be4347358d73649cf264dd42cd.css


File diff suppressed because it is too large
+ 0 - 0
dist/static/css/app.c19f72be4347358d73649cf264dd42cd.css.map


File diff suppressed because it is too large
+ 0 - 0
dist/static/css/app.f0136d4a4f33e4426fd0f721112ac109.css


File diff suppressed because it is too large
+ 0 - 0
dist/static/css/app.f0136d4a4f33e4426fd0f721112ac109.css.map


File diff suppressed because it is too large
+ 0 - 0
dist/static/js/app.300ab43fbd49e512371b.js


File diff suppressed because it is too large
+ 0 - 0
dist/static/js/app.9666c199b365ff9fdce3.js


File diff suppressed because it is too large
+ 0 - 0
dist/static/js/app.9666c199b365ff9fdce3.js.map


File diff suppressed because it is too large
+ 0 - 0
dist/static/js/manifest.3ad1d5771e9b13dbdad2.js.map


File diff suppressed because it is too large
+ 0 - 0
dist/static/js/vendor.85c8eaa771172113dc52.js


File diff suppressed because it is too large
+ 0 - 0
dist/static/js/vendor.85c8eaa771172113dc52.js.map


+ 11 - 0
package-lock.json

@@ -22,6 +22,7 @@
         "lamejs": "^1.2.1",
         "pdfjs-dist": "^2.5.207",
         "pdfvuer": "^1.7.5",
+        "qrcodejs2": "^0.0.2",
         "recordrtc": "^5.6.2",
         "vue": "^2.5.2",
         "vue-cookies": "^1.7.4",
@@ -19389,6 +19390,11 @@
         "teleport": ">=0.2.0"
       }
     },
+    "node_modules/qrcodejs2": {
+      "version": "0.0.2",
+      "resolved": "https://registry.npmmirror.com/qrcodejs2/-/qrcodejs2-0.0.2.tgz",
+      "integrity": "sha512-+Y4HA+cb6qUzdgvI3KML8GYpMFwB24dFwzMkS/yXq6hwtUGNUnZQdUnksrV1XGMc2mid5ROw5SAuY9XhI3ValA=="
+    },
     "node_modules/qs": {
       "version": "6.5.2",
       "resolved": "https://registry.npm.taobao.org/qs/download/qs-6.5.2.tgz?cache=0&sync_timestamp=1616385315895&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fqs%2Fdownload%2Fqs-6.5.2.tgz",
@@ -40013,6 +40019,11 @@
       "resolved": "https://registry.npm.taobao.org/q/download/q-1.5.1.tgz",
       "integrity": "sha1-fjL3W0E4EpHQRhHxvxQQmsAGUdc="
     },
+    "qrcodejs2": {
+      "version": "0.0.2",
+      "resolved": "https://registry.npmmirror.com/qrcodejs2/-/qrcodejs2-0.0.2.tgz",
+      "integrity": "sha512-+Y4HA+cb6qUzdgvI3KML8GYpMFwB24dFwzMkS/yXq6hwtUGNUnZQdUnksrV1XGMc2mid5ROw5SAuY9XhI3ValA=="
+    },
     "qs": {
       "version": "6.5.2",
       "resolved": "https://registry.npm.taobao.org/qs/download/qs-6.5.2.tgz?cache=0&sync_timestamp=1616385315895&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fqs%2Fdownload%2Fqs-6.5.2.tgz",

+ 1 - 0
package.json

@@ -26,6 +26,7 @@
     "lamejs": "^1.2.1",
     "pdfjs-dist": "^2.5.207",
     "pdfvuer": "^1.7.5",
+    "qrcodejs2": "^0.0.2",
     "recordrtc": "^5.6.2",
     "vue": "^2.5.2",
     "vue-cookies": "^1.7.4",

+ 3 - 2
src/components/components/answerData2.vue

@@ -183,15 +183,15 @@ export default {
         for (var i = 0; i < this.problemJson.length; i++) {
           this.ooption.xdata.push(i + 1);
           this.ooption.sdata.push(0);
+          this.person[i] = []
         }
         let count = 0;
         for (var i = 0; i < this.people.length; i++) {
           let el = this.people[i].works.split(",");
           let count2 = 0;
-          this.person[i] = []
           for (var j = 0; j < this.problemJson.length; j++) {
             if (this.problemJson[j] == el[j]) {
-              this.person[i].push(this.people[i].sName)
+              this.person[j].push(this.people[i].sName)
               this.ooption.sdata[j]++;
               count2++;
             }
@@ -200,6 +200,7 @@ export default {
             count++;
           }
         }
+        console.log(this.person);
         this.count = count;
         if (!this.chartObj) {
           this.setChart(this.ooption);

+ 36 - 2
src/components/courseDetail.vue

@@ -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>

+ 6 - 6
src/components/noTerminal/studyStudent.vue

@@ -5695,7 +5695,7 @@ export default {
         });
     },
     addWordWorks() {
-      let params = {
+      let params = [{
         uid: this.userid,
         cid: this.id,
         stage: this.courseType,
@@ -5704,10 +5704,10 @@ export default {
         content: JSON.stringify(this.wordJson).replaceAll(/%/g, "%25"),
         type: 13,
         atool: 52,
-      };
+      }];
       console.log(params);
       this.ajax
-        .get(this.$store.state.api + "addCourseWorks3", params)
+        .post(this.$store.state.api + "addCourseWorks3-2", params)
         .then((res) => {
           this.$message({
             message: "提交成功",
@@ -5724,7 +5724,7 @@ export default {
         });
     },
     addWordWorksTeacher() {
-      let params = {
+      let params = [{
         uid: this.sStudent.userid,
         cid: this.id,
         stage: this.courseType,
@@ -5733,10 +5733,10 @@ export default {
         content: JSON.stringify(this.wordJson).replaceAll(/%/g, "%25"),
         type: 13,
         atool: 52,
-      };
+      }];
       console.log(params);
       this.ajax
-        .get(this.$store.state.api + "addCourseWorks3", params)
+        .post(this.$store.state.api + "addCourseWorks3-2", params)
         .then((res) => {
           this.$message({
             message: "提交成功",

+ 6 - 6
src/components/studyStudent.vue

@@ -9829,7 +9829,7 @@ export default {
         });
     },
     addWordWorks() {
-      let params = {
+      let params = [{
         uid: this.userid,
         cid: this.id,
         stage: this.courseType,
@@ -9838,10 +9838,10 @@ export default {
         content: JSON.stringify(this.wordJson).replaceAll(/%/g, "%25"),
         type: 13,
         atool: 52,
-      };
+      }];
       console.log(params);
       this.ajax
-        .get(this.$store.state.api + "addCourseWorks3", params)
+        .post(this.$store.state.api + "addCourseWorks3-2", params)
         .then((res) => {
           this.$message({
             message: "提交成功",
@@ -9858,7 +9858,7 @@ export default {
         });
     },
     addWordWorksTeacher() {
-      let params = {
+      let params = [{
         uid: this.sStudent.userid,
         cid: this.id,
         stage: this.courseType,
@@ -9867,10 +9867,10 @@ export default {
         content: JSON.stringify(this.wordJson).replaceAll(/%/g, "%25"),
         type: 13,
         atool: 52,
-      };
+      }];
       console.log(params);
       this.ajax
-        .get(this.$store.state.api + "addCourseWorks3", params)
+        .post(this.$store.state.api + "addCourseWorks3-2", params)
         .then((res) => {
           this.$message({
             message: "提交成功",

+ 2 - 1
src/router/index.js

@@ -30,7 +30,8 @@ import studyStudentStudio from '@/components/studio/studyStudent'
 import studyStudentNT from '@/components/noTerminal/studyStudent'
 import studyStudentGM from '@/components/GM/studyStudentGM'
 import pdf from '@/components/pdf'
-
+// 全局修改默认配置,点击空白处不能关闭弹窗
+ElementUI.Dialog.props.closeOnClickModal.default = false
 Vue.use(Router).use(ElementUI)
 
 export default new Router({

Some files were not shown because too many files changed in this diff