|
@@ -43,7 +43,7 @@
|
|
|
|
|
|
<el-button type="primary"
|
|
<el-button type="primary"
|
|
size="small"
|
|
size="small"
|
|
- v-if="[7,1,3,49,57].indexOf(toolType) == -1"
|
|
|
|
|
|
+ v-if="[45,4,48,52,15,41,47,40].includes(toolType)"
|
|
@click="submitWork">作业提交</el-button>
|
|
@click="submitWork">作业提交</el-button>
|
|
|
|
|
|
<el-button type="primary"
|
|
<el-button type="primary"
|
|
@@ -385,14 +385,16 @@
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<!-- 思维网格 电子白板 思维导图 -->
|
|
<!-- 思维网格 电子白板 思维导图 -->
|
|
- <div id="loadLi_JieE" v-if="[7,1,3,57].includes(toolType)" style="position: relative; " class="s_b_m_b_i_m_iframe">
|
|
|
|
- <div style="display: none;">
|
|
|
|
|
|
+ <div id="loadLi_JieE" v-if="[7,1,3,57,18,21,71].includes(toolType)" style="position: relative; " class="s_b_m_b_i_m_iframe">
|
|
|
|
+ <div style="display: none;
|
|
|
|
+ position: absolute;
|
|
|
|
+ height: 100%;
|
|
|
|
+ top: 50%; left: 50%;
|
|
|
|
+ transform: translate(-50%, -50%); ">
|
|
<div style="color: rgb(255, 255, 255);
|
|
<div style="color: rgb(255, 255, 255);
|
|
padding: 15px; background: rgba(0, 0, 0, 0.44);
|
|
padding: 15px; background: rgba(0, 0, 0, 0.44);
|
|
font-size: 18px;display: flex; align-items: center;
|
|
font-size: 18px;display: flex; align-items: center;
|
|
- position: absolute; top: 50%; left: 50%;
|
|
|
|
- justify-content: center;
|
|
|
|
- transform: translate(-50%, -50%);">
|
|
|
|
|
|
+ justify-content: center;width: 100%;height: 100%;box-sizing: border-box;">
|
|
<img src="//beta.pbl.cocorobo.cn/pbl-student-table/dist/js/loading.gif"
|
|
<img src="//beta.pbl.cocorobo.cn/pbl-student-table/dist/js/loading.gif"
|
|
style="width: 26px; margin-right: 10px;">
|
|
style="width: 26px; margin-right: 10px;">
|
|
<span>上传中...</span>
|
|
<span>上传中...</span>
|
|
@@ -400,7 +402,7 @@
|
|
</div>
|
|
</div>
|
|
|
|
|
|
|
|
|
|
-
|
|
|
|
|
|
+ <!-- 思维网格 -->
|
|
<div v-if="[7].includes(toolType)">
|
|
<div v-if="[7].includes(toolType)">
|
|
<iframe
|
|
<iframe
|
|
allow="camera *; microphone *;display-capture;midi;encrypted-media;"
|
|
allow="camera *; microphone *;display-capture;midi;encrypted-media;"
|
|
@@ -409,6 +411,7 @@
|
|
></iframe>
|
|
></iframe>
|
|
</div>
|
|
</div>
|
|
|
|
|
|
|
|
+ <!-- 电子白板 -->
|
|
<div v-if="[1].includes(toolType)">
|
|
<div v-if="[1].includes(toolType)">
|
|
<iframe
|
|
<iframe
|
|
allow="camera *; microphone *;display-capture;midi;encrypted-media;"
|
|
allow="camera *; microphone *;display-capture;midi;encrypted-media;"
|
|
@@ -417,6 +420,7 @@
|
|
></iframe>
|
|
></iframe>
|
|
</div>
|
|
</div>
|
|
|
|
|
|
|
|
+ <!-- 思维导图 -->
|
|
<div v-if="[3].includes(toolType)">
|
|
<div v-if="[3].includes(toolType)">
|
|
<iframe id="dialogFrame"
|
|
<iframe id="dialogFrame"
|
|
allow="camera *; microphone *;display-capture;midi;encrypted-media;"
|
|
allow="camera *; microphone *;display-capture;midi;encrypted-media;"
|
|
@@ -425,6 +429,7 @@
|
|
></iframe>
|
|
></iframe>
|
|
</div>
|
|
</div>
|
|
|
|
|
|
|
|
+ <!-- cocopi -->
|
|
<div v-if="[57].includes(toolType)">
|
|
<div v-if="[57].includes(toolType)">
|
|
<iframe id="dialogFrame1"
|
|
<iframe id="dialogFrame1"
|
|
allow="camera *; microphone *;display-capture;midi;encrypted-media;"
|
|
allow="camera *; microphone *;display-capture;midi;encrypted-media;"
|
|
@@ -432,6 +437,30 @@
|
|
ref="iframePiRef"
|
|
ref="iframePiRef"
|
|
></iframe>
|
|
></iframe>
|
|
</div>
|
|
</div>
|
|
|
|
+
|
|
|
|
+ <!-- 训练服务器 -->
|
|
|
|
+ <div v-if="[18].includes(toolType)">
|
|
|
|
+ <iframe
|
|
|
|
+ allow="camera *; microphone *;display-capture;midi;encrypted-media;"
|
|
|
|
+ src="https://xunlian.cocorobo.cn/"
|
|
|
|
+ ></iframe>
|
|
|
|
+ </div>
|
|
|
|
+
|
|
|
|
+ <!-- AIoT Blockly -->
|
|
|
|
+ <div v-if="[21].includes(toolType)">
|
|
|
|
+ <iframe
|
|
|
|
+ allow="camera *; microphone *;display-capture;midi;encrypted-media;"
|
|
|
|
+ src="https://x.cocorobo.cn"
|
|
|
|
+ ></iframe>
|
|
|
|
+ </div>
|
|
|
|
+
|
|
|
|
+ <!-- ai智能体 -->
|
|
|
|
+ <div v-if="[71].includes(toolType)">
|
|
|
|
+ <iframe
|
|
|
|
+ allow="camera *; microphone *;display-capture;midi;encrypted-media;"
|
|
|
|
+ :src="AIUrl"
|
|
|
|
+ ></iframe>
|
|
|
|
+ </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">
|
|
@@ -834,6 +863,12 @@ export default {
|
|
type: Array,
|
|
type: Array,
|
|
default: () => []
|
|
default: () => []
|
|
},
|
|
},
|
|
|
|
+ oid: {
|
|
|
|
+ type: String
|
|
|
|
+ },
|
|
|
|
+ org: {
|
|
|
|
+ type: String
|
|
|
|
+ },
|
|
groupStudent: {
|
|
groupStudent: {
|
|
type: Array,
|
|
type: Array,
|
|
default: () => []
|
|
default: () => []
|
|
@@ -872,7 +907,7 @@ export default {
|
|
questionsData:'', //提交作业字符串容器
|
|
questionsData:'', //提交作业字符串容器
|
|
isShowList:[], //排序判断的显示容器
|
|
isShowList:[], //排序判断的显示容器
|
|
islock:true,
|
|
islock:true,
|
|
-
|
|
|
|
|
|
+ AIUrl:'',
|
|
show: false,
|
|
show: false,
|
|
showType: 0,
|
|
showType: 0,
|
|
userId: this.$route.query.userid,
|
|
userId: this.$route.query.userid,
|
|
@@ -895,12 +930,15 @@ export default {
|
|
worksPreview: false
|
|
worksPreview: false
|
|
},
|
|
},
|
|
dialogTypeList: [
|
|
dialogTypeList: [
|
|
- { label: "作业详细", value: 0,showType:[1,7,15,40,41,45,47,48,49,52,3,4,57], loading: false },
|
|
|
|
|
|
+ { label: "作业详细", value: 0,showType:[1,7,15,40,41,45,47,48,49,52,3,4,57,18,21,71], loading: false },
|
|
{ label: "题目统计", value: 1,showType:[45,15], loading: false },
|
|
{ label: "题目统计", value: 1,showType:[45,15], loading: false },
|
|
{ label: "学生统计", value: 2,showType:[1,7,15,40,41,45,47,48,52,3,4,57], loading: false }
|
|
{ label: "学生统计", value: 2,showType:[1,7,15,40,41,45,47,48,52,3,4,57], loading: false }
|
|
],
|
|
],
|
|
toolList:[
|
|
toolList:[
|
|
{label:"选择题",value:45,img:require("../../assets/icon/thirdToolList/choose.png")},
|
|
{label:"选择题",value:45,img:require("../../assets/icon/thirdToolList/choose.png")},
|
|
|
|
+ {label:"训练平台",value:18,img:require("../../assets/icon/thirdToolList/trainPlatform.png")},
|
|
|
|
+ {label:"AIoT Blockly",value:21,img:require("../../assets/icon/fourthToolList/program.png")},
|
|
|
|
+ {label:"AI智能体",value:71,img:require("../../assets/icon/fourthToolList/chatgpt.png")},
|
|
{label:"CocoPi",value:57,img:require("../../assets/icon/fourthToolList/cocopi.png")},
|
|
{label:"CocoPi",value:57,img:require("../../assets/icon/fourthToolList/cocopi.png")},
|
|
{label:"问卷调查",value:4,img:require("../../assets/icon/thirdToolList/ask.png")},
|
|
{label:"问卷调查",value:4,img:require("../../assets/icon/thirdToolList/ask.png")},
|
|
{label:"思维导图",value:3,img:require("../../assets/icon/secondToolList/mindMapping.png")},
|
|
{label:"思维导图",value:3,img:require("../../assets/icon/secondToolList/mindMapping.png")},
|
|
@@ -1319,10 +1357,11 @@ export default {
|
|
text:text.replaceAll(/%/g, "%25"),
|
|
text:text.replaceAll(/%/g, "%25"),
|
|
type:15,
|
|
type:15,
|
|
aTool: this.toolType,
|
|
aTool: this.toolType,
|
|
- text:text
|
|
|
|
|
|
+ txt:text
|
|
}]
|
|
}]
|
|
|
|
|
|
this.ajax.post(this.$store.state.api+"addCourseWorks4-u2",params).then(res=>{
|
|
this.ajax.post(this.$store.state.api+"addCourseWorks4-u2",params).then(res=>{
|
|
|
|
+ document.getElementById('loadLi_JieE').children[0].style.display = "none"
|
|
this.$message.success('上传成功')
|
|
this.$message.success('上传成功')
|
|
})
|
|
})
|
|
|
|
|
|
@@ -1415,6 +1454,7 @@ export default {
|
|
'console.log(_js);\n' +
|
|
'console.log(_js);\n' +
|
|
"document.head.appendChild(_js);\n";
|
|
"document.head.appendChild(_js);\n";
|
|
iframeWindow.document.head.appendChild(_ajs);
|
|
iframeWindow.document.head.appendChild(_ajs);
|
|
|
|
+ this.$message.success('上传成功')
|
|
},
|
|
},
|
|
getEditorContent(iframe) {
|
|
getEditorContent(iframe) {
|
|
return new Promise((resolve, reject) => {
|
|
return new Promise((resolve, reject) => {
|
|
@@ -1608,7 +1648,7 @@ export default {
|
|
this.changeShowType(this.dialogTypeList.findIndex(i=>i.showType.includes(this.toolType)))
|
|
this.changeShowType(this.dialogTypeList.findIndex(i=>i.showType.includes(this.toolType)))
|
|
}
|
|
}
|
|
this.setData();
|
|
this.setData();
|
|
- if([3,1,7,57].includes(this.toolType)){
|
|
|
|
|
|
+ if([3,1,7,57,71].includes(this.toolType)){
|
|
this.$nextTick(() => {
|
|
this.$nextTick(() => {
|
|
this.getIframeWorksData();
|
|
this.getIframeWorksData();
|
|
});
|
|
});
|
|
@@ -1873,7 +1913,7 @@ export default {
|
|
console.log('JSON.parse(_data[0].text',JSON.parse(_data[0].text))
|
|
console.log('JSON.parse(_data[0].text',JSON.parse(_data[0].text))
|
|
|
|
|
|
// this.$nextTick(()=>{
|
|
// this.$nextTick(()=>{
|
|
- let onloadListener = _iframe.onload = () =>{
|
|
|
|
|
|
+ // _iframe.onload = () =>{
|
|
console.log("思维导图iframe加载数据👈")
|
|
console.log("思维导图iframe加载数据👈")
|
|
// iframe.contentWindow.editor.minder.importData('json', JSON.parse(xmlhttp.response)[0][0].text)
|
|
// iframe.contentWindow.editor.minder.importData('json', JSON.parse(xmlhttp.response)[0][0].text)
|
|
|
|
|
|
@@ -1885,19 +1925,15 @@ export default {
|
|
"https://cloud.cocorobo.cn/js/Common/jquery-3.6.0.min.js",
|
|
"https://cloud.cocorobo.cn/js/Common/jquery-3.6.0.min.js",
|
|
"https://cloud.cocorobo.cn/js/Common/aws-sdk-2.235.1.min.js",
|
|
"https://cloud.cocorobo.cn/js/Common/aws-sdk-2.235.1.min.js",
|
|
"https://cloud.cocorobo.cn/js/Common/html2canvas.min.js",
|
|
"https://cloud.cocorobo.cn/js/Common/html2canvas.min.js",
|
|
- "https://cloud.cocorobo.cn/js/Common/jietu2.js"
|
|
|
|
|
|
+ "https://cloud.cocorobo.cn/js/Common/jietu22.js"
|
|
];
|
|
];
|
|
scripts.forEach(src => {
|
|
scripts.forEach(src => {
|
|
const script = document.createElement("script");
|
|
const script = document.createElement("script");
|
|
script.src = src;
|
|
script.src = src;
|
|
_iframe.contentWindow.document.body.appendChild(script);
|
|
_iframe.contentWindow.document.body.appendChild(script);
|
|
});
|
|
});
|
|
- }
|
|
|
|
- if (onloadListener) {
|
|
|
|
- _iframe.contentDocument.location.reload()
|
|
|
|
- } else {
|
|
|
|
- _iframe.contentDocument.location.reload()
|
|
|
|
- }
|
|
|
|
|
|
+ // }
|
|
|
|
+
|
|
// })
|
|
// })
|
|
|
|
|
|
})
|
|
})
|
|
@@ -1930,7 +1966,7 @@ export default {
|
|
"https://cloud.cocorobo.cn/js/Common/jquery-3.6.0.min.js",
|
|
"https://cloud.cocorobo.cn/js/Common/jquery-3.6.0.min.js",
|
|
"https://cloud.cocorobo.cn/js/Common/aws-sdk-2.235.1.min.js",
|
|
"https://cloud.cocorobo.cn/js/Common/aws-sdk-2.235.1.min.js",
|
|
"https://cloud.cocorobo.cn/js/Common/html2canvas.min.js",
|
|
"https://cloud.cocorobo.cn/js/Common/html2canvas.min.js",
|
|
- "https://cloud.cocorobo.cn/js/Common/jietu2.js"
|
|
|
|
|
|
+ "https://cloud.cocorobo.cn/js/Common/jietu22.js"
|
|
];
|
|
];
|
|
scripts.forEach(src => {
|
|
scripts.forEach(src => {
|
|
const script = document.createElement("script");
|
|
const script = document.createElement("script");
|
|
@@ -1960,7 +1996,9 @@ export default {
|
|
|
|
|
|
this.ajax.get(this.$store.state.api+"selectWordsY",params).then(res=>{
|
|
this.ajax.get(this.$store.state.api+"selectWordsY",params).then(res=>{
|
|
let _data = res.data[0]
|
|
let _data = res.data[0]
|
|
- _iframe.contentWindow.loadingXml(JSON.parse(_data[0].text))
|
|
|
|
|
|
+ console.log('_data',_data[0]);
|
|
|
|
+
|
|
|
|
+ _iframe.contentWindow.loadingXml(_data[0].text)
|
|
|
|
|
|
})
|
|
})
|
|
}else if([7].includes(this.toolType)){ //思维网格ok
|
|
}else if([7].includes(this.toolType)){ //思维网格ok
|
|
@@ -1973,7 +2011,7 @@ export default {
|
|
"https://cloud.cocorobo.cn/js/Common/jquery-3.6.0.min.js",
|
|
"https://cloud.cocorobo.cn/js/Common/jquery-3.6.0.min.js",
|
|
"https://cloud.cocorobo.cn/js/Common/aws-sdk-2.235.1.min.js",
|
|
"https://cloud.cocorobo.cn/js/Common/aws-sdk-2.235.1.min.js",
|
|
"https://cloud.cocorobo.cn/js/Common/html2canvas.min.js",
|
|
"https://cloud.cocorobo.cn/js/Common/html2canvas.min.js",
|
|
- "https://cloud.cocorobo.cn/js/Common/jietu2.js"
|
|
|
|
|
|
+ "https://cloud.cocorobo.cn/js/Common/jietu22.js"
|
|
];
|
|
];
|
|
scripts.forEach(src => {
|
|
scripts.forEach(src => {
|
|
const script = document.createElement("script");
|
|
const script = document.createElement("script");
|
|
@@ -1981,6 +2019,12 @@ export default {
|
|
_iframe.contentWindow.document.body.appendChild(script);
|
|
_iframe.contentWindow.document.body.appendChild(script);
|
|
});
|
|
});
|
|
}
|
|
}
|
|
|
|
+ }else if([71].includes(this.toolType)){ //思维网格ok
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+ this.AIUrl=`https://cloud.cocorobo.cn/aigpt/?userid=${this.userId}&oid=${this.oid}&org=${this.org}&role=0#/AgentVue`
|
|
|
|
+ console.log("AI智能体iframe加载数据👈")
|
|
|
|
+
|
|
}
|
|
}
|
|
},
|
|
},
|
|
}
|
|
}
|