|
@@ -108,7 +108,7 @@
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
- <div class="right" v-if="peopleId">
|
|
|
|
|
|
+ <div class="right" v-if="review==='1'">
|
|
<div class="score_box">总分:<span>{{ scoList2.reduce((acc, curr) => acc + curr.sco, 0) }}</span></div>
|
|
<div class="score_box">总分:<span>{{ scoList2.reduce((acc, curr) => acc + curr.sco, 0) }}</span></div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
@@ -229,7 +229,7 @@
|
|
|
|
|
|
|
|
|
|
<el-popover
|
|
<el-popover
|
|
- v-if="stype == 2"
|
|
|
|
|
|
+ v-if="stype == 2 && ((peopleId && review==1) || (!peopleId && !review))"
|
|
placement="top-start"
|
|
placement="top-start"
|
|
width="320"
|
|
width="320"
|
|
ref="popover1"
|
|
ref="popover1"
|
|
@@ -242,7 +242,7 @@
|
|
小可努力生成中,请稍等片刻<img style="width: 50px;" src="../../../../assets/KekeLoading.gif" alt="">
|
|
小可努力生成中,请稍等片刻<img style="width: 50px;" src="../../../../assets/KekeLoading.gif" alt="">
|
|
</div>
|
|
</div>
|
|
<div style="display: flex;justify-content: space-between;align-items: center;">
|
|
<div style="display: flex;justify-content: space-between;align-items: center;">
|
|
- <div class="TopTit">智能分析列</div>
|
|
|
|
|
|
+ <div class="TopTit">智能评分</div>
|
|
<el-popover
|
|
<el-popover
|
|
placement="bottom"
|
|
placement="bottom"
|
|
@click.native.stop
|
|
@click.native.stop
|
|
@@ -364,6 +364,7 @@
|
|
</div> -->
|
|
</div> -->
|
|
<div style="margin-top: 10px;display: flex;justify-content: flex-end;">
|
|
<div style="margin-top: 10px;display: flex;justify-content: flex-end;">
|
|
<el-button @click="opQvisible0 = false">取消</el-button>
|
|
<el-button @click="opQvisible0 = false">取消</el-button>
|
|
|
|
+ <el-button style="background: #1456F0;" @click="markScoAuto()" type="primary">自动评分</el-button>
|
|
<el-button style="background: #1456F0;" @click="markSco()" type="primary">运行</el-button>
|
|
<el-button style="background: #1456F0;" @click="markSco()" type="primary">运行</el-button>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
@@ -373,7 +374,7 @@
|
|
slot="reference"
|
|
slot="reference"
|
|
class="btnA"
|
|
class="btnA"
|
|
>
|
|
>
|
|
- 智能分析列
|
|
|
|
|
|
+ 智能评分
|
|
</div>
|
|
</div>
|
|
</el-popover>
|
|
</el-popover>
|
|
|
|
|
|
@@ -1401,7 +1402,7 @@
|
|
<div class="tableDatePicker">
|
|
<div class="tableDatePicker">
|
|
<el-date-picker
|
|
<el-date-picker
|
|
v-model="tableDatePicker[index]"
|
|
v-model="tableDatePicker[index]"
|
|
- @change="tableDataPickerChange"
|
|
|
|
|
|
+ @blur="tableDataPickerChange"
|
|
type="daterange"
|
|
type="daterange"
|
|
range-separator="▼"
|
|
range-separator="▼"
|
|
:picker-options="pickerOptions(item.json.timeSort)"
|
|
:picker-options="pickerOptions(item.json.timeSort)"
|
|
@@ -1562,7 +1563,7 @@
|
|
</el-table-column>
|
|
</el-table-column>
|
|
<el-table-column
|
|
<el-table-column
|
|
label="操作"
|
|
label="操作"
|
|
- width="250px"
|
|
|
|
|
|
+ :width="review=='1'?'150px':'250px'"
|
|
fixed="right"
|
|
fixed="right"
|
|
v-if="isN != 1"
|
|
v-if="isN != 1"
|
|
>
|
|
>
|
|
@@ -1578,28 +1579,52 @@
|
|
<el-button
|
|
<el-button
|
|
@click="editTest(scope.row)"
|
|
@click="editTest(scope.row)"
|
|
type="primary"
|
|
type="primary"
|
|
- v-if="(examineData && examineData.type == 1) || !examineData"
|
|
|
|
|
|
+ v-if="((examineData && examineData.type == 1) || !examineData) && review !='1'"
|
|
size="small"
|
|
size="small"
|
|
>编辑</el-button
|
|
>编辑</el-button
|
|
>
|
|
>
|
|
|
|
|
|
|
|
+ <el-button
|
|
|
|
+ @click="returnTest(scope.row)"
|
|
|
|
+ type="primary"
|
|
|
|
+ size="small"
|
|
|
|
+ v-if="((examineData && examineData.type == 1) || !examineData) && review == '1'"
|
|
|
|
+ >退回</el-button
|
|
|
|
+ >
|
|
|
|
+ <!-- v-if="((examineData && examineData.type == 1) || !examineData) && review == '1'" -->
|
|
|
|
+
|
|
|
|
+
|
|
<!-- <el-button @click="setWordHtml(scope.row)" type="primary" size="small">导出答题信息</el-button>
|
|
<!-- <el-button @click="setWordHtml(scope.row)" type="primary" size="small">导出答题信息</el-button>
|
|
<el-button @click="setWordTemplate(scope.row)" type="primary" size="small">word导出</el-button> -->
|
|
<el-button @click="setWordTemplate(scope.row)" type="primary" size="small">word导出</el-button> -->
|
|
<el-button
|
|
<el-button
|
|
@click="deleteTest(scope.row.id)"
|
|
@click="deleteTest(scope.row.id)"
|
|
type="primary"
|
|
type="primary"
|
|
size="small"
|
|
size="small"
|
|
- v-if="(examineData && examineData.type == 1) || !examineData"
|
|
|
|
|
|
+ v-if="((examineData && examineData.type == 1) || !examineData) && review !='1'"
|
|
>删除</el-button
|
|
>删除</el-button
|
|
>
|
|
>
|
|
</template>
|
|
</template>
|
|
</el-table-column>
|
|
</el-table-column>
|
|
|
|
|
|
|
|
+
|
|
|
|
+ <el-table-column
|
|
|
|
+ label="状态"
|
|
|
|
+ width="100px"
|
|
|
|
+ fixed="right"
|
|
|
|
+ align="center"
|
|
|
|
+ v-if="!review && peopleId"
|
|
|
|
+ >
|
|
|
|
+ <template slot-scope="scope">
|
|
|
|
+ <!-- v-if="review==='1'" -->
|
|
|
|
+ <span :class="`typeStatus typeStatus_${scope.row.type}`">{{ typeStatusList[scope.row.type] }}</span>
|
|
|
|
+ </template>
|
|
|
|
+ </el-table-column>
|
|
|
|
+
|
|
<el-table-column
|
|
<el-table-column
|
|
label="审核状态"
|
|
label="审核状态"
|
|
width="120px"
|
|
width="120px"
|
|
fixed="right"
|
|
fixed="right"
|
|
- v-if="peopleId"
|
|
|
|
|
|
+ v-if="review==='1'"
|
|
>
|
|
>
|
|
<template slot-scope="scope">
|
|
<template slot-scope="scope">
|
|
<el-checkbox @change="reviewChange(scope.row)" true-label="1" false-label="0" v-model="scope.row.isReview">审核通过</el-checkbox>
|
|
<el-checkbox @change="reviewChange(scope.row)" true-label="1" false-label="0" v-model="scope.row.isReview">审核通过</el-checkbox>
|
|
@@ -2131,7 +2156,7 @@ export default {
|
|
fieldList:[]
|
|
fieldList:[]
|
|
},
|
|
},
|
|
scoList:[],
|
|
scoList:[],
|
|
- scoListCopy:[],
|
|
|
|
|
|
+ scoListCopy:[], //没有什么别的用处只是为了展示用,让表单在评分的过程中不清零
|
|
quoteV:false,
|
|
quoteV:false,
|
|
openCeVal:false,
|
|
openCeVal:false,
|
|
opQvisible:false,
|
|
opQvisible:false,
|
|
@@ -2208,6 +2233,9 @@ export default {
|
|
disableBack: this.$route.query.disableBack === 'true',
|
|
disableBack: this.$route.query.disableBack === 'true',
|
|
timeLimit:this.$route.query.timeLimit,
|
|
timeLimit:this.$route.query.timeLimit,
|
|
sortTime:[],
|
|
sortTime:[],
|
|
|
|
+ review:this.$route.query.review,
|
|
|
|
+ defaultTimeLimit:[],
|
|
|
|
+ typeStatusList:["","未提交","已提交","","已退回"]
|
|
};
|
|
};
|
|
},
|
|
},
|
|
watch: {},
|
|
watch: {},
|
|
@@ -2439,7 +2467,7 @@ export default {
|
|
});
|
|
});
|
|
this.opQvisible = false
|
|
this.opQvisible = false
|
|
},
|
|
},
|
|
- // 点击开始评分
|
|
|
|
|
|
+ // 点击开始评分(全部进行评分)
|
|
async markSco(){
|
|
async markSco(){
|
|
if (!this.cueWord.openCeTit.trim()) return this.$message.error('请输入标题')
|
|
if (!this.cueWord.openCeTit.trim()) return this.$message.error('请输入标题')
|
|
if (!this.cueWord.openCeCon.trim()) return this.$message.error('请输入指令')
|
|
if (!this.cueWord.openCeCon.trim()) return this.$message.error('请输入指令')
|
|
@@ -2618,6 +2646,190 @@ ${JSON.stringify(forAllList)}
|
|
console.log(error);
|
|
console.log(error);
|
|
});
|
|
});
|
|
},
|
|
},
|
|
|
|
+ // 点击开始自动评分(未评分得数据进行评分)
|
|
|
|
+ async markScoAuto(){
|
|
|
|
+ let scoid = this.scoList.map(e=> e.id);
|
|
|
|
+ console.log('scoid',scoid);
|
|
|
|
+ let TabArr = this.tableWorksArray.filter(e=> scoid.indexOf(e.id) == -1)
|
|
|
|
+
|
|
|
|
+ console.log('this.TabArr',TabArr);
|
|
|
|
+ if (!TabArr.length) return this.$message.error('已全部评分')
|
|
|
|
+
|
|
|
|
+ if (!this.cueWord.openCeTit.trim()) return this.$message.error('请输入标题')
|
|
|
|
+ if (!this.cueWord.openCeCon.trim()) return this.$message.error('请输入指令')
|
|
|
|
+ if (this.cueWord.fieldList.length == 0) return this.$message.error('请选择引用字段')
|
|
|
|
+ this.aiscoLoading = true
|
|
|
|
+
|
|
|
|
+ let forAllList = [];
|
|
|
|
+ this.scoList = []
|
|
|
|
+
|
|
|
|
+ // 进行整理数据,将用户回答都存在一个数组里
|
|
|
|
+ for (let kin = 0; kin < TabArr.length; kin++) {
|
|
|
|
+ let userWork = []
|
|
|
|
+ let _fileid = []
|
|
|
|
+
|
|
|
|
+ let kpl = TabArr[kin].array
|
|
|
|
+ // console.log('kpl',this.TabArr[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)
|
|
|
|
+ }
|
|
|
|
+ if (kpl[index].type == 5 && this.cueWord.fieldList.includes(kpl[index].json.title)) {
|
|
|
|
+ if (kpl[index].json.file && kpl[index].json.file[0].url) {
|
|
|
|
+ _fileid.push(kpl[index].json.file[0].url)
|
|
|
|
+ }
|
|
|
|
+ userWork.push(kpl[index].json.title+':' + _fileid.join('、'))
|
|
|
|
+ }
|
|
|
|
+ if (kpl[index].type == 7 && this.cueWord.fieldList.includes(kpl[index].json.title)) {
|
|
|
|
+ userWork.push(kpl[index].json.title+':'+kpl[index].json.answer2)
|
|
|
|
+ }
|
|
|
|
+ if (kpl[index].type == 1 && this.cueWord.fieldList.includes(kpl[index].json.title)) {
|
|
|
|
+ let kk = []
|
|
|
|
+ kpl[index].json.answer2.forEach((e)=>{
|
|
|
|
+ kk.push(kpl[index].json.array[e].option)
|
|
|
|
+ })
|
|
|
|
+ userWork.push(kpl[index].json.title+':' +kk.join(','))
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+let info = [
|
|
|
|
+ this.cueWord.fieldList.includes('序号') ? '序号' + (kin + 1) : '',
|
|
|
|
+ this.cueWord.fieldList.includes('提交人') ? '提交人:' + TabArr[kin].name : '',
|
|
|
|
+ this.cueWord.fieldList.includes('学段') ? '学段:' + this.getTType(this.teaType[0].id, TabArr[kin].cclassid) : '',
|
|
|
|
+ this.cueWord.fieldList.includes('年级') ? '年级:' + this.getTType(this.teaType[1].id, TabArr[kin].cclassid) : '',
|
|
|
|
+ this.cueWord.fieldList.includes('学科') ? '学科:' + this.getTType(this.teaType[2].id, TabArr[kin].cclassid) : '',
|
|
|
|
+ this.cueWord.fieldList.includes('职务') ? '职务:' + this.getTType(this.teaType[3].id, TabArr[kin].cclassid) : '',
|
|
|
|
+ this.cueWord.fieldList.includes('教龄') ? '教龄:' + this.getTType(this.teaType[4].id, TabArr[kin].cclassid) : '',
|
|
|
|
+ this.cueWord.fieldList.includes('提交时间') ? '提交时间:' + TabArr[kin].time : '',
|
|
|
|
+ userWork.filter(Boolean).join('\n')
|
|
|
|
+].filter(Boolean).join('\n');
|
|
|
|
+ forAllList.push({id:TabArr[kin].id,data:info})
|
|
|
|
+ // console.log('info',info);
|
|
|
|
+
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ // console.log('forAllList',forAllList);
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+ let messages = `
|
|
|
|
+NOTICE
|
|
|
|
+Role: 你是一个高级数据处理师。
|
|
|
|
+- 深入理解各种数据处理标准,确保处理流程的准确性。
|
|
|
|
+- 熟练掌握数据结构知识,能快速解析“字段名称:具体内容”结构的文本。
|
|
|
|
+- 具备强大的逻辑分析能力,以便制定合理的数据处理流程。
|
|
|
|
+- 有丰富的数据处理经验,能应对多种类型的数据操作。
|
|
|
|
+- 拥有精准的数据分析能力,准确得出处理结果。
|
|
|
|
+- 擅长根据不同评价标准进行数据评价,保证结果符合要求。
|
|
|
|
+- 能够高效地处理大量数据,保证工作的时效性。
|
|
|
|
+Language: ${this.getLang()}
|
|
|
|
+
|
|
|
|
+## 上下文
|
|
|
|
+在数据处理任务缺乏合适工具或人力时,如数据分析项目、数据审核任务场景下,存在多组特定结构的文本数据,需数据处理大师理解标准和内容,制定流程并处理数据,按要求输出结果。
|
|
|
|
+
|
|
|
|
+## 数据处理标准
|
|
|
|
+${this.cueWord.openCeCon}
|
|
|
|
+
|
|
|
|
+## 数据内容
|
|
|
|
+${JSON.stringify(forAllList)}
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+## 任务
|
|
|
|
+1. 数据标准理解:详细了解{数据处理标准}(如准确性、完整性、一致性等要求)
|
|
|
|
+2. 数据内容理解: 阅读并理解{数据内容}包括多组“字段名称:具体内容”结构的文本数据。
|
|
|
|
+3. 处理流程制定:根据所理解的{数据处理标准},制定详细的数据处理流程,包括数据分析(如统计分析、关联分析等)、数据评价(根据标准打分或分类等)等步骤。
|
|
|
|
+4. 数据处理操作:按照制定的流程对数据进行分析、处理和评价等操作。
|
|
|
|
+5. 结果输出:仅输出按照用户要求处理后的结果,确保结果清晰、准确且易于理解。
|
|
|
|
+
|
|
|
|
+### 理论框架
|
|
|
|
+### 数据生命周期管理理论
|
|
|
|
+1. 基本原理:
|
|
|
|
+- 数据生命周期涵盖数据的创建、存储、使用、共享、归档和销毁等阶段,每个阶段有不同的管理要求。
|
|
|
|
+- 明确各阶段的数据特征与管理重点有助于确保数据质量和合规性。
|
|
|
|
+2. 具体应用:
|
|
|
|
+- 确定处理阶段:根据数据处理任务确定数据处于生命周期的哪个阶段进行针对性处理。
|
|
|
|
+- 遵循管理规范:按照各阶段的管理要求,如存储安全规范,在处理中保障数据。
|
|
|
|
+- 规划流程:基于数据生命周期各阶段顺序规划合理的数据处理流程。
|
|
|
|
+
|
|
|
|
+### ETL(Extract,Transform,Load)理论
|
|
|
|
+1. 基本原理:
|
|
|
|
+- ETL是数据仓库中的一种数据处理过程,包括抽取、转换和加载三个主要步骤。
|
|
|
|
+- 用于将不同来源的数据整合到数据仓库中,保证数据的一致性和准确性。
|
|
|
|
+2. 具体应用:
|
|
|
|
+- 数据抽取:从多组文本数据中提取所需的字段和内容。
|
|
|
|
+- 数据转换:对抽取的数据按照标准进行格式转换、清洗等操作。
|
|
|
|
+- 数据加载:将处理好的数据加载到合适的存储或输出结构中。
|
|
|
|
+
|
|
|
|
+### 数据质量评估理论
|
|
|
|
+1. 基本原理:
|
|
|
|
+- 从准确性、完整性、一致性等多方面评估数据质量,以确保数据可靠。
|
|
|
|
+- 不同的数据用途有不同的质量要求,需建立相应评估指标。
|
|
|
|
+2. 具体应用:
|
|
|
|
+- 质量指标确定:根据处理标准确定数据质量评估指标。
|
|
|
|
+- 数据检查:按照指标对处理过程中的数据进行检查。
|
|
|
|
+- 结果验证:依据评估结果验证最终输出的数据是否符合要求。
|
|
|
|
+
|
|
|
|
+##响应
|
|
|
|
+严格按照用户的需求进行输出,不要输出多余的内容
|
|
|
|
+
|
|
|
|
+## 要求
|
|
|
|
+- 以清晰的逻辑构建处理流程,步骤分明。
|
|
|
|
+- 对数据内容进行全面分析,不遗漏任何关键信息。
|
|
|
|
+- 根据评价标准严格进行评价操作,保证结果的公正性。
|
|
|
|
+- 处理结果输出简洁明了,仅包含符合要求的内容。
|
|
|
|
+- 考虑到可能存在的多种数据结构,保持处理方法的通用性。
|
|
|
|
+- 针对数据处理过程中的特殊情况提供应对措施。
|
|
|
|
+- 以专业的态度对待数据,确保数据的安全性与完整性。
|
|
|
|
+- 输出格式[{id:数据id,sco:评分}]。
|
|
|
|
+- 不输出分析过程,直接输出最后计算结果。
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+## 限制
|
|
|
|
+- 不应包含未经定义的数据处理术语,以免造成混淆。
|
|
|
|
+- 避免输出与数据处理标准无关的内容。
|
|
|
|
+- 不应包含模糊不清的处理步骤或操作。
|
|
|
|
+- 避免提及无法获取的外部工具或资源,除非有替代方案。
|
|
|
|
+- 不应包含未经证实的数据处理假设。
|
|
|
|
+- 不要回复你不知道的内容
|
|
|
|
+- 不要直接回复<demo>的内容
|
|
|
|
+- 所输出的内容必须按照给定的格式进行组织,不能偏离框架要求。
|
|
|
|
+- 请使用准确可靠的信息来源,确保规划的可行性和实用性。
|
|
|
|
+- 如果查询信息不是真实信息,如 xxx 等占位字符,不要采纳或使用。
|
|
|
|
+- 不要给用户提供任何虚假信息!不要给用户提供任何虚假信息!不要给用户提供任何虚假信息`;
|
|
|
|
+
|
|
|
|
+ // console.log('messages',messages);
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+ let params = {
|
|
|
|
+ assistant_id: "6063369f-289a-11ef-8bf4-12e77c4cb76b",
|
|
|
|
+ message: [
|
|
|
|
+ {
|
|
|
|
+ type: "text",
|
|
|
|
+ text: messages.replaceAll("\n", " ").replaceAll("*", "")
|
|
|
|
+ }
|
|
|
|
+ ],
|
|
|
|
+ session_name: uuidv4(),
|
|
|
|
+ userId: this.userid,
|
|
|
|
+ file_ids: '',
|
|
|
|
+ model: "gpt-4o-2024-11-20"
|
|
|
|
+ };
|
|
|
|
+ this.ajax
|
|
|
|
+ .post("https://gpt4.cocorobo.cn/ai_agent_park_chat", params)
|
|
|
|
+ .then(response => {
|
|
|
|
+ let data = response.data.FunctionResponse;
|
|
|
|
+ this.scoList = JSON.parse(data.message)
|
|
|
|
+ this.aiscoLoading = false
|
|
|
|
+
|
|
|
|
+ this.uploadSCo(1)
|
|
|
|
+ })
|
|
|
|
+ .catch(error => {
|
|
|
|
+ this.aiscoLoading = false
|
|
|
|
+ this.$message.error('评分失败')
|
|
|
|
+ reject(error)
|
|
|
|
+ console.log(error);
|
|
|
|
+ });
|
|
|
|
+ },
|
|
// 获取评分
|
|
// 获取评分
|
|
async getAiSco(){
|
|
async getAiSco(){
|
|
return new Promise((resolve, reject) => {
|
|
return new Promise((resolve, reject) => {
|
|
@@ -2663,13 +2875,21 @@ ${JSON.stringify(forAllList)}
|
|
|
|
|
|
},
|
|
},
|
|
// 上传评分
|
|
// 上传评分
|
|
- uploadSCo(){
|
|
|
|
|
|
+ uploadSCo(val){
|
|
this.aiscoLoading = true
|
|
this.aiscoLoading = true
|
|
|
|
|
|
|
|
+ // val有数据就是自动评分把将新老数据结合在一起
|
|
|
|
+ let scoArr = []
|
|
|
|
+ if (val) {
|
|
|
|
+ scoArr = [...this.scoList,...this.scoListCopy]
|
|
|
|
+ }else{
|
|
|
|
+ scoArr = this.scoList
|
|
|
|
+ }
|
|
|
|
+
|
|
let params = [{
|
|
let params = [{
|
|
tid:this.cid,
|
|
tid:this.cid,
|
|
- uid:'6063369f-289a-11ef-8bf4-12e77c4cb76b',
|
|
|
|
- json:JSON.stringify(this.scoList),
|
|
|
|
|
|
+ uid:this.userid,
|
|
|
|
+ json:JSON.stringify(scoArr),
|
|
cw: JSON.stringify(this.cueWord)
|
|
cw: JSON.stringify(this.cueWord)
|
|
}]
|
|
}]
|
|
// console.log('params',params);
|
|
// console.log('params',params);
|
|
@@ -2996,34 +3216,56 @@ ${JSON.stringify(forAllList)}
|
|
|
|
|
|
let _worksData = res.data[1];
|
|
let _worksData = res.data[1];
|
|
|
|
|
|
- if(this.timeLimit){
|
|
|
|
- console.log("timeLimit", this.timeLimit)
|
|
|
|
- // 2024-12-31T16:00:00.000Z,2025-12-31T16:00:00.000Z
|
|
|
|
- // 根据 timeLimit 筛选 _worksData
|
|
|
|
- let [startStr, endStr] = this.timeLimit.split(',');
|
|
|
|
- let startDate = startStr ? new Date(startStr) : null;
|
|
|
|
- let endDate = endStr ? new Date(endStr) : null;
|
|
|
|
- _worksData = _worksData.filter(i => {
|
|
|
|
- if (!i.time) return false;
|
|
|
|
- // i.time 例子:2025年02月25日 10:17:46
|
|
|
|
- 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 (startDate && endDate) {
|
|
|
|
- return curDate >= startDate && curDate <= endDate;
|
|
|
|
- } else if (startDate) {
|
|
|
|
- return curDate >= startDate;
|
|
|
|
- } else if (endDate) {
|
|
|
|
- return curDate <= endDate;
|
|
|
|
- }
|
|
|
|
- return true;
|
|
|
|
- });
|
|
|
|
- }
|
|
|
|
|
|
+ // if(this.timeLimit){
|
|
|
|
+ // console.log("timeLimit", this.timeLimit)
|
|
|
|
+ // // 2024-12-31T16:00:00.000Z,2025-12-31T16:00:00.000Z
|
|
|
|
+ // // 根据 timeLimit 筛选 _worksData
|
|
|
|
+ // let [startStr, endStr] = this.timeLimit.split(',');
|
|
|
|
+ // let startDate = startStr ? new Date(startStr) : null;
|
|
|
|
+ // let endDate = endStr ? new Date(endStr) : null;
|
|
|
|
+ // _worksData = _worksData.filter(i => {
|
|
|
|
+ // if (!i.time) return false;
|
|
|
|
+ // // i.time 例子:2025年02月25日 10:17:46
|
|
|
|
+ // 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 (startDate && endDate) {
|
|
|
|
+ // return curDate >= startDate && curDate <= endDate;
|
|
|
|
+ // } else if (startDate) {
|
|
|
|
+ // return curDate >= startDate;
|
|
|
|
+ // } else if (endDate) {
|
|
|
|
+ // return curDate <= endDate;
|
|
|
|
+ // }
|
|
|
|
+ // return true;
|
|
|
|
+ // });
|
|
|
|
+ // }
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+ // if(this.timeLimit){
|
|
|
|
+ // if(_worksData[0]){
|
|
|
|
+ // let _data = JSON.parse(_worksData[0].courseJson)
|
|
|
|
+ // let _flag = false;
|
|
|
|
+ // _data.forEach((item,index)=>{
|
|
|
|
+ // if(item.type == 8 && item.json.title == "获奖时间"){
|
|
|
|
+ // _flag = true
|
|
|
|
+ // let time = this.timeLimit.split(",");
|
|
|
|
+ // this.tableDatePicker[index] = [new Date(time[0]),new Date(time[1])]
|
|
|
|
+ // }
|
|
|
|
+ // })
|
|
|
|
+
|
|
|
|
+ // if(!_flag){
|
|
|
|
+ // let time = this.timeLimit.split(",");
|
|
|
|
+ // this.submissionTimePicker = [new Date(time[0]),new Date(time[1])];
|
|
|
|
+ // }
|
|
|
|
+ // this.tableDataPickerChange();
|
|
|
|
+ // this.submissionTimePickerChange()
|
|
|
|
+ // }
|
|
|
|
+ // }
|
|
|
|
|
|
this.works = _worksData;
|
|
this.works = _worksData;
|
|
this.iscount = res.data[2][0].count;
|
|
this.iscount = res.data[2][0].count;
|
|
@@ -3155,6 +3397,7 @@ ${JSON.stringify(forAllList)}
|
|
cut: 0,
|
|
cut: 0,
|
|
uteaName: this.works[i].uteaName,
|
|
uteaName: this.works[i].uteaName,
|
|
courseJson: JSON.parse(this.works[i].courseJson),
|
|
courseJson: JSON.parse(this.works[i].courseJson),
|
|
|
|
+ type:this.works[i].type
|
|
});
|
|
});
|
|
// }
|
|
// }
|
|
}
|
|
}
|
|
@@ -3402,6 +3645,31 @@ ${JSON.stringify(forAllList)}
|
|
});
|
|
});
|
|
});
|
|
});
|
|
console.log(this.teaType, "teaType");
|
|
console.log(this.teaType, "teaType");
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+ if(this.timeLimit){
|
|
|
|
+ if(this.works[0]){
|
|
|
|
+ let _data = JSON.parse(this.works[0].courseJson)
|
|
|
|
+ let _flag = false;
|
|
|
|
+ _data.forEach((item,index)=>{
|
|
|
|
+ if(item.type == 8 && item.json.title == "获奖时间"){
|
|
|
|
+ _flag = true
|
|
|
|
+ let time = this.timeLimit.split(",");
|
|
|
|
+ this.tableDatePicker[index] = [new Date(time[0]),new Date(time[1])]
|
|
|
|
+ }
|
|
|
|
+ })
|
|
|
|
+
|
|
|
|
+ if(!_flag){
|
|
|
|
+ let time = this.timeLimit.split(",");
|
|
|
|
+ this.submissionTimePicker = [new Date(time[0]),new Date(time[1])];
|
|
|
|
+ this.submissionTimePickerChange()
|
|
|
|
+ }else{
|
|
|
|
+ this.tableDataPickerChange();
|
|
|
|
+ }
|
|
|
|
+ this.$forceUpdate();
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+
|
|
})
|
|
})
|
|
.catch((err) => {
|
|
.catch((err) => {
|
|
console.error(err);
|
|
console.error(err);
|
|
@@ -4419,6 +4687,7 @@ ${JSON.stringify(forAllList)}
|
|
this.selectWorkList = value;
|
|
this.selectWorkList = value;
|
|
},
|
|
},
|
|
tableDataPickerChange() {
|
|
tableDataPickerChange() {
|
|
|
|
+ console.log(this.tableDatePicker)
|
|
let _copyData = JSON.parse(JSON.stringify(this.worksArray));
|
|
let _copyData = JSON.parse(JSON.stringify(this.worksArray));
|
|
this.tableDatePicker.forEach((i, index) => {
|
|
this.tableDatePicker.forEach((i, index) => {
|
|
/*[null,["2024-12-05T00:00:00.000","2025-01-12T00:00:00.000"],["2024-12-04T00:00:00.000","2025-01-24T00:00:00.000"]] */
|
|
/*[null,["2024-12-05T00:00:00.000","2025-01-12T00:00:00.000"],["2024-12-04T00:00:00.000","2025-01-24T00:00:00.000"]] */
|
|
@@ -4435,6 +4704,7 @@ ${JSON.stringify(forAllList)}
|
|
}
|
|
}
|
|
});
|
|
});
|
|
this.tableWorksArray = _copyData;
|
|
this.tableWorksArray = _copyData;
|
|
|
|
+ this.$forceUpdate()
|
|
},
|
|
},
|
|
submissionTimePickerChange(){
|
|
submissionTimePickerChange(){
|
|
let _copyData = JSON.parse(JSON.stringify(this.worksArray));
|
|
let _copyData = JSON.parse(JSON.stringify(this.worksArray));
|
|
@@ -4450,6 +4720,7 @@ ${JSON.stringify(forAllList)}
|
|
})
|
|
})
|
|
|
|
|
|
this.tableWorksArray = _copyData;
|
|
this.tableWorksArray = _copyData;
|
|
|
|
+ this.$forceUpdate();
|
|
// this.submissionTimePicker.forEach((i, index) => {
|
|
// this.submissionTimePicker.forEach((i, index) => {
|
|
// /*[null,["2024-12-05T00:00:00.000","2025-01-12T00:00:00.000"],["2024-12-04T00:00:00.000","2025-01-24T00:00:00.000"]] */
|
|
// /*[null,["2024-12-05T00:00:00.000","2025-01-12T00:00:00.000"],["2024-12-04T00:00:00.000","2025-01-24T00:00:00.000"]] */
|
|
// if (i && i.length > 0) {
|
|
// if (i && i.length > 0) {
|
|
@@ -4610,7 +4881,26 @@ ${JSON.stringify(item.array)}
|
|
// console.log(row);
|
|
// console.log(row);
|
|
// this.tableWorksArray.find(i=>i.id===row.id).isReview = "1";
|
|
// this.tableWorksArray.find(i=>i.id===row.id).isReview = "1";
|
|
// this.$forceUpdate()
|
|
// this.$forceUpdate()
|
|
- }
|
|
|
|
|
|
+ },
|
|
|
|
+ //退回表单
|
|
|
|
+ returnTest(row){
|
|
|
|
+ if(row.type=='1')return this.$message.info("该表单未提交")
|
|
|
|
+ if(row.type=='4')return this.$message.info("该表单已退回")
|
|
|
|
+ let params = [{
|
|
|
|
+ id:row.id,
|
|
|
|
+ type:"4"
|
|
|
|
+ }];
|
|
|
|
+
|
|
|
|
+ this.ajax.post(this.$store.state.api+"update_testCourseWorks_typeById",params).then(res=>{
|
|
|
|
+ if(res.data==1){
|
|
|
|
+ this.tableWorksArray.find(i=>i.id==row.id).type = "4";
|
|
|
|
+ this.$message.success("表单退回成功");
|
|
|
|
+ }
|
|
|
|
+ }).catch(e=>{
|
|
|
|
+ console.log(e);
|
|
|
|
+ })
|
|
|
|
+
|
|
|
|
+ },
|
|
},
|
|
},
|
|
|
|
|
|
beforeDestroy() {
|
|
beforeDestroy() {
|
|
@@ -5770,4 +6060,33 @@ ${JSON.stringify(item.array)}
|
|
margin-right: 20px;
|
|
margin-right: 20px;
|
|
font-weight:bold;
|
|
font-weight:bold;
|
|
}
|
|
}
|
|
|
|
+
|
|
|
|
+.typeStatus{
|
|
|
|
+ padding: 4px 8px;
|
|
|
|
+ border-radius: 4px;
|
|
|
|
+ border: solid 1px gray;
|
|
|
|
+ display: flex;
|
|
|
|
+ align-items: center;
|
|
|
|
+ justify-content: center;
|
|
|
|
+ font-size: 12px;
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+.typeStatus_2{
|
|
|
|
+ background:#F0F9F2;
|
|
|
|
+ border-color: #B5E3BF;
|
|
|
|
+ color:#5FC875;
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+.typeStatus_4{
|
|
|
|
+ background:#FEF5EC;
|
|
|
|
+ border-color: #FAD0A1;
|
|
|
|
+ color:#F7933B;
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+.typeStatus_1{
|
|
|
|
+ background:#EEF3FC;
|
|
|
|
+ border-color: #0F40F5;
|
|
|
|
+ color:#0F40F5;
|
|
|
|
+}
|
|
|
|
+
|
|
</style>
|
|
</style>
|