Compare commits
No commits in common. "2407e66e6693731dfc79e54cdb9139045aa430dd" and "b07a4e07b9dd4932a7ce6dddbf426bed76616949" have entirely different histories.
2407e66e66
...
b07a4e07b9
|
@ -89,13 +89,6 @@ export function updateClassworkdata(data) {
|
||||||
data: data
|
data: data
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
export function updateClassWorkDataAutoFinish(data) {
|
|
||||||
return request({
|
|
||||||
url: '/education/classworkdata/updAutoFinish',
|
|
||||||
method: 'put',
|
|
||||||
data: data
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
// 修改classwork
|
// 修改classwork
|
||||||
export function updateClasswork(data) {
|
export function updateClasswork(data) {
|
||||||
|
@ -125,90 +118,90 @@ export function addClassworkeval(data) {
|
||||||
// 查询evaluationclue列表
|
// 查询evaluationclue列表
|
||||||
export function listEvaluationclue(query) {
|
export function listEvaluationclue(query) {
|
||||||
return request({
|
return request({
|
||||||
url: '/education/evaluationclue/list',
|
url: '/education/evaluationclue/list',
|
||||||
method: 'get',
|
method: 'get',
|
||||||
params: query
|
params: query
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
// 查询evaluationclue详细
|
// 查询evaluationclue详细
|
||||||
export function getEvaluationclue(id) {
|
export function getEvaluationclue(id) {
|
||||||
return request({
|
return request({
|
||||||
url: '/education/evaluationclue/' + id,
|
url: '/education/evaluationclue/' + id,
|
||||||
method: 'get'
|
method: 'get'
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
// 新增evaluationclue
|
// 新增evaluationclue
|
||||||
export function addEvaluationclueReturnId(data) {
|
export function addEvaluationclueReturnId(data) {
|
||||||
return request({
|
return request({
|
||||||
url: '/education/evaluationclue/addReturnId',
|
url: '/education/evaluationclue/addReturnId',
|
||||||
method: 'post',
|
method: 'post',
|
||||||
data: data
|
data: data
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
// 新增evaluationclue
|
// 新增evaluationclue
|
||||||
export function addEvaluationclue(data) {
|
export function addEvaluationclue(data) {
|
||||||
return request({
|
return request({
|
||||||
url: '/education/evaluationclue',
|
url: '/education/evaluationclue',
|
||||||
method: 'post',
|
method: 'post',
|
||||||
data: data
|
data: data
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
// 修改evaluationclue
|
// 修改evaluationclue
|
||||||
export function updateEvaluationclue(data) {
|
export function updateEvaluationclue(data) {
|
||||||
return request({
|
return request({
|
||||||
url: '/education/evaluationclue',
|
url: '/education/evaluationclue',
|
||||||
method: 'put',
|
method: 'put',
|
||||||
data: data
|
data: data
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
// 删除evaluationclue
|
// 删除evaluationclue
|
||||||
export function delEvaluationclue(id) {
|
export function delEvaluationclue(id) {
|
||||||
return request({
|
return request({
|
||||||
url: '/education/evaluationclue/' + id,
|
url: '/education/evaluationclue/' + id,
|
||||||
method: 'delete'
|
method: 'delete'
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
// 新增evaluationclue,保存base64图片
|
// 新增evaluationclue,保存base64图片
|
||||||
export function saveBase64File(data) {
|
export function saveBase64File(data) {
|
||||||
return request({
|
return request({
|
||||||
url: '/education/evaluationclue/saveBase64File',
|
url: '/education/evaluationclue/saveBase64File',
|
||||||
method: 'post',
|
method: 'post',
|
||||||
data: data
|
data: data
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
// 新增evaluationclue,上传
|
// 新增evaluationclue,上传
|
||||||
export function saveEvaluationClueUploadFile(data) {
|
export function saveEvaluationClueUploadFile(data) {
|
||||||
return request({
|
return request({
|
||||||
url: '/education/evaluationclue/saveUploadFile',
|
url: '/education/evaluationclue/saveUploadFile',
|
||||||
method: 'post',
|
method: 'post',
|
||||||
data: data
|
data: data
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
// 读取文件内容
|
// 读取文件内容
|
||||||
export function readFile(data) {
|
export function readFile(data) {
|
||||||
return fetch(import.meta.env.VITE_APP_RES_FILE_PATH + data.cluelink, {
|
return fetch(import.meta.env.VITE_APP_RES_FILE_PATH + data.cluelink, {
|
||||||
method: "get",
|
method: "get",
|
||||||
headers: {
|
headers: {
|
||||||
'Content-Type': 'text/plain', // 请求头设置为纯文本
|
'Content-Type': 'text/plain', // 请求头设置为纯文本
|
||||||
'Accept': 'text/plain' // 接受头设置为纯文本
|
'Accept': 'text/plain' // 接受头设置为纯文本
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
.then(response => response.text())
|
.then(response => response.text())
|
||||||
.then(text => {
|
.then(text => {
|
||||||
return Promise.resolve(text);
|
return Promise.resolve(text);
|
||||||
})
|
})
|
||||||
.catch(error => {
|
.catch(error => {
|
||||||
console.error('读取文件出错:', error);
|
console.error('读取文件出错:', error);
|
||||||
return Promise.reject();
|
return Promise.reject();
|
||||||
});
|
});
|
||||||
/*return request({
|
/*return request({
|
||||||
url: '/education/evaluationclue/readFile',
|
url: '/education/evaluationclue/readFile',
|
||||||
method: 'post',
|
method: 'post',
|
||||||
|
|
|
@ -167,61 +167,3 @@ export function getTomorrow() {
|
||||||
|
|
||||||
return tomorrow;
|
return tomorrow;
|
||||||
}
|
}
|
||||||
/**
|
|
||||||
* 当前日期的 前几天
|
|
||||||
* @param {*} index 天数
|
|
||||||
* @param {*} format true 返回中国标准时间:Wed Oct 02 2024 08:00:00 GMT+0800 (中国标准时间) 格式; false 返回标准时间格式 YYYY-MM-DD
|
|
||||||
* @returns
|
|
||||||
*/
|
|
||||||
export function getTheOtherDay(index, format=true) {
|
|
||||||
let date = new Date();
|
|
||||||
var year = date.getFullYear()
|
|
||||||
var month = date.getMonth() + 1 < 10 ? '0' + (date.getMonth() + 1) : date.getMonth() + 1
|
|
||||||
var day = date.getDate()- index < 10 ? '0' + (date.getDate()- index) : date.getDate()- index
|
|
||||||
|
|
||||||
// 前 index 天的时间
|
|
||||||
if(format){
|
|
||||||
let tomorrow = `${year}-${month}-${day}`;
|
|
||||||
return new Date(tomorrow);
|
|
||||||
}else{
|
|
||||||
let tomorrow = `${year}-${month}-${day}`;
|
|
||||||
return tomorrow;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
/**
|
|
||||||
* 当前日期的 后几天
|
|
||||||
* @param {*} index 天数
|
|
||||||
* @param {*} format true 返回中国标准时间:Wed Oct 02 2024 08:00:00 GMT+0800 (中国标准时间) 格式; false 返回标准时间格式 YYYY-MM-DD
|
|
||||||
* @returns
|
|
||||||
*/
|
|
||||||
export function getTheOtheNextDay(index, format=true) {
|
|
||||||
const date = new Date();
|
|
||||||
var year = date.getFullYear()
|
|
||||||
var month = date.getMonth() + 1 < 10 ? '0' + (date.getMonth() + 1) : date.getMonth() + 1
|
|
||||||
var day = date.getDate()+ index < 10 ? '0' + (date.getDate()+ index) : date.getDate()+ index
|
|
||||||
|
|
||||||
// 前 index 天的时间
|
|
||||||
if(format){
|
|
||||||
const tomorrow = `${year}-${month}-${day}`;
|
|
||||||
return new Date(tomorrow);
|
|
||||||
}else{
|
|
||||||
const tomorrow = `${year}-${month}-${day}`;
|
|
||||||
return tomorrow;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Wed Oct 02 2024 08:00:00 GMT+0800 (中国标准时间) 转为日期格式: YYYY-MM-DD
|
|
||||||
*
|
|
||||||
* @param {*} format
|
|
||||||
* @returns
|
|
||||||
*/
|
|
||||||
export const getDateFormatDate = (newDate)=> {
|
|
||||||
const now = newDate; // new Date();
|
|
||||||
const year = now.getFullYear();
|
|
||||||
const month = (now.getMonth() + 1).toString().padStart(2, '0');
|
|
||||||
const day = now.getDate().toString().padStart(2, '0');
|
|
||||||
|
|
||||||
return `${year}-${month}-${day}`;
|
|
||||||
}
|
|
||||||
|
|
|
@ -19,16 +19,6 @@
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="demo-date-picker">
|
|
||||||
<el-date-picker
|
|
||||||
v-model="startEndDate"
|
|
||||||
type="daterange"
|
|
||||||
start-placeholder="Start Date"
|
|
||||||
end-placeholder="End Date"
|
|
||||||
:default-time="defaultTime"
|
|
||||||
@change="changeStartEndDate"
|
|
||||||
/>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="class-reserv-body">
|
<div class="class-reserv-body">
|
||||||
|
@ -73,7 +63,7 @@ import { listByDeadDate, listClassworkdata } from '@/api/classTask'
|
||||||
import TaskItem from '@/views/classTask/container/classTask/task-item.vue'
|
import TaskItem from '@/views/classTask/container/classTask/task-item.vue'
|
||||||
// import ItemDialog from '@/views/classTask/container/item-dialog.vue'
|
// import ItemDialog from '@/views/classTask/container/item-dialog.vue'
|
||||||
import { useToolState } from '@/store/modules/tool'
|
import { useToolState } from '@/store/modules/tool'
|
||||||
import { getCurrentTime, getDateFormatDate, getTheOtherDay, getTheOtheNextDay } from '@/utils/date'
|
import { getCurrentTime } from '@/utils/date'
|
||||||
import useUserStore from '@/store/modules/user'
|
import useUserStore from '@/store/modules/user'
|
||||||
import useClassTaskStore from "@/store/modules/classTask";
|
import useClassTaskStore from "@/store/modules/classTask";
|
||||||
import {createWindow} from '@/utils/tool'
|
import {createWindow} from '@/utils/tool'
|
||||||
|
@ -90,16 +80,6 @@ const tabOptions = ref(['待批改', '已批改'])
|
||||||
const tabActive = ref('待批改')
|
const tabActive = ref('待批改')
|
||||||
const dataList = ref([])
|
const dataList = ref([])
|
||||||
const EndDate = ref(getCurrentTime('YYYY-MM-DD'))
|
const EndDate = ref(getCurrentTime('YYYY-MM-DD'))
|
||||||
// 默认起止时间:当前日期前2天后3天;默认查询一周的数据
|
|
||||||
const startEndDate = ref([
|
|
||||||
getTheOtherDay(3),
|
|
||||||
getTheOtheNextDay(3),
|
|
||||||
])
|
|
||||||
const defaultTime = ref<[Date, Date]>([
|
|
||||||
getTheOtherDay(3),
|
|
||||||
getTheOtheNextDay(3),
|
|
||||||
])
|
|
||||||
|
|
||||||
|
|
||||||
// 所有班级作业列表
|
// 所有班级作业列表
|
||||||
const classWorkList = ref([])
|
const classWorkList = ref([])
|
||||||
|
@ -130,10 +110,6 @@ const changeEndDate = (val) => {
|
||||||
console.log('截止日期改变', val)
|
console.log('截止日期改变', val)
|
||||||
getData() // 加载数据
|
getData() // 加载数据
|
||||||
}
|
}
|
||||||
const changeStartEndDate = (val) => {
|
|
||||||
console.log('起止日期改变', val)
|
|
||||||
getData() // 加载数据
|
|
||||||
}
|
|
||||||
|
|
||||||
// 获取数据
|
// 获取数据
|
||||||
const getData = async () => {
|
const getData = async () => {
|
||||||
|
@ -169,27 +145,26 @@ const getClassWorkList = async () => {
|
||||||
edustage: userStore.edustage, // 学段
|
edustage: userStore.edustage, // 学段
|
||||||
edusubject: userStore.edusubject,//学科
|
edusubject: userStore.edusubject,//学科
|
||||||
// deaddate: tabActive.value === '待批改'? getTomorrow() : EndDate.value,// 待批改:明天,已批改:选择的日期 弃用
|
// deaddate: tabActive.value === '待批改'? getTomorrow() : EndDate.value,// 待批改:明天,已批改:选择的日期 弃用
|
||||||
startdate: tabActive.value === '待批改'? '' : getDateFormatDate(startEndDate.value[0]),
|
deaddate: EndDate.value,// 待批改:明天,已批改:选择的日期
|
||||||
deaddate: tabActive.value === '待批改'? '' : getDateFormatDate(startEndDate.value[1]),// 待批改:明天,已批改:选择的日期
|
status: '1', // 作业状态:1-已发布
|
||||||
status: tabActive.value === '待批改'? '1' : '2', // 作业状态:1-已发布
|
|
||||||
orderby: 'deaddate DESC',
|
orderby: 'deaddate DESC',
|
||||||
pageSize: 100,
|
pageSize: 100,
|
||||||
})
|
})
|
||||||
|
|
||||||
/** 2024-11-02 需求更改;弃用
|
/**
|
||||||
* 2024-10-17 由于 后面截止时间加了 时分,特加判断
|
* 2024-10-17 由于 后面截止时间加了 时分,特加判断
|
||||||
* 1、待批改、以前是以明天判断。现改为传当天的日期,并根据当前日期的时分与截止日期进行判断,
|
* 1、待批改、以前是以明天判断。现改为传当天的日期,并根据当前日期的时分与截止日期进行判断,
|
||||||
* 2、已批改、以前默认是以明天判断。现依然以明天为判断,并根据当前日期时分大于截止日期时分判断。
|
* 2、已批改、以前默认是以明天判断。现依然以明天为判断,并根据当前日期时分大于截止日期时分判断。
|
||||||
*/
|
*/
|
||||||
// let list = [];
|
let list = [];
|
||||||
// if(tabActive.value === '待批改'){
|
if(tabActive.value === '待批改'){
|
||||||
// // 待批改 当前日期时间 小于 截止 日期时间
|
// 待批改 当前日期时间 小于 截止 日期时间
|
||||||
// list = response.rows&&response.rows.filter(item => item.deaddate && getCurrentTime('YYYY-MM-DD HH:mm') < item.deaddate); // 待批改
|
list = response.rows&&response.rows.filter(item => item.deaddate && getCurrentTime('YYYY-MM-DD HH:mm') < item.deaddate); // 待批改
|
||||||
// }else{
|
}else{
|
||||||
// list = response.rows&&response.rows.filter(item => item.deaddate && getCurrentTime('YYYY-MM-DD HH:mm') > item.deaddate); // 已批改
|
list = response.rows&&response.rows.filter(item => item.deaddate && getCurrentTime('YYYY-MM-DD HH:mm') > item.deaddate); // 已批改
|
||||||
// }
|
}
|
||||||
|
|
||||||
|
|
||||||
let list = response.rows || [];
|
|
||||||
for (var i = 0; i < list.length; i++) {
|
for (var i = 0; i < list.length; i++) {
|
||||||
// 初始化部分新增字段值
|
// 初始化部分新增字段值
|
||||||
list[i].workdatalist = []
|
list[i].workdatalist = []
|
||||||
|
@ -251,9 +226,7 @@ const getStudentClassWorkData = async() => {
|
||||||
// edusubject: userStore.edusubject,//学科
|
// edusubject: userStore.edusubject,//学科
|
||||||
// deaddate: tabActive.value === '待批改'? getTomorrow() : EndDate.value,// 待批改:明天,已批改:选择的日期
|
// deaddate: tabActive.value === '待批改'? getTomorrow() : EndDate.value,// 待批改:明天,已批改:选择的日期
|
||||||
// deaddate: EndDate.value,// 待批改:明天,已批改:选择的日期
|
// deaddate: EndDate.value,// 待批改:明天,已批改:选择的日期
|
||||||
// startdate: tabActive.value === '待批改'? '' : getDateFormatDate(startEndDate.value[0]),
|
// //status: '1', // 作业状态:1-已发布
|
||||||
// deaddate:tabActive.value === '待批改'? '' : getDateFormatDate(startEndDate.value[1]),
|
|
||||||
// //status: tabActive.value === '待批改'? '1' : '2', // 作业状态:1-已发布
|
|
||||||
// orderby: "deaddate DESC",//
|
// orderby: "deaddate DESC",//
|
||||||
// pageSize: 1000,
|
// pageSize: 1000,
|
||||||
// })
|
// })
|
||||||
|
@ -453,10 +426,8 @@ const getStudentVisible = async () => {
|
||||||
edustage: userStore.edustage,// 学段
|
edustage: userStore.edustage,// 学段
|
||||||
edusubject: userStore.edusubject,//学科
|
edusubject: userStore.edusubject,//学科
|
||||||
// deaddate: tabActive.value === '待批改'? getTomorrow() : EndDate.value,// 待批改:明天,已批改:选择的日期
|
// deaddate: tabActive.value === '待批改'? getTomorrow() : EndDate.value,// 待批改:明天,已批改:选择的日期
|
||||||
// deaddate: EndDate.value,// 待批改:明天,已批改:选择的日期
|
deaddate: EndDate.value,// 待批改:明天,已批改:选择的日期
|
||||||
startdate: tabActive.value === '待批改'? '' : getDateFormatDate(startEndDate.value[0]),
|
status: '1', // 作业状态:1-已发布
|
||||||
deaddate: tabActive.value === '待批改'? '' : getDateFormatDate(startEndDate.value[1]),
|
|
||||||
status: tabActive.value === '待批改'? '1' : '2', // 作业状态:1-已发布
|
|
||||||
// orderby: 'concat(deaddate,uniquekey) DESC',
|
// orderby: 'concat(deaddate,uniquekey) DESC',
|
||||||
orderby: 'deaddate DESC',
|
orderby: 'deaddate DESC',
|
||||||
pageSize: 100
|
pageSize: 100
|
||||||
|
|
|
@ -427,7 +427,7 @@ import useUserStore from '@/store/modules/user'
|
||||||
import { ref, reactive } from 'vue'
|
import { ref, reactive } from 'vue'
|
||||||
// import { Plus } from '@element-plus/icons-vue'
|
// import { Plus } from '@element-plus/icons-vue'
|
||||||
import { ElMessageBox, ElMessage } from 'element-plus'
|
import { ElMessageBox, ElMessage } from 'element-plus'
|
||||||
import { updateClassworkeval,updateClasswork, updateClassWorkDataAutoFinish, getClassworkdata, updateClassworkevalList } from '@/api/classTask'
|
import { updateClassworkeval, updateClassworkdata, getClassworkdata, updateClassworkevalList } from '@/api/classTask'
|
||||||
import { getTimeDate } from '@/utils/date'
|
import { getTimeDate } from '@/utils/date'
|
||||||
import ReFilePreview from '@/components/refile-preview/index.vue'
|
import ReFilePreview from '@/components/refile-preview/index.vue'
|
||||||
import { quizStrToList } from '@/utils/comm';
|
import { quizStrToList } from '@/utils/comm';
|
||||||
|
@ -871,13 +871,6 @@ const onSubmit = () => {
|
||||||
})
|
})
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
/** 1、 更新当前作业是否已经批阅完成 */
|
|
||||||
// TODO updateClasswork
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/** 2、 更新每个学生的批阅 */
|
|
||||||
|
|
||||||
var formd = {
|
var formd = {
|
||||||
id: dialogProps.value.studentObj.id, // this.activeClassWork.id;
|
id: dialogProps.value.studentObj.id, // this.activeClassWork.id;
|
||||||
|
@ -885,7 +878,7 @@ const onSubmit = () => {
|
||||||
updatedate: getTimeDate(),// = year+'-'+month+'-'+day+' '+hh+':'+mm;
|
updatedate: getTimeDate(),// = year+'-'+month+'-'+day+' '+hh+':'+mm;
|
||||||
};
|
};
|
||||||
// 更新作业批改状态
|
// 更新作业批改状态
|
||||||
updateClassWorkDataAutoFinish(formd).then(res => {
|
updateClassworkdata(formd).then(res => {
|
||||||
})
|
})
|
||||||
|
|
||||||
// 更新题目批改
|
// 更新题目批改
|
||||||
|
|
|
@ -35,7 +35,7 @@
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- TODO 练习次数、引用次数 这里随便的假数据-->
|
<!-- TODO 练习次数\引用次数 这里随便的假数据-->
|
||||||
<div v-if=" tabactive == '已批改' " class="class-reserv-item-tool">
|
<div v-if=" tabactive == '已批改' " class="class-reserv-item-tool">
|
||||||
<span style="color:#000fff; font-weight: 900; font-size: 15px">{{ item.workdataresultsum }}</span>
|
<span style="color:#000fff; font-weight: 900; font-size: 15px">{{ item.workdataresultsum }}</span>
|
||||||
<span>练习次数</span>
|
<span>练习次数</span>
|
||||||
|
|
Loading…
Reference in New Issue