|
@@ -258,9 +258,9 @@
|
|
|
</div>
|
|
</div>
|
|
|
</div>
|
|
</div>
|
|
|
</div>
|
|
</div>
|
|
|
- <div class="body_student" :style="{width: mlDialog ? 'calc(100% - '+`${classRoomHelperWidth}`+' - 20% - 40px)' : 'calc(100% - '+`${classRoomHelperWidth}`+' - 10px)', left: mlDialog ? 'calc(20% + 35px)' : '10px' }">
|
|
|
|
|
- <div class="new_topFixed" :style="{width: mlDialog ? 'calc(100% - '+`${classRoomHelperWidth}`+' - 20% - 40px)' : 'calc(100% - '+`${classRoomHelperWidth}`+' - 10px)', left: mlDialog ? 'calc(20% + 35px)' : '10px' }"></div>
|
|
|
|
|
- <div class="new_top" :style="{width: mlDialog ? 'calc(100% - '+`${classRoomHelperWidth}`+' - 20% - 47px)' : 'calc(100% - '+`${classRoomHelperWidth}`+' - 18px)', left: mlDialog ? 'calc(20% + 35px)' : '10px' }">
|
|
|
|
|
|
|
+ <div class="body_student" :style="{width: mlDialog ? 'calc(100% - '+`${classRoomHelperWidth}`+' - 15% - 40px)' : 'calc(100% - '+`${classRoomHelperWidth}`+' - 10px)', left: mlDialog ? 'calc(15% + 35px)' : '10px' }">
|
|
|
|
|
+ <div class="new_topFixed" :style="{width: mlDialog ? 'calc(100% - '+`${classRoomHelperWidth}`+' - 15% - 40px)' : 'calc(100% - '+`${classRoomHelperWidth}`+' - 10px)', left: mlDialog ? 'calc(15% + 35px)' : '10px' }"></div>
|
|
|
|
|
+ <div class="new_top" :style="{width: mlDialog ? 'calc(100% - '+`${classRoomHelperWidth}`+' - 15% - 47px)' : 'calc(100% - '+`${classRoomHelperWidth}`+' - 18px)', left: mlDialog ? 'calc(15% + 35px)' : '10px' }">
|
|
|
<div class="courseIndex" :style="{width: (orgArray.includes(org) || oidArray.includes(oid))? '100%' : 'calc(100% - 745px)'}">
|
|
<div class="courseIndex" :style="{width: (orgArray.includes(org) || oidArray.includes(oid))? '100%' : 'calc(100% - 745px)'}">
|
|
|
<div>任务{{ taskCount + 1 }}</div>
|
|
<div>任务{{ taskCount + 1 }}</div>
|
|
|
<el-tooltip
|
|
<el-tooltip
|
|
@@ -485,10 +485,10 @@
|
|
|
<div
|
|
<div
|
|
|
class="vedioBox"
|
|
class="vedioBox"
|
|
|
v-if="
|
|
v-if="
|
|
|
- chapInfoList[courseType].chapterInfo[0].taskJson[taskCount]
|
|
|
|
|
|
|
+ (chapInfoList[courseType].chapterInfo[0].taskJson[taskCount]
|
|
|
.taskDetail != '' ||
|
|
.taskDetail != '' ||
|
|
|
vChapterData[taskCount].length > 0 ||
|
|
vChapterData[taskCount].length > 0 ||
|
|
|
- fileC[taskCount].length > 0
|
|
|
|
|
|
|
+ fileC[taskCount].length > 0) && (tType == 1 || (tType == 2 && IsStulook))
|
|
|
"
|
|
"
|
|
|
style="border-radius: 0 0 20px 20px"
|
|
style="border-radius: 0 0 20px 20px"
|
|
|
>
|
|
>
|
|
@@ -522,7 +522,7 @@
|
|
|
v-html="
|
|
v-html="
|
|
|
chapInfoList[courseType].chapterInfo[0].taskJson[taskCount]
|
|
chapInfoList[courseType].chapterInfo[0].taskJson[taskCount]
|
|
|
.taskDetail
|
|
.taskDetail
|
|
|
- ? renderedFormula(chapInfoList[courseType].chapterInfo[0].taskJson[
|
|
|
|
|
|
|
+ ? renderedFormula2(chapInfoList[courseType].chapterInfo[0].taskJson[
|
|
|
taskCount
|
|
taskCount
|
|
|
].taskDetail)
|
|
].taskDetail)
|
|
|
: '暂无描述'
|
|
: '暂无描述'
|
|
@@ -13492,6 +13492,15 @@
|
|
|
@change="updateFollow"
|
|
@change="updateFollow"
|
|
|
></el-switch>
|
|
></el-switch>
|
|
|
</div>
|
|
</div>
|
|
|
|
|
+ <div class="switch_box" v-if="courseDetail.userid == userid">
|
|
|
|
|
+ <span>允许学生查看内容资料</span>
|
|
|
|
|
+ <el-switch
|
|
|
|
|
+ v-model="IsStulook"
|
|
|
|
|
+ active-text=""
|
|
|
|
|
+ class="switchCss"
|
|
|
|
|
+ @change="updateIsStulook"
|
|
|
|
|
+ ></el-switch>
|
|
|
|
|
+ </div>
|
|
|
</div>
|
|
</div>
|
|
|
</div>
|
|
</div>
|
|
|
<div slot="footer">
|
|
<div slot="footer">
|
|
@@ -16370,6 +16379,8 @@ export default {
|
|
|
},
|
|
},
|
|
|
data() {
|
|
data() {
|
|
|
return {
|
|
return {
|
|
|
|
|
+ // 是否允许学生查看内容资料 2不可以 1可以
|
|
|
|
|
+ IsStulook:false,
|
|
|
homeWorkLoading:false,
|
|
homeWorkLoading:false,
|
|
|
wordCloudKey: 0,
|
|
wordCloudKey: 0,
|
|
|
bg: null,
|
|
bg: null,
|
|
@@ -16756,6 +16767,7 @@ export default {
|
|
|
oidArray: [],
|
|
oidArray: [],
|
|
|
refreshKey: 0,
|
|
refreshKey: 0,
|
|
|
AIloading: [],
|
|
AIloading: [],
|
|
|
|
|
+ // 为了刷新ai评分loading的时候用的
|
|
|
worksStudentCopy: [],
|
|
worksStudentCopy: [],
|
|
|
loopLoading: [],
|
|
loopLoading: [],
|
|
|
markScoreVisible: false,
|
|
markScoreVisible: false,
|
|
@@ -16785,6 +16797,48 @@ export default {
|
|
|
diffKey:"1"
|
|
diffKey:"1"
|
|
|
};
|
|
};
|
|
|
},
|
|
},
|
|
|
|
|
+ watch:{
|
|
|
|
|
+ taskCount(newVal) {
|
|
|
|
|
+ console.log('newVal',newVal);
|
|
|
|
|
+ this.AIloading = [];
|
|
|
|
|
+ this.loopLoading = [];
|
|
|
|
|
+
|
|
|
|
|
+ this.worksStudent.forEach((e, index) => {
|
|
|
|
|
+ this.loopLoading.push({ loading: false });
|
|
|
|
|
+ this.AIloading.push([]);
|
|
|
|
|
+ e.forEach(k => {
|
|
|
|
|
+ this.AIloading[index].push({ loading: false, sco: 0 });
|
|
|
|
|
+ });
|
|
|
|
|
+ });
|
|
|
|
|
+ if(this.tType == 1){
|
|
|
|
|
+ this.refreshAssembly();
|
|
|
|
|
+ }
|
|
|
|
|
+ },
|
|
|
|
|
+ worksStudent: {
|
|
|
|
|
+ handler(newVal, oldVal) {
|
|
|
|
|
+ const sum1 = newVal.reduce((total, subArr) => total + subArr.length, 0);
|
|
|
|
|
+ const sum2 = oldVal.reduce((total, subArr) => total + subArr.length, 0);
|
|
|
|
|
+ // console.log('worksStudent',sum1,sum2);
|
|
|
|
|
+
|
|
|
|
|
+ if(sum1 != sum2){
|
|
|
|
|
+ this.AIloading = [];
|
|
|
|
|
+ this.loopLoading = [];
|
|
|
|
|
+
|
|
|
|
|
+ this.worksStudent.forEach((e, index) => {
|
|
|
|
|
+ this.loopLoading.push({ loading: false });
|
|
|
|
|
+ this.AIloading.push([]);
|
|
|
|
|
+ e.forEach(k => {
|
|
|
|
|
+ this.AIloading[index].push({ loading: false, sco: 0 });
|
|
|
|
|
+ });
|
|
|
|
|
+ });
|
|
|
|
|
+ if(this.tType == 1){
|
|
|
|
|
+ this.refreshAssembly();
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ },
|
|
|
|
|
+ deep:true,
|
|
|
|
|
+ }
|
|
|
|
|
+ },
|
|
|
methods: {
|
|
methods: {
|
|
|
getAIJ() {
|
|
getAIJ() {
|
|
|
this.ajax.get(this.$store.state.api + "getAIJ", "").then(res => {
|
|
this.ajax.get(this.$store.state.api + "getAIJ", "").then(res => {
|
|
@@ -16887,7 +16941,6 @@ export default {
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
this.$message.success("重置完成");
|
|
this.$message.success("重置完成");
|
|
|
- // this.refreshAssembly();
|
|
|
|
|
|
|
|
|
|
this.worksStudent.forEach((e, index) => {
|
|
this.worksStudent.forEach((e, index) => {
|
|
|
if (toolIndex == index) {
|
|
if (toolIndex == index) {
|
|
@@ -17370,9 +17423,8 @@ export default {
|
|
|
});
|
|
});
|
|
|
},
|
|
},
|
|
|
// 组件刷新
|
|
// 组件刷新
|
|
|
- refreshAssembly(val) {
|
|
|
|
|
|
|
+ refreshAssembly() {
|
|
|
this.refreshKey++;
|
|
this.refreshKey++;
|
|
|
- // console.log(this.refreshKey)
|
|
|
|
|
},
|
|
},
|
|
|
updateLoading(payload) {
|
|
updateLoading(payload) {
|
|
|
this.AIloading[payload.val][payload.val2].loading = payload.val3;
|
|
this.AIloading[payload.val][payload.val2].loading = payload.val3;
|
|
@@ -17710,7 +17762,7 @@ export default {
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
|
jumpGj(i, j, k, l) {
|
|
jumpGj(i, j, k, l) {
|
|
|
- this.refreshAssembly();
|
|
|
|
|
|
|
+ // this.refreshAssembly();
|
|
|
for (var z = 0; z < this.navList.length; z++) {
|
|
for (var z = 0; z < this.navList.length; z++) {
|
|
|
for (var q = 0; q < this.navList[z].task.length; q++) {
|
|
for (var q = 0; q < this.navList[z].task.length; q++) {
|
|
|
for (var w = 0; w < this.navList[z].task[q].tool.length; w++) {
|
|
for (var w = 0; w < this.navList[z].task[q].tool.length; w++) {
|
|
@@ -20795,24 +20847,14 @@ export default {
|
|
|
this.joinGroup(gindex);
|
|
this.joinGroup(gindex);
|
|
|
}
|
|
}
|
|
|
this.worksStudent = _worksStudent;
|
|
this.worksStudent = _worksStudent;
|
|
|
- if (
|
|
|
|
|
- JSON.stringify(this.worksStudentCopy) !=
|
|
|
|
|
- JSON.stringify(this.worksStudent)
|
|
|
|
|
- ) {
|
|
|
|
|
- console.log("88888999999");
|
|
|
|
|
- this.worksStudentCopy = this.worksStudent;
|
|
|
|
|
- this.AIloading = [];
|
|
|
|
|
- this.loopLoading = [];
|
|
|
|
|
-
|
|
|
|
|
- this.worksStudent.forEach((e, index) => {
|
|
|
|
|
- this.loopLoading.push({ loading: false });
|
|
|
|
|
- this.AIloading.push([]);
|
|
|
|
|
- e.forEach(k => {
|
|
|
|
|
- this.AIloading[index].push({ loading: false, sco: 0 });
|
|
|
|
|
- });
|
|
|
|
|
- });
|
|
|
|
|
- this.refreshAssembly();
|
|
|
|
|
- }
|
|
|
|
|
|
|
+
|
|
|
|
|
+ // if (((this.worksStudentCopy.length == 0) &&
|
|
|
|
|
+ // (this.worksStudent.length != 0)) ||
|
|
|
|
|
+ // (this.worksStudentCopy[this.taskCount].length != this.worksStudent[this.taskCount].length)
|
|
|
|
|
+ // ) {
|
|
|
|
|
+ // this.worksStudentCopy = this.worksStudent;
|
|
|
|
|
+
|
|
|
|
|
+ // }
|
|
|
this.selectWorksStudent();
|
|
this.selectWorksStudent();
|
|
|
for (let ci = 0; ci < this.isCloseList.length; ci++) {
|
|
for (let ci = 0; ci < this.isCloseList.length; ci++) {
|
|
|
this.$nextTick(() => {
|
|
this.$nextTick(() => {
|
|
@@ -21588,7 +21630,6 @@ export default {
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
|
openTask(s, n, i) {
|
|
openTask(s, n, i) {
|
|
|
- this.refreshAssembly();
|
|
|
|
|
if (this.IsFollow && this.tType == 2) {
|
|
if (this.IsFollow && this.tType == 2) {
|
|
|
this.$message.error("已经开启跟随模式,请认真跟堂听讲");
|
|
this.$message.error("已经开启跟随模式,请认真跟堂听讲");
|
|
|
return;
|
|
return;
|
|
@@ -22310,6 +22351,21 @@ export default {
|
|
|
// this.chapInfoList = JSON.parse(this.courseDetail.chapters);
|
|
// this.chapInfoList = JSON.parse(this.courseDetail.chapters);
|
|
|
// }
|
|
// }
|
|
|
|
|
|
|
|
|
|
+ // 判断进入课程是否是创建老师,如果去创建老师,就自动开启下面两个按钮
|
|
|
|
|
+ if (type == 10) {
|
|
|
|
|
+ console.log('this.courseDetail.userid',this.courseDetail.userid);
|
|
|
|
|
+ console.log('this.userid',this.userid);
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+ if (this.courseDetail.userid == this.userid) {
|
|
|
|
|
+
|
|
|
|
|
+ // 开局关闭学生查看内容
|
|
|
|
|
+ this.StulookMode(false)
|
|
|
|
|
+ // 开局打开跟随模式
|
|
|
|
|
+ this.followingMode(true)
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
let _this = this;
|
|
let _this = this;
|
|
|
if (_this.timer) {
|
|
if (_this.timer) {
|
|
|
clearInterval(_this.timer);
|
|
clearInterval(_this.timer);
|
|
@@ -22693,6 +22749,35 @@ export default {
|
|
|
console.error(err);
|
|
console.error(err);
|
|
|
});
|
|
});
|
|
|
},
|
|
},
|
|
|
|
|
+ updateIsStulook(){
|
|
|
|
|
+ let params = [
|
|
|
|
|
+ {
|
|
|
|
|
+ sopen: this.IsStulook == false ? 2 : 1,
|
|
|
|
|
+ cid: this.id
|
|
|
|
|
+ }
|
|
|
|
|
+ ];
|
|
|
|
|
+
|
|
|
|
|
+ this.ajax
|
|
|
|
|
+ .post(this.$store.state.api + "updateCourseStulook", params)
|
|
|
|
|
+ .then(res => {
|
|
|
|
|
+
|
|
|
|
|
+ if (this.IsStulook == true) {
|
|
|
|
|
+ this.$message({
|
|
|
|
|
+ message: "学生查看内容资料权限已开启",
|
|
|
|
|
+ type: "success"
|
|
|
|
|
+ });
|
|
|
|
|
+ } else {
|
|
|
|
|
+ this.$message({
|
|
|
|
|
+ message: "关闭学生查看内容资料权限",
|
|
|
|
|
+ type: "success"
|
|
|
|
|
+ });
|
|
|
|
|
+ }
|
|
|
|
|
+ // this.setCTask();
|
|
|
|
|
+ })
|
|
|
|
|
+ .catch(err => {
|
|
|
|
|
+ console.error(err);
|
|
|
|
|
+ });
|
|
|
|
|
+ },
|
|
|
updateFollow() {
|
|
updateFollow() {
|
|
|
let params = [
|
|
let params = [
|
|
|
{
|
|
{
|
|
@@ -22705,12 +22790,12 @@ export default {
|
|
|
.then(res => {
|
|
.then(res => {
|
|
|
if (this.IsFollow == true) {
|
|
if (this.IsFollow == true) {
|
|
|
this.$message({
|
|
this.$message({
|
|
|
- message: "开启成功",
|
|
|
|
|
|
|
+ message: "跟随模式已开启",
|
|
|
type: "success"
|
|
type: "success"
|
|
|
});
|
|
});
|
|
|
} else {
|
|
} else {
|
|
|
this.$message({
|
|
this.$message({
|
|
|
- message: "关闭成功",
|
|
|
|
|
|
|
+ message: "跟随模式已关闭",
|
|
|
type: "success"
|
|
type: "success"
|
|
|
});
|
|
});
|
|
|
}
|
|
}
|
|
@@ -22774,12 +22859,13 @@ export default {
|
|
|
this.sIsOpen = res.data[0][0].sopen == 1 ? false : true;
|
|
this.sIsOpen = res.data[0][0].sopen == 1 ? false : true;
|
|
|
this.IsLookOpen = res.data[0][0].look == 1 ? false : true;
|
|
this.IsLookOpen = res.data[0][0].look == 1 ? false : true;
|
|
|
this.IsFollow = res.data[0][0].follow == 1 ? false : true;
|
|
this.IsFollow = res.data[0][0].follow == 1 ? false : true;
|
|
|
|
|
+ this.IsStulook = res.data[0][0].isStulook == 2 ? false : true;
|
|
|
if (!this.IsLookOpen) {
|
|
if (!this.IsLookOpen) {
|
|
|
this.setNavList();
|
|
this.setNavList();
|
|
|
- }
|
|
|
|
|
- // else {
|
|
|
|
|
|
|
+ }else {
|
|
|
this.getCourseState(1);
|
|
this.getCourseState(1);
|
|
|
- // }
|
|
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
// || (this.splitScreenData.isOpen && this.splitScreenData.uid != this.splitScreenData.myUid)
|
|
// || (this.splitScreenData.isOpen && this.splitScreenData.uid != this.splitScreenData.myUid)
|
|
|
if ((this.IsFollow && this.tType == 2)) {
|
|
if ((this.IsFollow && this.tType == 2)) {
|
|
|
this.setContent2(false);
|
|
this.setContent2(false);
|
|
@@ -24798,8 +24884,9 @@ export default {
|
|
|
document.getElementsByClassName("navBox")[0].style.height =
|
|
document.getElementsByClassName("navBox")[0].style.height =
|
|
|
a - 40 + 0 + "px";
|
|
a - 40 + 0 + "px";
|
|
|
} else {
|
|
} else {
|
|
|
- document.getElementsByClassName("navBox")[0].style.height =
|
|
|
|
|
- a - 40 + "px";
|
|
|
|
|
|
|
+ if (document.getElementsByClassName("navBox") && document.getElementsByClassName("navBox")[0]) {
|
|
|
|
|
+ document.getElementsByClassName("navBox")[0].style.height = a - 40 + "px";
|
|
|
|
|
+ }
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
this.Stbodywidth =
|
|
this.Stbodywidth =
|
|
@@ -26146,6 +26233,25 @@ export default {
|
|
|
followingMode(flag) {
|
|
followingMode(flag) {
|
|
|
this.IsFollow = flag;
|
|
this.IsFollow = flag;
|
|
|
this.updateFollow();
|
|
this.updateFollow();
|
|
|
|
|
+ },
|
|
|
|
|
+ StulookMode(flag) {
|
|
|
|
|
+ this.IsStulook = flag;
|
|
|
|
|
+ this.updateIsStulook();
|
|
|
|
|
+ },
|
|
|
|
|
+ getScoreList() {
|
|
|
|
|
+ let params = {
|
|
|
|
|
+ cid: this.id
|
|
|
|
|
+ };
|
|
|
|
|
+ this.ajax
|
|
|
|
|
+ .get(this.$store.state.api + "selectTestCourseByCid", params)
|
|
|
|
|
+ .then(res => {
|
|
|
|
|
+ let result = res.data;
|
|
|
|
|
+ this.scoreList.datalist = result[0];
|
|
|
|
|
+ this.scoreList.isScoreList = result[1];
|
|
|
|
|
+ })
|
|
|
|
|
+ .catch(err => {
|
|
|
|
|
+ console.error(err);
|
|
|
|
|
+ });
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
|
directives: {
|
|
directives: {
|
|
@@ -26197,45 +26303,68 @@ export default {
|
|
|
this.updateSplitScreenData(1);
|
|
this.updateSplitScreenData(1);
|
|
|
},
|
|
},
|
|
|
computed: {
|
|
computed: {
|
|
|
|
|
+ renderedFormula2() {
|
|
|
|
|
+ return function(val){
|
|
|
|
|
+ // 处理换行符和HTML实体
|
|
|
|
|
+ const normalized = val
|
|
|
|
|
+ .replace(/&/g, '&')
|
|
|
|
|
+ .replace(/<br\/?>/g, '\n');
|
|
|
|
|
+
|
|
|
|
|
+ // 匹配行内公式($...$)和块级公式($$...$$)
|
|
|
|
|
+ return normalized.replace(/(\${1,2})([^$]+)(\${1,2})/g, (_, delim, expr) => {
|
|
|
|
|
+ try {
|
|
|
|
|
+ return katex.renderToString(expr.trim(), {
|
|
|
|
|
+ displayMode: false,
|
|
|
|
|
+ throwOnError: false,
|
|
|
|
|
+ macros: {
|
|
|
|
|
+ '\\aligned': '\\begin{aligned}#1\\end{aligned}'
|
|
|
|
|
+ }
|
|
|
|
|
+ });
|
|
|
|
|
+ } catch (e) {
|
|
|
|
|
+ console.warn('KaTeX渲染失败:', e);
|
|
|
|
|
+ return `<span style="color:red">${expr}</span>`;
|
|
|
|
|
+ }
|
|
|
|
|
+ })
|
|
|
|
|
+ }
|
|
|
|
|
+ },
|
|
|
renderedFormula() {
|
|
renderedFormula() {
|
|
|
return function(val){
|
|
return function(val){
|
|
|
try {
|
|
try {
|
|
|
- // 判断是否含有HTML标签,<tag ...>...</tag>
|
|
|
|
|
|
|
+ // 判断是否含有HTML标签,<tag ...>...</tag>
|
|
|
const hasTag = /<([a-zA-Z][\w\-]*)([^>]*)>([\s\S]*?)<\/\1>/g.test(val);
|
|
const hasTag = /<([a-zA-Z][\w\-]*)([^>]*)>([\s\S]*?)<\/\1>/g.test(val);
|
|
|
if (!hasTag) {
|
|
if (!hasTag) {
|
|
|
- // 纯文本,整体渲染
|
|
|
|
|
- val = val.trim().replace(/[\u200B-\u200D\uFEFF]/g, '');
|
|
|
|
|
|
|
+ val = val.trim().replace(/[\u200B-\u200D\uFEFF]/g, '');
|
|
|
|
|
|
|
|
|
|
+ // 纯文本,整体渲染
|
|
|
|
|
+ try {
|
|
|
|
|
+ return katex.renderToString(val.trim(), {
|
|
|
|
|
+ throwOnError: false,
|
|
|
|
|
+ strict: false,
|
|
|
|
|
+ output: "htmlAndMathml"
|
|
|
|
|
+ });
|
|
|
|
|
+ } catch (e) {
|
|
|
|
|
+ return val; // 渲染失败原样输出
|
|
|
|
|
+ }
|
|
|
|
|
+ } else {
|
|
|
|
|
+ // 有标签,对每个标签内容渲染
|
|
|
|
|
+ return val.replace(
|
|
|
|
|
+ /<([a-zA-Z][\w\-]*)([^>]*)>([\s\S]*?)<\/\1>/g,
|
|
|
|
|
+ (match, tag, attrs, inner) => {
|
|
|
|
|
+ let html;
|
|
|
|
|
+ val = val.trim().replace(/[\u200B-\u200D\uFEFF]/g, '');
|
|
|
try {
|
|
try {
|
|
|
- return katex.renderToString(val.trim(), {
|
|
|
|
|
- throwOnError: false,
|
|
|
|
|
- strict: false,
|
|
|
|
|
- output: "htmlAndMathml"
|
|
|
|
|
|
|
+ html = katex.renderToString(inner.trim(), {
|
|
|
|
|
+ throwOnError: false,
|
|
|
|
|
+ strict: false,
|
|
|
|
|
+ output: "htmlAndMathml"
|
|
|
});
|
|
});
|
|
|
} catch (e) {
|
|
} catch (e) {
|
|
|
- return val; // 渲染失败原样输出
|
|
|
|
|
|
|
+ html = inner;
|
|
|
}
|
|
}
|
|
|
- } else {
|
|
|
|
|
- // 有标签,对每个标签内容渲染
|
|
|
|
|
- return val.replace(
|
|
|
|
|
- /<([a-zA-Z][\w\-]*)([^>]*)>([\s\S]*?)<\/\1>/g,
|
|
|
|
|
- (match, tag, attrs, inner) => {
|
|
|
|
|
- let html;
|
|
|
|
|
- val = val.trim().replace(/[\u200B-\u200D\uFEFF]/g, '');
|
|
|
|
|
-
|
|
|
|
|
- try {
|
|
|
|
|
- html = katex.renderToString(inner.trim(), {
|
|
|
|
|
- throwOnError: false,
|
|
|
|
|
- strict: false,
|
|
|
|
|
- output: "htmlAndMathml"
|
|
|
|
|
- });
|
|
|
|
|
- } catch (e) {
|
|
|
|
|
- html = inner;
|
|
|
|
|
- }
|
|
|
|
|
- return `<${tag}${attrs}>${html}</${tag}>`;
|
|
|
|
|
- }
|
|
|
|
|
- );
|
|
|
|
|
- }
|
|
|
|
|
|
|
+ return `<${tag}${attrs}>${html}</${tag}>`;
|
|
|
|
|
+ }
|
|
|
|
|
+ );
|
|
|
|
|
+ }
|
|
|
} catch (e) {
|
|
} catch (e) {
|
|
|
console.error('KaTeX渲染错误:', e);
|
|
console.error('KaTeX渲染错误:', e);
|
|
|
return val;
|
|
return val;
|
|
@@ -26380,23 +26509,10 @@ export default {
|
|
|
return c;
|
|
return c;
|
|
|
};
|
|
};
|
|
|
},
|
|
},
|
|
|
- getScoreList() {
|
|
|
|
|
- let params = {
|
|
|
|
|
- cid: this.id
|
|
|
|
|
- };
|
|
|
|
|
- this.ajax
|
|
|
|
|
- .get(this.$store.state.api + "selectTestCourseByCid", params)
|
|
|
|
|
- .then(res => {
|
|
|
|
|
- let result = res.data;
|
|
|
|
|
- this.scoreList.datalist = result[0];
|
|
|
|
|
- this.scoreList.isScoreList = result[1];
|
|
|
|
|
- })
|
|
|
|
|
- .catch(err => {
|
|
|
|
|
- console.error(err);
|
|
|
|
|
- });
|
|
|
|
|
- }
|
|
|
|
|
|
|
+
|
|
|
},
|
|
},
|
|
|
mounted() {
|
|
mounted() {
|
|
|
|
|
+
|
|
|
this.updateSplitScreenData(2);
|
|
this.updateSplitScreenData(2);
|
|
|
this.splitScreenData.myUid = uuidv4();
|
|
this.splitScreenData.myUid = uuidv4();
|
|
|
document.body.addEventListener("click", e => {
|
|
document.body.addEventListener("click", e => {
|
|
@@ -26420,12 +26536,12 @@ export default {
|
|
|
|
|
|
|
|
this.setOperationTime();
|
|
this.setOperationTime();
|
|
|
this.selectEva();
|
|
this.selectEva();
|
|
|
- this.getCourseDetail();
|
|
|
|
|
|
|
+ this.getCourseDetail(10);
|
|
|
this.selectCount();
|
|
this.selectCount();
|
|
|
this.getHomeWork();
|
|
this.getHomeWork();
|
|
|
this.selectUser();
|
|
this.selectUser();
|
|
|
this.getAIJ();
|
|
this.getAIJ();
|
|
|
- this.contentDialog = true;
|
|
|
|
|
|
|
+ this.contentDialog = false;
|
|
|
this.setContent2(true);
|
|
this.setContent2(true);
|
|
|
if (this.tType == 4) {
|
|
if (this.tType == 4) {
|
|
|
this.pzDialog = true;
|
|
this.pzDialog = true;
|
|
@@ -26522,7 +26638,7 @@ export default {
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
.pb_left {
|
|
.pb_left {
|
|
|
- width: 20%;
|
|
|
|
|
|
|
+ width: 15%;
|
|
|
margin-right: 10px;
|
|
margin-right: 10px;
|
|
|
background: rgb(255, 255, 255);
|
|
background: rgb(255, 255, 255);
|
|
|
position: fixed;
|
|
position: fixed;
|
|
@@ -30960,7 +31076,6 @@ div::-webkit-scrollbar {
|
|
|
}
|
|
}
|
|
|
.pb_content >>> .katex {
|
|
.pb_content >>> .katex {
|
|
|
font-size: 16px;
|
|
font-size: 16px;
|
|
|
- display: block;
|
|
|
|
|
width: 100%;
|
|
width: 100%;
|
|
|
white-space: normal;
|
|
white-space: normal;
|
|
|
}
|
|
}
|