Merge branch 'main' into zouyf_dev
This commit is contained in:
commit
4e835cac82
|
@ -115,7 +115,8 @@ const getSubjectContent = async () => {
|
||||||
edustage,
|
edustage,
|
||||||
// entpcourseedituserid: userId,
|
// entpcourseedituserid: userId,
|
||||||
itemgroup: 'textbook',
|
itemgroup: 'textbook',
|
||||||
pageSize: 500
|
orderby: 'orderidx asc',
|
||||||
|
pageSize: 10000
|
||||||
}
|
}
|
||||||
let data;
|
let data;
|
||||||
const { rows } = await listEvaluation(params)
|
const { rows } = await listEvaluation(params)
|
||||||
|
@ -142,7 +143,7 @@ const getSubject = async () => {
|
||||||
subjectList.value = JSON.parse(localStorage.getItem('subjectList'))
|
subjectList.value = JSON.parse(localStorage.getItem('subjectList'))
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
const { rows } = await listEvaluation({ itemkey: "version", edusubject, edustage, pageSize: 500 })
|
const { rows } = await listEvaluation({ itemkey: "version", edusubject, edustage, pageSize: 10000, orderby: 'orderidx asc', })
|
||||||
subjectList.value = rows
|
subjectList.value = rows
|
||||||
localStorage.setItem('subjectList', JSON.stringify(subjectList.value))
|
localStorage.setItem('subjectList', JSON.stringify(subjectList.value))
|
||||||
}
|
}
|
||||||
|
|
|
@ -10,13 +10,13 @@
|
||||||
<div v-loading="setLoading">
|
<div v-loading="setLoading">
|
||||||
<el-form :model="form" label-width="80px" ref="ruleFormRef" :rules="rules">
|
<el-form :model="form" label-width="80px" ref="ruleFormRef" :rules="rules">
|
||||||
<el-form-item label="班级" prop="grade">
|
<el-form-item label="班级" prop="grade">
|
||||||
<el-scrollbar max-height="200px" style="width: 100%">
|
<el-scrollbar max-height="150px" style="width: 100%">
|
||||||
<el-tree :props="defaultProps" :load="getLoad" node-key="id" highlight-current @check="handleCheckChange"
|
<el-tree :props="defaultProps" :load="getLoad" node-key="id" highlight-current @check="handleCheckChange"
|
||||||
lazy show-checkbox />
|
lazy show-checkbox />
|
||||||
</el-scrollbar>
|
</el-scrollbar>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="选中学生" prop="student">
|
<el-form-item label="选中学生" prop="student">
|
||||||
<el-scrollbar max-height="200px">
|
<el-scrollbar max-height="130px">
|
||||||
<el-tag v-for="(tag, index) in studentList" :key="tag.studentid" closable type="primary"
|
<el-tag v-for="(tag, index) in studentList" :key="tag.studentid" closable type="primary"
|
||||||
@close="delStudent(index)">
|
@close="delStudent(index)">
|
||||||
{{ tag.name }}
|
{{ tag.name }}
|
||||||
|
@ -53,6 +53,7 @@ import { ElMessage } from 'element-plus'
|
||||||
import { listClassmain, listClassgroup } from '@/api/classManage/index'
|
import { listClassmain, listClassgroup } from '@/api/classManage/index'
|
||||||
import { saveByClassWorkArray } from '@/api/teaching/classwork'
|
import { saveByClassWorkArray } from '@/api/teaching/classwork'
|
||||||
import useUserStore from '@/store/modules/user'
|
import useUserStore from '@/store/modules/user'
|
||||||
|
import { getCurrentTime } from '@/utils/date'
|
||||||
import { uniqBy, groupBy } from 'lodash'
|
import { uniqBy, groupBy } from 'lodash'
|
||||||
|
|
||||||
const model = defineModel({ type: Boolean, default: false })
|
const model = defineModel({ type: Boolean, default: false })
|
||||||
|
@ -233,7 +234,7 @@ const onSubmit = (formEl) => {
|
||||||
timelength: form.timelength,
|
timelength: form.timelength,
|
||||||
weights: 1,
|
weights: 1,
|
||||||
deaddate: form.deaddate,
|
deaddate: form.deaddate,
|
||||||
workdate: getCurrentDate(),
|
workdate: getCurrentTime('YYYY-MM-DD'),
|
||||||
uniquekey: props.row.uniquekey,
|
uniquekey: props.row.uniquekey,
|
||||||
entpcourseworklist: '[' + props.row.entpcourseworklist + ']',
|
entpcourseworklist: '[' + props.row.entpcourseworklist + ']',
|
||||||
needMsgNotifine: 'false',
|
needMsgNotifine: 'false',
|
||||||
|
@ -276,24 +277,10 @@ const cloneDialog = (formEl) => {
|
||||||
formEl.resetFields()
|
formEl.resetFields()
|
||||||
model.value = false
|
model.value = false
|
||||||
}
|
}
|
||||||
// 获取当前年月日
|
|
||||||
const getCurrentDate = () => {
|
|
||||||
const now = new Date()
|
|
||||||
const year = now.getFullYear()
|
|
||||||
let month = now.getMonth() + 1 // 月份是从0开始的,所以需要+1
|
|
||||||
let day = now.getDate()
|
|
||||||
if (month < 10) {
|
|
||||||
month = '0' + month
|
|
||||||
}
|
|
||||||
if (day < 10) {
|
|
||||||
day = '0' + day
|
|
||||||
}
|
|
||||||
return `${year}-${month}-${day}`
|
|
||||||
}
|
|
||||||
|
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
// 默认当前
|
// 默认当前
|
||||||
form.deaddate = getCurrentDate() + ' ' + '10:00:00'
|
form.deaddate = getCurrentTime('YYYY-MM-DD HH:mm')
|
||||||
})
|
})
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|
|
@ -172,16 +172,23 @@ const disabledHours = ()=>{
|
||||||
}
|
}
|
||||||
// 限制分-返回被禁选的
|
// 限制分-返回被禁选的
|
||||||
const disabledMinute = (hour,role) => {
|
const disabledMinute = (hour,role) => {
|
||||||
|
if(form.time == null) return
|
||||||
if(getCurrentTime('YYYY-MM-DD') == form.day){
|
if(getCurrentTime('YYYY-MM-DD') == form.day){
|
||||||
const arrs = []
|
const arrs = []
|
||||||
if(role == 'start'){
|
if(role == 'start'){
|
||||||
|
let nowHour = new Date().getHours().toString().padStart(2, '0');
|
||||||
|
if(nowHour < hour){
|
||||||
|
return []
|
||||||
|
}
|
||||||
|
else{
|
||||||
for (let i = 0; i < 60; i++) {
|
for (let i = 0; i < 60; i++) {
|
||||||
if (new Date().getMinutes() <= i) continue;
|
if (new Date().getMinutes() <= i) continue;
|
||||||
arrs.push(i)
|
arrs.push(i)
|
||||||
}
|
}
|
||||||
return arrs;
|
return arrs;
|
||||||
}
|
}
|
||||||
else{
|
}
|
||||||
|
if(role == 'end'){
|
||||||
if(form.time[0]) return []
|
if(form.time[0]) return []
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -91,6 +91,8 @@ const subjectList = ref([])
|
||||||
|
|
||||||
// 获取基础的学科
|
// 获取基础的学科
|
||||||
const getSubject = () => {
|
const getSubject = () => {
|
||||||
|
//没有学科则不进行下面的步骤
|
||||||
|
if(!userStore.user.subject) return
|
||||||
listEvaluation({ itemkey: 'subject', pageSize: 500 }).then((res) => {
|
listEvaluation({ itemkey: 'subject', pageSize: 500 }).then((res) => {
|
||||||
const arr = userStore.user.subject.split(',')
|
const arr = userStore.user.subject.split(',')
|
||||||
subjectList.value = res.rows.filter(item => arr.includes(String(item.id))).map(items => items)
|
subjectList.value = res.rows.filter(item => arr.includes(String(item.id))).map(items => items)
|
||||||
|
|
Loading…
Reference in New Issue