公共组件:布置推送作业,row改为批量rows逻辑;截止日期默认为当前时间3小时之后
This commit is contained in:
parent
3942f894b0
commit
6163fb06f9
|
@ -61,8 +61,8 @@ const props = defineProps({
|
||||||
entpcourseid: {
|
entpcourseid: {
|
||||||
default: ''
|
default: ''
|
||||||
},
|
},
|
||||||
row: {
|
rows: {
|
||||||
default: ''
|
default: []
|
||||||
},
|
},
|
||||||
title: {
|
title: {
|
||||||
type: String,
|
type: String,
|
||||||
|
@ -222,31 +222,33 @@ const onSubmit = (formEl) => {
|
||||||
let ary = []
|
let ary = []
|
||||||
for (const value in gradeObj) {
|
for (const value in gradeObj) {
|
||||||
//这些参数 参照AIx web端 作业推送
|
//这些参数 参照AIx web端 作业推送
|
||||||
let obj = {
|
for (var i = 0; i < props.rows.length; i++) {
|
||||||
id: 0,
|
let obj = {
|
||||||
parentid: props.row.id,
|
id: 0,
|
||||||
classid: value,
|
parentid: props.rows[i].id,
|
||||||
classcourseid: 0,
|
classid: value,
|
||||||
entpcourseid: props.entpcourseid,
|
classcourseid: 0,
|
||||||
studentlist: JSON.stringify(gradeObj[value]),
|
entpcourseid: props.entpcourseid,
|
||||||
feedback: form.feedback,
|
studentlist: JSON.stringify(gradeObj[value]),
|
||||||
workkey: '',
|
feedback: form.feedback,
|
||||||
timelength: form.timelength,
|
workkey: '',
|
||||||
weights: 1,
|
timelength: form.timelength,
|
||||||
deaddate: form.deaddate,
|
weights: 1,
|
||||||
workdate: getCurrentTime('YYYY-MM-DD'),
|
deaddate: form.deaddate,
|
||||||
uniquekey: props.row.uniquekey,
|
workdate: getCurrentTime('YYYY-MM-DD'),
|
||||||
entpcourseworklist: '[' + props.row.entpcourseworklist + ']',
|
uniquekey: props.rows[i].uniquekey,
|
||||||
needMsgNotifine: 'false',
|
entpcourseworklist: '[' + props.rows[i].entpcourseworklist + ']',
|
||||||
msgkey: 'newclasswork',
|
needMsgNotifine: 'false',
|
||||||
title: '作业任务',
|
msgkey: 'newclasswork',
|
||||||
msgcontent: '',
|
title: '作业任务',
|
||||||
teachername: userInfo.nickName,
|
msgcontent: '',
|
||||||
unixstamp: new Date().getTime(),
|
teachername: userInfo.nickName,
|
||||||
worktype: props.row.worktype,
|
unixstamp: new Date().getTime(),
|
||||||
status: '1'
|
worktype: props.rows[i].worktype,
|
||||||
|
status: '1'
|
||||||
|
}
|
||||||
|
ary.push(obj)
|
||||||
}
|
}
|
||||||
ary.push(obj)
|
|
||||||
}
|
}
|
||||||
setLoading.value = true
|
setLoading.value = true
|
||||||
saveByClassWorkArray({
|
saveByClassWorkArray({
|
||||||
|
@ -280,8 +282,9 @@ const cloneDialog = (formEl) => {
|
||||||
}
|
}
|
||||||
|
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
// 默认当前
|
// 默认当前 改为 延后3小时后截止
|
||||||
form.deaddate = getCurrentTime('YYYY-MM-DD HH:mm')
|
// form.deaddate = getCurrentTime('YYYY-MM-DD HH:mm')
|
||||||
|
form.deaddate = `${getCurrentTime('YYYY-MM-DD')} ${getCurrentTime('HH+3')}:${getCurrentTime('mm')}`;
|
||||||
})
|
})
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue