|
@@ -2191,6 +2191,7 @@ export default {
|
|
|
teaType: [],
|
|
|
examineData:null,
|
|
|
disableBack: this.$route.query.disableBack === 'true',
|
|
|
+ timeLimit:this.$route.query.timeLimit,
|
|
|
};
|
|
|
},
|
|
|
watch: {},
|
|
@@ -2419,10 +2420,10 @@ export default {
|
|
|
|
|
|
let kpl = this.tableWorksArray[kin].array
|
|
|
// console.log('kpl',this.tableWorksArray[kin]);
|
|
|
-
|
|
|
+
|
|
|
for (let index = 0; index < kpl.length; index++) {
|
|
|
if (kpl[index].type == 3 && this.cueWord.fieldList.includes(kpl[index].json.title)) {
|
|
|
- userWork.push(kpl[index].json.title +':'+ kpl[index].json.answer2)
|
|
|
+ userWork.push(kpl[index].json.title +':'+ kpl[index].json.answer2)
|
|
|
}
|
|
|
if (kpl[index].type == 5 && this.cueWord.fieldList.includes(kpl[index].json.title)) {
|
|
|
if (kpl[index].json.file && kpl[index].json.file[0].url) {
|
|
@@ -2569,7 +2570,7 @@ ${JSON.stringify(forAllList)}
|
|
|
let data = response.data.FunctionResponse;
|
|
|
// console.log("data", data.message);
|
|
|
// console.log('kkkk',JSON.parse(data.message));
|
|
|
-
|
|
|
+
|
|
|
this.scoList = JSON.parse(data.message)
|
|
|
this.aiscoLoading = false
|
|
|
|
|
@@ -2958,7 +2959,48 @@ ${JSON.stringify(forAllList)}
|
|
|
|
|
|
// console.log('dddd',this.TeachingOptions);
|
|
|
|
|
|
- this.works = res.data[1];
|
|
|
+ let _worksData = res.data[1];
|
|
|
+
|
|
|
+ if(this.timeLimit){
|
|
|
+ // 根据 timeLimit 筛选 _worksData
|
|
|
+ _worksData = _worksData.filter(i => {
|
|
|
+ if (!i.time) return false;
|
|
|
+ // time 例子:2025年02月25日 10:17:46
|
|
|
+ // timeLimit 例子:"2025~2026" 或 "2025"
|
|
|
+ let timeLimit = this.timeLimit;
|
|
|
+ let startYear, endYear;
|
|
|
+ // 判断是否为区间
|
|
|
+ if (timeLimit.includes('~')) {
|
|
|
+ [startYear, endYear] = timeLimit.split('~').map(y => y.trim());
|
|
|
+ startYear = parseInt(startYear);
|
|
|
+ endYear = parseInt(endYear);
|
|
|
+ } else {
|
|
|
+ // 单独一个年份,只获取该年份的数据
|
|
|
+ startYear = parseInt(timeLimit);
|
|
|
+ endYear = startYear;
|
|
|
+ }
|
|
|
+ // 提取年份、月份、日期
|
|
|
+ let match = i.time.match(/^(\d{4})年(\d{2})月(\d{2})日/);
|
|
|
+ if (!match) return false;
|
|
|
+ let year = parseInt(match[1]);
|
|
|
+ let month = parseInt(match[2]);
|
|
|
+ let day = parseInt(match[3]);
|
|
|
+ // 构造当前数据的日期对象
|
|
|
+ let curDate = new Date(year, month - 1, day, 0, 0, 0);
|
|
|
+ if (startYear === endYear) {
|
|
|
+ // 只获取该年份的数据
|
|
|
+ return year === startYear;
|
|
|
+ } else {
|
|
|
+ // 构造起始日期(包含)
|
|
|
+ let startDate = new Date(startYear, 0, 1, 0, 0, 0);
|
|
|
+ // 构造结束日期(不包含),即endYear年1月1日
|
|
|
+ let endDate = new Date(endYear, 0, 1, 0, 0, 0);
|
|
|
+ return curDate >= startDate && curDate < endDate;
|
|
|
+ }
|
|
|
+ });
|
|
|
+ }
|
|
|
+
|
|
|
+ this.works = _worksData;
|
|
|
this.iscount = res.data[2][0].count;
|
|
|
this.pcount = res.data[3][0].count;
|
|
|
let chapters = this.setJSON(
|