11wqe1 1 month ago
parent
commit
5d3c329ce0
1 changed files with 97 additions and 18 deletions
  1. 97 18
      src/components/components/choseWorksDetailDialog.vue

+ 97 - 18
src/components/components/choseWorksDetailDialog.vue

@@ -358,13 +358,13 @@
                 </div>
                 </div>
                 <!-- 思维网格 电子白板 思维导图 -->
                 <!-- 思维网格 电子白板 思维导图 -->
                 <div v-if="[7,1,3].includes(toolType)" class="s_b_m_b_i_m_iframe">
                 <div v-if="[7,1,3].includes(toolType)" class="s_b_m_b_i_m_iframe">
-                  <div v-if="[3].includes(toolType)">
-										<iframe id="dialogFrame"
+                  <div v-if="[7].includes(toolType)">
+										<iframe
     								  allow="camera *; microphone *;display-capture;midi;encrypted-media;"
     								  allow="camera *; microphone *;display-capture;midi;encrypted-media;"
-    								  src="https://beta.cloud.cocorobo.cn/kityminder-editor/dist/index.html"
-    								  ref="iframeMainMapRef"
+    								  :src="`https://beta.pbl.cocorobo.cn/pbl-teacher-table/dist/#/Grid?userid=${userId}`"
+    								  ref="iframeThoughtGridRef"
     								></iframe>
     								></iframe>
-                  </div>
+									</div>
 
 
 									<div v-if="[1].includes(toolType)">
 									<div v-if="[1].includes(toolType)">
 										<iframe
 										<iframe
@@ -373,14 +373,14 @@
     								  ref="iframeWhiteBoardRef"
     								  ref="iframeWhiteBoardRef"
     								></iframe>
     								></iframe>
 									</div>
 									</div>
-
-									<div v-if="[7].includes(toolType)">
-										<iframe
+									
+                  <div v-if="[3].includes(toolType)">
+										<iframe id="dialogFrame"
     								  allow="camera *; microphone *;display-capture;midi;encrypted-media;"
     								  allow="camera *; microphone *;display-capture;midi;encrypted-media;"
-    								  :src="`https://beta.pbl.cocorobo.cn/pbl-teacher-table/dist/#/Grid?userid=${userId}`"
-    								  ref="iframeThoughtGridRef"
+    								  src="https://beta.cloud.cocorobo.cn/kityminder-editor/dist/index.html"
+    								  ref="iframeMainMapRef"
     								></iframe>
     								></iframe>
-									</div>
+                  </div>
                 </div>
                 </div>
                 <!-- 学生分组 -->
                 <!-- 学生分组 -->
                 <div v-if="[49].includes(toolType)" class="s_b_m_b_i_m_evaluation">
                 <div v-if="[49].includes(toolType)" class="s_b_m_b_i_m_evaluation">
@@ -744,6 +744,9 @@ export default {
       type: Array,
       type: Array,
       default: () => []
       default: () => []
     },
     },
+    courseDetail: {
+      type: Object
+    },
     noWorksSData: {
     noWorksSData: {
       type: Array,
       type: Array,
       default: () => []
       default: () => []
@@ -774,7 +777,8 @@ export default {
       radioS:[], //提交作业数组容器
       radioS:[], //提交作业数组容器
       questionsData:'', //提交作业字符串容器
       questionsData:'', //提交作业字符串容器
       isShowList:[], //排序判断的显示容器
       isShowList:[], //排序判断的显示容器
-
+      islock:true,
+      
       show: false,
       show: false,
       showType: 0,
       showType: 0,
       userId: this.$route.query.userid,
       userId: this.$route.query.userid,
@@ -1189,20 +1193,95 @@ export default {
     }
     }
   },
   },
   methods: {
   methods: {
+    lockChair(){
+      console.log('this.islock',this.islock);
+      let a =  this.islock ? false : true
+      
+      this.islock = JSON.parse(JSON.stringify(a))
+    },
+    updateGroup(){
+      console.log('分组设置');
+      
+    },
     // 截图类提交作业
     // 截图类提交作业
     async captureScreenshot(){
     async captureScreenshot(){
       // this.$refs.iframeWhiteBoardRef.contentWindow;
       // this.$refs.iframeWhiteBoardRef.contentWindow;
-      let iframeWindow = this.$refs.iframeThoughtGridRef.contentWindow;
-      if (this.toolType == 1) {
+      let iframeWindow = ''
+      if (this.toolType == 7) {
+        iframeWindow = this.$refs.iframeThoughtGridRef.contentWindow;
+      }else if (this.toolType == 1) {
         iframeWindow = this.$refs.iframeWhiteBoardRef.contentWindow;
         iframeWindow = this.$refs.iframeWhiteBoardRef.contentWindow;
       }else if (this.toolType == 3) {
       }else if (this.toolType == 3) {
         iframeWindow = this.$refs.iframeMainMapRef.contentWindow;
         iframeWindow = this.$refs.iframeMainMapRef.contentWindow;
       }
       }
-
-
-
       console.log('iframeWindow',iframeWindow);
       console.log('iframeWindow',iframeWindow);
-      
+
+      let text = ''
+      if (this.toolType == 1) {
+          text = JSON.stringify(iframeWindow.contentWindow.h.app.scene.elements)
+      } else if (this.toolType == 3) {
+          text = iframeWindow.contentWindow.$("#U_MD_O_H_wordEditor")[0].innerHTML.escapeQuotes()
+      } 
+
+      console.log('text',text);
+
+
+      var _ajs = iframeWindow.contentWindow.document.createElement("script");
+            _ajs.type = "text/javascript";
+            _ajs.innerHTML =
+                // 'console.log(' + _loading + ');\n' +
+                'var _js = document.createElement("script");\n' +
+                '_js.type="text/javascript";\n' +
+                '_js.charset="UTF-8";\n' +
+                '_js.src="https://cloud.cocorobo.cn/js/Common/html2canvas.min.js";\n' +
+                "_js.onload = function(){\n" +
+                ' var a = document.getElementsByTagName("img")\n' +
+                ' for(var i = 0;i<a.length;i++){a[i].crossOrigin="anonymous"}\n' +
+                " html2canvas(document.body,{allowTaint: true,useCORS: true,height: document.body.scrollHeight,windowHeight: document.body.scrollHeight}).then(canvas => {\n" +
+                '  var base64Url = canvas.toDataURL("image/png");\n' +
+                'var base64 = "<img src=" + base64Url + " />"\n' +
+                'var file = dataURLtoFile_shishi(base64Url, "截图")\n' +
+                "beforeUpload_shishi(file," +
+                "'" +
+                _userid +
+                "'" +
+                ", " +
+                "'" +
+                _cid +
+                "'" +
+                ", " +
+                "'" +
+                _stage +
+                "'" +
+                ", " +
+                "'" +
+                _task +
+                "'" +
+                ", " +
+                "'" +
+                _tool +
+                "'" +
+                ", " +
+                "'" +
+                (str + '_loadLi_JieE' + cid + stage + task + tool + _userid) +
+                "'" +
+                ", " +
+                "'" +
+                aTool +
+                "'" +
+                ", " +
+                "`" +
+                text +
+                "`" +
+                ")\n" +
+                " });\n" +
+                "}\n" +
+                "document.head.appendChild(_js);\n";
+                iframeWindow.contentWindow.document.head.appendChild(_ajs);
+console.log('66666');
+
+
+return
       const html2canvas = iframeWindow.html2canvas;
       const html2canvas = iframeWindow.html2canvas;
 
 
       if (html2canvas) {
       if (html2canvas) {