|
@@ -35,7 +35,7 @@
|
|
|
></span
|
|
|
>
|
|
|
</div>
|
|
|
- <span>分</span>
|
|
|
+ <span>Minutes</span>
|
|
|
</div>
|
|
|
|
|
|
<div class="c_t_i_card" v-else v-click-outside="handleBlur1">
|
|
@@ -48,7 +48,7 @@
|
|
|
@keyup.enter.native="changeShowInput1(false)"
|
|
|
></el-input>
|
|
|
</div>
|
|
|
- <span>分</span>
|
|
|
+ <span>Minutes</span>
|
|
|
</div>
|
|
|
|
|
|
<div
|
|
@@ -82,7 +82,7 @@
|
|
|
></span
|
|
|
>
|
|
|
</div>
|
|
|
- <span>秒</span>
|
|
|
+ <span>Seconds</span>
|
|
|
</div>
|
|
|
<div class="c_t_i_card" v-else v-click-outside="handleBlur2">
|
|
|
<div class="c_t_i_c_inputBox">
|
|
@@ -94,7 +94,7 @@
|
|
|
@keyup.enter.native="changeShowInput2(false)"
|
|
|
></el-input>
|
|
|
</div>
|
|
|
- <span>秒</span>
|
|
|
+ <span>Seconds</span>
|
|
|
</div>
|
|
|
</div>
|
|
|
<div class="c_t_item" v-if="type == 1">
|
|
@@ -105,7 +105,7 @@
|
|
|
<div>
|
|
|
<div>{{ keepTimeShow.m2 }}</div>
|
|
|
</div>
|
|
|
- <span>分</span>
|
|
|
+ <span>Minutes</span>
|
|
|
</div>
|
|
|
|
|
|
<div class="c_t_i_card">
|
|
@@ -115,60 +115,60 @@
|
|
|
<div>
|
|
|
<div>{{ keepTimeShow.s2 }}</div>
|
|
|
</div>
|
|
|
- <span>秒</span>
|
|
|
+ <span>Seconds</span>
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
|
|
|
<div class="c_choiceTime" v-if="type == 0">
|
|
|
<div class="c_title">
|
|
|
- <span>快捷设置</span>
|
|
|
+ <span>Quick Settings</span>
|
|
|
</div>
|
|
|
<div class="c_ct_box">
|
|
|
- <span @click="setCountdownTime(30)">30秒</span>
|
|
|
- <span @click="setCountdownTime(60)">1分钟</span>
|
|
|
- <span @click="setCountdownTime(120)">2分钟</span>
|
|
|
- <span @click="setCountdownTime(180)">3分钟</span>
|
|
|
- <span @click="setCountdownTime(300)">5分钟</span>
|
|
|
- <span @click="setCountdownTime(360)">6分钟</span>
|
|
|
- <span @click="setCountdownTime(480)">8分钟</span>
|
|
|
- <span @click="setCountdownTime(600)">10分钟</span>
|
|
|
+ <span @click="setCountdownTime(30)">30 seconds</span>
|
|
|
+ <span @click="setCountdownTime(60)">1 minute</span>
|
|
|
+ <span @click="setCountdownTime(120)">2 minutes</span>
|
|
|
+ <span @click="setCountdownTime(180)">3 minutes</span>
|
|
|
+ <span @click="setCountdownTime(300)">5 minutes</span>
|
|
|
+ <span @click="setCountdownTime(360)">6 minutes</span>
|
|
|
+ <span @click="setCountdownTime(480)">8 minutes</span>
|
|
|
+ <span @click="setCountdownTime(600)">10 minutes</span>
|
|
|
</div>
|
|
|
</div>
|
|
|
|
|
|
<div class="c_behaviorTag">
|
|
|
<div class="c_title">
|
|
|
- <span>行为标签</span>
|
|
|
+ <span>Behavior Tags</span>
|
|
|
<div class="c_t_btnArea">
|
|
|
<span
|
|
|
@click="changeBehaviorTagType(0)"
|
|
|
:class="[behaviorTagType == 0 ? 'c_t_ba_active' : '']"
|
|
|
- >常用</span
|
|
|
+ >Common</span
|
|
|
>
|
|
|
<span
|
|
|
@click="changeBehaviorTagType(1)"
|
|
|
:class="[behaviorTagType == 1 ? 'c_t_ba_active' : '']"
|
|
|
- >更多</span
|
|
|
+ >More</span
|
|
|
>
|
|
|
<!-- <el-button-group>
|
|
|
- <el-button
|
|
|
- size="mini"
|
|
|
- :disabled="isCountdown || isKeepTime"
|
|
|
- :type="behaviorTagType == 0 ? 'primary' : 'info'"
|
|
|
- @click.stop="changeBehaviorTagType(0)"
|
|
|
- >
|
|
|
- 常用
|
|
|
- </el-button>
|
|
|
-
|
|
|
- <el-button
|
|
|
- size="mini"
|
|
|
- :disabled="isCountdown || isKeepTime"
|
|
|
- :type="behaviorTagType == 1 ? 'primary' : 'info'"
|
|
|
- @click.stop="changeBehaviorTagType(1)"
|
|
|
- >
|
|
|
- 更多
|
|
|
- </el-button>
|
|
|
- </el-button-group> -->
|
|
|
+ <el-button
|
|
|
+ size="mini"
|
|
|
+ :disabled="isCountdown || isKeepTime"
|
|
|
+ :type="behaviorTagType == 0 ? 'primary' : 'info'"
|
|
|
+ @click.stop="changeBehaviorTagType(0)"
|
|
|
+ >
|
|
|
+ Common
|
|
|
+ </el-button>
|
|
|
+
|
|
|
+ <el-button
|
|
|
+ size="mini"
|
|
|
+ :disabled="isCountdown || isKeepTime"
|
|
|
+ :type="behaviorTagType == 1 ? 'primary' : 'info'"
|
|
|
+ @click.stop="changeBehaviorTagType(1)"
|
|
|
+ >
|
|
|
+ More
|
|
|
+ </el-button>
|
|
|
+ </el-button-group> -->
|
|
|
</div>
|
|
|
</div>
|
|
|
|
|
@@ -201,7 +201,7 @@
|
|
|
<el-tooltip
|
|
|
effect="light"
|
|
|
placement="top"
|
|
|
- :content="showSourceList ? '隐藏音乐列表' : '显示音乐列表'"
|
|
|
+ :content="showSourceList ? 'Hide music list' : 'Show music list'"
|
|
|
>
|
|
|
<span @click.stop="()=>showSourceList = !showSourceList">
|
|
|
<svg
|
|
@@ -233,7 +233,7 @@
|
|
|
<el-tooltip
|
|
|
class="item"
|
|
|
effect="light"
|
|
|
- :content="sourceActive ? '关闭音乐' : '开启音乐'"
|
|
|
+ :content="sourceActive ? 'Turn off music' : 'Turn on music'"
|
|
|
placement="top"
|
|
|
>
|
|
|
<svg
|
|
@@ -353,7 +353,7 @@
|
|
|
<el-tooltip
|
|
|
class="item"
|
|
|
effect="light"
|
|
|
- content="重置"
|
|
|
+ content="Reset"
|
|
|
placement="top"
|
|
|
>
|
|
|
<svg
|
|
@@ -383,7 +383,7 @@
|
|
|
|
|
|
<div class="ActivityMemo">
|
|
|
<span @click="changeShowType(1)">
|
|
|
- 教学活动备忘
|
|
|
+ Teaching Activity Memo
|
|
|
<svg
|
|
|
width="16"
|
|
|
height="16"
|
|
@@ -410,7 +410,7 @@
|
|
|
|
|
|
<div class="c_changeType">
|
|
|
<div class="c_ct_btn" @click="changeType(0)">
|
|
|
- <div>倒计时</div>
|
|
|
+ <div>Countdown</div>
|
|
|
<span v-if="type == 0"></span>
|
|
|
<svg
|
|
|
width="21"
|
|
@@ -445,7 +445,7 @@
|
|
|
<span></span>
|
|
|
|
|
|
<div class="c_ct_btn" @click="changeType(1)">
|
|
|
- <div>计时器</div>
|
|
|
+ <div>Timer</div>
|
|
|
<span v-if="type == 1"></span>
|
|
|
<svg
|
|
|
width="21"
|
|
@@ -482,7 +482,7 @@
|
|
|
@click.stop="changeType(0)"
|
|
|
:disabled="isCountdown || isKeepTime"
|
|
|
>
|
|
|
- 倒计时
|
|
|
+ Countdown
|
|
|
</el-button>
|
|
|
|
|
|
<el-button
|
|
@@ -490,7 +490,7 @@
|
|
|
@click.stop="changeType(1)"
|
|
|
:disabled="isCountdown || isKeepTime"
|
|
|
>
|
|
|
- 计时器
|
|
|
+ Timer
|
|
|
</el-button>
|
|
|
</el-button-group> -->
|
|
|
</div>
|
|
@@ -518,7 +518,7 @@
|
|
|
d="M7.66782 3.1263C7.87421 2.94284 8.19025 2.96143 8.37371 3.16782L12.3737 7.66782C12.5421 7.85727 12.5421 8.14274 12.3737 8.33219L8.37371 12.8322C8.19025 13.0386 7.87421 13.0572 7.66782 12.8737C7.46143 12.6903 7.44284 12.3742 7.6263 12.1678L11.331 8.00001L7.6263 3.83219C7.44284 3.6258 7.46143 3.30976 7.66782 3.1263Z"
|
|
|
fill="black"
|
|
|
/></svg
|
|
|
- >返回</span
|
|
|
+ >Back</span
|
|
|
>
|
|
|
</div>
|
|
|
<div class="c_b_btnArea">
|
|
@@ -527,13 +527,13 @@
|
|
|
:type="showBtnType == 0 ? 'primary' : ''"
|
|
|
size="small"
|
|
|
@click="showBtnType = 0"
|
|
|
- >所有事件</el-button
|
|
|
+ >All Events</el-button
|
|
|
>
|
|
|
<el-button
|
|
|
:type="showBtnType == 1 ? 'primary' : ''"
|
|
|
size="small"
|
|
|
@click="showBtnType = 1"
|
|
|
- >计时事件</el-button
|
|
|
+ >Timing Events</el-button
|
|
|
>
|
|
|
</el-button-group>
|
|
|
|
|
@@ -541,7 +541,7 @@
|
|
|
@click="derive(showMemorandumList)"
|
|
|
v-loading="exportLoading"
|
|
|
>
|
|
|
- <el-tooltip class="item" effect="dark" content="导出" placement="top">
|
|
|
+ <el-tooltip class="item" effect="dark" content="Export" placement="top">
|
|
|
<svg
|
|
|
t="1724319590942"
|
|
|
class="icon"
|
|
@@ -565,7 +565,7 @@
|
|
|
</svg>
|
|
|
</el-tooltip>
|
|
|
</span>
|
|
|
- <!-- <el-button style="margin-left: 20px;" type="warning" @click.stop="derive">导出</el-button> -->
|
|
|
+ <!-- <el-button style="margin-left: 20px;" type="warning" @click.stop="derive">Export</el-button> -->
|
|
|
</div>
|
|
|
<div class="c_step" ref="stepRef" v-loading="memorandumLoading">
|
|
|
<el-timeline>
|
|
@@ -576,17 +576,17 @@
|
|
|
:timestamp="item.time"
|
|
|
size="large"
|
|
|
>
|
|
|
- <span v-html="item.textList.join(',')"></span>
|
|
|
+ <span v-html="item.textList.join(',')"></span>
|
|
|
<div class="c_s_time" v-if="item.timeDiff">
|
|
|
<div>
|
|
|
<span v-if="item.timeDiff.h !== null"
|
|
|
- >{{ item.timeDiff.h }}时</span
|
|
|
+ >{{ item.timeDiff.h }} hours</span
|
|
|
>
|
|
|
<span v-if="item.timeDiff.m !== null"
|
|
|
- >{{ item.timeDiff.m }}分</span
|
|
|
+ >{{ item.timeDiff.m }} minutes</span
|
|
|
>
|
|
|
<span v-if="item.timeDiff.s !== null"
|
|
|
- >{{ item.timeDiff.s }}秒</span
|
|
|
+ >{{ item.timeDiff.s }} seconds</span
|
|
|
>
|
|
|
</div>
|
|
|
</div>
|
|
@@ -700,18 +700,18 @@ export default {
|
|
|
behaviorTagMore: [], //更多
|
|
|
behaviorTagMoreLoading: false,
|
|
|
behaviorTagCommon: [
|
|
|
- "小组讨论",
|
|
|
- "小组汇报",
|
|
|
- "动手实验",
|
|
|
- "课堂游戏",
|
|
|
- "自主学习",
|
|
|
- "作品展示",
|
|
|
- "学生演讲",
|
|
|
- "学生分享",
|
|
|
- "随堂练习",
|
|
|
- "快速问答",
|
|
|
- "阅读资料",
|
|
|
- "观察记录"
|
|
|
+ "Group Discussion",
|
|
|
+ "Group Presentation",
|
|
|
+ "Hands-on Experiment",
|
|
|
+ "Classroom Game",
|
|
|
+ "Independent Learning",
|
|
|
+ "Project Showcase",
|
|
|
+ "Student Speech",
|
|
|
+ "Student Sharing",
|
|
|
+ "In-class Exercise",
|
|
|
+ "Quick Q&A",
|
|
|
+ "Reading Materials",
|
|
|
+ "Observation Record"
|
|
|
], //常用
|
|
|
choiceBehavior: [],
|
|
|
memorandumList: [],
|
|
@@ -982,110 +982,110 @@ export default {
|
|
|
},
|
|
|
methods: {
|
|
|
derive(_data) {
|
|
|
- if (this.exportLoading) return this.$message.info("请稍等...");
|
|
|
+ if (this.exportLoading) return this.$message.info("Please wait...");
|
|
|
this.exportLoading = true;
|
|
|
let _array = [];
|
|
|
_data.forEach((item, index) => {
|
|
|
let json = {};
|
|
|
- json["时间"] = item.time;
|
|
|
- json["事件"] = item.textList
|
|
|
+ json["Time"] = item.time;
|
|
|
+ json["Event"] = item.textList
|
|
|
.map(i => i.replace(/<[^>]+>/g, ""))
|
|
|
.join(",");
|
|
|
- json["时间差"] =
|
|
|
+ json["Time Difference"] =
|
|
|
index == 0
|
|
|
? ""
|
|
|
: `${
|
|
|
_data[index - 1].timeDiff.h
|
|
|
- ? _data[index - 1].timeDiff.h + "时"
|
|
|
+ ? _data[index - 1].timeDiff.h + " hours"
|
|
|
: ""
|
|
|
}${
|
|
|
_data[index - 1].timeDiff.m
|
|
|
- ? _data[index - 1].timeDiff.m + "分"
|
|
|
+ ? _data[index - 1].timeDiff.m + " minutes"
|
|
|
: ""
|
|
|
}${
|
|
|
_data[index - 1].timeDiff.s
|
|
|
- ? _data[index - 1].timeDiff.s + "秒"
|
|
|
+ ? _data[index - 1].timeDiff.s + " seconds"
|
|
|
: ""
|
|
|
}`;
|
|
|
_array.push(json);
|
|
|
});
|
|
|
|
|
|
let XLSX = require("xlsx");
|
|
|
- const workbook = XLSX.utils.book_new(); //创建一个新的工作簿对象
|
|
|
- let ws = XLSX.utils.json_to_sheet(_array); //将json对象数组转化成工作表
|
|
|
+ const workbook = XLSX.utils.book_new(); // Create a new workbook object
|
|
|
+ let ws = XLSX.utils.json_to_sheet(_array); // Convert the json object array to a worksheet
|
|
|
ws["!cols"] = [
|
|
|
- //设置每一列的宽度
|
|
|
+ // Set the width of each column
|
|
|
{ wch: 25 },
|
|
|
{ wch: 50 },
|
|
|
{ wch: 25 }
|
|
|
];
|
|
|
- XLSX.utils.book_append_sheet(workbook, ws, "sheet1"); //把sheet添加到workbook里,第三个参数是sheet名
|
|
|
- XLSX.writeFile(workbook, "事件.xlsx");
|
|
|
+ XLSX.utils.book_append_sheet(workbook, ws, "sheet1"); // Add the sheet to the workbook, the third parameter is the sheet name
|
|
|
+ XLSX.writeFile(workbook, "Events.xlsx");
|
|
|
|
|
|
this.exportLoading = false;
|
|
|
- this.$message.success("导出成功");
|
|
|
+ this.$message.success("Export successful");
|
|
|
},
|
|
|
lookWork(data) {
|
|
|
const taskTypes = {
|
|
|
- 查看作业: new Set(),
|
|
|
- 进行点赞: new Set(),
|
|
|
- 进行评论: new Set(),
|
|
|
- 进行评分: new Set()
|
|
|
+ viewHomework: new Set(),
|
|
|
+ like: new Set(),
|
|
|
+ comment: new Set(),
|
|
|
+ mark: new Set()
|
|
|
};
|
|
|
|
|
|
let _result = [];
|
|
|
|
|
|
- const viewRegex = /查看<span class=['"]variable['"]>(.*?)<\/span>的作业/g;
|
|
|
- const likeRegex = /对<span class=['"]variable['"]>(.*?)<\/span>的作业进行<span class=['"]btn['"]>点赞<\/span>/g;
|
|
|
- const commentRegex = /对<span class=['"]variable['"]>(.*?)<\/span>的作业进行<span class=['"]btn['"]>评论<\/span>/g;
|
|
|
- const markRegex = /对<span class=['"]variable['"]>(.*?)<\/span>的作业进行<span class=['"]btn['"]>评分<\/span>/g;
|
|
|
+ const viewRegex = /view<span class=['"]variable['"]>(.*?)<\/span>'s homework/g;
|
|
|
+ const likeRegex = /give<span class=['"]variable['"]>(.*?)<\/span>'s homework a<span class=['"]btn['"]>like<\/span>/g;
|
|
|
+ const commentRegex = /give<span class=['"]variable['"]>(.*?)<\/span>'s homework a<span class=['"]btn['"]>comment<\/span>/g;
|
|
|
+ const markRegex = /give<span class=['"]variable['"]>(.*?)<\/span>'s homework a<span class=['"]btn['"]>mark<\/span>/g;
|
|
|
data.forEach(str => {
|
|
|
if (viewRegex.test(str)) {
|
|
|
this.extractText(str, viewRegex).forEach(item =>
|
|
|
- taskTypes["查看作业"].add(item)
|
|
|
+ taskTypes["viewHomework"].add(item)
|
|
|
);
|
|
|
} else if (likeRegex.test(str)) {
|
|
|
this.extractText(str, likeRegex).forEach(item =>
|
|
|
- taskTypes["进行点赞"].add(item)
|
|
|
+ taskTypes["like"].add(item)
|
|
|
);
|
|
|
} else if (commentRegex.test(str)) {
|
|
|
this.extractText(str, commentRegex).forEach(item =>
|
|
|
- taskTypes["进行评论"].add(item)
|
|
|
+ taskTypes["comment"].add(item)
|
|
|
);
|
|
|
} else if (markRegex.test(str)) {
|
|
|
this.extractText(str, markRegex).forEach(item =>
|
|
|
- taskTypes["进行评分"].add(item)
|
|
|
+ taskTypes["mark"].add(item)
|
|
|
);
|
|
|
}
|
|
|
});
|
|
|
|
|
|
- if (Array.from(taskTypes["查看作业"]).length > 0) {
|
|
|
+ if (Array.from(taskTypes["viewHomework"]).length > 0) {
|
|
|
_result.push(
|
|
|
- `查看<span class='variable'>${Array.from(taskTypes["查看作业"]).join(
|
|
|
- ","
|
|
|
- )}</span>的作业`
|
|
|
+ `view<span class='variable'>${Array.from(taskTypes["viewHomework"]).join(
|
|
|
+ ","
|
|
|
+ )}</span>'s homework`
|
|
|
);
|
|
|
}
|
|
|
- if (Array.from(taskTypes["进行点赞"]).length > 0) {
|
|
|
+ if (Array.from(taskTypes["like"]).length > 0) {
|
|
|
_result.push(
|
|
|
- `对<span class='variable'>${Array.from(taskTypes["进行点赞"]).join(
|
|
|
- ","
|
|
|
- )}</span>的作业进行<span class="btn">点赞</span>`
|
|
|
+ `give<span class='variable'>${Array.from(taskTypes["like"]).join(
|
|
|
+ ","
|
|
|
+ )}</span>'s homework a<span class="btn">like</span>`
|
|
|
);
|
|
|
}
|
|
|
- if (Array.from(taskTypes["进行评论"]).length > 0) {
|
|
|
+ if (Array.from(taskTypes["comment"]).length > 0) {
|
|
|
_result.push(
|
|
|
- `对<span class='variable'>${Array.from(taskTypes["进行评论"]).join(
|
|
|
- ","
|
|
|
- )}</span>的作业进行<span class="btn">评论</span>`
|
|
|
+ `give<span class='variable'>${Array.from(taskTypes["comment"]).join(
|
|
|
+ ","
|
|
|
+ )}</span>'s homework a<span class="btn">comment</span>`
|
|
|
);
|
|
|
}
|
|
|
|
|
|
- if (Array.from(taskTypes["进行评分"]).length > 0) {
|
|
|
+ if (Array.from(taskTypes["mark"]).length > 0) {
|
|
|
_result.push(
|
|
|
- `对<span class='variable'>${Array.from(taskTypes["进行评分"]).join(
|
|
|
- ","
|
|
|
- )}</span>的作业进行<span class="btn">评分</span>`
|
|
|
+ `give<span class='variable'>${Array.from(taskTypes["mark"]).join(
|
|
|
+ ","
|
|
|
+ )}</span>'s homework a<span class="btn">mark</span>`
|
|
|
);
|
|
|
}
|
|
|
|
|
@@ -1126,8 +1126,8 @@ export default {
|
|
|
// 构建结果数组
|
|
|
map.forEach((btns, variable) => {
|
|
|
// 构建新的字符串
|
|
|
- let newString = `对<span class="variable">${variable}</span>的作业<span class="btn">${btns.join(
|
|
|
- ","
|
|
|
+ let newString = `For<span class="variable">${variable}</span>'s homework<span class="btn">${btns.join(
|
|
|
+ ","
|
|
|
)}</span>`;
|
|
|
result.push(newString);
|
|
|
});
|
|
@@ -1165,7 +1165,7 @@ export default {
|
|
|
// 将操作部分合并成一个字符串
|
|
|
let combinedOperations = map[variable].join("、");
|
|
|
result.push(
|
|
|
- `查看<span class="variable">${variable}</span>的<span class="btn">${combinedOperations}</span>`
|
|
|
+ `View<span class="variable">${variable}</span>'s<span class="btn">${combinedOperations}</span>`
|
|
|
);
|
|
|
}
|
|
|
|
|
@@ -1235,8 +1235,8 @@ export default {
|
|
|
this.type = newType;
|
|
|
},
|
|
|
changeBehaviorTagType(newType) {
|
|
|
- if (this.isCountdown) return this.$message.error("正在倒计时");
|
|
|
- if (this.isKeepTime) return this.$message.error("正在计时");
|
|
|
+ if (this.isCountdown) return this.$message.error("Countdown is in progress");
|
|
|
+ if (this.isKeepTime) return this.$message.error("Timing is in progress");
|
|
|
if (this.behaviorTagType == newType) return;
|
|
|
this.choiceBehavior = [];
|
|
|
this.behaviorTagType = newType;
|
|
@@ -1245,14 +1245,14 @@ export default {
|
|
|
}
|
|
|
},
|
|
|
setCountdownTime(newTime = 0) {
|
|
|
- if (this.isCountdown) return this.$message.error("正在倒计时");
|
|
|
- if (this.isKeepTime) return this.$message.error("正在计时");
|
|
|
+ if (this.isCountdown) return this.$message.error("Countdown is in progress");
|
|
|
+ if (this.isKeepTime) return this.$message.error("Timing is in progress");
|
|
|
this.countdownTime = newTime;
|
|
|
},
|
|
|
addTime(time = 0) {
|
|
|
- if (this.isCountdown) return console.log("正在计时");
|
|
|
+ if (this.isCountdown) return console.log("Counting down");
|
|
|
if (this.countdownTime >= 3600) {
|
|
|
- return this.$message.error("倒计时最高一小时");
|
|
|
+ return this.$message.error("Countdown maximum is one hour");
|
|
|
}
|
|
|
if (this.countdownTime + time > 3600) {
|
|
|
return (this.countdownTime = 3600);
|
|
@@ -1260,16 +1260,16 @@ export default {
|
|
|
this.countdownTime += time;
|
|
|
},
|
|
|
reduceTime(time = 0) {
|
|
|
- if (this.isCountdown) return console.log("正在计时");
|
|
|
+ if (this.isCountdown) return console.log("Counting down");
|
|
|
if (this.countdownTime - time < 0) return (this.countdownTime = 0);
|
|
|
this.countdownTime -= time;
|
|
|
},
|
|
|
choiceBehaviorTag(tag) {
|
|
|
- if (this.isCountdown) return this.$message.error("正在倒计时");
|
|
|
- if (this.isKeepTime) return this.$message.error("正在计时");
|
|
|
+ if (this.isCountdown) return this.$message.error("Countdown is in progress");
|
|
|
+ if (this.isKeepTime) return this.$message.error("Timing is in progress");
|
|
|
let _index = this.choiceBehavior.findIndex(i => i == tag);
|
|
|
if (_index != -1) {
|
|
|
- // 数组删除指定下标数据
|
|
|
+ // Remove specified index data from the array
|
|
|
this.choiceBehavior.splice(_index, 1);
|
|
|
} else {
|
|
|
this.choiceBehavior.push(tag);
|
|
@@ -1277,20 +1277,20 @@ export default {
|
|
|
},
|
|
|
countdownTimeFn() {
|
|
|
if (this.isCountdown) {
|
|
|
- //取消
|
|
|
+ // Cancel
|
|
|
clearInterval(this.countdownTimeTimer);
|
|
|
this.countdownTimeTimer = null;
|
|
|
this.isCountdown = false;
|
|
|
if (this.$refs.audioRef.playing && this.sourceActive) {
|
|
|
this.$refs.audioRef.pause();
|
|
|
}
|
|
|
- this.$message.success("已暂停倒计时");
|
|
|
+ this.$message.success("Countdown has been paused");
|
|
|
} else {
|
|
|
- //开始
|
|
|
+ // Start
|
|
|
if (this.countdownTime == 0)
|
|
|
- return this.$message.error("请设置倒计时时间");
|
|
|
+ return this.$message.error("Please set the countdown time");
|
|
|
this.isCountdown = true;
|
|
|
- this.$message.success("已开始倒计时");
|
|
|
+ this.$message.success("Countdown has started");
|
|
|
if (this.sourceActive) {
|
|
|
this.$refs.audioRef.setVolume(0);
|
|
|
this.$refs.audioRef.play();
|
|
@@ -1323,13 +1323,13 @@ export default {
|
|
|
this.isCountdown = true;
|
|
|
this.countdownTime -= 1;
|
|
|
}, 1000);
|
|
|
- let timeShow = `${this.countdownTimeShow.m1}${this.countdownTimeShow.m2}分钟${this.countdownTimeShow.s1}${this.countdownTimeShow.s2}秒`;
|
|
|
+ let timeShow = `${this.countdownTimeShow.m1}${this.countdownTimeShow.m2} minutes ${this.countdownTimeShow.s1}${this.countdownTimeShow.s2} seconds`;
|
|
|
this.insertMemorandum(
|
|
|
- `设置<span class="variable">${timeShow}</span><span class="btn">倒计时</span>${
|
|
|
+ `Set<span class="variable">${timeShow}</span><span class="btn">countdown</span>${
|
|
|
this.choiceBehavior.length > 0
|
|
|
- ? ",用于" +
|
|
|
+ ? ", for " +
|
|
|
'<span class="btn">' +
|
|
|
- this.choiceBehavior.join("、") +
|
|
|
+ this.choiceBehavior.join(", ") +
|
|
|
"</span>"
|
|
|
: ""
|
|
|
}`
|
|
@@ -1351,7 +1351,7 @@ export default {
|
|
|
time: this.countdownTimeDefault,
|
|
|
tag: this.choiceBehavior
|
|
|
};
|
|
|
- this.insertMemorandum(`<span class="btn">倒计时</span>结束`);
|
|
|
+ this.insertMemorandum(`<span class="btn">Countdown</span> finished`);
|
|
|
this.choiceBehavior = [];
|
|
|
this.insertData(_data);
|
|
|
},
|
|
@@ -1363,7 +1363,7 @@ export default {
|
|
|
if (this.$refs.audioRef.playing && this.sourceActive) {
|
|
|
this.$refs.audioRef.pause();
|
|
|
}
|
|
|
- this.$message.success("已停止计时");
|
|
|
+ this.$message.success("Timing has been stopped");
|
|
|
} else {
|
|
|
this.isKeepTime = true;
|
|
|
if (this.sourceActive) {
|
|
@@ -1373,11 +1373,11 @@ export default {
|
|
|
this.keepTimeTimer = setInterval(() => {
|
|
|
this.keepTime += 1;
|
|
|
}, 1000);
|
|
|
- this.$message.success("已开始计时");
|
|
|
+ this.$message.success("Timing has started");
|
|
|
this.insertMemorandum(
|
|
|
- `使用<span class="btn">计时器</span>${
|
|
|
+ `Using<span class="btn">timer</span>${
|
|
|
this.choiceBehavior.length > 0
|
|
|
- ? ",用于" +
|
|
|
+ ? ", for " +
|
|
|
'<span class="btn">' +
|
|
|
this.choiceBehavior.join("、") +
|
|
|
"</span>"
|
|
@@ -1413,9 +1413,9 @@ export default {
|
|
|
reset() {
|
|
|
if (this.type == 0) {
|
|
|
if (this.isCountdown) {
|
|
|
- this.$confirm("正在倒计时!确定重置倒计时吗?", "提醒", {
|
|
|
- confirmButtonText: "确定",
|
|
|
- cancelButtonText: "取消",
|
|
|
+ this.$confirm("Countdown is in progress! Are you sure you want to reset the countdown?", "Reminder", {
|
|
|
+ confirmButtonText: "Confirm",
|
|
|
+ cancelButtonText: "Cancel",
|
|
|
type: "warning"
|
|
|
})
|
|
|
.then(_ => {
|
|
@@ -1425,18 +1425,18 @@ export default {
|
|
|
this.countdownTime = 0;
|
|
|
this.isCountdown = false;
|
|
|
this.choiceBehavior = [];
|
|
|
- this.$message.success("已重置");
|
|
|
+ this.$message.success("Reset successful");
|
|
|
if (this.$refs.audioRef.playing) {
|
|
|
this.$refs.audioRef.pause();
|
|
|
}
|
|
|
})
|
|
|
.catch(_ => {
|
|
|
- console.log("取消重置");
|
|
|
+ console.log("Reset canceled");
|
|
|
});
|
|
|
} else {
|
|
|
- this.$confirm("确定重置倒计时吗?", "提醒", {
|
|
|
- confirmButtonText: "确定",
|
|
|
- cancelButtonText: "取消",
|
|
|
+ this.$confirm("Are you sure you want to reset the countdown?", "Reminder", {
|
|
|
+ confirmButtonText: "Confirm",
|
|
|
+ cancelButtonText: "Cancel",
|
|
|
type: "warning"
|
|
|
})
|
|
|
.then(_ => {
|
|
@@ -1447,17 +1447,17 @@ export default {
|
|
|
this.countdownTime = 0;
|
|
|
this.isCountdown = false;
|
|
|
this.choiceBehavior = [];
|
|
|
- this.$message.success("已重置");
|
|
|
+ this.$message.success("Reset successful");
|
|
|
})
|
|
|
.catch(_ => {
|
|
|
- console.log("取消重置");
|
|
|
+ console.log("Reset canceled");
|
|
|
});
|
|
|
}
|
|
|
} else if (this.type == 1) {
|
|
|
if (this.isKeepTime) {
|
|
|
- this.$confirm("正在计时!确定重置计时吗?", "提醒", {
|
|
|
- confirmButtonText: "确定",
|
|
|
- cancelButtonText: "取消",
|
|
|
+ this.$confirm("Timing is in progress! Are you sure you want to reset the timing?", "Reminder", {
|
|
|
+ confirmButtonText: "Confirm",
|
|
|
+ cancelButtonText: "Cancel",
|
|
|
type: "warning"
|
|
|
})
|
|
|
.then(_ => {
|
|
@@ -1471,13 +1471,13 @@ export default {
|
|
|
time: this.keepTime,
|
|
|
tag: this.choiceBehavior
|
|
|
};
|
|
|
- let timeShow = `${this.keepTimeShow.m1}${this.keepTimeShow.m2}分钟${this.keepTimeShow.s1}${this.keepTimeShow.s2}秒`;
|
|
|
+ let timeShow = `${this.keepTimeShow.m1}${this.keepTimeShow.m2} minutes ${this.keepTimeShow.s1}${this.keepTimeShow.s2} seconds`;
|
|
|
this.insertMemorandum(
|
|
|
- `结束计时器,<span class="btn">计时</span><span class="variable">${timeShow}</span>${
|
|
|
+ `End timer, <span class="btn">Timing</span><span class="variable">${timeShow}</span>${
|
|
|
this.choiceBehavior.length > 0
|
|
|
- ? ",用于" +
|
|
|
+ ? " for " +
|
|
|
'<span class="btn">' +
|
|
|
- this.choiceBehavior.join("、") +
|
|
|
+ this.choiceBehavior.join(", ") +
|
|
|
"</span>"
|
|
|
: ""
|
|
|
}`
|
|
@@ -1487,7 +1487,7 @@ export default {
|
|
|
this.insertData(_data);
|
|
|
})
|
|
|
.catch(_ => {
|
|
|
- console.log("取消重置");
|
|
|
+ console.log("Reset canceled");
|
|
|
});
|
|
|
} else {
|
|
|
let _data = {
|
|
@@ -1499,13 +1499,13 @@ export default {
|
|
|
this.$refs.audioRef.pause();
|
|
|
}
|
|
|
this.insertData(_data);
|
|
|
- let timeShow = `${this.keepTimeShow.m1}${this.keepTimeShow.m2}分钟${this.keepTimeShow.s1}${this.keepTimeShow.s2}秒`;
|
|
|
+ let timeShow = `${this.keepTimeShow.m1}${this.keepTimeShow.m2} minutes ${this.keepTimeShow.s1}${this.keepTimeShow.s2} seconds`;
|
|
|
this.insertMemorandum(
|
|
|
- `结束计时器,<span class="btn">计时</span><span class="variable">${timeShow}</span>${
|
|
|
+ `End timer, <span class="btn">Timing</span><span class="variable">${timeShow}</span>${
|
|
|
this.choiceBehavior.length > 0
|
|
|
- ? ",用于" +
|
|
|
+ ? " for " +
|
|
|
'<span class="btn">' +
|
|
|
- this.choiceBehavior.join("、") +
|
|
|
+ this.choiceBehavior.join(", ") +
|
|
|
"</span>"
|
|
|
: ""
|
|
|
}`
|
|
@@ -1513,7 +1513,7 @@ export default {
|
|
|
this.keepTime = 0;
|
|
|
this.isKeepTime = false;
|
|
|
// this.choiceBehavior = [];
|
|
|
- this.$message.success("已重置");
|
|
|
+ this.$message.success("Reset successful");
|
|
|
}
|
|
|
}
|
|
|
},
|
|
@@ -1572,7 +1572,7 @@ ${_textData}
|
|
|
})
|
|
|
.catch(e => {
|
|
|
this.behaviorTagMoreLoading = false;
|
|
|
- this.$message.error("获取更多行为标签失败");
|
|
|
+ this.$message.error("Failed to retrieve more behavior tags");
|
|
|
this.behaviorTagType = 0;
|
|
|
this.behaviorTagMore = [];
|
|
|
console.log(e);
|
|
@@ -1634,7 +1634,7 @@ ${_textData}
|
|
|
.catch(err => {
|
|
|
console.log(err);
|
|
|
this.memorandumLoading = false;
|
|
|
- this.$message.error("获取行为备忘失败");
|
|
|
+ this.$message.error("Failed to retrieve behavior memorandum");
|
|
|
});
|
|
|
},
|
|
|
|
|
@@ -1705,7 +1705,7 @@ ${_textData}
|
|
|
};
|
|
|
},
|
|
|
changeSourceUrl(url){
|
|
|
- if(this.isCountdown || this.isKeepTime)return this.$message.error("请先停止计时再设置");
|
|
|
+ if(this.isCountdown || this.isKeepTime)return this.$message.error("Please stop the timer before setting.");
|
|
|
if(this.sourceUrl == url)return this.showSourceList = false;
|
|
|
this.sourceUrl = url;
|
|
|
|