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